Devlog 19
Wow! Quick week! Thanks for sticking around! I feel like I really settled into my groove and got things done.
This week,
I’ve added in several new subactions ranging from extremely simple to very complex, got unit pathing working flawlessly (I hope), implemented a fairly robust targeting system for what monsters are interested in, thrown together a very basic AI for the monsters (it’s functional but not permanent), and did a significant amount of debugging. I think it’s about time we cover some of the systems I’ve been working on in more detail!
Action System
The action system is the external section that modders will interface with. Each unit on the field (whether monsters or players) has access to several actions. On their turn, they can pick which actions to use. Eventually, the number of actions that any unit can take will likely be based around some form of action point system. For now, it’s one action per turn.
Actions themselves are not entirely straightforward. Each action is built out of sub-actions; simple scripts that can be pieced together in different ways to accomplish nearly anything. As development continues, I’ll add more and more subaction scripts that people are interested in using. These are the most basic building blocks of what units can do: things like deal damage, search something, select a target, path to something, move with user input, or path to a different room. Internally, these are complicated multi-system processes, but externally, the goal is to keep them as simple as possible.
Like I mentioned before, you build actions out of individual sub-actions. For those of you who played the previous release, you’d notice that each button on the action wheel (I promise I will add a hover-for-description feature eventually) performed a simple action. One of them was for moving with input and one of them was for pathing to another unit in the room. Those are both actions composed of a single sub-action. It would be just as simple to have a button to do both of those things at once.
The system for modding actions is on my to-do-soon list, but the specifics of it are not concrete yet. It will essentially be actions composed by chaining subactions and logical operators together! I hope this keeps the modding generally easier to understand.
Exits
Rooms now have exits! These can be defined within each room’s .json file. Currently, they’re only within the room config file, so if you’re interested in playing around with modifying the exits you can either copy that formatting into an individual room’s .json file or just modify it directly within the config file! Either will have similar results. Monsters will, by default, attempt to path to random rooms using the exits in each room that are listed within the files. They all connect up properly, which is great! If you see they have weird values, I was just testing an edge case with those. The exits are in the middle of the room right now!
Targeting System
Units need something to be interested in, so I gave it to them! There is currently a subaction for ‘wandering’ that makes units target a particular room. I intend to expand this to items, units, and more in the future! Eventually, what a unit is targeting will be the driver for a lot of different subactions.
Coming Soon (probably not all next week),
Action Descriptions
It will be fairly simple once I have the time to do it to add in some better UI around taking actions. The action wheel on each unit needs more clarity than it has right now. I’m planning on setting up a panel with space for an icon and title that will replace the current boring, square button that’s there. I feel like playing through the version that is releasing today will be somewhat confusing because the UI buttons aren’t clear enough even for a pre-alpha. These panels will also include a hover description that will appear when you hover the cursor over the menu for a brief time! Hopefully that will help clear some things up.
Room Shape
Room shape is currently customizable… if you want the room to be any sort of single rectangle. I am planning on adding in more shape options for each room at some point, but I’m not exactly sure when. It was really important to me to add in the actions first! Eventually, I’m planning on having options for multiple shapes at once including circles, polygons, rectangles, and individual points!
External Action System Accessibility
Right now, there's no way for modders to put together actions with the subaction units. I'm planning on addressing that soon!
More Subactions
Throughout development, I'll be adding in more subactions as needed. I have several more of these in mind right now!
That's all for this week! Thanks for reading and have a good weekend~