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.


 

 

BioWare Blog
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)
Sat, 21 November 2009 12:08PM

Hide/Show

Buy Premium Modules

Top NWN: HotU Modules:
1. Good vs Evil III
2. More...

Top NWN: SoU Modules:
1. Good vs Evil III
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

5,039,803 BioWare Users:
  35 Logged In
  2 Hidden
  168 Guests

838 Playing Online
  100% NWN
  97% NWN: SoU
  100% NWN: HotU

446 Registered Guilds

8,767,811 posts in forums

Newest Forum Topics:
1. Using Get and Set LocalObject on... (NWN 1: Scripting)

2. Spawn door OnEnter / Despawn doo... (NWN 1: Scripting)

3. ***Theory on Scars + Ashley/Kaid... (Mass Effect 2 General Discussion (No Spoilers Allowed))

4. Sword of Truth module (NWN 1: Modules Discussion)

5. PRC level 9 spells (NWN 1: Custom Content)