nwnxee / unified

Binaries available under the Releases tab on Github
https://nwnxee.github.io/unified
GNU General Public License v3.0
131 stars 92 forks source link

Question: Persistent player id's without storage object? #510

Closed Baaleos closed 5 years ago

Baaleos commented 5 years ago

So one of the things that many PW servers will need to implement for their own internal systems is some sort of unique id system for players. Eg: in case a player creates another character of the same name etc.

The only way in 1.69 I could think of to store the player ID persistently was an object that could be stored in the players inventory that could not be removed / dropped. This would then link up to a persistent ID that is in the database also - and allows the ID to be reloaded on character login etc after resets.

My question here is: Does there exist any possibility of adding small amounts of data to the Bic files directly via nwnx - so we don't have to use a storage object? Storage objects are vulnerable to DM tampering etc - a DM could remove it on purpose or accidentally etc.

Eg: What if a unique ID was added to the level-stats (level 0) - for a player. Would that make their BIC file invalid?

If anyone has any ideas - interested to hear.

mtijanic commented 5 years ago

Just store it in the player's tag with the SetTag() function. No NWNX required, persists to bic.

Baaleos commented 5 years ago

Ah... didn't know SetTag worked on players. Fair enough...