N-DReW25 1,337 Posted November 3, 2016 So for an upcoming mod that I am making I need to make new Twi'lek's for the mod so it will obviously have an appearence.2da involved. I have done some NPC's for example green female twi'lek Sith officers and orange male twi'lek Czerka and Sith Officers but I have found a cut blue male Twi'lek head texture that i'm interested in making it into an NPC Problem is i'm having trouble making it with the texture I want. So I need someone to tell how to make a custom NPC with a custom texture like what I'm doing? Quote Share this post Link to post Share on other sites
DarthParametric 3,785 Posted November 3, 2016 Make a copy of the Twi'lek male head model, give it a unique new filename, then hex edit it and change the texture name (you must keep the same number of characters). Create a new row in heads.2da that references your new Twi'lek head. Then create a new appearance.2da row as you presumably have done previously, and specify your new heads.2da ID number in the normalhead column. Make sure when setting up TSL Patcher that you specify the heads.2da info first, so that the memory tokens can be set correctly. Quote Share this post Link to post Share on other sites
N-DReW25 1,337 Posted November 4, 2016 Make a copy of the Twi'lek male head model Where would find the Twi'lek male head model in kotor tool (I assume you mean the mdl or txi files). Quote Share this post Link to post Share on other sites
Kexikus 995 Posted November 4, 2016 txi files aren't related to models, what you need is the .mdl and the .mdx file. Those are located in BIFs > models.bif > Aurora Model for the .mdl files and BIFs > models.bif > Aurora Model Extension for the .mdx file. To figure out which one of these is the Twi'lek head, open up heads.2da, find the Twi'lek head line and see which model it uses (it's the head column). Quote Share this post Link to post Share on other sites
N-DReW25 1,337 Posted November 4, 2016 Okay this is going horrible. I made it up to model.bif but there is no little plus button so I can't expand it but the model.bif for Kotor 2 TSL is working but this mod is for K1. Quote Share this post Link to post Share on other sites
Kexikus 995 Posted November 4, 2016 It should be in the same spot for K1, no idea why you cannot access it. Quote Share this post Link to post Share on other sites
DarthParametric 3,785 Posted November 4, 2016 If all you want is the existing K1 twilek_m03 texture variant, it already has an entry in K1's heads.2da. Just add a new appearance.2da row that uses a normalhead value of 67. If you want a new, custom, texture, then follow the below. If you look in heads.2da, you'll see the model names in the heads column. The Twi'lek head models (in both games) are: twilek_f twilek_f02 twilek_f03 twilek_f04 twilek_m twilek_m02 twilek_m03 With F designating female, and M male. You'll need to extract the appropriate MDL and MDX from BIFs -> models.bif -> Aurora Model and BIFs -> models.bif -> Aurora Model Extension Note that you need to select the appropriate files and hit the Extract button, don't double click on them. That converts them to ASCII with MDLOps, but you want the original binary files. Next you'll need to do some hex editing. I'm not going to provide a blow by blow account of how to do that here. The gist though is to choose a new model name and a new texture name with the same number of characters as the originals, rename the MDL/MDX files to your new filename, open the MDL in a hex editor and do a Find and Replace on the appropriate values. As is common with KOTOR models, these Twi'lek heads (with the exception of twilek_f/twilek_m) use the same name for both model and texture. So for example you could take twilek_m02 and replace all instances of that with something like twilek_m27 (whatever you want, as long as it is the same number of characters as the original). Create your texture with the same name. Then go through the 2DA editing process I outlined above to add your new entries. Now you could say that this is the "proper" way to add custom head variants, and perhaps the only way for K1. But for TSL they added a new column to heads.2da called alttexture where you can specify an override texture. If you look at how they set up the vanilla Twi'lek heads, you can see that they just specified the first model (twilek_f/twilek_m) and then specified the variant texture (Twilek_f07, twilek_m04, etc.) in the alttexure column. So for TSL you can get away without hex editing. 1 Quote Share this post Link to post Share on other sites
N-DReW25 1,337 Posted November 5, 2016 If all you want is the existing K1 twilek_m03 texture variant, it already has an entry in K1's heads.2da. Just add a new appearance.2da row that uses a normalhead value of 67. Thanks for that though I apologize for being annoying but could you retype that tutorial again but using the Sith Trooper Model as I will be doing a mod that adds in a new type of Sith Soldier. Quote Share this post Link to post Share on other sites
DarthParametric 3,785 Posted November 5, 2016 The Sith Soldier is a full body model, so its textures can be directly overriden via appearance.2da. Look at rows 28, 44, 261 in K1's appearance.2da and you'll see the 3 types all use the same model, they just specify different textures. Quote Share this post Link to post Share on other sites
N-DReW25 1,337 Posted November 5, 2016 The Sith Soldier is a full body model, so its textures can be directly overriden via appearance.2da. Look at rows 28, 44, 261 in K1's appearance.2da and you'll see the 3 types all use the same model, they just specify different textures. So if I can make a new Sith Soldier with a new texture using just the appearance.2da what values would I have to switch to get the right texture which I'll presume would have to be N_SithSoldier04.tga. Quote Share this post Link to post Share on other sites
DarthParametric 3,785 Posted November 5, 2016 The texture name can be whatever you want. There's no hex editing involved, so no character limitations. Just make a new appearance.2da row that duplicates one of the existing Sith Soldier rows and change the texture to whatever you named yours. Quote Share this post Link to post Share on other sites
N-DReW25 1,337 Posted November 5, 2016 The texture name can be whatever you want. There's no hex editing involved, so no character limitations. Just make a new appearance.2da row that duplicates one of the existing Sith Soldier rows and change the texture to whatever you named yours. Okay you lost me there. I made the duplicate of the Sith Soldier 1 row and I have a new texture called N_SithSoldier04.tga, so what do I do to make the duplicate Sith Soldier 1 show the new Sith Soldier 4 texture. Quote Share this post Link to post Share on other sites
superSzym 155 Posted November 5, 2016 I guess you need to change the number "1" to "4" in references to the N_SithTrooper01 texture in your copied appearance.2da row. Quote Share this post Link to post Share on other sites
N-DReW25 1,337 Posted November 5, 2016 I guess you need to change the number "1" to "4" in references to the N_SithTrooper01 texture in your copied appearance.2da row. By "References" are you referring to something in the appearance.2da because if you are I have no clue what your talking about. I have changed the label "Sith_Soldier_01" to "Sith_Soldier_04" and that didn't do anything. I guess you need to change the number "1" to "4" in references to the N_SithTrooper01 texture in your copied appearance.2da row. I am lost for what you meant at that point. Quote Share this post Link to post Share on other sites
Kexikus 995 Posted November 5, 2016 I suggest you have a look at my post on 2da files. That should help you figure out how appearance.2da actually works so that you no longer have to blindly follow tutorials. But to answer your question: You need to replace the texture used. Those are specified in the racetex and/or model*tex (where * is a letter from A to J) columns. So check the original Sith Soldier rows and in each texture field that has for example Sith_Soldier01 as the texture to be used, change it to Sith_Soldier04. That will tell your new apperance to use your new texture. Quote Share this post Link to post Share on other sites
N-DReW25 1,337 Posted November 6, 2016 I suggest you have a look at my post on 2da files. That should help you figure out how appearance.2da actually works so that you no longer have to blindly follow tutorials. But to answer your question: You need to replace the texture used. Those are specified in the racetex and/or model*tex (where * is a letter from A to J) columns. So check the original Sith Soldier rows and in each texture field that has for example Sith_Soldier01 as the texture to be used, change it to Sith_Soldier04. That will tell your new apperance to use your new texture. So I think I found what you mean but there is nothing in the texture feild. The first texture feild modela and texa have N_SithSoldier and the rest through to J have just ****. So do I still replace the **** with Sith_Soldier04 Quote Share this post Link to post Share on other sites
DarthParametric 3,785 Posted November 6, 2016 You just need to change the racetex and texa column values. Quote Share this post Link to post Share on other sites
N-DReW25 1,337 Posted November 6, 2016 You just need to change the racetex and texa column values. Didn't work. But i'm probably doing something wrong here appearence.2da.zip Quote Share this post Link to post Share on other sites
DarthParametric 3,785 Posted November 6, 2016 You didn't use the proper texture name. Your texture's filename is "N_SithSoldier04" but you put "Sith_Soldier04" in the 2DA. You also only need to change the values in the racetex and texa columns. I presume you are changing the appearance ID in the appropriate UTCs as well? You'll also need a save before entering the area you want to test in for the first time. Quote Share this post Link to post Share on other sites
N-DReW25 1,337 Posted November 6, 2016 You didn't use the proper texture name. Your texture's filename is "N_SithSoldier04" but you put "Sith_Soldier04" in the 2DA. You also only need to change the values in the racetex and texa columns. I presume you are changing the appearance ID in the appropriate UTCs as well? You'll also need a save before entering the area you want to test in for the first time. It Worked.Thanks so much to all of you and don't worry about the UTC bit I know what I'm doing with that. Quote Share this post Link to post Share on other sites
N-DReW25 1,337 Posted December 2, 2016 If all you want is the existing K1 twilek_m03 texture variant, it already has an entry in K1's heads.2da. Just add a new appearance.2da row that uses a normalhead value of 67. If you want a new, custom, texture, then follow the below. If you look in heads.2da, you'll see the model names in the heads column. The Twi'lek head models (in both games) are: twilek_f twilek_f02 twilek_f03 twilek_f04 twilek_m twilek_m02 twilek_m03 With F designating female, and M male. You'll need to extract the appropriate MDL and MDX from BIFs -> models.bif -> Aurora Model and BIFs -> models.bif -> Aurora Model Extension Note that you need to select the appropriate files and hit the Extract button, don't double click on them. That converts them to ASCII with MDLOps, but you want the original binary files. Next you'll need to do some hex editing. I'm not going to provide a blow by blow account of how to do that here. The gist though is to choose a new model name and a new texture name with the same number of characters as the originals, rename the MDL/MDX files to your new filename, open the MDL in a hex editor and do a Find and Replace on the appropriate values. As is common with KOTOR models, these Twi'lek heads (with the exception of twilek_f/twilek_m) use the same name for both model and texture. So for example you could take twilek_m02 and replace all instances of that with something like twilek_m27 (whatever you want, as long as it is the same number of characters as the original). Create your texture with the same name. Then go through the 2DA editing process I outlined above to add your new entries. Now you could say that this is the "proper" way to add custom head variants, and perhaps the only way for K1. But for TSL they added a new column to heads.2da called alttexture where you can specify an override texture. If you look at how they set up the vanilla Twi'lek heads, you can see that they just specified the first model (twilek_f/twilek_m) and then specified the variant texture (Twilek_f07, twilek_m04, etc.) in the alttexure column. So for TSL you can get away without hex editing. I know this is out of the blue but can I please have an explanation like this for custom unique textures for the Republic Soldier Body Model or just body models in general? Quote Share this post Link to post Share on other sites
DarthParametric 3,785 Posted December 2, 2016 Body models have their textures overridden by appearance.2da. You specify the base texture name in appearance.2da, then any colour variants get number suffixes which can be specified in the relevant UTI (for player armour/robes). Typically most NPCs just have one colour variant, so their texture just gets a "01" appended. For example, in the case of Republic soldiers, there are four primary body models (I'm ignoring "lite" models here), N_RepOff, N_RepSold, N_RepOff_F, and N_RepSold_F which are male and female versions of soldiers and officers. The textures specified in appearance.2da are the same as the model names, however if you look at the actual texture filenames, you will see that they are N_RepOff01, N_RepSold01, N_RepOff_F01, and N_RepSold_F01, respectively. So all you need to do is follow the same pattern. For NPCs you are typically setting their appearance directly rather than using player armour, so just add a new appearance row and specify your custom texture, keeping in mind the naming convention I just outlined. Quote Share this post Link to post Share on other sites