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=113

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 Character Builder

lancerlot_30v recently posted a great new site with a robust character builder tool called the NWN2 Character Builder. Check it out at http://nwn2db.com. It's great for those times when you are in the toolset and can't remember what feats an NPC should have.

See the full forum thread announcement.

Thanks to BeyondthePale for posting this to the nwvault front page.

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=113

Effects

Here you can find information concerning the effects in the nwn2 Toolset.

DLA Tutorial: Effects

BenWH over at DLA has posted another great tutorial for the nwn2 Toolset. This time he takes on the effects editor.

Well, this is actually a plug in, but it comes included with the toolset, so I've placed it here with the tutorials.

We're going to create just one effect to get started, but because I am far from being a dab hand with this editor, you can then use this experience to get comfortable with it:

Read the full tutorial:
http://www.dladventures.net/vB/showthread.php?t=3843

nwn2toolset: Visual Effects Plugin Tutorial

There's a good tutorial on nwn2toolset.com on using the visual effects editor, where he takes you though the process of making a snow effect.

Check it out here:
http://www.nwn2toolset.dayjo.org/ToolsetTuts/plugin/visualeffects.html

 

pfx/bbx/sef

Pfx get generated by the effects editor and should be saved in your campaign's individual folder inside the campaign folder.

For example:
C:\Documents and Settings\\My Documents\Neverwinter Nights 2\Campaigns\\effect1.pfx

More from LysanderReturns at http://nwn2forums.bioware.com/forums/viewtopic.html?topic=520330&forum=1...

"The pfx/bbx/sef files associated with your custom vfx can go into a custom campaign folder, ie a new campaign. The /campaigns folder is for holding /campaigns/[individualcampaign] folders.

ie: campaigns/Purgatorio/customvfx.sef would make the customvfx.sef accessible for any modules associated with the Purgatorio campaign (using the campaign editor).

The .sef can also go into a hak. It will also work in override.

Finally, there is Dev post around here somewhere that says you can put them in the temp module folder and they will get saved into the module.

-Monty"

Currently, the suggested way to add a sef file to a module at the time of play is to place it in the override directory. The next patch is supposed to address some issues hak files.

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.html

Stores and merchants

From the official documentation:

"Stores are only accessed through script in a conversation – they are not objects that the player can detect. Stores have blueprints just like other types of objects. After you create your store’s blueprint, place it on the map normally. It is generally best to place your store next to the NPC. Check out the Sample Module for an example of a store."

Stores are usually started from a script attached to a conversation using the "ga_open_store" script. Place a store in the area and use the tag for the store as the first parameter.

Item costs 

The nMarkUp and nMarkDown parameters are for when you want to adjust a store's buy and sell price due to a plot driven situation or some other condition. Generally, you can leave these at 0 and 0.

You can create your own stores based on the pre-generated ones by right clicking and choosing copy blueprint. Note that when you do this, the seling and buying percentages are both 0. If you don't fix this, everything in your store will have a base cost of 1.

Thanks to seryn for doing the leg work to figure out that the OC uses a standard sell price of 100% when players purchase items and a 40% of sell price when the store buys from the player. These options are located in the properties window of the store. This is also the balance that Berliad's FRW character creator uses.

Plugins

If you're having problems working with items in stores, you may want to consider Lazjen's CPS Inventory Manager. Some features in this plugin include:

  • Full item listing per store tab panel
  • True Item Costs that match in game amounts
  • Icons shown next to items
  • The ability to choose the quantity of an item (use -1 for infinity in Stores)
  • Link to the property editor and previewer
  • A selection of filters on the items shown: Included Base Item Types, Exclude Creature Items, Exclude Zero Quantity Items, Exclude Zero Cost Items, Cost Range Filter, Name Filter and Description Filter
  • Some filter settings remembered between sessions (work in progress)
  • Buy/Sell item types setup for Stores
  •  

Issues with stores in patch 1.05

GodBeastX, Ash Darkwood and others recently reported a problem with patch 1.05 where you can no longer  set the buy and sell list of item types for stores. Apparently this worked fine in 1.05 beta, but now throws an exception and makes it impossible to set up these lists in 1.05 final.

The bug was reported and acknowledged by Rob McGinnis, Obsidian Community Coordinator.

Check out the thread here:
http://nwn2forums.bioware.com/forums/viewtopic.html?topic=560804&forum=113&sp=0

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.