Skip to content

Using CEP, adding Q Monsters

I'm working on a single-player module that uses content from the CEP (mostly tilesets, placeables, and clothing/armor/robes), but I also want to use some of the amazing-looking monsters from Project Q. I've seen it mentioned that the two aren't compatible "out of the box," but that some builders have put together workable combinations. I suppose I could try to track down and use one of those combinations, but this is something I'd like to get a better understanding of -- how HAK, 2DA & TLK files work together.

The Q monsters that I want to use (mostly the goblins, ogres, and undead) usually override the standard assets, so it seems like they shouldn't come into conflict with CEP monsters. Is there a good tutorial on what exactly I need to do to make this happen, and/or someone willing to help me learn the basics? As I understand it, here's what I need to do...

1. Export the assets that I want to use, creating ERF files. (Or can I just use the standard Q HAK files? Is there an accepted "best practice" here, standard vs. custom HAKs?)

2. Bundle those ERF files into a new top HAK, using NWHAK.EXE. (Or is there a better community resource for doing this?)

3. Edit the CEP 2DA and/or TLK files to make use of the new assets ... and this is where I am totally lost. Which files do I need to edit? Where are they located? What do I need to add, so they make use of the Project Q assets? Where do I put them when they're finished? Do I actually have to edit the TLK file, or can I get away with changing the creatures 2DA?

So, am I on the right track? Have I missed a critical resource that would help me make sense of this? Or is anyone willing to help me muddle through the learning curve?

