Nw i0 plot

From NWN Lexicon
Revision as of 14:53, 22 August 2012 by Dood (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search



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

Name Value Brief Description
DC_EASY 0
DC_EPIC 6
DC_LEGENDARY 5
DC_MASTER 4
DC_MEDIUM 1
DC_HARD 2
DC_SUPERIOR 3
G_CLASSCHANCE 70 This is used by some of the template scripts 100 - this number is the chance of that dialog appearing.
XP_EPIC 8 5000 xp - Experience Point Rewards constants used in the 'des_xp_rewards' 2da.
XP_LOW 2 100 xp
XP_MEDIUM 4 250 xp
XP_MEDIUM_HIGH 5 500 xp
XP_MEDIUM_LOW 3 150 xp
XP_HIGH 6 1000 xp
XP_VERY_HIGH 7 2000 xp
XP_VERY_LOW 1 50 xp


Functions

Name Brief Description

AdjustFactionReputation

Adjusts all faction members' reputation in relation to another faction.

AutoAlignE

Adjusts the alignment of the object towards evil, relative to the degree indicated.

AutoAlignG

Adjusts the alignment of the object towards good, relative to the degree indicated.

AutoDC

Determines whether a skill check succeeds.

CanSeePlayer

Determines if a creature can see a PC.

CheckCharismaHigh

Determines if the Charisma score of the speaking player is above 14.

CheckCharismaLow

Determines if the Charisma score of the speaking player is below 10.

CheckCharismaMiddle

Determines if the Charisma score of the speaking player is in the normal range.

CheckCharismaNormal

Determines if the Charisma score of the speaking player is above 9.

CheckDCStr

Do a DC check and modify the skill by the target's Strength modifier.

CheckIntelligenceHigh

Determines if the Intelligence score of the speaking player is above 14.

CheckIntelligenceLow

Determines if the Intelligence score of the speaking player is below 9.

CheckIntelligenceNormal

Determines if the Intelligence score of the speaking player is greater than 8.

CheckWisdomHigh

Determines if the Wisdom score of the speaking player is above the low range.

DebugSpeak

Speak a string used for debugging.

DimensionHop

Teleports instantly a character from one point to another creature.

DoGiveXP

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

DoOnce

Determines whether a something has been done before.

EscapeArea

Makes a creature escape to a waypoint.

EscapeViaTeleport

Makes a creature teleport away while looking like they are casting a spell.

GetCanCastHealingSpells

Gets a TRUE or FALSE depending on if the target can cast Healing spells or not.

GetCharisma

Gets the targets Charisma Ability Score.

GetIntelligence

Gets the targets Intelligence Ability Score.

GetIsPlayerCharacter

Check to see if target is PC and not DM.

GetMyMaster

Gets the nearest Player Character to the calling object.

GetNearestPC

Determines the nearest PC to a creature.
GetNPCEasyMark Internal function. Returns a value that will be subtracted from the target's DC to resist Appraise or Persuasion.

GetNumItems

Gets the number of the item that the target carries.

GetPLocalInt

Determines the value of a locally stored variable from any PC in a party.

GetReactionAdjustment

Gets the adjusted Reaction for the purposes of store pricing.

GetWisdom

Gets the targets Wisdom Ability Score.

GiveNumItems

Gives the target the number of items specified.

gplotAppraiseFavOpenStore

Opens a store, modifying the store prices by the Appraise skill of the PCspeaker.

NOTE: This script always results in a good appraise result.

gplotAppraiseOpenStore

Opens a store using the appraise skill

HasGold

Internal function. Determines if a player has more than a certain amount of gold on them.

HasItem

Determines if a creature possesses an item.

IsRecall

Recalls a player through the use of Recall Stones.

PlayCharacterTheme

Plays the correct background music for the character.

PlayOldTheme

Plays the background music according to the last theme what was chosen.

PlaySpeakSoundByStrRef

Do a call to both SpeakStringByStrRef and PlaySoundByStrRef at the same time.

plotCanRemoveXP

Returns TRUE if the player can afford to lose the indicated amount of XP without losing a level.

RemoveEffects

Removes all negative effects from a creature.

Reward_2daXP

Pass in a PC and a row from the 'des_xp_rewards' 2da file to reward the PC and/or party experience.

RewardGP

Gives gold as a reward to a player and possible their party members.

RewardXP

Gives the designated XP to the PC and possible their party using the design rules for XP distribution.

SetIsEnemy

Causes a creature to be flagged as an enemy using reputation.

SetPLocalInt

Sets a variable that remains attached to a PC party.

TakeGold

Removes a given amount of gold from the targets inventory, and optionally removes it from the game.

TakeNumItems

Takes the number of items specified from the target.



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