Placeables
From NWN1 Custom Content Guide
Contents |
[edit] Modeling
There is a tutorial on Creating Simple Placeables that builds a tree model and explains shadows, PWK meshes (placeable walk meshes that keep people from walking through your placeable like it doesn’t exist) and other concepts.
[edit] PWK
| Image:Placeable walkmesh.png | The PWK is the placeable's walkmesh boundry so you don't walk through the placeable. It should be a simple flat plane, Try not to make it overly complex or have multiple objects, not sure on how NWN would react to that. It should also contain information on the use nodes (use01 and use02), which tell the PC where they should go to 'use' the placeable (see below). |
[edit] Under MDL Suite
- Name it Placeablename_pwk i.e. PLC_X02_pwk
- Apply the PWK modifier to the object.
- Export.
[edit] Under NWMax
- Make a dummy object called Placeable_name_pwk i.e. PLC_X02_pwk
- Apply the PWK modifier to the DUMMY OBJECT
- Parent your plane bounding object to the dummy object.
- Parent your use nodes as well to the dummy object.
- Export.
[edit] Under Auraexport
- Make a dummy object called Placeable_name_pwk i.e. PLC_X02_pwk
- parent your PWK mesh to this dummy
- Parent your use nodes as well to the dummy object.
- export
[edit] Tilefade
[edit] Animations
This tutorial does not talk about animating a placeable. Now that we have done animation for a creature, placeable animations are a breeze. There are a number of placeable animations:
| Animation Name | Description |
| Default | The animation that occurs all the time unless turned off in the toolset or through a script command. Normally there is nothing in the default animation (reduces load on the CPU). |
| Damage | Plays when the object is struck and damaged. For most objects it is a simple shiver. |
| Die | Plays when the object is destroyed. Emitters bound to the placeable should be set to Detonate type, and are activated by setting some Detonate events in the model base. Transitions to Dead. |
| Dead | Plays after the object has been destroyed. Usually it is dropped below ground level to get it out of sight before it fades out of the world. |
| On | Animation that plays when the object is ‘on’ |
| Off | Animation that plays when the object is ‘off’ |
| On2Off | Animation that plays when the object switches form on to off. For example, levers go through this state when switching from on to off. |
| Off2On | Reverse of On2Off |
| Open | Similar to the On/Off/On2Off, only, obviously, for Open/Close animations. |
| Open2Close | |
| Close | |
| Close2Open |
| Warning | If you put an alpha texture on a placeable, the texture itself will not cast shadows. To get the placeable to cast shadows, create an object (typically with a simpler geometry corresponding to the shadow you want), set it Render=No and Shadow=Yes, and plunk it down over top of your regular object. |
Note that placeables do not usually move. What if you want a placeable that can (say, a cart)? It is quite easy - you don't need any animations in the file at all. Take your cart and rename it as a creature (c_cart). If it is a compiled model file you can just rename the file. Otherwise you will need to change the internal model names as well. Edit the appearance.2da file to add the cart as a creature (refer to the tutorial on creatures for details). Set the movement column to 0 (no movement) or else the creature will jump around during combat when attacked.
[edit] Dummy Nodes
| Image:Placeable.png | Aside from the usual standard set of dummy nodes, there are two nodes that are for useable placeables, to dictate where the PC goes. Take for instance, the floor lever, PLC_D01. (I've hidden the geometry for the rest of this page to help identify the node and where it goes).
First off, the name of the dummy node is important! It should have a prefix corresponding to the name of your placeable, minus the first 4 characters as it ignores the "plc_" part. It can be any length, up to the standard game resource of 16 characters, but due to the helper node suffices, you're pretty much limited to 7 character max for the placeable name (since "_head_hit" is the longest at 9, that leaves 7 usable out of the 16 chr limit). In this case, the name of every dummy object for the lever starts with D01. | ||
| Image:Placeable ground.png | D01_ground - Where effects go that are localized to the ground (i.e. the VFX when you cast Stoneskin). | ||
| Image:Placeable head.png | D01_head - Where you 'look' when highlighting the object. | ||
| Image:Placeable headhit.png | D01_head_hit - Where effects go when applied on the object that affect the mind (i.e. Confusion, True Sight). | ||
| Image:Placeable hand.png | D01_hand - location of spell effects if the placeable casts anything. | ||
| Image:Placeable impact.png | D01_impact - Where weapons and spells go when attacking the placeable. | ||
| Image:Placeable use.png | D01_pwk_use01 and D01_pwk_use02 - tells where the PC should go when using the placeable (nearest node to PC). There is a limit of 2 use nodes (use01 and use02) you can place. The prefix must be 3 characters, but does not have to be taken from the placeable's index name.
|
So the final object tree for a placeable would be:
| PLC_X99 (AuroraBase) | |||||||||||
| PLC_X99_PWK (dummy node - AuroraPlaceable) | X99_impact (dummy node) | X99_hand (dummy node) | X99_ground (dummy node) | X99_head (dummy node) | X99_head_hit (dummy node) | model geometry (mesh) | more model geometry (mesh) | ||||
| PLC_X99_PWK (mesh - plane) | X99_pwk_use01 (dummy node) | X99_pwk_use02 (dummy node) | |||||||||
[edit] Emitters
Emitters are used for the placeable for when the object is destroyed. It is set to animate on the Death animation sequence and spew out chunks of dust and random objects to give the illusion the object has been broken.
[edit] Scripting
Main_Page | Placeables
