Aller au contenu

Photo

Problem with Great Wisdom\Intellegence and spellslots


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

#1
xa0t3k

xa0t3k
  • Members
  • 9 messages

Hello guys.

Anybode to know how to fix bug with Great Wisdom\Intellegence and dissapearing bonus spellslots?
Example:
Cleric 40 level.
Base Wisdom = 15
Wisdom from epic feats = 7
Final Wisdom == 22
After relog on server, character doesn't have memorized spells on 6-9 levels, they totally dissapear from spellbook. Same situation with bonus spellslots on lower spell levels.
I trying use funcs RestoreReadySpells/GetAllMemorizedSpells from nwnx_funcs in OnClientEnter/OnClientLeave but it doesn't fix problem.



#2
MagicalMaster

MagicalMaster
  • Members
  • 2 002 messages

After relog on server, character doesn't have memorized spells on 6-9 levels, they totally dissapear from spellbook.

 

That sounds like it's not a bonus spellslots problem but rather the game considers the character to only have 15 Wisdom and thus the character can't have any level 6+ spells memorized.  There might also be a bonus spell slots issue on top of that, though.



#3
xa0t3k

xa0t3k
  • Members
  • 9 messages

Yes, you right. But when i fill 6+ level spellslots and rest, i can cast these memorized spells. Bug occurs only on login on server.



#4
Shadooow

Shadooow
  • Members
  • 4 470 messages

are we talking here about server running on windows or linux? because I havent seen this issue on windows...



#5
xa0t3k

xa0t3k
  • Members
  • 9 messages

linux

Plugins:

NWNX2lib: org SetString() at 81f41b4, new SetString() at f77a9365
NWNX2lib: org GetObj() at 81f40bc, new GetObj() at f77a938c
* Parsing configuration...
NWN Extender v2.8-dev
© 2004 by the APS/NWNX Linux Conversion Group
© 2007-2010 by virusman and Acaos
Based on the Win32 version © 2003 by Ingmar Stieger (Papillon)
and Jeroen Broekhuizen
visit us at http://www.avlis.org

* Searching for signatures...
* Loading modules...
TMI plugin registered.
FUNCS plugin registered.
FIXES plugin registered.
RESETPLUGIN plugin registered.
OPTIMIZATIONS plugin registered.
WEAPONS plugin registered.
SPELLS plugin registered.
FUNCSEXT plugin registered.
SYSTEM plugin registered.
EXTEND plugin registered.
TWEAKS plugin registered.
STRUCTS plugin registered.
DEFENSES plugin registered.
FUNCTIONS plugin registered.
ODBC plugin registered.
 



#6
Shadooow

Shadooow
  • Members
  • 4 470 messages

well this is known bug on linux server, afaik nobody fixed it yet

 

it might be possible to workaround it via the method youve tried though, maybe you did some mistake in the script?



#7
xa0t3k

xa0t3k
  • Members
  • 9 messages

The script is simple.

ModEnter

string sSpells = GetLocalString(GetModule(), "spellbook_"+IntToString(GetPCPersistentID(oPC)));
RestoreReadySpells(oPC, sSpells);

ModExit

SetLocalString(GetModule(), "spellbook_"+IntToString(GetPCPersistentID(oPC)), GetAllMemorizedSpells(oPC));


#8
kalbaern

kalbaern
  • Members
  • 824 messages

I've seen this on both Windows and Linux Servers myself.

 

The bonuses granted by feats act a lot like the bonuses from equipped items. In both cases, as you log in, initially the bonuses aren't applied. Sometime during loading, your feat bonuses are restored, followed by bonuses for equipped items.

 

Unlike equipment bonuses however, if you log in and out and the server hasn't been reset, your feat bonuses should remain. Its only after a server reset they need reapplied.



#9
xa0t3k

xa0t3k
  • Members
  • 9 messages

Also, my server settings

Enforce Legal Characters=1
ItemLevelRestrictions=1
Restore Spell Uses On Login=0


#10
meaglyn

meaglyn
  • Members
  • 809 messages

Saving it as a local variable to the module won't help in a server reset. You want to save it however you are saving persistent vars for the PC I'd think. Second, you might try delaying the RestoreReadySpells(oPC, sSpells); a couple of seconds to make sure the PC has completed entering the module since we seem not to know exactly when the engine is clearing the "invalid" spell slots.

 

I bet this is caused by enforce legal characters...



#11
MrZork

