jastey Posted November 1, 2017 Share Posted November 1, 2017 Patching ids files is something I'm never sure I do it right. I have BGII-ToB from GOG and if I install my mod the installer says [stateCheck] argument [sTATE_REALLY_DEAD] not found in [state.IDS] I am sure it's an easy patch, but how exactly do I do that in a compatible way? Is there a mod that does all this that I can use as reference? Because, taking the Fixpack code might use to incompatibilities if used by a later-to-install mod. Quote Link to comment
Roxanne Posted November 1, 2017 Share Posted November 1, 2017 (edited) 0x00000FC0 STATE_REALLY_DEAD And it exists in both my EET as well as my old BGT install. But maybe it was added to the classic game already by a mod. I would use in tp2 APPEND ~state.ids~ ~0x00000FC0 STATE_REALLY_DEAD~ UNLESS ~STATE_REALLY_DEAD~ Edited November 1, 2017 by Roxanne Quote Link to comment
Gwendolyne Posted November 1, 2017 Share Posted November 1, 2017 (edited) As far as I can remember, STATE_REALLY_DEAD is not a vanilla state; but many mods add it. The way Roxanne wrote it. Edited November 1, 2017 by Gwendolyne Quote Link to comment
Ardanis Posted November 1, 2017 Share Posted November 1, 2017 Also you don't really need to add it to ids, ~StateCheck(Player2,0xfc0)~ works just as fine. STATE_REALLY_DEAD is just a conveniently named label to group all possible death states. Quote Link to comment
jastey Posted November 1, 2017 Author Share Posted November 1, 2017 That's good to know. Thanks! Quote Link to comment
CamDawg Posted November 1, 2017 Share Posted November 1, 2017 STATE_REALLY_DEAD was originally introduced to Fixpack (I think it was from the Ding0) to fix the exact issue that jastey mentioned in the previous thread. The game had a ton of places where it was trying to use Dead() checks with objects which we had to change to the aforementioned StateChecks instead. It has since migrated its way into a lot of places (like EE), the same way that CD_STATE_NOTVALID has. Quote Link to comment
jastey Posted November 1, 2017 Author Share Posted November 1, 2017 And righfully so! Very cool statechecks. Quote Link to comment
Roxanne Posted November 1, 2017 Share Posted November 1, 2017 (edited) And righfully so! Very cool statechecks. I just recently found an older mod (I think it was Amber NPC I was updating and expanding for EE) that still had the six or seven state checks which were summarised later as CD_STATE_NOTVALID. Just an anecdote off topic... Edited November 1, 2017 by Roxanne Quote Link to comment
Jarno Mikkola Posted November 2, 2017 Share Posted November 2, 2017 (edited) And righfully so! Very cool statechecks. I just recently found an older mod (I think it was Amber NPC I was updating and expanding for EE) that still had the six or seven state checks which were summarised later as CD_STATE_NOTVALID. Just an anecdote off topic... Yeah, and the difference is nothing, as you are still checking for the exact same stuff. In case you didn't notice. Aka, this: !StateCheck(Player2,0xf00) Is the same exact thing as: OR(4) !StateCheck(Player2,0x100) !StateCheck(Player2,0x200) !StateCheck(Player2,0x400) !StateCheck(Player2,0x800) The only benefit is that it might be a little more clear to the eye of the beholder... the computer does the exact same checks in BOTH cases. Edited November 2, 2017 by Jarno Mikkola Quote Link to comment
Angel Posted November 3, 2017 Share Posted November 3, 2017 Aka, this: !StateCheck(Player2,0xf00) Is the same exact thing as: OR(4) !StateCheck(Player2,0x100) !StateCheck(Player2,0x200) !StateCheck(Player2,0x400) !StateCheck(Player2,0x800) The only benefit is that it might be a little more clear to the eye of the beholder... the computer does the exact same checks in BOTH cases. There actually is one advantage: the former will work with older versions of IE that do not implement OR(), like the original BG1 and PST. (IWD1 does have it.) Quote Link to comment
Avenger Posted November 3, 2017 Share Posted November 3, 2017 Less number of triggers also mean less CPU cycle requirements. Your laptop or tablet will spare more battery, and you can't fry eggs on your PC ... Quote Link to comment
Jarno Mikkola Posted November 3, 2017 Share Posted November 3, 2017 (edited) Less number of triggers also mean less CPU cycle requirements. Your laptop or tablet will spare more battery, and you can't fry eggs on your PC ... Are you sure that's the case, withing the game's processes ? Cause the f = 8 + 4 + 2 + 1, aka the exact same thing. Edited November 3, 2017 by Jarno Mikkola Quote Link to comment
Ardanis Posted November 4, 2017 Share Posted November 4, 2017 Calling the trigger once and performing one bitwise operation vs doing both things multiple times. Quote Link to comment
Avenger Posted November 4, 2017 Share Posted November 4, 2017 Less number of triggers also mean less CPU cycle requirements. Your laptop or tablet will spare more battery, and you can't fry eggs on your PC ... Are you sure that's the case, withing the game's processes ? Cause the f = 8 + 4 + 2 + 1, aka the exact same thing. Yeah, as Ardanis said above. Processing a trigger takes a lot of operations. The engine is quite complex inside. And, these triggers are evaluated frequently. Jarno: evaluating those triggers takes about 5x the time than evaluating the combined trigger. Quote Link to comment
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.