Aller au contenu

Photo

Fix for spontaneous caster spell loss when equipping/unequipping CHA gear ?


  • Veuillez vous connecter pour répondre
60 réponses à ce sujet

#51
Shadooow

Shadooow
  • Members
  • 4 465 messages

I tested it with your character you sent me. Its not instant, its with a bit delay but the spell uses are lowered for me. Can you clarify this?

Okay figured it out.

 

Yes its because of my workaround with ability effect bonus. After unpolymorph, while character gets items and their bonuses back but in that moment character will still have the ability effect bonus of the merged charisma which will stack so if its +8 armor, for short ammount of time character will have +12charisma. But once the second +8 charisma bonus is removed, you will lose spell uses unless you have the armor equipped.

 

Basically the only small issue is that if you rest, polymorph, instantly unpolymorph, unequip armor, and instantly equip it back you will not lose any slots.

 

However, in module with equip/unequip event code from CPP (incorporated in x2_mod_def_equ/x2_mod_def_unequ) this won't happen because in this case the OnUnPolymorph event in 70_mod_polymorph is fired 0.1 sec after unpolymorph whereas in modules without this code, the OnUnPolymorph is executed from recurse function that runs every 3 seconds.

 

I guess, I could incorporate NWNX into this my scripted OnPolymorph event, so even if module is not running proper scripts, the OnUnPolymorph will be fired from nwnx plugin. This should make it seamless.



#52
MrZork

MrZork
  • Members
  • 938 messages

The non-disappearing bonus slots after polymorph is not a big deal for most cases (modules with unmodified polymorph spells). It seems like it would be a fairly rare situation when it would occur, given how rare spontaneously casting druid/shifters tend to be. But, it could be an issue if someone uses the flexibility of your improved polymorph system to add merging item properties to Polymorph Self, Tenser's Transformation, or Shapechange. Then, there may be a possibility of an easy exploit. BTW, I tested by resting (with gear) then shifting (with gear) and staying shifted for over a minute, then unshifting and removing gear and waiting for over 10 minutes for the spell slots to disappear (they didn't). So, there may be a longer delay in play somewhere.

 

BTW, vanilla behavior is that feat abilities (including epic spells) can be activated from the quickbar while polymorphed. I have several arcane casters who use this and there are doubtless plenty of druid/shifters who do as well.



#53
Shadooow

Shadooow
  • Members
  • 4 465 messages

The non-disappearing bonus slots after polymorph is not a big deal for most cases (modules with unmodified polymorph spells). It seems like it would be a fairly rare situation when it would occur, given how rare spontaneously casting druid/shifters tend to be. But, it could be an issue if someone uses the flexibility of your improved polymorph system to add merging item properties to Polymorph Self, Tenser's Transformation, or Shapechange. Then, there may be a possibility of an easy exploit. BTW, I tested by resting (with gear) then shifting (with gear) and staying shifted for over a minute, then unshifting and removing gear and waiting for over 10 minutes for the spell slots to disappear (they didn't). So, there may be a longer delay in play somewhere.

 

BTW, vanilla behavior is that feat abilities (including epic spells) can be activated from the quickbar while polymorphed. I have several arcane casters who use this and there are doubtless plenty of druid/shifters who do as well.

Slots: thats weird. You get different behavior again :huh: . Can you check your ability score? I tested your toon, he has 33charisma with +8armor equipped, if I polymorph into bear he still has 33 charisma, when I unshift, for a small delay he has 37charisma but it drops to 33charisma again. Now when I unequip armor he gets 25charisma and I lose some spell uses. Does the charisma bonuse match with what you see in your instance?

 

Epic spells: now I see what you mean, I thought you mean that you can't see the epic spells in spell radial when polymorphed. Thats vanilla behavior. But yes they can be cast from quickslot but doing that in CPP 1.72beta will print "Failed!" and spell is canceled. This is not related to nwnx, but a scripted solution to prevent casting spells in polymorph exploit. I only forgot to give exception on epic spells. Easy to fix, but it will appear in new beta version.



