Macready Posted December 21, 2005 Share Posted December 21, 2005 Hello - The problem is described at PPG. Clicky EDIT: Affected files: _CHAN01.ITM _CHAN02.ITM _CHAN03.ITM _CHAN06.ITM _CHAN07.ITM _ICHAN01.ITM _LEAT01.ITM _LEAT02.ITM _LEAT03.ITM _LEAT09.ITM CHAN03.ITM CHAN06.ITM CHAN07.ITM LEAT03.ITM Link to comment
Macready Posted December 21, 2005 Author Share Posted December 21, 2005 Hello - I took a look at the TP2 script, and I think I see the problem (although I am not very familiar with WeiDU, be aware of that). Here's a sample: // chain mail COPY_EXISTING ~_CHAN01.ITM~ ~override~ ~_CHAN02.ITM~ ~override~ ~_CHAN03.ITM~ ~override~ ~_CHAN06.ITM~ ~override~ ~_CHAN07.ITM~ ~override~ ~_ICHAN01.ITM~ ~override~ ~_juschan.itm~ ~override~ ~CHAN01.ITM~ ~override~ ~CHAN02.ITM~ ~override~ ~CHAN03.ITM~ ~override~ ~CHAN06.ITM~ ~override~ ~CHAN07.ITM~ ~override~ ~CHAN08.ITM~ ~override~ ~CHAN09.ITM~ ~override~ ~CHAN10.ITM~ ~override~ ~CHAN11.ITM~ ~override~ ~CHAN21.ITM~ ~override~ ~ICHAN01.ITM~ ~override~ ~juschan.itm~ ~override~ ~NPCHAN.ITM~ ~override~ ~SHARARM.ITM~ ~override~ ~TAMCHAIN.ITM~ ~override~ ~VISCHAN1.ITM~ ~override~ PATCH_IF (SOURCE_SIZE > 0x71) THEN BEGIN // protects against invalid files READ_ASCII 0x44 "icon" PATCH_IF (("%icon%" STRING_COMPARE_CASE "gchan01" = 0) OR ("%icon%" STRING_COMPARE_CASE "_gchan01" = 0)) BEGIN WRITE_ASCII 0x44 ~cdgchan~ END END BUT_ONLY_IF_IT_CHANGES If you look at the actual patching lines ... PATCH_IF (("%icon%" STRING_COMPARE_CASE "gchan01" = 0) OR ("%icon%" STRING_COMPARE_CASE "_gchan01" = 0)) BEGIN WRITE_ASCII 0x44 ~cdgchan~ ... if the second condition "_gchan01" exists, you are writing a 7 character string in order to replace an 8 character string, which leaves the original final character ('1') untouched. This matches the problem as it looked in NearInfinity -- the invalid ground icons for chain were listed as "CDGCHAN1" instead of "CDGCHAN". Link to comment
Macready Posted December 21, 2005 Author Share Posted December 21, 2005 Hello - Now that I know what is causing this problem, I think it can most easily be fixed by simply adding copies of the icon resources to the override directory using the mispatched filenames. So copy CDGCHAN.BAM -> CDGCHAN1.BAM and CDGLEAT.BAM -> CDGLEAT1.BAM and the problem is solved. I posted a zip file in the linked PPG thread which, if extracted to the override directory, will do just that. Link to comment
Idobek Posted December 21, 2005 Share Posted December 21, 2005 Change the line to: WRITE_ASCII 0x44 ~cdgchan~ #8 Link to comment
NiGHTMARE Posted December 22, 2005 Share Posted December 22, 2005 Hmm, I wasn't aware of the #8 thing. I think there are probably more than a few places in my code which need it . Link to comment
CamDawg Posted December 22, 2005 Share Posted December 22, 2005 Adding a #x paramter will force WeiDU to write x number of characters, even if your string is less than x. I.e. WRITE_ASCII 0x00 ~foo~ #8 would write foo followed by five null characters. Without it, W_A would only write 3 and leave the next five characters at their previous values. Link to comment
Andyr Posted December 22, 2005 Share Posted December 22, 2005 That is very useful to know, actually--many a time I've wondered why something's failed to execute, only to find the cause is the thing I C_E'd over in my tp2 had a longer field entry than my new script/death variable/whatever. Thanks! Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.