Weekly Update – February 23, 2024

I mostly missed my goals for the week (adding content, item degradation) due to prioritizing bug fixes.

  • New content
    • Enemies: Dog. Some Bandits are now accompanied by Dogs. Dogs make combat with Bandits more interesting by moving faster than the Bandits and the player.
    • Room Improvements
      • There’s now a chance of rats eating dead adventurer corpses.
  • Actor-specific action costs. Previously, actors spent the same number of Action Points to perform an action, regardless of the action. Now the number of Actor Points spent to perform a particular action can vary by actor. This allows Dogs and Bats to move two cells per turn, but only attack once per turn.
  • Bug fixes
    • Stalagmite Monsters can open doors. This was an annoying bug. Stalagmite Monsters shouldn’t be able to open doors – they don’t have arms! Each enemy has a list of action lists. One of the action lists is “Humanoid.” This list action list includes an “Open” action that lets humanoid enemies open doors. Somehow, Stalagmite Monsters were being assigned this list, even though I could clearly see it wasn’t in the definition. After spending an hour stepping through code and adding debugging statements, a thought occurred to me: maybe actions are also defined in the Actor parent class, Entity. Sure enough, they were. I didn’t notice the field in the Unity Inspector because it was located in an off-screen portion of the field list. Even worse, both the parent and child fields were being used in the code. I modified the code using the parent field to use the child field and updated all the enemy definitions. After all that, the Stalagmite Monster was still opening doors! At least this time the cause immediately occurred to me: the monster was using the ground movement pathfinding map, which treats closed doors as walkable cells. I fixed this with a kludge. When an actor moves, if the next cell contains a closed door and the actor doesn’t have an Open action, the actor won’t open the door. When I can’t anticipate future needs, I code the use case I need in the present and revisit later on when more cases arise and a pattern emerges.
    • Knight (a player class) can’t catch on fire. This occurred because actor flammability was incorrectly based on armor material rather than the actor’s base material (flesh).
    • Fear Potion issues
      • Doesn’t cause the Fear status effect.
      • Default action is Drink.
      • Causes an exception when thrown.
    • Debugging console doesn’t recognize actor type names that have more than one space.
    • Items on top of a Table don’t appear in the Inspect Panel.
    • When taking an item in the Inspect Panel, the Inspect Panel doesn’t update.
    • The Inspect Panel Take action takes all items in the cell instead of just the item being inspected.
    • Opening or closing a door from the Inspect Panel removes the door from the Inspect Panel.
    • Eating an Apple doesn’t heal the eater.
    • Taking a weapon displays the weapon in the corresponding Quick Switch Slot, even though it isn’t the selected weapon.
    • Some actor types don’t gain Action Points each turn.
    • Miscellaneous map generation errors.

Next week, goal #1 is to complete item degradation. Goal #2 is adding map content.





Leave a Reply

Your email address will not be published. Required fields are marked *