Author Topic: AR1010 restoration  (Read 15152 times)

Offline Exodus

  • 1 half of the omg we are teh funy team
  • Planewalker
  • *****
  • Posts: 116
  • Gender: Male
  • Redhead
AR1010 restoration
« on: December 02, 2005, 03:48:59 AM »
Team,

Do you have any more details on this level at all?  I had no idea this one was kicking around.
Public Warning - Seifer is one half of the crack elite team recognised by JC as the "omg we are teh funy" team!  You have been warned!

http://www.omgwearetehfuny.net

Offline Echon

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 1941
  • Gender: Male
    • The Fields of the Dead
Re: AR1010 restoration
« Reply #1 on: December 02, 2005, 04:21:33 AM »
It is simply the second level of the dungeon which was removed for whatever reason, although it is still mentioned in the game. From ANDRIS.DLG: 'It could be a natural phenomenon, though the tunnels below certainly are not.' It does not work because the WED is corrupted but I recreated it and restored the area in FotD although I never mentioned this anywhere because I wanted it to be a surprise. You now meet Dezkiel here instead of the level above. The graphics for this area are basically a frozen version of the area you enter after escaping the Candlekeep catacombs.

-Echon

Offline Exodus

  • 1 half of the omg we are teh funy team
  • Planewalker
  • *****
  • Posts: 116
  • Gender: Male
  • Redhead
Re: AR1010 restoration
« Reply #2 on: December 02, 2005, 10:02:17 AM »
Got a screenshot at hand?
Public Warning - Seifer is one half of the crack elite team recognised by JC as the "omg we are teh funy" team!  You have been warned!

http://www.omgwearetehfuny.net

Offline Echon

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 1941
  • Gender: Male
    • The Fields of the Dead
Re: AR1010 restoration
« Reply #3 on: December 02, 2005, 10:23:32 AM »
I do now. It is a bit dark but as you can see the floor is covered with ice.

(http://www.echon.dk/misc/ar1010.jpg)

-Echon

Offline Salk

  • Planewalker
  • *****
  • Posts: 848
Re: AR1010 restoration
« Reply #4 on: December 02, 2005, 12:45:51 PM »
Echon,

will you guys implement this missing level in Unfinished Business too ? It's great to have it in FotD but I believe this also belongs to UB as well ?

Thanks!

Offline Echon

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 1941
  • Gender: Male
    • The Fields of the Dead
Re: AR1010 restoration
« Reply #5 on: December 02, 2005, 01:11:49 PM »
I do not know, you will need to ask Icelus about that.

-Echon

Offline icelus

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 3173
  • Gender: Male
Re: AR1010 restoration
« Reply #6 on: December 02, 2005, 02:34:15 PM »
It's on the list of stuff to look at, yeah.  I just suck and haven't taken the time to do so yet.  :(
<Moongaze> Luckily BWL has a very understanding and friendly admin.

Offline Salk

  • Planewalker
  • *****
  • Posts: 848
Re: AR1010 restoration
« Reply #7 on: December 03, 2005, 04:08:45 AM »
No, Icelus!

You don't suck! You will be my Santa Claus bringing me a nice present with a red ribbon at Xmas eve!

Inside I will find the first version of UB and I will be the happiest child on Earth!

Offline devSin

  • Moderator
  • Planewalker
  • *****
  • Posts: 1632
  • Gender: Male
Re: AR1010 restoration
« Reply #8 on: January 24, 2006, 10:51:56 PM »
Did you ever get to this? I had to make new search, LUM, and height maps for the area, that I can make available (the Photoshop source is ~45M, so I don't want to upload if you've already done this). I also have the TP2 code I used to hook everything up.

Offline icelus

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 3173
  • Gender: Male
Re: AR1010 restoration
« Reply #9 on: January 24, 2006, 10:56:27 PM »
I didn't, but I'm all about accepting the work of other people!  :)

I was never able to get in contact with HardenCooner, so a version of the component for which I actually have permission to use would be spiffy.

So, if you're offering, you can send it to me at icelus1 @ yahoo.com, and I'll throw your name up in the credits and stuff.
<Moongaze> Luckily BWL has a very understanding and friendly admin.

Offline devSin

  • Moderator
  • Planewalker
  • *****
  • Posts: 1632
  • Gender: Male
Re: AR1010 restoration
« Reply #10 on: January 24, 2006, 11:08:19 PM »
Like, just download it (~16M, tar, bzip2). It still requires Echon's WED, but his search map was a little narrow, and the LUM and height maps were just solid. The archive has the high-resolution Photoshop image (all necessary layers, approx. 1:1, ~45M), in case anyone wants to make further modifications or wants to see how to create these maps from scratch by hand. Also two color palettes for search and height maps for use with Photoshop, and the finished BMP maps. The archive is tar.bz2 for size; let me know if you need ZIP instead.

This is, without a doubt, one of the strangest areas I've ever seen. The lighting is paranormal (with no identifiable light source), the terrain is completely undefinable, and the differences in height defy all natural law. I was mostly satisfied with the search and height maps, but I just whipped up the LUM map and gave up.

I'll post the various entrance and trigger coordinates and TP2 code in a followup.
« Last Edit: January 25, 2006, 06:42:31 PM by devSin »

Offline icelus

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 3173
  • Gender: Male
Re: AR1010 restoration
« Reply #11 on: January 24, 2006, 11:12:58 PM »
WinRAR and WinZip don't like the .tbz.  :(
If you can zip it, then that'd be even more spiffy.  If it's a hassle, I can try a more extensive Google search tomorrow to see if I can find a Windows-based untbzizer.  Thanks, all the same.  :)
<Moongaze> Luckily BWL has a very understanding and friendly admin.

