Final Fantasy Hacktics

Modding => Hacking/Patching Tools => Topic started by: Zozma on January 21, 2009, 02:47:24 am

Title: Unknown Event Instructions
Post by: Zozma on January 21, 2009, 02:47:24 am
I'm not quite sure where to post this but since ive played around with event compiler im just going to mention what some unlabled event instructions do.
(correct me if im wrong)


{7A}(rXX00) XX = unit job id
Removes unit with matching ID from party weather its a normal unit or a guest. [used whenever guests leave the group]
-----

{92}(rXX00000C00)
I cant quite reacall, this might make said unit get up into the critical position if they were dead. (i might have this one wrong)
-----

{94}(rXX00) unit XX teleports away ??
-----

{53}(rXX000101000004) all living units face unit XX ??
Title:
Post by: Cheetah on January 21, 2009, 03:21:01 am
{53} is actually Face Unit
 
Example:
{53}(r17003400000100)

First byte (17) = Unit ID of the unit that is "looked at"
Second byte (00) = always 00 as far as i can tell
Third byte (34) = Unit ID of the character that does the turning/looking
Fourth byte (00) = In this example it does nothing, but if it is set to 01 it will cause all units to take this action (I believe)
5th & 6th (0000) = always 0000 I believe
Seventh Byte (01) = I believe this is the speed at which a unit turns, 01 being fast and 09 be very slow (I'm unsure of all the valid values for this.
8th Byte (00) = usually 00, sometimes 14, others 8, unkown
Title:
Post by: Cheetah on January 21, 2009, 03:27:22 am
{2D} Rotate Unit

Example
{2D}(r010014000100)

First Byte (01) = Unit ID, if 00 rotation is applied to all units (I believe)
Second Byte (00) = always 00
Third Byte (14) = Degree of rotation, values unknown, dependent on initial facing position (I believe)
Fourth Byte (00) = Always 00 I believe
Fifth Byte (01) = Speed of rotation, low fast, high slow
Sixth Byte (00) = Always 00 I believe
Title:
Post by: Cheetah on January 21, 2009, 03:28:56 am
Other Notes:

{16}()
Pauses the action and nothing continues till the "action" button is pressed by the player


{94}TeleportAway?(r3C00)

Unit ID


{98}TeleportIn(r2D00)
Materialize(x2D,x00)



{5F}MoveUnit (x01,x00,+003,+006,x01,x00)

UnitID

Unknown
   usually x00
XCordinate

YCordinate

ChangePanel
   x00 = lower level
   x01 = higher panel
Unknown
   Either x00, x01, x02, or x03

{51}CloseDialog(r010F000000)

DialogID:
   01 for the first opened dialog, 02 for the second ect
Text Command
   If "FFFF" the open dialog box simply closes
   Otherwise it is the number of the dialog you want displayed followed by 00
Remainder
   Unknown: Almost always "0000"

Instruction is always followed by:
WaitForInstruction(r0100)

{92}(r0300000C00)

Appears to be similar to UnitAnim.

Disappear
{99}(r8300)

Unit fades out.


Hide
{46}(r0800)

Makes unit cleared from field, but not removed

Load
{45}(r840001)

Loads character onto the screen, may require 01Start() and 01End()
Title:
Post by: Zozma on January 21, 2009, 04:17:14 am
nice info cheetah! thanks for adding to this
Title:
Post by: Xifanie on January 22, 2009, 05:13:12 pm
If you want to format it for the site I could easily add those.

Just add the instruction name somewhere.

if ($ins=='10') {
$description="This instruction is used to display any text stored after the event's instruction in various ways like a character thinking, speaking, or simply printing text on the screen.";
$para[]='Unknown 1';
$type[]='Byte (hex)';
$info[]="This always seems to be x10. Probably just a programmation error. Any value shouldn't matter.";
$para[]='Dialog Type';
$type[]='Byte (hex)';
$info[]="x01 : Top of screen (over unit with Dialog Box)<br>x02 : Bottom of screen (under unit with Dialog Box)<br>x04 : Thinking (Dialog Box)<br>x08 : Remove Arrow (for Dialog Box)<br>x10 : Dialog Box<br>x20 : Named box (\"Check\" if x10 = FALSE; \"Help\" if TRUE)<br>x40 : Independant Message Box (becomes a page if x10 = TRUE, if x20 = TRUE too, it becomes a regular Dialog Box forced under unit)<br>x80 : Close with instruction<br><br>By dafault the game will print overlaying text on the screen unless x10-x20-x40 are set.<br>Always set x01 or x02 when using Dialog Box alone, else the game might ignore other parameters.<br>Combining x01 & x02 displays the message at the center of the screen, except for Dialog Box (the box is over the unit's head and the arrow is flipped horizontally).";
$para[]='Message ID';
$type[]='Word (hex)';
$info[]="ID of the Message that will be displayed. Message x01 starts at the text offset of the event. Therefore there is no Message x00. This parameter being a word, you could even go take lines that are stored in the RAM, which is pretty pointless IMHO.";
$para[]='Unit ID';
$type[]='Byte (hex)';
$info[]="ID of the unit specified in the ENTD. This is only required for Dialog Box.<br>If a unit with the same Unit ID is found, the dialog box will be centered over or under it and the unit's portrait will be displayed.<br>Else, it will display a blank portrait (which still takes up the place of a normal portrait) and display on the left side of the screen.";
$para[]='Unknown 2';
$type[]='Byte (hex)';
$info[]="Seems to always be x00.";
$para[]='Portrait';
$type[]='Byte (hex)';
$info[]="x01 : ??? (Combined with x08, it removed the portrait completely from the Dialog Box)<br>x04 : Blank Portrait?<br>x08 : Blank Portrait?";
$para[]='X Coordinate';
$type[]='Word (signed)';
$info[]="Move the Displayed Message on the screen's X axis based on default location.<br>Determines the portrait's facing.";
$para[]='Y Coordinate';
$type[]='Word (signed)';
$info[]="Move the Displayed Message on the screen's Y axis based on default location.";
$para[]='Arrow Position';
$type[]='Word (signed)';
$info[]="Move the Arrow on the Dialog Box's X axis based on its default location.<br>Determines the portrait's facing.<br>If you don't move the Dialog Box in X, you can simply set this byte to -1 and the portrait will switch side.";
$para[]='Dialog Box Opening Type';
$type[]='Byte (hex)';
$info[]="x01 : +50% speed<br>x02 : -50% speed, remove bouncing<br>x10 : Toggle Arrow (points left if FALSE; point right if TRUE)<br><br>*bounce: the message box grows in size gradually and goes a bit over it's real size (about 110%) in the process then shrinks back to 100%.";
}
Title:
Post by: Cheetah on January 22, 2009, 11:32:32 pm
I will try.
Title:
Post by: Xifanie on January 24, 2009, 04:31:41 pm
I'm currently working on formatting, yet as I have to fully complete notes (I don't want any missing information), I have to make a lot of testing. I also have a few notes myself and hope I will find them. ;o
Title:
Post by: Cheetah on January 24, 2009, 06:39:46 pm
Can this topic get moved to the hacking section?
Title: Re: Unknown Event Instructions
Post by: Cheetah on September 07, 2011, 06:39:47 pm
Work begins anew.

