Author Topic: 2da question re: overwriting files  (Read 628 times)

Legacy_DM_Vecna

  • Hero Member
  • *****
  • Posts: 501
  • Karma: +0/-0
2da question re: overwriting files
« on: August 23, 2010, 07:07:49 am »


                I have a question for anyone that is good with combining 2da files. I am combining a few different models in the appearances.2da file. Here is the low down

Project Q overwrites goblins. 
I wanted to keep both as options. 
So I renamed the Q files and added that as a seperate entry in appearances.2da
The original Q model is still in my hak files 

I could understand where the original Q hak mdl file could overwrite the stock bioware one 
BUT it is not doing so with the wizard and chieftain models and they are the same as above.

Any tips on how overwriting works so I could have all four models?


Thanks!!!
               
               

               
            

Legacy_The Amethyst Dragon

  • Hero Member
  • *****
  • Posts: 2981
  • Karma: +0/-0
2da question re: overwriting files
« Reply #1 on: August 23, 2010, 08:37:49 am »


               You'll need a brand new hak file that will be placed at the top of the hak list for your module.  Let's call it "cakeandeatit2.hak".  I'll also be assuming the Q files are your only current custom content.

Using the appearance.2da from the Q haks as your base, copy the line(s) for the goblins to an empty range of lines.  Open your old appearance.2da file and copy the old goblin lines into the Q appearance.2da into the original spaces.  Double check to make sure the creature models have different names!

Save your newly merged appearance.2da file.  Put it into your cakeandeatit2 hak with nwhak.exe and save.

In the toolset, make sure your new hak gets to the top of the list in Module Properties > Custom Content.

Once it's added, you'll likely have double entries entries for each of the goblin appearance names in the drop-down menu (in creature properties), but if you look at them you'll see that you should have both the original and the Q versions available.

The way haks work is that the one on top takes priority.  So, if you have an appearance.2da file in a lower hak and an appearance.2da file in a higher hak, the one in the higher hak is used and the lower one is completely ignored.  It's all or nothing with any game resources...the game doesn't notice blank lines and try to merge them, it doesn't blend models with the same names, etc.
               
               

               


                     Modifié par The Amethyst Dragon, 23 août 2010 - 07:38 .
                     
                  


            

Legacy__six

  • Hero Member
  • *****
  • Posts: 1436
  • Karma: +0/-0
2da question re: overwriting files
« Reply #2 on: August 23, 2010, 01:03:24 pm »


               From what I recall from when I did the textures on the goblins, the specific goblin model you're referring to is named the same as the Bioware goblin model, so to get the original model to take priority you'll actually have to also include the model file in your top hak (it can be found under NWN Main > Models 01 in NWN explorer).

To be on the safe side you should also then open the other Q goblin model files using Notepad or a similar text editing program and change the "c_goblina" in the supermodel line near the top of the file to whatever you renamed the 'plain' Q goblin to.

If I understand correctly the issue you're describing, that'll fix it.

BUT it is not doing so with the wizard and chieftain models and they are the same as above.

Just to amend a bit, we actually named the wizard and chieftain models differently, so you don't need to make a renamed version of either set for them. Generally with the Q creature models, we tended to only override the actual model file name when there'd be issues of some kind otherwise - so in most cases you can simply swap out the 2da line rather than needing to mess around with model files.
               
               

               


                     Modifié par _six, 23 août 2010 - 12:06 .
                     
                  


            

Legacy_Guest_invisig0th_*

  • Jr. Member
  • **
  • Posts: 97
  • Karma: +0/-0
2da question re: overwriting files
« Reply #3 on: August 23, 2010, 02:14:43 pm »


               Just to be clear (although this is not guaranteed, as I have not yet had my tea this morning...), you will literally have to rename one model or the other whenever two models share the same file name in order to see both in game. The game will only use one resource with a given file name. So you will most likely have to take the Q models that replace Bioware models and rename them, and then add lines to your appearances.2da which reference these updated model names. (You could also rename the Bioware models, as the actual file size for those might be smaller).

For example, if Q contains updated models for c_goblina and c_goblinb, you might want to rename the Q model files to c_gobliny and c_goblinz, and then add two lines to your appearances.2da. That's the only way to end up with 4 different appearance entries mapping to all 4 distinct models in game.

Renaming the models may be as simple as changing the filename. However, if you have trouble, you can also open the model file in a text editor and change all references to the old file name (c_goblina >> c_gobliny). I usually do this just to be on the safe side.

That info, combined with the posts above, should provide with what you need here. It's not nearly as complex as you might think, as long as you can identify the file names for the replacing models. Basically, all you need is NWN Explorer, a text editor, and some patience.

[Edit] It's possible you might need to duplicate/rename the associated textures as well, if they use the same filenames in both ProjectQ and Bioware...
               
               

               


                     Modifié par invisig0th, 23 août 2010 - 03:43 .