custom vehicle crash
Posted: Mon Dec 31, 2007 3:31 pm
ok so i thought i figured out how to add custom vehicles. i downloaded the atxt and light combat speeder and put their files in C:/bfbuilder/assets/sides so then i go to the clone war lua and put
ReadDataFile("SIDE\\atxt_beta",
"rep_walk_atxt");
ReadDataFile("SIDE\\light_attack_speeder",
"com_hover_light_attack_speeder");
then i go into the game add the spawn point and all that junk and launch sptest.
the map won't even load it crashes both the sptest and actual game please help
heres my full lua for refrance
---------------------------------------------------------------------------
-- 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 = 1
local CIS = 2
-- These variables do not change
local ATT = 1
local DEF = 2
AddMissionObjective(CIS, "red", "level.gfs1.objectives.1");
AddMissionObjective(CIS, "orange", "level.gfs1.objectives.2");
AddMissionObjective(CIS, "orange", "level.gfs1.objectives.3");
AddMissionObjective(REP, "red", "level.gfs1.objectives.1");
AddMissionObjective(REP, "orange", "level.gfs1.objectives.2");
AddMissionObjective(REP, "orange", "level.gfs1.objectives.3");
ReadDataFile("sound\\tat.lvl;tat1cw")
ReadDataFile("SIDE\\rep.lvl",
"rep_fly_gunship",
"rep_walk_atte",
"rep_hover_fightertank",
"rep_inf_basic",
"rep_inf_macewindu",
"rep_inf_jet_trooper");
ReadDataFile("SIDE\\rep_fly_command_BF1Ready",
"rep_fly_command");
ReadDataFile("SIDE\\atxt_beta",
"rep_walk_atxt");
ReadDataFile("SIDE\\light_attack_speeder",
"com_hover_light_attack_speeder");
ReadDataFile("SIDE\\cis.lvl",
"cis_fly_geofighter",
"cis_fly_droidfighter",
"cis_hover_mtt",
"cis_fly_maf",
"cis_hover_aat",
"cis_inf_basic",
"cis_inf_countdooku",
"cis_inf_droideka");
ReadDataFile("dc:SIDE\\geo.lvl",
"gen_inf_geonosian");
SetAttackingTeam(ATT);
-- Republic Stats
SetTeamName(REP, "309th planetery assault force")
SetTeamIcon(REP, "rep_icon")
AddUnitClass(REP, "rep_inf_clone_trooper",100)
AddUnitClass(REP, "rep_inf_arc_trooper",100)
AddUnitClass(REP, "rep_inf_clone_pilot",100)
AddUnitClass(REP, "rep_inf_clone_sharpshooter",100)
AddUnitClass(REP, "rep_inf_jet_trooper",100)
SetHeroClass(REP, "rep_inf_macewindu")
-- CIS Stats
SetTeamName(CIS, "CIS")
SetTeamIcon(CIS, "cis_icon")
AddUnitClass(CIS, "cis_inf_battledroid",100)
AddUnitClass(CIS, "cis_inf_assault",100)
AddUnitClass(CIS, "cis_inf_pilotdroid",100)
AddUnitClass(CIS, "cis_inf_assassindroid",100)
AddUnitClass(CIS, "cis_inf_droideka",100)
SetHeroClass(CIS, "cis_inf_countdooku")
-- Attacker Stats
SetUnitCount(ATT, 300)
SetReinforcementCount(ATT, 3000)
-- 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, 300)
SetReinforcementCount(DEF, 3000)
-- 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, "geonosian remnenet")
AddUnitClass(3, "gen_inf_geonosian",70)
SetUnitCount(3, 70)
SetTeamAsEnemy(3, ATT)
-- SetTeamAsEnemy(3, DEF)
-- Level Stats
ClearWalkers()
AddWalkerType(0, 20) -- Droidekas
AddWalkerType(1, 3)
AddWalkerType(2, 0)
AddWalkerType(3, 3)
SetMemoryPoolSize("EntityHover", 30)
SetMemoryPoolSize("EntityFlyer", 30)
SetMemoryPoolSize("EntityBuildingArmedDynamic", 16)
-- SetMemoryPoolSize("EntityTauntaun", 0)
SetMemoryPoolSize("MountedTurret", 100)
-- SetMemoryPoolSize("SoundSpaceRegion", 81)
SetMemoryPoolSize("PowerupItem", 60)
SetMemoryPoolSize("EntityMine", 40)
SetMemoryPoolSize("Aimer", 300)
SetMemoryPoolSize("Obstacle", 725)
SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:gsf1\\gsf1.lvl")
SetDenseEnvironment("true")
--AddDeathRegion("Sarlac01")
SetMaxFlyHeight(120)
SetMaxPlayerFlyHeight(90)
ReadDataFile("SIDE\\atxt_beta",
"rep_walk_atxt");
ReadDataFile("SIDE\\light_attack_speeder",
"com_hover_light_attack_speeder");
then i go into the game add the spawn point and all that junk and launch sptest.
the map won't even load it crashes both the sptest and actual game please help
heres my full lua for refrance
---------------------------------------------------------------------------
-- 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 = 1
local CIS = 2
-- These variables do not change
local ATT = 1
local DEF = 2
AddMissionObjective(CIS, "red", "level.gfs1.objectives.1");
AddMissionObjective(CIS, "orange", "level.gfs1.objectives.2");
AddMissionObjective(CIS, "orange", "level.gfs1.objectives.3");
AddMissionObjective(REP, "red", "level.gfs1.objectives.1");
AddMissionObjective(REP, "orange", "level.gfs1.objectives.2");
AddMissionObjective(REP, "orange", "level.gfs1.objectives.3");
ReadDataFile("sound\\tat.lvl;tat1cw")
ReadDataFile("SIDE\\rep.lvl",
"rep_fly_gunship",
"rep_walk_atte",
"rep_hover_fightertank",
"rep_inf_basic",
"rep_inf_macewindu",
"rep_inf_jet_trooper");
ReadDataFile("SIDE\\rep_fly_command_BF1Ready",
"rep_fly_command");
ReadDataFile("SIDE\\atxt_beta",
"rep_walk_atxt");
ReadDataFile("SIDE\\light_attack_speeder",
"com_hover_light_attack_speeder");
ReadDataFile("SIDE\\cis.lvl",
"cis_fly_geofighter",
"cis_fly_droidfighter",
"cis_hover_mtt",
"cis_fly_maf",
"cis_hover_aat",
"cis_inf_basic",
"cis_inf_countdooku",
"cis_inf_droideka");
ReadDataFile("dc:SIDE\\geo.lvl",
"gen_inf_geonosian");
SetAttackingTeam(ATT);
-- Republic Stats
SetTeamName(REP, "309th planetery assault force")
SetTeamIcon(REP, "rep_icon")
AddUnitClass(REP, "rep_inf_clone_trooper",100)
AddUnitClass(REP, "rep_inf_arc_trooper",100)
AddUnitClass(REP, "rep_inf_clone_pilot",100)
AddUnitClass(REP, "rep_inf_clone_sharpshooter",100)
AddUnitClass(REP, "rep_inf_jet_trooper",100)
SetHeroClass(REP, "rep_inf_macewindu")
-- CIS Stats
SetTeamName(CIS, "CIS")
SetTeamIcon(CIS, "cis_icon")
AddUnitClass(CIS, "cis_inf_battledroid",100)
AddUnitClass(CIS, "cis_inf_assault",100)
AddUnitClass(CIS, "cis_inf_pilotdroid",100)
AddUnitClass(CIS, "cis_inf_assassindroid",100)
AddUnitClass(CIS, "cis_inf_droideka",100)
SetHeroClass(CIS, "cis_inf_countdooku")
-- Attacker Stats
SetUnitCount(ATT, 300)
SetReinforcementCount(ATT, 3000)
-- 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, 300)
SetReinforcementCount(DEF, 3000)
-- 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, "geonosian remnenet")
AddUnitClass(3, "gen_inf_geonosian",70)
SetUnitCount(3, 70)
SetTeamAsEnemy(3, ATT)
-- SetTeamAsEnemy(3, DEF)
-- Level Stats
ClearWalkers()
AddWalkerType(0, 20) -- Droidekas
AddWalkerType(1, 3)
AddWalkerType(2, 0)
AddWalkerType(3, 3)
SetMemoryPoolSize("EntityHover", 30)
SetMemoryPoolSize("EntityFlyer", 30)
SetMemoryPoolSize("EntityBuildingArmedDynamic", 16)
-- SetMemoryPoolSize("EntityTauntaun", 0)
SetMemoryPoolSize("MountedTurret", 100)
-- SetMemoryPoolSize("SoundSpaceRegion", 81)
SetMemoryPoolSize("PowerupItem", 60)
SetMemoryPoolSize("EntityMine", 40)
SetMemoryPoolSize("Aimer", 300)
SetMemoryPoolSize("Obstacle", 725)
SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:gsf1\\gsf1.lvl")
SetDenseEnvironment("true")
--AddDeathRegion("Sarlac01")
SetMaxFlyHeight(120)
SetMaxPlayerFlyHeight(90)