Down the Rabbit Hole
Spent a larger portion of the week than intended chasing a rabbit hole of programming refactoring. I want to say I should be surprised by now, but I'm not. Designing and building systems are whatI love the most about programming, so when I find or see an opportunity to improve something I just can't help myself.
It all started when I went to ensure that the resident Bard, Damien, was able to join the party. I found out that at some point I must have broken the code that handles the parsing for the selection box because not only was "Join Party" not an option, the word "Friend" was there, and that was just wrong.
To explain, before I went down the rabbit hole, I denoted selection text and options using special characters. A sample selection box text is as follows: "Hello, how can I help you? {{Talk-Talk|%Friendship-50%Join Party-Party|Nevermind-Cancel}}"
{{ and }} were used to note where selection options began. Each option was composed of a first part, the text to be shown, then a - before the next part which was the action to take place. The % was used to denote a special condition that would be used to determine if the action should be removed, and it was this that had broken.
I decided to clean my code up and make it easier to follow and parse because, in addition to that, the handling would pass the selected action to the class of the talking npc, going up the chain of overridden classes until it found something to handle the specific action.
Using the TextEntry logic of adding tags to text values, I completely removed the special character handling. Instead, every text entry that opens a selection menu now has a tag denoting it's Selection type. Some selection menus that ask for confirmation have a Trigger associated, and all options that can be selected have a verb attached.
When the code goes to display a bit of text, it checks the tags to see if it has a Selection tag. If so, it knows to make it a TextSelectionWindow and programatically constructs the selection menu based on the type of selection in the tag. When a piece of text is selected, it checks the current text's tags to see if there's an associated Trigger and checks the chosen action for a verb. It uses those two together to choose a course of action.
This rabbit hole took a bit of work, but it's much cleaner and easier to follow. It does have a problem in that everything needs to be programatically added instead of being a bit looser in terms of what menus there are, but I think the benefits far outway the cons :D
NPC Travel
Following up with last week's goals, the NPCs who do not start off living in the village now show up at the Inn at set periods. Currently, everyone stays for a single day before moving on. By doing this, it allows the players to meet the NPCs and get to know them, as well as determining what buildings they need tom ove in, while still forcing the player to build up the town to get them to stay.
The actual patterns they follow are perhaps a bit clunky, but for now at least this will work. I'm considering removing the Inn rooms as actual map locations and just having the NPCs spawn in the main Inn, but we'll have to see how that goes.
Crafting
Playtesting the "early game" a little bit made me definitely feel that having crafting take any real amount of time is tedious at best. Some games that I've seen do this, but it's not exactly something that I find endearing. For now, have made all crafting instant speed, take a set amount of stamina and play a sound effect.
It's still not satisfying though, I think I'm going to need some kind of payer animation, or maybe a heavier sound? Crafting isn't exactly an engaing past-time, but there should still be some good feedback from doing it.
Building Upgrades
I've started improving the manner in which Buildings get upgraded now. Have implemented the ability for upgrading Buildings to spawn new machines which allow you more crafting options, which is a good start. Currently the Level 2 Potion Hut spawns a Millstone to allow you to make powders.
Gremlin
The Shipping Gremlin has been fixed and now sits at the proper position ont he map and sells items for you. He's a special case as far as the NPCs goes so I needed to do some special handling for him, which I hate having to do.
Some new art
Wanted to work on spicing up my machines, made a new massive Cauldron and Millstone. I'm particularly happy with the millstone, minus the side of the damn table it's on. Unsure how to fix that...
Weekly Goals
Following up with my plans from last week, implementing all of the buildings with their own machines and one or two more advanced machines to upgrade to is the next step. Give the Forge a Kiln, Weaver's Cottage needs a Loom, etc.
After that, back to playing the beginning of the game, tweaking the "tech tree" as it were to force the player to upgrade the town to be able to make new items to upgrade their current buildings/build required buildings.
A more hard goal I have is to begin implementing Structures, WorldObjects that can be traversible while also having a non-traversible objects. Like a Marker Square that has several stalls.












