SWBFGamers

Modding for the Original SWBF1 and SWBF2 => SWBF1 Modding => Topic started by: MileHighGuy on June 16, 2009, 03:52:04 PM

Title: no ai units? (solved)
Post by: MileHighGuy on June 16, 2009, 03:52:04 PM
well gametoast wasnt vey helpful so ill ask it here


how can i make my map have no ai units?

i removed the numbers beside the troop name but that didnt work
and i put setunitcount to zero but that crashed my game

any ideas?
Title: Re: no ai units?
Post by: Master Zen on June 16, 2009, 04:07:26 PM
Ok, so I'm no modder or anything, but is it really necessary? Because hosts can turn bots off when they host.
Title: Re: no ai units?
Post by: Radical_Pi on June 16, 2009, 04:09:49 PM
The numbers from AddUnitClass should add up to the number in SetUnitCount. If that doesn't work, try sending me your LUA file. I can find out what is wrong quickly with that
Title: Re: no ai units?
Post by: MileHighGuy on June 16, 2009, 05:02:05 PM
heres my lua


--start header
function ScriptInit()
local ALL = 1
local IMP = 2
local ATT = 1
local DEF = 2
--end header
--start objectives
AddMissionObjective(IMP,"red", "level.bb1.objectives.1");
AddMissionObjective(IMP,"orange", "level.bb1.objectives.2");
AddMissionObjective(IMP,"orange", "level.bb1.objectives.3");
AddMissionObjective(ALL,"red", "level.bb1.objectives.1");
AddMissionObjective(ALL,"orange", "level.bb1.objectives.2");
AddMissionObjective(ALL,"orange","level.bb1.objectives.3");
--end objectives
--start soundlvl
ReadDataFile("sound\\tat.lvl;tat1gcw");
--end soundlvl

-- Start sidelvls
ReadDataFile("SIDE\\all.lvl",
"all_inf_basicdesert",
"all_inf_lukeskywalker",
"all_inf_smuggler");
ReadDataFile("dc:SIDE\\bld.lvl",
"bld_inf_crate_builder");
ReadDataFile("SIDE\\imp.lvl",
"imp_inf_basic_tie",
"imp_inf_darthvader",
"imp_inf_dark_trooper");
--end sidelvls
--start loadouts
SetTeamName(ALL, "Alliance")
SetTeamIcon(ALL, "all_icon")
AddUnitClass(ALL, "bld_inf_crate_builder", 0)
AddUnitClass(ALL, "all_inf_vanguard", 0)
AddUnitClass(ALL, "all_inf_pilot", 0)
AddUnitClass(ALL, "all_inf_marksman", 0)
AddUnitClass(ALL, "all_inf_smuggler", 0)
SetHeroClass(ALL, "all_inf_lukeskywalker")
SetTeamName(IMP, "Empire")
SetTeamIcon(IMP, "imp_icon")
AddUnitClass(IMP, "imp_inf_storm_trooper", 0)
AddUnitClass(IMP, "imp_inf_shock_trooper", 0)
AddUnitClass(IMP, "imp_inf_pilottie", 0)
AddUnitClass(IMP, "imp_inf_scout_trooper", 0)
AddUnitClass(IMP, "imp_inf_dark_trooper", 0)
SetHeroClass(IMP, "imp_inf_darthvader")
--end loadouts
--start teamstats
SetUnitCount(ATT, 0)
SetReinforcementCount(ATT, 200)
SetUnitCount(DEF, 0)
SetReinforcementCount(DEF, 200)
--end teamstats
--start alliances
SetTeamAsFriend(ATT, 1)
SetTeamAsEnemy(ATT, 2)
SetTeamAsFriend(DEF, 2)
SetTeamAsEnemy(DEF, 1)
SetAttackingTeam(ATT);
--end alliances

--start memorypools
ClearWalkers()
AddWalkerType(0, 0)-- 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)
SetMemoryPoolSize("PowerupItem", 60)
SetMemoryPoolSize("EntityMine", 40)
--end memorypools
--start worldlvl
ReadDataFile("dc:bb1\\bb1.lvl")
--end worldlvl
--start spawndelay
SetSpawnDelay(10.0, 0.25)
--end spawndelay
--start flyheight
--end flyheight
--start ainotify
--end ainotify
--start stayinturrets
--end stayinturrets
--start denseenvironment
SetDenseEnvironment("false")
--end denseenvironment
--start birdsandfish
--end birdsandfish
--start deathregions
--end deathregions

