Blueprints and Objects

This section deals with blueprints and objects (creatures, items, placeables, etc)

Creatures

This section deals with creatures.

Companions

Gnorian asked for help making companions in this thread and Dorateen came up with the following reply:

Credit to Celestian the Good:

Making a companion, step by step.

First create your companion NPC. I made a fighter/wizardlevel 1/1 and called him Melf the Elf. His Tagname is "melf" and his resref/template was gh_henchman_melf01.

Load up this new NPCs properties and select import properties->script set and load up "c_CompanionScripts.xml". If you do not have this file you can create it by loading the properties of one of the official campaings companions and selecting export properties->script set and save as "c_CompanionScripts.xml".

Next create a conversation.

Right click the root section, select add and for the text just say "Would you like a new companion"?
right click the line you just created and click add and for the text use "Yes, please join my group.".

Now, find and click the "Actions" tab below and add the following global action scripts:

ga_roster_add_object
ga_roster_selectable
ga_roster_party_add
ga_reset_level

Once you have all the scripts added and in the order above click "refresh" for each script to see the variable options. Once you see those enter in the following values:

ga_roster_add_object sRosterName:melf sTarget:melf
ga_roster_selectable sRosterName:melf bSelectable:1
ga_roster_party_add sRosterName:melf
ga_reset_level sCreature:melf bUseXPMods:1

Replace "melf" with whatever tag you used for your companion.

Save the conversation and then add it to your new companions conversation (under properties).

Place the NPC somewhere in your module and go talk to him. Hit the "yes" response and he should be your new best friend!

Further down, ByblosHex adds this advice:

Note that the NPC's tag must be 10 or less characters for these scripts.

Continue further in the thread for a discussion about how to structure companion conversations. I'll try to pull all of these elements together in a more coherent form at some point.

Check out the full thread:
http://nwn2forums.bioware.com/forums/viewtopic.html?topic=537485&forum=1...

NWN2Toolset: Companions

NWN2Toolset has released a short and sweet tutorial on creating companions.

Check it out:
http://www.nwn2toolset.dayjo.org/ToolsetTuts/merchants/companion.html

NWN2 Toolset: Creatures

NWNmaster over at nwn2toolset.com has a great set of tutorials for working with creatures and encounters. His current list of topics include: Create an NPC Adjust Creatures Inventory How to setup Generic Encounters How to setup Custom Encounters Head on over and check it out:

http://www.nwn2toolset.dayjo.org/ToolsetTuts/blueprints/creatures/creatures.html

 

Persistent Zombie

This is a quick to tutorial I posted to the Vault while exploring creatures and scripting in the toolset. It will show you how to:

  • Create a custom creature
  • Create custom items
  • Change properties on creatures and items
  • Edit a script for a creature.

Specifically we will create a new zombie that has the properties of a troll. Our zombie will regenerate and can only be killed by fire or acid, but we'll make a few adjustments to the script.

You can view it from the vault here:
http://nwvault.ign.com/View.php?view=NWN2Tutorials.Detail&id=37

Why is everyone injured?

Patch 1.04 is apparently responsible for making all the NPCs standing around the module injured. It has something to do with current hit points versus max hit points. Here's a thread talking about it:

http://nwn2forums.bioware.com/forums/viewtopic.html?topic=561730&forum=1...

Reports suggest that this only affects previously created module. New modules don't seem to suffer from this bug.

A suggested fix was to manually look at the characters' current and max hit points in the Toolset.

Placeables

Information on placeables.

Containers

Don't forget that containers (chests, dressers, long dead corpses to loot, etc.) should have the following flag set under the behavior section of the properties window:

Has Inventory?: TRUE
Static: FALSE
Useable?: TRUE

If you want dynamic treasure, make sure you define a treasure script for the On Death and On Open events. One option, gp_treasure_op_de, is documented here: http://www.wendersnaven.com/node/65

Leaving the faction to hostile will allow players to bash the object without any real repercussions. In NWN1, setting the faction to a neutral faction would cause any nearby members of that faction to attack the PC if certain events were triggered. If I recall, these were On Death and On Disturbed. I'm unsure what events trigger reactions in NWN2, but they are probably the same.

Converting to Environmental

Converting placeables to environmental objects reduces the size of areas. I think it also increases performance for players. Environmental objects do not cut into the walkmesh, meaning that players will be able to walk right through them. Sometimes this is not an issue, such as when they are out of the walkmesh anyway, but otherwise you will want to use the walkmesh cutter trigger to keep players from walking through your objects.

Caution converting Environmental to Placeables

johnbgardner posted this warning to other builders in the official forums:

I just noticed that when you convert an environmental object back to placeable the Current Hit Points, Hardness, and Hit Points are left at 0. Believe it or not this makes the placeable unuseable regardless of the Useable setting. It was driving me crazy that one placeable could be used while another with identical properties (except for the above which I had ignored) wouldn't. Setting those properties back to the default values made the object useable again. Wierd.

See the thread here:
http://nwn2forums.bioware.com/forums/viewtopic.html?topic=535748&forum=1...

Lights

I opened one of the OC areas to see what settings they defined for realistic firelight (torches, candles, fireplaces, etc). Based on that, these are the settings I am using for basic light sources:

Behavior

  • Lerp: False
  • Flicker: TRUE
  • Flicker Variance: 0.05
  • Flicker Rate: 18
  • Flicker Type: Jumpy

Shadows

  • Cast shadow?: True
  • Shadow Intensity: Between 0.3 and 0.6 depending on how it looks.

You may also want to nudge the colors just a bit towards red and orange. Not to the point of being overpowering, but just enough that it's not plain white and gives a subtle red/orange undertone.

nwn2toolset: lighting tutorial

Nwn2toolset posted this great tutorial on using lights by Geethree. It covers shadows, lerp and some other great items that you might have missed on your first pass through the lighting options.

Check it out here:
http://www.nwn2toolset.dayjo.org/ToolsetTuts/blueprints/lights/light.htm...

Variables

You can set variables on blueprints and objects by clicking on the "..." icon in the "Variables" field under the "Scripts" section of the Properties window. Choose the variable type that you will use (string, integer, etc) and place the value in the appropriate field.

This allows you to set flags that scripts can read. This is how switches work.

There have been some reports that setting a value without setting the type will result in a corrupted module. Hopefully this will be fixed soon, but in the meantime, make doubly sure you set the type when assigning variables.