Unit will not appear [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
User avatar
agzilla123
First Lance Corporal
First Lance Corporal
Posts: 135
Joined: Sun Aug 03, 2008 11:20 am

Unit will not appear [Solved]

Post by agzilla123 »

Well, it has been a while since I have had a problem, partly becasue I took a break from modding becasue I had a lot of school work. This break is showing however, because I bet my mistake is due to something I am forgetting to do.

The reason I am posting this, is because I am not exactly sure where to start. My unit is named cge_inf_arcprudii. He will not appear in game. Here are things that might indicate problem according to my BF2Log:
Hidden/Spoiler:
Message Severity: 3
.\Source\LuaCallbacks_Mission.cpp(866)
Lua ReadDataFile: Could not open dc:sound\age.lvl;agecw

Message Severity: 3
.\Platform\Pc\pcFirstPerson.cpp(69)
FirstPerson::LoadLVLFile: Could not open FPM\REP\rep.lvl
I cannot think of why these would be a problem, as they have nothing to do with units whatsoever. Also, my LUA script for the map looks fine, so I am not sure what the problem is or where to start looking as I think the problem would be in the LUA script as I am not getting any error messages about the unit indicating that it is not appearing.

Of course I could be wrong.....but that is why I am asking for help, to make sure I am doing the right thing.

I will supply any information necessary to solve this problem.

Any help would be appreciated.
computergeek
General
General
Posts: 770
Joined: Thu Jun 07, 2007 6:26 pm
Projects :: Halo Warthog vehicle for SWBF2
Games I'm Playing :: Bioware RPGs - Halo
xbox live or psn: No gamertag set
Location: Far Far away....

Re: Unit will not appear and i am not sure why.

Post by computergeek »

You copied the Common folder from the assets to your sides folder right? And you put a folder in Build/Sides that had your side's name and had clean.bat and munge.bat copied into it? You munged your side and the common folder right?
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Unit will not appear and i am not sure why.

Post by Fiodis »

Try this:

Open your BFlog. Hit ctrl-f. This allows you to find text.

Now search for anything that is even remotely related to your unit. Could be that it's a Severity: 2, not 3, that takes him out of the round.

If you find anything, post it here and we'll tyr to make sense out of it.
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Unit will not appear and i am not sure why.

Post by AQT »

Does this unit have a .req file? Has this unit been included in your side's .req file?
User avatar
agzilla123
First Lance Corporal
First Lance Corporal
Posts: 135
Joined: Sun Aug 03, 2008 11:20 am

Re: Unit will not appear and i am not sure why.

Post by agzilla123 »

To computergeek: Yup all of that is there, just like you said it should be. however, the lvl_pc folder that is made after the mungeing process. Has a sub folder that says COMMON in it, but nothing is in this folder. However, I should say that I have seven other units in this side and they are all working perfectly even though that COMMON folder has never had anything in it.

Fiodis: Tried that already (first thing I did). Absolutely nothing about my unit was there.

AQT: Yes, both of these files are there. Would you like to see them?

Any help solving this problem would be appreciated.
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Unit will not appear and i am not sure why.

Post by AQT »

agzilla123 wrote:AQT: Yes, both of these files are there. Would you like to see them?
Sure, it could help. You may also want to double check your unit's .odf files just in case there might be a typo(s). The Severity 3 messages you posted don't involve your sides at all so don't worry about them. If there are no problems with your .req or .odf files then it could be with your .lua file.
User avatar
agzilla123
First Lance Corporal
First Lance Corporal
Posts: 135
Joined: Sun Aug 03, 2008 11:20 am

Re: Unit will not appear and i am not sure why.

Post by agzilla123 »

Ok, here is my unit's .req file:
Hidden/Spoiler:
ucft
{
REQN
{
"class"
"cge_inf_arcprudii"
}
}
Here is my side's .req file:
Hidden/Spoiler:
ucft
{
REQN
{
"lvl"
"cge_inf_battledroid"
"cge_inf_pilotdroid"
"cge_inf_securitydroid"
"cge_inf_clonetrooper"
"cge_inf_clonesergant"
"cge_inf_clonelieutenant"
"cge_inf_clonecaptain"
"cge_inf_clonecommander"
"cge_inf_clonepilot"
"cge_inf_clonecommando"
"cge_inf_arcprudii"
}

}
Here is my unit's .odf file:
Hidden/Spoiler:
[GameObjectClass]
ClassLabel = "soldier"
ClassParent = "com_inf_default"

[Properties]
UnitType = "assault"
IconTexture = "rep_gunner_icon"

GeometryName = "rep_inf_arcprudii"
FirstPerson = "REP\reparc;rep_1st_arcprudii"
GeometryLowRes = "rep_inf_arcprudii_low1"
ClothODF = "rep_inf_arcprudii_cape"

OverrideTexture = "rep_inf_arcprudii"
OverrideTexture2 = "rep_inf_arcprudii_arc_pack"

WEAPONSECTION = 1
WeaponName = "rep_weap_inf_rifle"
WeaponAmmo = 5

WEAPONSECTION = 2
WeaponName = "rep_weap_inf_thermaldetonator"
WeaponAmmo = 4
WeaponChannel = 1

WEAPONSECTION = 3
WeaponName = "rep_weap_inf_powerup_dispenser"
WeaponAmmo = 1
WeaponChannel = 1
He has a cape, and here is the .odf file for that:
Hidden/Spoiler:
[GameObjectClass]
ClassLabel = "cloth"

[Properties]
attachedmesh = "rep_inf_arctrooper"
Any help solving this problem would be appreciated.
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Unit will not appear and i am not sure why.

Post by AQT »

They all look good (I think), I don't see any errors that could be causing this problem. Could it be with your .lua file. You may want to post it.
User avatar
agzilla123
First Lance Corporal
First Lance Corporal
Posts: 135
Joined: Sun Aug 03, 2008 11:20 am

Re: Unit will not appear and i am not sure why.

Post by agzilla123 »

Ok, here is the .lua file:
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

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

---------------------------------------------------------------------------
-- 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()
AddAIGoal(3, "Deathmatch", 100)
cp1 = CommandPost:New{name = "cp1"}
cp2 = CommandPost:New{name = "cp2"}
cp3 = CommandPost:New{name = "cp3"}
cp4 = CommandPost:New{name = "cp4"}
cp6 = CommandPost:New{name = "cp6"}
cp7 = CommandPost:New{name = "cp7"}
cp8 = CommandPost:New{name = "cp8"}

--This sets up the actual objective. This needs to happen after cp's are defined
conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF, text = "level.geo1.objectives.conquest", 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(cp6)
conquest:AddCommandPost(cp7)
conquest:AddCommandPost(cp8)

conquest:Start()

EnableSPHeroRules()

AddDeathRegion("deathregion")
AddDeathRegion("deathregion2")
AddDeathRegion("deathregion3")
AddDeathRegion("deathregion4")
AddDeathRegion("deathregion5")

end
function ScriptInit()
StealArtistHeap(800*1024)
-- Designers, these two lines *MUST* be first.
SetPS2ModelMemory(3500000)
ReadDataFile("ingame.lvl")

-- REP Attacking (attacker is always #1)
local REP = 1
local CIS = 2
-- These variables do not change
local ATT = 1
local DEF = 2

SetTeamAggressiveness(CIS, 1.0)
SetTeamAggressiveness(REP, 1.0)

SetMemoryPoolSize("Music", 40)

ReadDataFile("sound\\geo.lvl;geo1cw")
ReadDataFile("dc:sound\\age.lvl;agecw")
ReadDataFile("SIDE\\rep.lvl",
--"rep_bldg_forwardcenter",
"rep_fly_assault_dome",
--"rep_fly_gunship",
"rep_fly_gunship_dome",
"rep_fly_jedifighter_dome",
"rep_inf_ep2_rocketeer",
"rep_inf_ep2_rifleman",
"rep_inf_ep2_jettrooper",
"rep_inf_ep2_sniper",
"rep_inf_ep3_officer",
"rep_inf_ep2_engineer",
"rep_hero_macewindu",
"rep_walk_atte")

ReadDataFile("SIDE\\cis.lvl",
"cis_fly_droidfighter_dome",
--"cis_fly_geofighter",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_sniper",
"cis_inf_officer",
"cis_inf_engineer",
"cis_hero_countdooku",
"cis_inf_droideka",
"cis_tread_hailfire",
--"cis_hover_stap",
"cis_walk_spider")

ReadDataFile("dc:SIDE\\cge.lvl",
"cge_inf_battledroid",
"cge_inf_pilotdroid",
"cge_inf_securitydroid",
"cge_inf_commanddroid",
"cge_inf_clonetrooper",
"cge_inf_clonesergant",
"cge_inf_clonelieutenant",
"cge_inf_clonecaptain",
"cge_inf_clonecommander",
"cge_inf_clonepilot",
"cge_inf_clonecommando",
"cge_inf_arcprudii")

ReadDataFile("SIDE\\geo.lvl",
"gen_inf_geonosian")

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

-- Level Stats

ClearWalkers()
SetMemoryPoolSize("EntityWalker", -1)
AddWalkerType(0, 3) -- 8 droidekas (special case: 0 leg pairs)
AddWalkerType(2, 3) -- 2 spider walkers with 2 leg pairs each
AddWalkerType(3, 0) -- 2 attes with 3 leg pairs each
local weaponcnt = 240
SetMemoryPoolSize("Aimer", 50)
SetMemoryPoolSize("AmmoCounter", weaponcnt)
SetMemoryPoolSize("BaseHint", 100)
SetMemoryPoolSize("CommandWalker", 1)
SetMemoryPoolSize("EnergyBar", weaponcnt)
SetMemoryPoolSize("EntityFlyer", 6)
SetMemoryPoolSize("EntityHover", 9)
SetMemoryPoolSize("EntityLight", 50)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("MountedTurret", 10)
SetMemoryPoolSize("Navigator", 50)
SetMemoryPoolSize("Obstacle", 450)
SetMemoryPoolSize("PathFollower", 50)
SetMemoryPoolSize("PathNode", 100)
SetMemoryPoolSize("TreeGridStack", 300)
SetMemoryPoolSize("UnitAgent", 50)
SetMemoryPoolSize("UnitController", 50)
SetMemoryPoolSize("Weapon", weaponcnt)

SetSpawnDelay(10.0, 0.25)

SetupTeams{

rep = {
team = REP,
units = 28,
reinforcements = 150,
soldier = { "cge_inf_clonetrooper",10, 25},
assault = { "cge_inf_clonesergant",1, 4},
engineer = { "cge_inf_clonelieutenant",1, 4},
sniper = { "cge_inf_clonecaptain",1, 4},
officer = {"cge_inf_clonecommander",1, 4},
special = { "cge_inf_clonepilot",1, 4},
commando = { "cge_inf_clonecommando",1, 4},
arctrooper = { "cge_inf_arcprudii",1, 4}

},
cis = {
team = CIS,
units = 28,
reinforcements = 150,
soldier = { "cge_inf_battledroid",10, 25},
assault = { "cge_inf_pilotdroid",1, 4},
engineer = { "cge_inf_securitydroid",1, 4},
sniper = { "cge_inf_commanddroid",1, 4},
officer = {"cis_inf_officer",1, 4},
special = { "cis_inf_droideka",1, 4},

}
}



SetHeroClass(REP, "rep_hero_macewindu")
SetHeroClass(CIS, "cis_hero_countdooku")


-- Attacker Stats

--teamATT = ConquestTeam:New{team = ATT}
--teamATT:AddBleedThreshold(21, 0.75)
--teamATT:AddBleedThreshold(11, 2.25)
--teamATT:AddBleedThreshold(1, 3.0)
--teamATT:Init()
SetTeamAsEnemy(ATT,3)
SetTeamAsEnemy(3,ATT)

-- Defender Stats

--teamDEF = ConquestTeam:New{team = DEF}
--teamDEF:AddBleedThreshold(21, 0.75)
--teamDEF:AddBleedThreshold(11, 2.25)
--teamDEF:AddBleedThreshold(1, 3.0)
--teamDEF:Init()
SetTeamAsFriend(DEF,3)

-- Local Stats
SetTeamName(3, "locals")
SetUnitCount(3, 7)
AddUnitClass(3, "geo_inf_geonosian", 7)
SetTeamAsFriend(3, DEF)
--SetTeamName(4, "locals")
--AddUnitClass(4, "rep_inf_jedimale",1)
--AddUnitClass(4, "rep_inf_jedimaleb",1)
--AddUnitClass(4, "rep_inf_jedimaley",1)
--SetUnitCount(4, 3)
--SetTeamAsFriend(4, ATT)

ReadDataFile("dc:AGE\\geo1.lvl", "geo1_conquest")

SetDenseEnvironment("false")
SetMinFlyHeight(-65)
SetMaxFlyHeight(50)
SetMaxPlayerFlyHeight(50)



-- Birdies
--SetNumBirdTypes(1)
--SetBirdType(0.0,10.0,"dragon")
--SetBirdFlockMinHeight(90.0)

-- Sound

voiceSlow = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)

voiceQuick = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_quick", voiceQuick)

OpenAudioStream("sound\\global.lvl", "cw_music")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
OpenAudioStream("sound\\geo.lvl", "geo1cw")
OpenAudioStream("sound\\geo.lvl", "geo1cw")

SetBleedingVoiceOver(REP, REP, "rep_off_com_report_us_overwhelmed", 1)
SetBleedingVoiceOver(REP, CIS, "rep_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, REP, "cis_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, CIS, "cis_off_com_report_us_overwhelmed", 1)

SetLowReinforcementsVoiceOver(REP, REP, "rep_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(REP, CIS, "rep_off_victory_im", .1, 1)
SetLowReinforcementsVoiceOver(CIS, CIS, "cis_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(CIS, REP, "cis_off_victory_im", .1, 1)

SetOutOfBoundsVoiceOver(1, "repleaving")
SetOutOfBoundsVoiceOver(2, "cisleaving")

SetAmbientMusic(REP, 1.0, "rep_GEO_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rep_GEO_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2, "rep_GEO_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_GEO_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_GEO_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2, "cis_GEO_amb_end", 2,1)

SetVictoryMusic(REP, "rep_geo_amb_victory")
SetDefeatMusic (REP, "rep_geo_amb_defeat")
SetVictoryMusic(CIS, "cis_geo_amb_victory")
SetDefeatMusic (CIS, "cis_geo_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")


--ActivateBonus(CIS, "SNEAK_ATTACK")
--ActivateBonus(REP, "SNEAK_ATTACK")

SetAttackingTeam(ATT)

--Opening Satalite Shot
--Geo
--Mountain
AddCameraShot(0.996091, 0.085528, -0.022005, 0.001889, -6.942698, -59.197201, 26.136919)
--Wrecked Ship
AddCameraShot(0.906778, 0.081875, -0.411906, 0.037192, 26.373968, -59.937874, 122.553581)
--War Room
--AddCameraShot(0.994219, 0.074374, 0.077228, -0.005777, 90.939568, -49.293945, -69.571136)
end
Any help would be appreciated.
computergeek
General
General
Posts: 770
Joined: Thu Jun 07, 2007 6:26 pm
Projects :: Halo Warthog vehicle for SWBF2
Games I'm Playing :: Bioware RPGs - Halo
xbox live or psn: No gamertag set
Location: Far Far away....

Re: Unit will not appear and i am not sure why.

Post by computergeek »

Try putting "cge_inf_arcprudii" in the soldier slot

Code: Select all

rep = {
team = REP,
units = 28,
reinforcements = 150,
soldier = { "cge_inf_arcprudii",10, 25},
assault = { "cge_inf_clonesergant",1, 4},
engineer = { "cge_inf_clonelieutenant",1, 4},
sniper = { "cge_inf_clonecaptain",1, 4},
officer = {"cge_inf_clonecommander",1, 4},
special = { "cge_inf_clonepilot",1, 4},
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Unit will not appear and i am not sure why.

Post by AQT »

Here's your problem

Code: Select all

arctrooper = { "cge_inf_arcprudii",1, 4}
You can't do that. You must add the line

Code: Select all

AddUnitClass(REP,"cge_inf_arcprudii",1,4)
before

Code: Select all

SetHeroClass(REP, "rep_hero_macewindu")
SetHeroClass(CIS, "cis_hero_countdooku")
so that it looks like this

Code: Select all

AddUnitClass(REP,"cge_inf_arcprudii",1,4)

SetHeroClass(REP, "rep_hero_macewindu")
SetHeroClass(CIS, "cis_hero_countdooku")
Hope that helps (it should).
computergeek
General
General
Posts: 770
Joined: Thu Jun 07, 2007 6:26 pm
Projects :: Halo Warthog vehicle for SWBF2
Games I'm Playing :: Bioware RPGs - Halo
xbox live or psn: No gamertag set
Location: Far Far away....

Re: Unit will not appear and i am not sure why.

Post by computergeek »

Actually AQT, if you edit the SetupTeams .lua you can do what he did, and I'm assuming that's what he did
User avatar
agzilla123
First Lance Corporal
First Lance Corporal
Posts: 135
Joined: Sun Aug 03, 2008 11:20 am

Re: Unit will not appear and i am not sure why.

Post by agzilla123 »

Ok, so what AQT told me worked.

I am trying to get everything working the way it should now. I will edit the topic if I get it working or I have a problem.

EDIT: I got everything working. This thread can now be locked. Thanks for the help everyone. :D
Post Reply