The Black Wyrm Lair Forums
The Black Wyrm's Lair Terms of Use Help Search Members Calendar

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Add info trigger with weidu
Armand
post May 18 2009, 03:12 PM
Post #1





Forum Member
Posts: 15
Joined: 3-November 08




Hello,

I'm a french modder and I trying to insert info trigger on a map with weidu. I know how to do with dltcep however I must create a new entry in the dialog.tlk and I don't want to do what.

Do you know any handling for that ? I despair to implement map triggers with Weidu commands... wacko.gif
Go to the top of the page
 
Quote Post
Tervadh
post May 18 2009, 10:35 PM
Post #2





Forum Member
Posts: 49
Joined: 20-October 06




I think you want ADD_MAP_NOTE #x #y ~Note~.


--------------------
"Humor is an affirmation of dignity, a declaration of man's superiority to all that befalls him." -Romain Gary, Promise at Dawn
Go to the top of the page
 
Quote Post
plainab
post May 19 2009, 12:57 AM
Post #3





Forum Member
Posts: 21
Joined: 18-November 06




Your question is not clear enough for me...
So I'll ask you a couple questions to help me help you get pointed in the right direction....
Are you wanting a map note that shows up on the map screen? If so, check out the information in the post above.
Are you wanting an info trigger? Something like an Inn sign or a sign post that can be clicked and text displayed telling what it is? If so read on.

To get an info trigger like the sign on an Inn, you'll be wanting to insert your information into the regions section of the area file. This is the same section that includes proximity triggers such as floor traps and floor triggers it also include travel points.

I've got some code where I've modified ToTSC's behavior of ending Chapter 4. Instead of happening as soon as Davaeorn is dead, the chapter advances when the party crosses one of two floor triggers (just like vanilla BG).

I'll share relevant portions of the code and you can decide how to adjust it to fit your needs...

The main work is done inside the in-lined file which is shown below and must come first in the tp2, because if it's in-lined it has to be defined prior to it being called. You could use an external tph file or direct tp2 code, it doesn't really matter. Also, since I designed it for both ToTSC and EasyTutu I needed to create something that could be used for both versions. Hence the variable for the file.
CODE
<<<<<<<< inlined/1803.tph
COPY_EXISTING_REGEXP GLOB ~%file_name%~ ~override~
PATCH_IF (%SOURCE_SIZE% > 0xd4) BEGIN
//read area script reference
  READ_ASCII 0x94 script_res
//update vertex indices for info points
  READ_LONG 0x5c info_off
  READ_SHORT 0x5a info_num
  FOR (i= 0; i < "%info_num%"; i += 1) BEGIN
   READ_SHORT ("%info_off%" + (%i% * 0xc4) + 0x2c) info_vertex_first_idx
   PATCH_IF ("%info_vertex_first_idx%" >= 0) BEGIN
    WRITE_SHORT ("%info_off%" + (%i% * 0xc4) + 0x2c) ("%info_vertex_first_idx%" + 10)
   END
  END
//update vertex indices for containers
  READ_LONG 0x70 container_off
  READ_SHORT 0x74 container_num
  FOR (i = 0; i< "%container_num%"; i += 1) BEGIN
   READ_LONG ("%container_off%" + (%i% * 0xc0) + 0x50) container_vertex_first_idx
   PATCH_IF ("%container_vertex_first_idx%" >= 0) BEGIN
    WRITE_LONG ("%container_off%" + (%i% * 0xc0) + 0x50) ("%container_vertex_first_idx%" + 10)
   END
  END
