Posted July 26, 2025 by Tesselation9000
I've been deepning the world gen process a bit. Until now the game would just randomly scatter towns and villages across the map and randomly assign each to a civilization, resulting in a complete mixture of civilizations. I put this into a more orderly process that works like this:
1. The total number of civilizations for the game is determined. One capital city is randomly placed for each civilization. A city cannot be too close to another city.
2. Additional cities are randomly placed. One a location is chosen, the city's civilization is determined by whichever capital is closest.
3. Roads are placed connecting cities.
4. Villages are randomly placed, and whatever city is closest to a village determines what civilization the village belongs to.
Consequently, the map looks like it's more clearly divided between civilizations.
The road netowrk still needs work, as it tends to get a bit tangled. I'd like to make a more sophisticated system for this that will track if cities are connected on the same network and not bother to add a new road between two cities if there is already a connected. This should cut down on parrallel and unneccessary intersecting roads.
I also finally implemented monster trap memory, as per a post I made about this a couple months ago. Monsters now hold a vector with the coordinates of traps they've seen on the map. Whenever a monster is checking for danger on a cell before moving there, if the destination cell is a trap, it will check its trap memory to verify if it is aware and avoid that cell if it is. Also, when the monster or player does trigger a trap, the trap is advertised to all agents who can see the cell. I can now observe that, if a group of monsters is chasing me, the first will step into a trap, but his buddies will then go around it.
Other goodies lately:
- Bomb chute traps: when triggered by a nearby pressure plate, this trap will drop an activated bomb. The bomb takes 7 turns to explode, so normally the player has enough time to run out of range unless in a confined space or there are monsters in the way. The player can also try to pick up the bomb and throw it out of range, provided there is enough open space for that. If the bomb is thrown away, then the explosion will not destroy the trap itself, so it can be triggered repeatedly. The player can cause a lot of damage this way.
- Smoky key vaults: This is the first type of key vault I've added. A key is placed in a cave with one or more vents that continuously pump out smoke. Smoke blocks vision, and spending time on cells with enough smoke will cause an agent to gradually lose air until finally suffocating to death. If the cave is not too big, the player can eventually find the key by going in and out a few times to get air. There is also a potion of apnea (and an amulet of apnea) that relieve the player of their need to breathe, which can help a lot here.
Another version of this vault exists with freezing vapour instead. Freezing vapour does not suffocate you, but causes lots of cold damage. You will probably need cold resistance to get any keys out of there.
- Pot of mortar: this is a new mundane item with limited charges. It can be used to seal vents or cover certain traps like dart traps.
- Feedback spell: this enchantment will protect an agent against harmful enchantments. If an enemy casts a harmful enchantment against an agent with the feedback buf, their spell will backfire, interrupting the spell and causing a lot of damage to the caster. I'm thinking of extending this also to projectile based spells, but to only work on maybe a 65% basis.
- Scroll of animate statues: causes statues in range to turn into powerful stone golem allies for a limited duration. After that they turn back into statues. Since statues are impassable tiles, I will need to make a solution so they do not block doors or corridors when they turn back. I plan to add that, before turning back into a statue, the game will check if the stone golem is on a cell that could cause a blockage, and instead add a few more turns to the enchantment if they are.