Problem using same msh with different textures [Solved]

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
Master Fionwë
Rebel Colonel
Rebel Colonel
Posts: 598
Joined: Wed May 30, 2007 3:33 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: At RCTC
Contact:

Problem using same msh with different textures [Solved]

Post by Master Fionwë »

Another question, sorry, but they just keep coming.
-lodgroup soldier -nocollision -keepmaterial override_texture override_texture2
What does that mean in the msh.option. file for the arctrooper? I tried copying the arctrooper msh and hex editing the copies to take different skins, I know it has override textures, but the override has never worked for me except with the armor and the shoulder pad. I want to make the marine have a green arctrooper skin, armor, pad, and cape, the rifleman have a blue one, and the commander have a red one, but the game kept crashing on me, and I figured out that it was because of the mshs that I edited. And yet they all showed up fine in the 3-D converter thingy.

I don't know if it will help at all, but the skinsand meshes in question I did like so:
arctrooper1.msh has rep_inf_arc_blue, rep_inf_arc_pack_grn1
arctrooper2.msh has rep_inf_arc_blue, rep_inf_arc_pack_rede
arccaptain.msh has rep_inf_arc_blue, rep_inf_arc_lite

grn1 is a green pack, lite is a bright blue pack, and rede is a dull blue pack. I have all the skins named correctly, and all the files called properly in the appropiate odfs, but it just kept crashing as soon as it finished loading the map. It's not weapons or anything, because the vibrosword I put in I tested afterwards, and it worked fine. I though that I might be able to solve the problem when I found what the msh.option said, I've posted it above. I remove it from the file and then tried, after resetting all the odfs and skins, but now all the arc units are exactly the same. I also changed the ep2 units, rifleman and engineer, did the same thing to the mshs, copied, hexedited, and called them properly in the odfs, but no go. Also, the vibrosword that I got doesn't do any damage, it just pushes guys around. I took the gamorrean axe, and just changed the geometry name to the vibrosword. But please, the skins are more important right now, I can probably figure out the blade on my own, but I've kinda set a deadline for the republic side for this coming Saturday, so not much time to figure this out. Anyone have an idea what to do to get this to work?

Also, I should probably mention that none of my hex edits work properly, all I succeeded in doing following the hex-edit instruction that someone released was removing the marine from space kashyyk, instead of replacing him with anakin.
MercuryNoodles
Jedi
Jedi
Posts: 1003
Joined: Sun Mar 12, 2006 7:16 pm
Projects :: Space - Boarding Action
xbox live or psn: No gamertag set

Post by MercuryNoodles »

I think your post in the request thread was actually more specific. Had I read this first, I'd probably have been confused. As I said before:

1) I don't believe Notepad can properly hex edit msh files, so you should download a hex editing application. I use XVI32, which is free.

2) It's best to leave the character length of the tga name in the msh alone, and naming your tga file something with a matching length. (just covering bases here)

It appears you're following the second part, so I believe your problem is your use of Notepad.
Master Fionwë
Rebel Colonel
Rebel Colonel
Posts: 598
Joined: Wed May 30, 2007 3:33 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: At RCTC
Contact:

Post by Master Fionwë »

To be more specific as to my problem.
What I wanted to do was this, in the game, the units that I gave the arctrooper.msh to work fine, the armor override and the pad override go through, and show up. But the cape doesn't, the color of the cape stays the same no matter what the override texture 2 is.
ep3_rocketeer
GeometryName = "rep_inf_arctrooper"
FirstPerson = "REP\reparc;rep_1st_arctrooper"
GeometryLowRes = "rep_inf_arc_low1"
ClothODF = "rep_inf_arctrooper_cape"

OverrideTexture = "rep_inf_arc_yellow"
OverrideTexture2 = "rep_inf_arc_pack_yellow"

ep3_marine
GeometryName = "rep_inf_arctrooper"
FirstPerson = "REP\repjettp;rep_1st_jettrooper"
GeometryLowRes = "rep_inf_arctrooper_low1"
ClothODF = "rep_inf_arctrooper_cape"

OverrideTexture = "rep_inf_arc_darkgreen"
OverrideTexture2 = "rep_inf_arc_pack_grn1"

ep2_rocketeer
GeometryName = "rep_inf_arctrooper"
FirstPerson = "REP\reparc;rep_1st_arctrooper"
GeometryLowRes = "rep_inf_arctrooper_low1"
ClothODF = "rep_inf_arctrooper_cape"