//update vertex indices for doors
  READ_LONG 0xa8 door_off
  READ_SHORT 0xa4 door_num
  FOR (i = 0; i < "%door_num%"; i += 1) BEGIN
   READ_LONG ("%door_off%" + (%i% * 0xc8) + 0x2c) door_vertex_open_first_idx
   PATCH_IF ("%door_vertex_open_first_idx%" >= 0) BEGIN
    WRITE_LONG ("%door_off%" + (%i% * 0xc8) + 0x2c) ("%door_vertex_open_first_idx%" + 10)
   END
   READ_LONG ("%door_off%" + (%i% * 0xc8) + 0x34) door_vertex_closed_first_idx
   PATCH_IF ("%door_vertex_closed_first_idx%" >= 0) BEGIN
    WRITE_LONG ("%door_off%" + (%i% * 0xc8) + 0x34) ("%door_vertex_closed_first_idx%" + 10)
   END
   READ_LONG ("%door_off%" + (%i% * 0xc8) + 0x48) door_vertex_impede_closed_first_idx
   PATCH_IF ("%door_vertex_impede_closed_first_idx%" >= 0) BEGIN
    WRITE_LONG ("%door_off%" + (%i% * 0xc8) + 0x48) ("%door_vertex_impede_closed_first_idx%" + 10)
   END
   READ_LONG ("%door_off%" + (%i% * 0xc8) + 0x50) door_vertex_impede_open_first_idx
   PATCH_IF ("%door_vertex_impede_open_first_idx%" >= 0) BEGIN
    WRITE_LONG ("%door_off%" + (%i% * 0xc8) + 0x50) ("%door_vertex_impede_open_first_idx%" + 10)
   END
  END
//insert 2 triggers worth of space
  READ_LONG 0x5c info_off
  READ_SHORT 0x5a info_num
  WRITE_SHORT 0x5a (%info_num% + 2)
  SET new_bytes = (0xc4 * 2)
  SET cmp_loc = %info_off%
  SET check_num = %info_num%
  INSERT_BYTES (%cmp_loc%) (%new_bytes%)
//check other offsets and update as needed
  PATCH_IF (%check_num% > 0) BEGIN
   READ_LONG 0x54 actor_off
   PATCH_IF (%actor_off% > %cmp_loc%) BEGIN
    WRITE_LONG 0x54 (%actor_off% + %new_bytes%) //actor_off
   END
   READ_LONG 0x60 spawn_off
   PATCH_IF (%spawn_off% > %cmp_loc%) BEGIN
    WRITE_LONG 0x60 (%spawn_off% + %new_bytes%) //spawn_off
   END
   READ_LONG 0x68 entrance_off
   PATCH_IF (%entrance_off% > %cmp_loc%) BEGIN
    WRITE_LONG 0x68 (%entrance_off% + %new_bytes%) //entrance_off
   END
   READ_LONG 0x70 container_off
   PATCH_IF (%container_off% > %cmp_loc%) BEGIN
    WRITE_LONG 0x70 (%container_off% + %new_bytes%) //container_off
   END
   READ_LONG 0x78 item_off
   PATCH_IF (%item_off% > %cmp_loc%) BEGIN
    WRITE_LONG 0x78 (%item_off% + %new_bytes%) //item_off
   END
