Persistent Journal Entries
Phantomizer
Member Posts: 76
I haven't gotten to this point yet, but I want to address It as soon as possible, as It's one of the more Important things on my list of things that I want to get Implemented Into my current project.
I know Journal Entries have always been an issue with NWN when It comes to PWs, because they're reset whenever the server Is restarted or reloaded and I had a few Ideas to sort of get around this, without needing to resort to NWNX.
1)
The player recieves a token when they accept a quest, which contains a variable that Is changed as the quest advances. Everytime the player enters the server, their journal updates based on the tokens they have and the variables contained In them.
2)
Instead of relying on variables, go with tag based. As the quest advances, the player recieves a token based on what stage of the quest they are In with a different tag and when the player enters the server, they recieve the journal entries based on the tag of the tokens In their possession.
Could either of these two Idea work? potential pros/cons?
Thanks!
I know Journal Entries have always been an issue with NWN when It comes to PWs, because they're reset whenever the server Is restarted or reloaded and I had a few Ideas to sort of get around this, without needing to resort to NWNX.
1)
The player recieves a token when they accept a quest, which contains a variable that Is changed as the quest advances. Everytime the player enters the server, their journal updates based on the tokens they have and the variables contained In them.
2)
Instead of relying on variables, go with tag based. As the quest advances, the player recieves a token based on what stage of the quest they are In with a different tag and when the player enters the server, they recieve the journal entries based on the tag of the tokens In their possession.
Could either of these two Idea work? potential pros/cons?
Thanks!
1
Comments
Each quest has quest name (variable name) and state (int)
So you have "FETCHQUEST_1" with 4 states (given quest, found item, returned item, end state).
On join, it just checks those quests and adds journal entry for appropriate state.
The point being it can be easier to manage when character specific variables are stored on an item specific to that character. If you ever find yourself cleaning out old characters from old players or what not, you won't need to go rummaging around the database for folders or files to clean up. It will already have been deleted when the character was. Or a DM might want to remove a character's database item to give the player a fresh start on quests, kill counts, etc while the game is running. Basically when it comes to character specific variables I usually keep them with that character. That's not to say the database can't or shouldn't be used. Personally it just makes more sense for me an it's just easier for me to manage.
Technically I use this, which is object in chest that gets saved to database: https://neverwintervault.org/project/nwn1/script/nbde-natural-bioware-database-extension-v10
In hindsight, I think having item on player to store variables might be better way to go. Does that also work in local vault for testing?
We do have a tool on backend to modify database directly. But unfortunately doesn't work with NBDE. The database is just a "Fox Pro" database and lots of libraries to read/write them.
Either way, quests are the same. Just have one var per quests that tracks state and redo journal on login.
Before you begin, these scripts and module will only function properly on a server that has been built using NWNX:EE.
Here is a link to a module that is configured to allow you to create tables, and create and test basic persistent journal entries.
https://nwn-stuff.nyc3.digitaloceanspaces.com/nwnx_mysql.mod
Here is a script set to load into your module (please backup your module before you import any scripts). Configuration of these scripts should be fairly straightforward.
https://nwn-stuff.nyc3.digitaloceanspaces.com/nwnxsql_pqj0502.erf
Happy persistent journal writing.
With NWNx, you can check (and adjust if the character is offline) quest states without any special in game tools.
You can still check the variables in game with tools, but the DM doesn't have to find the character and the special item in the character's inventory.
From a builder/admin point of view, that makes the database far superior.