No unit spawning except me

Started by i2Bros, September 09, 2016, 02:26:28 PM

Previous topic - Next topic
Hi guys, as some of you know i recently downloaded Sereja's Umbara:Shadow Forest map assets and I was trying to change the sides. Since the assets are made-up for SWBF1 and not for SWBF2 I don't know how to munge a working map with them - if that is possible -.
But this is not the point. I also downloaded a munged version of the map already converted to SWBF2 and I was trying to simply change the mission.lvl file using Sereja's assets but after munging when I play the map no unit spawns except the human player, but interestingly the vehicles spawn like they should. Also no music plays even if I tried to set up the Sound section of the .lua properly.

That's the .lua file

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

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

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


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

    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, 4)-- 1x2 (1 pair of legs)
AddWalkerType(2, 0)-- 2x2 (2 pairs of legs)
AddWalkerType(3, 0)-- 3x2 (3 pairs of legs)
SetMemoryPoolSize("PowerupItem", 60)
SetMemoryPoolSize("EntityMine", 40)
SetMemoryPoolSize("WalkerLegPair", 12)
--SetMemoryPoolSize("TreeGridStack", 960)
SetMemoryPoolSize("TreeGridStack", 999)
SetMemoryPoolSize("EntityHover", 14)
SetMemoryPoolSize("EntityWalker", 4)
SetMemoryPoolSize("CommandWalker", 4)
SetMemoryPoolSize("EntityFlyer", 8)
SetMemoryPoolSize("Aimer", 500)
SetMemoryPoolSize("EntityLight", 500)
SetMemoryPoolSize("Obstacle", 999)
SetMemoryPoolSize("WalkerBlendUnit", 60)
   
SetSpawnDelay(10.0, 0.25)
    --ReadDataFile("dc:025\\025.lvl", "025_conquest")
    ReadDataFile("dc:025\\025.lvl", "025_conquest")
    SetDenseEnvironment("false")

    --  Birdies
    SetNumBirdTypes(2);
    SetBirdType(0,1.0,"bird3");
    SetBirdType(1,1.5,"bird4");

    AddDeathRegion("Death1");
    AddDeathRegion("Death2");
    AddDeathRegion("Death3");
    AddDeathRegion("Death4");
    AddDeathRegion("Death5");
    AddDeathRegion("Death6");
    AddDeathRegion("Death7");
    AddDeathRegion("Death8");
    AddDeathRegion("Death9");
    AddDeathRegion("Death10");
    AddDeathRegion("Death11");
    AddDeathRegion("Death12");
    AddDeathRegion("Death13");
    AddDeathRegion("Death14");
    AddDeathRegion("Death15");
    AddDeathRegion("Death16");
    AddDeathRegion("Death17");
    AddDeathRegion("Death18");
    AddDeathRegion("Death19");
    AddDeathRegion("Death20");
    AddDeathRegion("Death21");
    AddDeathRegion("Death22");
    AddDeathRegion("Death23");
    AddDeathRegion("Death24");



    --  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("dc:sound\\025.lvl",  "025gcw_music")

    OpenAudioStream("sound\\kas.lvl",  "kascw_music");
    OpenAudioStream("sound\\cw.lvl",  "cw_vo");
    OpenAudioStream("sound\\cw.lvl",  "cw_tac_vo");
    OpenAudioStream("sound\\kas.lvl",  "kas");
    OpenAudioStream("sound\\kas.lvl",  "kas");

    OpenAudioStream("dc:sound\\025.lvl",  "025");
    OpenAudioStream("dc:sound\\025.lvl",  "025");

SetBleedingVoiceOver(CIS,CIS,"cis_off_com_report_us_overwhelmed",1);
SetBleedingVoiceOver(CIS,REP,"cis_off_com_report_enemy_losing",1);
SetBleedingVoiceOver(REP,CIS,"rep_off_com_report_enemy_losing",1);
SetBleedingVoiceOver(REP,REP,"rep_off_com_report_us_overwhelmed",1);
SetLowReinforcementsVoiceOver(CIS, CIS, "cis_off_defeat_im", .1,1);
SetLowReinforcementsVoiceOver(CIS, REP, "cis_off_victory_im", .1,1);
SetLowReinforcementsVoiceOver(REP, REP, "rep_off_defeat_im", .1,1);
SetLowReinforcementsVoiceOver(REP, CIS, "rep_off_victory_im", .1,1);
SetOutOfBoundsVoiceOver(2,"Allleaving");
SetOutOfBoundsVoiceOver(1,"Impleaving");
--    SetAmbientMusic(REP, 1.0, "rep_kas_amb_start",  0,1);
--    SetAmbientMusic(REP, 0.99, "rep_kas_amb_middle", 1,1);
--    SetAmbientMusic(REP, 0.1,"rep_kas_amb_end",    2,1);
--    SetAmbientMusic(CIS, 1.0, "cis_kas_amb_start",  0,1);
--    SetAmbientMusic(CIS, 0.99, "cis_kas_amb_middle", 1,1);
--    SetAmbientMusic(CIS, 0.1,"cis_kas_amb_end",    2,1);

    SetAmbientMusic(REP, 1.0, "imp_umb_amb_start",  0,1);
    SetAmbientMusic(REP, 0.99, "imp_umb_amb_middle", 1,1);
    SetAmbientMusic(REP, 0.15,"imp_umb_amb_end",    2,1);
    SetAmbientMusic(CIS, 1.0, "all_umb_amb_start",  0,1);
    SetAmbientMusic(CIS, 0.99, "all_umb_amb_middle", 1,1);
    SetAmbientMusic(CIS, 0.15,"all_umb_amb_end",    2,1);

    SetVictoryMusic(REP, "rep_kas_amb_victory");
    SetDefeatMusic (REP, "rep_kas_amb_defeat");
    SetVictoryMusic(CIS, "cis_kas_amb_victory");
    SetDefeatMusic (CIS, "cis_kas_amb_defeat");
SetSoundEffect("ScopeDisplayZoomIn","binocularzoomin");
SetSoundEffect("ScopeDisplayZoomOut","binocularzoomout");
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");
SetPlanetaryBonusVoiceOver(REP,REP,0,"rep_bonus_rep_medical");
SetPlanetaryBonusVoiceOver(REP,CIS,0,"rep_bonus_cis_medical");
SetPlanetaryBonusVoiceOver(REP,REP,1,"");
SetPlanetaryBonusVoiceOver(REP,CIS,1,"");
SetPlanetaryBonusVoiceOver(REP,REP,2,"rep_bonus_rep_sensors");
SetPlanetaryBonusVoiceOver(REP,CIS,2,"rep_bonus_cis_sensors");
SetPlanetaryBonusVoiceOver(REP,REP,3,"rep_bonus_rep_hero");
SetPlanetaryBonusVoiceOver(REP,CIS,3,"rep_bonus_cis_hero");
SetPlanetaryBonusVoiceOver(REP,REP,4,"rep_bonus_rep_reserves");
SetPlanetaryBonusVoiceOver(REP,CIS,4,"rep_bonus_cis_reserves");
SetPlanetaryBonusVoiceOver(REP,REP,5,"rep_bonus_rep_sabotage");--sabotage
SetPlanetaryBonusVoiceOver(REP,CIS,5,"rep_bonus_cis_sabotage");
SetPlanetaryBonusVoiceOver(REP,REP,6,"");
SetPlanetaryBonusVoiceOver(REP,CIS,6,"");
SetPlanetaryBonusVoiceOver(REP,REP,7,"rep_bonus_rep_training");--advanced training
SetPlanetaryBonusVoiceOver(REP,CIS,7,"rep_bonus_cis_training");--advanced training
SetPlanetaryBonusVoiceOver(CIS,CIS,0,"cis_bonus_cis_medical");
SetPlanetaryBonusVoiceOver(CIS,REP,0,"cis_bonus_rep_medical");
SetPlanetaryBonusVoiceOver(CIS,CIS,1,"");
SetPlanetaryBonusVoiceOver(CIS,REP,1,"");
SetPlanetaryBonusVoiceOver(CIS,CIS,2,"cis_bonus_cis_sensors");
SetPlanetaryBonusVoiceOver(CIS,REP,2,"cis_bonus_rep_sensors");
SetPlanetaryBonusVoiceOver(CIS,CIS,3,"cis_bonus_cis_hero");
SetPlanetaryBonusVoiceOver(CIS,REP,3,"cis_bonus_rep_hero");
SetPlanetaryBonusVoiceOver(CIS,CIS,4,"cis_bonus_cis_reserves");
SetPlanetaryBonusVoiceOver(CIS,REP,4,"cis_bonus_rep_reserves");
SetPlanetaryBonusVoiceOver(CIS,CIS,5,"cis_bonus_cis_sabotage");--sabotage
SetPlanetaryBonusVoiceOver(CIS,REP,5,"cis_bonus_rep_sabotage");
SetPlanetaryBonusVoiceOver(CIS,CIS,6,"");
SetPlanetaryBonusVoiceOver(CIS,REP,6,"");
SetPlanetaryBonusVoiceOver(CIS,CIS,7,"cis_bonus_cis_training");--advanced training
SetPlanetaryBonusVoiceOver(CIS,REP,7,"cis_bonus_rep_training");--advanced training

