AI units aren't showing up in map

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

Elmo
Field Commander
Field Commander
Posts: 962
Joined: Wed Nov 08, 2006 5:13 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

AI units aren't showing up in map

Post by Elmo »

The title says it all. I start the game, load my map. and when You usually see cps on the side where you click to spawn... there are no cps!. So i can't spawn. I don't know how to fix this... so please help me :P the last change i made was... adding water to the map And adding objects from the BF1 mod tools. I did accidentally cover up (with high terrain) a few cps, but fixed that. But still, it doesn't work. :x I know there were some cp problems with certain maps of the conversion pack ( them not showing up at the spawn list), so maybe Tean could shed some light on this topic. :P

Edit: Im sry i figured it out. But for some reason, now no AI units are showing up on the battlefield. Anyone have a clue onto wants goin on?
Last edited by Elmo on Mon Dec 11, 2006 12:56 am, edited 1 time in total.
MasterSkywalker
Major
Major
Posts: 501
Joined: Mon Apr 17, 2006 1:44 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

RE: Cps not showing up in map!!! Help pleez

Post by MasterSkywalker »

Thats because your lua is calling for a function that doesn't work, or something similiar too that. Could you post your lua so we could look into it plz?

Soul -- Merry X-mas!!
Elmo
Field Commander
Field Commander
Posts: 962
Joined: Wed Nov 08, 2006 5:13 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by Elmo »

ok, here's my CW LUA:

.lv--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

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

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


function ScriptPostLoad()


--This defines the CPs. These need to happen first
cp1 = CommandPost:New{name = "cp1"}
cp2 = CommandPost:New{name = "cp2"}
cp3 = CommandPost:New{name = "cp3"}


--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:Start()

EnableSPHeroRules()

end


---------------------------------------------------------------------------
-- 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 ScriptInit()

ReadDataFile("ingame.lvl")


SetMaxFlyHeight(510)
SetMaxPlayerFlyHeight (510)

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("DC:SIDE\\rep.lvl",
"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")
ReadDataFile("SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_inf_sniper",
"cis_inf_officer",
"cis_inf_droideka",
"cis_hero_darthmaul",
"cis_hover_aat")


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

SetupTeams{
rep = {
team = REP,
units = 20,
reinforcements = 150,
soldier = { "rep_inf_ep3_rifleman",9, 25},
assault = { "rep_inf_ep3_rocketeer",1, 4},
engineer = { "rep_inf_ep3_engineer",1, 4},
sniper = { "rep_inf_ep3_sniper",1, 4},
officer = {"rep_inf_ep3_officer",1, 4},
special = { "rep_inf_ep3_jettrooper",1, 4},

},
cis = {
team = CIS,
units = 20,
reinforcements = 150,
soldier = { "cis_inf_rifleman",9, 25},
assault = { "cis_inf_rocketeer",1, 4},
engineer = { "cis_inf_engineer",1, 4},
sniper = { "cis_inf_sniper",1, 4},
officer = {"cis_inf_officer",1, 4},
special = { "cis_inf_droideka",1, 4},
}
}

SetHeroClass(CIS, "cis_hero_darthmaul")
SetHeroClass(REP, "rep_hero_anakin")


-- Level Stats
-- ClearWalkers()
AddWalkerType(0, 4) -- special -> droidekas
AddWalkerType(1, 0) -- 1x2 (1 pair of legs)
AddWalkerType(2, 0) -- 2x2 (2 pairs of legs)
AddWalkerType(3, 0) -- 3x2 (3 pairs of legs)
local weaponCnt = 240
SetMemoryPoolSize("Aimer", 75)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 1024)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 22)
SetMemoryPoolSize("EntityFlyer", 30)
SetMemoryPoolSize("EntityHover", 20)
SetMemoryPoolSize("EntityLight", 200)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("EntitySoundStatic", 20)
SetMemoryPoolSize("MountedTurret", 25)
SetMemoryPoolSize("Navigator", 49)
SetMemoryPoolSize("Obstacle", 760)
SetMemoryPoolSize("PathNode", 512)
SetMemoryPoolSize("SoundSpaceRegion", 46)
SetMemoryPoolSize("TreeGridStack", 500)
SetMemoryPoolSize("UnitAgent", 49)
SetMemoryPoolSize("UnitController", 49)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)
--ReadDataFile("dc:KKM\\KKM.lvl", "KKM_conquest")
ReadDataFile("dc:KKM\\KKM.lvl", "KKM_conquest")
SetDenseEnvironment("false")




