Page 1 of 1

OverrideTexture

Posted: Mon Oct 27, 2008 12:07 pm
by carfanaticphil
I noticed that in the GT heroes, in the odfs of all the jedi, they all use the jed_inf_jedi.msh, but no skin, but underneath it says "OverrideTexture = "jed_inf_vyse"
I was wondering, what is this?
and because i want to make a character with the skin of a custom jedi, i couldn't figure out where to place the jedi_inf_jedi08(.tga) in the odf. I dont have a mesh for it, just the tga. I tried putting in "OverrideTexture = "jed_inf_jedi08", but when i came to the select sides screen, it crashed :(
can anybody help me?






(go ahead, call me a noob because i don't know where to put the skin :yes: )

Re: OverrideTexture

Posted: Mon Oct 27, 2008 12:52 pm
by DarthD.U.C.K.
normally, the texture (tga) is referenced in the msh. itself, but you can change the texture of a model by using the override texture command
and you HAVE to place the mesh of your custom jedi in your new side!

Re: OverrideTexture

Posted: Mon Oct 27, 2008 1:27 pm
by carfanaticphil
well i want a custom jedi with the skin of a custom blue skinned jedi. I have the .tga for that. But i only have the standard blank white jed_inf_jedi.msh . what do i do? do i set the geometry and lowrez names as jedi_inf_jedi and put OverrideTexture = jedi_inf_jedi08 underneath that?

anybody?

Re: OverrideTexture

Posted: Mon Oct 27, 2008 3:31 pm
by DarthD.U.C.K.
take the normal jedi odf and paste the OverrideTexture = "jedi_inf_jedi08" line into it
give it a custom name etc. the other steps to get it ingame should be in the jedicreationguide

Re: OverrideTexture

Posted: Mon Oct 27, 2008 4:36 pm
by elfie
I had the same problem. I renamed it to jed_inf_jedi_04.tga, the name of the default skin, and my map no longer crashed. So try that. :)

Re: OverrideTexture

Posted: Mon Oct 27, 2008 4:41 pm
by carfanaticphil
i went into D:\BF2_ModTools\assets\sides\jed\odf and got jed_knight_01.odf which had

Code: Select all

// Aayla
[GameObjectClass]
ClassParent           = "com_jedi_default"
GeometryName            = "jed_inf_jedi.msh"

[Properties]
AISizeType              = "HOVER"