//   READ_LONG 0x5c info_off
//   PATCH_IF (%info_off% > %cmp_loc%) BEGIN
//    WRITE_LONG 0x5c (%info_off% + %new_bytes%) //vertex_off
//   END
   READ_LONG 0x7c vertex_off
   PATCH_IF (%vertex_off% > %cmp_loc%) BEGIN
    WRITE_LONG 0x7c (%vertex_off% + %new_bytes%) //vertex_off
   END
   READ_LONG 0x84 ambient_off
   PATCH_IF (%ambient_off% > %cmp_loc%) BEGIN
    WRITE_LONG 0x84 (%ambient_off% + %new_bytes%) //ambient_off
   END
   READ_LONG 0x88 variable_off
   PATCH_IF (%variable_off% > %cmp_loc%) BEGIN
    WRITE_LONG 0x88 (%variable_off% + %new_bytes%) //variable_off
   END
   READ_LONG 0xa8 door_off
   PATCH_IF (%door_off% > %cmp_loc%) BEGIN
    WRITE_LONG 0xa8 (%door_off% + %new_bytes%) //door_off
   END
   READ_LONG 0xa0 explored_off
   PATCH_IF (%explored_off% > %cmp_loc%) BEGIN
    WRITE_LONG 0xa0 (%explored_off% + %new_bytes%) //explored_off
   END
   READ_LONG 0xb0 anim_off
   PATCH_IF (%anim_off% > %cmp_loc%) BEGIN
    WRITE_LONG 0xb0 (%anim_off% + %new_bytes%) //anim_off
   END
   READ_LONG 0xb8 tiled_off
   PATCH_IF (%tiled_off% > %cmp_loc%) BEGIN
    WRITE_LONG 0xb8 (%tiled_off% + %new_bytes%) //tiled_off
   END
   READ_LONG 0xbc song_off
   PATCH_IF (%song_off% > %cmp_loc%) BEGIN
    WRITE_LONG 0xbc (%song_off% + %new_bytes%) //song_off
   END
   READ_LONG 0xc0 rest_off
   PATCH_IF (%rest_off% > %cmp_loc%) BEGIN
    WRITE_LONG 0xc0 (%rest_off% + %new_bytes%) //rest_off
   END
   READ_LONG 0xc4 automap_off
   PATCH_IF (%automap_off% > %cmp_loc%) BEGIN
    WRITE_LONG 0xc4 (%automap_off% + %new_bytes%) //automap_off
   END
   READ_LONG 0xcc pro_traps_off
   PATCH_IF (%pro_traps_off% > %cmp_loc%) BEGIN
    WRITE_LONG 0xcc (%pro_traps_off% + %new_bytes%) //automap_off
   END
  END
  ELSE
  PATCH_IF (%check_num% = 0) BEGIN
   READ_LONG 0x54 actor_off
   PATCH_IF (%actor_off% >= %cmp_loc%) BEGIN
    WRITE_LONG 0x54 (%actor_off% + %new_bytes%) //actor_off
   END
   READ_LONG 0x60 spawn_off
   PATCH_IF (%spawn_off% >= %cmp_loc%) BEGIN
    WRITE_LONG 0x60 (%spawn_off% + %new_bytes%) //spawn_off
   END
   READ_LONG 0x68 entrance_off
   PATCH_IF (%entrance_off% >= %cmp_loc%) BEGIN
    WRITE_LONG 0x68 (%entrance_off% + %new_bytes%) //entrance_off
   END
   READ_LONG 0x70 container_off
   PATCH_IF (%container_off% >= %cmp_loc%) BEGIN
    WRITE_LONG 0x70 (%container_off% + %new_bytes%) //container_off
   END
   READ_LONG 0x78 item_off
   PATCH_IF (%item_off% >= %cmp_loc%) BEGIN
    WRITE_LONG 0x78 (%item_off% + %new_bytes%) //item_off
   END
//   READ_LONG 0x5c info_off
//   PATCH_IF (%info_off% >= %cmp_loc%) BEGIN
//    WRITE_LONG 0x5c (%info_off% + %new_bytes%) //vertex_off
//   END
   READ_LONG 0x7c vertex_off
   PATCH_IF (%vertex_off% >= %cmp_loc%) BEGIN
    WRITE_LONG 0x7c (%vertex_off% + %new_bytes%) //vertex_off
   END
   READ_LONG 0x84 ambient_off
   PATCH_IF (%ambient_off% >= %cmp_loc%) BEGIN
    WRITE_LONG 0x84 (%ambient_off% + %new_bytes%) //ambient_off
   END
   READ_LONG 0x88 variable_off
   PATCH_IF (%variable_off% >= %cmp_loc%) BEGIN
    WRITE_LONG 0x88 (%variable_off% + %new_bytes%) //variable_off
   END
   READ_LONG 0xa8 door_off
   PATCH_IF (%door_off% >= %cmp_loc%) BEGIN
    WRITE_LONG 0xa8 (%door_off% + %new_bytes%) //door_off
   END
   READ_LONG 0xa0 explored_off
   PATCH_IF (%explored_off% >= %cmp_loc%) BEGIN
    WRITE_LONG 0xa0 (%explored_off% + %new_bytes%) //explored_off
   END
   READ_LONG 0xb0 anim_off
   PATCH_IF (%anim_off% >= %cmp_loc%) BEGIN
    WRITE_LONG 0xb0 (%anim_off% + %new_bytes%) //anim_off
   END
   READ_LONG 0xb8 tiled_off
   PATCH_IF (%tiled_off% >= %cmp_loc%) BEGIN
    WRITE_LONG 0xb8 (%tiled_off% + %new_bytes%) //tiled_off
   END
   READ_LONG 0xbc song_off
   PATCH_IF (%song_off% >= %cmp_loc%) BEGIN
    WRITE_LONG 0xbc (%song_off% + %new_bytes%) //song_off
   END
   READ_LONG 0xc0 rest_off
   PATCH_IF (%rest_off% >= %cmp_loc%) BEGIN
    WRITE_LONG 0xc0 (%rest_off% + %new_bytes%) //rest_off
   END
   READ_LONG 0xc4 automap_off
   PATCH_IF (%automap_off% >= %cmp_loc%) BEGIN
    WRITE_LONG 0xc4 (%automap_off% + %new_bytes%) //automap_off
   END
   READ_LONG 0xcc pro_traps_off
   PATCH_IF (%pro_traps_off% >= %cmp_loc%) BEGIN
    WRITE_LONG 0xcc (%pro_traps_off% + %new_bytes%) //automap_off
   END
  END
