Vai al contenuto

Foto

Modding Tips


  • Effettua l'accesso per rispondere
Questa discussione ha avuto 23 risposte

#1
rjshae

rjshae
  • Members
  • 4477 Messaggi:

This thread is a place to post various tips and information about modding the Neverwinter Nights 2 game. Here are a few starting points (in no particular order):

Useful tools:

  • TlkEdit2 -- a tool for editing 2da, tlk, and gff files
  • NWN2Packer -- a utility for packing and unpacking hak, pwc, erf, and mod files
  • MDBCloner -- a utility for making texture file name changes to simple models
  • Gmax -- a free 3D modelling software package
  • Blender MDB Import/Export plug-in -- allows MDB files to be edited in Blender

Sites for posting completed mods:

Forum threads:

Please feel free to add more links and useful information below.


  • Rolo Kipp piace questo

#2
rjshae

rjshae
  • Members
  • 4477 Messaggi:

Here are some GIMP plug-ins that may be useful for building textures:

  • GIMP Normal Map -- this builds a normal map based upon the patterns in the texture
  • Make Seamless -- allows you to create a seamless texture suitable for tiling
  • gimp-dds -- for opening and exporting DDS files in the NWN2 format

  • Rolo Kipp piace questo

#3
Dann-J

Dann-J
  • Members
  • 3161 Messaggi:

Customising body bags

 

NWN2 hidden content

 

SnipMDB tool (split/combine multi-part models)

 

MDB Manipulation tool (for rotating models)

 

FXE Generator tool  (lip synching)


  • A rjshae e Rolo Kipp piace questo elemento

#4
rjshae

rjshae
  • Members
  • 4477 Messaggi:

If a 2da editor replaces tab column separators with spaces, the 2da file size can increase significantly. To shrink it back down, you can use the NWN_2daEditor with the Compress option. (Thanks to kevL for this tip.)


  • Rolo Kipp piace questo

#5
kevL

kevL
  • Members
  • 4052 Messaggi:

Advanced Script Compiler for NWN2

- contains two compilers: first as a .Dll for regular use in the toolset, second as a standalone executable called from a command-shell or programmer's editor.

- outputs better error messages, as well as better code than the default NwScript compiler.


  • A rjshae e Rolo Kipp piace questo elemento

#6
rjshae

rjshae
  • Members
  • 4477 Messaggi:

Original Bioware Format Documentation



#7
rjshae

rjshae
  • Members
  • 4477 Messaggi:

For the record, here are the steps I've been using to convert NWN tile sets to NWN2. There may be a better approach, but this has been producing the results I wanted.

To start with, all of the tileset mdl files are loaded into a working directory, along with the texture files. (See the import_mdl_tutorial_v1.0.pdf file for details on how to import mdl files and NWN textures into Blender.) I usually need to convert the texture files into a .dds file suitable for NWN2. (I usually open the .tga file in gimp then export using the gimp-dds plugin with DXT3 compression and generating mipmaps.) Texture files are typically 512x512 or smaller.

 

The tiles will have names like 'tcn01_a20_01', where the tcn01 is the set prefix and the a20_01 is the tile identifier. Each tile may have a large number of component parts, with names that may not help in identifying their role. What are called metatiles in NWN2 will usually consist of sets of tiles that need to be joined together--they are typically in the higher letter ranges such as j01_01, k01_01, l01_01, j01_02, and so forth.

 

1. First, I choose a name and letter code for the tile set port. This code is used on every tile and all of each tile's component parts. The convention for the prefix is: TL_XX_YYYY_##, where XX is your letter code, YYYY is the tile type, and ## is the tile variant (which begins with 01). Important: make sure the XX part is completely unique across all NWN2 tilesets and mods. Duplicate part names result in tiles and placeables displaying parts from other tiles or placeables... generally not a good thing.

 

2. I go through all the useful .mdl tiles, importing them then saving them as .mdb files with the appropriate NWN tile name. The size of the tiles in NWN is 10x10m in the X-Y directions, compared to 9x9m in NWN. Thus, prior to export, I select all of the parts, then do a 's .9' command, scaling everything down by x90%. I can always do this later if I forget, but it is easiest to do it now. When all of the tiles have been converted, I save off a copy of the directory for later reference (and in case I screw up and need to recover).

 

