FF6 Hacking
BTB's Enemy Scripting Tutorial - Printable Version

+- FF6 Hacking (https://www.ff6hacking.com/forums)
+-- Forum: Discussion Forums (https://www.ff6hacking.com/forums/forum-5.html)
+--- Forum: Magitek Research Facility (https://www.ff6hacking.com/forums/forum-9.html)
+--- Thread: BTB's Enemy Scripting Tutorial (/thread-3006.html)

Pages: 1 2


BTB's Enemy Scripting Tutorial - BTB - 11-18-2015

So, I've been cleaning up some of my internal documentation for BNW, and this enemy script map slowly turned into a tutorial on scripting. I figure since I've probably spent more time at this point than anyone working with them - and because it contains a lot of information I haven't seen elsewhere - that it's something the community might appreciate having.

http://btb2.free.fr/temp/ff6scripting.txt


RE: BTB's Enemy Scripting Tutorial - Everything - 11-19-2015

Excellent work! I love how concise and well-formatted this is. And you did a great job explaining the piranha death command too.

A few things:

For most of the FA commands, byte 3 is the monster(s) that will be affected by the animation, one bit for each monster.
FA 09: Byte 3 is the pan value for the sound effect.
FA 0D: This is the final Kefka death animation (where he crumbles into a million pieces). Normal boss death is F5 0C.
FB 08: Fill's the target's ATB gauge.
FB 09: Ends the battle after Gau returns from the veldt.
FC 06: The HP value is multiplied by 128.
FC 13: I haven't tested this, but I think if you test the number of characters alive, it tests >= instead of <= (see C2/1CFA).
Target 4D is the last target from the "Targetting" attack.


RE: BTB's Enemy Scripting Tutorial - BTB - 11-19-2015

(11-19-2015, 01:48 AM)Everything Wrote: For most of the FA commands, byte 3 is the monster(s) that will be affected by the animation, one bit for each monster.

Ah, that makes sense. I have the least experience working with animation, hence the generous amount of ?''s

(11-19-2015, 01:48 AM)Everything Wrote: FA 09: Byte 3 is the pan value for the sound effect.

"Pan" value?

(11-19-2015, 01:48 AM)Everything Wrote: FA 0D: This is the final Kefka death animation (where he crumbles into a million pieces). Normal boss death is F5 0C.

Derp. This one was my mistake; for some reason I checked his script and thought that his death animation was being caused by the F5 command. I totally missed the FA underneath it >.>

(11-19-2015, 01:48 AM)Everything Wrote: FB 08: Fill's the target's ATB gauge.

Oh, *that's* what it does? Like, can it be used to give something a turn right after another one? That would be useful because the current version of BNW has a bug where Hidon summons his Hidonites and tries to Shield them all on the same turn, but the Shield misses them because it can't target them yet.

I fixed this by having one of the Hidonites use it, instead, but it's still good to know.

(11-19-2015, 01:48 AM)Everything Wrote: FC 06: The HP value is multiplied by 128.

Oh, yeah. That's... probably a different table I'd need to make >.>

(11-19-2015, 01:48 AM)Everything Wrote: FC 13: I haven't tested this, but I think if you test the number of characters alive, it tests >= instead of <= (see C2/1CFA).

Could be. I never check for remaining characters, so I'm not sure, either.

(11-19-2015, 01:48 AM)Everything Wrote: Target 4D is the last target from the "Targetting" attack.

Would this include the default spell targeting that enemies use, or only the targeting done by F1/FC commands?

---

I'm also thinking I should probably put in a note about which variables are ok to use (0-3 & 36) and that 36 is a local variable while the others are global.


RE: BTB's Enemy Scripting Tutorial - Tenkarider - 11-19-2015

Quote:FB 08: Fill's the target's ATB gauge.
Thanks for existing, Everything: each time you post, i learn something new!


RE: BTB's Enemy Scripting Tutorial - madsiur - 11-19-2015

Nice tutorial. I'd like to host it on our server and put it in the doc thread with your permission.


RE: BTB's Enemy Scripting Tutorial - assassin - 11-19-2015

note that http://www.rpglegion.com/ff6/hack/commands.txt
has a thing or two not present in http://www.rpglegion.com/ff6/hack/command.htm

my understanding of FB 08 differs a _little_ from Everything, and FB 0D is more in line with what he/she posted a few months back:

http://mnrogar.slickproductions.org/phpBB3/viewtopic.php?p=6878&sid=2af9789d53c981200900c35d08084aa7#p6878

iow, does FB 0D nn really produce a different result than FB 0B 1D ? or would the latter act the same when the "Piranha" flag is present in the monster stats?


RE: BTB's Enemy Scripting Tutorial - BTB - 11-19-2015

(11-19-2015, 12:21 PM)Madsiur Wrote: Nice tutorial. I'd like to host it on our server and put it in the doc thread with your permission.

Fine by me. You may check back in this thread in about a week or so, since I'll update it with the information I've gotten in response.

(11-19-2015, 02:17 PM)assassin Wrote: iow, does FB 0D nn really produce a different result than FB 0B 1D ? or would the latter act the same when the "Piranha" flag is present in the monster stats?

I can't verify it since I'm not at the computer, but I don't think that FB 0B 1D would give the correct "death" animation. I'm actually not quite sure what, if any animation would be used.

In any case, I'm fairly certain that there's more to FB 0D than "force hide on self", since it would otherwise just be part of the FB group.


RE: BTB's Enemy Scripting Tutorial - assassin - 11-19-2015

ah, FB 0B does have code to use the Mimic (Null) animation.

i also forgot that FB 0B is a bit more complex in that it calls C2/317B, while FB 0D doesn't.


RE: BTB's Enemy Scripting Tutorial - Tenkarider - 11-20-2015

Accoding to this statement:
Quote:- for FB 0B and FB 0C, all 4 status bytes are usable, so there's no need to have "???" for 18h to 1Fh values.
- FB 0D is "Set Hide status on self".
- FB 08 isn't used by any monster, but can be summarized as "If desired target(s) found, make own ATB refill REALLY fast".
- for F5 nn 03, the monster(s)' HP is not refilled. the hiding differs from F5 nn 01 in that the monster isn't marked to be removed from the battlefield in this one.
- F5 nn 01 doesn't kill the monster(s), but hides it, and marks it to be removed from the battlefield.
- F5 nn 05 sets Hide and Death on the monster(s).
- for the various F5 00 nn nn commands, "suddenly" is misspelled with a "t" in there.
1) does FB 08 affects speed? also, is it a status or it happens only for that turn?

2) about F5... (with those info)
- F5 00 unhide at max HP;
- F5 01 hide and remove;
- F5 02 unhide at same HP;
- F5 03 hide but not remove;
- F5 04 ....?
- F5 05 hide and death.

Nice to know that, but then what does F5 04 that the others hide commands doesn't do already?


RE: BTB's Enemy Scripting Tutorial - assassin - 11-20-2015

1) no on Speed and status. it directly modifies the entity's "amount to increase ATB timer by" variable. that change should last until after its next turn (or counter), or until it has Haste or Slow granted or removed.

2) F5 nn 04 is like F5 nn 03, but also prohibits C2/47FB from checking for combat end.