-- Sound

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")

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\\yav.lvl", "yav1")
OpenAudioStream("sound\\yav.lvl", "yav1")
OpenAudioStream("sound\\yav.lvl", "yav1_emt")

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)

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

SetAmbientMusic(REP, 1.0, "rep_yav_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rep_yav_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2, "rep_yav_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_yav_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_yav_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2, "cis_yav_amb_end", 2,1)

SetVictoryMusic(REP, "rep_yav_amb_victory")
SetDefeatMusic (REP, "rep_yav_amb_defeat")
SetVictoryMusic(CIS, "cis_yav_amb_victory")
SetDefeatMusic (CIS, "cis_yav_amb_defeat")

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
--SetSoundEffect("BirdScatter", "birdsFlySeq1")
--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")


--OpeningSateliteShot
AddCameraShot(0.908386, -0.209095, -0.352873, -0.081226, -45.922508, -19.114113, 77.022636);

AddCameraShot(-0.481173, 0.024248, -0.875181, -0.044103, 14.767292, -30.602322, -144.506851);
AddCameraShot(0.999914, -0.012495, -0.004416, -0.000055, 1.143253, -33.602314, -76.884430);
AddCameraShot(0.839161, 0.012048, -0.543698, 0.007806, 19.152437, -49.802273, 24.337317);
AddCameraShot(0.467324, 0.006709, -0.883972, 0.012691, 11.825212, -49.802273, -7.000720);
AddCameraShot(0.861797, 0.001786, -0.507253, 0.001051, -11.986043, -59.702248, 23.263165);
AddCameraShot(0.628546, -0.042609, -0.774831, -0.052525, 20.429928, -48.302277, 9.771714);
AddCameraShot(0.765213, -0.051873, 0.640215, 0.043400, 57.692474, -48.302277, 16.540724);
AddCameraShot(0.264032, -0.015285, -0.962782, -0.055734, -16.681797, -42.902290, 129.553268);
AddCameraShot(-0.382320, 0.022132, -0.922222, -0.053386, 20.670977, -42.902290, 135.513001);
end

I think i already see a mistake. I'll fix it and see what happens.

Do you need all my LUA scripts?

And the problem now is just that there are no AI units on the battlefield :wink:

Thx for the help
Rekubot
Jedi
Jedi
Posts: 1080
Joined: Wed Apr 05, 2006 12:34 pm
Projects :: No Mod project currently.
Games I'm Playing :: Shadow Complex
xbox live or psn: Rekubot
Location: UK

Post by Rekubot »

Everything looks fine to me, apart from this portion of the LUA:

Code: Select all

.lv-- 
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved. 
-- 

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

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


function ScriptPostLoad() 


--This defines the CPs. These need to happen first 
cp1 = CommandPost:New{name = "cp1"} 
cp2 = CommandPost:New{name = "cp2"} 
cp3 = CommandPost:New{name = "cp3"} 


--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)
First off, the top line, well, shouldn't be there. Perhaps that's not even part of the code, and just a mistake you accidently typed in, but delete it if it is in the LUA. Also, look at these lines:

Code: Select all

--This defines the CPs. These need to happen first 
cp1 = CommandPost:New{name = "cp1"} 
cp2 = CommandPost:New{name = "cp2"} 
cp3 = CommandPost:New{name = "cp3"} 

Code: Select all

--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) 
I'm not sure whether you wanted three CPs or five, but these part(s) need to be updated. Should be simple enough.
Aksel3

Post by Aksel3 »

If I may jump in...? Thanks. :wink:

I'm sorry for highjacking your thread Elmo, but I have the exact same problem. Mine CPs won't shop up either. So instead of creating a new topic - which would just take up space, I decided to post my problem here, along with my LUA of course:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

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

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


function ScriptPostLoad()


--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"}



--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:Start(0)

EnableSPHeroRules()

end


---------------------------------------------------------------------------
-- 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 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",
"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")
ReadDataFile("SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_inf_sniper",
"cis_inf_officer",
"cis_inf_droideka",
"cis_hero_darthmaul",
"cis_hover_aat")


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

