Table of Contents

Table of Contents

Table of contents TABLE OF CONTENTS I GLOBAL ACTION 3 GLOBAL ARTIFICIAL INTELLEGENCE 32 GLOBAL GROUP 55 GLOBAL PLACEABLES 59 GLOBAL REPORTS 61 GRAPHICAL USER INTERACE 64 i NWN2 STOCK SCRIPTS VOL I MAIN SCRIPTS (ABRIDGED) PRESENTED BY GAMEMASTER X & THE KNIGHTS OF THE CHARRED TABLE WWW.KALIFORNICA.COM [email protected] ii FOREWORD HI, GAMEMASTER X HERE. I WAS PEEKING UP THE GAMES SKIRT AND LOOKING AT ALL ITS PRIVATE PARTS AND IT OCCURRED TO ME IT WOULD BE NICE TO HAVE ALL THE STOCK SCRIPTS IN AN E-BOOK FORMAT. WHAT YOU HAVE HERE IS VOL 1 OF A THREE PART SERIES OF NEVERWINTER NIGHTS 2 STOCK SCRIPTS (THE ONES THAT INSTALL WITH THE GAME). VOL 1 CONCENTRATES ON MAIN SCRIPTS OR THOSE SCRIPTS NOT SPECIFIC TO SPELLS OR A SPECIFIC AREA. MY INTENTION IS FOR THE FINAL SERIES TO BE LAID OUT AS FOLLOWS. VOL I MAIN SCRIPTS VOL II SPELL SCRIPTS VOL III AREA SCRIPTS VOL IV 2DA Global Action // ga_alignment /* This changes the player's alignment nActType = From a scale from +3 (Saintly/Paragon) to -3 (Fiendish/Anarchic), how much the act affects alignment bLawChaosAxis = 0 means adjust Good/Evil axis, 1 means adjust Law/Chaos axis */ // ga_attack /* This script makes the sAttacker attack the PC. It should be placed on an [END DIALOG] node. Parameters: string sAttacker = Tag of attacker whom will attack the PC. Default is OWNER. */ // ga_attack_target iii /* This script makes the sAttacker attack the sTarget. It should be placed on an [END DIALOG] node. Parameters: string sAttacker = Tag of attacker. Default is OWNER. string sTarget = Tag of Target. Default is PC. */ // ga_blackout // // wrapper function for FadeToBlackParty() to instantly make screen black. Useful for the // first node of conversations. // CGaw & BMa 2/13/06 - Created. #include "ginc_cutscene" void main() { object oPC = (GetPCSpeaker()==OBJECT_INVALID?OBJECT_SELF:GetPCSpeaker()); FadeToBlackParty(oPC, 1, 0.0); } // ga_camera_facing_point _party /* Point the cameras of all PCs' in the Speaker's party to target sTarget. Camera will be fDistance meters away from the PC, and pitched at fPitch degrees. -fDistance can be between 1 and 25. At least 5 is advisable in most cases. 0 = use distance of current camera value -fPitch can be between 1 and 89. 89 is nearly parallel to the ground. 1 is almost directly overhead. 60-70 is usually a reasonable default. 0 = use pitch of current camera value - nTransitionType can be 0 or between 1 and 100. The higher the 4 number, the faster the transition. 0 = snap to new facing, no transition. */ // ga_clear_comp() /* Removes all roster members from the PC party. Removed roster members are not despawned. */ // ga_compshift /* This is the companion shift script that adjusts a companion's reaction to the PC nCompanion = This is the integer value of the companion in question nChange = This is the amount their reaction is adjusted nOverride = If this isn't equal to 0, the companions reaction is set to this amount. Use with caution. */ // ga_conversation_self /* start a conversation file with yourself. Parameters: string sConversation = Conversation file to start. */ // ga_create_obj(string sObjectType, string sTemplate, string sLocationTag, int bUseAppearAnimation, string sNewTag, float fDelay) /* Wrapper for CreateObject() with optional delay. 5 Parameters: string sObjectType = Object type. The following are allowed: C - CREATURE P - PLACEABLE I - ITEM W - WAYPOINT S - STORE string sTemplate = Name of the template to create. string sLocationTag = Tag of the waypoint at which to create the object. int bUseAppearAnimation = If =1, object will use appear animation. string sNewTag = Optional new tag for created object. float fDelay = Delay, in seconds, before creating the object. */ // ga_cutscene_move // // Move and delay the advancing of the conversation for a maximum of nMilliseconds. // Conversation will also advance if the move completes. // ga_date_advance /* Advance date by amount indicated nYear - Number of years to advance. nMonth - Number of months to advance. nDay - Number of days to advance. */ // ga_date_set /* Advance date by amount indicated nYear - Specific year to set calendar to from 1340 to 32001. nMonth - Specific month to set 6 calendar from 1 to 12. nDay - Specific day to set calendar to from 1 to 28. */ // ga_death /* This script makes objects appear dead sTag = The tag(s) of the object(s) to make dead. You can pass multiple tags, seperated by commas (NO SPACES) to make multiple objects dead (ie. "Object1,Object2,Object3") iInstance = The instance of the object(s) to make dead. Pass -1 to make all instances dead. */ // ga_destroy /* This script destroys objects sTag = The tag(s) of the object(s) to destroy. You can pass multiple tags, seperated by commas (NO SPACES) to destroy multiple objects (ie. "Object1,Object2,Object3") NOTE: There may eventually be a function to eat white space (See Mantis 3296), but for now do not put spaces in the string. iInstance = The instance of the object to destroy. Pass -1 to destroy all instances. Pass 0 to destroy the first instance. fDelay = The delay before destroying the object(s) */ // ga_destroy_item /* This takes an item from a player 7 sItemTag = This is the string name of the item's tag nQuantity = The number of items to destroy. -1 is all of the Player's items of that tag. nPCFaction = Take from the whole PC faction */ //ga_destroy_party_hen chmen /* Destroy all henchmen in the entire party */ // ga_disable_scripts /* saves and clears the event handlers */ // ga_donothing.nss /* Do nothing, really. */ // ga_door_close /* This closes a door sTag = The tag of the door to close nLock = Set to 1 if you want to lock the door after it closes */ // ga_door_open /* This opens a door sTag = The tag of the door to open */ // ga_effect /* Does an effect on the specified target. This function takes 5 params: string sEffect - one of the below effects string sParams - comma delimited list of needed params string sDuration - I - Instant 8 (default), P - Permanent, or T,<duration> - Temporary w/ specified duration ex: temporay 30 seconds would be "T,30.0f" int iVisualEffect - -1=no visual, 0 = standard visual, or supply your own from visualeffects.2da (will be applied as an instant) string sTarget - Uses the standard GetTarget() function - default is the PC Speaker *** Effects and Paramaters *** AbilityIncrease - nAbility , nModifyBy -- Abilities: Str=0, Dex=1, Con=2, Int=3, Wis=4, Cha=5 AbilityDecrease - nAbility, nModifyBy Blindness - no params Damage - nDamageAmount, nDamageType, nDamagePower -- Types: Bludgeon=1, acid=16, fire=256, etc.; Powers: Normal=0, PlusThree=3, etc. Death - no params Disease - nDiseaseType -- (0-16) see DISEASE_* constants in nwscript.nss Heal - nDamageToHeal Paralyze - no params Poison - nPoisonType -- (0-43) see POISON_* constants in nwscript.nss Raise - no params Visual - nVisualEffectId -- see visualeffects.2da for param options Example 1: This action script will heal the PC Speaker 100hp in a conversation ga_effect ("Heal", "100", "", 0, "") Example 2: This action script will permanently give the PC Speaker in a conversation increased strength (+2) ga_effect ("AbilityIncrease", "0,2", "P", 0, "") */ // ga_enable_scripts /* restores the saved event handlers */ 9 // ga_end_game( string sEndMovie ) void main( string sEndMovie ) { EndGame( sEndMovie ); } // ga_face_target(string sFacer, string sTarget, int bLockOrientation) /* This script commands sFacer to face sTarget. Parameters: string sFacer = Tag of object that will do the facing. Default is OWNER string sTarget = Tag of object that sFacer will orient towards. int bLockOrientation = If =1, dialog manager will stop adjusting sFacer's facing for the active dialog. */ // ga_faction_join /* This script makes sTarget join a new faction. sTarget - The target who's faction will change (see Target's note). sTargetFaction - Either one of the 4 standard factions $COMMONER, $DEFENDER, $HOSTILE, $MERCHANT or a target who's faction is to be joined (must be a creature) */ // ga_faction_rep /* This script makes sTarget be viewed differently by a faction. sTarget - The target who will be viewed differently (see Target's note). sTargetFaction - Either one of the 4 standard factions $COMMONER, $DEFENDER, $HOSTILE, $MERCHANT or a target who belongs to the faction (may or may not need to be a creature) sChange - the amount to change the faction reputation by. (May later be ammended to allow setting). */ // ga_fade_from_black // // wrapper function for FadeToBlackParty() to fade all party members from black. If the screen // had previously faded into a specific color, FadeToBlackParty() will fade back from that color. // // fSpeed controls how quickly, in seconds, the screen will fade to black. Setting this to 0 will // result in an instant fade from black. Standard value is 1.0. 10 // // bColor allows users to specify what color the screen should fade back from. Basic colorlist: // 0 = black // ga_fade_to_black // // wrapper function for FadeToBlackParty() to fade all party members to black. // // fSpeed controls how quickly, in seconds, the screen will fade to black. Setting this to 0 will // result in an instant fade to black. // // fFailsafe indicates the maximum lenght of time, in seconds, that the screen will remain black // before automatically fading back in. Leave at 0.0 to use the default value of 15 seconds. // nColor allows users to specify what color the screen should fade into. Basic colorlist: // 0 = black, 16777215 = white. Hex Values for colors may be found in NWN2_Colors.2da, though // they must be converted to

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    70 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us