My starting area has a portal where players teleport away after speaking to an NPC, which tells them what has happened in the story so far. I was just beginning to experiment upon implementing this SetCampaignLocation.
My petty mind is trying to fathom how this would work or ever be needed in a non persistent world. Multiplayer, players joining late? Teleport to party leader or last checkpoint seem to fit that case better.
Well, to see if it's working try adding #include "x0_i0_position" and call LocationToString(location) right after getting it from the database:
I understand that you are trying to fathom it, but this is learning, I have an ambition to build a PW in the future. All this is just plus for me to learn about NWN.
I am not a progammer by profession, and I have lot of free time because I have been on sick leave for two years from a workplace accident, and I have been able to resume making neverwinter for my friends like a month ago.
Well I was able to start a module from DM -client, move my character into another area, quit, restart the server and use the portal to teleport into that location where I quit.
I'm pretty unorganized. I wrote most all of that stuff when I was a teenager over ten years ago when I was new to programming.
So mainly, I store:
If a player is not new, meaning they have a tag. That used to be in a database, but now it's just a tag on the player bic file.
Current HP when a player logs off, so it can be restored. (No idea why the game doesn't do that. That's the easiest exploit for players. They're almost dead, relog and suddenly they're full HP.)
If a player is dead, and should be in the dead realm.
Kill count per challenge rating.
Kill score per challenge rating. I use it for my looting system.
Mining/crafting progress.
I don't track times died, but that would be a cool one to add. Quest progress would be another, but for now all my quests give items, so I just check for those. But actually, there is one quest and player settings that I store on the PC Properties item. Honestly lots of these could probably be stored on that item. Things stored on that item though, only get saved when they player logs out. If the server crashes, all that is lost. With the database, it saves it right away.
As mentioned before, each of those data points, I store in their own database, and just use the tag of the player to get and set data.
You've got me thinking about things I could do to make it better in many ways. Since I have no player base, I could do it without hurting anyone.
Comments
My module is not a PW though
Maybe I could try it by
AssignCommand(oPC, ActionJumpToLocation(GetCampaignLocation(oPC)));
It didnt even cross my mind that I could have placed that into OnUsed -script on a portal.
Made a script like this from the include file you cleaned up for me:
Now it works, transporting the player into the location where they quit the server.
Thank you!
Well, to see if it's working try adding #include "x0_i0_position" and call LocationToString(location) right after getting it from the database:
AssignCommand(oPC, ActionJumpToLocation(GetCampaignLocation(oPC))); won't work. You'd need to call AssignCommand(oPC, ActionJumpToLocation(GetPCStartLocation(oPC))); instead.
I am not a progammer by profession, and I have lot of free time because I have been on sick leave for two years from a workplace accident, and I have been able to resume making neverwinter for my friends like a month ago.
Well I was able to start a module from DM -client, move my character into another area, quit, restart the server and use the portal to teleport into that location where I quit.
I will add that and try it.
Cool cool. I enjoy helping out.
what data you collect from a PC when they Log into your PW or when player rests etc?
I mean Character statistics, HP, Num of times killed, PC status etc?
How do you handle these things.
Im curious just because the subject interests me.
I know PW:s must keep track of player status but what does it include usually?
Do you keep a "Player character" -Database where you save these, or how do you handle this?
So mainly, I store:
- If a player is not new, meaning they have a tag. That used to be in a database, but now it's just a tag on the player bic file.
- Current HP when a player logs off, so it can be restored. (No idea why the game doesn't do that. That's the easiest exploit for players. They're almost dead, relog and suddenly they're full HP.)
- If a player is dead, and should be in the dead realm.
- Kill count per challenge rating.
- Kill score per challenge rating. I use it for my looting system.
- Mining/crafting progress.
I don't track times died, but that would be a cool one to add. Quest progress would be another, but for now all my quests give items, so I just check for those. But actually, there is one quest and player settings that I store on the PC Properties item. Honestly lots of these could probably be stored on that item. Things stored on that item though, only get saved when they player logs out. If the server crashes, all that is lost. With the database, it saves it right away.As mentioned before, each of those data points, I store in their own database, and just use the tag of the player to get and set data.
You've got me thinking about things I could do to make it better in many ways. Since I have no player base, I could do it without hurting anyone.