Need Two Persistence Functions
#1
Posté 08 août 2012 - 10:50
I need a function that can store remaining spell uses in the database for each character when they leave the server.
I also need a function that can store remaining feat uses in the database for each character when they leave the server.
I am using the Bioware Database with Knat's NBDE installed.
The feat storing fucntions I tried - and scrapped - was generating TOO MANY OPERATIONS error. The spell one seemed to work.
I'm sure someone out there has done this, hopefully without NWNX - which I just don't comprehend.
#2
Posté 08 août 2012 - 11:16
though, it might cause TMI as well - at least it did in my testing with custom spells, easy to fix if you delay each 200 hundred spell ids by milisecond
could be done same way with feats
anyway - found out that the spell uses issue didnt come from the Restore Spell Uses On Login ini option so I returned to that - this issue seems to be linux only engine related.
The remarks with metamagic still applies.
#3
Posté 08 août 2012 - 11:30
#4
Posté 09 août 2012 - 01:10
#5
Posté 09 août 2012 - 10:37
#6
Posté 09 août 2012 - 10:46
I've been doing a lot of reading on MP and I'm simply blown away that the Server Settings in nwnplayer.ini don't have more info available. What is out there tends to be repetitious and only offers minimal information...
Modifié par Pstemarie, 09 août 2012 - 10:47 .
#7
Posté 09 août 2012 - 10:58
see this: http://nwvault.ign.c....Detail&id=6161
btw you know that local variables stored to the item persist server reset? Useful for storing PC-only info so you dont have to write everything into database.
Modifié par ShaDoOoW, 09 août 2012 - 11:01 .
#8
Posté 09 août 2012 - 11:16
When I put in debug strings to list out values on what was being stored all the functions were logging the correct values. However, on reload it was if the variables never existed.
Modifié par Pstemarie, 09 août 2012 - 11:17 .
#9
Posté 09 août 2012 - 11:49
#10
Posté 09 août 2012 - 11:56
#11
Posté 09 août 2012 - 02:39
Modifié par eeriegeek, 09 août 2012 - 02:49 .
#12
Posté 09 août 2012 - 04:47
i have noticed that sometimes the variables are not stored. BUT if you export the character there should be no problem. something to do some testing on....
Modifié par henesua, 09 août 2012 - 04:51 .
#13
Posté 09 août 2012 - 04:56
#14
Posté 09 août 2012 - 05:02
Characters exported and saved by script from within the game keep their variables, as should they when you simply log out, then back in with the same server vault character. "Export", in that case, is simply "save".
#15
Posté 09 août 2012 - 05:17
So yes, this is a small sample, but the level of error is very very small, and may be a fault of my own rather than the PC skin.
Modifié par henesua, 09 août 2012 - 05:18 .
#16
Posté 09 août 2012 - 05:45
#17
Posté 09 août 2012 - 06:27
I have both ELC and ILR turned off and this is what I am experiencing with the PC Hide:
1. It appears on characters that are created new specifically for the Server. According to documentation and the function HorseAddMenu, this should NOT happen unless the PC is pre-existing and therefore lack the Horse Menu feat.
2. Whenever the character is jumped to the new area the PC Hide is "swapped out" twice.
3. Any variables stored on the PC Hide are erased when the player exits the Server. The OnExit says they are there, but when you log in again, the variables are reset to 0. I am using a simple int variable (TRUE or FALSE) to test this which is stored on the PC Hide as "1" in the OnEnter event of the first area (the one you are jumped from). The OnClientLeave event checks the variable and sends the message that its value is "1".
4. Whenever you rest the PC Hide is "swapped out".
#18
Posté 09 août 2012 - 06:37
Yes this is what happens with either on. Something to keep in mind especially for the reason that not using ELC = vulnerability to various exploits that cannot be fixed/checked from nwscript.eeriegeek wrote...
Henesua, do you have ELC and ILR turned off? The lexicon's horse builder guide warns and my experience is that when either of these are enabled, the game engine destroys and recreates a new x3_it_pchide item at the first PC login after a server restart.
Not really, you are correct that the character that appears in player's localvault will not have any variables on items, but hitting export character by the player in MP game actually saves character on server vault too which can be exploited easily.Failed.Bard wrote...
Characters exported by the player
from a server vault setting have all the variables stripped from the
items. I guess to save space in the bic file.
Characters exported
and saved by script from within the game keep their variables, as should
they when you simply log out, then back in with the same server vault
character. "Export", in that case, is simply "save".
#19
Posté 09 août 2012 - 06:40
This needs further investigation but generally, the horse "system" and scripts are very lame and wrong. I wouldnt be surprised if the skin would be destroyed and recreated by the script. Have you tried to use different item, like the one Im using in my PW starter module?Pstemarie wrote...
At this point the module is barren. All the initial scripting does is use Funky's server authentication script to check the PC against the player database. Then the module database is checked to see if the character is new. If new, the player is jumped to a "creation area" where they will be able to buy equipment and tailor their appearance. If not a new character, the player is jumped to the start location.
I have both ELC and ILR turned off and this is what I am experiencing with the PC Hide:
1. It appears on characters that are created new specifically for the Server. According to documentation and the function HorseAddMenu, this should NOT happen unless the PC is pre-existing and therefore lack the Horse Menu feat.
2. Whenever the character is jumped to the new area the PC Hide is "swapped out" twice.
3. Any variables stored on the PC Hide are erased when the player exits the Server. The OnExit says they are there, but when you log in again, the variables are reset to 0. I am using a simple int variable (TRUE or FALSE) to test this which is stored on the PC Hide as "1" in the OnEnter event of the first area (the one you are jumped from). The OnClientLeave event checks the variable and sends the message that its value is "1".
4. Whenever you rest the PC Hide is "swapped out".
#20
Posté 09 août 2012 - 06:42
I was able to fix a few things by killing the module - again - and rebuilding it, AFTER deleting the database files and the server vault. I have created a NEW testing character and tested by logging into the Server. Everything seemed to work ok in regards to the PC Hide, EXCEPT resting. When I rested the hide was created on the character (who didn't need it) then was summarily swapped out about a dozen times.
I guess I'm going to have to tear into the horse scripts and see just why this happens.
Modifié par Pstemarie, 09 août 2012 - 06:47 .
#21
Posté 09 août 2012 - 06:56
#22
Posté 09 août 2012 - 07:05
#23
Posté 09 août 2012 - 08:46
Hmm really? I have seen from him "Remove PC properties" which is different issue and "Alternate Horse Scripts" which changes *something* but from description I can not say what. At least he doesnt write anything about this particular issue, the only skin related is the stuff from Remove PC properties as the alternate scripts contains this.Pstemarie wrote...
Seems like TheKrit already dealt with this stuff...ty GOD
#24
Posté 09 août 2012 - 09:11
P.S. I purged horses completely for the time being and wouldn't yanno it - everything (admittedly not much at this point) works so far as it should
Modifié par Pstemarie, 09 août 2012 - 09:13 .
#25
Posté 09 août 2012 - 09:18
Create a "player tool" that is automatically given to any player who does not already possess one. Make sure it a non-droppable/sellable plot item that is also identified. Then you can read/write all player data to the items "unidentified" description, which will never been seen by players. Just be sure to save the PC after you make a series of writes. (or flag them as "unsaved" for a periodic save loop)
That should be fairly bulletproof at far as persistant storage goes. (more so than using a pc hide at least, a scary concept, and also keeps down database bloat)
(Credit for idea goes to Seph K (aka Darkmage), who suggested it as a way to store custom passwords for PW charactes)
Modifié par Carcerian, 09 août 2012 - 10:14 .





Retour en haut