GeometryName        = "jed_inf_jedi"
GeometryLowRes      = "jed_inf_jedi_low1"
[color=#FF0000]OverrideTexture     = "jed_inf_jedi01"[/color]

AnimationName        = "aalya"
etc. in it, and it had overridetexture, so i changed the "01" to "08" and saved it in my side's odf folder, with all the textures etc. in all the other folders. i edited my lua to have jdi_demojedi as my hero. so in the level, i got a point, it went to the select screen, i went to the hero, i couldnt see him though. he was all black. and it looked like he was holding two sabers in one hand, and he was reloading it like a gun ?! and when i pressed spawn, it crashed to desktop. any ideas why?

and elfie: what should i rename as that?


EDIT: This time i can play with my character. I had him as jed_knight_01 and had the override texture as the stick figure, and had all the textures and stuff in the other folders corresponding to him, but he turned out to have the shape of the normal jedi knight, but completely black. :S

Re: OverrideTexture

Posted: Tue Oct 28, 2008 5:57 am
by The_Emperor
carfanaticphil wrote:
EDIT: This time i can play with my character. I had him as jed_knight_01 and had the override texture as the stick figure, and had all the textures and stuff in the other folders corresponding to him, but he turned out to have the shape of the normal jedi knight, but completely black. :S
I think you're mixing up "texture" and "model". The shape of the jedi is the model, which is in .msh format. Then there's the skin that goes on the model, which is a .tga. I think you just gave the jedi a stickman skin :D

If you want to change the jedi into the stickman, you need to replace these:
// Aayla
[GameObjectClass]
ClassParent = "com_jedi_default"
GeometryName = "jed_inf_jedi.msh"

[Properties]
AISizeType = "HOVER"

GeometryName = "jed_inf_jedi"
GeometryLowRes = "jed_inf_jedi_low1"
into whatever the stickmans msh is called.

The overwritetexture line isn't what you're looking for, all that does is allowing you to change the skin into a skin with a different name (and it only works on a few models, like the jedi.)

Re: OverrideTexture

Posted: Tue Oct 28, 2008 8:44 am
by carfanaticphil
The_Emperor wrote: I think you're mixing up "texture" and "model". The shape of the jedi is the model, which is in .msh format. Then there's the skin that goes on the model, which is a .tga. I think you just gave the jedi a stickman skin :D
ohh, so was my jedi black because the stickman skin is all black, but the model of my jedi was a normal jedi?

Re: OverrideTexture

Posted: Tue Oct 28, 2008 3:47 pm
by DarthD.U.C.K.
yes

Code: Select all

GeometryName = "STICKMANMESHNAME.msh"

[Properties]
AISizeType = "HOVER"

GeometryName = "STICKMANMESHNAME"
that should make your jedi to a stick man
the MESH (.msh) is the units model, it is its "shape"
the TEXTURE (.tga) is the units skin, the colors that are painted on the shape

Re: OverrideTexture

Posted: Tue Oct 28, 2008 4:05 pm
by carfanaticphil
ok
is there a line in any odf where i should put the .tga name?

Re: OverrideTexture

Posted: Tue Oct 28, 2008 5:46 pm
by PsYcH0_]-[aMsT3r
The texture is normally attached to the model. As long as you put the mesh line right, it should work fine. OverrideTexture is just a line you can use on some models to change the texture but not the model, because I'm pretty sure Pandemic did this line so they didn't waste space creating mesh files for all the same models. So just change the mesh stuff and you should be fine.

Re: OverrideTexture

Posted: Tue Oct 28, 2008 6:57 pm
by carfanaticphil
but what if, in most skin packs, i only have the tga and not the mesh for it? if, say, i wanted a rifleman shock trooper, and had the .tga for that, but i only had the standard white clone rifleman from ep.3 mesh, what would i do then?

Re: OverrideTexture

Posted: Wed Oct 29, 2008 11:18 am
by PsYcH0_]-[aMsT3r
In skin packs you just get a modified skin. A skin is attached to a mesh, so you can change that skin all you like. The only time you'll wana use the OverrideTexture line is when you wana save space by using different skins on the same models. The jedi texture is that only one i know of that uses a OverrideTexture. To use a skin from a skin pack just replace the default skin with the one you wanna use.

Have a mini-tut.

1. Open the skin pack you downloaded

2. We'll say this is replace the clone rep_inf_ep3trooper.tga so make sure you have you rep side folder in data_{your map name}/sides and all the scripting stuff done.

3. Copy the rep_inf_ep3trooper.tga file from the skin pack into data_{your map name}/sides/rep/msh and replace the default file. As long as RLE compression is off and you have the dc: part in your scripts, everything should now work.

Re: OverrideTexture

Posted: Wed Oct 29, 2008 11:34 am
by carfanaticphil
oh ok.
where do i put that skin?
in the rep_inf_ep3_sniper.odf in the assets, there is this:

Code: Select all

[GameObjectClass]
ClassParent         = "rep_inf_default_sniper"


[Properties]
ClothODF            = "rep_inf_ep3sniper_cape"

GeometryName        = "rep_inf_ep3sniper"
GeometryLowRes      = "rep_inf_ep3sniper_low1"
FirstPerson         = "REP\reptroop;rep_1st_trooper"


I want to have a person which is in the sniper class in the lua, but has an electrostaff and a custom skin. where do I put that skin? i know i have to create a custom odf, im fine with that, but do i put any lines in there referencing to the custom skin? if so, what? and do i have to put something in the sniper ^^ odf, referencing to the skin? and do i have to put both of those odfs in my odf folder, with the skin in the mesh folder?

Re: OverrideTexture

Posted: Wed Oct 29, 2008 12:16 pm
by PsYcH0_]-[aMsT3r
carfanaticphil wrote:oh ok.
where do i put that skin?
in the rep_inf_ep3_sniper.odf in the assets, there is this:

Code: Select all

[GameObjectClass]
ClassParent         = "rep_inf_default_sniper"


[Properties]
ClothODF            = "rep_inf_ep3sniper_cape"

GeometryName        = "rep_inf_ep3sniper"
GeometryLowRes      = "rep_inf_ep3sniper_low1"
FirstPerson         = "REP\reptroop;rep_1st_trooper"


I want to have a person which is in the sniper class in the lua, but has an electrostaff and a custom skin. where do I put that skin? i know i have to create a custom odf, im fine with that, but do i put any lines in there referencing to the custom skin? if so, what? and do i have to put something in the sniper ^^ odf, referencing to the skin? and do i have to put both of those odfs in my odf folder, with the skin in the mesh folder?
Nonononononono. Fraid you're thinking completley wrong here, but I did this as well when I started.

If you're gonna get a skin from a skinpack in-game, you gotta create a map. All the assets folder is is a folder containing a load of modding assets. You gotta create a map with custom sides in, then you don't have to do anything to the ODF. Just replace the default skin. I couldn't actually find a tut saying how to just edit normal sides (though there probably is one) but I'm feeling helpful today! Here's how: (The xxx represents your map name).

1. Create a map, whatever name you want.

2. Go into Bf2_ModTools/assets/sides and copy the rep folder into data_xxx/sides.

3. Before you munge go into data_xxx/common/scripts/xxx/xxx)c_con.lua and open it with notepad.