//insert space for vertices for 2 triggers
  READ_LONG 0x7c vertex_off
  READ_SHORT 0x80 vertex_num
  WRITE_SHORT 0x80 (%vertex_num% + 10)
  SET new_bytes = (0x4 * 10)
  SET check_num = %vertex_num%
  SET cmp_loc = %vertex_off%
  INSERT_BYTES (%cmp_loc%) (%new_bytes%)
//check other offsets and update as needed
  PATCH_IF (%check_num% > 0) BEGIN
   READ_LONG 0x54 actor_off
   PATCH_IF (%actor_off% > %cmp_loc%) BEGIN
    WRITE_LONG 0x54 (%actor_off% + %new_bytes%) //actor_off
   END
   READ_LONG 0x60 spawn_off
   PATCH_IF (%spawn_off% > %cmp_loc%) BEGIN
    WRITE_LONG 0x60 (%spawn_off% + %new_bytes%) //spawn_off
   END
   READ_LONG 0x68 entrance_off
   PATCH_IF (%entrance_off% > %cmp_loc%) BEGIN
    WRITE_LONG 0x68 (%entrance_off% + %new_bytes%) //entrance_off
   END
   READ_LONG 0x70 container_off
   PATCH_IF (%container_off% > %cmp_loc%) BEGIN
    WRITE_LONG 0x70 (%container_off% + %new_bytes%) //container_off
   END
   READ_LONG 0x78 item_off
   PATCH_IF (%item_off% > %cmp_loc%) BEGIN
    WRITE_LONG 0x78 (%item_off% + %new_bytes%) //item_off
   END
   READ_LONG 0x5c info_off
   PATCH_IF (%info_off% > %cmp_loc%) BEGIN
    WRITE_LONG 0x5c (%info_off% + %new_bytes%) //vertex_off
   END
