Foe attacks have been refactored into natural weapons (melee and ranged), spell-like abilities and plain old spell books. UnifiedActor now has access to all three.
Character races can now be assigned natural weapons, but the player can't yet make use of them. In time, in time. Races and character classes will also receive multiple spell-like abilities, rather than the current single special ability. Those two changes will need a UI update...
On the other end of the change, I've written a simple Goal-Oriented Action Planner in a reasonably general-purpose way. World state is stored in a set of booleans. Given the starting and desired world states and a set of actions that each have a cost and change the world state, the AI can plot (via an A* graph search) the least-cost path to the desired world state. Credit goes to the GPGOAP project for showing me how easy such a thing could be to implement.
So the end game in sight is that every UnifiedActor can express a list of possible combat actions every round. Players select them via the UI. Foes will run their list of actions through the GOAP AI and use what pops out. We're still some way off from that, and the magic will be in expressing cost and world state changes of every single foe combat option. Garbage in will mean garbage out, as always.
A party-based, first-person, fantasy CRPG with phased combat, class-based character progression, and programmer-art. I called it "old school" until the term got trendy. It started inspired by Wizardry VII and the lack of a free open source alternative. Today we are living in the indie revolution and there are far more influences, but the game still clearly shows its Wizardry lineage. It's playable end to end, but there is a lot more to do before it's done. This blog tracks that work.
Monday, July 22, 2013
Friday, July 5, 2013
Refactoring Continues
The foe data model has been refactored out to be based entirely on UnifiedActor. The upshot is that Foes now have access to a number of things that only PlayerCharacters had before (e.g. inventory, equipable slots, wielding combos, race, class (and multi-classing), gender, spellbooks), while PCs in turn have access to a few things that were once Foe-only (e.g. arbitrary body parts).
What remains of the refactoring is to generalise a number of features of Foes that get in the way of letting them just use items - notably the FoeAttacks. These will get refactored out into Natural Weapons associated with body parts, special abilities, and the existing spellbooks. A nice side effect of this is that PlayerCharacters will have access to natural weapons and multiple special abilities with a little more work. Yetis, I think, will get claw attacks.
After that it's on to writing some AI for foes to actually equip and use the items where possible. Each foe will get it's items from the configured loot table, and before combat get a chance to load out whatever slots it has available to best effect.
The indefatigable Rob A has done some invaluable testing and has filed a bunch of issues over in the tracked at SourceForge, which I will get onto after that.
What remains of the refactoring is to generalise a number of features of Foes that get in the way of letting them just use items - notably the FoeAttacks. These will get refactored out into Natural Weapons associated with body parts, special abilities, and the existing spellbooks. A nice side effect of this is that PlayerCharacters will have access to natural weapons and multiple special abilities with a little more work. Yetis, I think, will get claw attacks.
After that it's on to writing some AI for foes to actually equip and use the items where possible. Each foe will get it's items from the configured loot table, and before combat get a chance to load out whatever slots it has available to best effect.
The indefatigable Rob A has done some invaluable testing and has filed a bunch of issues over in the tracked at SourceForge, which I will get onto after that.
Subscribe to:
Posts (Atom)