Aller au contenu

Photo

(PW) Party XP Script


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

#1
Queen Nothing

Queen Nothing
  • Members
  • 6 messages

Hey all,

 

I'm trying to make an XP script for a Player World where, for each additional party member, the server does not give them less XP. Currently, adding just one member to a party greatly reduces XP and I wish to fix that -- where XP is only decreased in a party size of 5+ people, with cumulatively decreasing xp from there.

Sorry for asking for help, I've spent the past few days researching and have found nothing -- so any help would be greatly appreciated!  :)



#2
Dann-J

Dann-J
  • Members
  • 3 161 messages

The XP calculations are apparently quite complex, but they shouldn't have changed much since NWN:

 

http://nwn.wikia.com...xperience_point

 

I suspect everything other than xptable.2DA (ie. 'base xp') is hardcoded. You might have to reverse-engineer those hardcoded calculations in order to give a bit of extra experience to compensate - although it would look messy, as you'd be getting two lots of feedback in the console.



#3
AGhost_7

AGhost_7
  • Members
  • 62 messages

You'd need to test and figure out the equation for distributing XP to all faction members. You'll need to figure out how the xp flow is handled when it comes to the CR vs PC level. I personally never bothered to figure it out.



#4
Queen Nothing

Queen Nothing
  • Members
  • 6 messages

Quite complex, but I will see if I can figure it out. Thank you for the feedback.



#5
Lance Botelle

Lance Botelle
  • Members
  • 1 480 messages
Hi,

Just remember that if you don't want any Henchmen (or such), then make sure you exclude them in your calculations. NB: When I say Henchmen, I mean those members that can "join" the party, but are NOT Companions.

i.e. Henchmen can join, but player cannot interact with their development. Companions are party members that the player can alter more readily.

You may need to make this distinction if you use GetFactionMember to apply any XP among the party. I needed to for my own system. Alternatively, use the GetIsPartyMember during the check.

I hope that makes sense.

Cheers,
Lance.

#6
Psionic-Entity

Psionic-Entity
  • Members
  • 195 messages

Your best bet is just writing your own.

 

1. Set the XP scale in the module properties to zero.

 

2. Open nw_c2_default7 in the toolset. This is a script that can be found in the Scripts data file for nwn2, or you can get it elsewhere.

 

3. Write your own XP script to call from the above. You will need to loop over every party member (using GetFirst/NextFactionMember on the killer, etc.). You can check which ones are PCs, which ones have what levels, which ones are being sly by not taking their levels (this is a little tricky), etc. and then decide how much XP each one gets. You will probably need a second loop to actually grant the XP.

 

Since you're making a PW you can even include database functions, logging, etc. in this code.