MrZork
  • Members
  • 940 messages
I have heard this is an artifact of ELC as well. Has there been confirmation of that? It's a constant problem on a server I frequent (not running NWNX) where I play many casters and often forget which spells I intended a particular caster to have in those cleared slots.

BTW, I think it's also an issue when simply re-logging a character. Even when there has not been a server reset, my toons will have cleared slots if they log and come back.

(These days, I rely on a python-calling-letoscript script that prints out the current spell slot assignments of a local vault character. When I make any significant changes to a character's spell book, I save the toon, run my script, and then paste the results in his journal so that I have it handy in-game to repopulate the slots.)

Anyway, is there any possibility of a fix to this that doesn't involve NWNX? Maybe a scripted ELC would get around the issue?

#12
Shadooow

Shadooow
  • Members
  • 4 470 messages

I have heard this is an artifact of ELC as well. Has there been confirmation of that? It's a constant problem on a server I frequent (not running NWNX) where I play many casters and often forget which spells I intended a particular caster to have in those cleared slots.

I dont think so but I cant proof otherwise

 

BTW, I think it's also an issue when simply re-logging a character. Even when there has not been a server reset, my toons will have cleared slots if they log and come back.

yes it does bugs even with just relog

 

Anyway, is there any possibility of a fix to this that doesn't involve NWNX? Maybe a scripted ELC would get around the issue?

If ELC is issue then custom ELC could be a fix, but I dont think so...



#13
xa0t3k

xa0t3k
  • Members
  • 9 messages

With ELC off, bug doesn't appear.

BTW i solved this problem by using nwnx_funcs(GetMaxSpellSlots(), SetMemorizedSpell(), GetMemorizedSpell()) and nwnx_odbc.

Also, i found another bug, in GetMemorizedSpell(), it doesn't save cleric domain flag. If anyone need fix for that i can share.



#14
_Guile

_Guile
  • Members
  • 685 messages
You could try applying a stat bonus (temporarily) on client enter (do it at the very first as they enter the module), this may do the trick.. (I dunno though)

I've seen quite a few bugs that present this problem, especially where shifters are concerned, spell slots disappear when gear is removed when they shift, so again, the only real solution is a temporary stat bump, like +12 to all stats and remove after a delay (via nwnx_funcs.dll plugin using nwnx2)....

#15
MrZork

MrZork
  • Members
  • 940 messages
First, I want to confirm that it appears that ELC is involved in this. With ELC enabled, my test wizard with Great Intelligence feats has spells from the slots due to the greater INT cleared. With ELC disabled, the slots are not cleared.

The stat bump approach doesn't work easily for shifters who lose spell slots due to unequiped/re-equiped WIS bonus items (or other spellcasting stat bonus items if the shifter is also an arcane caster). It's an incomplete solution even for that issue, since the PC will have those slots cleared when he unshifts as well, which is pretty much just as bad, since he wasn't doing much casting while shifted anyway. A stat bump that lasts for the whole shift might work. But, without a lot of care, it would end up capping the wisdom of toons who don't wouldn't have otherwise had it capped (potentially a big deal for toons with monk levels or shape abilities whose DC benefits from wisdom). Sadly, Bioware didn't provide an OnUnshift event, so we can't also add the stat bump when the toon is unshifting. And, stat bumps don't address the issue of bonus spell slot items.

Regardless of it's impact on shifting, a stat bump doesn't help much with slots cleared on PC entry for many toons because the temporary stat bump is still subject to the +12 cap. So, PCs with +12 worth of gear (which will be many epic toons, even on mid-magic modules) are already capped (and will see no added bump from the temp stat boost) and will still have the slots from the Great * feats cleared (since those aren't part of the cap).

Part of the problem here is that Bioware didn't give us a bonus spell slot effect. That way, we could give bonus slots as a temp effect while running ELC (or during OnClientLeave or whatever) and the extra slots would hold the spells until the Great * feats were re-applied.

A bonus spell slot effect would also help deal with the shifter issue, since a bonus spell slot effect could start with the polymorph effect and would keep the slots from clearing until the toon unshifted. Unfortunately, that might require a heartbeat script to check when the toon is no longer shifted so that the bonus slots effect could be removed. (Just linking the effects may not work, since bonus slot effect would likely go away before the just-unshifted toon got his gear bonuses re-applied.)

However, as best I can tell, ELC either runs before OnClientEnter or ELC unequips gear. I am guessing the former. I think that foils many approaches.

For instance, I wrote some code for the OnClientEnter script to temporarily add the bonus spell slot item properties to something the toon is wearing (the chest item was default). To be honest, this is the approach I thought would be the easiest to get working (or at least to try). But, no dice. The script runs, but the toon still has spell slots cleared. I don't know much about how the mechanics of ELC work, but it seems to have run before OnClientEnter. If there is a way to apply an item property to a just-logged PC's gear before ELC runs, then I think that would do the trick. I just don't know how, since it seems the OnClientEnter is too late.

#16
MrZork

MrZork
  • Members
  • 940 messages
Further thought...

An OnClientLeave script that adds bonus spell slots that are then removed when the client enters again may be a workaround here. It would require a bit of bookkeeping, but it might do the job, at least for many cases. (E.g. it won't help with server crashes; there are potential issues with items equipped via UMD whose value goes up too much with the extra spell slot properties; etc.)

#17
WhiZard

WhiZard
  • Members
  • 1 204 messages

Further thought...

An OnClientLeave script that adds bonus spell slots that are then removed when the client enters again may be a workaround here. It would require a bit of bookkeeping, but it might do the job, at least for many cases. (E.g. it won't help with server crashes; there are potential issues with items equipped via UMD whose value goes up too much with the extra spell slot properties; etc.)

 

But the item(s) with the bonus spell slots would need to be equipped when the player enters.  So the item property will not be able to continuously hold from OnClientLeave to OnClientEnter.



#18
Shadooow

Shadooow
  • Members
  • 4 470 messages

...

Ok so first, there is and OnPolymorph event. I posted a way how to determine it without NWNX on these forums. Also there is a NWNX plugin that offers this event. And this scripted event is now part of my new polymorph engine presented in community patch 1.72. This fixes basically every single issue with polymorph including losing spell slots and even those coming from items that are not merged (items with bonus spell slot or stat ability) and it also allows to dynamically modify the merging system without need to recompile all polymorph scripts since merging is done in the OnPolymorph event (which has prepolymorph,polymorph,repolymorph and unpolymorph event cases).

 

Maybe, just maybe look at my work and dont judge it based on what The Krit said about it. I find it quite annoying when ppls are discussing bugs and issues here that I fixed 4 years ago already.


  • henesua aime ceci

#19
MrZork

MrZork
  • Members
  • 940 messages
It sounds like your polymorph system is an improvement. Being able to easily register the polymorph events you mention would certainly allow many ways to deal with the spell slot clearing issue (and many others) in polymorphing.

I don't know that that is a fix for the actual issue the OP discusses in this thread (ELC clearing spell slots from Great * ability feats), but it's good to hear of another solution to the polymorph issue.
 

Maybe, just maybe look at my work and dont judge it based on what The Krit said about it. I find it quite annoying when ppls are discussing bugs and issues here that I fixed 4 years ago already.


I don't know where any of this comes from. I have no idea what issues The Krit has with your patch. I have never seen him here discussing it. The only potential thing I have heard here about the CPP that concerns me involves changes to the spell system (how Empower works, how certain spells work, etc.) that are more design decisions (e.g. bringing things into alignment with some version of PnP mechanics) than bug fixes. And, anything I read about that is likely old information.

Anyway, it serves little constructive purpose for you to assume that those unaware of some feature of your work must be unaware because they are judging it based on some critique you perceive as unfair.

#20
MagicalMaster

MagicalMaster
  • Members
  • 2 002 messages

(how Empower works, how certain spells work, etc.) that are more design decisions

 

In all fairness, it seems he reverted Empower to work correctly with the option to make it work with his version of it.  Presumably he still prevents Regeneration from stacking, though, and possibly some other stuff that falls into this category, not sure.



#21
MrZork

MrZork
  • Members
  • 940 messages
I am glad to here that. As I said, my information is old.

The real point (which I admittedly never quite got to) was to give a little helpful bit of marketing advice. The advice was: If one is promoting any project with new content and systems for the game, IMO it's best not to go around implying that people aren't using it because of some attempt to besmirch the project or oneself. I.e., it's useful to say, "My project addresses this issue in a flexible way. It does X, Y, and Z by default and gives the user the options to do X', Y', and Z'." It's less useful to say, "I solved this long ago and people like you aren't using my system because you believe some well-known guy who is against me." The first comes across as helpful. The second has a whiff of "people are out to get me" to it, which, true or not, isn't getting people to try out the project.