{45}Present(xID,x00,xDR)

ID= Unit ID

DR = Draw
0x00 = Draw immediately

This instruction has caused me much heart ache over the years. It is very confusing because it actually depends on character settings in the ENDT for the specific character. Generally for a character to appear in a battle or event they need to be set to "Always Present" unless you wanted to do something clever with "Randomly Present". However this instruction overrides that setting and makes it so characters with neither of those settings checked to appear in an event. As far as I can tell this is most often used when a character appears later in an event. Note that many event instructions can be applied to a unit even if they aren't currently "present". The instruction is often used with DR = 01 so that a character can have a controlled entrance into an event. If anyone has a better recommendation for the instruction title please speak up.

0x01 = Do not draw and wait for later draw instruction

Example:
{45}(r020001)
Ramza who was not set as either "Appears Present" or "Randomly Present" is loaded, but is not immediately drawn.
Title: Re: Unknown Event Instructions
Post by: RavenOfRazgriz on September 07, 2011, 07:26:54 pm
Can someone investigate {4A}AddUnitStart, {4B}AddUnitEnd for the sake of figuring out what they do and {65}WaitFaceUnit, {7A}DismissUnit for figuring out what their arguments are?

In the former case, there's nothing listed on what they do on the front page, and in the latter two, their arguments listed on the front page don't match the length set in CONFIG.INI.  I think in the case of the latter, the front page is just wrong and it accepts a Half-Word (Hex) and not a Byte (Hex), but the former is only length 1 in CONFIG.INI, yet the front page would require a length of 3 to work.  

