øAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=159.0e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index37bc.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&board=8.380e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index37bc.html.zxÏ(h^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈЋ�BŠOKtext/htmlISO-8859-1gzip8:ÖBŠÿÿÿÿÿÿÿÿWed, 11 Mar 2020 00:11:20 GMT0ó°° ®0®P®€§²ð®Ï(h^>BŠ Battle order in FF1

Author Topic: Battle order in FF1  (Read 2612 times)

Entroper

  • FF4 Hacker
  • *
  • Posts: 235
  • Gender: Male
    • View Profile
Battle order in FF1
« on: December 18, 2007, 12:55:42 PM »
I'm looking into specifics of the FF1 battle engine.  Examining the monster data in FF Hackster, I think the "unknown" byte is the enemy's initative rating; that is, it determines how likely it is that that enemy will go first in battle.  What I don't know is what the actual formula is.  I assume that your character's AGI rating affects their initiative bonus, and possibly your level as well.  It should be something like:

Your initiative bonus = x*AGI + y*LV
At the start of a round of battle, everyone rolls a D20 (or D100, or Dsomething) and adds the value to their initiative bonus.  The round then proceeds with the highest totals acting first and the lowest acting last.

Anyone have any information on this?

Lenophis

  • Forum Overlord
  • *
  • Posts: 1,688
  • Gender: Male
  • I sad
    • View Profile
    • Slick Productions
Re: Battle order in FF1
« Reply #1 on: December 18, 2007, 01:19:56 PM »
The enemy initiative rate is in the Battle Editor. Most monsters have 4 as a value, WarMECH has 75 (:eek:), CatMAN has 40, etc etc. Basically, the monsters that usually always surprise you have an insane ambush rate. :tongue:

There's a couple of weird coincidences with this value in the monster editor though:

Any monster that does status ailments, has this value at 1 or 2. Everybody else is at 0. Some monsters that don't use ailments still have this value at non-zero (Red Gargoyle). Given how it's always 0, 1, or 2, it seems like it's bit-related. I guess more testing will need to be done.

119 bugs fixed and counting.

Entroper

  • FF4 Hacker
  • *
  • Posts: 235
  • Gender: Male
    • View Profile
Re: Battle order in FF1
« Reply #2 on: December 18, 2007, 01:56:55 PM »
That's the ambush rating though, and I think enemies have their own initiative ratings.  For example, you rarely get ambushed by EARTH, but EARTH almost always attacks first during battle rounds.

Actually, looking at FF Hackster again, I misspoke.  I meant the unknown byte in enbytes.txt, which FF Hackster seems to have labeled as magic defense.  What did I do with that other byte... *looks at code*

Oh, it seems to be the element associated with enemy attacks.  Only the "stun" and "poison" elements are used, though.  I think FF Hackster is a little confused as to how elements and status effects work (which is understandable given how confusing it is).

So back to the "magic defense" byte, is this a 0-255 chance that a spell will completely miss?  It doesn't seem to affect the damage done by a spell.

Pinkpuff

  • Flan Princess
  • *
  • Posts: 924
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Battle order in FF1
« Reply #3 on: December 19, 2007, 05:33:13 AM »
Damage spells don't miss in that game but at the same time they sort of do.

Every spell has a "success rate" as it were. When an "effect" spell like STOP or STUN "succeeds", it causes the status effect, and when it fails, it does nothing, the famous "ineffective". Damage spells deal [base ... base * 2] damage. When the spell fails, multiply the result by 1, when the spell succeeds, multiply it by 2.

So FIRE for example does "10 to 40" damage, but really, it does 10-20 when it fails and 20-40 (even numbers only) when it succeeds. The "magic defense" value for both players and monsters reduces the chance that a given spell targetting them will succeed. The "int" stat was supposed to contribute to the success rate of characters' spells but due to a bug it does nothing.

The turn order is completely random as far as I've been able to tell.
Let's dance!

Entroper

  • FF4 Hacker
  • *
  • Posts: 235
  • Gender: Male
    • View Profile
Re: Battle order in FF1
« Reply #4 on: December 19, 2007, 01:59:21 PM »
Very interesting.  The spell damage sounds logical.  I need to do more testing on the initiative thing, because I'm almost certain there are some monsters that just seem to go first every time you meet them.

Lenophis

  • Forum Overlord
  • *
  • Posts: 1,688
  • Gender: Male
  • I sad
    • View Profile
    • Slick Productions
Re: Battle order in FF1
« Reply #5 on: December 19, 2007, 02:06:09 PM »
Cerberus and the cats come to mind. *cough*

119 bugs fixed and counting.