Offline devSin

  • Moderator
  • Planewalker
  • *****
  • Posts: 1632
  • Gender: Male
Re: AR1010 restoration
« Reply #12 on: January 24, 2006, 11:33:01 PM »
In AR1008, I add an entrance so that the player can exit AR1010 directly to the surface. AR1010 is a modified version of AR5506, and the same exit takes the player behind Candlekeep; I didn't want to just have the area dead-end at the map edge so I add a travel trigger to AR1010 (the fact that there is no visible exit in AR1008 doesn't bother me). The player can either go back up through AR1009, or can exit the south edge of the map to go up to AR1008 (if they have the cloak, then they will get transported after Wait()).

AR1008: add entrance
Code: [Select]
Name EXIT1010
Location: X 842
Location: Y 307
Orientation SSE (15)

In AR1009, Dezkiel needs to be deleted, the destination area for the Door1010 trigger needs to be set to AR1010, and a new entrance added so the player can get back from AR1010
Code: [Select]
Name EXIT1010
Location: X 697
Location: Y 259
Orientation South (0)

In AR1010, a new trigger needs to be added to allow the player to exit the south edge of the map and return to AR1008
Code: [Select]
Name DOOR1008
Type of point Travel trigger (2)
Bounding box: Left 345
Bounding box: Top 2719
Bounding box: Right 545
Bounding box: Bottom 2815
# vertices 4
First vertex index 4
Cursor frame number 28
Destination area AR1008.ARE
Entrance name EXIT1010
Flag ( Party required(2) )
// For the life of me, I can't figure out what the hell the following two coords do. I just picked a random spot on the map.
Trap location: X 609
Trap location: Y 2643
// Need corresponding vertices
Vertex 0 X: 478,Y: 2719
Vertex 1 X: 545,Y: 2762
Vertex 2 X: 497,Y: 2815
Vertex 3 X: 345,Y: 2815

