Adding a New Texture to an Existing Model in TW1

+
Adding a New Texture to an Existing Model in TW1

Someone sent me a PM asking me how to add new textures to an existing model, and I'm answering publicly, just in case anyone else wants/needs to know this.

I'm assuming that you already know how to find which DDS format (and how many mipmaps) you need to use for textures, how to make or alter textures in Photoshop or Gimp, and how to save your new textures using the right DDS format and the right number of mipmaps. (If you don't know how to do that, I've answered questions about it before, so you should be able to use the search function on the forum to find that information.)

The appearance of characters in TW1 is controlled using the appearance.2da file. Unbiff the 2DA file, then grab the appearance.2da file and copy it to your Data directory, in a place where it's easy to find; you could make a folder called "Working Files," for example.

You can only look at one appearance.2da at a time, so if you're using Full Combat Rebalance or the Genie Wish Mod or any other mod that uses the appearance.2da file, you'll need to move those elsewhere. Or, if you want the thing you're making to be compatible with those mods, then grab the appearance.2da file I've appended to the bottom of this post; it combines the lines for FCR and for all of my mods, so whatever you make will be compatible with both of those mods. (You'll still need to remove the appearance.2da files for the other mods, though; you want only ONE appearance.2da file in your Data folder -- or any of its subfolders -- at any time.)

So, if you open the appearance.2da file in Djinni, it looks like this:



Using the Djinni Wiki's List of Models, find the model you want to add a texture for.

I'm going to use making the Genie Wish Mod as an example here, but of course, where I've said "Azar Javed" and "the genie," you'll substitute the names of the models YOU want.

So, looking at the list in the Djinni Wiki tells us that Azar Javed's model is cr_rienc1_c1g1. If you scroll down the appearance.2da , you'll find that on line 464.

Right-click on the appearance.2da , and you'll get a pop-up box that looks like this:



Choose "Unfix," and the first column of the appearance.2da becomes changeable.

Right-click again and choose "Add Row," which will add a row at the very end of the appearance.2da table. Do NOT choose "Insert Row," because that will add a new row wherever your cursor is. The game uses the line number to assign models and textures to characters, and if you insert a row in the middle of the table, you will mess up every character that comes after that row. So use ADD row, and only add new lines to this table at the end.

While you're at the row of the character whose model you want to use, click in the number field at the very beginning of the table; this will highlight the entire row. Hit Ctrl-C to copy that row, then scroll down to the new line you added to the end of the table. Click in the number field at the very beginning of the table in the line for the new row and hit Ctrl-V to copy the line to the new row.

Okay, so now it's time to look at the fields. The RACE field gives you the name of the model, and you usually won't be changing that. (Adding new models is possible, but it's beyond the scope of this particular tutorial.) The BODY_VERSION and HEAD_VERSION fields tell the game which versions of the body and head texture files you want to use with the model for this particular character.

Since there's only one texture file already in the game for the cr_rienc1 model, that means that the next available numbers are simple; I go from cr_rienc1_c1g1 to cr_rienc1_c2g2. So for the genie, I change the numbers for both the BODY_VERSION and HEAD_VERSION fields from 1 to 2.

Then go to the LABEL field and change cr_rienc1_c1g1 to cr_rienc1_c2g2.

Like this:


Save the appearance.2da file. Right-click in the LABEL field, choose "Fix/Unfix" to "fix" the file again, then save the file again. Close the appearance.2da.

Now go to the character template of the character you wanted a new appearance for. Click on the appearance box, scroll down, and the line you added to the appearance.2da table should now be listed as a possible choice for the character. Click on the new choice to select it, like this:




And when we do all of that, it works! Result: One purple genie:



If you were adding a new texture to a model that has more than one texture, then of course you'd use the next number. For example, the "aunt" model has FOUR textures, so you'd use 5 if you were adding a new texture for that model, making your label cr_aunt1_c5g5.



If you want to use an existing texture for the model's head or body and change only one or the other of those textures, you can do that, too, simply by specifying the correct number for the texture in the BODY_VERSION and HEAD_VERSION fields and giving the right numbers in the LABEL field. "G" textures are for the head and "C" textures are for the body, so if we wanted an "aunt" character with the blue headpiece from cr_aunt1_c3g3 but the green dress from cr_aunt1_c1g1, then we'd put 3 in the HEAD_VERSION field, 1 in the BODY_VERSION field, and cr_aunt1_c1g3 in the LABEL field.


I use a LOT of recolors in my "Medical Problems" adventure, and you should feel free to open up that adventure in Djinni, paw through it, and see how everything works.

Best of luck! Hope you make something fabulous for us all to enjoy!
 
It's complete guide if we want make a new character, but our goal is different. We want to give a new texture for Jacob de Aldersberg, so we don't want to create new model. I suppose it's even more difficult than that.

Corylea, thank you very much, it's amazing that you wrote this guide because of one message, you're great.
 
Rustine said:
Thank you very much! Imaginary oren for you! :)
You're very welcome! :)


Rustine said:
It's complete guide if we want make a new character, but our goal is different. We want to give a new texture for Jacob de Aldersberg, so we don't want to create new model. I suppose it's even more difficult than that.
No, that's EXTREMELY simple.

1. Use WTV to find out which DDS format the current texture is saved in and the number of mipmaps it has.
2. Save your new texture in the same format, with the same number of mipmaps (Nvidia has a plugin for Photoshop that makes this extremely easy.)
3. Name your new texture with the same name as the old texture.
4. Put your new texture in the Data folder, if it's a mod, or add it to the module, if it's a new adventure.


Rustine said:
Corylea, thank you very much, it's amazing that you wrote this guide because of one message, you're great.
It took me about a thousand hours to amass the Djinni knowledge I have, and it's always nice to have an opportunity to pass some of it along. ;)

Best of luck with your project!
 
And again I must say that it's not that what I'm thinking about. Sorry my bad, i should precise it. We want to replace texture of Jacob, but don't replace texture of Order Knight and Siegfried. All of them are using one texture. And that is the probelm. We have already made a texture, but we don't know how to implement this.

This texture we want for Siegfried and Knight(red skin already fixed):

http://imageshack.us/a/img689/4449/kr78.jpg

This we want for Grand Master:

http://imageshack.us/a/img197/5995/885m.jpg
 
PATROL said:
And again I must say that it's not that what I'm thinking about. Sorry my bad, i should precise it. We want to replace texture of Jacob, but don't replace texture of Order Knight and Siegfried. All of them are using one texture. And that is the probelm. We have already made a texture, but we don't know how to implement this.
To do this, you'll need to edit a model. That's not as hard as it sounds! ;) To make an entirely new model is beyond the ability of any software I have access to, but to EDIT the internal specifications of a model slightly, you only need something like Notepad++. (Do not use regular Notepad for this, because it adds characters that it doesn't tell you about, which breaks the model. Notepad++ is completely different.)

So, my understanding is that you want a new texture for Jacques de Aldersberg, but you don't want that new texture to apply to Siegfried and the Order Knight, right? The thing to do there is to edit Jacques de Aldersberg's model so that it no longer shares textures. Here's how:

1. Find out which texture the Grandmaster is using for his body. It's cr_order6_c1.
2. Unbiff the meshes00 file.
3. Copy the meshes for the Grandmaster to someplace where you can find them easily. The Grandmaster is called "masta" in the mesh files, and we see that there are four files using that name in the meshes folder -- cm_masta1.mdb, cm_masta2.mdb, cr_masta1.mdb, and cr_masta2.mdb. The cr files specify animation sets, which you don't need to change, so the files you'll need to edit are the cm ones.
4. Open the cm_masta1.mdb file in something like Notepad++. You'll see a bunch of stuff that seems senseless at first, like this:




But you mostly don't need to know what all of that says. All you need to do is to find the parts of this that specify the texture you want to change -- cr_order6_c1. So, use the Find function, like this:




Use it to search for the first instance of that value:




Once you do that, you'll jump to the first instance of the value for the texture:




5. Change that value from cr_order6_c1 to cr_order6_c2. Then go on to find the next instance of that value. Change ONLY the values that are EXACTLY the same. So, for example, do NOT change cr_order6_c1_n, because you don't need to alter the bumpmap to get this to work; you can keep using the existing bumpmap. And you don't want to change cr_order6_g1, because that's the head, and you're keeping that. Change every instance of cr_order6_c1 to the new value. There will probably only be two or three instances that you need to change.

6. Save the file and exit.

7. Make sure your new texture file is saved in the proper DDS format and has the right number of mipmaps. Name it with the name you used in the edited model -- cr_order6_c2.

8. If you're making a mod, put the edited model and the new texture in your Data folder. If you're making a new adventure, add both of those things to the module.

9. I don't know when (or if) cm_masta2 is used, but you can investigate that on your own and edit that model, too, if it's necessary.

It's also possible to COPY a model and increment the name by one; that's how I made the version of Geralt that's wearing a blindfold for "Medical Problems 2." Since you want to alter the Grandmaster as he is, you only need to edit the model, not make a new one, but I thought I'd mention that it's possible, for anyone else who might read this in the future.


I figured all of this out through trial and error. I wondered if it was possible to do this, and I tried it, and it was. I've learned to do a lot of new things in Djinni just by experimenting, so don't be afraid to give things a try. As long as you keep backup copies of everything you're changing, you can try all kinds of stuff.


I'm hoping that this finally answers the question you meant to ask. :D
 
I'll try it. Amazing job, you are unreally great! Thanks, thanks, thanks!

IT WORKS! I LOVE YOU!
 
Top Bottom