Also, on the front page, ChangeStats is mislabeled as requiring a Word (signed) when it requires a Half-Word (signed), which is kind of a huge difference.

Also, as for that instruction's name, I'd say we should go with {45}UnitPresent() just to make it a bit clearer as to what it is.

EDIT:  {8A}EffectStart and {8B}EffectEnd too.  Mostly because their front page has no listing.  I can pretty much guess what they're for between the obvious names and the few times I've seen them used but something conclusive would be far better.
Title: Re: Unknown Event Instructions
Post by: Cheetah on September 08, 2011, 12:27:06 pm
@Raven: Many of the commands you are asking about are listed in this thread I believe.

{6F}(xID,x00)

ID = Unit ID

This command is always used in relation to SpriteMove, though SpriteMove is not always associated with this command. I do not yet know exactly what it does.


{64}(xID,x00)

ID = Unit ID

This command is always used in relation to FaceUnit or RotateUnit, though FaceUnit and RotateUnit are not always associated with these command. I do not yet know exactly what it does. Most likely it functions as somekind of wait command to not do the next instruction till the identified unit finishes turning.
Title: Re: Unknown Event Instructions
Post by: RavenOfRazgriz on September 08, 2011, 12:35:52 pm
Quote from: Cheetah on September 08, 2011, 12:27:06 pm
@Raven: Many of the commands you are asking about are listed in this thread I believe.


Then you're gonna be a lot more redfaced than I am in a moment.

Quote from: Cheetah on September 08, 2011, 12:27:06 pm{6F}(xID,x00)

ID = Unit ID

This command is always used in relation to SpriteMove, though SpriteMove is not always associated with this command. I do not yet know exactly what it does.


That's 6F WaitSpriteMove(xID,x00), waits for the SpriteMove() command to resolve before proceeding past it in the event.  You can find that both on the main page and in my Event Editor fully documented.  On the main page, 65 WaitFaceUnit is shown as taking arguments but doesn't when I open CONFIG.INI up, so either someone fucked up putting it on the main page or documented it into the wrong ID, hence why I asked about it. 
Title: Re: Unknown Event Instructions
Post by: Cheetah on September 08, 2011, 12:44:42 pm
Ack we haven't updated CONFIG.INI with all those new commands yet! So yes I feel like an idiot for bothering with this. I confirmed what we already knew though :). The main page seem to match what I found.

Update to {45}UnitPresent

Instruction must be surrounded by {49} & {4A} if in a block, or followed directly by {48} in order to work. For example:

{49}()
{45}(r800001)
{45}(r140001)
{4A}()

or

{45}(r800001)
{48}()
Title: Re: Unknown Event Instructions
Post by: Cheetah on September 08, 2011, 02:45:14 pm
Currently the Event Instructions page has {4A} as AddUnitStart and {4B} as AddUnitEnd. I believe that these are incorrect, plus there is no info on those pages about these instructions anyways. Though {4B} has a similar role, it isn't exactly this. I would recommend removing the labels for now until we can get more information on all these commands. {4E} and {4D} also appear to have a similar function.