nw_i0_plot

Contains a slew of useful functions.

NOTE: This file contains several constants and functions that are also present in nw_i0_tool.

Constants

NameValueBrief Description
DC_EASY0
DC_EPIC6
DC_LEGENDARY5
DC_MASTER4
DC_MEDIUM1
DC_HARD2
DC_SUPERIOR3
G_CLASSCHANCE70This is used by some of the template scripts 100 - this number is the chance of that dialog appearing.
XP_EPIC85000 xp - Experience Point Rewards constants used in the 'des_xp_rewards' 2da.
XP_LOW2100 xp
XP_MEDIUM4250 xp
XP_MEDIUM_HIGH5500 xp
XP_MEDIUM_LOW3150 xp
XP_HIGH61000 xp
XP_VERY_HIGH72000 xp
XP_VERY_LOW150 xp

Functions

NameBrief Description
AdjustFactionReputationAdjusts all faction members' reputation in relation to another faction.
AutoAlignEAdjusts the alignment of the object towards evil, relative to the degree indicated.
AutoAlignGAdjusts the alignment of the object towards good, relative to the degree indicated.
AutoDCDetermines whether a skill check succeeds.
CanSeePlayerDetermines if a creature can see a PC.
CheckCharismaHighDetermines if the Charisma score of the speaking player is above 14.
CheckCharismaLowDetermines if the Charisma score of the speaking player is below 10.
CheckCharismaMiddleDetermines if the Charisma score of the speaking player is in the normal range.
CheckCharismaNormalDetermines if the Charisma score of the speaking player is above 9.
CheckDCStrDo a DC check and modify the skill by the target's Strength modifier.
CheckIntelligenceHighDetermines if the Intelligence score of the speaking player is above 14.
CheckIntelligenceLowDetermines if the Intelligence score of the speaking player is below 9.
CheckIntelligenceNormalDetermines if the Intelligence score of the speaking player is greater than 8.
CheckWisdomHighDetermines if the Wisdom score of the speaking player is above the low range.
DebugSpeakSpeak a string used for debugging.
DimensionHopTeleports instantly a character from one point to another creature.
DoGiveXPGives the designated XP to the PC using the design rules for XP distribution.
DoOnceDetermines whether a something has been done before.
EscapeAreaMakes a creature escape to a waypoint.
EscapeViaTeleportMakes a creature teleport away while looking like they are casting a spell.
GetCanCastHealingSpellsGets a TRUE or FALSE depending on if the target can cast Healing spells or not.
GetCharismaGets the targets Charisma Ability Score.
GetIntelligenceGets the targets Intelligence Ability Score.
GetIsPlayerCharacterCheck to see if target is PC and not DM.
GetMyMasterGets the nearest Player Character to the calling object.
GetNearestPCDetermines the nearest PC to a creature.
GetNPCEasyMarkInternal function. Returns a value that will be subtracted from the target's DC to resist Appraise or Persuasion.
GetNumItemsGets the number of the item that the target carries.
GetPLocalIntDetermines the value of a locally stored variable from any PC in a party.
GetReactionAdjustmentGets the adjusted Reaction for the purposes of store pricing.
GetWisdomGets the targets Wisdom Ability Score.
GiveNumItemsGives the target the number of items specified.
gplotAppraiseFavOpenStoreOpens a store, modifying the store prices by the Appraise skill of the PCspeaker.

NOTE: This script always results in a good appraise result.
gplotAppraiseOpenStoreOpens a store using the appraise skill
HasGoldInternal function. Determines if a player has more than a certain amount of gold on them.
HasItemDetermines if a creature possesses an item.
IsRecallRecalls a player through the use of Recall Stones.
PlayCharacterThemePlays the correct background music for the character.
PlayOldThemePlays the background music according to the last theme what was chosen.
PlaySpeakSoundByStrRefDo a call to both SpeakStringByStrRef and PlaySoundByStrRef at the same time.
plotCanRemoveXPReturns TRUE if the player can afford to lose the indicated amount of XP without losing a level.
RemoveEffectsRemoves all negative effects from a creature.
Reward_2daXPPass in a PC and a row from the 'des_xp_rewards' 2da file to reward the PC and/or party experience.
RewardGPGives gold as a reward to a player and possible their party members.
RewardXPGives the designated XP to the PC and possible their party using the design rules for XP distribution.
SetIsEnemyCauses a creature to be flagged as an enemy using reputation.
SetPLocalIntSets a variable that remains attached to a PC party.
TakeGoldRemoves a given amount of gold from the targets inventory, and optionally removes it from the game.
TakeNumItemsTakes the number of items specified from the target.


 author: Charles Feduke, editors: Mistress, Kolyana, contributor: Kookoo