3. The NWN walk meshes can be completely unsuitable for use in NWN2. (I.e. they are uneven and won't bake properly.) Hence the next step is to build a common walk mesh template that will be used for all of the tiles. I start with an existing walk mesh from one of the standard NWN2 tilesets, then try it against several imported tile models, tweaking and modifying the walk mesh accordingly. It only needs to work with the majority of the tiles; the remainder can be fitted by modifying the interior vertices. (Stair tiles, for example.) When finished, I export just the walkmesh to a template .mdb file. 

  • The template walkmesh should be completely flat and level with your normal floor height, and 9x9 in size. You can always modify a copy for uneven tiles such as stairs.
  • I always make sure there are vertices along each edge where the standard door will go: at +0.9 and -0.9 from the midpoint.
  • The vertices along every edge must be in the same locations on all sides, or the walkmesh won't bake. To ensure this, I build one side then make clone copies and rotate them into place. I then merge the copies together and remove doubles, resulting in a symmetrical walk mesh.
  • There is a hard limit on the number of walkable faces allowed per tile: about 127-128 faces. If a placeable in a tile results in more than this amount, then the tile won't bake. For this reason, I try to keep the number of walkable faces below 100. This may mean that I use a modified walkmesh with a reduced number of faces for the relatively open tiles, such as the Open Floor tile or the tiles with just columns.

4. In some cases the tileset may use several textures for the floor surface. If the textures are 512x512, I look for those four textures that are the most frequently used across the tile set, then merge them together into a single floor texture. As a result, I'll need to tweak the UV mapping all of the floor textures. But the effort is worth it since I can then switch floor textures. (The UV remapping may just involve scaling it down my 50% then shifting by 256/512/1024 in the appropriate directions... or it can get a lot messier.)

5. Now I start working on individual tile models. The C2 mesh created by the import can be deleted--tiles don't need it. The floor faces of the C3 mesh can be removed, leaving only the side faces. The walk mesh will need to be replaced with your imported template. In the materials tab, I now set the unwalkable faces of the walk mesh to match the position of the other tile parts and change the other faces to the appropriate surface type. I may need to move some walk mesh edges about and perform splits and rotations on some faces to get a good match, while being careful not to change the edge vertices.

 

In order for interior area FoW to work properly, I've found that it is important to have the outer part of the C3 mesh within about 0.5 units of the edge of the tile, covering the entire length of the side (with the exception of the door opening). The ends of these faces should line up with the outer C3 mesh on neighboring tiles. You may need to test your tileset to make sure that FoW is working properly.

6. Next, I look for parts that can be combined. These are groups of parts that have the same textures and serve common roles across the tile, such as sideboards or beams. Merging these groups together into single parts will significantly cut down the number of objects you need to work with. A list of 20-30 can often be reduced to less than 10. Note that sometimes you don't want to combine certain parts, such as separate sections above and below the fade line for the roof. Once its done I have a much cleaner set of parts to work with.

7. I rename the parts using the prefix that matches the file name. (Important: the name of every part of every model must be unique within NWN2, or I can end up with some tiles showing parts of other tiles in the game, leaving a module in a complete mess.) The following naming conventions are used by the game engine:

  • TL_XX_YYYY_##_F -- floor (or use TL_XX_YYYY_##_RF if I need an irregular floor shape to rotate with the tile).
  • TL_XX_YYYY_##_R -- roof
  • TL_XX_YYYY_## -- main wall component
  • TL_XX_YYYY_##_W -- walk mesh
  • TL_XX_YYYY_##_C3 -- the C3 collision mesh

For the remainder of the parts, I usually put a OBJ_ prefix in front of the name to avoid confusion. However, doing so may cause issues with texture swapping. In particular, a texture can show as swapped in the toolset, but not in the game. If you are concerned about texture swapping, it is best to keep the number of parts to a minimum: one of each type. Also, don't mix _F and _RF parts in the same tile.

 

8. Under the materials tab, I set the Ambient and Diffuse colors to appropriate settings. For some non-floor/ceiling parts I enable shadows so that they will show shadowing in the game. If a part forms a section of the walkable floor but is not in the Floor part (the one with the _F suffix), I enable Projected Textures on that part (by adding _PT to the material name). Important: I always check the normals for every part to make sure all faces are directed toward the exterior (the tile interior); usually these are set correctly unless I added faces. The roof normals should be pointing downward and the floor upward.

9. If there are any door openings, I import a door hook point template then clone and rename it for multiple openings. For a perfect fit, the standard door openings are set to (-0.9, 0.0), (-0.9, 2.7), (0.9, 2.7), and (0.9, 0.0), with the other (X or Y) coordinate set to 4.5.

10. I export the MDB tile model then use a hex editor to go through and modify the texture file names to the set I'm going to use in NWN2. These are found in each of the parts with the RIGD identifier. For the black borders I use the 'tl_xx_blacktexture' texture and normal map.

11. The texture files all need to have normal map files built. This I do via the normalmap plugin for GIMP. (I often get good results with Wrap enabled, Min. Z = 0.02, Scale = 6.0, and a Filter of 3x3 or 5x5.) To avoid moiré effects, texture files should be exported with mipmaps generated, along with compressed mode. (BC2/DXT3 is considered good for textures with a 1-bit alpha channel.) I might also add a tinting texture. Whatever tint settings get applied to the walls are also used for the ceilings, so I build the tint maps accordingly.

After I add the exported tile and the textures to a hak file then modify the appropriate 2da files (tiles, tileset, and tile texture files), the initial tile is ready for a trial view in my toolset, which can help me spot any defects.

12. I re-import the tile and perform any UV mapping work that is required as a result of texture file changes. This may take some patience, but the end result is worth it.

13. Tile edges typically have a black texture cap at the roof level. I like to expand on this part a little to match how it is used in the other tilesets. The end result has a vertical surface with normals facing outward, blocking the player from seeing in through the sides. I usually set the ambient color to black, and give it a name like TL_XX_YYYY_XX_###_CAP for easy identification.

I do another export then perform a final check in the toolset, fixing any issues I see. Sometimes I need to go back make revisions when I try different tiles in combination with each other. Door placement also needs to be checked.


  • A TheOneBlackRider e Kanis-Greataxe piace questo elemento

#8
rjshae

rjshae
  • Members
  • 4477 Messaggi:

If you need a tile component to fade to black with depth, an alternative to building a custom texture is to use a tint map with an overlaid gradient. Dark areas on a tint map will cause the displayed (tintable) texture to darken as well.



#9
bjuandy

bjuandy
  • Members
  • 33 Messaggi:

Thanks for the tips and helping scrubs like me.



#10
rjshae

rjshae
  • Members
  • 4477 Messaggi:

n/m



#11
TheOneBlackRider

TheOneBlackRider
  • Members
  • 378 Messaggi:

Tutorial on rigging skin meshes in Gmax:

http://neverwinterva...wn2-body-models

http://neverwinterva...nwn2-head-model

 

Note: The head tutorial is not really complete, since I was missing some knowledge back then. If you go for heads, also check the body tutorial for additional information.


  • rjshae piace questo

#12
TheOneBlackRider

TheOneBlackRider
  • Members
  • 378 Messaggi:

Here is an easy to use tool for editing alpha (transparency):

 

http://neverwinterva...-tool-nwn1-nwn2



#13
Happycrow

Happycrow
  • Members
  • 612 Messaggi:

After cursing all the various shortcuts and sloppiness a lot of the nwn2 people did, I just discovered something they do that's clever.

Most of the game's armor textures are broken out by race, but a few (leather02, chainshirt03). Since my cc: work is almost entirely pointed at PWs for which size and bandwidth really matter (we have international players who are charged by their usage rather than flat-fee), I wanted to use more of these, and was getting irked until I realized that every single one of these single-file textures used a leather or cloth covering down the front of the midsection and the center of the back.  Looking at my own fill of said areas, that's where the VAST majority of the distortion from different races or from gender differences comes in.. and where the texture is showing a single solid color?  No distortion.

 

It's a cheap trick, but a good one.

 

So if a lightweight textured tabard or equivalent will work for your given clothing or armor, you may be able to get away with one texture file for all races, rather than one for each.



#14
Rekov

Rekov
  • Members
  • 75 Messaggi:

Is there a comprehensive guide for getting a model from Blender into a state where it can be used for NWN2?



#15
Happycrow

Happycrow
  • Members
  • 612 Messaggi:

Seconded: I'd LOVE to ditch 3dsmax at this point.



#16
Tchos

Tchos
  • Members
  • 5030 Messaggi:

There are guides for it, but I don't know how comprehensive they are, since I don't use Blender.  The process is different depending on what kind of model you're talking about, too.  Armour, weapon, creature, placeable, tileset, with/without animation...



#17
TheOneBlackRider

TheOneBlackRider
  • Members
  • 378 Messaggi:

Gmax Render Suite 1.0 Beta 3 - A renderer for Gmax

http://neverwinterva...-gmax-nwn1-nwn2

http://forum.bioware...derer-for-gmax/


  • rjshae piace questo

#18
rjshae

rjshae
  • Members
  • 4477 Messaggi:

Here are some sites that I use for obtaining free assets for use in NWN2. When you find a model you want, you will first need to check the license, then whether there is a suitable filter available to load them into your 3D editor and also whether they have a high or low poly count. Note that these assets are subject to removal by the poster, so if you see something you like, you should download and store it in short order.

 

OpenGameArt

All of the assets on this site have CC license, so they can be used per those fairly open restrictions. For 3D assets, look under the Browse menu and select 3D. There is also a somewhat limited assortment of textures available. The site gets a few new models each week, so it is worth coming back from time to time.

 

ShareCG

I've found some really nice models on this site, and it gets new content on a fairly frequent basis. What I do is click on the formats that I can import into the 3D modeller, then select the acceptable usage rights. You will then need to login to download the packages. Once you find a model you like, also check the Related 3D Models section at the bottom of a download page as those can be similar to what you seek. The site also has some decent textures available.

 

Blend Swap

All of the models on this site are in Blender format, so you will need to use that tool to open the content. There is a lot of content available, and many of them have a high poly count. You will need to search a bit to find one you like. A login is required to download a model, and there is a daily bandwidth limit.

 

TurboSquid

Although this is a commercial site, there is a lot of free content available. Just enter "free" in the search field and sort on Newest. You may end up spending hours looking through the images. The available file types can vary quite a bit though, and often have a high poly count that needs trimming back.

 

Here's a search tip: Under "Product Types" select "3D Models", then under "More" select "Poly Count". A "Poly Count" menu will appear, allowing you to select "Up to 10K". Now you have mostly low poly models shown.

 

3D Warehouse

There is a metric ton of models on this site, and some of it is even decent in quality. Once you find something you like, you will need to use their SketchUp tool to load and then export the model for your 3D modelling tool. Unfortunately, the models are not always optimal and may need a fair amount of cleanup work. For that reason I rarely use these models.

 

TF3DM

This site has quite a list of 3D models available. Unfortunately, many are licensed in a manner that precludes their use. (E.g. Personal use only license.) What I've found though is that if you search for "all" with the "Commercial license only" option clicked, you'll get models with a suitable license. You can also change "license=2" to "license=1" in the resulting URL to show the non-commercial use models. Add "&page=2" to the URL to go to the second page, &c.



#19
rjshae

rjshae
  • Members
  • 4477 Messaggi:

Here's another way to crash your toolset: include a placeable with a RIGD packet that has zero faces.

 

I.e. it's something you can check for if your toolset keeps crashing with a particular placeable. :)



#20
4760

4760
  • Members
  • 1203 Messaggi:

Does it crash immediately, or does it allow you to place some of these placeables before it crashes? I'm asking because I had a similar case and never really fixed it, apart from setting the pivot point to the center of the placeable (meaning you have to move it up so it's not sunk into the ground).



