BioWare Atari
BioWare Info BioWare Spiele Support Foren 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
Anzeigen/Verbergen

English
Deutsch
Français
Español
Italiano

Anzeigen/Verbergen

Neueste Bildschirmfotos anzeigen 

Neueste Bildschirmfotos anzeigen
Anzeigen/Verbergen

Multiplayer Games at Neverwinter Connections

Today
Schedule a Game...



Aktuelle Uhrzeit: (Zeit einstellen)
So, 22 November 2009 01:50

Anzeigen/Verbergen

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

Anzeigen/Verbergen

5,049,399 BioWare-Benutzer:
  61 Eingeloggt
  4 Verborgen
  217 Gäste

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

447 Registered Guilds

8,768,532 Einträge in den Foren

Neueste Themen in den Foren:
1. Toolset work with Vista? (NWN2: Builders - NWN2 Toolset)

2. Vale of Merdelain (NWN2: Players - Storm of Zehir (Spoilers Warning))

3. Freezing at Specific character's... (Baldur's Gate II: SoA and ToB Technical Support)

4. Won't let me create new topic (Web Site Help)

5. BUILDERS - Showcase YOUR Talent! (NWN 1: Guilds and Registry - Ye Olde Tavern)