SetupTeams{
rep = {
team = REP,
units = 20,
reinforcements = 150,
soldier = { "rep_inf_ep3_rifleman",9, 25},
assault = { "rep_inf_ep3_rocketeer",1, 4},
engineer = { "rep_inf_ep3_engineer",1, 4},
sniper = { "rep_inf_ep3_sniper",1, 4},
officer = {"rep_inf_ep3_officer",1, 4},
special = { "rep_inf_ep3_jettrooper",1, 4},

},
cis = {
team = CIS,
units = 20,
reinforcements = 150,
soldier = { "cis_inf_rifleman",9, 25},
assault = { "cis_inf_rocketeer",1, 4},
engineer = { "cis_inf_engineer",1, 4},
sniper = { "cis_inf_sniper",1, 4},
officer = {"cis_inf_officer",1, 4},
special = { "cis_inf_droideka",1, 4},
}
}

SetHeroClass(CIS, "cis_hero_darthmaul")
SetHeroClass(REP, "rep_hero_anakin")


-- Level Stats
-- ClearWalkers()
AddWalkerType(0, 4) -- special -> droidekas
AddWalkerType(1, 0) -- 1x2 (1 pair of legs)
AddWalkerType(2, 0) -- 2x2 (2 pairs of legs)
AddWalkerType(3, 0) -- 3x2 (3 pairs of legs)
local weaponCnt = 1024
SetMemoryPoolSize("Aimer", 75)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 1024)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 32)
SetMemoryPoolSize("EntityFlyer", 32)
SetMemoryPoolSize("EntityHover", 32)
SetMemoryPoolSize("EntityLight", 200)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("EntitySoundStatic", 32)
SetMemoryPoolSize("MountedTurret", 32)
SetMemoryPoolSize("Navigator", 128)
SetMemoryPoolSize("Obstacle", 1024)
SetMemoryPoolSize("PathNode", 1024)
SetMemoryPoolSize("SoundSpaceRegion", 64)
SetMemoryPoolSize("TreeGridStack", 1024)
SetMemoryPoolSize("UnitAgent", 128)
SetMemoryPoolSize("UnitController", 128)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)
--ReadDataFile("KAM\\kam1.lvl", "geo1_conquest")
ReadDataFile("KAM\\kam1.lvl", "geo1_conquest")
SetDenseEnvironment("false")




-- Sound

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")

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\\yav.lvl", "yav1")
OpenAudioStream("sound\\yav.lvl", "yav1")
OpenAudioStream("sound\\yav.lvl", "yav1_emt")

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)

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

SetAmbientMusic(REP, 1.0, "rep_yav_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rep_yav_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2, "rep_yav_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_yav_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_yav_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2, "cis_yav_amb_end", 2,1)

SetVictoryMusic(REP, "rep_yav_amb_victory")
SetDefeatMusic (REP, "rep_yav_amb_defeat")
SetVictoryMusic(CIS, "cis_yav_amb_victory")
SetDefeatMusic (CIS, "cis_yav_amb_defeat")

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
--SetSoundEffect("BirdScatter", "birdsFlySeq1")
--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")


--OpeningSateliteShot
AddCameraShot(0.908386, -0.209095, -0.352873, -0.081226, -45.922508, -19.114113, 77.022636);

AddCameraShot(-0.481173, 0.024248, -0.875181, -0.044103, 14.767292, -30.602322, -144.506851);
AddCameraShot(0.999914, -0.012495, -0.004416, -0.000055, 1.143253, -33.602314, -76.884430);
AddCameraShot(0.839161, 0.012048, -0.543698, 0.007806, 19.152437, -49.802273, 24.337317);
AddCameraShot(0.467324, 0.006709, -0.883972, 0.012691, 11.825212, -49.802273, -7.000720);
AddCameraShot(0.861797, 0.001786, -0.507253, 0.001051, -11.986043, -59.702248, 23.263165);
AddCameraShot(0.628546, -0.042609, -0.774831, -0.052525, 20.429928, -48.302277, 9.771714);
AddCameraShot(0.765213, -0.051873, 0.640215, 0.043400, 57.692474, -48.302277, 16.540724);
AddCameraShot(0.264032, -0.015285, -0.962782, -0.055734, -16.681797, -42.902290, 129.553268);
AddCameraShot(-0.382320, 0.022132, -0.922222, -0.053386, 20.670977, -42.902290, 135.513001);
end
Any help is really apreciated! Thanks in advance. :)
Hebes24
Sith Master
Sith Master
Posts: 2594
Joined: Sat Jun 03, 2006 5:15 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: In An Epic Space Battle!
Contact:

Post by Hebes24 »

@Elmo - Try Rekubot's solution. also, put the LUA in quotes so it's smaller and doesn't take up as much room

@Aksel - Run BF2_modtools.exe and post the Bfront2 log.
Elmo
Field Commander
Field Commander
Posts: 962
Joined: Wed Nov 08, 2006 5:13 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by Elmo »

Rekubot wrote:Everything looks fine to me, apart from this portion of the LUA:

Code: Select all

.lv-- 
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved. 
-- 

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

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


function ScriptPostLoad() 


--This defines the CPs. These need to happen first 
cp1 = CommandPost:New{name = "cp1"} 
cp2 = CommandPost:New{name = "cp2"} 
cp3 = CommandPost:New{name = "cp3"} 


--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)
First off, the top line, well, shouldn't be there. Perhaps that's not even part of the code, and just a mistake you accidently typed in, but delete it if it is in the LUA. Also, look at these lines:

Code: Select all

--This defines the CPs. These need to happen first 
cp1 = CommandPost:New{name = "cp1"} 
cp2 = CommandPost:New{name = "cp2"} 
cp3 = CommandPost:New{name = "cp3"} 

Code: Select all

--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) 
I'm not sure whether you wanted three CPs or five, but these part(s) need to be updated. Should be simple enough.
what top line? I did update the part with 5 cps then 3 cps but there are still no AI on the map! :x :? Also, I only have 2 cps now :wink: Shall I show you my LUA now?
fat_walrus

Post by fat_walrus »

This should be your LUA if you have 5 cps

Code: Select all

-- 
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved. 
-- 

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

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


function ScriptPostLoad() 


--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"} 



--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:Start(0) 

EnableSPHeroRules() 

end 


--------------------------------------------------------------------------- 
-- 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 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", 
"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") 
ReadDataFile("SIDE\\cis.lvl", 
"cis_inf_rifleman", 
"cis_inf_rocketeer", 
"cis_inf_engineer", 
"cis_inf_sniper", 
"cis_inf_officer", 
"cis_inf_droideka", 
"cis_hero_darthmaul", 
"cis_hover_aat") 


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

SetupTeams{ 
rep = { 
team = REP, 
units = 20, 
reinforcements = 150, 
soldier = { "rep_inf_ep3_rifleman",9, 25}, 
assault = { "rep_inf_ep3_rocketeer",1, 4}, 
engineer = { "rep_inf_ep3_engineer",1, 4}, 
sniper = { "rep_inf_ep3_sniper",1, 4}, 
officer = {"rep_inf_ep3_officer",1, 4}, 
special = { "rep_inf_ep3_jettrooper",1, 4}, 

}, 
cis = { 
team = CIS, 
units = 20, 
reinforcements = 150, 
soldier = { "cis_inf_rifleman",9, 25}, 
assault = { "cis_inf_rocketeer",1, 4}, 
engineer = { "cis_inf_engineer",1, 4}, 
sniper = { "cis_inf_sniper",1, 4}, 
officer = {"cis_inf_officer",1, 4}, 
special = { "cis_inf_droideka",1, 4}, 
} 
} 

SetHeroClass(CIS, "cis_hero_darthmaul") 
SetHeroClass(REP, "rep_hero_anakin") 


-- Level Stats 
-- ClearWalkers() 
AddWalkerType(0, 4) -- special -> droidekas 
AddWalkerType(1, 0) -- 1x2 (1 pair of legs) 
AddWalkerType(2, 0) -- 2x2 (2 pairs of legs) 
AddWalkerType(3, 0) -- 3x2 (3 pairs of legs) 
local weaponCnt = 1024 
SetMemoryPoolSize("Aimer", 75) 
SetMemoryPoolSize("AmmoCounter", weaponCnt) 
SetMemoryPoolSize("BaseHint", 1024) 
SetMemoryPoolSize("EnergyBar", weaponCnt) 
SetMemoryPoolSize("EntityCloth", 32) 
SetMemoryPoolSize("EntityFlyer", 32) 
SetMemoryPoolSize("EntityHover", 32) 
SetMemoryPoolSize("EntityLight", 200) 
SetMemoryPoolSize("EntitySoundStream", 4) 
SetMemoryPoolSize("EntitySoundStatic", 32) 
SetMemoryPoolSize("MountedTurret", 32) 
SetMemoryPoolSize("Navigator", 128) 
SetMemoryPoolSize("Obstacle", 1024) 
SetMemoryPoolSize("PathNode", 1024) 
SetMemoryPoolSize("SoundSpaceRegion", 64) 
SetMemoryPoolSize("TreeGridStack", 1024) 
SetMemoryPoolSize("UnitAgent", 128) 
SetMemoryPoolSize("UnitController", 128) 
SetMemoryPoolSize("Weapon", weaponCnt) 