//   READ_LONG 0x7c vertex_off
//   PATCH_IF (%vertex_off% > %cmp_loc%) BEGIN
//    WRITE_LONG 0x7c (%vertex_off% + %new_bytes%) //vertex_off
//   END
   READ_LONG 0x84 ambient_off
   PATCH_IF (%ambient_off% > %cmp_loc%) BEGIN
    WRITE_LONG 0x84 (%ambient_off% + %new_bytes%) //ambient_off
   END
   READ_LONG 0x88 variable_off
   PATCH_IF (%variable_off% > %cmp_loc%) BEGIN
    WRITE_LONG 0x88 (%variable_off% + %new_bytes%) //variable_off
   END
   READ_LONG 0xa8 door_off
   PATCH_IF (%door_off% > %cmp_loc%) BEGIN
    WRITE_LONG 0xa8 (%door_off% + %new_bytes%) //door_off
   END
   READ_LONG 0xa0 explored_off
   PATCH_IF (%explored_off% > %cmp_loc%) BEGIN
    WRITE_LONG 0xa0 (%explored_off% + %new_bytes%) //explored_off
   END
   READ_LONG 0xb0 anim_off
   PATCH_IF (%anim_off% > %cmp_loc%) BEGIN
    WRITE_LONG 0xb0 (%anim_off% + %new_bytes%) //anim_off
   END
   READ_LONG 0xb8 tiled_off
   PATCH_IF (%tiled_off% > %cmp_loc%) BEGIN
    WRITE_LONG 0xb8 (%tiled_off% + %new_bytes%) //tiled_off
   END
   READ_LONG 0xbc song_off
   PATCH_IF (%song_off% > %cmp_loc%) BEGIN
    WRITE_LONG 0xbc (%song_off% + %new_bytes%) //song_off
   END
   READ_LONG 0xc0 rest_off
   PATCH_IF (%rest_off% > %cmp_loc%) BEGIN
    WRITE_LONG 0xc0 (%rest_off% + %new_bytes%) //rest_off
   END
   READ_LONG 0xc4 automap_off
   PATCH_IF (%automap_off% > %cmp_loc%) BEGIN
    WRITE_LONG 0xc4 (%automap_off% + %new_bytes%) //automap_off
   END
   READ_LONG 0xcc pro_traps_off
   PATCH_IF (%pro_traps_off% > %cmp_loc%) BEGIN
    WRITE_LONG 0xcc (%pro_traps_off% + %new_bytes%) //automap_off
   END
  END
  ELSE
  PATCH_IF (%check_num% = 0) BEGIN
   READ_LONG 0x54 actor_off
   PATCH_IF (%actor_off% >= %cmp_loc%) BEGIN
    WRITE_LONG 0x54 (%actor_off% + %new_bytes%) //actor_off
   END
   READ_LONG 0x60 spawn_off
   PATCH_IF (%spawn_off% >= %cmp_loc%) BEGIN
    WRITE_LONG 0x60 (%spawn_off% + %new_bytes%) //spawn_off
   END
   READ_LONG 0x68 entrance_off
   PATCH_IF (%entrance_off% >= %cmp_loc%) BEGIN
    WRITE_LONG 0x68 (%entrance_off% + %new_bytes%) //entrance_off
   END
   READ_LONG 0x70 container_off
   PATCH_IF (%container_off% >= %cmp_loc%) BEGIN
    WRITE_LONG 0x70 (%container_off% + %new_bytes%) //container_off
   END
   READ_LONG 0x78 item_off
   PATCH_IF (%item_off% >= %cmp_loc%) BEGIN
    WRITE_LONG 0x78 (%item_off% + %new_bytes%) //item_off
   END
   READ_LONG 0x5c info_off
   PATCH_IF (%info_off% >= %cmp_loc%) BEGIN
    WRITE_LONG 0x5c (%info_off% + %new_bytes%) //vertex_off
   END
//   READ_LONG 0x7c vertex_off
//   PATCH_IF (%vertex_off% >= %cmp_loc%) BEGIN
//    WRITE_LONG 0x7c (%vertex_off% + %new_bytes%) //vertex_off
//   END
   READ_LONG 0x84 ambient_off
   PATCH_IF (%ambient_off% >= %cmp_loc%) BEGIN
    WRITE_LONG 0x84 (%ambient_off% + %new_bytes%) //ambient_off
   END
   READ_LONG 0x88 variable_off
   PATCH_IF (%variable_off% >= %cmp_loc%) BEGIN
    WRITE_LONG 0x88 (%variable_off% + %new_bytes%) //variable_off
   END
   READ_LONG 0xa8 door_off
   PATCH_IF (%door_off% >= %cmp_loc%) BEGIN
    WRITE_LONG 0xa8 (%door_off% + %new_bytes%) //door_off
   END
   READ_LONG 0xa0 explored_off
   PATCH_IF (%explored_off% >= %cmp_loc%) BEGIN
    WRITE_LONG 0xa0 (%explored_off% + %new_bytes%) //explored_off
   END
   READ_LONG 0xb0 anim_off
   PATCH_IF (%anim_off% >= %cmp_loc%) BEGIN
    WRITE_LONG 0xb0 (%anim_off% + %new_bytes%) //anim_off
   END
   READ_LONG 0xb8 tiled_off
   PATCH_IF (%tiled_off% >= %cmp_loc%) BEGIN
    WRITE_LONG 0xb8 (%tiled_off% + %new_bytes%) //tiled_off
   END
   READ_LONG 0xbc song_off
   PATCH_IF (%song_off% >= %cmp_loc%) BEGIN
    WRITE_LONG 0xbc (%song_off% + %new_bytes%) //song_off
   END
   READ_LONG 0xc0 rest_off
   PATCH_IF (%rest_off% >= %cmp_loc%) BEGIN
    WRITE_LONG 0xc0 (%rest_off% + %new_bytes%) //rest_off
   END
   READ_LONG 0xc4 automap_off
   PATCH_IF (%automap_off% >= %cmp_loc%) BEGIN
    WRITE_LONG 0xc4 (%automap_off% + %new_bytes%) //automap_off
   END
   READ_LONG 0xcc pro_traps_off
   PATCH_IF (%pro_traps_off% >= %cmp_loc%) BEGIN
    WRITE_LONG 0xcc (%pro_traps_off% + %new_bytes%) //automap_off
   END
  END
