BioWare Atari
BioWare Info BioWare Games Support Forums Visit the BioWare Store
Neverwinter Nights Home
Neverwinter Nights Home
Sections: New Creatures & Placeables | New Tilesets | New Scripts

Go to (Previous  - 1. About, 2. Introduction, 3. Script: Set Name, 4. Script: Set Wing, 5. Commands - Next )



Georg's Scripting Extreme Close-Up II: Get/Set Wing Type

By Georg Zoeller

This article discusses new scripting commands introduced in the 1.67 Update and demonstrates one possible way of using these commands to add interesting new features to a module or persistent world.

This article assumes that the reader is somewhat proficient with Neverwinter Script, but a demo module and downloadable .erf is provided for simple import and text.

SetCreatureWingType

Image 1 - Bag 'o Scripting Booty: Georg's Scripting Extreme Close-Up II: Set WingThis command lets wings be attached to any model that supports them, most prominently any kind of player model or part-based humanoid.


GetCreatureWingType

Image 2 - Bag 'o Scripting Booty: Georg's Scripting Extreme Close-Up II: Set WingThis command tells you what wing model is currently attached to a model.


CREATURE_WING_TYPE constants

Image 3 - Bag 'o Scripting Booty: Georg's Scripting Extreme Close-Up II: Set WingThese constants are defined nwscript.nss and correspond to entries in wingmodel.2da.


Example Application: Winged Cloaks

The following example demonstrates how to use the new functions to create a cloak item that will spawn a pair of wings on its owner while the cloak is worn.

Image 4 - Bag 'o Scripting Booty: Georg's Scripting Extreme Close-Up II: Set WingUsing tag based scripting, it is possible to use a single script to add any wing type to every equipable inventory item that can be created in the toolset.

Note that these items will only work on Player characters, as the OnEquip event handler for tag based scripting is set to only fire for player characters by default.

Image 5 - Bag 'o Scripting Booty: Georg's Scripting Extreme Close-Up II: Set WingItems using this script will not overwrite wings on a character from any other source (i.e. a red dragon disciple using an Eagle's Wings cape will not lose his dragon wings when using the item)

Image 6 - Bag 'o Scripting Booty: Georg's Scripting Extreme Close-Up II: Set WingTo tell the module which type of wings your item should add to the wearer, you can set a new integer variable "X3_S_ITEM_WINGTYPE" on the item (through the button on the "Description" tab on the item's properties dialog), with a value corresponding to the CREATURE_WING_TYPE_* constant of the wings you want the item to grant.

Downloads

Builders - You can use the script and 6 premade cloaks (added to the Misc\Clothing\ category in the toolset) in your module by downloading the .erf file below and importing it into your module using the File -> Import function in the main toolset menu.

Download x3_it_wingtype.erf

Players - You can test the items discussed in this article by downloading the demo module and copying it into your nwn\modules directory. You can then start the module through the game main menu and access all the items discussed in this and the other articles by talking to the storekeeper in the first area.


 

 

Sign up for the Dragon Age: Origins World Builders Newsletter
Neverwinter Nights 2 Forums
Hide/Show

English
Deutsch
Français
Español
Italiano

Hide/Show

View Latest Screenshots 

View Latest Screenshots
Hide/Show

Multiplayer Games at Neverwinter Connections

Today
Schedule a Game...



Current time is: (set time)
Tue, 06 January 2009 10:11PM

Hide/Show

Buy Premium Modules

Top NWN: HotU Modules:
1. TORTURED HEARTS II.
2. More...

Top NWN: SoU Modules:
1. TORTURED HEARTS II.
2. More...

Top CEP Modules:
1. The Lord of Terror The Diablo Campa...
2. More...

Top Modules - NWVault:
1. Hall of Fame
2. More...

Total Modules: 4423

Hide/Show

4,293,040 BioWare Users:
  109 Logged In
  11 Hidden
  341 Guests

1972 Playing Online
  100% NWN
  100% NWN: SoU
  102% NWN: HotU

484 Registered Guilds

7,986,748 posts in forums

Newest Forum Topics:
1. Ranger/Cleric in G3 fixed game (Baldur's Gate II: SoA and ToB General Discussion)

2. New DM needed (NWN 1: Dungeon Master's Realm)

3. BG install question (Baldur's Gate and TotSC Technical Support)

4. Campaing event - Dasaria (NWN2: Persistent Worlds & Multiplayer)

5. ActionSpeakStrin... (NWN2: Builders - NWN2 Scripting)