Msh and Textures

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

User avatar
sampip
General
General
Posts: 792
Joined: Mon Mar 16, 2009 12:08 pm
Projects :: Something big. And exciting.
Games I'm Playing :: Battlefield 3
xbox live or psn: masowner66
Location: Zebra

Msh and Textures

Post by sampip »

It's a quick question. What do I need to edit in the msh, to change what texture it is using ingame?
I have tried to create Commander gree, and have a new skin for him, but I don't know how to create a new msh for him, the same shape as a clone troopers, but just using a new texture. When I tried editing it, the game CTD while loading.
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: Msh and Textures

Post by DarthD.U.C.K. »

just take the normal mesh and hexedit it to use grees texture (look for the how to use same model with different texture tu) or simply rename the greetexture to the one the model normaly uses
kinetosimpetus
Imperial Systems Expert
Imperial Systems Expert
Posts: 2381
Joined: Wed Mar 25, 2009 4:15 pm
Projects :: A secret project
Games I'm Playing :: Warframe STO

Re: Msh and Textures

Post by kinetosimpetus »

the epsode 2 normal clone trooper can use

Code: Select all

OverrideTexture = "(your new texture)"
(don't know if i spelled that right) look at the ep2 sniper's odf, unless you're using the ep3, then i think if you add

Code: Select all

-keepmaterial override_texture
to the ep3trooper's msh.option file, it should have override texture
(I've not tried this, but I've seen it around here a few times)
User avatar
sampip
General
General
Posts: 792
Joined: Mon Mar 16, 2009 12:08 pm
Projects :: Something big. And exciting.
Games I'm Playing :: Battlefield 3
xbox live or psn: masowner66
Location: Zebra

Re: Msh and Textures

Post by sampip »

But presumably, I could just add

Code: Select all

OverrideTexture = "(your new texture)"
to the ep3 snipers odf. Woudn't that do the same thing?
kinetosimpetus
Imperial Systems Expert
Imperial Systems Expert
Posts: 2381
Joined: Wed Mar 25, 2009 4:15 pm
Projects :: A secret project
Games I'm Playing :: Warframe STO

Re: Msh and Textures

Post by kinetosimpetus »

if the ep3 sniper has override texture set up it would work

again, i haven't actually tried this myself yet, so i'm just repeating what other people have said here
User avatar
sampip
General
General
Posts: 792
Joined: Mon Mar 16, 2009 12:08 pm
Projects :: Something big. And exciting.
Games I'm Playing :: Battlefield 3
xbox live or psn: masowner66
Location: Zebra

Re: Msh and Textures

Post by sampip »

Is what I put above setting up an override texture?
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: Msh and Textures

Post by DarthD.U.C.K. »

yes, but you cant "srt up" one for all units you want, the unit msh has to support overridetextures otherwise this odf-line will do nothing
Last edited by DarthD.U.C.K. on Wed Apr 08, 2009 8:41 am, edited 1 time in total.
User avatar
[TFA]Padawan_Fighter
High General
High General
Posts: 806
Joined: Wed Mar 25, 2009 3:37 pm
Projects :: Ha - as if I will ever get back to them
Games I'm Playing :: SWBF2 ARK EliteDngrs
xbox live or psn: No gamertag set
Location: Lost at sea

Re: Msh and Textures

Post by [TFA]Padawan_Fighter »

Just open up the .tga it uses and edit that.
User avatar
Frisbeetarian
Jedi
Jedi
Posts: 1233
Joined: Wed Sep 12, 2007 3:13 pm

Re: Msh and Textures

Post by Frisbeetarian »

sampip wrote:Woudn't that do the same thing?
Best way to find out is to try it yourself.

The model has to have been made for using override texture to use it in the ODF like you want. You could follow THIS tutorial if override texture is not enabled, but it's easier if you just do what DarthD.U.C.K. originally said (the same as what Caleb says in the tutorial).
[TFA]Padawan_Fighter wrote:Just open up the .tga it uses and edit that.
What he means (read should have said) is that you could just save the new skin under the same name as the old one, which DarthD.U.C.K. also already said.
User avatar
sampip
General
General
Posts: 792
Joined: Mon Mar 16, 2009 12:08 pm
Projects :: Something big. And exciting.
Games I'm Playing :: Battlefield 3
xbox live or psn: masowner66
Location: Zebra

Re: Msh and Textures

Post by sampip »

Yeah, I can't edit the original texture, because commander grees msh is copied from the clone troopers, so is exactly the same as it. So I can't edit the texture it used because it's the same as the clone troopers. I will read that tutorial, Thanks.
Last edited by sampip on Wed Apr 08, 2009 8:51 am, edited 1 time in total.
User avatar
Frisbeetarian
Jedi
Jedi
Posts: 1233
Joined: Wed Sep 12, 2007 3:13 pm

Re: Msh and Textures

Post by Frisbeetarian »

So what's the problem here? You copy the clone trooper .msh, rename it what you want, then hex edit it for the name of your Cmdr Gree targa file.
User avatar
sampip
General
General
Posts: 792
Joined: Mon Mar 16, 2009 12:08 pm
Projects :: Something big. And exciting.
Games I'm Playing :: Battlefield 3
xbox live or psn: masowner66
Location: Zebra

Re: Msh and Textures

Post by sampip »

Aargh. The posts are coming in way too fast here! Okay, does anyone have the link for the tutorial DarthD.U.C.K said above, and one more thing, a tutorial for hex editing that part of the msh. Thanks, and sorry for all the confusion.
kinetosimpetus
Imperial Systems Expert
Imperial Systems Expert
Posts: 2381
Joined: Wed Mar 25, 2009 4:15 pm
Projects :: A secret project
Games I'm Playing :: Warframe STO

Re: Msh and Textures

Post by kinetosimpetus »

you do have a hex editor right? open the msh, hit ctrl + f to search, find the name of the trooper's tga, type over it with the texture name for gree, don't change the length of the file, save as new msh for gree, refer to it in the odf.
User avatar
sampip
General
General
Posts: 792
Joined: Mon Mar 16, 2009 12:08 pm
Projects :: Something big. And exciting.
Games I'm Playing :: Battlefield 3
xbox live or psn: masowner66
Location: Zebra

Re: Msh and Textures

Post by sampip »

If I don't change the length of the msh, do I need to replace the leftover letters with spaces?
User avatar
Frisbeetarian
Jedi
Jedi
Posts: 1233
Joined: Wed Sep 12, 2007 3:13 pm

Re: Msh and Textures

Post by Frisbeetarian »

I guess there's such a thing as too helpful when three people try to help :P !
Last edited by Frisbeetarian on Wed Apr 08, 2009 9:23 am, edited 1 time in total.
User avatar
sampip
General
General
Posts: 792
Joined: Mon Mar 16, 2009 12:08 pm
Projects :: Something big. And exciting.
Games I'm Playing :: Battlefield 3
xbox live or psn: masowner66
Location: Zebra

Re: Msh and Textures

Post by sampip »

Yeah, it can get confusing. It's just everyone keeps posting and I keep missing important comments, so I got really confused. Last question ever: Do i replace the leftover letters with anything?
Thanks for all the help guys! I've learnt a lot in just 10 minutes! :D
kinetosimpetus
Imperial Systems Expert
Imperial Systems Expert
Posts: 2381
Joined: Wed Mar 25, 2009 4:15 pm
Projects :: A secret project
Games I'm Playing :: Warframe STO

Re: Msh and Textures

Post by kinetosimpetus »

i think the leftover letters should be replaced with 00's (which might be spaces) on the left side, but i don't know that

the msh viewer is a lot faster than mungeing to made sure a msh looks good/works
User avatar
Frisbeetarian
Jedi
Jedi
Posts: 1233
Joined: Wed Sep 12, 2007 3:13 pm

Re: Msh and Textures

Post by Frisbeetarian »

kinetosimpetus wrote:i think the leftover letters should be replaced with 00's (which might be spaces) on the left side
You could always just name the targa file such that it would use the same number of letters, but if you don't, yes, the extra bits should be "00" each, which is NOT the space character. The placement of the "00" bits matter as it's just necessary for the chunk to be the same length.
User avatar
sampip
General
General
Posts: 792
Joined: Mon Mar 16, 2009 12:08 pm
Projects :: Something big. And exciting.
Games I'm Playing :: Battlefield 3
xbox live or psn: masowner66
Location: Zebra

Re: Msh and Textures

Post by sampip »

I think I will go for making the tga file the same length as the original, as when I put in a space, it comes up with 20 on the left, and its 30 for the zero. Thanks for all the help! I'm releasing my new map tonight, as a beta. That was the last thing I had to do!


EDIT
Ok, So I edited the new msh, just as you said, doing exactly the right things, and the game crashes still. I've also realised it's not the texture thats causing the crash, because when I didn't edit the msh at all, just the same as the ep3troopers, but called rep_inf_gree.msh, It still crashes, so it evidently isn't loading grees texture correctly. I did put it in the .odf:
Hidden/Spoiler:
[code][GameObjectClass]
ClassParent = "rep_inf_default_gree"

[Properties]
GeometryName = "rep_inf_gree"
GeometryLowRes = "rep_inf_ep3trooper_low1"
FirstPerson = "REP\reptroop;rep_1st_trooper"
[/code]
As you can see. I don't know why it isn't loading properly.... :( Can anyone help?
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: Msh and Textures

Post by DarthD.U.C.K. »

can you post the rep_inf_default_gree odf?
Post Reply