// Write info for Chapter trigger 1
  READ_LONG 0x5c info_off
  WRITE_ASCII (%info_off% + 0) ~Chapter trigger 1~ (32)
  WRITE_SHORT (%info_off% + 0x20) 0
  WRITE_SHORT (%info_off% + 0x22) 380
  WRITE_SHORT (%info_off% + 0x24) 1062
  WRITE_SHORT (%info_off% + 0x26) 541
  WRITE_SHORT (%info_off% + 0x28) 1277
  WRITE_SHORT (%info_off% + 0x2a) 6 //num of vertices
  WRITE_LONG (%info_off% + 0x2c) 0 //index of vertices
  WRITE_LONG (%info_off% + 0x30) 0
  WRITE_LONG (%info_off% + 0x34) 0
  WRITE_ASCII (%info_off% + 0x38) ~~ (8)
  WRITE_ASCII (%info_off% + 0x40) ~~ (32)
  WRITE_LONG (%info_off% + 0x60) 2
  WRITE_LONG (%info_off% + 0x64) 0
  WRITE_SHORT (%info_off% + 0x68) 100
  WRITE_SHORT (%info_off% + 0x6a) 100
  WRITE_SHORT (%info_off% + 0x6c) 1
  WRITE_SHORT (%info_off% + 0x63) 0
  WRITE_SHORT (%info_off% + 0x70) 404
  WRITE_SHORT (%info_off% + 0x72) 1300
  WRITE_BYTE (%info_off% + 0x74) 0
  WRITE_BYTE (%info_off% + 0x75) 0
  WRITE_BYTE (%info_off% + 0x76) 0
  WRITE_BYTE (%info_off% + 0x77) 0
  WRITE_BYTE (%info_off% + 0x78) 0
  WRITE_BYTE (%info_off% + 0x79) 0
  WRITE_BYTE (%info_off% + 0x7a) 0
  WRITE_BYTE (%info_off% + 0x7b) 0
  WRITE_ASCII (%info_off% + 0x7c) ~endch4~ (8)
  WRITE_SHORT (%info_off% + 0x84) 0
  WRITE_SHORT (%info_off% + 0x86) 0
  WRITE_SHORT (%info_off% + 0x88) 0
  WRITE_SHORT (%info_off% + 0x8a) 0
  WRITE_ASCII (%info_off% + 0xbc) ~~ (8)
  FOR (y=0x8c; y<0xbc; y+=1) BEGIN
   WRITE_BYTE (%info_off% + %y%) 0
  END
