Aller au contenu

Photo

Persistent xp?


  • Veuillez vous connecter pour répondre
3 réponses à ce sujet

#1
AaronH

AaronH
  • Members
  • 115 messages

Our server uses a custom skilling table of various skills.

 

This is a fairly new system we've added (it works perfectly fine), but one major downfall is that the xp you get when training a skill isn't saved, i.e. persistent.

 

I don't program for our server, but our programmer is struggling to get it to work, so I'm asking on his behalf.

 

Example of our progress;

 

Level 1 Woodcutting.

Level 1-2 = 83 xp

 

I get 83 xp and level up my woodcutting. Once I log out and log back in, I'm level 2 woodcutting, but my woodcutting xp is 0.

 

If I get any experience in woodcutting then, my skill is reset to 1.

 

 

Updated: We now have it so that the skill level is persistent, but the experience isn't. 

 

I would still be level 2 woodcutting (which means i should be 83 woodcutting xp+), but I'm 0 woodcutting xp.

 

My skill is frozen until I get to level 3 woodcutting.

 

 

Any ideas on how to keep the xp on logging out?

Feel free to ask to see the script of the xp table.



#2
kevL

kevL
  • Members
  • 4 052 messages
Can it just be saved as a local_int somewhere? (and persist across resets)

NwN has a problem in that exported characters lose their locals, but i thought this was removed in NwN2. They got around it, in 1, by creating a plot/nodrop/cursed item on each character, and storing the vars on it.

Alternatives are the Campaign database, or even a global_int of some sort *might* work

#3
Tchos

Tchos
  • Members
  • 5 030 messages

If woodcutting requires a tool like an axe, that could be a good place to store the local variable.


  • GCoyote et MERP_UK aiment ceci

#4
Clangeddin86

Clangeddin86
  • Members
  • 220 messages

The best solution seems to be to use local ints, but unless I see the script, I can't say much else.