SetSpawnDelay(10.0, 0.25) 
--ReadDataFile("KAM\\kam1.lvl", "geo1_conquest") 
ReadDataFile("KAM\\kam1.lvl", "geo1_conquest") 
SetDenseEnvironment("false") 




-- Sound 

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin") 
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout") 

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\\yav.lvl", "yav1") 
OpenAudioStream("sound\\yav.lvl", "yav1") 
OpenAudioStream("sound\\yav.lvl", "yav1_emt") 

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) 

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

SetAmbientMusic(REP, 1.0, "rep_yav_amb_start", 0,1) 
SetAmbientMusic(REP, 0.8, "rep_yav_amb_middle", 1,1) 
SetAmbientMusic(REP, 0.2, "rep_yav_amb_end", 2,1) 
SetAmbientMusic(CIS, 1.0, "cis_yav_amb_start", 0,1) 
SetAmbientMusic(CIS, 0.8, "cis_yav_amb_middle", 1,1) 
SetAmbientMusic(CIS, 0.2, "cis_yav_amb_end", 2,1) 

SetVictoryMusic(REP, "rep_yav_amb_victory") 
SetDefeatMusic (REP, "rep_yav_amb_defeat") 
SetVictoryMusic(CIS, "cis_yav_amb_victory") 
SetDefeatMusic (CIS, "cis_yav_amb_defeat") 

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin") 
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout") 
--SetSoundEffect("BirdScatter", "birdsFlySeq1") 
--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") 


--OpeningSateliteShot 
AddCameraShot(0.908386, -0.209095, -0.352873, -0.081226, -45.922508, -19.114113, 77.022636); 

AddCameraShot(-0.481173, 0.024248, -0.875181, -0.044103, 14.767292, -30.602322, -144.506851); 
AddCameraShot(0.999914, -0.012495, -0.004416, -0.000055, 1.143253, -33.602314, -76.884430); 
AddCameraShot(0.839161, 0.012048, -0.543698, 0.007806, 19.152437, -49.802273, 24.337317); 
AddCameraShot(0.467324, 0.006709, -0.883972, 0.012691, 11.825212, -49.802273, -7.000720); 
AddCameraShot(0.861797, 0.001786, -0.507253, 0.001051, -11.986043, -59.702248, 23.263165); 
AddCameraShot(0.628546, -0.042609, -0.774831, -0.052525, 20.429928, -48.302277, 9.771714); 
AddCameraShot(0.765213, -0.051873, 0.640215, 0.043400, 57.692474, -48.302277, 16.540724); 
AddCameraShot(0.264032, -0.015285, -0.962782, -0.055734, -16.681797, -42.902290, 129.553268); 
AddCameraShot(-0.382320, 0.022132, -0.922222, -0.053386, 20.670977, -42.902290, 135.513001); 
end 
Notice near the top lines that it has the conquest:AddCommandPost(cp5) and cp5 = CommandPost:New{name = "cp5"} you needed to add.

cp5 = CommandPost:New{name = "cp5"} puts the CP on the map ingame while
conquest:AddCommandPost(cp5) adds it to the objective meaning that if you didn't put it here, and if you captured all the cps but this one, you would still win.

If this confuses you read the Getting Started doc near the bottom (the scripting part)
Elmo
Field Commander
Field Commander
Posts: 962
Joined: Wed Nov 08, 2006 5:13 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by Elmo »

ok.. let me clarify things here. I did exactly what you (or the docs) told me to do. But If i have all the cps except the one i made, the timer goes down.

And I only have two cps now. K? I have experienced problems where I can't Spawn from the cp i made. Can you help me with that? Also... (i should chage the title) the problem now is that no AI units are on my map. Im the only one in the map :wink:
darthgunray
First Lance Corporal
First Lance Corporal
Posts: 127
Joined: Sat Oct 21, 2006 1:49 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Contact:

Post by darthgunray »

looks like u should reinstall the game buddy
fat_walrus

Post by fat_walrus »

