BioWare Atari
Información sobre BioWare Juegos de BioWare Soporte Foros 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 Store
Neverwinter Nights 2 Forums
Mostrar/Ocultar

English
Deutsch
Français
Español
Italiano

Mostrar/Ocultar

Ver las últimas pantallas 

Ver las últimas pantallas
Mostrar/Ocultar

Multiplayer Games at Neverwinter Connections

Today
Schedule a Game...



La hora actual es: (insertar hora)
dom, 22 noviembre 2009 12:04

Mostrar/Ocultar

Download 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

Mostrar/Ocultar

5,048,422 usuarios de BioWare:
  77 conectados
  1 ocultos
  222 invitados

1471 Playing Online
  100% NWN
  99% NWN: SoU
  100% NWN: HotU

447 Registered Guilds

8,768,423 mensajes en los foros

Temas más recientes de los foros:
1. Weapons Of choice? (Jade Empire Xbox General Discussion (Spoilers Will Be Moved))

2. setting time in a script. did I... (NWN 1: Scripting)

3. Another update coming next week? (Mass Effect 2 General Discussion (No Spoilers Allowed))

4. Inferno armor available at Amaz... (Mass Effect 2 General Discussion (No Spoilers Allowed))

5. Will ME2 feature "ME1" or "DAO" ... (Mass Effect 2 General Discussion (No Spoilers Allowed))