DoGiveXP(string, int, object, int)

From NWN Lexicon
Jump to navigationJump to search
Note: This function page documents something only available in the nw_i0_tool include file. The function may not be accurately documented here but you can read the nwscript code for the function in the game files.
Note: This function page documents something only available in the nw_i0_plot include file. The function may not be accurately documented here but you can read the nwscript code for the function in the game files.

Gives the designated XP to the PC using the design rules for XP distribution.

void DoGiveXP(
    string sJournalTag,
    int nPercentage,
    object oTarget,
    int nQuestAlignment = ALIGNMENT_NEUTRAL
);

Parameters

sJournalTag
The tag of the journal that will be used to obtain the experience amount.
nPercentage
The percentage of the experience that should be given. (100 for 100%)
oTarget
The target to receive the experience.
nQuestAlignment
Quest alignment (Default: ALIGNMENT_NEUTRAL)


Description

Gives the designated XP to the PC using the design rules for XP distribution.


Remarks

Uses the alignment of the quest in relation to the alignment of oTarget to scale up or down the experience.

This function is present in the exact same format in both nw_i0_plot and nw_i0_tool.


Requirements

#include " nw_i0_tool "

#include " nw_i0_plot "

See Also

constants: 

ALIGNMENT_* Constants



 author: Tom Cassiotis