Changing what TGA a model uses

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
Tears2Roses
Chief Warrant Officer
Chief Warrant Officer
Posts: 336
Joined: Thu Jul 07, 2011 9:20 am
Projects :: Oh some random stuff who knows
Games I'm Playing :: SWBF2
xbox live or psn: PC beats xbox.

Changing what TGA a model uses

Post by Tears2Roses »

I would like to know if it is possible to change the .tga a model uses. I wan't to use hoth_prop_trench_short.msh with the tat2_bldg_base_grit.tga. I hope that will make the hoth trenches look exactly like the ground texture for another desert map i'm making. Seems simple enough, I hope. If I need to hex-edit something let me know, I can probably download a hex editor. I think it shouldn't be to hard... Im just clueless as to how it would be done.

EDIT: I was looking at some ODF's and the line over ride texture ( used for the CIS droids ) might work. I'm going to try this out.
User avatar
RED51
Jedi
Jedi
Posts: 1024
Joined: Sun Sep 07, 2008 6:25 pm
Games I'm Playing :: SWBFII

Re: Changing what TGA a model uses

Post by RED51 »

Refer to this tutorial for help:
archer01's Hex editing guide
Basically, open up the mesh you want, then change the necessary values.
User avatar
willinator
Major
Major
Posts: 517
Joined: Sun Mar 13, 2011 3:11 pm
Projects :: [Coming of the Sentinels]
Games I'm Playing :: SWBF2 Minecraft Halo
xbox live or psn: PC pwns all!
Location: The rings of Saturn...

Re: Changing what TGA a model uses

Post by willinator »

RED51 wrote:Refer to this tutorial for help:
archer01's Hex editing guide
Basically, open up the mesh you want, then change the necessary values.
... or, you could just rename the texture to the one the model uses, without having to mess around with all those numbers (unless you have trenches with different textures, then ignore what I said).
User avatar
Tears2Roses
Chief Warrant Officer
Chief Warrant Officer
Posts: 336
Joined: Thu Jul 07, 2011 9:20 am
Projects :: Oh some random stuff who knows
Games I'm Playing :: SWBF2
xbox live or psn: PC beats xbox.

Re: Changing what TGA a model uses

Post by Tears2Roses »

So there is no way around the hex-edit? Also, what .tga does hoth_prop_trench_short.msh use? If I know this, then I could re-name my ground .tga correctly. The ovveridetexture in the odf didn't work.
CalvaryCptMike
Captain
Captain
Posts: 476
Joined: Sat Feb 19, 2011 3:10 pm
Projects :: Nothing--absolutely nothing
Location: Freed by alien robots, now living on Mars
Contact:

Re: Changing what TGA a model uses

Post by CalvaryCptMike »

Hex editing the name of textures that the model .msh uses isn't that hard, it's actually really easy.

And yes, there is no real workaround.
Xavious
Sith Master
Sith Master
Posts: 2783
Joined: Mon Jun 12, 2006 3:46 pm

Re: Changing what TGA a model uses

Post by Xavious »

Tears2Roses wrote:Also, what .tga does hoth_prop_trench_short.msh use?
It's one of the hoth_main textures, unless I'm mistaken. You can open up the msh in question in notepad and do a Ctrl+F for tga and find all the textures a model uses.
Tears2Roses wrote:The ovveridetexture in the odf didn't work.
OverrideTexture only works for models that were set up to use it. For example, the B1 Battle Droid model.

And hex editing really isn't that difficult, especially if you're just changing the name of a texture. Just make sure to use an actual hex editor (there should be a link to one in the Everything You Need thread) and to use a replacement texture name that has the same amount of characters as the previous one.
User avatar
Tears2Roses
Chief Warrant Officer
Chief Warrant Officer
Posts: 336
Joined: Thu Jul 07, 2011 9:20 am
Projects :: Oh some random stuff who knows
Games I'm Playing :: SWBF2
xbox live or psn: PC beats xbox.

Re: Changing what TGA a model uses

Post by Tears2Roses »

Xavious wrote: And hex editing really isn't that difficult
If you say so. I'm going to download the hex editor in the FAQ then.