// Write info for Chapter trigger 2
  WRITE_ASCII (%info_off% + 0xc4 + 0) ~Chapter trigger 2~ (32)
  WRITE_SHORT (%info_off% + 0xc4 + 0x20) 0
  WRITE_SHORT (%info_off% + 0xc4 + 0x22) 1523
  WRITE_SHORT (%info_off% + 0xc4 + 0x24) 272
  WRITE_SHORT (%info_off% + 0xc4 + 0x26) 1629
  WRITE_SHORT (%info_off% + 0xc4 + 0x28) 356
  WRITE_SHORT (%info_off% + 0xc4 + 0x2a) 4 //num of vertices
  WRITE_LONG (%info_off% + 0xc4 + 0x2c) 6 //index of vertices
  WRITE_LONG (%info_off% + 0xc4 + 0x30) 0
  WRITE_LONG (%info_off% + 0xc4 + 0x34) 0
  WRITE_ASCII (%info_off% + 0xc4 + 0x38) ~~ (8)
  WRITE_ASCII (%info_off% + 0xc4 + 0x40) ~~ (32)
  WRITE_LONG (%info_off% + 0xc4 + 0x60) 2
  WRITE_LONG (%info_off% + 0xc4 + 0x64) 0
  WRITE_SHORT (%info_off% + 0xc4 + 0x68) 100
  WRITE_SHORT (%info_off% + 0xc4 + 0x6a) 100
  WRITE_SHORT (%info_off% + 0xc4 + 0x6c) 1
  WRITE_SHORT (%info_off% + 0xc4 + 0x63) 0
  WRITE_SHORT (%info_off% + 0xc4 + 0x70) 1620
  WRITE_SHORT (%info_off% + 0xc4 + 0x72) 340
  WRITE_BYTE (%info_off% + 0xc4 + 0x74) 0
  WRITE_BYTE (%info_off% + 0xc4 + 0x75) 0
  WRITE_BYTE (%info_off% + 0xc4 + 0x76) 0
  WRITE_BYTE (%info_off% + 0xc4 + 0x77) 0
  WRITE_BYTE (%info_off% + 0xc4 + 0x78) 0
  WRITE_BYTE (%info_off% + 0xc4 + 0x79) 0
  WRITE_BYTE (%info_off% + 0xc4 + 0x7a) 0
  WRITE_BYTE (%info_off% + 0xc4 + 0x7b) 0
  WRITE_ASCII (%info_off% + 0xc4 + 0x7c) ~endch4~ (8)
  WRITE_SHORT (%info_off% + 0xc4 + 0x84) 0
  WRITE_SHORT (%info_off% + 0xc4 + 0x86) 0
  WRITE_SHORT (%info_off% + 0xc4 + 0x88) 0
  WRITE_SHORT (%info_off% + 0xc4 + 0x8a) 0
  WRITE_ASCII (%info_off% + 0xc4 + 0xbc) ~~ (8)
  FOR (y=0x8c; y<0xbc; y+=1) BEGIN
   WRITE_BYTE (%info_off% + 0xc4 + %y%) 0
  END
// Chapter trigger 1 -- verticies
  READ_LONG 0x7c vertex_off
  WRITE_SHORT (%vertex_off% + 0) 380
  WRITE_SHORT (%vertex_off% + 2) 1076
  WRITE_SHORT (%vertex_off% + 4) 510
  WRITE_SHORT (%vertex_off% + 6) 1160
  WRITE_SHORT (%vertex_off% + 8) 439
  WRITE_SHORT (%vertex_off% + 10) 1263
  WRITE_SHORT (%vertex_off% + 12) 468
  WRITE_SHORT (%vertex_off% + 14) 1277
  WRITE_SHORT (%vertex_off% + 16) 541
  WRITE_SHORT (%vertex_off% + 18) 1148
  WRITE_SHORT (%vertex_off% + 20) 393
  WRITE_SHORT (%vertex_off% + 22) 1062
// Chapter trigger 2 -- verticies
  WRITE_SHORT (%vertex_off% + 24) 1523
  WRITE_SHORT (%vertex_off% + 26) 292
  WRITE_SHORT (%vertex_off% + 28) 1607
  WRITE_SHORT (%vertex_off% + 30) 356
  WRITE_SHORT (%vertex_off% + 32) 1629
  WRITE_SHORT (%vertex_off% + 34) 334
  WRITE_SHORT (%vertex_off% + 36) 1550
  WRITE_SHORT (%vertex_off% + 38) 272
