Page 1 of 1

NAboo guards help

Posted: Sat May 21, 2005 5:04 am
by maxloef
When i make a map with playable naboo guards it crashes to desktop here is the lua coulod anyone tell me what i did wrong?
---------------------------------------------------------------------------
-- 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()
-- Empire Attacking (attacker is always #1)
local REP = 2
local CIS = 1
-- These variables do not change
local ATT = 1
local DEF = 2

AddMissionObjective(CIS, "red", "level.NABTEST.objectives.1");
AddMissionObjective(CIS, "orange", "level.NABTEST.objectives.2");
AddMissionObjective(CIS, "orange", "level.NABTEST.objectives.3");
AddMissionObjective(REP, "red", "level.NABTEST.objectives.1");
AddMissionObjective(REP, "orange", "level.NABTEST.objectives.2");
AddMissionObjective(REP, "orange", "level.NABTEST.objectives.3");




ReadDataFile("sound\\tat.lvl;tat1cw")
ReadDataFile("SIDE\\rep.lvl",
"cis_inf_basic_battledroids",
"rep_inf_basic",
"rep_inf_macewindu",
"rep_inf_jet_trooper");

ReadDataFile("SIDE\\cis.lvl",
"cis_inf_basic",
"cis_inf_countdooku",
"cis_inf_droideka");

ReadDataFile("SIDE\\gar.lvl",
"gar_inf_basic");

SetAttackingTeam(ATT);

-- Republic Stats
SetTeamName(REP, "Republic")
SetTeamIcon(REP, "rep_icon")
AddUnitClass(GAR, "gar_inf_soldier",12)
AddUnitClass(GAR, "gar_inf_pilot",5)
AddUnitClass(GAR, "gar_inf_vanguard",5)

-- CIS Stats
SetTeamName(CIS, "CIS")
SetTeamIcon(CIS, "cis_icon")
AddUnitClass(CIS, "cis_inf_battledroid_inf",11)
AddUnitClass(CIS, "cis_inf_assault",1)
AddUnitClass(CIS, "cis_inf_pilotdroid",2)
AddUnitClass(CIS, "cis_inf_assassindroid",2)
AddUnitClass(CIS, "cis_inf_droideka",1)
SetHeroClass(CIS, "cis_inf_countdooku")

-- Attacker Stats
SetUnitCount(ATT, 16)
SetReinforcementCount(ATT, 200)
-- AddBleedThreshold(ATT, 31, 0.0)
-- AddBleedThreshold(ATT, 21, 0.75)
AddBleedThreshold(ATT, 11, 0.75)
AddBleedThreshold(ATT, 10, 1.5)
AddBleedThreshold(ATT, 1, 3.0)

-- Defender Stats
SetUnitCount(DEF, 16)
SetReinforcementCount(DEF, 200)
-- AddBleedThreshold(DEF, 31, 0.0)
-- AddBleedThreshold(DEF, 21, 0.75)
AddBleedThreshold(DEF, 11, 0.75)
AddBleedThreshold(DEF, 10, 1.5)
AddBleedThreshold(DEF, 1, 3.0)

-- Local Stats
-- SetTeamName(3, "locals")
-- AddUnitClass(3, "gam_inf_gamorreanguard",3)
-- SetUnitCount(3, 3)
-- SetTeamAsEnemy(3, ATT)
-- SetTeamAsEnemy(3, DEF)

-- Level Stats
ClearWalkers()
AddWalkerType(0, 4) -- Droidekas
AddWalkerType(1, 4) -- number of leg pairs, count
AddWalkerType(2, 0)
-- SetMemoryPoolSize("EntityHover", 12)
-- SetMemoryPoolSize("EntityFlyer", 5)
-- SetMemoryPoolSize("EntityBuildingArmedDynamic", 16)
-- SetMemoryPoolSize("EntityTauntaun", 0)
-- SetMemoryPoolSize("MountedTurret", 22)
-- SetMemoryPoolSize("SoundSpaceRegion", 81)
SetMemoryPoolSize("PowerupItem", 60)
SetMemoryPoolSize("EntityMine", 40)
SetMemoryPoolSize("Aimer", 200)
SetMemoryPoolSize("Obstacle", 725)
SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:NABTEST\\NABTEST.lvl")
SetDenseEnvironment("true")
--AddDeathRegion("Sarlac01")
--SetMaxFlyHeight(90)
--SetMaxPlayerFlyHeight(90)


-- Sound Stats
OpenAudioStream("sound\\tat.lvl", "tatcw_music");
--OpenAudioStream("dc:sound\\tat.lvl", "tat3");
--OpenAudioStream("dc:sound\\tat.lvl", "tat3");
OpenAudioStream("sound\\cw.lvl", "cw_vo");
OpenAudioStream("sound\\cw.lvl", "cw_tac_vo");
--OpenAudioStream("dc:sound\\tat.lvl", "tat3_emt");
--OpenAudioStream("dc:sound\\tat.lvl", "tat3_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);

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(2, "repleaving");
SetOutOfBoundsVoiceOver(1, "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 3 - Jabbas' Palace
AddCameraShot(0.685601, -0.253606, -0.639994, -0.236735, -65.939224, -0.176558, 127.400444);
AddCameraShot(0.786944, 0.050288, -0.613719, 0.039218, -80.626396, 1.175180, 133.205551);
AddCameraShot(0.997982, 0.061865, -0.014249, 0.000883, -65.227898, 1.322798, 123.976990);
AddCameraShot(-0.367869, -0.027819, -0.926815, 0.070087, -19.548307, -5.736280, 163.360519);
AddCameraShot(0.773980, -0.100127, -0.620077, -0.080217, -61.123989, -0.629283, 176.066025);
AddCameraShot(0.978189, 0.012077, 0.207350, -0.002560, -88.388947, 5.674968, 153.745255);
AddCameraShot(-0.144606, -0.010301, -0.986935, 0.070304, -106.872772, 2.066469, 102.783096);
AddCameraShot(0.926756, -0.228578, -0.289446, -0.071390, -60.819584, -2.117482, 96.400620);
AddCameraShot(0.873080, 0.134285, 0.463274, -0.071254, -52.071609, -8.430746, 67.122437);
AddCameraShot(0.773398, -0.022789, -0.633236, -0.018659, -32.738083, -7.379394, 81.508003);
AddCameraShot(0.090190, 0.005601, -0.993994, 0.061733, -15.379695, -9.939115, 72.110054);
AddCameraShot(0.971737, -0.118739, -0.202524, -0.024747, -16.591295, -1.371236, 147.933029);
AddCameraShot(0.894918, 0.098682, -0.432560, 0.047698, -20.577391, -10.683214, 128.752563);

end

Posted: Sat May 21, 2005 8:41 am
by OOM-9
ReadDataFile("sound\\tat.lvl;tat1cw")
ReadDataFile("SIDE\\rep.lvl",
"cis_inf_basic_battledroids",
"rep_inf_basic",
"rep_inf_macewindu",
"rep_inf_jet_trooper");

ReadDataFile("SIDE\\cis.lvl",
"cis_inf_basic",
"cis_inf_countdooku",
"cis_inf_droideka");
needs to be
ReadDataFile("sound\\tat.lvl;tat1cw")
ReadDataFile("dc:SIDE\\rep.lvl",
"cis_inf_basic_battledroids",
"rep_inf_basic",
"rep_inf_macewindu",
"rep_inf_jet_trooper");

ReadDataFile("dc:SIDE\\cis.lvl",
"cis_inf_basic",
"cis_inf_countdooku",
"cis_inf_droideka");

Posted: Sat May 21, 2005 9:30 am
by maxloef
its not the cis or republic its only the naboo guards i normaly never put dc infront of it and it works i need a fix for the NABOO GUARDS

Posted: Sat May 21, 2005 9:41 am
by Saturn_V
1. Use SPTEst to get an error log.

2. The dc: part is only needed for sides you have created yourself (dc being Downloadable Content, ie stuff that's in the AddOn folder).

Your lua is correctly calling the shipped gar.lvl if you haven't made a custom side from them. I made a quick map that used the shipped Naboo soldier, pilot and vanguard and they all spawned ok without crashing the map.

3. One problem could be that you are trying to call 22 Naboo guards (12 soldier, 5 pilot, 5 rocket), but the lua says there should be 16. Either change the number of Naboo or the SetUnitCount so that the numbers add up.
AddUnitClass(GAR, "gar_inf_soldier",12)
AddUnitClass(GAR, "gar_inf_pilot",5)
AddUnitClass(GAR, "gar_inf_vanguard",5)

then

-- Attacker Stats
SetUnitCount(ATT, 16)

When I changed my lua by cutting and pasting from yours, the map crashed and the error log gave this message:
Message Severity: 3
D:\src\FRONTLINE_PC\FrontLine\Source\Team.cpp(166)
AddUnitClass lua script command specifies too many units for team !
When I changed the number of gar_inf_soldier to 6 the map worked again, although the Naboo guards didn't have any sound, so if you want that you'll have to make a custom side (search the forum for details if you don't know how), in which case bear in mnind what OOM9 said.

Posted: Sat May 21, 2005 10:15 am
by maxloef
i got this error log please help me out
Opened logfile BFront.log 2005-05-21 1609

Message Severity: 2
.\movie\RedMovie.cpp(467)
Segment 0x19e8e42f does not exist in movie 0xb86e8e36

Message Severity: 2
.\source\Weapon.cpp(1410)
Weapon 'weapons.gar.weap.inf_thermaldetonator' is not localized for stats page

Message Severity: 3
.\source\LuaScript.cpp(1951)
error: bad argument sent to Lua API function
stack traceback:
1: function `AddUnitClass' [C]
2: function `ScriptInit' [(none)]


Message Severity: 3
.\source\Team.cpp(171)
Team has no unit classes

Posted: Sat May 21, 2005 12:58 pm
by Leviathan
Try to use this *.LUA file :
---------------------------------------------------------------------------
-- 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()
-- Empire Attacking (attacker is always #1)
local REP = 2
local CIS = 1
-- These variables do not change
local ATT = 1
local DEF = 2

AddMissionObjective(CIS, "red", "level.NABTEST.objectives.1");
AddMissionObjective(CIS, "orange", "level.NABTEST.objectives.2");
AddMissionObjective(CIS, "orange", "level.NABTEST.objectives.3");
AddMissionObjective(REP, "red", "level.NABTEST.objectives.1");
AddMissionObjective(REP, "orange", "level.NABTEST.objectives.2");
AddMissionObjective(REP, "orange", "level.NABTEST.objectives.3");

ReadDataFile("sound\\tat.lvl;tat1cw")
ReadDataFile("dc:SIDE\\rep.lvl",
"cis_inf_basic_battledroids",
"rep_inf_basic",
"rep_inf_macewindu",
"rep_inf_jet_trooper");

ReadDataFile("dc:SIDE\\cis.lvl",
"cis_inf_basic",
"cis_inf_countdooku",
"cis_inf_droideka");

SetAttackingTeam(ATT);

-- Republic Stats
SetTeamName(REP, "Republic")
SetTeamIcon(REP, "rep_icon")
AddUnitClass(REP, "rep_inf_soldier",12)
AddUnitClass(REP, "rep_inf_pilot",5)
AddUnitClass(REP, "rep_inf_vanguard",5)

-- CIS Stats
SetTeamName(CIS, "CIS")
SetTeamIcon(CIS, "cis_icon")
AddUnitClass(CIS, "cis_inf_battledroid_inf",11)
AddUnitClass(CIS, "cis_inf_assault",1)
AddUnitClass(CIS, "cis_inf_pilotdroid",2)
AddUnitClass(CIS, "cis_inf_assassindroid",2)
AddUnitClass(CIS, "cis_inf_droideka",1)
SetHeroClass(CIS, "cis_inf_countdooku")

-- Attacker Stats
SetUnitCount(ATT, 16)
SetReinforcementCount(ATT, 200)
-- AddBleedThreshold(ATT, 31, 0.0)
-- AddBleedThreshold(ATT, 21, 0.75)
AddBleedThreshold(ATT, 11, 0.75)
AddBleedThreshold(ATT, 10, 1.5)
AddBleedThreshold(ATT, 1, 3.0)

-- Defender Stats
SetUnitCount(DEF, 16)
SetReinforcementCount(DEF, 200)
-- AddBleedThreshold(DEF, 31, 0.0)
-- AddBleedThreshold(DEF, 21, 0.75)
AddBleedThreshold(DEF, 11, 0.75)
AddBleedThreshold(DEF, 10, 1.5)
AddBleedThreshold(DEF, 1, 3.0)

-- Local Stats
SetTeamName(3, "Naboo Guard")
-- SetTeamIcon(GAR, "GAR_icon")
AddUnitClass(3, "gar_inf_soldier", 12)
AddUnitClass(3, "gar_inf_pilot", 5)
AddUnitClass(3, "gar_inf_vanguard", 5)
SetUnitCount(3, 22)
SetTeamAsEnemy(3,ATT)
SetTeamAsFriend(3,DEF)


-- Level Stats
ClearWalkers()
AddWalkerType(0, 4) -- Droidekas
AddWalkerType(1, 4) -- number of leg pairs, count
AddWalkerType(2, 0)
-- SetMemoryPoolSize("EntityHover", 12)
-- SetMemoryPoolSize("EntityFlyer", 5)
-- SetMemoryPoolSize("EntityBuildingArmedDynamic", 16)
-- SetMemoryPoolSize("EntityTauntaun", 0)
-- SetMemoryPoolSize("MountedTurret", 22)
-- SetMemoryPoolSize("SoundSpaceRegion", 81)
SetMemoryPoolSize("PowerupItem", 60)
SetMemoryPoolSize("EntityMine", 40)
SetMemoryPoolSize("Aimer", 200)
SetMemoryPoolSize("Obstacle", 725)
SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:NABTEST\\NABTEST.lvl")
SetDenseEnvironment("true")
--AddDeathRegion("Sarlac01")
--SetMaxFlyHeight(90)
--SetMaxPlayerFlyHeight(90)

-- Sound Stats
OpenAudioStream("sound\\tat.lvl", "tatcw_music");
--OpenAudioStream("dc:sound\\tat.lvl", "tat3");
--OpenAudioStream("dc:sound\\tat.lvl", "tat3");
OpenAudioStream("sound\\cw.lvl", "cw_vo");
OpenAudioStream("sound\\cw.lvl", "cw_tac_vo");
--OpenAudioStream("dc:sound\\tat.lvl", "tat3_emt");
--OpenAudioStream("dc:sound\\tat.lvl", "tat3_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);

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(2, "repleaving");
SetOutOfBoundsVoiceOver(1, "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 3 - Jabbas' Palace
AddCameraShot(0.685601, -0.253606, -0.639994, -0.236735, -65.939224, -0.176558, 127.400444);
AddCameraShot(0.786944, 0.050288, -0.613719, 0.039218, -80.626396, 1.175180, 133.205551);
AddCameraShot(0.997982, 0.061865, -0.014249, 0.000883, -65.227898, 1.322798, 123.976990);
AddCameraShot(-0.367869, -0.027819, -0.926815, 0.070087, -19.548307, -5.736280, 163.360519);
AddCameraShot(0.773980, -0.100127, -0.620077, -0.080217, -61.123989, -0.629283, 176.066025);
AddCameraShot(0.978189, 0.012077, 0.207350, -0.002560, -88.388947, 5.674968, 153.745255);
AddCameraShot(-0.144606, -0.010301, -0.986935, 0.070304, -106.872772, 2.066469, 102.783096);
AddCameraShot(0.926756, -0.228578, -0.289446, -0.071390, -60.819584, -2.117482, 96.400620);
AddCameraShot(0.873080, 0.134285, 0.463274, -0.071254, -52.071609, -8.430746, 67.122437);
AddCameraShot(0.773398, -0.022789, -0.633236, -0.018659, -32.738083, -7.379394, 81.508003);
AddCameraShot(0.090190, 0.005601, -0.993994, 0.061733, -15.379695, -9.939115, 72.110054);
AddCameraShot(0.971737, -0.118739, -0.202524, -0.024747, -16.591295, -1.371236, 147.933029);
AddCameraShot(0.894918, 0.098682, -0.432560, 0.047698, -20.577391, -10.683214, 128.752563);

end

Posted: Sat May 21, 2005 1:15 pm
by Qdin
ya, do THAT :P lol

C ya - and I hope this works

Posted: Sat May 21, 2005 4:56 pm
by Saturn_V
Don't worry about the movie error, that just says you haven't made one of the movies that plays on the map selection screen, and isn't a major deal at this point. Also, the "not localised" error doesn't crash the map, search the forum for info about the localisation tool.

The "Team has no unit classes" error is a problem, you've deleted an important part of the lua instead of changing the values - OR you've possibly got a syntax error in the lua (a missing bracket, comma... something like that)

Ignore Leviathan's post, it doesn't help what you want to do UNLESS you've made a custom copy of the Clone and CIS sides and got them set up properly AND you want the Naboo guards to be a third (non-playable, local, team)

Posted: Sat May 21, 2005 6:17 pm
by Saturn_V
Lol. There's 1 right way to do the odf, and unlimited ways to screw it up ;)

Posted: Sun May 22, 2005 4:32 am
by maxloef
i still cant get the damned thing to work saturn could u please put a working lua with PLAYABLE naboo guards here

Posted: Sun May 22, 2005 12:04 pm
by Leviathan
Ignore Leviathan's post, it doesn't help what you want to do UNLESS you've made a custom copy of the Clone and CIS sides and got them set up properly AND you want the Naboo guards to be a third (non-playable, local, team)
This is confusing. I thought maxloef wanted a map where the C.I.S. droïds fight against the Republic and Naboo guards. Moreover, I believed OOM-9 was right, that's why I've kept his mistakes in my "mission.lua" version.
So, if I understand correctly, maxloef wants a *.LUA file which allows Separatists to fight against Naboo Guards with shipped sides... Is it true ?

Posted: Sat May 28, 2005 11:10 am
by Leviathan
---------------------------------------------------------------------------
-- 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()
-- Empire Attacking (attacker is always #1)
local GAR = 2
local CIS = 1
-- These variables do not change
local ATT = 1
local DEF = 2

AddMissionObjective(CIS, "red", "level.NABTEST.objectives.1");
AddMissionObjective(CIS, "orange", "level.NABTEST.objectives.2");
AddMissionObjective(CIS, "orange", "level.NABTEST.objectives.3");
AddMissionObjective(GAR, "red", "level.NABTEST.objectives.1");
AddMissionObjective(GAR, "orange", "level.NABTEST.objectives.2");
AddMissionObjective(GAR, "orange", "level.NABTEST.objectives.3");

ReadDataFile("sound\\tat.lvl;tat1cw")

ReadDataFile("SIDE\\gar.lvl",
"gar_inf_basic");


ReadDataFile("SIDE\\cis.lvl",
"cis_inf_basic",
"cis_inf_countdooku",
"cis_inf_droideka");

SetAttackingTeam(ATT);

-- Republic Stats
SetTeamName(GAR, "Naboo guards")
SetTeamIcon(GAR, "GAR_icon")
AddUnitClass(GAR, "gar_inf_soldier",12)
AddUnitClass(GAR, "gar_inf_pilot",5)
AddUnitClass(GAR, "gar_inf_vanguard",5)

-- CIS Stats
SetTeamName(CIS, "CIS")
SetTeamIcon(CIS, "cis_icon")
AddUnitClass(CIS, "cis_inf_battledroid_inf",11)
AddUnitClass(CIS, "cis_inf_assault",1)
AddUnitClass(CIS, "cis_inf_pilotdroid",2)
AddUnitClass(CIS, "cis_inf_assassindroid",2)
AddUnitClass(CIS, "cis_inf_droideka",1)
SetHeroClass(CIS, "cis_inf_countdooku")

-- Attacker Stats
SetUnitCount(ATT, 16)
SetReinforcementCount(ATT, 200)
-- AddBleedThreshold(ATT, 31, 0.0)
-- AddBleedThreshold(ATT, 21, 0.75)
AddBleedThreshold(ATT, 11, 0.75)
AddBleedThreshold(ATT, 10, 1.5)
AddBleedThreshold(ATT, 1, 3.0)

-- Defender Stats
SetUnitCount(DEF, 16)
SetReinforcementCount(DEF, 200)
-- AddBleedThreshold(DEF, 31, 0.0)
-- AddBleedThreshold(DEF, 21, 0.75)
AddBleedThreshold(DEF, 11, 0.75)
AddBleedThreshold(DEF, 10, 1.5)
AddBleedThreshold(DEF, 1, 3.0)

-- Level Stats
ClearWalkers()
AddWalkerType(0, 4) -- Droidekas
AddWalkerType(1, 4) -- number of leg pairs, count
AddWalkerType(2, 0)
-- SetMemoryPoolSize("EntityHover", 12)
-- SetMemoryPoolSize("EntityFlyer", 5)
-- SetMemoryPoolSize("EntityBuildingArmedDynamic", 16)
-- SetMemoryPoolSize("EntityTauntaun", 0)
-- SetMemoryPoolSize("MountedTurret", 22)
-- SetMemoryPoolSize("SoundSpaceRegion", 81)
SetMemoryPoolSize("PowerupItem", 60)
SetMemoryPoolSize("EntityMine", 40)
SetMemoryPoolSize("Aimer", 200)
SetMemoryPoolSize("Obstacle", 725)
SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:NABTEST\\NABTEST.lvl")
SetDenseEnvironment("true")
--AddDeathRegion("Sarlac01")
--SetMaxFlyHeight(90)
--SetMaxPlayerFlyHeight(90)

-- Sound Stats
OpenAudioStream("sound\\tat.lvl", "tatcw_music");
--OpenAudioStream("dc:sound\\tat.lvl", "tat3");
--OpenAudioStream("dc:sound\\tat.lvl", "tat3");
OpenAudioStream("sound\\cw.lvl", "cw_vo");
OpenAudioStream("sound\\cw.lvl", "cw_tac_vo");
--OpenAudioStream("dc:sound\\tat.lvl", "tat3_emt");
--OpenAudioStream("dc:sound\\tat.lvl", "tat3_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);

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(2, "repleaving");
SetOutOfBoundsVoiceOver(1, "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 3 - Jabbas' Palace
AddCameraShot(0.685601, -0.253606, -0.639994, -0.236735, -65.939224, -0.176558, 127.400444);
AddCameraShot(0.786944, 0.050288, -0.613719, 0.039218, -80.626396, 1.175180, 133.205551);
AddCameraShot(0.997982, 0.061865, -0.014249, 0.000883, -65.227898, 1.322798, 123.976990);
AddCameraShot(-0.367869, -0.027819, -0.926815, 0.070087, -19.548307, -5.736280, 163.360519);
AddCameraShot(0.773980, -0.100127, -0.620077, -0.080217, -61.123989, -0.629283, 176.066025);
AddCameraShot(0.978189, 0.012077, 0.207350, -0.002560, -88.388947, 5.674968, 153.745255);
AddCameraShot(-0.144606, -0.010301, -0.986935, 0.070304, -106.872772, 2.066469, 102.783096);
AddCameraShot(0.926756, -0.228578, -0.289446, -0.071390, -60.819584, -2.117482, 96.400620);
AddCameraShot(0.873080, 0.134285, 0.463274, -0.071254, -52.071609, -8.430746, 67.122437);
AddCameraShot(0.773398, -0.022789, -0.633236, -0.018659, -32.738083, -7.379394, 81.508003);
AddCameraShot(0.090190, 0.005601, -0.993994, 0.061733, -15.379695, -9.939115, 72.110054);
AddCameraShot(0.971737, -0.118739, -0.202524, -0.024747, -16.591295, -1.371236, 147.933029);
AddCameraShot(0.894918, 0.098682, -0.432560, 0.047698, -20.577391, -10.683214, 128.752563);

end
Now, it should work... (I think...) :)

Posted: Sun May 29, 2005 10:39 am
by Leviathan
I used "tat2c_h.lua" to make this file. But I forgot that Naboo guards didn't have tactical voices... :(