Users browsing this thread: 1 Guest(s)
Questions about Event Scripts

#1
Posts: 2
Threads: 1
Thanks Received: 0
Thanks Given: 0
Joined: Mar 2021
Reputation: 0
Status
None
According to ZoneDoctor's event script dump, some command bytes' functions are labeled differently than on the FF6 Wiki. My examples, from some script I've been parsing:

CAE381: {FA-02}               Pseudo-randomly choose to branch backwards 2 bytes ($CAE37F) with 50 % chance

CAE383: {FC-0D}               Branch backwards 13 bytes ($CAE376)

The FF6 Wiki states:

FA                      $C0B8C7     Stop temporarily played song
C0/9A52: 1A B9                    (act. FC: ** NOT USED **)

Wondering which are correct. My concern, outside of accuracy for the wiki, is that I'm parsing events for calls to other subroutines, so I can map given events connected to those directly called. So if these commands don't make these calls, I should ignore them... and I'd also wonder if the program is getting off track with subsequent calls.
  Find
Quote  

#2
Posts: 2,548
Threads: 98
Thanks Received: 147
Thanks Given: 156
Joined: Aug 2009
Reputation: 52
Status
Nattak\'d
Both are correct, they are indeed used for those purposes, it's just that the branching commands are meant to/need to be placed within an action queue, while the stop temporarily played song and unused act. $FC is meant to be a "general action" (first byte command), so the code would know to differentiate them. I'm fairly sure that's how it works anyway!


We are born, live, die and then do the same thing over again.
Quote  
[-] The following 1 user says Thank You to Gi Nattak for this post:
  • Rycona (04-28-2021)

#3
Posts: 2
Threads: 1
Thanks Received: 0
Thanks Given: 0
Joined: Mar 2021
Reputation: 0
Status
None
Oh, I see. I forgot about the list on the  Movement Codes page and didn't check the context on the commands. My bad, thanks for clearing that up. Shine
  Find
Quote  

#4
Posts: 377
Threads: 34
Thanks Received: 10
Thanks Given: 7
Joined: Dec 2018
Reputation: 18
Status
Moog
Yeah, within an action queue the commands take on different functions.

So you'll see something like
"Begin action queue for character $04 (8 bytes)"
and then there will be 8 bytes of commands that follow, which do different things than the same hex values when they're NOT in an action queue.

That's why all action queues have a form of parenthesis: they tell the game how long they are going to be in bytes and then they always end with an $FF to resume normal function.

If you're looking to branch outside of an action queue, you will need to check an always-unchanging event bit and do a jump. I use event bit $127 for this, but I know there are at least two more that do so.

EX:
Code:
CA0039: {C0-27-01-08-01-00}   If ($1E80($127) [$1EA4, bit 7] is clear), branch to $ CA0108
This is a typical 'always branch' in the event code.
  Find
Quote  
[-] The following 1 user says Thank You to C-Dude for this post:
  • Rycona (04-28-2021)



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite