Luke Posted August 23, 2018 Share Posted August 23, 2018 (edited) I don't understand why in your mod (Scales of Balance) you patch both the CLABTHxx tables and the .CRE files with spellstate 252..... Why not just the CLABTHxx tables for example? I mean, if a .CRE is coded as a Thief (or kitted Thief), it should automatically receive the spellstate once it reaches the appropriate level..... They have a "level" stat coded in, but they never level up, and they don't have any CLAB effects applied to them. So for the PC & co., they can get Evasion from the CLAB table. I see, thanks for clarifying. Edited August 23, 2018 by Luke Quote Link to comment
Luke Posted September 24, 2018 Share Posted September 24, 2018 (edited) SCS AI component, notably, does apply CLAB effects to enemy .CRE files. (Sometimes too much, but that's another discussion.) But i don't want to rely on SCS. Fun fact: it seems SCS fails to apply that opcode ---> I mean, everything is fine but the special field: it is set to 0 (IWD mode) instead of 1 (IWD2 mode)........ Guess we need to make a little patch that should go right after SCS........ Edited September 24, 2018 by Luke Quote Link to comment
AL|EN Posted September 24, 2018 Share Posted September 24, 2018 SCS AI component, notably, does apply CLAB effects to enemy .CRE files. (Sometimes too much, but that's another discussion.) But i don't want to rely on SCS. Fun fact: it seems SCS fails to apply that opcode ---> I mean, everything is fine but the special field: it is set to 0 (IWD mode) instead of 1 (IWD2 mode)........ Guess we need to make a little patch that should go right after SCS........ How about a fix in actual code? Quote Link to comment
subtledoctor Posted September 24, 2018 Share Posted September 24, 2018 I don't understand what the claimed failure is. Rather than advocating changes to SCS that we don't totally understand, let's remember that SCS may not intend to do what you're talking about. DavidW is adding changes for v32 that will exclude most or all mod-added kit effects from being applied to enemy .CREs. If a mod wants to add kit effects to enemies, it should do it itself. Quote Link to comment
Luke Posted September 24, 2018 Share Posted September 24, 2018 I don't understand what the claimed failure is. It's really simple: if parameter1 of opcode #328 is set to 252 (EVASION_CHECK), then the special field must be set to 1 (IWD2 mode). The problem is that SCS sets it to 0 and this is not good...... I'm glad to hear the next version will apply only vanilla kit effects to enemy CREs, but for the time being it'd be nice to have a temporary fix........ Quote Link to comment
Luke Posted September 24, 2018 Share Posted September 24, 2018 SCS AI component, notably, does apply CLAB effects to enemy .CRE files. (Sometimes too much, but that's another discussion.) But i don't want to rely on SCS. Fun fact: it seems SCS fails to apply that opcode ---> I mean, everything is fine but the special field: it is set to 0 (IWD mode) instead of 1 (IWD2 mode)........ Guess we need to make a little patch that should go right after SCS........ How about a fix in actual code? Do you mean you have a temporary fix for this issue? Quote Link to comment
AL|EN Posted September 24, 2018 Share Posted September 24, 2018 (edited) How about a fix in actual code? Do you mean you have a temporary fix for this issue? No. But since SCS has github, a competent modder may send such fix as PR. Edited September 24, 2018 by ALIENQuake Quote Link to comment
subtledoctor Posted September 24, 2018 Share Posted September 24, 2018 (edited) I don't understand what the claimed failure is. It's really simple: if parameter1 of opcode #328 is set to 252 (EVASION_CHECK), then the special field must be set to 1 (IWD2 mode). The problem is that SCS sets it to 0 and this is not good...... I'm glad to hear the next version will apply only vanilla kit effects to enemy CREs, but for the time being it'd be nice to have a temporary fix........ I honestly don't understand what the issue is. SCS does not work with IWDEE, and there is no mod that uses opcode 328 to set spellstate 252 for evasion checks. Well - no mod except mine, AFAIK. And my mod gives Evasion to enemy .CRE files directly, without any need for SCS intervention (and it sets the 'Special' field to 1). What am I missing? Did IWDification add this and I didn't hear about it? (It's not in the readme or in the v4/v5 changelog.) Or did you just apply this on your personal install, and you're talking about how SCS handles that? Regardless, in either case, I say again that the best practice is to not rely on SCS, but to simply set the spellstate on enemy .CREs manually. See here for an adaptation of k4thos' macro to identify joniable/non-joinable NPCs: http://gibberlings3.net/forums/index.php?showtopic=28835&p=259193 Then just add this code: LAM JOINABLE_NPC_ARRAYS ACTION_PHP_EACH NON_JOINABLE_NPC_ARRAY AS cre => dv BEGIN COPY_EXISTING ~%cre%~ ~override~ PATCH_IF (SOURCE_SIZE > 0x2d3) BEGIN READ_BYTE 0x234 level_1 READ_BYTE 0x235 level_2 READ_BYTE 0x273 npc_class PATCH_IF (npc_class = 4) OR (npc_class = 9) OR (npc_class = 13) OR (npc_class = 15) BEGIN PATCH_IF (level_1 > 6) OR (level_2 > 6) BEGIN LPF ADD_CRE_EFFECT INT_VAR opcode = 328 target = 1 parameter2 = 252 timing = 9 special = 1 END END END END BUT_ONLY END Edited September 24, 2018 by subtledoctor Quote Link to comment
Luke Posted September 24, 2018 Share Posted September 24, 2018 (edited) I don't understand what the claimed failure is.It's really simple: if parameter1 of opcode #328 is set to 252 (EVASION_CHECK), then the special field must be set to 1 (IWD2 mode). The problem is that SCS sets it to 0 and this is not good...... I'm glad to hear the next version will apply only vanilla kit effects to enemy CREs, but for the time being it'd be nice to have a temporary fix........ Well - no mod except mine, AFAIK. And my mod gives Evasion to enemy .CRE files directly, without any need for SCS intervention (and it sets the 'Special' field to 1). This. I usually install Scales of Balance before SCS. Once SCS is installed, the special field of that opcode is 0 (a bug in 'Smarter general AI' probably........) I quoted you in this thread because we were discussing about how SCS applies kit effects to enemy CREs... Edited September 24, 2018 by Luke Quote Link to comment
subtledoctor Posted September 24, 2018 Share Posted September 24, 2018 (edited) Oh. Does SCS change the effects added by SoB? Or does it (as I hope and expect) add additional 328 effects with special = 0? I guess either case is bad, just to varying degrees. It's probably worth mentioning on the SCS forum, then. People are actively working on it, this is the perfect time to iron out all the bugs we can find. Edited September 24, 2018 by subtledoctor Quote Link to comment
Luke Posted September 24, 2018 Share Posted September 24, 2018 Oh. Does SCS change the effects added by SoB? Or does it (as I hope and expect) add additional 328 effects with special = 0? Nope, SCS does not add a second opcode #328 with special = 0, it modifies the existing one....... Moreover, the same happens if you do not add that opcode to enemy thieves (i.e., if you just add it to the appropriate CLAB tables and comment out the following piece of code: LAM JOINABLE_NPC_ARRAYS ACTION_PHP_EACH NON_JOINABLE_NPC_ARRAY AS cre => dv BEGIN COPY_EXISTING ~%cre%~ ~override~ PATCH_IF (SOURCE_SIZE > 0x2d3) BEGIN READ_BYTE 0x234 level_1 READ_BYTE 0x235 level_2 READ_BYTE 0x273 npc_class PATCH_IF (npc_class = 4) OR (npc_class = 9) OR (npc_class = 13) OR (npc_class = 15) BEGIN PATCH_IF (level_1 > 6) OR (level_2 > 6) BEGIN LPF ADD_CRE_EFFECT INT_VAR opcode = 328 target = 1 parameter2 = 252 timing = 9 special = 1 END END END END BUT_ONLY END Quote Link to comment
subtledoctor Posted September 24, 2018 Share Posted September 24, 2018 (edited) Moreover, the same happens if you do not add that opcode to enemy thieves (i.e., if you just add it to the appropriate CLAB tables: Well yeah - that's what SCS v31 and below is designed to do. I mean, special = 0 is a bug, but it's a very small one. If SCS is messing with CRE effects that I apply manually, on the other hand, that's a much bigger deal. Edited September 24, 2018 by subtledoctor Quote Link to comment
Luke Posted September 24, 2018 Share Posted September 24, 2018 (edited) If SCS is messing with CRE effects that I apply manually, on the other hand, that's a much bigger deal. That seems to be the case: SCS detects a new ability in the CLAB table of Thieves and adds it where appropriate ----> The problem is that the special field is set to 0 instead of 1. Moreover, I don't think this is a small bug: are you sure that opcode works the same? If special is 0, then parameter1 = 252 is (obviously) UNKNOWN.... Edited September 24, 2018 by Luke Quote Link to comment
subtledoctor Posted September 24, 2018 Share Posted September 24, 2018 "Small" as in a 1-character difference, and presumably fairly easy to fix. Quote Link to comment
Luke Posted September 25, 2018 Share Posted September 25, 2018 (edited) "Small" as in a 1-character difference, and presumably fairly easy to fix. This is DavidW's full answer to opcode #328 (in case you missed it in the other thread): "Because SCS's kit-processing system doesn't think to check for the "special" field. (I think that bit of code probably predates any extensive use of the field in the EE.) It's fixable; on the other hand, I'm persuaded by subtledoctor that it's not sensible for compatibility for SCS to try being that broad in its approach to kits, so from v32 I'll be leaving it to other mods to impose their own kit effects if they add them." So: from v32 on, SCS will process only vanilla kit effects and hopefully there will be no more issues like this one...... Edited September 25, 2018 by Luke 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.