Ya....um...that happened to me before. Two cps? you probably can't spawn cuz your spawn paths aren't set up correctly. It could be many things.

Why not just post your LUA to see what you did

EDIT:
@darthgunray: NOO!! He doesn't need to. Absolutely no reason and it would do anything or fix ANYthing. Ahem...
Elmo
Field Commander
Field Commander
Posts: 962
Joined: Wed Nov 08, 2006 5:13 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by Elmo »

here's my LUA
.lv--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

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

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


function ScriptPostLoad()


--This defines the CPs. These need to happen first
cp1 = CommandPost:New{name = "cp1"}
cp2 = CommandPost:New{name = "cp2"}


--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:Start()

EnableSPHeroRules()

end


---------------------------------------------------------------------------
-- 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 ScriptInit()

ReadDataFile("ingame.lvl")


SetMaxFlyHeight(510)
SetMaxPlayerFlyHeight (510)

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("DC:SIDE\\rep.lvl",
"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")
ReadDataFile("SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_inf_sniper",
"cis_inf_officer",
"cis_inf_droideka",
"cis_hero_darthmaul",
"cis_hover_aat")


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

SetupTeams{
rep = {
team = REP,
units = 20,
reinforcements = 150,
soldier = { "rep_inf_ep3_rifleman",9, 25},
assault = { "rep_inf_ep3_rocketeer",1, 4},
engineer = { "rep_inf_ep3_engineer",1, 4},
sniper = { "rep_inf_ep3_sniper",1, 4},
officer = {"rep_inf_ep3_officer",1, 4},
special = { "rep_inf_ep3_jettrooper",1, 4},

},
cis = {
team = CIS,
units = 20,
reinforcements = 150,
soldier = { "cis_inf_rifleman",9, 25},
assault = { "cis_inf_rocketeer",1, 4},
engineer = { "cis_inf_engineer",1, 4},
sniper = { "cis_inf_sniper",1, 4},
officer = {"cis_inf_officer",1, 4},
special = { "cis_inf_droideka",1, 4},
}
}

SetHeroClass(CIS, "cis_hero_darthmaul")
SetHeroClass(REP, "rep_hero_anakin")


-- Level Stats
-- ClearWalkers()
AddWalkerType(0, 4) -- special -> droidekas
AddWalkerType(1, 0) -- 1x2 (1 pair of legs)
AddWalkerType(2, 0) -- 2x2 (2 pairs of legs)
AddWalkerType(3, 0) -- 3x2 (3 pairs of legs)
local weaponCnt = 240
SetMemoryPoolSize("Aimer", 75)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 1024)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 22)
SetMemoryPoolSize("EntityFlyer", 30)
SetMemoryPoolSize("EntityHover", 20)
SetMemoryPoolSize("EntityLight", 200)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("EntitySoundStatic", 20)
SetMemoryPoolSize("MountedTurret", 25)
SetMemoryPoolSize("Navigator", 49)
SetMemoryPoolSize("Obstacle", 760)
SetMemoryPoolSize("PathNode", 512)
SetMemoryPoolSize("SoundSpaceRegion", 46)
SetMemoryPoolSize("TreeGridStack", 500)
SetMemoryPoolSize("UnitAgent", 49)
SetMemoryPoolSize("UnitController", 49)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)
--ReadDataFile("dc:KKM\\KKM.lvl", "KKM_conquest")
ReadDataFile("dc:KKM\\KKM.lvl", "KKM_conquest")
SetDenseEnvironment("false")




-- Sound

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")

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\\yav.lvl", "yav1")
OpenAudioStream("sound\\yav.lvl", "yav1")
OpenAudioStream("sound\\yav.lvl", "yav1_emt")

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)

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

SetAmbientMusic(REP, 1.0, "rep_yav_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rep_yav_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2, "rep_yav_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_yav_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_yav_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2, "cis_yav_amb_end", 2,1)

SetVictoryMusic(REP, "rep_yav_amb_victory")
SetDefeatMusic (REP, "rep_yav_amb_defeat")
SetVictoryMusic(CIS, "cis_yav_amb_victory")
SetDefeatMusic (CIS, "cis_yav_amb_defeat")

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
--SetSoundEffect("BirdScatter", "birdsFlySeq1")
--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")


--OpeningSateliteShot
AddCameraShot(0.908386, -0.209095, -0.352873, -0.081226, -45.922508, -19.114113, 77.022636);

AddCameraShot(-0.481173, 0.024248, -0.875181, -0.044103, 14.767292, -30.602322, -144.506851);
AddCameraShot(0.999914, -0.012495, -0.004416, -0.000055, 1.143253, -33.602314, -76.884430);
AddCameraShot(0.839161, 0.012048, -0.543698, 0.007806, 19.152437, -49.802273, 24.337317);
AddCameraShot(0.467324, 0.006709, -0.883972, 0.012691, 11.825212, -49.802273, -7.000720);
AddCameraShot(0.861797, 0.001786, -0.507253, 0.001051, -11.986043, -59.702248, 23.263165);
AddCameraShot(0.628546, -0.042609, -0.774831, -0.052525, 20.429928, -48.302277, 9.771714);
AddCameraShot(0.765213, -0.051873, 0.640215, 0.043400, 57.692474, -48.302277, 16.540724);
AddCameraShot(0.264032, -0.015285, -0.962782, -0.055734, -16.681797, -42.902290, 129.553268);
AddCameraShot(-0.382320, 0.022132, -0.922222, -0.053386, 20.670977, -42.902290, 135.513001);
end

And yes, there is no reason to reinstall the game. It is a problem with my own map, not all the other shipped maps :wink:
fat_walrus

Post by fat_walrus »

K, change the DC to dc (under readdatafile) dunno if that might fix it.

EDIT: remove .lvl-- from the top of your LUA now
Elmo
Field Commander
Field Commander
Posts: 962
Joined: Wed Nov 08, 2006 5:13 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by Elmo »

under the rep data file?

wait! off topic, but valiant was helping me with adding skins to a map, and he told me to add DC! is it supposed to be DC or dc, for the skins to work?

Edit: you mean .lv? At the VERY top?
fat_walrus

Post by fat_walrus »

dc not DC, I accually don't know if it is different but dc always works for me.

yes at the very top

g2g, school tomorrow
Elmo
Field Commander
Field Commander
Posts: 962
Joined: Wed Nov 08, 2006 5:13 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by Elmo »

ok, thx!
Elmo
Field Commander
Field Commander
Posts: 962
Joined: Wed Nov 08, 2006 5:13 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by Elmo »

Im very sry for double post, but the map crashes now half way through loading. :cry:

Did I do something wrong by getting rid of the lv thing?

EDIT: Only GCW works, CW doesn't work. Probably because I messed around with the CW LUA I don't know what I did wrong and how to fix it.

Here is my CW LUA now
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

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

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


function ScriptPostLoad()


--This defines the CPs. These need to happen first
cp1 = CommandPost:New{name = "cp1"}
cp2 = CommandPost:New{name = "cp2"}


--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:Start()

EnableSPHeroRules()

end


---------------------------------------------------------------------------
-- 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 ScriptInit()

ReadDataFile("ingame.lvl")


SetMaxFlyHeight(510)
SetMaxPlayerFlyHeight (510)

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("dc:SIDE\\rep.lvl",
"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")
ReadDataFile("SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_inf_sniper",
"cis_inf_officer",
"cis_inf_droideka",
"cis_hero_darthmaul",
"cis_hover_aat")


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

SetupTeams{
rep = {
team = REP,
units = 20,
reinforcements = 150,
soldier = { "rep_inf_ep3_rifleman",9, 25},
assault = { "rep_inf_ep3_rocketeer",1, 4},
engineer = { "rep_inf_ep3_engineer",1, 4},
sniper = { "rep_inf_ep3_sniper",1, 4},
officer = {"rep_inf_ep3_officer",1, 4},
special = { "rep_inf_ep3_jettrooper",1, 4},

},
cis = {
team = CIS,
units = 20,
reinforcements = 150,
soldier = { "cis_inf_rifleman",9, 25},
assault = { "cis_inf_rocketeer",1, 4},
engineer = { "cis_inf_engineer",1, 4},
sniper = { "cis_inf_sniper",1, 4},
officer = {"cis_inf_officer",1, 4},
special = { "cis_inf_droideka",1, 4},
}
}

SetHeroClass(CIS, "cis_hero_darthmaul")
SetHeroClass(REP, "rep_hero_anakin")


