Custom texture not working [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

Private
User avatar
Posts: 36
Joined: Tue Jan 09, 2018 7:01 pm
Location: Texas
Projects :: Playable Campaign Factions
Games I'm Playing :: Star Wars games
xbox live or psn: PSN: BucMan55

Custom texture not working [Solved]

Postby Bucman55 » Fri Jan 12, 2018 9:46 pm

So I made a custom Captain Rex texture based on Deviss' HD Clone Pack's ARC Trooper and it's not working properly. I modified the options file to support override textures but it doesn't seem to have worked all the way. Am I missing something?

Here's my texture:
Hidden/Spoiler:
Image


Here's what it looks like in-game:
Hidden/Spoiler:
Image


Here's the unit ODF:
Hidden/Spoiler:
Code: Select all
[GameObjectClass]
ClassParent     = "com_hero_default"
GeometryName    = "rep_inf_ARC_Clone_Trooper.msh"

[Properties]
UnitType        = "Trooper"

GeometryName    = "rep_inf_ARC_Clone_Trooper"
GeometryLowRes  = "rep_inf_arctrooper_low1"
FirstPerson     = "rep\repjettp;rep_1st_jettrooper"
ClothODF        = "rep_inf_ARC_Clone_Trooper_cape_Rex"

OverrideTexture     = "rep_inf_ARC_Clone_Trooper_Rex"
OverrideTexture2    = "rep_inf_ARC_Clone_Trooper_Gear_Rex"

WEAPONSECTION = 1
WeaponName1         = "ant_weap_hero_rex_pistol"
WeaponAmmo1         = 0

WEAPONSECTION = 2
WeaponName2         = "rep_weap_inf_thermaldetonator"
WeaponAmmo2         = 3
WeaponChannel2      = 1

WEAPONSECTION = 3
WeaponName3         = "rep_weap_inf_timebomb"
WeaponAmmo3         = 1
WeaponChannel3      = 1

//SOUND
HurtSound               = "rep_inf_com_chatter_wound"
DeathSound              = "rep_inf_com_chatter_death"
AcquiredTargetSound     = ""
HidingSound             = ""
ApproachingTargetSound  = ""
FleeSound               = ""
PreparingForDamageSound = ""
HeardEnemySound         = ""

SCFieldMoveOutSound     = ""
SCFieldHoldSound        = ""
SCFieldFollowSound      = ""
SCDriverGetInSound      = ""
SCDriverGetOutSound     = ""
SCPassengerMoveOutSound = ""
SCPassengerStopSound    = ""
SCPassengerGetInSound   = ""
SCPassengerGetOutSound  = ""
SCGunnerAllClearSound   = ""
SCGunnerSteadySound     = ""
SCGunnerGetInSound      = ""
SCGunnerGetOutSound     = ""
SCResponseYessirSound   = ""
SCResponseNosirSound    = ""

AISCFieldMoveOutSound       = ""
AISCFieldHoldSound          = ""
AISCFieldFollowSound        = ""
AISCDriverGetInSound        = ""
AISCDriverGetOutSound       = ""
AISCPassengerMoveOutSound   = ""
AISCPassengerStopSound      = ""
AISCPassengerGetInSound     = ""
AISCPassengerGetOutSound    = ""
AISCGunnerAllClearSound     = ""
AISCGunnerSteadySound       = ""
AISCGunnerGetInSound        = ""
AISCGunnerGetOutSound       = ""
AISCResponseYessirSound     = ""
AISCResponseNosirSound      = ""

//SndHeroSelectable           = ""
//SndHeroSpawned              = "hero_rex_spawn"
//SndHeroDefeated             = "hero_rex_exhausted"
//SndHeroKiller               = "hero_rex_exhausted"

VOSound = "rep_off_response_hero_command      SC_Follow"
VOSound = "rep_off_response_hero_command      SC_StopFollow"
VOSound = "rep_off_response_hero_command     SC_VehicleWaitUp"
VOSound = "rep_off_response_hero_command     SC_GetIn"
VOSound = "rep_off_response_hero_command      SC_GetOut"

//VOSound = "rex_hero_pc_com_hostile         SpottedVO"
//VOSound = "rex_hero_pc_com_mechanic        NeedRepairVO"
//VOSound = "rex_hero_pc_com_transport       NeedPickupVO"
//VOSound = "rex_hero_pc_com_backup          NeedBackupVO"
//VOSound = "rex_hero_pc_com_clear_area      AttackPositionVO"
//VOSound = "rex_hero_pc_com_defend          DefendPositionVO"
           
//VOSound = "rex_hero_pc_com_hostile_inVehicle         SpottedVO +InVehicle"
//VOSound = "rex_hero_pc_com_mechanic_inVehicle        NeedRepairVO +InVehicle"
//VOSound = "rex_hero_pc_com_transport_inVehicle       NeedPickupVO +InVehicle"
//VOSound = "rex_hero_pc_com_backup_inVehicle          NeedBackupVO +InVehicle"
//VOSound = "rex_hero_pc_com_clear_area_inVehicle      AttackPositionVO +InVehicle"
//VOSound = "rex_hero_pc_com_defend_inVehicle          DefendPositionVO +InVehicle"

VOSound = "rep1_inf_chatter_AcquiredTarget_VOUnitNum41      AcquiredTarget"
VOSound = "rep1_inf_chatter_KillingSpree4      KillingSpree4"

VOUnitType              = 183
SoldierMusic            = "rep_hero_Anakin_lp"


Here's the .msh.option file for the ARC Trooper:
Hidden/Spoiler:
Code: Select all
-lodgroup soldier -nocollision -keepmaterial override_texture override_texture2


On a possibly related note the kama & pauldron aren't changing colors to match my custom texture either.

Custom gear texture:
Hidden/Spoiler:
Image


EDIT: I've fixed the issue using a hex editor!
Last edited by Bucman55 on Sun Jan 14, 2018 6:21 pm, edited 1 time in total.

Private Recruit
User avatar
Posts: 23
Joined: Thu Nov 16, 2017 12:03 am
Projects :: No Mod project currently.
Games I'm Playing :: SWBFII
xbox live or psn: No gamertag set

Re: Custom texture not working

Postby EasyOvenOperator » Sun Jan 14, 2018 2:56 am

don't the models have to be set up to use override textures?

Private
User avatar
Posts: 36
Joined: Tue Jan 09, 2018 7:01 pm
Location: Texas
Projects :: Playable Campaign Factions
Games I'm Playing :: Star Wars games
xbox live or psn: PSN: BucMan55

Re: Custom texture not working

Postby Bucman55 » Sun Jan 14, 2018 3:12 am

EasyOvenOperator wrote:don't the models have to be set up to use override textures?


Yes, but I did that already

rep_inf_ARC_Clone_Trooper.msh.option:
Hidden/Spoiler:
Code: Select all
-lodgroup soldier -nocollision -keepmaterial override_texture override_texture2


Copied directly from a model that has working override textures.

Droid Pilot Assassin
User avatar
Posts: 2109
Joined: Mon Jan 19, 2009 5:58 pm
Projects :: Star Wars Battlefront Legacy

Re: Custom texture not working

Postby ggctuk » Sun Jan 14, 2018 4:53 am

Bucman55 wrote:
EasyOvenOperator wrote:don't the models have to be set up to use override textures?


Yes, but I did that already

rep_inf_ARC_Clone_Trooper.msh.option:
Hidden/Spoiler:
Code: Select all
-lodgroup soldier -nocollision -keepmaterial override_texture override_texture2


Copied directly from a model that has working override textures.


It's more than that, though: the .msh itself has to have an object named "override_texture" for it to work. It's possible the parts that aren't being overriden are a separate model (maybe "override_texture2").

Private
User avatar
Posts: 36
Joined: Tue Jan 09, 2018 7:01 pm
Location: Texas
Projects :: Playable Campaign Factions
Games I'm Playing :: Star Wars games
xbox live or psn: PSN: BucMan55

Re: Custom texture not working

Postby Bucman55 » Sun Jan 14, 2018 2:08 pm

ggctuk wrote:
Bucman55 wrote:
EasyOvenOperator wrote:don't the models have to be set up to use override textures?


Yes, but I did that already

rep_inf_ARC_Clone_Trooper.msh.option:
Hidden/Spoiler:
Code: Select all
-lodgroup soldier -nocollision -keepmaterial override_texture override_texture2


Copied directly from a model that has working override textures.


It's more than that, though: the .msh itself has to have an object named "override_texture" for it to work. It's possible the parts that aren't being overriden are a separate model (maybe "override_texture2").


I just looked at the model in the SWBFVeiwer and found this in the debug window:
Hidden/Spoiler:
Code: Select all
MODL (329656)
{
     MTYP (4)   1
     MNDX (4)   2
     NAME (20)   "override_texture"
     PRNT (12)   "DummyRoot"
     TRAN (40)
     Scale 1, 1, 1
     Quaternion rotation 0, 0, 0, 1
     Translation 0, 0, 0
     GEOM (329528)   
     {
          BBOX (44)
          {
               Rotation:  -0.0005689, -2.643596e-6, -1.101797e-6, 0.9999998
               Center:  -1.062638e-6, 0.9058566, -0.0082042
               Width/2: 0.9380749,  Depth/2: 0.9080766,  Height/2: 0.2041008
               Bounding sphere radius: 1.321456
          }
          SEGM (4216)
          {
               MATI (4)   Material No.1
               POSL (592)   49 points
               WGHT (1572)   49 weights (n*4*[bone refs, weights])
               NRML (592)   49 normals
               UV0L (396)   49 UV coords
               NDXL (444)   54 polygons ( n, [ n*indexes ] )
               NDXT (352)   58 triangles (3*indexes)
               STRP (200)   98 strip refs, 58 triangles
          }
          SEGM (9452)
          {
               MATI (4)   Material No.2
               POSL (1360)   113 points
               WGHT (3620)   113 weights (n*4*[bone refs, weights])
               NRML (1360)   113 normals
               UV0L (908)   113 UV coords
               NDXL (980)   122 polygons ( n, [ n*indexes ] )
               NDXT (736)   122 triangles (3*indexes)
               STRP (420)   208 strip refs, 123 triangles
          }
          SEGM (108956)
          {
               MATI (4)   Material No.3
               POSL (16372)   1364 points
               WGHT (43652)   1364 weights (n*4*[bone refs, weights])
               NRML (16372)   1364 normals
               UV0L (10916)   1364 UV coords
               NDXL (9984)   1246 polygons ( n, [ n*indexes ] )
               NDXT (7516)   1252 triangles (3*indexes)
               STRP (4076)   2036 strip refs, 1252 triangles
          }
          SEGM (108916)
          {
               MATI (4)   Material No.3
               POSL (16384)   1365 points
               WGHT (43684)   1365 weights (n*4*[bone refs, weights])
               NRML (16384)   1365 normals
               UV0L (10924)   1365 UV coords
               NDXL (9852)   1228 polygons ( n, [ n*indexes ] )
               NDXT (7444)   1240 triangles (3*indexes)
               STRP (4176)   2086 strip refs, 1241 triangles
          }
          SEGM (97796)
          {
               MATI (4)   Material No.3
               POSL (14332)   1194 points
               WGHT (38212)   1194 weights (n*4*[bone refs, weights])
               NRML (14332)   1194 normals
               UV0L (9556)   1194 UV coords
               NDXL (9944)   1242 polygons ( n, [ n*indexes ] )
               NDXT (7468)   1244 triangles (3*indexes)
               STRP (3884)   1940 strip refs, 1244 triangles
          }
          ENVL (92)   22 refs
     }
}
MODL (1008)
{
     MTYP (4)   4
     MNDX (4)   3
     NAME (12)   "bone_root"
     PRNT (20)   "override_texture"
     FLGS (4)   1
     TRAN (40)
     Scale 1, 1, 1
     Quaternion rotation 0, 0, 0, 1
     Translation 0, 1.159374, 0
     GEOM (868)   
     {
          BBOX (44)
          {
               Rotation:  0, 0, 0, 1
               Center:  0, 0, 0
               Width/2: 0.052,  Depth/2: 0.052,  Height/2: 0.052
               Bounding sphere radius: 0.0900666
          }
          SEGM (808)
          {
               MATI (4)   Material No.0
               POSL (292)   24 points
               NRML (292)   24 normals
               NDXL (68)   8 polygons ( n, [ n*indexes ] )
               NDXT (52)   8 triangles (3*indexes)
               STRP (52)   24 strip refs, 9 triangles
          }
     }
}

Return to SWBF2 Modding

Who is online

Users browsing this forum: No registered users and 1 guest