#21
rjshae

rjshae
  • Members
  • 4477 Messaggi:

Does it crash immediately, or does it allow you to place some of these placeables before it crashes? I'm asking because I had a similar case and never really fixed it, apart from setting the pivot point to the center of the placeable (meaning you have to move it up so it's not sunk into the ground).

 

For me it crashed the toolset just as soon as you select the blueprint, even if there is no area open. I got in that state because I was using the 'p' key in Blender to separate out parts in the original model by attached texture, and so ended up with a part that had no faces.



#22
Tchos

Tchos
  • Members
  • 5030 Messaggi:

Another way to crash the toolset is by setting a certain blending mode on a billboard effect.  I can't remember which one it was, because I overwrote it with a different effect to get rid of the crashing.  It doesn't crash the visual effect editor, and doesn't seem to crash the toolset until you place a new copy or reopen the area.



#23
ArtemisJ

ArtemisJ
  • Members
  • 127 Messaggi:

Another way to crash the toolset is by setting a certain blending mode on a billboard effect.  I can't remember which one it was, because I overwrote it with a different effect to get rid of the crashing.  It doesn't crash the visual effect editor, and doesn't seem to crash the toolset until you place a new copy or reopen the area.

 

That's kinda scary..



#24
rjshae

rjshae
  • Members
  • 4477 Messaggi:

There's some nice GIMP tuts here: GimpUsers


  • PJ156 piace questo