Skills
Today I made it so you can select skills from a menu.

There's a few things that went into this:
- Skills need to use up SP (Skill Points) when you use them.
- This means that, in addtion to the effect of the skills, I need to assign each skill a cost, and when you use the skill, it needs to deduct the cost.
- Also, if you try to use a skill you don't have enough SP for, it needs to detect that in advance and prevent you from choosing the menu option.
- It also "grays out" the name of the skill if you don't have enough SP to use it. (Not shown in screenshot above)
- Since it's possible to get in a situation where you have no SP and can't select any options from the skill menu, I added the ability to go "back" to the previous menu by pressing Escape.
Implementing this made me realize that I'll probably want some form of "cursor memory" for menus. Right now, every time you enter the skill menu, the cursor is at the first skill in the list. This makes it inconvenient to use the same skill over and over. So, I'll have to add that next time.
I realized also while writing this that I made a mistake. It deducts your SP as soon as you choose the target of your skill from the target menu. That basically works as expected right now, because I only have one player character in the battle, and the player character always goes first currently. But in more complicated scenarios, other characters or enemies might do things before the player's skill is used. It should really wait to deduct your SP until the skill is actually used in the action phase of combat. I'll go fix that now.
Actually, I also just realized something else right now. Let's say you have three characters in the party. You select actions for the first two characters, but then while selecting actions for the third character, maybe you change your mind about what to do with the first two. It's useful if you can undo and go back and change the actions before the entire turn is finalized. But there's currently no mechanism to do undo a character's turn. That seems important, so I should add it soon.
Everything spirals out of control as soon as you try to create an RPG.
- ← Previous
Aesthetics - Next →
Cursor Memory