Best option for PC data persistence?

I’ve seen a few different takes on making PC data persist in PW modules, and I thought I’d ask for some opinions on which people think are best.

I know using databases is generally given to be the goto, but I’m told that this has performance concerns if the databases get large, and I do foresee a fair few things being stored in there - different languages the character speaks, the battery of quests they’ve done, and so on.

Another way I’ve seen this done is on an undroppable object, which I assume is achieved by setting variables on the object. I’m not sure why this would be more performant versus a database (presumably that’s getting saved too…?) but assuming it is, I’m unsure how to make sure it absolutely, positively, cannot be dropped/stolen/traded/turned into something else/etc.

Any advice would be appreciated!

NWN:EE supports sqlite these days, with database files stored in the /database folder or even serialized to the player bic file. See the Sql*() family of nwscript functions and there’s a readme file in Neverwinter Nights\lang\en\docs.

There’s also NWNX for EE if you want stuff backed by mysql/postgresql, but that requires more setup. Here’s a discord for nwnx/nwn/pw development: NWN Developer Chat if you care about such things

Personally I think the game’s sqlite stuff is fine for the majority of usecases.

1 Like