Jump to content

Info Trigger Text Patching


erebusant

Recommended Posts

When patching a new info trigger into an area, what is the proper way to insert the info text in the 0x64 line? The only examples I've found use the number of a string reference, however the string reference I want to use doesn't exist in the game yet.

 

PATCH_IF (info_1=1) BEGIN //adding new info trigger *******************************

SET offset = ("%infotrig_offset%"+0xc4*"%infotrig_num%")

INSERT_BYTES offset 0xc4

WRITE_ASCII offset ~Tran0602~

WRITE_SHORT (offset+0x20) 1 //info trigger

WRITE_SHORT (offset+0x22) 2101 //bounding box

WRITE_SHORT (offset+0x24) 1661 //bounding box

WRITE_SHORT (offset+0x26) 2557 //bounding box

WRITE_SHORT (offset+0x28) 1917 //bounding box

WRITE_SHORT (offset+0x2a) 5 //vertices number

WRITE_LONG (offset+0x2c) "%vert_num%" //first vertex index

WRITE_LONG (offset+0x34) 34 //cursor frame number

WRITE_ASCII (offset+0x38) ~~ //destination area

WRITE_ASCII (offset+0x40) ~~ //entrance name

WRITE_LONG (offset+0x60) 0 //party required flag

WRITE_LONG (offset+0x64) ~~ //info text

WRITE_ASCII (offset+0x7c) ~None~ //script

SET "infotrig_num"="%infotrig_num%"+1

WRITE_SHORT 0x5a "%infotrig_num%"

END

Link to comment

New strings should always be inputted using SAY. SAY writes the long type value to the file and creates, if necessary, the appropriate reference in dialog.tlk.

 

SAY %myOffset% ~bla~

SAY %myOffset% @123

 

Never WRITE_ASCII for strings. Here, you physically write the string to your file. You don't want this... :)

Link to comment
New strings should always be inputted using SAY. SAY writes the long type value to the file and creates, if necessary, the appropriate reference in dialog.tlk.

 

SAY %myOffset% ~bla~

SAY %myOffset% @123

 

Never WRITE_ASCII for strings. Here, you physically write the string to your file. You don't want this... :)

Well I obviously have this one completely misinterpreted and fouled up with the following line:

 

WRITE_LONG (offset+0x60) 0 //party required flag

SAY (offset+0x64) @1 //info text

WRITE_ASCII (offset+0x7c) ~None~ //script

 

It writes without choking, but it doesn't write what my .tra file says,,, :)

Link to comment

New strings should always be inputted using SAY. SAY writes the long type value to the file and creates, if necessary, the appropriate reference in dialog.tlk.

 

SAY %myOffset% ~bla~

SAY %myOffset% @123

 

Never WRITE_ASCII for strings. Here, you physically write the string to your file. You don't want this... :)

Well I obviously have this one completely misinterpreted and fouled up with the following line:

 

WRITE_LONG (offset+0x60) 0 //party required flag

SAY (offset+0x64) @1 //info text

WRITE_ASCII (offset+0x7c) ~None~ //script

 

It writes without choking, but it doesn't write what my .tra file says,,, :)

It won't write what your .tra file says. What your .tra file says will be written into dialog.tlk, and a numerical reference to what your .tra file says will be written in the file. Does it look correct in NI?
Link to comment

New strings should always be inputted using SAY. SAY writes the long type value to the file and creates, if necessary, the appropriate reference in dialog.tlk.

 

SAY %myOffset% ~bla~

SAY %myOffset% @123

 

Never WRITE_ASCII for strings. Here, you physically write the string to your file. You don't want this... :)

Well I obviously have this one completely misinterpreted and fouled up with the following line:

 

WRITE_LONG (offset+0x60) 0 //party required flag

SAY (offset+0x64) @1 //info text

WRITE_ASCII (offset+0x7c) ~None~ //script

 

It writes without choking, but it doesn't write what my .tra file says,,, ;)

It won't write what your .tra file says. What your .tra file says will be written into dialog.tlk, and a numerical reference to what your .tra file says will be written in the file. Does it look correct in NI?

Why yes! As a matter of fact, once I finished doing stupid stuff like testing the .tp2 in one directory and viewing the patched file with an instance of NI in a different installation directory, it does say what I want it to say,,, :) Sorry for the confusion. The strref for the patched info point is also now the final strref in my dialog.tlk :)

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...