4. Scroll down to where it says (Line 74)

Code: Select all

function ScriptInit()
    
    ReadDataFile("ingame.lvl")
    
   
    SetMaxFlyHeight(30)
    SetMaxPlayerFlyHeight (30)
    
    SetMemoryPoolSize ("ClothData",20)
    SetMemoryPoolSize ("Combo",50)              -- should be ~ 2x number of jedi classes
    SetMemoryPoolSize ("Combo::State",650)      -- should be ~12x #Combo
    SetMemoryPoolSize ("Combo::Transition",650) -- should be a bit bigger than #Combo::State
    SetMemoryPoolSize ("Combo::Condition",650)  -- should be a bit bigger than #Combo::State
    SetMemoryPoolSize ("Combo::Attack",550)     -- should be ~8-12x #Combo
    SetMemoryPoolSize ("Combo::DamageSample",6000)  -- should be ~8-12x #Combo::Attack
    SetMemoryPoolSize ("Combo::Deflect",100)     -- should be ~1x #combo  
    
    ReadDataFile("sound\\yav.lvl;yav1cw")
    ReadDataFile("SIDE\\rep.lvl",     <----- Here (but I'm not part of the script, I'm just showing you the line :) .)
                             "rep_inf_ep3_rifleman",
                             "rep_inf_ep3_rocketeer",
                             "rep_inf_ep3_engineer",
                             "rep_inf_ep3_sniper",
                             "rep_inf_ep3_officer",
                             "rep_inf_ep3_jettrooper",
                             "rep_hover_fightertank",
                             "rep_hero_anakin",
                             "rep_hover_barcspeeder")
and insert a dc: before SIDE in that lines, so line 74 will now look like this:

Code: Select all

ReadDataFile("dc:SIDE\\rep.lvl",
this tells the computer to use these sides.

5. Close the script and munge to check for errors. Make sure in VisualMunge to open the sides box and select rep

6. So long as the munge works, you can now copy the skin from the skin pack you downloaded, i.e. rep_inf_ep3trooper into data_xxx/sides/rep/msh and yes press you when it asks you if you want to replace rep_inf_ep3trooper.

7. Now just munge again (Checking the rep box and play!

Yay I wrote a tut! Remember, Leave the ODF alone!

Re: OverrideTexture

Posted: Wed Oct 29, 2008 4:59 pm
by carfanaticphil
didnt work. whenever, in the lua, i put a dc: before the stock rep setup, and munge it, it ctds. :S i did everything else you said, but it still wont work.

Re: OverrideTexture

Posted: Wed Oct 29, 2008 5:45 pm
by PsYcH0_]-[aMsT3r
What I'm expecting is either that you edited something in the assets folder, your putting in the wrong place, or I've got seomthing wrong. What does ctds mean I'm dumb :P.

Re: OverrideTexture

Posted: Wed Oct 29, 2008 6:28 pm
by carfanaticphil
it means it crashes to desktop "CTDs". what i did:
i made a new map, i copied the rep folder from the assets and put it in my sides folder.
the skin i had was called "Commander 1", so i renamed it "rep_inf_ep3_rifleman" or whatever was in the rep msh folder.
it asked me if i wanted to replace it, and i said yes.
so when i put in my lua dc: before the already stock rep side, when i try and load the map, it Crashes To Desktop on about the 7th circle.

Re: OverrideTexture

Posted: Thu Oct 30, 2008 12:47 pm
by elfie
Strange, but I am sure you are doing something wrong. Back to the jedi texture, what I was saying is since you are using the jed_inf_jedi01 unit, and the texture was jed_inf_jedi08, you have to change the name of the texture to jed_inf_jedi01, or hexedit it in the .msh file.

Re: OverrideTexture

Posted: Thu Oct 30, 2008 1:08 pm
by PsYcH0_]-[aMsT3r
elfie wrote:Strange, but I am sure you are doing something wrong. Back to the jedi texture, what I was saying is since you are using the jed_inf_jedi01 unit, and the texture was jed_inf_jedi08, you have to change the name of the texture to jed_inf_jedi01, or hexedit it in the .msh file.
No. This is where the OverrideTexture comes in. Remember You don't use this for normal models! Just edit the override texture line so it says the name of the texture you wana use. And I think your problem is that there isn't actually a jed_inf_jedi_08. There's 01 to 04.