jastey Posted March 21, 2017 Share Posted March 21, 2017 For Gavin BG1, in Ulgoth's Beard the Door to the house (AR1007.are) should be unlocked. The area script of the main area (AR1000.bcs) runs the block: /* Unlocking the door to the Mor home */ IF AreaCheck("%UlgothsBeard%") Global("B!UnlockDoor","GLOBAL",0) THEN RESPONSE #100 Unlock("Door1007") SetGlobal("B!UnlockDoor","GLOBAL",1) END Variable "B!UnlockDoor" is set to "1", when I look with NI at door Door1007 it says "no flags set" (i.e. not locked), but when I try the door in the game (new game, never been to the area, mod is installed), the door is locked and I need thieving skills to unlock it. Did I miss something obvious? Link to comment
Roxanne Posted March 21, 2017 Share Posted March 21, 2017 For Gavin BG1, in Ulgoth's Beard the Door to the house (AR1007.are) should be unlocked. The area script of the main area (AR1000.bcs) runs the block: /* Unlocking the door to the Mor home */ IF AreaCheck("%UlgothsBeard%") Global("B!UnlockDoor","GLOBAL",0) THEN RESPONSE #100 Unlock("Door1007") SetGlobal("B!UnlockDoor","GLOBAL",1) END Variable "B!UnlockDoor" is set to "1", when I look with NI at door Door1007 it says "no flags set" (i.e. not locked), but when I try the door in the game (new game, never been to the area, mod is installed), the door is locked and I need thieving skills to unlock it. Did I miss something obvious? Not obvious - took me a bit to find it. There are two objects Door1007 in the area (Door itself and travel trigger). I renamed the door to Dor1007 and IF AreaCheck("%UlgothsBeard%") Global("B!UnlockDoor","GLOBAL",0) THEN RESPONSE #100 Unlock("Dor1007") SetGlobal("B!UnlockDoor","GLOBAL",1) END And it works. You need to test yourself as I did that on an EET install in BG1000. Anyway, EET without this change has the same issue. PS - at least in EET it is pointless nevertheless as the parents are not spawned? Link to comment
jastey Posted March 21, 2017 Author Share Posted March 21, 2017 Thank you! I will try it out. EDIT: What do you man with remaned the door? The parents will be spawned in v10, as will the door unlock be fixed. Hopefully. Link to comment
Roxanne Posted March 21, 2017 Share Posted March 21, 2017 Thank you! I will try it out. EDIT: What do you man with remaned the door? The parents will be spawned in v10, as will the door unlock be fixed. Hopefully. Rename the door means change the attributes for *Name* and *Door ID* in Door4 object in the are-file. (offset 415c and 417c). But... As it means that you will need to change something in the are-file anyway, you might as well consider to change the flags of that door to unlocked right away and skip the script? Link to comment
jastey Posted March 21, 2017 Author Share Posted March 21, 2017 That would be the same effort, yes. How would I change the flags of the door with weidu? Link to comment
Roxanne Posted March 21, 2017 Share Posted March 21, 2017 COPY_EXISTING ~bg1000.are~ ~override~ //you may want something like "%UlgothsBeard%.are?WRITE_LONG 0x4184 0 BUT_ONLY Link to comment
jastey Posted March 21, 2017 Author Share Posted March 21, 2017 That worked like a charm! Thanks! Only I noticed that for bgt, the hex offset of that door is different. Can I assume the offset of the door will always be the same for all bgt installs? (Or maybe for bgt the script worked - I'll have to check that.) Link to comment
Roxanne Posted March 21, 2017 Share Posted March 21, 2017 That worked like a charm! Thanks! Only I noticed that for bgt, the hex offset of that door is different. Can I assume the offset of the door will always be the same for all bgt installs? (Or maybe for bgt the script worked - I'll have to check that.) In BGT (in different installs) I always have it at 4524. Link to comment
Ardanis Posted March 21, 2017 Share Posted March 21, 2017 If you want to be absolutely certain, then COPY_EXISTING ar1000.are override GET_OFFSET_ARRAY doors 0xa8 4 0xa4 4 0 0 0xc8 PHP_EACH doors AS i => r BEGIN READ_ASCII r+0x20 id (8) PATCH_IF ~%id%~ STRING_EQUAL_CASE ~door1007~ BEGIN WRITE_BYTE r+0x28 THIS `& BIT1 END END BUT_ONLY Link to comment
jastey Posted March 22, 2017 Author Share Posted March 22, 2017 Thank you! This is great, because I need code for all BG1 games, anyway. Thank you both! Link to comment
jastey Posted March 22, 2017 Author Share Posted March 22, 2017 Ardanis: weidu gives me a parse error for the ` in the WRITE_BYTE line, and I don't know enough about this to know whether I should change it to ' or just delete it or what to do to fix it without breaking the are. Link to comment
Gwendolyne Posted March 22, 2017 Share Posted March 22, 2017 If you have problems with typing ` with the keyboard, use this : WRITE_LONG r+0x28 (THIS BAND BNOT BIT1) Link to comment
Ardanis Posted March 22, 2017 Share Posted March 22, 2017 No, it's just me mistyping it as THIS `& BIT1 instead ofTHIS & `BIT1 Link to comment
jastey Posted March 22, 2017 Author Share Posted March 22, 2017 Now it works! Thank you both. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.