Cloth not working on custom hero [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
Bucman55
Private
Posts: 37
Joined: Tue Jan 09, 2018 7:01 pm
Projects :: Playable Campaign Factions
Games I'm Playing :: Star Wars games
xbox live or psn: PSN: BucMan55
Location: Texas

Cloth not working on custom hero [Solved]

Post by Bucman55 »

So for my mod I've added the Queen of Naboo as a playable hero, yet for some reason her tassels and skirt refuse to show up in-game. I was wondering if anyone here could help me fix this issue?

ODF (Queen):
Hidden/Spoiler:
[GameObjectClass]
ClassParent = "com_hero_default"
GeometryName = "gar_inf_nabooqueen.msh"

[Properties]
UnitType = "Trooper"

GeometryName = "gar_inf_nabooqueen"
GeometryLowRes = "gar_inf_nabooqueen_low1"
SkeletonName = "nabooqueen"
SkeletonLowRes = "leialz"
SkeletonRootScale = "0.95"
CollisionRootScale = "0.95"
FirstPerson = "all\allleia;all_1st_deathstarleia"

ClothODF = "thd_inf_nabooqueen_fronttassle"
ClothODF = "thd_inf_nabooqueen_backtassle"
ClothODF = "thd_inf_nabooqueen_skirt"

WEAPONSECTION = 1
WeaponName1 = "thd_weap_hero_queen_pistol"
WeaponAmmo1 = 4

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

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

//SOUND
// general VO - Some female VO unavailable
HurtSound = "all_inf_com_chatter_wound_female"
DeathSound = "all_inf_com_chatter_death_female"
AcquiredTargetSound = ""
HidingSound = ""
ApproachingTargetSound = ""
FleeSound = ""
PreparingForDamageSound = ""
HeardEnemySound = ""

// squad command VO - No female VO available
SCFieldMoveOutSound = ""
SCFieldHoldSound = ""
SCFieldFollowSound = ""
SCDriverGetInSound = ""
SCDriverGetOutSound = ""
SCPassengerMoveOutSound = ""
SCPassengerStopSound = ""
SCPassengerGetInSound = ""
SCPassengerGetOutSound = ""
SCGunnerAllClearSound = ""
SCGunnerSteadySound = ""
SCGunnerGetInSound = ""
SCGunnerGetOutSound = ""
SCResponseYessirSound = ""
SCResponseNosirSound = ""

// AIsquad command VO - No female VO available
AISCFieldMoveOutSound = ""
AISCFieldHoldSound = ""
AISCFieldFollowSound = ""
AISCDriverGetInSound = ""
AISCDriverGetOutSound = ""
AISCPassengerMoveOutSound = ""
AISCPassengerStopSound = ""
AISCPassengerGetInSound = ""
AISCPassengerGetOutSound = ""
AISCGunnerAllClearSound = ""
AISCGunnerSteadySound = ""
AISCGunnerGetInSound = ""
AISCGunnerGetOutSound = ""
AISCResponseYessirSound = ""
AISCResponseNosirSound = ""

SndHeroSelectable = ""
SndHeroSpawned = "hero_leia_spawn"
SndHeroDefeated = "hero_leia_exhausted"
SndHeroKiller = "hero_leia_exhausted"

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

VOSound = "leia_hero_pc_com_hostile SpottedVO"
VOSound = "leia_hero_pc_com_mechanic NeedRepairVO"
VOSound = "leia_hero_pc_com_transport NeedPickupVO"
VOSound = "leia_hero_pc_com_backup NeedBackupVO"
VOSound = "leia_hero_pc_com_clear_area AttackPositionVO"
VOSound = "leia_hero_pc_com_defend DefendPositionVO"

VOSound = "leia_hero_pc_com_hostile_inVehicle SpottedVO +InVehicle"
VOSound = "leia_hero_pc_com_mechanic_inVehicle NeedRepairVO +InVehicle"
VOSound = "leia_hero_pc_com_transport_inVehicle NeedPickupVO +InVehicle"
VOSound = "leia_hero_pc_com_backup_inVehicle NeedBackupVO +InVehicle"
VOSound = "leia_hero_pc_com_clear_area_inVehicle AttackPositionVO +InVehicle"
VOSound = "leia_hero_pc_com_defend_inVehicle DefendPositionVO +InVehicle"

VOSound = "hero_leia_AcquiredTarget AcquiredTarget"
VOSound = "hero_leia_KillingSpree4 KillingSpree4"

VOUnitType = 183
SoldierMusic = "cis_hero_Grievous_lp"
ODFs (Tassels & Skirt, they are all separate files)
Hidden/Spoiler:
(thd_inf_nabooqueen_skirt)
[GameObjectClass]
ClassLabel = "cloth"

[Properties]
attachedmesh = "gar_inf_nabooqueen"

(thd_inf_nabooqueen_backtassle)
[GameObjectClass]
ClassLabel = "cloth"

[Properties]
attachedmesh = "gar_inf_nabooqueen"

(thd_inf_nabooqueen_fronttassle)
[GameObjectClass]
ClassLabel = "cloth"

[Properties]
attachedmesh = "gar_inf_nabooqueen"
Mission Lua:
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

-- load the gametype script
Conquest = ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("setup_teams")

-- Empire Attacking (attacker is always #1)
ALL = 2
IMP = 1
-- These variables do not change
ATT = 1
DEF = 2

---------------------------------------------------------------------------
-- FUNCTION: ScriptInit
-- PURPOSE: This function is only run once
-- INPUT:
-- OUTPUT:
-- NOTES: The name, 'ScriptInit' is a chosen convention, and each
-- mission script must contain a version of this function, as
-- it is called from C to start the mission.
---------------------------------------------------------------------------
function ScriptPostLoad()
DisableBarriers("camveh")
DisableBarriers("turbar1")
DisableBarriers("turbar2")
DisableBarriers("turbar3")
DisableBarriers("cambar1")
DisableBarriers("cambar2")
DisableBarriers("cambar3")

SetMapNorthAngle(180, 1)


--This defines the CPs. These need to happen first
cp1 = CommandPost:New{name = "CP1"}
cp2 = CommandPost:New{name = "CP2"}
cp3 = CommandPost:New{name = "CP3"}
cp4 = CommandPost:New{name = "CP4"}
cp5 = CommandPost:New{name = "CP5"}
cp6 = CommandPost:New{name = "CP6"}

--This sets up the actual objective. This needs to happen after cp's are defined
conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF,
textATT = "game.modes.con",
textDEF = "game.modes.con2",
multiplayerRules = true}

--This adds the CPs to the objective. This needs to happen after the objective is set up
conquest:AddCommandPost(cp1)
conquest:AddCommandPost(cp2)
conquest:AddCommandPost(cp3)
conquest:AddCommandPost(cp4)
conquest:AddCommandPost(cp5)
conquest:AddCommandPost(cp6)

conquest:Start()
EnableSPHeroRules()

end

function ScriptInit()
StealArtistHeap(1800*1024)
-- Designers, these two lines *MUST* be first!
SetPS2ModelMemory(2097152 + 65536 * 10)
ReadDataFile("ingame.lvl")






ReadDataFile("sound\\nab.lvl;nab2gcw")
ReadDataFile("SIDE\\all.lvl",
"all_inf_rifleman_urban",
"all_inf_rocketeer",
"all_inf_sniper",
"all_inf_engineer",
"all_inf_officer",
"all_inf_wookiee")



ReadDataFile("SIDE\\imp.lvl",
"imp_inf_rifleman",
"imp_inf_rocketeer",
"imp_inf_engineer",
"imp_inf_sniper",
"imp_inf_officer",
"imp_inf_dark_trooper",
"imp_hero_darthvader",
"imp_hover_fightertank")

ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_laser")

ReadDataFile("dc:SIDE\\thd.lvl",
"thd_inf_rifleman",
"thd_inf_rocketeer",
"thd_inf_engineer",
"thd_inf_sniper",
"thd_inf_officer",
"thd_hero_queen")

ReadDataFile("dc:SIDE\\jed.lvl",
"jed_guard")





-- set up teams
SetupTeams{
imp = {
team = IMP,
units = 32,
reinforcements = 150,
soldier = { "imp_inf_rifleman",9, 25},
assault = { "imp_inf_rocketeer",1, 4},
engineer = { "imp_inf_engineer",1, 4},
sniper = { "imp_inf_sniper",1, 4},
officer = {"imp_inf_officer",1, 4},
special = { "imp_inf_dark_trooper",1, 4},
}
}

SetupTeams{
all = {
team = ALL,
units = 32,
reinforcements = 150,
soldier = { "thd_inf_rifleman",9, 25},
assault = { "thd_inf_rocketeer",1, 4},
engineer = { "thd_inf_engineer",1, 4},
sniper = { "thd_inf_sniper",1, 4},
officer = {"thd_inf_officer",1, 4},
special = { "jed_guard",1, 2},
}
}



SetHeroClass(ALL, "thd_hero_queen")

SetHeroClass(IMP, "imp_hero_darthvader")


-- Level Stats
ClearWalkers()
AddWalkerType(1, 0) -- 0 atsts with 1 leg pairs each
local weaponCnt = 240
SetMemoryPoolSize("ClothData",20) -- Cloth realated thing --
SetMemoryPoolSize("Aimer", 35)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 128)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 50) -- Cloth realated thing --
SetMemoryPoolSize("EntityHover", 4)
SetMemoryPoolSize("EntitySoundStream", 1)
SetMemoryPoolSize("EntitySoundStatic", 45)
SetMemoryPoolSize("MountedTurret", 17)
SetMemoryPoolSize("Navigator", 55)
SetMemoryPoolSize("Obstacle", 450)
SetMemoryPoolSize("PathNode", 100)
SetMemoryPoolSize("ShieldEffect", 0)
SetMemoryPoolSize("TentacleSimulator", 8)
SetMemoryPoolSize("TreeGridStack", 325)
SetMemoryPoolSize("UnitAgent", 55)
SetMemoryPoolSize("UnitController", 55)
SetMemoryPoolSize("Weapon", weaponCnt)
SetMemoryPoolSize("EntityFlyer", 6)

