View previous topic :: View next topic |
Author |
Message |
Jambo
Joined: 24 Sep 2008 Posts: 22
|
Posted: Tue Sep 30, 2008 21:36 Post subject: Retaining effects between login for custom races? |
|
|
When playing a standard race, any effects someone has applied to their character, from spells for example, are generally retained between logins. This is fairly useful if someone happens to crash, and is complemented with the NWN 1.69 setting to keep track of spell usage which closes the possibility for someone to relog to regain spells.
However, when playing custom races from systems such as Abyss404, all effects seemed to be cleared between logins. If someone happens to crash and log back in, any effects from spells are lost.
I wondered if anyone may have an insight in to why this is -- and if it would be possible to make a plugin to ensure effects are retained between logins, regardless of the race of the character which is being played?
Thanks! |
|
Back to top |
|
|
Disco
Joined: 06 Dec 2006 Posts: 152
|
Posted: Wed Oct 01, 2008 15:24 Post subject: |
|
|
I am quite sure they apply (part of) their race modifications as effects which refresh on relog by stripping the effects and reapplying them. Changing this would be a bit of a drag, I guess.
What they could do is making the stripping routine more specific, for example only affecting permanent supernatural effects that are created by the module.
Another option is to create the effects with a custom spell, which can be uniquely identified by GetEffectSpellID() or whatever that function is called. |
|
Back to top |
|
|
Jambo
Joined: 24 Sep 2008 Posts: 22
|
Posted: Wed Oct 01, 2008 22:41 Post subject: |
|
|
That was one of my initial thoughts to the problem as well, although on further testing I:
- Created a custom race pc (ie: tiefling)
- Logged it in to a new/empty module with 0 scripts (including no 404 ones)
- Cast a spell
- Logged out
- Logged back in and: all effects were gone
But doing this with a normal playable race doesn't present any problem like this. All effects are retained. It really has me stumped. |
|
Back to top |
|
|
PlasmaJohn
Joined: 04 Mar 2005 Posts: 70 Location: The Garage
|
Posted: Mon Oct 06, 2008 21:53 Post subject: |
|
|
The Abyss404 system performs one-time BIC edits on character creation. I am not aware of any login processing being performed on the servers that I have coded for.
I think we'll find that the root cause is the same thing that makes the character selection screen report insane values. |
|
Back to top |
|
|
Disco
Joined: 06 Dec 2006 Posts: 152
|
Posted: Tue Oct 07, 2008 9:58 Post subject: |
|
|
Try storing an int on a PC like that and see if it's retained over relog? |
|
Back to top |
|
|
TroveLord
Joined: 22 Nov 2006 Posts: 136 Location: Italy
|
Posted: Tue Oct 07, 2008 10:05 Post subject: |
|
|
Storing it on the character won't do, variables are lost at restart. You must use an invetory item. Check the HCR character token. |
|
Back to top |
|
|
Jambo
Joined: 24 Sep 2008 Posts: 22
|
Posted: Tue Oct 07, 2008 15:57 Post subject: |
|
|
That's true RE variables/restarts, but we're going on a slight side line here as to the issue.
Disco wrote: | Try storing an int on a PC like that and see if it's retained over relog? |
Those are also lost when someone with a non-standard bioware race relogs, so I guess NWN may be destroying the pc object cache for non-standard races upon log out?
Question is, would a plugin be able to resolve that? And if yes, would anyone be willing to write it up? Debugging applications and writing in C isn't my forte, sadly. |
|
Back to top |
|
|
ShaDoOoW
Joined: 20 Aug 2005 Posts: 584
|
Posted: Tue Oct 07, 2008 19:34 Post subject: |
|
|
This is really strange. I had PW with PRC and I only similar issue I saw on my server was, that if someone relog he lost all levels but not XP so he could relevel at will.
But this was solved by change GiveXP to SetXP and DM wand with this.
So I would like to know:
1) How do you do character with custom race. Do you use externat character creator? Or you using Subrace field?
2) Do you ExportSingleCharacter in module OnExit?
3) Do yo use skin? Its strange and don't looks like it, but skin is removed from CARMOR slot when PC log in. _________________ Community Patch / NWNX Patch / NWNX Files / NWNX Connect |
|
Back to top |
|
|
Jambo
Joined: 24 Sep 2008 Posts: 22
|
Posted: Wed Oct 08, 2008 0:07 Post subject: |
|
|
Currently via Abyss404, which:
- External character editor (Abyss404's system was written in Java)
- Changes the "Race" field
- Changes the sub race field
- An item is used in INVENTORY_SLOT_CARMOUR for some things (but it also is for normal races).
ExportSingleCharacter is called OnExit for all PCs.
I could upload a sample bic of a Tiefling to give you an idea of how things look after its done. I'll post it up later tonight. |
|
Back to top |
|
|
ShaDoOoW
Joined: 20 Aug 2005 Posts: 584
|
Posted: Wed Oct 08, 2008 20:35 Post subject: |
|
|
Well, I don't know if it helps. You should contact author of that Abyss404 system to help you. _________________ Community Patch / NWNX Patch / NWNX Files / NWNX Connect |
|
Back to top |
|
|
Jambo
Joined: 24 Sep 2008 Posts: 22
|
Posted: Thu Oct 09, 2008 0:07 Post subject: |
|
|
ShaDoOoW wrote: | Well, I don't know if it helps. You should contact author of that Abyss404 system to help you. |
Unfortunately it's not an active project anymore -- but if I edited a bic the same way by hand, I'd likely come across the same issue described above. But I'll test that theory and see what occurs. |
|
Back to top |
|
|
Disco
Joined: 06 Dec 2006 Posts: 152
|
Posted: Thu Oct 09, 2008 15:17 Post subject: |
|
|
Jambo wrote: | Disco wrote: | Try storing an int on a PC like that and see if it's retained over relog? |
Those are also lost when someone with a non-standard bioware race relogs, so I guess NWN may be destroying the pc object cache for non-standard races upon log out? |
No, they are destroyed on server reset. Locally stored objects and locations are erased on logout/login, strings and int are retained until reset. Same as effects, incidentally, and that's why I asked. |
|
Back to top |
|
|
PlasmaJohn
Joined: 04 Mar 2005 Posts: 70 Location: The Garage
|
Posted: Thu Oct 09, 2008 15:44 Post subject: |
|
|
The Abyss404 character customizer does something funky to the character bic such that the resulting bic is not quite right as far as the NWN game engine is concerned. The values needed for the effects are (probably) still there, just that the record is skewed enough that the engine cannot read them back in.
It is quite possible that the game engine is making assumptions that do not accept all valid bics. The other possibility is that the A404 character customizer doesn't update all the fields that different parts of the engine depend on. |
|
Back to top |
|
|
Jambo
Joined: 24 Sep 2008 Posts: 22
|
Posted: Sat Oct 11, 2008 19:59 Post subject: |
|
|
Well there's no doubt it is down to something the customizer does. And I think you hit it spot on, PlasmaJohn. The bic is changed not so much that Neverwinter Nights completely rejects it, but enough that it seems to become confused.
I spent a few hours earlier trying to break things apart and diagnose the issue, particularly comparing customized bics to standard ones see where the differences lay. Something which particularly struck is that the "FirstName" field which has 42 strings after being updated by the Abyss404 character editor. Non-custom characters have only 1.
Working with this, I then:
- Removed all the additional strings in "FirstName" field
- Logged in
- Cast a spell
- Logged out
- Logged back in
And the result? All the spell effects were retained!
Now I assume all those additional entries created in the first name field needed by AutoBic. They appear to be the 2DA row used when creating the custom race.
Now it's just a question of whether a plugin could be written to resolve this or whether a new customizer method would be needed. For worlds who already have a high number of characters customized in this way, changing all that would be far from easy. I really hope someone may be willing to write a plug in to resolve it if possible but I can understand everyone's development efforts are on other things. |
|
Back to top |
|
|
PlasmaJohn
Joined: 04 Mar 2005 Posts: 70 Location: The Garage
|
Posted: Fri Oct 17, 2008 17:03 Post subject: |
|
|
Awesome find The customiser should certainly be fixed (the source should be in the jar file). How to fix existing characters will need some thought. |
|
Back to top |
|
|
|