BioWare Atari
BioWare Info BioWare Spiele Support Foren Visit the BioWare Store
Neverwinter Nights Home
Neverwinter Nights Home

Rewarding Gold and XP

Intended Audience: For Builders
By David Gaider

[Printer Friendly / Syntax Highlight]

The two basic commands for doing this are very, very simple.

void GiveGoldToCreature(object oCreature, int nGP)

void GiveXPToCreature( object oCreature, int nXpAmount)

It doesn't matter where the gold or XP is coming from. just where it is going to... so these commands can be run from anywhere.

To give 100 gold to the PC I'm speaking to (placed in a script within the 'Actions Taken'):

GiveGoldToCreature (GetPCSpeaker(), 100);

To give 100 XP to each member of the party, starting with the nearest one to me:

NWScript:

(personally, I would put that into a function so I wouldn't have to type it all out every time)

Some other stuff that is handy to know with regards to experience and gold:

- When you write journals in the journal editor, you can assign an 'XP Value' to each entry. This number can be retrieved by the following command:

int GetJournalQuestExperience(string szPlotID)

In the campaign, we have a PlotID for each quest (which can consist of several journal entries right up to 'completion') and each PlotID has an XP value. Then we dole out the XP in percentages as the plot gets completed. 50% of the total for this, 25% for that, etc.

- How much gold does someone have?

int GetGold( object oTarget = OBJECT_SELF)

So to find out how much gold is on the person running the script you just go GetGold()... but it literally could target anyone.

- if you want someone to take gold from someone else, you use this:

void TakeGoldFromCreature( int nAmount, object oCreatureToTakeFrom, int bDestroy = FALSE)

If 'bDestroy' is marked as TRUE, then the creature taking the gold doesn't end up with it in their inventory... the gold is destroyed and removed from the world.

 

 

BioWare Store
Neverwinter Nights 2 Forums
Anzeigen/Verbergen

English
Deutsch
Français
Español
Italiano

Anzeigen/Verbergen

Neueste Bildschirmfotos anzeigen 

Neueste Bildschirmfotos anzeigen
Anzeigen/Verbergen

Multiplayer Games at Neverwinter Connections

Today
Schedule a Game...



Aktuelle Uhrzeit: (Zeit einstellen)
So, 22 November 2009 06:11

Anzeigen/Verbergen

Buy Premium Modules

Top NWN: HotU Modules:
1. Good vs Evil III
2. More...

Top NWN: SoU Modules:
1. Good vs Evil III
2. More...

Top CEP Modules:
1. The Lord of Terror The Diablo Campa...
2. More...

Top Modules - NWVault:
1. Hall of Fame
2. More...

Total Modules: 4423

Anzeigen/Verbergen

5,051,339 BioWare-Benutzer:
  41 Eingeloggt
  3 Verborgen
  152 Gäste

1054 Playing Online
  100% NWN
  100% NWN: SoU
  102% NWN: HotU

447 Registered Guilds

8,768,728 Einträge in den Foren

Neueste Themen in den Foren:
1. which script launches the crafti... (NWN 1: Scripting)

2. Killing Morag (NWN 1: General Discussion (No Spoilers Allowed))

3. I think we ARE goin to earth (Mass Effect 2 General Discussion (No Spoilers Allowed))

4. Merging Clothing (aka. body) par... (NWN 1: Toolset)

5. "Open Your Browser and Close You... (Mass Effect 2 General Discussion (No Spoilers Allowed))