Hey has any one else had this problem I keep trying to change my Mission.lvl, but the server doesn't change the way it acts. This is the mission text:
---------------------------------------------------------------------------
-- 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()
-- Republic Attacking (attacker is always #1)
local REP = 1
local CIS = 2
-- These variables do not change
local ATT = 1
local DEF = 2
AddMissionObjective(REP, "orange", "level.tat1.objectives.1");
AddMissionObjective(REP, "red", "level.tat1.objectives.2");
AddMissionObjective(CIS, "orange", "level.tat1.objectives.1");
AddMissionObjective(CIS, "red", "level.tat1.objectives.2");
SetTeamAggressiveness(REP, 0.95)
SetTeamAggressiveness(CIS, 0.95)
ReadDataFile("sound\\tat.lvl;tat1cw");
ReadDataFile("SIDE\\rep.lvl",
"rep_fly_assault_dome",
"rep_fly_jedifighter",
"rep_hover_speederbike",
"rep_hover_fightertank",
"rep_inf_basic",
"rep_inf_jet_trooper",
"rep_inf_macewindu");
ReadDataFile("SIDE\\cis.lvl",
"cis_fly_droidfighter",
"cis_hover_aat",
"cis_hover_stap",
"cis_inf_basic",
"cis_inf_countdooku",
"cis_inf_droideka");
ReadDataFile("SIDE\\des.lvl",
"tat_inf_tuskenhunter",
"tat_inf_tuskenraider");
SetAttackingTeam(ATT);
-- Republic Stats
SetTeamName(REP, "Republic");
SetTeamIcon(REP, "rep_icon");
AddUnitClass(REP, "rep_inf_clone_trooper",11)
AddUnitClass(REP, "rep_inf_arc_trooper",3)
AddUnitClass(REP, "rep_inf_clone_pilot",4)
AddUnitClass(REP, "rep_inf_clone_sharpshooter",4)
AddUnitClass(REP, "rep_inf_jet_trooper",3)
SetHeroClass(REP, "rep_inf_macewindu")
-- CIS Stats
SetTeamName(CIS, "CIS");
SetTeamIcon(CIS, "cis_icon");
AddUnitClass(CIS, "tat_inf_tuskenhunter",11)
AddUnitClass(CIS, "tat_inf_tuskenraidert",3)
AddUnitClass(CIS, "tat_inf_tuskenraider",4)
AddUnitClass(CIS, "tat_inf_tuskenhunter",4)
AddUnitClass(CIS, "tat_inf_tuskenhunter",3)
SetHeroClass(CIS, "cis_inf_countdooku")
-- Attacker Stats
SetUnitCount(ATT, 0)
SetReinforcementCount(ATT, 250)
-- Defender Stats
SetUnitCount(DEF, 0)
SetReinforcementCount(DEF, 250)
-- Local Stats
SetTeamName(3, "locals")
AddUnitClass(3, "tat_inf_tuskenhunter", 5);
AddUnitClass(3, "tat_inf_tuskenhunter", 2);
SetUnitCount(3, 40)
-- Level Stats
ClearWalkers()
AddWalkerType(0, 8)
SetMemoryPoolSize("EntityHover", 16)
SetMemoryPoolSize("EntityFlyer", 0)
-- SetMemoryPoolSize("EntityBuildingArmedDynamic", 16)
-- SetMemoryPoolSize("EntityTauntaun", 0)
SetMemoryPoolSize("MountedTurret", 22)
SetMemoryPoolSize("PowerupItem", 60)
SetMemoryPoolSize("EntityMine", 40)
SetMemoryPoolSize("Aimer", 200)
SetMemoryPoolSize("Obstacle", 725)
SetSpawnDelay(10.0, 0.25)
ReadDataFile("TAT\\tat1.lvl")
SetDenseEnvironment("false")
AddDeathRegion("Sarlac01")
SetMaxFlyHeight(90)
SetMaxPlayerFlyHeight(90)
-- Sound Stats
OpenAudioStream("sound\\tat.lvl", "tatcw_music");
OpenAudioStream("sound\\tat.lvl", "tat1");
OpenAudioStream("sound\\tat.lvl", "tat1");
OpenAudioStream("sound\\cw.lvl", "cw_vo");
OpenAudioStream("sound\\cw.lvl", "cw_tac_vo");
OpenAudioStream("sound\\tat.lvl", "tat1_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(1, "Repleaving");
SetOutOfBoundsVoiceOver(2, "Cisleaving");
SetAmbientMusic(REP, 1.0, "rep_tat_amb_start", 0,1);
SetAmbientMusic(REP, 0.99, "rep_tat_amb_middle", 1,1);
SetAmbientMusic(REP, 0.1,"rep_tat_amb_end", 2,1);
SetAmbientMusic(CIS, 1.0, "cis_tat_amb_start", 0,1);
SetAmbientMusic(CIS, 0.99, "cis_tat_amb_middle", 1,1);
SetAmbientMusic(CIS, 0.1,"cis_tat_amb_end", 2,1);
SetVictoryMusic(REP, "rep_tat_amb_victory");
SetDefeatMusic (REP, "rep_tat_amb_defeat");
SetVictoryMusic(CIS, "cis_tat_amb_victory");
SetDefeatMusic (CIS, "cis_tat_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");
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
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
-- Camera Stats
--Tat 1 - Dune Sea
--Crawler
AddCameraShot(-0.404895, 0.000992, -0.914360, -0.002240, -85.539894, 20.536297, 141.699493);
--Homestead
AddCameraShot(0.040922, 0.004049, -0.994299, 0.098381, -139.729523, 17.546598, -34.360893);
--Sarlac Pit
AddCameraShot(-0.312360, 0.016223, -0.948547, -0.049263, -217.381485, 20.150953, 54.514324);
end
i believe that setunitcount (att,0) is an error
-- Local Stats
SetTeamName(3, "locals")
AddUnitClass(3, "tat_inf_tuskenhunter", 5);
AddUnitClass(3, "tat_inf_tuskenhunter", 2);
SetUnitCount(3, 40)
I think the unit count must be the summary of the soldiers= 5 + 2 = 7
==
-- Local Stats
SetTeamName(3, "locals")
AddUnitClass(3, "tat_inf_tuskenhunter", 5);
AddUnitClass(3, "tat_inf_tuskenhunter", 2);
SetUnitCount(3, 7)
But im not sure :/
Yep, im sure that is an error:
-- Attacker Stats
SetUnitCount(ATT, 0)
SetReinforcementCount(ATT, 250)
-- Defender Stats
SetUnitCount(DEF, 0)
I think that the unit count must be at least the sum of that specified in add unit lines, but I think it can be more. But I am pretty sure that it can not be 0.
edit: After talking with him, he wants to have a team with no AI even though he wants AI on the other team. The best I was able to do was in my DarkTrooper Duck Hunt mod, where I did this:
-- Alliance Stats
SetTeamName(ALL, "Alliance")
SetTeamIcon(ALL, "all_icon")
-- AddUnitClass(ALL, "all_inf_vanguard",1)
-- AddUnitClass(ALL, "all_inf_vanguard",1)
-- AddUnitClass(ALL, "all_inf_vanguard",1)
AddUnitClass(ALL, "all_inf_marksman",1)
-- AddUnitClass(ALL, "all_inf_vanguard",1)
SetHeroClass(ALL, "all_inf_lukeskywalker")
SetAttackingTeam(ATT);
-- Imperial Stats
SetTeamName(IMP, "Empire")
SetTeamIcon(IMP, "imp_icon")
AddUnitClass(IMP, "imp_inf_dark_trooper",11)
AddUnitClass(IMP, "imp_inf_dark_trooper",3)
AddUnitClass(IMP, "imp_inf_dark_trooper",4)
AddUnitClass(IMP, "imp_inf_dark_trooper",4)
AddUnitClass(IMP, "imp_inf_dark_trooper",3)
SetHeroClass(IMP, "imp_inf_darthvader")
-- Attacker Stats
SetUnitCount(ATT, 1)
-- Defender Stats
SetUnitCount(DEF, 25)
Most of the time, there are no AI that show up on the rebel team, but sometimes one will pop up.
Note that AI localization (names) messes up with this method.
If anyone has any better ideas, let us know.