I downloaded this hex editor in the FAQ and the followed the tutorial given to me. The screen shots looks nothing like that of the tutorial and its in Greek to me.... Can someone post something on this topic every single painfull step as clear as you can be as to how I would get hot_prop_trench_short.msh to use tat2_bldg_base_grit.tga please? if someone could, it would be GREATLY apreciated by me ( and anyone else who has no hex-editting experience. )
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Changing what TGA a model uses

Post by Maveritchell »

Please don't double-post.

The guide provided is about as painfully simple as it gets. Ctrl-F to search for any instance of "tga" in the file. Replace with the new texture name. Fini.
User avatar
Tears2Roses
Chief Warrant Officer
Chief Warrant Officer
Posts: 336
Joined: Thu Jul 07, 2011 9:20 am
Projects :: Oh some random stuff who knows
Games I'm Playing :: SWBF2
xbox live or psn: PC beats xbox.

Re: Changing what TGA a model uses

Post by Tears2Roses »

Sorry I had posted really late last night and was extremely tired. I should be able to figure out how to change the .tga today. And sorry for double post.

EDIT: I got the hex-editting part(a bit...) Now, im confused as what to re-name the files. The .tga hoth_prop_trench_short uses is hoth_main_1, and those are different lengths. So, for my new .tga, would I re-name it the EXACT same characters as hoth_main_1? Then hoth_prop_trench_short re-name that to have the exact same ammount of characters too? Or do I give both the same ammount of characters? ex "this_word" has 9 characters and "word" has 4. Do I give "this_word" and "word" the same ammount of characters when re-naming? or give "this_word" 9 characters and "word" 4? I just know from reading it has to be the same ammount of characters....

EDIT2: Placing the object in ZE crashes ZE. I'm going to try again another day, but if someone could help me with the re-naming part, that would be great. I will post more on the problem soon.
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Changing what TGA a model uses

Post by AQT »

For your sake, try to choose a name that doesn't add additional characters. Your priority is to choose a name that has the same number of characters as the original name. But if you cannot, like for the reason you stated, then choose a shorter name. If you go with this route, then you will need to replace the unused/leftover characters with 00's. These will appear as rectangles on the right hand side of the editor (this means you use the left hand side of the editor to put in the 00's). Please keep in mind that these are extremely basic hex edits when it comes to modding SWBF2, as Mav have already stated.
User avatar
willinator
Major
Major
Posts: 517
Joined: Sun Mar 13, 2011 3:11 pm
Projects :: [Coming of the Sentinels]
Games I'm Playing :: SWBF2 Minecraft Halo
xbox live or psn: PC pwns all!
Location: The rings of Saturn...

Re: Changing what TGA a model uses

Post by willinator »

CalvaryCptMike wrote:Hex editing the name of textures that the model .msh uses isn't that hard, it's actually really easy.

And yes, there is no real workaround.
... or you could just avoid that problem and rename whatever texture you want it to be to hoth_main1, or whatever it was. Granted, you should learn how to hex-edit, you'll need to eventually, but why would you need to keep the original texture? If you are say, turning it from snow to sand, you would not need both the sand and the snow, which is when you would hex-edit. If I am wrong, please tell me what I am missing, since this would appear to be the easiest solution.
User avatar
Tears2Roses
Chief Warrant Officer
Chief Warrant Officer
Posts: 336
Joined: Thu Jul 07, 2011 9:20 am
Projects :: Oh some random stuff who knows
Games I'm Playing :: SWBF2
xbox live or psn: PC beats xbox.

Re: Changing what TGA a model uses

Post by Tears2Roses »

Problem solved. I had an EXTREMELY long conversation with Unlucky13 on x-fire, and I got my trenches to work in-game. I figured out the hex-edits easy, you guys were right that isn't hard at all. A HUGE thank you goes out to unLucky13 today. Thank you so much, and thank you to everyone who has made my modding a succsess!!
Hidden/Spoiler:
I actually thought that hex-editting would be impossible. Something like binary... As soon as I tried hex-edditing, re-read some tutorials when I wasn't about to :faint: because I was so :sleep:, then I got that part instantly.
Post Reply