--OpeningSateliteShot
    AddCameraShot(0.866429, 0.000000, 0.497798, 0.000000, 218.657883, 15.766537, 142.812714);
    AddCameraShot(-0.318809, 0.000000, -0.946403, 0.000000, 27.424097, 29.265772, -521.292725);
    AddCameraShot(0.703257, 0.000000, -0.710362, 0.000000, 119.500610, 42.950558, 208.319794);
end


I need severe help!   :bye:
"Come on, you apes! Do you wanna live forever?"
- Lieutenant Rasczak speaking to the Roughnecks troopers

I moved to Battlefront 2 a while ago and i am not very experienced with such things yet since there is more stuff here than Battlefront 1 however i can tell you that if you want more people to see your problems put this topics in gametoast aswell since most of the people who are modding Battlefront 2 are there and i am sure alot will help you in some way.Gametoast is mainly for Battlefront 2. I think here we are more focused on Battlefront 1  :shrug:

September 09, 2016, 03:46:54 PM #2 Last Edit: September 10, 2016, 05:21:27 AM by Led
Quote from: i2Bros on September 09, 2016, 02:26:28 PM
Hi guys, as some of you know i recently downloaded Sereja's Umbara:Shadow Forest map assets and I was trying to change the sides. Since the assets are made-up for SWBF1 and not for SWBF2 I don't know how to munge a working map with them - if that is possible -.
But this is not the point. I also downloaded a munged version of the map already converted to SWBF2 and I was trying to simply change the mission.lvl file using Sereja's assets but after munging when I play the map no unit spawns except the human player, but interestingly the vehicles spawn like they should. Also no music plays even if I tried to set up the Sound section of the .lua properly.



Have you tried looking at your spawn paths and cp spawn. Ypu might have mustype something?


edit by Led:  don't quote an entire post of LUA.  use code tags instead or remove the lua.
PROJECTS:                                 
BF1:
Sector 3-4482-F
Solar System
BF2:
Shattered Galaxy
Project 171A

Where do I check such things?  :shrug:
"Come on, you apes! Do you wanna live forever?"
- Lieutenant Rasczak speaking to the Roughnecks troopers

1. Open zeroeditor
2. Select the cp
3. Look for the section that says spawnpath
For example :
SPAWNPATH
cp1_spawn
4. Make sure to check every cp in your map
5. Also be sure to check you spawn paths that you made for that cp.

Gope it helps :tu:
PROJECTS:                                 
BF1:
Sector 3-4482-F
Solar System
BF2:
Shattered Galaxy
Project 171A

Solved thanks Delta.
"Come on, you apes! Do you wanna live forever?"
- Lieutenant Rasczak speaking to the Roughnecks troopers