END
BUT_ONLY_IF_IT_CHANGES
>>>>>>>>

The other parts of my code that I did not post shouldn't have any bearing on what you want to do. If you are only inserting one info trigger, be sure to adjust the byte value where new bytes are added as well as the update value for other offsets... Also, if the number of verticies (i.e. X & Y coordinate values) are different be sure to adjust the offset update values and the new bytes value as well.

Be sure to have the IESDP open while you make adjustments. Here is the link to the ARE file information ARE Info @ IESDP

Don't hesitate to ask questions if you need further assistance.
Go to the top of the page
 
Quote Post
Armand
post May 19 2009, 02:01 PM
Post #4





Forum Member
Posts: 15
Joined: 3-November 08




QUOTE
Something like an Inn sign or a sign post that can be clicked and text displayed telling what it is?


Yes, exactly. I want to use this kind of text.

Anyway, I thank you a lot for your explanations. They are very complete and... Technical ph34r.gif

But I'm working on that! I've a very good knowledge with ie tileset or dltcep but I'm not very comfortable with tp2's handling yet... I looked your link in iesdp : it's very practical. From now on, I think that I'll focus on offsets even if I don't like so much to code very long handling in tp2. blush.gif

Well, I'll try to apply your method and I'll keep you posted. Thank you again for your help.

Go to the top of the page
 
Quote Post
Armand
post May 24 2009, 01:05 PM
Post #5





Forum Member
Posts: 15
Joined: 3-November 08




Finally, I found an alternative solution thanks to yonaveth's tuto. Here :

QUOTE
COPY ~dq/areas/porthpentyrch/.~ ~override/.~
COPY ~dq/areas/porthpentyrch/ys1000/.~ ~override/.~
SAY 0x4054 ~A Coast Way marker post. It says 'West to Porthpentyrch; North to Athkatla; East to Trademeet'~


He also refer to offset and I think it will be enough for me. For the time, I content oneself with that. Thanks to have take on your time to explain me. smile.gif

This post has been edited by Armand: May 24 2009, 01:29 PM
Go to the top of the page
 
Quote Post
Tervadh
post May 24 2009, 04:49 PM
Post #6





Forum Member
Posts: 49
Joined: 20-October 06




QUOTE(Armand @ May 24 2009, 09:05 AM) *
Finally, I found an alternative solution thanks to yonaveth's tuto.
The easiest solution is usually the best smile.gif. Though I think you may still need to adjust offsets. Where is this tutorial?


--------------------
"Humor is an affirmation of dignity, a declaration of man's superiority to all that befalls him." -Romain Gary, Promise at Dawn
Go to the top of the page
 
Quote Post
plainab
post May 24 2009, 08:24 PM
Post #7





Forum Member
Posts: 21
Joined: 18-November 06




QUOTE(Armand @ May 24 2009, 09:05 AM) *
Finally, I found an alternative solution thanks to yonaveth's tuto. Here :

QUOTE
COPY ~dq/areas/porthpentyrch/.~ ~override/.~
COPY ~dq/areas/porthpentyrch/ys1000/.~ ~override/.~
SAY 0x4054 ~A Coast Way marker post. It says 'West to Porthpentyrch; North to Athkatla; East to Trademeet'~


He also refer to offset and I think it will be enough for me. For the time, I content oneself with that. Thanks to have take on your time to explain me. :)

What you have will work IF the following conditions are met:
1) The ARE file is NEW. For this discussion new means:
a) never before seen area & map
b) pre-existing area & map that have been significantly modified and given a new custom name.
2) You've already inserted all other info trigger information with an appropriate GUI editor, if the trigger is new.
3) You've confirmed the direct offset number.

If you failed 2 & 3 you'll get errors, but they'll be fixable by making sure that everything is correctly set within the appropriate GUI editor.

If you failed 1 (you fail it by using a pre-existing area file with pre-existing name), you'll need to use something akin to what I posted earlier. Other mods prior to yours may change the same file and your direct offset will no longer point to the correct location.
Go to the top of the page
 
Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:



- Lo-Fi Version Time is now: 10th November 2024 - 11:05 PM