#54
AndrueD

AndrueD
  • Members
  • 134 messages

MrZork say: Secoon doesn't have access to epic spells from the quickbar when shifted. Since they are feats like bard song or summon familiar, I think he should.

 

This is afaik vanilla behavior.

 

I use EMA & EW all times from quickbar wen iron golem or dragon.  Spell icon alway stay on bar b4 shift, while combat then after back to native.  Same for Risen Lord who like to sing nd curse. 



#55
MrZork

MrZork
  • Members
  • 938 messages
Thank you for the epic spells fix. :-)
 
I am not sure what the deal is with the non-disappearing bonus spell slots. I found another interesting tidbit. If the toons shifts and then rests again without the CHA gear on, he still retains the bonus. I am not sure if this will help, but I took a series of screenshots to show what's going on. In each, you can see the character sheet, the PC's inventory, and his quickbar (in which one can determine whether his is losing slots).In the sequence, you can see that, while his charisma updates on the character sheet, his spell slots do not reduce when they should in the quickbar. They never reduce. BTW, I checked and he was able to cast Bigby's Forceful Hand all eight times with his CHA gear removed. So, it isn't just a glitch in the quickbar display.

#56
Shadooow

Shadooow
  • Members
  • 4 465 messages

That makes no sense. I have your savegame, I do exactly that but spell uses are lowered in my game.

 

Can you post log? Maybe I can spot something there.



#57
MrZork

MrZork
  • Members
  • 938 messages
Sure. I wasn't sure which log, so here are two.

The main game log nwclientLog1.txt
Spoiler


nwncx_patch.txt
Spoiler


#58
Shadooow

Shadooow
  • Members
  • 4 465 messages

Nah. I tried everything but my client simply provides different (correct) results. I don't understand it.

 

Also your log again shows some weird behavior where several functions are returing different value than they should (which maybe could be the reason for this problem with spell uses), but it is not happening on my side with same savegame, same plugin and same actions.

 

I will need more testing data. At least one more player testing the same savegame with same plugin and check his results - that would help to find whats different on your side and my side. As long as I can't reproduce the issue I can't fix it.



#59
Shadooow

Shadooow
  • Members
  • 4 465 messages

Tried it on different machine with your save and my plugin and still can't reproduce it. I tried it with latest nwncx_patch.dll but there were no changes to the code on this issue since the version provided in this thread.

 

Anyway, try it maybe with the latest version (link here).



#60
MrZork

MrZork
  • Members
  • 938 messages

Shadooow, sorry I have been away from this for a while. Thank you for posting an updated beta and patches.

 

I tested the epic spell casting from the quickbar. Everything looks good! :-)

 

I tested whether the toon still seemed immune from losing spells by running through the same sequence I outlined above. I am getting the same results.



#61
Shadooow

Shadooow
  • Members
  • 4 465 messages

I tested whether the toon still seemed immune from losing spells by running through the same sequence I outlined above. I am getting the same results.

I tried it on 3 different machines and I still wasn't able to repproduce your behavior. On the other hand, it was same instalation just different PC/OS/override. Makes no sense it would be affected by anything like that though.

 

Expect another player testing it and tell us his results, the only optionss that might help me to found cause of this and fix this would probably be:

- savegames of all those steps you did screenshots of - loading a save game with those 8 spell uses (which didn't happen on my end, might help me)

- remote desktop on your computer

 

BTW, when testing I found anomaly which I wasn't aware of. But that anomaly seems to be happening in vanilla too.

 

I was testing with dwarf wiz/shifter, and casted shapechange. Polymorphing into different race did removed dwarf racial charisma bonus as expected. However, polymorphing into red dragon increased base intelligence by 2, base wisdom by 2 and base charisma by 2 (+2 for lost of racial bonus of dwarf thus by 4). Theres nothing in 2das which would explain this. Do you know anything about this?