--start soundconfig
OpenAudioStream("sound\\tat.lvl","tatgcw_music");
OpenAudioStream("sound\\tat.lvl","tat1");
OpenAudioStream("sound\\tat.lvl","tat1");
OpenAudioStream("sound\\gcw.lvl","gcw_vo");
OpenAudioStream("sound\\gcw.lvl","gcw_tac_vo");
OpenAudioStream("sound\\tat.lvl","tat1_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_tat_amb_start",0,1);
SetAmbientMusic(ALL,0.99,"all_tat_amb_middle",1,1);
SetAmbientMusic(ALL,0.1,"all_tat_amb_end",2,1);
SetAmbientMusic(IMP,1.0,"imp_tat_amb_start",0,1);
SetAmbientMusic(IMP,0.99,"imp_tat_amb_middle",1,1);
SetAmbientMusic(IMP,0.1,"imp_tat_amb_end",2,1);
SetVictoryMusic(ALL,"all_tat_amb_victory");
SetDefeatMusic (ALL,"all_tat_amb_defeat");
SetVictoryMusic(IMP,"imp_tat_amb_victory");
SetDefeatMusic (IMP,"imp_tat_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(IMP,IMP,0,"imp_bonus_imp_medical");
SetPlanetaryBonusVoiceOver(IMP,ALL,0,"imp_bonus_all_medical");
SetPlanetaryBonusVoiceOver(IMP,IMP,1,"");
SetPlanetaryBonusVoiceOver(IMP,ALL,1,"");
SetPlanetaryBonusVoiceOver(IMP,IMP,2,"imp_bonus_imp_sensors");
SetPlanetaryBonusVoiceOver(IMP,ALL,2,"imp_bonus_all_sensors");
SetPlanetaryBonusVoiceOver(IMP,IMP,3,"imp_bonus_imp_hero");
SetPlanetaryBonusVoiceOver(IMP,ALL,3,"imp_bonus_all_hero");
SetPlanetaryBonusVoiceOver(IMP,IMP,4,"imp_bonus_imp_reserves");
SetPlanetaryBonusVoiceOver(IMP,ALL,4,"imp_bonus_all_reserves");
SetPlanetaryBonusVoiceOver(IMP,IMP,5,"imp_bonus_imp_sabotage");--sabotage
SetPlanetaryBonusVoiceOver(IMP,ALL,5,"imp_bonus_all_sabotage");
SetPlanetaryBonusVoiceOver(IMP,IMP,6,"");
SetPlanetaryBonusVoiceOver(IMP,ALL,6,"");
SetPlanetaryBonusVoiceOver(IMP,IMP,7,"imp_bonus_imp_training");--advanced training
SetPlanetaryBonusVoiceOver(IMP,ALL,7,"imp_bonus_all_training");--advanced training
SetPlanetaryBonusVoiceOver(ALL,ALL,0,"all_bonus_all_medical");
SetPlanetaryBonusVoiceOver(ALL,IMP,0,"all_bonus_imp_medical");
SetPlanetaryBonusVoiceOver(ALL,ALL,1,"");
SetPlanetaryBonusVoiceOver(ALL,IMP,1,"");
SetPlanetaryBonusVoiceOver(ALL,ALL,2,"all_bonus_all_sensors");
SetPlanetaryBonusVoiceOver(ALL,IMP,2,"all_bonus_imp_sensors");
SetPlanetaryBonusVoiceOver(ALL,ALL,3,"all_bonus_all_hero");
SetPlanetaryBonusVoiceOver(ALL,IMP,3,"all_bonus_imp_hero");
SetPlanetaryBonusVoiceOver(ALL,ALL,4,"all_bonus_all_reserves");
SetPlanetaryBonusVoiceOver(ALL,IMP,4,"all_bonus_imp_reserves");
SetPlanetaryBonusVoiceOver(ALL,ALL,5,"all_bonus_all_sabotage");--sabotage
SetPlanetaryBonusVoiceOver(ALL,IMP,5,"all_bonus_imp_sabotage");
SetPlanetaryBonusVoiceOver(ALL,ALL,6,"");
SetPlanetaryBonusVoiceOver(ALL,IMP,6,"");
SetPlanetaryBonusVoiceOver(ALL,ALL,7,"all_bonus_all_training");--advanced training
SetPlanetaryBonusVoiceOver(ALL,IMP,7,"all_bonus_imp_training");--advanced training
--end soundconfig

--start activebonus
--end activebonus

--start camerashots
AddCameraShot(-0.404895, 0.000992, -0.914360, -0.002240, -85.539894, 20.536297, 141.699493);
AddCameraShot(0.040922, 0.004049, -0.994299, 0.098381, -139.729523, 17.546598, -34.360893);
AddCameraShot(-0.312360, 0.016223, -0.948547, -0.049263, -217.381485, 20.150953, 54.514324);
--end camerashots

--start footer
end
--end footer
Title: Re: no ai units?
Post by: Radical_Pi on June 16, 2009, 08:24:28 PM
Sorry, the debugger doesn't show any errors :( I'll try fiddling with the code tomorrow
Title: Re: no ai units?
Post by: Jedikiller on June 18, 2009, 09:11:25 AM
Maybe you could try setting the AddUnitClass numbers to 0, but keep the SetUnitCount field at whatever it's normally at?

Just a suggestion.
Title: Re: no ai units?
Post by: MileHighGuy on June 18, 2009, 10:26:47 AM
nope that didnt work either.

maybe if i put -'s in place of the numbers

oh that didnt work either

edit2: ok i just made all the units allies so they dont attack you
EhPortal 1.34 © 2024, WebDev