Wednesday, October 5, 2011

Indiana Bartz

There's something that I neglected to mention in the last post that turned out to be important. I had briefly considered just switching classes to something that can use better armor and moving everyone to the back row. This would cut damage taken way down, but it would also reduce our damage output to a trickle, with several counter attacks on the party for every drip. I had simply discarded the strategy.


I had failed to consider the whip, which the previous boss so conveniently drops at a 100% drop rate. Not only does it have the best attack out of any available weapon up to that point, but it also does full damage from the back row, and it has a good chance to paralyze on hit.

So Bartz is a back-row Freelancer for this fight, and now Galura is a pushover. If I get a paralyze in on Bartz's first hit, then everyone stays alive, and sometimes Galura never gets to attack. If not, then everyone dies except Bartz and we still win. Galura is hitting him for 0-4 damage a shot. It's still technically possible to lose if Galura gets 3 or so Rushes to connect on Bartz and drains his HP out, but it seems like a vanishingly small chance.

Looks like we get our date with Liquid Flame before implementing the Job system after all. I've mapped and pathed to Karnak.

Tuesday, October 4, 2011

Elephants Are Scary

Mapped and pathed to the Galura fight.


Galura beats the tar out of us right now. Granted, we're running a group of half-naked level 6 unskilled brain-dead Monks, but it's still a pretty sad fight.

I wanted to see whether something better than starting equipment would tip the scales, so I worked out the code for shop interactions and bought four Training Gis. We can now buy and sell with impunity, but unfortunately it's fairly game specific code for both FF4 and FF5, and I haven't come up with a nice way to generalize it. Some of it could be moved off into configuration, but there's a point at which that stops making sense. For example, in FF4 you choose the quantity of items you want to buy/sell before you choose the item. In FF5, you choose the item first and then the quantity. There's a half-dozen other little differences surrounding this. This sort of procedural difference doesn't convert very nicely into configuration. I will probably end up building a framework for attaching game-specific code to games on startup so the code is cleaned up a bit.

Anyway, the better armor did help - dropped Galura's hits from 130s to 90s - but it's not enough. He just goes nuts in the second half of the fight every time you hit him, and that's all we're ever doing. Even if I wanted to try the Phoenix Down binge strategy, at 1000 GP a pop Phoenix Downs are prohibitively expensive. I could only buy 3 of them now without level grinding. I could also just level grind a bunch until we can stomp him, but it's not worth it; this is a sufficiently compelling problem to solve more intelligently.

Looks like it's time to start implementing Job and Ability support. Galura exclusively uses physical attacks, so it would be a great place to test a Knight Cover/Guard strategy. We'll see if we need it; to start with, I'll probably give everybody Mantra and have them use that when they're low on HP.

It's going to take a while to get this stuff up and running. From a top-level perspective, I want to have the following:
  • A SetJob:[CharacterName]:[JobName]:[ExtraAbilityName]:[etc] command. Examples: "SetJob:Bartz:Knight:Counter" or "SetJob:Lenna:Freelancer:X-Fight:MagicSword".
  • A SetAbility:[CharacterName]:[AbilityName] command.
  • An UntilCharacterReachesJobLevel:[Number] level grind exit condition. Might choose to add UntilCharacterMastersJob later on.
  • An UntilCharacterLearnsAbility:[AbilityName] level grind exit condition.
In addition to all the other internals the borg needs to support this, I also need to be able to read what a character's current battle commands are; a static config file isn't going to cut it anymore. I might as well see if I can sort that out for FF4 while I'm at it.

Later on I may need to add some more sophisticated code to automatically manage job and ability switching. At the very least, I want to avoid situations where three of the characters are spinning their wheels in a level grind while we wait for one to learn a specific skill.

Problems Worth and Not Worth Solving

I've added the ability to mark a cutscene as a repeatable transition, and I've tought the borg to avoid these when pathing within a map, as well as to use them when navigating to a destination map. Marking a cutscene as such still happens manually, and will probably stay that way.



There's a lot of little fiddly things in this game that don't show up often enough to justify writing code to handle them. For example, there's a few places in the Ship Graveyard where you can hop from stone to stone to reach a destination. This just about the only place in the game where they use this mechanic, so I just included a few manual movement commands to get through those parts. Climbing the vines in the Worus Tower counts as a cutscene, but it only triggers if you walk into the square from the proper direction, *or* if you walk in from the side and then bump the right direction. This happens in more places, but it'll be a big pain to teach the borg that distinction, so I'm leaving that as well. If it happens to walk into a cutscene from the wrong direction, I'll tell it to walk next to the cutscene and add a manual movement command to approach properly.

Other stuff I'm willing to support with new code. FF5 has squares that quickly push you in a specific direction (such as the waterfalls in Worus and, I suspect, sand in the Quicksand Desert). These aren't cutscenes or transitions; they just happen. I haven't implemented any notion of what direction they push you, but I am giving these squares their own thumbnail in the atlas and treating them as obstacles until I find a place where I need to use them. Then we'll decide if anything more involved needs to be written.

There's also an odd quirk with NPCs when entering areas that show a title; NPCs don't seem to get marked as stationary until after that title window gets closed, so if the cartographer walks into a mostly explored map and the only unvisited squares are under stationary NPCs, it'll choose a path to that square, assuming at the time that the NPC could be pushed out of the way. I'll probably teach the Cartographer and Navigator to press A or B to close the title window before choosing their next path.
 

Monday, October 3, 2011

Horrifying Void, North Mountain Branch

Mapped and pathed through the North Mountain.


The borg found the bit of map that has improper pathing layers. The cartographer wandered around out there in the aether until it died for a few runs, and then I decided to manually modify the atlas to seal the evil away. I retained what it was able to map for posterity; maybe if I'm feeling particularly neurotic I'll crack open the seal again and send it out to explore the unknown.


The Magisa / Forza fight is pretty easy; most of the time the borg wins with everyone still standing. However, it is possible for them to get very, very lucky and get one-hit kills in on party members, and if they get 2 or 3 in then the fight is much closer. It looks like the odds are about 1 in 10 that we'll lose just mashing A; I'm okay with that for now. I want to get past the trivial boss fights and get to something that requires a more intelligent strategy.

Monks really are a great early game class. They're big sacks of hit points, they have by far the best physical attacks at this point in the game, and their greatest weakness - poor equipment choices - is almost meaningless so early on.

Hiryuu is convinced it can use transitions, and this leads to some interesting cartography problems. Not only will it try to go through the Torna Canal entrance to try to finish mapping that area out, but it'll also refuse to approach the Castle Tycoon area of the map because there's a transition to the Tycoon Meteor Site in the way. Looks like I need to be able to mark each vehicle as passing or using transitions.

Sunday, October 2, 2011

Doors

Push-open doors are becoming more of a problem than I had anticipated. The borg's movement state doesn't seem to recognize that a move command into a door didn't actually move the player, so we're getting off of our movement path by one square and getting stuck in a lot of places. We already have a check for whether FF5's internal movement flag is set after a movement command, but apparently that's not enough in this case.

My inclination is to add a check for each step to verify that we're on the square we expected to end up on, and to retry the movement if not, retaining the current limit of 200 consecutive failures before panicking. I'm worried that this is going to be a problem with transitions and cutscenes, though. We'll see what happens.

We're pathed and mapped partway through the Ship Graveyard. Karboros wasn't a problem with four monks, as expected.

Edit: Ended up changing how the pre-move cooldown works in the movement state, and our door problems are gone. Pathed through the Siren fight. Sometimes she doesn't even have time to switch form before the fight is over.