The TP2 code shouldn't be used as-is (I do *not* code for compatibility), but you should be able to find a CamDawg equivalent on the wiki. Note that I make all the exits in these 3 areas auto-save (I wonder what happens if some party members stay in AR1009 when you have the cloak?); this isn't in the original game and can probably be omitted.
Code: [Select]
COPY_EXISTING AR1008.ARE OVERRIDE
  // make Ar1009 entrance auto-save
  READ_LONG 0x5c trigOff
  READ_BYTE trigOff + 0x60 flag
  WRITE_BYTE trigOff + 0x60 flag | 0x4
  // update num entrances
  READ_LONG 0x6c numEntr
  WRITE_LONG 0x6c numEntr + 0x1
  // add entrance (exit from Ar1010), [842.307] @15
  READ_LONG 0x68 entrOff
  entrOff += numEntr * 0x68
  INSERT_BYTES entrOff 0x68
  WRITE_ASCII entrOff EXIT1010 // entr name
  WRITE_LONG entrOff + 0x20 0x133034a // entr coords
  WRITE_SHORT entrOff + 0x24 0xf // face dir
  // update offsets
  FOR (loc = 0x70; loc < 0xc4; loc = (loc == 0x78) ? 0x7c : (loc == 0x84) ? 0xa0 : (loc == 0xc0) ? 0xbc : loc + 0x8) BEGIN
    READ_LONG loc off
    WRITE_LONG loc off + 0x68
  END
  READ_LONG 0x88 varOff
  WRITE_LONG 0x88 varOff + 0x68

COPY_EXISTING AR1009.ARE OVERRIDE
  // update entr offset while I'm here
  READ_LONG 0x68 entrOff
  WRITE_LONG 0x68 entrOff - 0x110
  // update num entrance
  READ_LONG 0x6c numEntr
  WRITE_LONG 0x6c numEntr + 0x1
  // add entrance (exit from Ar1010), [697.259] @0
  entrOff += numEntr * 0x68
  INSERT_BYTES entrOff 0x68
  WRITE_ASCII entrOff EXIT1010 // entr name
  WRITE_LONG entrOff + 0x20 0x10302b9 // entr loc
  // update trigger offset while I'm here
  READ_LONG 0x5c trigOff
  WRITE_LONG 0x5c trigOff - 0x110
  // set Door1010 and Door1008 trans to auto-save
  READ_BYTE trigOff + 0x60 flag
  WRITE_BYTE trigOff + 0x60 flag | 0x4
  READ_BYTE trigOff + 0x124 flag
  WRITE_BYTE trigOff + 0x124 flag | 0x4
  // change Door1010 (trigger 0) to point to AR1010 (was AR1008)
  WRITE_ASCII trigOff + 0x38 AR1010 #8
  // bye bye Dezkiel
  DELETE_BYTES 0x110c 0x110
  // decr num actors
  READ_SHORT 0x58 numAct
  WRITE_SHORT 0x58 numAct - 0x1
  // update offsets
  FOR (loc = 0x70; loc < 0xc4; loc = (loc == 0x78) ? 0x7c : (loc == 0x84) ? 0xa0 : (loc == 0xc0) ? 0xbc : loc + 0x8) BEGIN
    READ_LONG loc off
    WRITE_LONG loc off - 0xa8
  END
  READ_LONG 0x60 spawnOff
  WRITE_LONG 0x60 spawnOff - 0x110
  READ_LONG 0x88 varOff
  WRITE_LONG 0x88 varOff - 0xa8

