Author Topic: Troubles with adding new "armor" model  (Read 382 times)

Legacy_jackkel dragon

  • Full Member
  • ***
  • Posts: 178
  • Karma: +0/-0
Troubles with adding new "armor" model
« on: October 23, 2012, 06:32:49 am »


               Having almost posted a stupid question on the scripting forum earlier today because I forgot to put in an equal sign during testing, I'm feeling like a bit of an amatuer. That said, I've been trying to get a model originally intended to replace the "underwear/naked" model to show up as an armor customization piece, but I've run into some snags. It originally used the default texture, so my initial test ended up with a silvery verson of the model with no texture.

What I've done so far, to make sure I didn't skip a step:

- Rename files for armor usage. For instance, the chest model with 001 became 145.
- Modify the parts_chest file to include the lines I need.
- Extract the .plt texture for the original files from the base game and rename them for new models.
- Extract the .plt textures for inventory icons and rename them for new models.
- Put all files (2da, mdl, plt) into hak file.

The result is the phantom silvery model with no texture, but now I get inventory icons. What sort of silly mistake did I make to prevent the texture from showing up on the model?
               
               

               
            

Legacy_gutwrench66kg

  • Sr. Member
  • ****
  • Posts: 278
  • Karma: +0/-0
Troubles with adding new "armor" model
« Reply #1 on: October 23, 2012, 08:32:51 am »


               looks like you missed one little one.

You need to open the model itself (can actually just do it in notepad/wordpad) and do a find/replace all and replace the chest_001 references with chest_145. Do this for each racial type, save them, and you're good to go.
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Troubles with adding new "armor" model
« Reply #2 on: October 23, 2012, 02:07:33 pm »


               If you are opening up the model in a text editor (I recommend using notepad ++) do a search for bitmap. Bitmap decribes the texture associated with a particular mesh. You may find more than one Bitmap reference in the file. Just search them all out to get a feel for which bitmaps the model is expecting, and what you will have to change.

Generally usagreco66kg is correct, and all you need to do is do a find/replace all on that portion of the model name and it will update all the relevant bitmap entries as well as other kinds of references.
               
               

               


                     Modifié par henesua, 23 octobre 2012 - 01:07 .
                     
                  


            

Legacy_jackkel dragon

  • Full Member
  • ***
  • Posts: 178
  • Karma: +0/-0
Troubles with adding new "armor" model
« Reply #3 on: October 23, 2012, 02:52:10 pm »


               Right, I vaugely remember doing that the last time I worked with new models now. It's probably why .mdl files are set to open in notepad on my computer...

I'll go see if fixing those models will help then.
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Troubles with adding new "armor" model
« Reply #4 on: October 23, 2012, 02:56:05 pm »


               My recommendation is to use Notepad++

Thats a nice program for text editing in windows.
               
               

               
            

Legacy_jackkel dragon

  • Full Member
  • ***
  • Posts: 178
  • Karma: +0/-0
Troubles with adding new "armor" model
« Reply #5 on: October 23, 2012, 03:35:34 pm »


               Okay, I've managed to get the new models to appear properly on the armor piece selection and in-game. Thing is, the models I was using only work for humans, so it ends up being invisible on everyone else. I was planning on using the default model as a replacement for the other races, but when I extracted the models with NWN Explorer Reborn and opened them in notepad I got a bunch of human-illegible garbage. Is there a way to turn these models into the neat, human-readable format that NWMax models use?
               
               

               
            

Legacy_Asymmetric

  • Sr. Member
  • ****
  • Posts: 289
  • Karma: +0/-0
Troubles with adding new "armor" model
« Reply #6 on: October 23, 2012, 05:08:02 pm »


               Yep, some model are in binary instead of text format. You have 2 Options:

1. In NWN Explorer, after opening a mdl file select "ASCII Model" (below the displayed model), right click in the text and select "Export text". You can then just save the text as a .mdl file instead of a .txt file.

2. Decompile the mdl file after extracting. I recommend Nwn Carottes for that
http://nwvault.ign.c...r.detail&id=936
               
               

               


                     Modifié par Asymmetric, 23 octobre 2012 - 04:09 .
                     
                  


            

Legacy_jackkel dragon

  • Full Member
  • ***
  • Posts: 178
  • Karma: +0/-0
Troubles with adding new "armor" model
« Reply #7 on: October 25, 2012, 04:55:15 am »


               I haven't tried to add the new "armor" appearances yet, but I did check the ASCII version of the model in NWN Explorer Reborn and it looks like exactly what I need. Thanks for all the help, everyone.