SetSpawnDelay(10.0, 0.25)
ReadDataFile("NAB\\nab2.lvl","naboo2_Conquest")
SetDenseEnvironment("true")
--AddDeathRegion("Water")
AddDeathRegion("Waterfall")
--SetMaxFlyHeight(20)



-- Sound

voiceSlow = OpenAudioStream("sound\\global.lvl", "all_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "imp_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)

voiceQuick = OpenAudioStream("sound\\global.lvl", "all_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "imp_unit_vo_quick", voiceQuick)

OpenAudioStream("sound\\global.lvl", "gcw_music")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
OpenAudioStream("sound\\nab.lvl", "nab2")
OpenAudioStream("sound\\nab.lvl", "nab2")
OpenAudioStream("sound\\nab.lvl", "nab2_emt")

SetBleedingVoiceOver(ALL, ALL, "all_off_com_report_us_overwhelmed", 1)
SetBleedingVoiceOver(ALL, IMP, "all_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(IMP, ALL, "imp_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(IMP, IMP, "imp_off_com_report_us_overwhelmed", 1)

SetLowReinforcementsVoiceOver(ALL, ALL, "all_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(ALL, IMP, "all_off_victory_im", .1, 1)
SetLowReinforcementsVoiceOver(IMP, IMP, "imp_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(IMP, ALL, "imp_off_victory_im", .1, 1)

SetOutOfBoundsVoiceOver(2, "allleaving")
SetOutOfBoundsVoiceOver(1, "impleaving")

SetAmbientMusic(ALL, 1.0, "all_nab_amb_start", 0,1)
SetAmbientMusic(ALL, 0.8, "all_nab_amb_middle", 1,1)
SetAmbientMusic(ALL, 0.2,"all_nab_amb_end", 2,1)
SetAmbientMusic(IMP, 1.0, "imp_nab_amb_start", 0,1)
SetAmbientMusic(IMP, 0.8, "imp_nab_amb_middle", 1,1)
SetAmbientMusic(IMP, 0.2,"imp_nab_amb_end", 2,1)

SetVictoryMusic(ALL, "all_nab_amb_victory")
SetDefeatMusic (ALL, "all_nab_amb_defeat")
SetVictoryMusic(IMP, "imp_nab_amb_victory")
SetDefeatMusic (IMP, "imp_nab_amb_defeat")

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
--SetSoundEffect("WeaponUnableSelect", "com_weap_inf_weaponchange_null")
--SetSoundEffect("WeaponModeUnableSelect", "com_weap_inf_modechange_null")
SetSoundEffect("SpawnDisplayUnitChange", "shell_select_unit")
SetSoundEffect("SpawnDisplayUnitAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplaySpawnPointChange", "shell_select_change")
SetSoundEffect("SpawnDisplaySpawnPointAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplayBack", "shell_menu_exit")




-- Camera Stats
--Nab2 Theed
--Palace
AddCameraShot(0.038177, -0.005598, -0.988683, -0.144973, -0.985535, 18.617458, -123.316505);
AddCameraShot(0.993106, -0.109389, 0.041873, 0.004612, 6.576932, 24.040697, -25.576218);
AddCameraShot(0.851509, -0.170480, 0.486202, 0.097342, 158.767715, 22.913860, -0.438658);
AddCameraShot(0.957371, -0.129655, -0.255793, -0.034641, 136.933548, 20.207420, 99.608246);
AddCameraShot(0.930364, -0.206197, 0.295979, 0.065598, 102.191856, 22.665434, 92.389435);
AddCameraShot(0.997665, -0.068271, 0.002086, 0.000143, 88.042351, 13.869274, 93.643898);
AddCameraShot(0.968900, -0.100622, 0.224862, 0.023352, 4.245263, 13.869274, 97.208542);
AddCameraShot(0.007091, -0.000363, -0.998669, -0.051089, -1.309990, 16.247049, 15.925866);
AddCameraShot(-0.274816, 0.042768, -0.949121, -0.147705, -55.505108, 25.990822, 86.987534);
AddCameraShot(0.859651, -0.229225, 0.441156, 0.117634, -62.493008, 31.040747, 117.995369);
AddCameraShot(0.703838, -0.055939, 0.705928, 0.056106, -120.401054, 23.573559, -15.484946);
AddCameraShot(0.835474, -0.181318, -0.506954, -0.110021, -166.314774, 27.687098, -6.715797);
AddCameraShot(0.327573, -0.024828, -0.941798, -0.071382, -109.700180, 15.415476, -84.413605);
AddCameraShot(-0.400505, 0.030208, -0.913203, -0.068878, 82.372711, 15.415476, -42.439548);
end



EDIT: I was able to fix the issue by changing thd_inf_nabooqueen_fronttassle, thd_inf_nabooqueen_backtassle and thd_inf_nabooqueen_skirt to gar_inf_nabooqueen_fronttassle, gar_inf_nabooqueen_backtassle and gar_inf_nabooqueen_skirt.
Post Reply