x0_i0_common

Common functions used across multiple include files.

NOTE 1: This file contains a couple of functions that are also present in nw_i0_henchman.

NOTE 2: This file includes x0_i0_partywide and x0_i0_transport.

Constants

NameValueBrief Description
CONVERSATION_ATTEMPT_DELAY3.0Controls the amount of delay between persistent conversation attempts.
DIFFICULTY_EASY1Difficulty setting for skill checks.
DIFFICULTY_HARD3Difficulty setting for skill checks.
DIFFICULTY_IMPOSSIBLE4Difficulty setting for skill checks.
DIFFICULTY_MODERATE2Difficulty setting for skill checks.
sAdviceSuffix_ADVThis gets tacked onto the NPC's tag to denote the tag for their "home" waypoint.
sDidQuitSuffix_QUITThis gets tacked onto the NPC's tag to denote the tag for their "home" waypoint.
sFriendSuffix_FRThis gets tacked onto the NPC's tag to denote the tag for their "home" waypoint.
sHasHiredSuffix_HIREDThis gets tacked onto the NPC's tag to denote the tag for their "home" waypoint.
sHasInterjectionSuffix_INTJThis gets tacked onto the NPC's tag to denote the tag for their "home" waypoint.
sHasMetSuffix_METThis gets tacked onto the NPC's tag to denote the tag for their "home" waypoint.
sInterjectionSetSuffix_INTJ_SETThis gets tacked onto the NPC's tag to denote the tag for their "home" waypoint.
sOneLinerVarnameX0_CURRENT_ONE_LINERHolds the current one-liner.
sOneShotVarnameX0_ONE_SHOT_EVENTHolds whether this NPC's one-shot event has occurred.
sPersuadeAttemptSuffix_PERSUADEThis gets tacked onto the NPC's tag to denote the tag for their "home" waypoint.
sPersuadeSuccessSuffix_PERSUADE_SUCCThis gets tacked onto the NPC's tag to denote the tag for their "home" waypoint.
sRespawnLocationVarnameX0_RESPAWN_LOCGoes on the PC to specify the respawn point for them and their henchman.
sRouterTagX0_EVT_ROUTER_MThe event router is the object in each module that will be responsible for receiving user-defined events (eg, for quest start or completion), and then in turn sending events out to the henchmen and other NPCs as appropriate to trigger new effects on them.
sStartLocationVarnameX0_START_LOCMarks the starting location of a creature.
sThreatenSuffix_THREATThis gets tacked onto the NPC's tag to denote the tag for their "home" waypoint.
X0_DEBUG_SETTING0If this is set to 0, all debug messages will be turned off. Note that the code WILL still be compiled in, so this is not ideal for final release.

Functions

NameBrief Description
ClearAllDialogueCall to clear all dialogue events.
CreateEventRouterCreate the appropriate event router for this chapter in the starting location. The event router should be an invisible object.
DBG_msgPrint out a short message to the log files.
EndModuleThis *ALWAYS* returns false. That is the only thing this function does.

ONLY VALID IN EXPANSION PACK 0! NOT VALID FOR USER MODULES!

NOTE: This is different than the version found in nw_i0_henchman.
FriendCheckFriendly check.
GetBooleanValueGet the value of a TRUE/FALSE variable on the specified object.
GetCampaignBooleanValueGet the value of a persistent TRUE/FALSE variable on the specified object.
GetChapterReturns the number of the current chapter of the game.

THIS WILL ONLY WORK CORRECTLY IN EXPANSION PACK 0. NOT VALID FOR USER MODULES!

NOTE: This is different than the version found in nw_i0_henchman.
GetDidPersuadeDetermine whether the PC has successfully persuaded the NPC.
GetEventRouterReturn the appropriate event router for this chapter. This function will create the event router if it doesn't already exist.
GetEventRouterTagReturn the appropriate event router tag for this chapter.
GetFriendlyCheck how friendly/nasty the PC has been to this NPC.
GetHasAdviceCall to determine if the NPC has advice to give to this PC.
GetHasInterjectionCall to determine if the NPC has an interjection to make to this PC.
GetMyAreaReturns the tag of the current area the specified object is in.

NOTE: This is slightly different than the version found in nw_i0_henchman. This version tests that the target creature is valid. If it is invalid the function returns "".
GetOneLinerDetermine whether and which one-liner an NPC has available.
GetPersuadeAttemptDetermine whether the PC has attempted to persuade an NPC.
GetRespawnLocationGet the current respawn point for the caller.
GetTagNoPrefixReturns the tag of the target with the 3-letter prefix (x0_) stripped. Useful since these are stripped from blueprint resrefs when editing copies.
GetThreatenDetermine if the PC attempted to threaten the NPC.
HasItemByTagDetermine if the target is carrying the specified object.
MeanCheckUnfriendly check.
PersistentConversationAttemptThis function attempts to ensure that an NPC starts a conversation with a specified PC.
SetBooleanValueSet a TRUE/FALSE value on the specified object.
SetCampaignBooleanValueSet a TRUE/FALSE persistent value on the specified object.
SetDidPersuadeIndicate that the PC persuaded the NPC.
SetFriendlyIndicate that the PC did something friendly use FALSE if the PC was nasty. This increments/decrements a variable on the PC and can be looked up to see how many friendly or nasty acts a player has committed to this NPC.
SetHasAdviceCall to indicate this NPC has some advice to give to this PC and which advice set if so.
SetHasInterjectionCall to indicate this NPC has an interjection to make to this PC and which one if so.
SetInterjectionCall to set the interjection value.
SetOneLinerSet whether an NPC has a one-liner available to make.
SetPersuadeAttemptIndicate that the PC attempted to persuade the NPC.
SetRespawnLocationSet the respawn point to the current location of the caller.
SetRespawnLocationSpecificSet the respawn point for the target to a specific location.
SetThreatenIndicate that the PC attempted to threaten the NPC.
ThreatenCheckThreaten check.


 author: Charles Feduke, editor: Mistress