Author Topic: New Appearances  (Read 345 times)

Legacy_Hardcore UFO

  • Full Member
  • ***
  • Posts: 157
  • Karma: +0/-0
New Appearances
« on: August 19, 2011, 03:26:53 am »


               I've been looking at this for a few days now, and I've been reluctant to ask because it seems like one of those things I should figure out easy enough on my own. The thing is, I'm stumped.

I'm referring to the method for adding new appearances to weapons and armor. This is what I mean:


2DA V2.0

          COSTMODIFIER     ACBONUS    
0         0                                ****       
1         0                                0.00       
2         0                                ****       

All the way up to 200 in the CEP file. I tried to crack this nut by looking at a hak someone made that included new neck models that look like animal skins (from the vault). The working hak contains a 2da, and the models themselves. The 2da is structured exactly the same, with additions past the 200 label mark.

My question then is, with the 2da containing only data that should be applied to the model of a given number (COSTMODIFIER, ACBONUS) and the number that the part is given in the toolset, how does it know what mdl/plt these lines refer to? I didn't find another 2da that - at least by name - seemed to have anything to do with sorting this.

This is really the only think keeping me from starting that portion of the work, because while I know how to enter data into the parts_X.2da files, I don't know where it gets the information (and thereby what I'll get just by adding rows, which seems random but also, seems to be what was done in this hak which functions).
               
               

               


                     Modifié par Hardcore UFO, 19 août 2011 - 02:28 .
                     
                  


            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
New Appearances
« Reply #1 on: August 19, 2011, 03:45:13 am »


               download OldTimeRadio's NWN OmnibusHERE

In it you will be able to find the documentation for the Item Format. In the docunentation for the item format there is a compleate discription for how the models are found and what each entry in the 2da's is for.
               
               

               
            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
New Appearances
« Reply #2 on: August 19, 2011, 04:33:05 pm »


                <takes a breather...>

Don't know if this helps, but it was something that took *me* a while to get (from the wayback machine - which I got from some kind post here a while back, but can't remember who to credit :-/ ):

Custom TLKsThe custom talktable feature was added because it was one of the last things blocking the community from adding new feats, spells, races, etc into NWN using hakpaks.If you add a new spell to the game, you need to modify spells.2da to add it - and inside spells.2da you need to define StrRefs (string reference) that point to strings in dialog.tlk for "name", "description", etc. These strings are displayed on the players GUI and are directly fetched from dialog.tlk. Basically if I enter StrRef 333, it will fetch string number 333 from dialog.tlk.

However, dialog.tlk can not be put into hakpaks and it is a global resource, meaning you can't just add strings to it and distribute it to your players, as your changes will affect all games that are played and will break compatibility with the auto updater.

To allow the community to define their own strings, Bioware came up with a scheme that allows module builders to add their own, custom talktable to a module. This talktable can NOT redefine existing strings, it can only add new strings to the game. Thus, you can't simply takedialog.tlk and copy it, you need to create a new, empty talktable and add the strings you want to add to the game there. There is NO way of overwriting existing strings - If you want to change the name of a spell, you would instead change the StrRef in the Name column in spells.2da to point to your new string in your own talktable.

So, for an example of the Champion of Torm:You create an empty talktable (plenty of tools for that on the Vault) and add three new strings

0 "Bad StrRef"
1 "Divine Champion"
2 "Description for Divine Champion"

You need to modify the name and probably description column in classes.2da to point to your new, custom strref. In order to address entries in the custom talktable, you need to add 16777216 to the index number the string has in your custom talktable.The classes.2da entry would look like this:

... name description ...
...
... 16777217 16777218 ...

Then in the toolset, under the Module Properties in the Custom Content page, you associate your custom .TLK with the mod. Unlike HakPaksyou can only have one custom .TLK per module (which makes sense as the info is appended in order). In order for it to be associated with a module, the custom .TLK must be in the subdirectory \\tlk of your Neverwinter Nights directory. If this subdirectory doesn't exist, you can create it.So to summarize, think of the TLK files and ranges like this:

In file                     Starts from               to                   You use              to
dialog.tlk               0                               16777215     0                          16777215
custom.tlk             0                                ?                    16777216          16777216+?

The game reads the .TLK in this matter.
If the index is below 0x1000000 dialogue.tlk
If the index is above 0x1000000 mask off the "1" and read the custom.tlk
if entry doesn't exist read dialog.tlk. (still with "1" masked of)

so you can get odd strings if you have wrong references too a custom.tlk somewhere.If you want to change hardcoded "strings" and add them in your hakpak, don't use dialog.tlk. Instead copy and change the hardcoded GUI files string reference and add it too the hakpak (this is mostly used for changes of the character creator).


i.e. The item referencing the appearance and properties would need to start at (16777216+line number in custom tlk).

Even knowing that, I can't get the portraits for Amethyst Dragon's Topiary Guardians to show up :-(

I'm still groping in shadows...

<...from tlk-ing too much>

Edit:Stoopid formatting :-(
               
               

               


                     Modifié par Rolo Kipp, 19 août 2011 - 03:44 .
                     
                  


            

Legacy_Hardcore UFO

  • Full Member
  • ***
  • Posts: 157
  • Karma: +0/-0
New Appearances
« Reply #3 on: August 20, 2011, 03:03:06 am »


               Thank you for taking the time to dig that up, but the .tlk is not where I was having issues. I have come to understand how this works now, however!

What was giving me a headache is I didn't understand how NWN was taking a file with a name that meant nothing to me, and was not clearly alluded to in any 2da file, and deciding it should be a mace model. Once I figured out that it was reading the .mdl files' name for this classification, all fell into place.
               
               

               


                     Modifié par Hardcore UFO, 20 août 2011 - 02:06 .
                     
                  


            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
New Appearances
« Reply #4 on: August 20, 2011, 06:25:42 pm »


               <blinking rapidly...>

Ahhh! Think I'll keep that in mind, myself :-)

*I'm* still having problems with the custom tlk... my racial changes are giving me an ulcer :-( (And it is appearance related, so it's kinda on-topic) :-P But I'll save it for another post, after I wrestle with it some more (and do a bit more research).

BTW, fixed the portrait problem... had old portrait.2da in module hak over correct portrait.2da in world-wide hak :-P

Those sneaky resources find the darndest places to hide! :-P

<...in the bright light>
               
               

               


                     Modifié par Rolo Kipp, 20 août 2011 - 05:27 .