OverrideTexture = "rep_inf_arc_brightred"
OverrideTexture2 = "rep_inf_arc_pack_lite"
If your familiar with the arctroopers textures, then this will be easy to follow. I would advice looking at the pack texture while reading this so that you can follow.
Now, the different textures used in those odfs are the following colors:
lite: a bright blue cape and pad.
grn1: a dark green cape and pad.
The others are easy, the name says it.

Now the problem is that the 'override texture' works fine, and the pad, which is part of the 'override texture 2' works fine, but the cape doesn't. So, the marine for example, his armor is green, and the pad on his shoulder is green as well, but the cape that he has is not, it's red. I had changed the texture rep_inf_arc_pack_blue, and had given it a red cape, since that looked better than the original blue. But I want to get it so that the marine has a green cape, and the ep3 heavy has a yellow cape, while the officer keeps the red cape that he has. That is what I'm so frustated about, and other than your post, can't seem get any help with.

I opened up the meshes originally with notepad as just a quick way to find the textures that are called and the hp_fire points for different weapons. I used a hex editor to edit them, PSPad editor, also free, at least the demo version. I have the .msh files set to open up with notepad by default, maybe that is the issue. I'm going to try it again, see if your advice works.
I'll let you know what it does.
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3285
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Different cape colors for same mesh copied multiple times

Post by AceMastermind »

Well lets see, you have 3 soldiers all with the same ClothODF name.
You'll have to copy and rename the cloth odf for each of your soldiers that are using different colored capes because you can't have multiple files with the same name or the game will use only 1, and inside each cloth odf you have to change the .msh name that is called to the name of each custom unit mesh which contains the cloth object .
But wait!........You can't change the name of the cloth ODF because the name of the clothODF is the same name as the cloth object that was exported within the mesh, so we will have to do a little hex editing.

So the bottom line is you want to change the color of the cape on all of the custom arc units, but all of the units use the same mesh even though they might be named differently, they all have the same cape object name built within the mesh.

This is assuming you already have copied and renamed the arc_trooper.msh for each of the units that are using it and already hex edited:
rep_inf_arc_pack_blue
to say
rep_inf_arc_pack_gren
or
rep_inf_arc_pack_redd
in each of your custom named meshes which will be the tga name that has the cape texture for that specific unit.

Lets look in the odf for one of them, upon looking in the ODF you will see:
ClothODF = "rep_inf_arctrooper_cape"

The name of the cloth ODF is the same name of the cloth object that is built within the mesh when it was exported.

So we open the .msh with a hex editor and search for and find:
rep_inf_arctrooper_cape

Then we hex edit rep_inf_arctrooper_cape
to say.....
rep_inf_arctrooper_cap1 (notice i changed the "e" to a "1")
or what ever you want.
Then save and close the hex editor.

Now that we changed the name of the cloth object in the mesh, we also have to change the name of the cloth odf, so we would rename it:
rep_inf_arctrooper_cap1.odf

Then open the cloth odf(rep_inf_arctrooper_cap1.odf)
and change the name of the called soldier mesh that you just hex edited to whatever your custom soldier mesh name is.

Then we open the rep_inf_arctrooper.odf or whatever you named yours, then we change the name of the cloth ODF that is called:
from
ClothODF = "rep_inf_arctrooper_cape"
to
ClothODF = "rep_inf_arctrooper_cap1"

You'll have to do this for each of your custom units.

Save your changes then munge your side and try it out.

I won't go into extreme detail because I don't really know what you've done already or even done correctly up until now, but this should give you an idea of what needs to be done, and of course if you have several soldiers using the same mesh even if they are named differently and you want different colored capes, then you will have to repeat these steps above giving their capes different names also.
Master Fionwë
Rebel Colonel
Rebel Colonel
Posts: 598
Joined: Wed May 30, 2007 3:33 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: At RCTC
Contact:

Post by Master Fionwë »

Thanks for the tip, I'll let you know if it works. I'll test it now.

Edit: Awesome!!! Thank you guys so much!! I got the marine to work. He's now completely green!! This opens up a whole new ton of stuff that I can do now!! You guys are definitely getting your names in the credits for this help. :D
Now I can set up the other two units, and then I will release the republic side.
Post Reply