
Hi everyone,
The pioneer wagon is now working - assuming that the player behaves themselves. Which is of course something that never happens. So let me talk about some of the edge cases I am currently guarding the wagon against.
As I said, the wagon is generally working now. It can be created in the wagon maker building (which doesn’t have a model yet, however), and once at its destination, it neatly unpacks and creates a new village for you. The villages are now considered separate for logistics purposes as well, so you no longer destroy your main village with long lines of villagers carrying things halfway across the island.
However, the wagon working depends on the player doing everything the way that I expected it to - which players never do. Any deviation from that can still break the game or the new village in many creative ways, which I need to create code to guard against to help the game handle them smoothly.
There are many, many cases that I need to think through, but I will give one as an example: The player creates a village in an area that is not yet cleared of pirates, and the pirates destroy one of the houses that have been placed but not yet constructed. In a regular village, the residents of a house are killed if their house gets destroyed - however, this is much harder to do in an established village, as any house that already has residents has to be built - and therefore will have all its hitpoints. Meanwhile, in the new village creation, the houses that are only construction sites and have very few hit points already count as the accommodations for the villagers that are creating them - so a small oversight of missing one pirate may wipe out half your new village and means the buildings are never finished.
As a solution with the new village, the destruction of a house will only catch up with the villagers after the remaining buildings have been constructed (or destroyed). If a house gets destroyed, its residents will continue to construct the building they are currently tasked with, and only once all of the buildings have been constructed, will the villagers without a house catch up with what happened. This means that even if a house (or both) get(s) destroyed, the warehouse and market will go up, and the player has the option of constructing a house themselves to “revive” the new village once they have dealt with the pirates.
Additionally, the game needs to handle what happens when a villager in the new village dies during creation of a building; what happens when the player steals resources from the village that the village needs to be constructed; what happens when the wagon gets attacked during building placement; what happens when the player saves at just the wrong moment during any of these cases, etc, etc. In good news, I am making my way through the edge cases quite steadily, so the new functionality should be ready to be uploaded at some point during next week - so you can test it and tell me about all the edge cases I did not prepare the game for.
Until next week!