Jump to content

BUG: Tutu-Tweaks-v16 "Icon Improvements"


Recommended Posts

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~





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

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

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

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. :O Thanks!

Link to comment


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

  • Create New...