Hi! I have a pretty specific need for a code that would allow me to add a key to an existing set of doors, which, as far as I know, would be editing the 0x78 part of a specific door in game. However, I've learned my lesson about raw editing. Plus, it's a pain in the ass to manually count all the stuff. So I tried repurposing the gifted code for adding stuff to worldmaps... only to get stumped by the part of .are files that define vertices. Could anybody help me, please?

Code for changing door settings in .are files
#1
Posted 25 May 2014 - 03:35 PM
Actual stuff: Almateria's Restoration Project | Icewind Dale 2 Fixpack + Restorations
Skips: Hell Recollection | Fake Import Mod
Assorted tweaks from when I was 14: Alma Tweaks (macOS)
#2
Posted 25 May 2014 - 03:44 PM
Because from what I know it should be something like
(OUTER_SET every part's length)
COPY_EXISTING
READ_LONG all the counts and offsets, including vertices/bitmask which works in a weird way
and then it's magic.
Actual stuff: Almateria's Restoration Project | Icewind Dale 2 Fixpack + Restorations
Skips: Hell Recollection | Fake Import Mod
Assorted tweaks from when I was 14: Alma Tweaks (macOS)
#3
Posted 26 May 2014 - 06:22 AM
I managed to make a working one! It's
OUTER_SET doors_length = 0xc8 COPY_EXISTING ar0500.are override READ_LONG 0xa4 doors_count READ_LONG 0xa8 doors_offset FOR (i = 0; i < doors_count; ++i) BEGIN current_doors_offset = doors_offset + i * doors_length READ_ASCII current_doors_offset doors_name PATCH_IF "%doors_name%" STRING_EQUAL_CASE door0507 BEGIN WRITE_ASCIIE current_doors_offset + 0x78 misc5i #8 END END BUT_ONLYif people care
Actual stuff: Almateria's Restoration Project | Icewind Dale 2 Fixpack + Restorations
Skips: Hell Recollection | Fake Import Mod
Assorted tweaks from when I was 14: Alma Tweaks (macOS)
#4
Posted 26 May 2014 - 07:26 AM
COPY_EXISTING ar0500.are override LPF ALTER_AREA_DOOR STR_VAR door_name = "door0507" door_key = "misc5i" END BUT_ONLY
would have saved you a lot of time.
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.
#5
Posted 26 May 2014 - 08:54 AM
Huh, that... really is easier, thanks. At least I can say I know how to write higher-level weidu code.
Also, I don't know who's taking care of weidu now, but I found a bug: putting SET_WEIGHT and REPLACE_STATE_TRIGGER in the same .d file fill cause the R_S_T to be ignored.
Actual stuff: Almateria's Restoration Project | Icewind Dale 2 Fixpack + Restorations
Skips: Hell Recollection | Fake Import Mod
Assorted tweaks from when I was 14: Alma Tweaks (macOS)
#6
Posted 26 May 2014 - 10:29 AM
Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit).
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.
#7
Posted 26 May 2014 - 10:50 AM
Actual stuff: Almateria's Restoration Project | Icewind Dale 2 Fixpack + Restorations
Skips: Hell Recollection | Fake Import Mod
Assorted tweaks from when I was 14: Alma Tweaks (macOS)
#8
Posted 26 May 2014 - 11:18 AM
I'm a vegetarian, but I'll take a look at it anyway.
#9
Posted 26 May 2014 - 01:28 PM
Bleh. Until WeiDU 237, you can give the filename to SET_WEIGHT in uppercase.