Jump to content


Photo

Bug Report v155 (and v154)


  • Please log in to reply
6 replies to this topic

#1 CamDawg

CamDawg

    ALL GLORY TO THE HYPNOTOAD

  • Modder
  • 1505 posts

Posted 06 May 2004 - 08:49 PM

Hey all,

I'm currently working on a spawn point fix for Tutu. As part of it, I'm patching area files and removing the spawn point info (instead I'm simulating them via scripts) and found a bug with BUT_ONLY_IF_IT_CHANGES in v155. I also rolled back a version and confirmed this bug also exists in v154.

The following code will not patch the area file:

COPY_EXISTING ~FW2700.are~ ~override/FW2700.are~
  READ_LONG 0x60 "spawnpt_offset"
  READ_LONG 0x64 "spawnpt_num"
  READ_LONG 0x68 "entrances_offset"
  READ_LONG 0x70 "container_offset"
  READ_LONG 0x78 "item_offset"
  READ_LONG 0x7C "vertices_offset"
  READ_LONG 0x84 "ambients_offset"
  READ_LONG 0x88 "variables_offset"
  READ_LONG 0xA0 "explored_offset"
  READ_LONG 0xA8 "doors_offset"
  READ_LONG 0xB0 "animations_offset"
  READ_LONG 0xB8 "tiled_offset"
  READ_LONG 0xBC "songs_offset"
  READ_LONG 0xC0 "restspawn_offset"
  READ_LONG 0xC4 "mapnote_offset"
  DELETE_BYTES ("%spawnpt_offset%") ("%spawnpt_num%" * 0xC8)
  WRITE_LONG 0x64 0
  WRITE_LONG 0x68 ("%entrances_offset%" - ("%spawnpt_num%" * 0xC8))
  WRITE_LONG 0x70 ("%container_offset%" - ("%spawnpt_num%" * 0xC8))
  WRITE_LONG 0x78 ("%item_offset%" - ("%spawnpt_num%" * 0xC8))
  WRITE_LONG 0x7C ("%vertices_offset%" - ("%spawnpt_num%" * 0xC8))
  WRITE_LONG 0x84 ("%ambients_offset%" - ("%spawnpt_num%" * 0xC8))
  WRITE_LONG 0x88 ("%variables_offset%" - ("%spawnpt_num%" * 0xC8))
  WRITE_LONG 0xA0 ("%explored_offset%" - ("%spawnpt_num%" * 0xC8))
  WRITE_LONG 0xA8 ("%doors_offset%" - ("%spawnpt_num%" * 0xC8))
  WRITE_LONG 0xB0 ("%animations_offset%" - ("%spawnpt_num%" * 0xC8))
  WRITE_LONG 0xB8 ("%tiled_offset%" - ("%spawnpt_num%" * 0xC8))
  WRITE_LONG 0xBC ("%songs_offset%" - ("%spawnpt_num%" * 0xC8))
  WRITE_LONG 0xC0 ("%restspawn_offset%" - ("%spawnpt_num%" * 0xC8))
  WRITE_LONG 0xC4 ("%mapnote_offset%" - ("%spawnpt_num%" * 0xC8))
  BUT_ONLY_IF_IT_CHANGES

as confirmed by the DEBUG file:

Copying and patching 1 file ...
[./override/FW2700.are] loaded, 9748 bytes
Not copying [FW2700.are] to [override/FW2700.are] because it did not change

A quick check with NI also confirms no changes to the file. However, if the BUT_ONLY_IF_IT_CHANGES line is commented out, the file is patched, confirmed by NI and the DEBUG file:

Copying and patching 1 file ...
[./override/FW2700.are] loaded, 9748 bytes
[override/FW2700.are] loaded, 9748 bytes
[override/FW2700.are] backed up to [tutufix/backup/0/FW2700.are]
Copied [FW2700.are] to [override/FW2700.are]

Edited by CamDawg, 06 May 2004 - 08:50 PM.

Why is this Hypnotoad video so popu... ALL GLORY TO THE HYPNOTOAD.
____
The Gibberlings Three - Home of IE Mods

The BG2 Fixpack - All the fixes of Baldurdash, plus a few hundred more. Now available, with more fixes being added in every release.


#2 weimer

weimer
  • Member
  • 1569 posts

Posted 08 May 2004 - 10:46 AM

I don't have FW2700.ARE, so I can't test this. Are you sure that the patches would actually change the file?

Can you either send me that file or give a TP2 example using files from stock BG2 so that I can test it locally?

#3 CamDawg

CamDawg

    ALL GLORY TO THE HYPNOTOAD

  • Modder
  • 1505 posts

Posted 08 May 2004 - 01:31 PM

Just tested this on a standard ToB install with AR0602.are and I'm getting the same problem. Both NI and the DEBUG file confirm that patching does not occur with BUT_ONLY_IF_IT_CHANGES. If I comment out the BUT_ONLY_IF_IT_CHANGES line, patching occurs, again confirmed with NI and the DEBUG file.

Same code as above, just substitute AR0602.are for FW2700.are.

Why is this Hypnotoad video so popu... ALL GLORY TO THE HYPNOTOAD.
____
The Gibberlings Three - Home of IE Mods

The BG2 Fixpack - All the fixes of Baldurdash, plus a few hundred more. Now available, with more fixes being added in every release.


#4 -Guest-

-Guest-
  • Guest

Posted 08 May 2004 - 01:35 PM

I don't have FW2700.ARE, so I can't test this. Are you sure that the patches would actually change the file?

Can you either send me that file or give a TP2 example using files from stock BG2 so that I can test it locally?

BUT_ONLY_IF_IT_CHANGES doesn't work with INSERT/DELETE_BYTES. I posted about this in the old 'BUT_ONLY_IF_IT_CHANGES' thread.

#5 weimer

weimer
  • Member
  • 1569 posts

Posted 10 May 2004 - 10:27 AM

Fixed. Cheesy typo ("result_buff" vs. "buff').

#6 CamDawg

CamDawg

    ALL GLORY TO THE HYPNOTOAD

  • Modder
  • 1505 posts

Posted 10 May 2004 - 11:37 AM

Thanks Wes!

Why is this Hypnotoad video so popu... ALL GLORY TO THE HYPNOTOAD.
____
The Gibberlings Three - Home of IE Mods

The BG2 Fixpack - All the fixes of Baldurdash, plus a few hundred more. Now available, with more fixes being added in every release.


#7 -Guest-

-Guest-
  • Guest

Posted 10 May 2004 - 12:19 PM

Fixed. Cheesy typo ("result_buff" vs. "buff').

Or "buff" vs. "result_buff." Looks like it works perfectly now. Thanks.