Author Topic: Placeables  (Read 485 times)

Legacy_Polris

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
Placeables
« on: December 13, 2014, 08:11:53 pm »


               

Hi, can someone help me with creating a custom placeable. I am trying to make a stalagmite placeable. I have the model and the texture but I have no idea how to get it in game. 


 


Do I need to animate it even if it will be non interactable, non destructible etc..?


 


It's really hard to find tutorials on this stuff. A video tutorial showing how to get a simple cube in game, from start to finish would be awesome but I'll settle for text as well '<img'>


 


 



               
               

               
            

Legacy_Tarot Redhand

  • Hero Member
  • *****
  • Posts: 4165
  • Karma: +0/-0
Placeables
« Reply #1 on: December 14, 2014, 02:49:43 pm »


               

Here's 2 threads from earlier this year that should help.


 


WW2 Submarine for NWN walkthru for PHoD


 


and


 


Basic Gmax Tutorial


 


Both by Randomdays


 


TR



               
               

               
            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
Placeables
« Reply #2 on: December 14, 2014, 03:08:53 pm »


               

<singing an old fleetwood mac song...>


 


You're mostly there! :-)


 


First, can you tell us what tools you are using? Things are slightly different between neverblender, gmax and 3ds max.


 


Next, a great thread for tutorials is HERE and a great thread for tools is HERE :-)


 


Thirdly, be sure to grab the Custom Content Guide (CCG)


 


Ok. The basic procedure for a cosmetic placeable...


 


Add an AuroraBase at 0,0,0. Name it the name of the placeable (usually plc_something) making sure the name before the extension is less than 17 chars. (I've been using "p_something" to give me a larger namespace).


 


Link your mesh to that.


 


Export (you don't need anims for something like this). That will give you a game ready model.


 


Now grab the top-most placeable.2da file you can find in your stack of haks. Make a copy of it and add in a line for the new model. This tells the game what models are available.


 


The new line has a lot of options on it, most of which you don't need to muck with... just browse up through the existing lines and find something similar... a statue, perhaps. Copy that line and add to the end. Change the number, name and name-index (first three columns) to something like:


 


999 "Caves: Stalagmite" ****


(the **** tell the game to use the quoted name instead of looking up the name in the tlk file).


 


Next up is to change the model name to match what you exported. Here's an example I'm working on...


 


847        "Celestial Orb: Sun"        ****     p_orb_sun

 


Ok, now you have a model, a texture and a 2DA telling the game what's up... but the game can't see them yet. In your nwn directory is a utility called nwhak.exe. Open that up and ADD your resources (model, texture and placeable.2da). Save the hak with lowercase name less than 17 chars (my example is rk_celestialorbs). Save the hak to your hak directory.


 


Now add that hak at the top of your mod's hak stack (in the toolset under module properties under the Custom Content tab).


 


Now the mod can read the placeable.2da and see the stalagmite model. But there's no blueprint yet!


 


Go to placeables wizard and create a new placeable. It'll by default have an armoire appearance. Don't stress! Just open the properties and browse down the appearance dropdown until you see Caves: Stalagmite :-) Taken right from column 2 in your spanking new 2da :-)


 


It is now in game :-)


 


Edit: I did not cover creating a PWK (placeable walkmesh). That is a bit more complicated, though the above tutorials should walk you through that. A pwk tells the game where creatures can not walk. So it's actually an anti-walkmesh :-P


 


<...about chains>



               
               

               
            

Legacy_Polris

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
Placeables
« Reply #3 on: December 14, 2014, 08:51:19 pm »


               

Oh wow thanks for the detailed replies. I still have a few questions though.. 


 


When you say "grab the top most placeable .2da file".. do you mean the one in NWN Main Data/data 2da.bif/Game Data (from the nwn explorer)? Or should I look for a .2da file in the NWN: 1.69 Patch Data or in HAK Files? '<img'>


 


Also to answer what I'm using.. I'm using Maya for modeling and unwraping, then I export the file as an .obj and bring it into Max 7 (NwMax). There I apply the texture and use the aurora base to export it as an .mdl file. I've managed to get custom helmets in game but they didn't require any .2da editing and I couldn't figure out how to do that.


 


