Jump to content

Photo

IWDification Returns with a Shiny New Beta


51 replies to this topic

#31 Luke

Luke
  • Members
  • 172 posts
  • Gender:Male

Posted 23 August 2018 - 12:25 AM

 

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 by Luke, 23 August 2018 - 12:29 AM.


#32 Luke

Luke
  • Members
  • 172 posts
  • Gender:Male

Posted 23 September 2018 - 11:43 PM

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 by Luke, 24 September 2018 - 12:27 AM.


#33 ALIENQuake

ALIENQuake
  • Modders
  • 609 posts
  • Gender:Male
  • Location:Poland

Posted 24 September 2018 - 01:31 AM

 

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?



#34 subtledoctor

subtledoctor
  • Modders
  • 2731 posts
  • Gender:Male

Posted 24 September 2018 - 03:46 AM

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.

Faiths & Powers: Spell spheres and kit pack for priests and paladins
Might & Guile: Tweaks and kits for warriors and rogues
Scales of Balance: Game tweaks and rule overhauls
NPC_EE: More options for NPCs in BGEE, SoD, & BG2EE


#35 Luke

Luke
  • Members
  • 172 posts
  • Gender:Male

Posted 24 September 2018 - 04:08 AM

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........

#36 Luke

Luke
  • Members
  • 172 posts
  • Gender:Male

Posted 24 September 2018 - 04:56 AM


 


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?

#37 ALIENQuake

ALIENQuake
  • Modders
  • 609 posts
  • Gender:Male
  • Location:Poland

Posted 24 September 2018 - 05:00 AM

 

 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 by ALIENQuake, 24 September 2018 - 05:18 AM.


#38 subtledoctor

subtledoctor
  • Modders
  • 2731 posts
  • Gender:Male

Posted 24 September 2018 - 05:37 AM

 

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....=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 by subtledoctor, 24 September 2018 - 05:39 AM.

Faiths & Powers: Spell spheres and kit pack for priests and paladins
Might & Guile: Tweaks and kits for warriors and rogues
Scales of Balance: Game tweaks and rule overhauls
NPC_EE: More options for NPCs in BGEE, SoD, & BG2EE


#39 Luke

Luke
  • Members
  • 172 posts
  • Gender:Male

Posted 24 September 2018 - 05:58 AM


 

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 by Luke, 24 September 2018 - 06:03 AM.


#40 subtledoctor

subtledoctor
  • Modders
  • 2731 posts
  • Gender:Male

Posted 24 September 2018 - 06:17 AM

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 by subtledoctor, 24 September 2018 - 06:18 AM.

Faiths & Powers: Spell spheres and kit pack for priests and paladins
Might & Guile: Tweaks and kits for warriors and rogues
Scales of Balance: Game tweaks and rule overhauls
NPC_EE: More options for NPCs in BGEE, SoD, & BG2EE


#41 Luke

Luke
  • Members
  • 172 posts
  • Gender:Male

Posted 24 September 2018 - 07:36 AM

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:

Spoiler


#42 subtledoctor

subtledoctor
  • Modders
  • 2731 posts
  • Gender:Male

Posted 24 September 2018 - 07:53 AM


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 by subtledoctor, 24 September 2018 - 07:53 AM.

Faiths & Powers: Spell spheres and kit pack for priests and paladins
Might & Guile: Tweaks and kits for warriors and rogues
Scales of Balance: Game tweaks and rule overhauls
NPC_EE: More options for NPCs in BGEE, SoD, & BG2EE


#43 Luke

Luke
  • Members
  • 172 posts
  • Gender:Male

Posted 24 September 2018 - 08:30 AM

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 by Luke, 24 September 2018 - 08:31 AM.


#44 subtledoctor

subtledoctor
  • Modders
  • 2731 posts
  • Gender:Male

Posted 24 September 2018 - 09:16 AM

"Small" as in a 1-character difference, and presumably fairly easy to fix.


Faiths & Powers: Spell spheres and kit pack for priests and paladins
Might & Guile: Tweaks and kits for warriors and rogues
Scales of Balance: Game tweaks and rule overhauls
NPC_EE: More options for NPCs in BGEE, SoD, & BG2EE


#45 Luke

Luke
  • Members
  • 172 posts
  • Gender:Male

Posted 25 September 2018 - 12:00 AM

"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 by Luke, 25 September 2018 - 12:00 AM.




Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users