Comments

  • TheAmethystDragonTheAmethystDragon Member Posts: 86
    edited February 2018
    If you're working primarily with CEP content and just want to add some Q creatures, here's what I would do:

    1. Add q_creatures.hak to your module's custom content list. You should be able to put it above the CEP haks in the list, but below cep2_top_2_60.

    2. Using either utils/nwhak.exe or NWN Explorer, export appearance.2da from cep2_top_2_60.hak. Do the same with the one from q_2da.hak.

    3. Open both 2da files. You can use a tool built just for that, or use a basic text editor (even good ol' Notepad).

    4. Copy the lines for the creatures you want from Project Q into the 2da from the CEP. You can replace existing lines you don't want, or add them to the end (and just change the line number).

    5. If the creatures share the same model name, you'll have a conflict. If that happens, the Q one would be used in your module since the q_creatures.hak would be higher in the list. The only way to work around that and get both to work would be to export one of the versions (CEP or Q), rename the model, and change that model name in appearance.2da.

    6. Save your updated appearance.2da.

    7. Using nwhak, create a brand new hak file for your module. Put the modified appearance.2da into this hak. Add in any creature models you may have changed. Save it (hak names are limited to 16 characters or less, just like pretty much every file used by NWN).

    8. Open your module in the toolset. Add your new hak to the very top of the custom content list.

    9. Now you get to build stuff with CEP and the creatures you want from Project Q. :smile:
  • Lex23Lex23 Member Posts: 34
    Awesome, thank you! That was much more straightforward than I was making it.

    One problem, though ... when I add the Project Q skeletons, their limbs are stark white. This seems to have something to do with the ENVMAP column in appearance.2da, which is '****' in the Q version, but 'default' in the CEP version. If I change it to default in mine, however, their legs look metallic instead.

    So does anyone know where that column is pulling its textures from? Is there a "bone" or similar texture, to make their limbs match the rest of their bodies?
  • TheAmethystDragonTheAmethystDragon Member Posts: 86
    edited February 2018
    Looks like those models are using qc_isg1_bone.dds for part of them. I looked, and that texture is actually in q_placeables.hak.

    You can either add q_placeables.hak at the bottom of your module's custom content list (giving your module access to that texture without overriding any CEP content with the same filenames), or extract that single texture file and put it into your hak that has your customized appearance.2da file.

    As far as the ENVMAP column goes, I'd use the value that Project Q uses, since that's where those models are from.
  • Lex23Lex23 Member Posts: 34
    That did the trick! Thanks again!

    Do you mind if I ask how you found that texture's name? I see it in q_placeables.hak, but I have no idea how you knew what it was called, or where to look for it.
  • T0R0T0R0 Member Posts: 86
    edited February 2018
    TAD knows everything !

    I'm sure there are a bunch of ways:
    (easiest)
    If you have access to a 3d program, load up the mdl in question, look at the mesh in question and see the texture associated with it.

    (process of elimination)
    Without a 3d program, I'd open the mdl in a text editor, search for all bitmaps, and check to see if you have them all within the haks you are using. You can check that easy with NWNExplorer (not working for EE yet)
    If it's not there, then that's the one you're missing.
  • TheAmethystDragonTheAmethystDragon Member Posts: 86
    I don't know everything. ;) I have not made a tileset from scratch, even after all these years (though I did teach myself to edit tileset palette (.itp) files yesterday afternoon).

    I used NWN Explorer Reborn, went to the haks, drilled down into q_creatures.hak, found the model for one of the ones in your screenshot I recognized (skeleton warrior), double clicked on it to open in the preview window, clicked on the ASCII tab at the bottom, scrolled down through the model until I found the thigh part ("node trimesh rthigh_g", where you were missing texture), and looked to see the "bitmap " for that part. Used "ctrl+s" to search from the start of the Q haks for that file, and the program found it in q_placeables.hak.

    Between working on things for my PW, the CEP, and answering questions like this, I have NWN Explorer open almost contantly. There's no such a thing as too much custom content. :)
  • T0R0T0R0 Member Posts: 86
    That works IF the mesh is actually named what its suppose to represent.
  • TheAmethystDragonTheAmethystDragon Member Posts: 86
    T0R0 said:

    That works IF the mesh is actually named what its suppose to represent.

    True, but I was familiar with those skeletons because I use both CEP and Project Q in my PW and knew the texture would be for plain bone, and I've made heavy use of that particular bone texture myself. :)

    If you're not familiar with a model, extracting it and pulling it into a 3d modeling program (I use gmax with nwmax) would be the quickest way to figure out what the name of that missing texture file might be.
  • Lex23Lex23 Member Posts: 34
    Well TAD, you know so much more than I do about all this, it may as well be everything!

    Alright, so I found an asset that I want to export and examine ... the floating and glowing "Blue Crystal" in CEP Miscellaneous Placeables. I found its entry in placeables.2da from cep2_top_2_60.hak ("Crystal: Floating, Blue* (Schazzwozzer)"), and got its model name from there ("zlc_s59") ... I used NWN Explorer to find that model in cep2_core5.hak, and export it into zlc_s59.mdl ... I installed GMax and NWMax, and imported the model .... and was promptly overwhelmed by the massive number of options. I've poked around for a while, but I can't seem to find where the textures are shown, nor a tutorial which tells me in the first half hour.

    And taking it one step further, let's say that I wanted to make another version of this, stick it in my custom hak pack, and use it as a placeable in modules. To keep it simple, I just want it to be white instead of blue, and ideally, to glow/shine white as well. (I know that's not a texture, I think I see where it's done in the "node emitter" section on the ASCII Model tab in NWN Explorer, though I'm not yet sure how to edit that.)

    I'm moderately proficient with GIMP, so if I can find and export the texture, I can adjust the colors ... the trouble I'm having is getting to the texture. From there, I can probably muddle through getting it into the hak pack, and from there into a module, though your effectively infinite expertise would be much appreciated!


  • TheAmethystDragonTheAmethystDragon Member Posts: 86
    edited February 2018
    If you can import the model into gmax, you can find out texture names, modify things like colors, and eventually do anything else you want with the model.

    I pulled the crystal you mentioned and took some screenshots for you.

    In this first one, I selected the part that has the visible part of the crystal. The texture it's using is called "crystalblu". You can change this in gmax by using the material editor (it's the red circle icon near the top, takes a little practice) or you can change it right in a text editor by changing "bitmap crytalblu" to "bitmap yourimage".

    The crystal is self-illuminated, meaning it will glow in the dark in-game (and at full white will always show its regular texture color without interacting with area lighting and shadows). You can change this color by clicking on the colored block there.



    This second image shows you the emitter that gives off the "spiky light" glow of the crystal. You can change the colors of it by clicking on the start and end color blocks.



    This third one shows the options for changing the light that the crystal sheds on objects around it in-game.



    When you are done with your changes, select the base object. Change the name of it to what you want your new model to be called (up to 16 characters, though 12 is better if you plan on making a custom portrait to match). Reselect the object base (to make sure the name change took), then click on the "export button". It'll create your model file, ready for NWN to use (once you put it into a custom hak and reference it in placeables.2da).



    Good luck!
  • Lex23Lex23 Member Posts: 34
    Once again, you have made clear that which was hazy!

    The only thing that I wasn't able to figure out was how to get a texture back into .DDS format, and get that texture (or a TGA) to show up on the new placeable object. I ended up liking the untextured crystals better, but I still need to figure out how to get my textures to show up in the game, in case I want to retexture something else.

    I found the "crystalblu" texture in the CEP haks, edited it in GIMP, and exported it as a .TGA called "crystalwhi." I used it to texture a crystal in GMax (drag and drop from the Material Navigator), and it showed up in the GMax preview window. I exported the MDL, put that and the TGA file in my hak, along with an updated placeables.2da with a line for the new model ... but the texture didn't show up on the new crystal. I copied the line exactly from the CEP version, changed only the index number at the beginning and the name of the model. I made sure that none of the items in my hak had the same name as anything in CEP, and used an empty line in placeables.2da for the new entry.

    Any idea what I might have missed?


  • TheAmethystDragonTheAmethystDragon Member Posts: 86
    When using the material editor in gmax, there's a few steps.
    1. select the part of the model you want to apply a new texture to
    2. open the Material Editor
    3. click on the "New" button
    4. select "Standard"
    5. click on the color box for Ambient or Diffuse and set the color to white (usually)
    6. click on the small faint box just to the right of the Diffuse color box
    7. select the "Bitmap" option
    8. find your TGA texture file and click the "Open" button
    9. click on the blue and white "Show Map in Viewport" button
    10. then click on the "Apply" button

    NWN uses a unique version of the dds format, but there is a command-line tool that can convert tga to dds. I think it's called DDSTools.

    If your texture is the same size as the "crystalblu" one, it's a toss-up whether to convert to dds or not. It's only 64 kb.

    I really like your untextured crystals. Would you consider sending them to me and letting me include them as an option in the CEP?
  • Lex23Lex23 Member Posts: 34
    edited February 2018
    Sure! Do you just need the MDL files? What's the best way to get them to you?

    I also used your directions to make textured versions of the white and violet crystals, would you like those as well?
  • TheAmethystDragonTheAmethystDragon Member Posts: 86
    edited February 2018
    Lex23 said:

    Sure! Do you just need the MDL files? What's the best way to get them to you?

    I also used your directions to make textured versions of the white and violet crystals, would you like those as well?

    Awesome!

    Just the model files will work for the untextured ones. If you want to send in your recolored two as well, that'd be awesome.

    If you pack them up in a .zip, .rar, or .7z, that'd probably be easiest, then email them to one of my email addresses
    (nwn@amethyst-dragon.com will work). I can just copy the original crystal 2da lines and add your name. :)

  • Lex23Lex23 Member Posts: 34
    Alright, I just sent a zip file to that address. Thanks for including those, I know it wasn't any real original work on my part, but it's cool to feel like I contributed even just a little!
  • TheAmethystDragonTheAmethystDragon Member Posts: 86
    Lex23 said:

    ...I know it wasn't any real original work on my part, but it's cool to feel like I contributed even just a little!

    They are a new look for something that's been out there for 15 years. I have a feeling lots of people will find a use for them.
  • Looks like those models are using qc_isg1_bone.dds for part of them. I looked, and that texture is actually in q_placeables.hak.

    You can either add q_placeables.hak at the bottom of your module's custom content list (giving your module access to that texture without overriding any CEP content with the same filenames), or extract that single texture file and put it into your hak that has your customized appearance.2da file.

    As far as the ENVMAP column goes, I'd use the value that Project Q uses, since that's where those models are from.

    Logged and fixed for the next patch for Q. Thanks TAD.

    I will say though that it is odd that texture isn't in q_creatures.hak since it has the "qc" prefix which denotes it as a creature texture. Therefore it should have been in q_creatures already :|
  • shadguyshadguy Member Posts: 154
    edited February 2018
    @Lex23, another thing you can try for further study is to open the models in nwnexplorer. Once the model is open, you can switch to view and/or export the ASCII model. Doing things like renaming models, swapping textures, and adjusting emitters is doable in a text editor on the exported ASCII model if you spend some time studying the parameters and trying things out. You can do a lot by changing the texture name for a mesh (updating the bitmap parameter), or by changing colorstart/colorend/etc for many emitters (those are good places to start but the details vary depending on what you're working with).

    -Dave
    Post edited by shadguy on
  • Lex23Lex23 Member Posts: 34
    shadguy said:

    @Lex23, another thing you can try for further study is to open the models in nwnexplorer. Once the model is open, you can switch to view and/or export the ASCII model. Doing things like renaming models, swapping textures, and adjusting emitters is doable in a text editor on the exported ASCII model if you spend some time studying the parameters and trying things out. You can do a lot by changing the texture name for a mesh (updating the bitmap parameter), or by changing colorstart/colorend/etc for many emitters (those are good places to start but the details vary depending on what you're working with).

    -Dave

    Sweet, thank you! That will keep me busy for a while..... then I will just need to develop a modicum of artistic talent, so I can start making my own textures and 3D models!
Sign In or Register to comment.