Also, it's been a while since I used Max so.. I'll need to refresh on that a bit. Those links should help me plenty. Thanks again.


 


Oh, and here's a screenie of the helmets I made


 


https://www.dropbox....elmets.png?dl=0


               
               

               
            

Legacy_Snugglehoof

  • Jr. Member
  • **
  • Posts: 91
  • Karma: +0/-0
Placeables
« Reply #4 on: December 15, 2014, 12:33:34 pm »


               

The top most placeable.2da file refers to what ever placeable.2da file is highest in your module hierarchy. If you are using hak files, open your module in the toolset, and go to edit -> module properties. Under custom content you will find the listing of your hak files.


 


The .hak files override one another from top to buttom. That is the reason why the specific order is important. This means the placeable.2da that is topmost, is the one that will be used by NWN to determine which placeables to use. You can either extract the placeable.2da from that .hak file witht the hak utility in your nwn utility folder, or with NWNExplorer. 


 


Once you open it, you will find a long listing of lines for each placeable your module uses. Copy what placeable line you feel fits best, and paste it on the buttom. Change the line number to what ever is the next on the count, change the name to what you want and alter the reference to the name of the .mdl file of your new placeable.


 


Save your edited exported placeable.2da, and import it into your hak (replacing the old version) with the hak tool in the utility folder in your NWN directory. You should now be able to see the model in the toolset. 



               
               

               
            

Legacy_Polris

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
Placeables
« Reply #5 on: December 17, 2014, 07:25:52 pm »


               

Okay, I got them in game. Thank you all for that '<img'>


 


Just gotta figure out how to add collisions now. I'll look at those tutorials and if I get stuck I'll come back and ask. Thanks again, you guys are great '<img'>



               
               

               
            

Legacy_Polris

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
Placeables
« Reply #6 on: December 17, 2014, 10:37:29 pm »


               

I have a problem. 


 


So I'm using NwMax


 


I import my .obj into Max, then I link it with the aurora base, then I make a box around the base of the model and link it to the model. I apply the AuroraPlaceable modifier to the box and then I use the aurora base to export it as an .mdl. Problem is I only get the mdl file. The pwk file doesn't get exported. What am I doing wrong?



               
               

               
            

Legacy_Tarot Redhand

  • Hero Member
  • *****
  • Posts: 4165
  • Karma: +0/-0
Placeables
« Reply #7 on: December 17, 2014, 11:10:49 pm »


               

Have you tried the submarine tutorial that I linked to near the start of this thread? Step 15 to end covers pwk creation.


 


TR



               
               

               
            

Legacy_Killmonger

  • Sr. Member
  • ****
  • Posts: 349
  • Karma: +0/-0
Placeables
« Reply #8 on: December 17, 2014, 11:28:43 pm »


               

<lurking about...>


 


What did you name the box?


The pwk is often only a mesh plane. (Later you could extrude it to a "box" for line of sight issues)


 


If the "box" is a dummy helper (a Max Create rollout selection) set at 0.0.0


 


Create a new "helper/box" with a name like: a_box_pwk with an AuroraPlaceable modifier applied, set to PWK


 


Next


Create a very simple plane (# of polys can become an issue later)


Position it beneath your placeable (tip:....don't use scaling tools just yet)


name it "PWK" with an AuroraWalkmesh modifier applied (it will change colour)


and link it to the dummy helper


 


Then link the "helper/box" to the Aurora mdl base


Note which way the "ignore_NGon" is pointed (another important thing for later)


and export to a directory.


 


( a side thought)


Within the mdl directory structure, a correctly placed use node might also be effective


 


imho



               
               

               
            

Legacy_Polris

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
Placeables
« Reply #9 on: December 18, 2014, 02:23:55 pm »


               

Got it working '<img'> Thank you both


 


I think i messed up the linking the first time around and I didn't have the use dummy. Also, that sub tutorial mentions that complex models can cause problems if they're set to cast shadows. What constitutes a complex model? My stalagmite is 110 polys and I put both render and cast shadows on it. Maybe I should've made a shadow box too? Also, do the collision box and the shadow box add to the total poly count of the model? I'm thinking the shadow box doesn't but the collision box might.


 


Thanks again '<img'>