COPY_EXISTING AR1010.ARE OVERRIDE
  // update num vertex
  READ_SHORT 0x80 numVert
  WRITE_SHORT 0x80 numVert + 0x4
  // add new vertices for new trigger
  READ_LONG 0x7c vertOff
  vertOff += numVert * 0x4
  INSERT_BYTES vertOff 0x10
  WRITE_LONG vertOff 0xa9f01de // x.y 0
  WRITE_LONG vertOff + 0x4 0xaca0221 // x.y 1
  WRITE_LONG vertOff + 0x8 0xaff01f1 // x.y 2
  WRITE_LONG vertOff + 0xc 0xaff0159 // x.y 3
  // update num triggers
  READ_SHORT 0x5a numTrig
  WRITE_SHORT 0x5a numTrig + 0x1
  // make exit to Ar1009 auto-save
  READ_LONG 0x5c trigOff
  READ_BYTE trigOff + 0x60 flag
  WRITE_BYTE trigOff + 0x60 flag | 0x4
  // add new travel trigger for exit to Ar1008
  trigOff += numTrig * 0xc4
  INSERT_BYTES trigOff 0xc4
  WRITE_ASCII trigOff DOOR1008 // trig name
  WRITE_ASCII trigOff + 0x38 AR1008 // trig dest
  WRITE_ASCII trigOff + 0x40 EXIT1010 // trig dest pt name
  WRITE_LONG trigOff + 0x20 0x1590002 // trig type, left coord
  WRITE_LONG trigOff + 0x24 0x2210a9f // top coord, right coord
  WRITE_LONG trigOff + 0x28 0x40aff // num vert, bottom coord
  WRITE_LONG trigOff + 0x2c 0x4 // vertex index
  WRITE_LONG trigOff + 0x34 0x1c // cursor
  WRITE_LONG trigOff + 0x60 0x4 // flags: auto-save
  WRITE_LONG trigOff + 0x70 0xa530261 // what the hell are these coords?
  // update offsets
  FOR (loc = 0x60; loc < 0xbc; loc = ((loc == 0x78) || (loc == 0x84)) ? loc + 0x4 : (loc == 0x88) ? 0xa8 : (loc == 0xa8) ? 0xb8 : loc + 0x8) BEGIN
    READ_LONG loc off
    WRITE_LONG loc off + 0xc4
  END
  READ_LONG 0xa0 regnOff
  WRITE_LONG 0xa0 regnOff + 0xd4
  READ_LONG 0xb0 animOff
  WRITE_LONG 0xb0 animOff + 0xd4
  READ_LONG 0xbc musOff
  WRITE_LONG 0xbc musOff + 0xd4
  READ_LONG 0xc0 restOff
  WRITE_LONG 0xc0 restOff + 0xd4
« Last Edit: January 24, 2006, 11:40:31 PM by devSin »

Offline devSin

  • Moderator
  • Planewalker
  • *****
  • Posts: 1632
  • Gender: Male
Re: AR1010 restoration
« Reply #13 on: January 24, 2006, 11:38:51 PM »
A Zip archive (holy Mary 18.2 MB!). Let me know if that works.

EDIT: I should mention that everything I ever make available that has been authored by me is free for use in any fashion with no restrictions. The stuff here doesn't include Echon's WED, so there aren't any exceptions in this case.
« Last Edit: January 27, 2006, 08:20:21 PM by devSin »

Offline Salk

  • Planewalker
  • *****
  • Posts: 848
Re: AR1010 restoration
« Reply #14 on: January 25, 2006, 02:57:21 AM »
May I suggest a freeware compressor that is much more effective than WinZIP or even WinRAR ? I use 7zip (www.7zip.org) which is open source. Give it a try!  ;)

Offline devSin

  • Moderator
  • Planewalker
  • *****
  • Posts: 1632
  • Gender: Male
Re: AR1010 restoration
« Reply #15 on: January 27, 2006, 10:02:44 AM »
Did the file ever work? I'll be reclaiming the space soon.

In the future, the files are available as a single StuffIt X archive (13.6 MB). This will require a nagware copy of StuffIt for Mac OS X or Windows, and should stay up for at least a little while.
« Last Edit: September 18, 2006, 12:11:56 AM by devSin »

Offline icelus

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 3173
  • Gender: Male
Re: AR1010 restoration
« Reply #16 on: January 27, 2006, 11:09:21 AM »
I did download the file, and I'm more than 50% sure I tested it and it worked.  I will double-check when I get home this evening and let you know. 
<Moongaze> Luckily BWL has a very understanding and friendly admin.

Offline icelus

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 3173
  • Gender: Male
Re: AR1010 restoration
« Reply #17 on: January 27, 2006, 07:57:52 PM »
OK, got it.  What are the .aco files?
<Moongaze> Luckily BWL has a very understanding and friendly admin.

Offline devSin

  • Moderator
  • Planewalker
  • *****
  • Posts: 1632
  • Gender: Male
Re: AR1010 restoration
« Reply #18 on: January 27, 2006, 08:03:41 PM »
Those are the palettes used for height and search maps.

