AstroBryGuy Posted August 2, 2015 Share Posted August 2, 2015 Hi Domi, I know IWDNPC2 is no longer supported, but I wanted to post up an error I found in Diriel's script. That way, others can make a fix before installing. It's in P#DIRIE1.BAF, starting at line 1134 (in the Elven PC talks section, "prologue or later" subsection). The script block trigger has only one condition following an OR(2). I just removed the OR(2) from the trigger. IF InParty("Diriel") !Dead("Diriel") !StateCheck("Diriel",STATE_SLEEPING) IsPlayerNumber("charbase",1) GlobalTimerExpired("P#DirielPCTalkTimer","GLOBAL") !AnyPCSeesEnemy() GlobalTimerExpired("P#AllTimer","GLOBAL") Global("P#DirielELFMatch","GLOBAL",1) OR(2) Global("P#DirielPCTalk","GLOBAL",1) THEN RESPONSE #100 IncrementGlobal("P#DirielPCTalk","GLOBAL",1) SetGlobalTimer("P#DirielPCTalkTimer","GLOBAL",1) SetGlobalTimer("P#AllTimer","GLOBAL",1800) SetMusic(9,0) PlaySound("diri000") ActionOverride("diriel",StartDialogueNoSet(Player1)) END Also, the version of sox bundled with v5 for audio processing on OSX is REALLY old (like 13 years old). It's so old, it doesn't run on modern Macs, (which use Intel chips instead PowerPC). It's simple enough to replace by the user, but I'd be happy to make a new OSX bundle with an updated sox. Link to comment
cmorgan Posted August 3, 2015 Share Posted August 3, 2015 I just found the same mistake in one of the OH files on 1.3 of BG2:EE - an OR(2) with only one var afterwards Link to comment
AstroBryGuy Posted August 3, 2015 Author Share Posted August 3, 2015 Another note - this is probably not an error in IWD2NPC, but rather a problem for NearInfinity. I noticed that some of the Dead() checks in IWD2NPC are checking on the Actor name from the ARE file, not the death variable in the CRE. I notice that the game scripts do this too, so I assume this an IWD2 improvement to the Dead() trigger (useful one too!). NearInfinity, however, is choking on Dead() checks where the name being checked contains a space, e.g. ~Dead("Snow Leopard")~. So, I can't browse the modified DPLAYER3.BCS in NearInfinity. I'll report it to Argent77 as a bug for NearInfinity, since WeiDU doesn't appear to have any problems compiling/decompiling such scripts. EDIT: Ah, looking at TRIGGER.iDS in IWD2 shows that they changed Dead() from checking only on S:Name to an Object check. Very useful. Also, the IESDP is wrong, it lists Dead() as still being a S:Name check. Link to comment
lynx Posted August 3, 2015 Share Posted August 3, 2015 I notice that the game scripts do this too Do you have an example handy? Link to comment
AstroBryGuy Posted August 3, 2015 Author Share Posted August 3, 2015 Sure. This is from 1200T07M.BCS: IF ActionListEmpty() Dead("07_Goblin_Elite_01") THEN RESPONSE #100 ChangeCurrentScript("00aMvW") END IF !IsScriptName("07_Goblin_Elite_01",Myself) THEN RESPONSE #100 MoveToObjectFollow("07_Goblin_Elite_01") END IF Global("ML_0","LOCALS",0) IsScriptName("07_Goblin_Elite_01",Myself) !TimerActive(19) THEN RESPONSE #100 StartTimer(19,5) SetGlobal("ML_0","LOCALS",1) END "07_Goblin_Elite_01" is the Name for Actor 94 in AR1200.ARE. The CRE is 12GobE.CRE, which has a death variable of 12GobE. The script is using the Name from the Actor structure as the script name, rather than the CRE death variable. Link to comment
argent77 Posted August 3, 2015 Share Posted August 3, 2015 I noticed that some of the Dead() checks in IWD2NPC are checking on the Actor name from the ARE file, not the death variable in the CRE. I notice that the game scripts do this too, so I assume this an IWD2 improvement to the Dead() trigger (useful one too!). NearInfinity, however, is choking on Dead() checks where the name being checked contains a space, e.g. ~Dead("Snow Leopard")~. So, I can't browse the modified DPLAYER3.BCS in NearInfinity. I'll report it to Argent77 as a bug for NearInfinity, since WeiDU doesn't appear to have any problems compiling/decompiling such scripts. It's a know problem of NI's script compiler and probably as old as Near Infinity itself. The decompiler is an ancient piece of code and it's very difficult to add any kind of more sophisticated parsing mechanism without completely rewriting the compiler. For now you'll have to avoid using spaces in object names if you want to open the script in NI. The warning messages for creature names based on ARE Actor entries are harmless. They are generated by NI's script name lookup feature. To avoid these warning messages you could uncheck Options -> "Interactive script names" to disable script name lookups altogether. Link to comment
AstroBryGuy Posted August 3, 2015 Author Share Posted August 3, 2015 Good to know, Argent77.FYI, IWD2 does not have a DIFFLEVL.IDS file, but NI can't decompile three scripts in IWD2 without it. The scripts are 40INVIS1, 41PARENA, and 61IZBEL2. I think it's due to those scripts using the Difficulty() trigger. They are the only scripts to use it in IWD2 (unmodded). Adding the file DIFFLEVL.IDS from Camdawg's IWD1 Fixpack to override lets NI decompile the scripts. WeiDU (v238) has an issue doing DECOMPILE_AND_PATCH on these files without DIFFLEVL.IDS too. So, anyone looking to mod IWD2 or use NI should add that file to their override. Searched for: Difficulty( Number of hits: 10 File: 40INVIS1.BCS Text: Difficulty(NORMAL,GREATER_THAN) Line: 65 File: 41PARENA.BCS Text: Difficulty(EASIEST,EQUAL) Line: 232 File: 41PARENA.BCS Text: Difficulty(EASY,EQUAL) Line: 241 File: 41PARENA.BCS Text: Difficulty(HARD,EQUAL) Line: 250 File: 41PARENA.BCS Text: Difficulty(HARDEST,EQUAL) Line: 259 File: 61IZBEL2.BCS Text: Difficulty(EASIEST,EQUAL) Line: 66 File: 61IZBEL2.BCS Text: Difficulty(EASY,EQUAL) Line: 76 File: 61IZBEL2.BCS Text: Difficulty(NORMAL,EQUAL) Line: 86 File: 61IZBEL2.BCS Text: Difficulty(HARD,EQUAL) Line: 96 File: 61IZBEL2.BCS Text: Difficulty(HARDEST,EQUAL) Line: 106 Link to comment
argent77 Posted August 3, 2015 Share Posted August 3, 2015 FYI, IWD2 does not have a DIFFLEVL.IDS file, but NI can't decompile three scripts in IWD2 without it. The scripts are 40INVIS1, 41PARENA, and 61IZBEL2. I think it's due to those scripts using the Difficulty() trigger. They are the only scripts to use it in IWD2 (unmodded). Adding the file DIFFLEVL.IDS from Camdawg's IWD1 Fixpack to override lets NI decompile the scripts. WeiDU (v238) has an issue doing DECOMPILE_AND_PATCH on these files without DIFFLEVL.IDS too. So, anyone looking to mod IWD2 or use NI should add that file to their override. The problem lies in the game resources themselves. More specifically, entries in TRIGGER.IDS, such as this 0x40AB Difficulty(I:Level*DiffLevl,I:Mode*diffmode) tell the compiler to look up symbolic values in DIFFLEVL.IDS for the first parameter. Fixpacks should either provide a DIFFLEVEL.IDS or remove "DiffLevl" from trigger definitions to fix this issue. Link to comment
AstroBryGuy Posted August 3, 2015 Author Share Posted August 3, 2015 Thanks. I've made the suggestion over at SHS for the DIFFLEVL.IDS file to be added to Almateria's IWD2 Fixpack. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.