Lately, I've been playing a bit of Mabinogi, and I've noticed something fairly remarkable about this game. Where I often will complain that I want a game to have depth because I'm tired of shallow experiences that do not satisfy, Mabinogi manages to be both shallow and satisfying.
How does it do this? It has a very challenging balance. Combat is easily the most complicated activity, and it is essentially just a timing-based Rock Paper Scissors where you usually have the following moves.
- Normal Attack - Stuns target (not long enough to prepare something). Target is knocked back on completion of attack chain. If the target was knocked back last and is coming at you with a normal attack, they will usually either overpower your attack or cause a stalemate where both combatants endure one attack.
- Defend - While defending being hit by a normal attack nullifies most of the damage and stuns the attacker. While active cannot attack and moves at half speed.
- Smash - Overcomes defend, is interrupted and made vulnerable if attacked by normal attack.
- Counterattack - Once you have prepared counterattack, anyone who performs a Smash or Normal Attack on you will be damaged and knocked back. While active, cannot move or attack, stamina will drain.
- Windmill - You can launch an attack that attacks and knocks back all adjacent targets, ignoring defense or counterattack. Eats a little health on use, gives short duration invulnerability. Cannot move while windmill is prepared.
- Offensive spells and ranged weapon attacks - A spell/ranged attack ignores any prepared defense/counterattack. Costs mana or ammo to use. Preparing a spell/ranged attack somewhat telegraph your vulnerability to attack.
It's really not all that complicated. We're only looking at 6 types of moves here, where your average MMORPG might have 30 skills per class designed to fill up 3 ten-slot hotbars. And yet, the tactical sophistication of Mabinogi's system is several times more difficult to master!
The primary reason for this is because it's so unpredictable. There's no single best way to approach all combat situations because different types of NPCs have different behavioral patterns and different moves available. You need to monitor your foe constantly, as even relatively humble foes are well capable of planting you if they do something you didn't expect. A "Sharp Mind" skill check will reveal which move they've prepared but, failing that, you can get a clue based off of how they are moving.
Considerations such as timing and the field also enter the picture. Can I prepare defend before the opponent reaches me? Wait - that's a smash attack - cancel defend and try to hit him with a normal attack! If I knock the foe back here, he'll hit a wall and be back on top me too quickly for me to defend!
That this combat requires a sharp and active mind to succeed, and with only 6 types of moves, indicates that balance can be a whole lot more important than depth.
Delegate
However, lets say that there are certain tasks you don't want to do because they're monotonous? For example, you have a room of rats or minor spiders to clear out. Perhaps you just don't want to have to run around collecting all the treasure after battle.
For this, Mabinogi offers pets. They're interesting because you can actually program their AI. They are programmed via an interface that allows you to define a number rules and responses. It's vaguely like Final Fantasy XII Gambits/Dragon Age Tactics.
This generates some code which can also be hand-modified and pasted back into the game if you find that less awkward than using the interface. An incomplete example (just one rule) looks like this:
<rules>
<rule name="Master Preps (Ice for MAGIC)">
<conditions/>
<pattern>
<param_decl/>
<sequence>
<cmd name="prepare_skill" pet_skill="firebolt" try_cnt="5" timeout="0"/>
</sequence>
</pattern>
<event name="master_skill_prepare" event_skill="icebolt"/>
</rule>
</rules>
I'm not real good at Mabinogi programming yet, mostly because apparently there's a default script behavior that overrides any holes in my script. My pet which I told to only defend will suddenly bust out a smash attack I never added and get creamed by a normal attack.
However, I did at least create a script that causes my pet to attack any enemies that notice my hero -- this is useful when wandering the graveyard harvesting cobwebs because spiders which notice me stop dropping cobwebs.
For an ultimate example of RPG delegation, look no further than Dwarf Fortress. All you do is say what needs to be done and which dwarves do which jobs, and away they go. It's actually not too hard to do once you've got a good path algorithm (which I like to think I do). Just have a means for the right NPCs to find the job, and if they know how to get there then they can do it.
I expect Dwarf Fortress could be improved here and there. Why not set up my heroes in the same way, with a set of rules (e.g. drink potion when health is under 30%) that they keep in mind while simply trying to perform the tasks I've laid out to perform? Not quite in the same way as Majesty, which limits your interaction to putting bounties on things to be done in hopes it will attract aspiring heroes. Instead with more of a tactical combat mindset where you lay a number of waypoints for them to secure, recommend effective cover, ect.
Conclusion
I would very much like to create a virtual-world style game - that's more or less been my goal since the beginning. Along these lines, I am now thinking I should strive to follow somewhat in Mabinogi's footsteps by endeavoring to do two things:
- Provide this kind of meaningful, challenging gameplay that isn't so much deep as it is thought provoking.
- Provide a means for players to delegate to NPCs the stuff that they find boring.
I think fuzzy logic and personality gets underused in AI because not enough good solid examples are out there for how to use it. Instead programmers still stick with simpler forms of state machines. I'm guilty of the same thing in SotS II, although I have plans for more personality down the road. I think my NPCs need to coordinate which jobs need doing vs. which they'd rather do, rather than pick at random from a few options. It'd be even better if they could communicate meaningfully with players, even accept instructions or take a player's word for it that they're on a particular task or need help with something, but that's a job for complex parsing.