Height Map.aco is the 17-color palette (8-bit) required for height maps.
Search Map.aco is the 16-color palette (8-bit) required for search maps (although the palette is 8-bit, the search map can be saved as a 4-bit (16 color) BMP).

Unless you're making your own height and search maps with Photoshop, or you want to modify mine, you can toss 'em.
« Last Edit: January 27, 2006, 08:12:13 PM by devSin »

Offline icelus

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 3173
  • Gender: Male
Re: AR1010 restoration
« Reply #19 on: January 27, 2006, 08:08:52 PM »
o
<Moongaze> Luckily BWL has a very understanding and friendly admin.

Offline devSin

  • Moderator
  • Planewalker
  • *****
  • Posts: 1632
  • Gender: Male
Re: AR1010 restoration
« Reply #20 on: January 27, 2006, 08:11:06 PM »
And unless you have Photoshop, or an editor capable of working with the document layers, you can chuck the .psd file too. If you're using Mac OS X, or an editor on Windows capable of opening Photoshop documents, and you only want to see a high-resolution image of the actual area, then you can open the .psd file and have a look.

I should specify that only the BMPs are required for Baldur's Gate, and they are finished and can be dropped into override. I freely admit that they're a bit funky, but it corresponds to the funkiness of the area; if you have any questions about how or why I did something, ask away and I'll answer.

Offline devSin

  • Moderator
  • Planewalker
  • *****
  • Posts: 1632
  • Gender: Male
AR1010 hard stuff
« Reply #21 on: January 28, 2006, 11:24:29 PM »
I wanted to get your opinion before doing the other 2 areas.

Do you think the entrances should be marked autosave (dungeons like this in BG1 are always marked autosave, and Player1 could conceivably go to AR1008 with the cloak while other players are still downstairs)? Since a whole new area is added, I think it could be justified.

Do you want to add the exit from AR1010 to AR1008? I don't if you looked at the map yet, but the southern ledge just runs off the edge of the map.