-- Level Stats
-- ClearWalkers()
AddWalkerType(0, 4) -- special -> droidekas
AddWalkerType(1, 0) -- 1x2 (1 pair of legs)
AddWalkerType(2, 0) -- 2x2 (2 pairs of legs)
AddWalkerType(3, 0) -- 3x2 (3 pairs of legs)
local weaponCnt = 1024
SetMemoryPoolSize("Aimer", 75)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 1024)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 32)
SetMemoryPoolSize("EntityFlyer", 32)
SetMemoryPoolSize("EntityHover", 32)
SetMemoryPoolSize("EntityLight", 200)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("EntitySoundStatic", 32)
SetMemoryPoolSize("MountedTurret", 32)
SetMemoryPoolSize("Navigator", 128)
SetMemoryPoolSize("Obstacle", 1024)
SetMemoryPoolSize("PathNode", 1024)
SetMemoryPoolSize("SoundSpaceRegion", 64)
SetMemoryPoolSize("TreeGridStack", 1024)
SetMemoryPoolSize("UnitAgent", 128)
SetMemoryPoolSize("UnitController", 128)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)
--ReadDataFile("dc:KKM\\KKM.lvl", "KKM_conquest")
ReadDataFile("dc:KKM\\KKM.lvl", "KKM_conquest")
SetDenseEnvironment("false")




-- Sound

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")

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\\yav.lvl", "yav1")
OpenAudioStream("sound\\yav.lvl", "yav1")
OpenAudioStream("sound\\yav.lvl", "yav1_emt")

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)

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

SetAmbientMusic(REP, 1.0, "rep_yav_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rep_yav_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2, "rep_yav_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_yav_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_yav_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2, "cis_yav_amb_end", 2,1)

SetVictoryMusic(REP, "rep_yav_amb_victory")
SetDefeatMusic (REP, "rep_yav_amb_defeat")
SetVictoryMusic(CIS, "cis_yav_amb_victory")
SetDefeatMusic (CIS, "cis_yav_amb_defeat")

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
--SetSoundEffect("BirdScatter", "birdsFlySeq1")
--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")


--OpeningSateliteShot
AddCameraShot(0.908386, -0.209095, -0.352873, -0.081226, -45.922508, -19.114113, 77.022636);

AddCameraShot(-0.481173, 0.024248, -0.875181, -0.044103, 14.767292, -30.602322, -144.506851);
AddCameraShot(0.999914, -0.012495, -0.004416, -0.000055, 1.143253, -33.602314, -76.884430);
AddCameraShot(0.839161, 0.012048, -0.543698, 0.007806, 19.152437, -49.802273, 24.337317);
AddCameraShot(0.467324, 0.006709, -0.883972, 0.012691, 11.825212, -49.802273, -7.000720);
AddCameraShot(0.861797, 0.001786, -0.507253, 0.001051, -11.986043, -59.702248, 23.263165);
AddCameraShot(0.628546, -0.042609, -0.774831, -0.052525, 20.429928, -48.302277, 9.771714);
AddCameraShot(0.765213, -0.051873, 0.640215, 0.043400, 57.692474, -48.302277, 16.540724);
AddCameraShot(0.264032, -0.015285, -0.962782, -0.055734, -16.681797, -42.902290, 129.553268);
AddCameraShot(-0.382320, 0.022132, -0.922222, -0.053386, 20.670977, -42.902290, 135.513001);
end
What's wrong? :?
wazmol
High General
High General
Posts: 892
Joined: Sat Sep 02, 2006 6:47 pm
Projects :: Thinking...
Games I'm Playing :: Black Ops
Location: London
Contact:

Post by wazmol »

hmmm im afraid i dont have an answer for the crash problem other than go back to what you had before you changed it or get the XXXc_con.lua.bak file and add things into that. i do however have an answer for the no AI problem (this has happened to me loads of times): make sure that your cp's are called cp1 cp2 cp3 cp4 cp5 in ZeroEdit. it is a common mistake you might of labled the cp's cp1 ect when it shouldnt be labeled but actually be called that.
Elmo
Field Commander
Field Commander
Posts: 962
Joined: Wed Nov 08, 2006 5:13 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by Elmo »

The cps in the ZE are called cp1 and cp2. ( I only have 2 cps now) But AI still doesn't show up. And what did you say to make the map stop crashing? To, change the LUA to back to how it was?
fat_walrus

Post by fat_walrus »

Copy all the text from your ABCc_conlua.bak and paste it in your ABCc_con.lua and make the changes you need from there. If that doesn't work then it is obviously some problem you have in ZE (which I'm sure is the problem).
Post Reply