Users browsing this thread: 1 Guest(s)
BTB's Enemy Scripting Tutorial

#1
Posts: 259
Threads: 3
Thanks Received: 5
Thanks Given: 1
Joined: Jun 2013
Reputation: 6
Status
None
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


"You don't have to be a vampire to die like one... b*t*h." -Simon Belmont
Quote  
[-] The following 3 users say Thank You to BTB for this post:
  • Everything (11-19-2015), Gi Nattak (11-18-2015), Lockirby2 (11-18-2015)

#2
Posts: 179
Threads: 3
Thanks Received: 24
Thanks Given: 4
Joined: Apr 2015
Reputation: 18
Status
None
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.
  Find
Quote  
[-] The following 2 users say Thank You to Everything for this post:
  • Gi Nattak (04-11-2019), Tenkarider (11-19-2015)

#3
Posts: 259
Threads: 3
Thanks Received: 5
Thanks Given: 1
Joined: Jun 2013
Reputation: 6
Status
None
(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.


"You don't have to be a vampire to die like one... b*t*h." -Simon Belmont
Quote  

#4
Posts: 1,633
Threads: 56
Thanks Received: 13
Thanks Given: 84
Joined: Apr 2014
Reputation: 12
Status
Atma
Quote:FB 08: Fill's the target's ATB gauge.
Thanks for existing, Everything: each time you post, i learn something new!


THE GREATEST CHALLENGE OF ALL TIMES AWAITS:
http://www.ff6hacking.com/forums/showthr...p?tid=2593
DO YOU HAVE WHAT IT TAKES TO SLAY A GOD?
------------------------------------------------------------------------
Tenkarider's project #2 is started: FF6 Curse of the Madsiur Joke (CotMJ)
http://www.ff6hacking.com/forums/showthr...p?tid=2755
What happens when Madsiur tweaks your account? This full game hack will show that!
  Find
Quote  

#5
Posts: 3,969
Threads: 279
Thanks Received: 236
Thanks Given: 57
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
Nice tutorial. I'd like to host it on our server and put it in the doc thread with your permission.
  Find
Quote  

#6
Posts: 200
Threads: 1
Thanks Received: 10
Thanks Given: 0
Joined: Oct 2015
Reputation: 18
Status
None
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/phpB...4aa7#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?
Quote  

#7
Posts: 259
Threads: 3
Thanks Received: 5
Thanks Given: 1
Joined: Jun 2013
Reputation: 6
Status
None
(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.


"You don't have to be a vampire to die like one... b*t*h." -Simon Belmont
Quote  

#8
Posts: 200
Threads: 1
Thanks Received: 10
Thanks Given: 0
Joined: Oct 2015
Reputation: 18
Status
None
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.
Quote  

#9
Posts: 1,633
Threads: 56
Thanks Received: 13
Thanks Given: 84
Joined: Apr 2014
Reputation: 12
Status
Atma
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?


THE GREATEST CHALLENGE OF ALL TIMES AWAITS:
http://www.ff6hacking.com/forums/showthr...p?tid=2593
DO YOU HAVE WHAT IT TAKES TO SLAY A GOD?
------------------------------------------------------------------------
Tenkarider's project #2 is started: FF6 Curse of the Madsiur Joke (CotMJ)
http://www.ff6hacking.com/forums/showthr...p?tid=2755
What happens when Madsiur tweaks your account? This full game hack will show that!
  Find
Quote  

#10
Posts: 200
Threads: 1
Thanks Received: 10
Thanks Given: 0
Joined: Oct 2015
Reputation: 18
Status
None
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.
Quote  
[-] The following 1 user says Thank You to assassin for this post:
  • Tenkarider (11-20-2015)



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite