Qhimm.com Forums

Miscellaneous Forums => Scripting and Reverse Engineering => Topic started by: G on 2007-04-26 06:47:06

Title: XYZI opcode
Post by: G on 2007-04-26 06:47:06
Can't understand how works code from STARTMAP

CHAR (00)
PC (00)
RET ()
XYZI (00,00,00,00,00,00,00,00,01,00)
RET ()

and code from first map MD1STIN

CHAR (08)
XYZI (00,00,70,0E,3D,70,36,01,09,00)
DIR (00,40)
IFSW (20,00,00,01,00,04,12)
DIR (00,28)
XYZI (00,00,50,0F,E8,71,37,01,03,00)
DFANM (06,01)
RET ()
JMPB (00)

In the first part of code with setting character it is playing recursively. But in the second part if we already watch start movie, character set in another place

2SynergyBlades: do you can experiment with this opcode to make things clearer.., when it works and when not?
Title: Re: XYZI opcode
Post by: halkun on 2007-04-26 07:19:30
I think XYZI is only ran once. (XYZ Initalize) If an entity has already been set with XYZI, and is ran again, it's ignored.
Title: Re: XYZI opcode
Post by: G on 2007-04-26 07:29:59
On the first map it's used entity replacement with XYZI in runtime. Without this it isn't working. There is a possibility that it's once only for player entity
Title: Re: XYZI opcode
Post by: Akari on 2007-04-26 13:05:24
Hmmm now I think that 1st script doesn't always run, but only once as any other script. Because many script has jump back in this opcode for loop it. This can explain why XYZI used in cloud startmap.
Title: Re: XYZI opcode
Post by: Synergy Blades on 2007-04-26 13:35:17
Yes, I'd always assumed the first script only ran once, as per other scripts, and that it has two "subscripts", an initialise entry (before the first RET) and a general one (second RET). There are some things that shouldn't be performed in the initialise script, such as WINDOW/MESSAGE as that tends to freeze the game.

halkun, XYZI is X/Y/Z/ID (triangle ID). It can be used many times without a problem, eg. yufy1 with the event where she's giving back the materia she stole.
Title: Re: XYZI opcode
Post by: Akari on 2007-04-26 16:37:31
Yes, I'd always assumed the first script only ran once, as per other scripts, and that it has two "subscripts", an initialise entry (before the first RET) and a general one (second RET). There are some things that shouldn't be performed in the initialise script, such as WINDOW/MESSAGE as that tends to freeze the game.

halkun, XYZI is X/Y/Z/ID (triangle ID). It can be used many times without a problem, eg. yufy1 with the event where she's giving back the materia she stole.

One more mystery solved.