So far, this is the code I have to add the entrance to AR1008 (it should be compatible for everyone; I've entirely commented out the party-required bit)
Code: [Select]
COPY_EXISTING AR1008.ARE OVERRIDE
  PATCH_IF (SOURCE_SIZE > 0x11c) BEGIN
/*
    // Make AR1009 transition party-required
    READ_LONG 0x5c trigOff
    FOR (READ_SHORT 0x5a numTrig; numTrig > 0x0; numTrig -= 0x1) BEGIN
      READ_ASCII trigOff + 0x38 destAre
      PATCH_IF !("%destAre%" STRING_COMPARE_CASE "AR1009") BEGIN
        READ_BYTE trigOff + 0x60 flag
        WRITE_BYTE trigOff + 0x60 flag | 0x4
      END
      trigOff += 0xc4
    END
*/
    // Add new exit point for AR1010
    READ_LONG 0x6c numEntr
    WRITE_LONG 0x6c numEntr + 0x1
    READ_LONG 0x68 entrOff
    entrOff += numEntr * 0x68
    INSERT_BYTES entrOff 0x68
    WRITE_ASCII entrOff EXIT1010   // Entrance name
    WRITE_SHORT entrOff + 0x20 842 // Location X
    WRITE_SHORT entrOff + 0x22 307 // Location Y
    WRITE_SHORT entrOff + 0x24 15  // Facing direction
    READ_LONG 0x70 contOff
    PATCH_IF !(contOff < entrOff) BEGIN
      WRITE_LONG 0x70 contOff + 0x68
    END
    READ_LONG 0x78 itmOff
    PATCH_IF !(itmOff < entrOff) BEGIN
      WRITE_LONG 0x78 itmOff + 0x68
    END
    READ_LONG 0x7c vertOff
    PATCH_IF !(vertOff < entrOff) BEGIN
      WRITE_LONG 0x7c vertOff + 0x68
    END
    READ_LONG 0x84 ambOff
    PATCH_IF !(ambOff < entrOff) BEGIN
      WRITE_LONG 0x84 ambOff + 0x68
    END
    READ_LONG 0x88 varOff
    PATCH_IF !(varOff < entrOff) BEGIN
      WRITE_LONG 0x88 varOff + 0x68
    END
    READ_LONG 0xa0 explOff
    PATCH_IF !(explOff < entrOff) BEGIN
      WRITE_LONG 0xa0 explOff + 0x68
    END
    READ_LONG 0xa8 doorOff
    PATCH_IF !(doorOff < entrOff) BEGIN
      WRITE_LONG 0xa8 doorOff + 0x68
    END
    READ_LONG 0xb0 animOff
    PATCH_IF !(animOff < entrOff) BEGIN
      WRITE_LONG 0xb0 animOff + 0x68
    END
    READ_LONG 0xb8 tobjOff
    PATCH_IF !(tobjOff < entrOff) BEGIN
      WRITE_LONG 0xb8 tobjOff + 0x68
    END
    READ_LONG 0xbc musOff
    PATCH_IF !(musOff < entrOff) BEGIN
      WRITE_LONG 0xbc musOff + 0x68
    END
    READ_LONG 0xc0 rspnOff
    PATCH_IF !(rspnOff < entrOff) BEGIN
      WRITE_LONG 0xc0 rspnOff + 0x68
    END
  END
BUT_ONLY_IF_IT_CHANGES
« Last Edit: January 28, 2006, 11:32:22 PM by devSin »

Offline icelus

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 3173
  • Gender: Male
Re: AR1010 hard stuff
« Reply #22 on: January 28, 2006, 11:47:49 PM »
I wanted to get your opinion before doing the other 2 areas.

Do you think the entrances should be marked autosave (dungeons like this in BG1 are always marked autosave, and Player1 could conceivably go to AR1008 with the cloak while other players are still downstairs)? Since a whole new area is added, I think it could be justified.

Do you want to add the exit from AR1010 to AR1008? I don't if you looked at the map yet, but the southern ledge just runs off the edge of the map.

So far, this is the code I have to add the entrance to AR1008 (it should be compatible for everyone; I've entirely commented out the party-required bit)
I have no problem with the autosave. 

I'm not sure about adding a transition to AR1008.  Wouldn't that make the one exit in AR1008 lead both *to* AR1009 and *from* AR1010?  Granted, I'm probably missing something here...
<Moongaze> Luckily BWL has a very understanding and friendly admin.

Offline devSin

  • Moderator
  • Planewalker
  • *****
  • Posts: 1632
  • Gender: Male
Re: AR1010 hard stuff
« Reply #23 on: January 29, 2006, 12:01:16 AM »
No. What I do is make it so that the player can exit AR1010 from the spot in the first screen, which will take the player to the spot on the second screen. (Actually, it's a shot from 5506, but 1010 is exactly the same; the exit in 5506 takes the player outside the back wall of Candlekeep). There is no way to return to AR1010 from AR1008 (going through the cave will take you only to AR1009); it can be assumed that the passage isn't navigable (or something) from the outside.

If this isn't done, this part of AR1010 just dead-ends at the map edge, and the player has to go back up through AR1009 and then to AR1008. The addition to AR1008 only specifies a destination point that is used when the party travels here from AR1010.
« Last Edit: January 29, 2006, 12:09:22 AM by devSin »

Offline devSin

  • Moderator
  • Planewalker
  • *****
  • Posts: 1632
  • Gender: Male
Re: AR1010 hard stuff
« Reply #24 on: January 29, 2006, 12:05:41 AM »
This is the code required to completely update AR1008 and AR1009 (make transitions auto-save, make second AR1009 exit go to AR1010, and add entrances to AR1008 and AR1009 for travel from AR1010):
Code: [Select]
COPY_EXISTING AR1008.ARE OVERRIDE
              AR1009.ARE OVERRIDE
  PATCH_IF (SOURCE_SIZE > 0x11c) BEGIN
    READ_LONG 0x5c trigOff
    FOR (READ_SHORT 0x5a numTrig; numTrig > 0x0; numTrig -= 0x1) BEGIN
      READ_SHORT trigOff + 0x20 type
      PATCH_IF (type == 0x2) BEGIN
        READ_ASCII trigOff + 0x38 destAre
        PATCH_IF (!("%destAre%" STRING_COMPARE_CASE "AR1008") ||
                  !("%destAre%" STRING_COMPARE_CASE "AR1009")) BEGIN
          READ_BYTE trigOff + 0x60 flag
          WRITE_BYTE trigOff + 0x60 flag | 0x4
        END
      END
      trigOff += 0xc4
    END
    READ_LONG 0x6c numEntr
    WRITE_LONG 0x6c numEntr + 0x1
    READ_LONG 0x68 entrOff
    entrOff += numEntr * 0x68
    INSERT_BYTES entrOff 0x68
    WRITE_ASCII entrOff EXIT1010   // Entrance name
    PATCH_IF !("%SOURCE_RES%" STRING_COMPARE_CASE "AR1008") BEGIN
      WRITE_SHORT entrOff + 0x20 842 // Location X
      WRITE_SHORT entrOff + 0x22 307 // Location Y
      WRITE_SHORT entrOff + 0x24 15  // Facing direction
    END ELSE BEGIN // AR1009 patch
      WRITE_SHORT entrOff + 0x20 697 // Location X
      WRITE_SHORT entrOff + 0x22 259 // Location Y
    END
    READ_LONG 0x54 actOff
    PATCH_IF (actOff > entrOff) BEGIN
      WRITE_LONG 0x54 actOff + 0x68
    END
    READ_LONG 0x5c trigOff
    PATCH_IF (trigOff > entrOff) BEGIN
      WRITE_LONG 0x5c trigOff + 0x68
    END
    READ_LONG 0x60 sptOff
    PATCH_IF (sptOff > entrOff) BEGIN
      WRITE_LONG 0x60 sptOff + 0x68
    END
    READ_LONG 0x68 entrOff
    PATCH_IF (entrOff > entrOff) BEGIN
      WRITE_LONG 0x68 entrOff + 0x68
    END
    READ_LONG 0x70 contOff
    PATCH_IF !(contOff < entrOff) BEGIN
      WRITE_LONG 0x70 contOff + 0x68
    END
    READ_LONG 0x78 itmOff
    PATCH_IF !(itmOff < entrOff) BEGIN
      WRITE_LONG 0x78 itmOff + 0x68
    END
    READ_LONG 0x7c vertOff
    PATCH_IF !(vertOff < entrOff) BEGIN
      WRITE_LONG 0x7c vertOff + 0x68
    END
    READ_LONG 0x84 ambOff
    PATCH_IF !(ambOff < entrOff) BEGIN
      WRITE_LONG 0x84 ambOff + 0x68
    END
    READ_LONG 0x88 varOff
    PATCH_IF !(varOff < entrOff) BEGIN
      WRITE_LONG 0x88 varOff + 0x68
    END
    READ_LONG 0xa0 explOff
    PATCH_IF !(explOff < entrOff) BEGIN
      WRITE_LONG 0xa0 explOff + 0x68
    END
    READ_LONG 0xa8 doorOff
    PATCH_IF !(doorOff < entrOff) BEGIN
      WRITE_LONG 0xa8 doorOff + 0x68
    END
    READ_LONG 0xb0 animOff
    PATCH_IF !(animOff < entrOff) BEGIN
      WRITE_LONG 0xb0 animOff + 0x68
    END
    READ_LONG 0xb8 tobjOff
    PATCH_IF !(tobjOff < entrOff) BEGIN
      WRITE_LONG 0xb8 tobjOff + 0x68
    END
    READ_LONG 0xbc musOff
    PATCH_IF !(musOff < entrOff) BEGIN
      WRITE_LONG 0xbc musOff + 0x68
    END
    READ_LONG 0xc0 rspnOff
    PATCH_IF !(rspnOff < entrOff) BEGIN
      WRITE_LONG 0xc0 rspnOff + 0x68
    END
    READ_LONG 0xc4 mapnOff
    READ_LONG 0xc8 numMapn
    PATCH_IF (!(mapnOff < entrOff) && numMapn) BEGIN
      WRITE_LONG 0xc4 mapnOff + 0x68
    END
  END
BUT_ONLY_IF_IT_CHANGES

COPY AR1009.ARE OVERRIDE
  PATCH_IF (SOURCE_SIZE > 0x11c) BEGIN
    READ_LONG 0x5c trigOff
    FOR (READ_SHORT 0x5a numTrig; numTrig > 0x0; numTrig -= 0x1) BEGIN
      READ_ASCII trigOff name
      PATCH_IF !("%name%" STRING_COMPARE_CASE "DOOR1010") BEGIN
        WRITE_ASCII trigOff + 0x38 AR1010 #8
      END
      trigOff += 0xc4
    END
    READ_SHORT 0x58 numAct
    WRITE_SHORT 0x58 numAct - 0x1
    READ_LONG 0x54 actOff
    FOR (i = numAct; i > 0x0; i -= 0x1) BEGIN
      READ_ASCII actOff + 0x80 char
      PATCH_IF !("%char%" STRING_COMPARE_CASE "DEZKIE") BEGIN
        DELETE_BYTES actOff 0x110
      END ELSE actOff += 0x110
    END
    READ_LONG 0x54 actOff
    PATCH_IF (actOff > actOff) BEGIN
      WRITE_LONG 0x54 actOff - 0x110
    END
    READ_LONG 0x5c trigOff
    PATCH_IF !(trigOff < actOff) BEGIN
      WRITE_LONG 0x5c trigOff - 0x110
    END
    READ_LONG 0x60 sptOff
    PATCH_IF !(sptOff < actOff) BEGIN
      WRITE_LONG 0x60 sptOff - 0x110
    END
    READ_LONG 0x68 entrOff
    PATCH_IF !(entrOff < actOff) BEGIN
      WRITE_LONG 0x68 entrOff - 0x110
    END
    READ_LONG 0x70 contOff
    PATCH_IF !(contOff < actOff) BEGIN
      WRITE_LONG 0x70 contOff - 0x110
    END
    READ_LONG 0x78 itmOff
    PATCH_IF !(itmOff < actOff) BEGIN
      WRITE_LONG 0x78 itmOff - 0x110
    END
    READ_LONG 0x7c vertOff
    PATCH_IF !(vertOff < actOff) BEGIN
      WRITE_LONG 0x7c vertOff - 0x110
    END
    READ_LONG 0x84 ambOff
    PATCH_IF !(ambOff < actOff) BEGIN
      WRITE_LONG 0x84 ambOff - 0x110
    END
    READ_LONG 0x88 varOff
    PATCH_IF !(varOff < actOff) BEGIN
      WRITE_LONG 0x88 varOff - 0x110
    END
    READ_LONG 0xa0 explOff
    PATCH_IF !(explOff < actOff) BEGIN
      WRITE_LONG 0xa0 explOff - 0x110
    END
    READ_LONG 0xa8 doorOff
    PATCH_IF !(doorOff < actOff) BEGIN
      WRITE_LONG 0xa8 doorOff - 0x110
    END
    READ_LONG 0xb0 animOff
    PATCH_IF !(animOff < actOff) BEGIN
      WRITE_LONG 0xb0 animOff - 0x110
    END
    READ_LONG 0xb8 tobjOff
    PATCH_IF !(tobjOff < actOff) BEGIN
      WRITE_LONG 0xb8 tobjOff - 0x110
    END
    READ_LONG 0xbc musOff
    PATCH_IF !(musOff < actOff) BEGIN
      WRITE_LONG 0xbc musOff - 0x110
    END
    READ_LONG 0xc0 rspnOff
    PATCH_IF !(rspnOff < actOff) BEGIN
      WRITE_LONG 0xc0 rspnOff - 0x110
    END
    READ_LONG 0xc4 mapnOff
    READ_LONG 0xc8 numMapn
    PATCH_IF (!(mapnOff < actOff) && numMapn) BEGIN
      WRITE_LONG 0xc4 mapnOff - 0x110
    END
  END
BUT_ONLY_IF_IT_CHANGES

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: