custom vehicle crash

Post everything from general questions, to modding questions, to map WIPs to releases. (SWBF1 only)

Moderator: Moderators

Post Reply
User avatar
wishihadaname
Captain
Captain
Posts: 493
Joined: Fri Dec 28, 2007 2:10 pm
Projects :: The Corellian Resistance
Games I'm Playing :: Halo Reach and LOTRO
Location: Look to your left.... no, your other left....

custom vehicle crash

Post by wishihadaname »

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)
User avatar
Laserblast
Second Lance Corporal
Second Lance Corporal
Posts: 105
Joined: Sat Sep 17, 2005 12:25 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Contact:

Re: custom vehicle crash

Post by Laserblast »

The first thing that comes to mind is that custom sides (not in the original game) must be summoned with dc:SIDES.

Also, large amounts of units may cause the game to crash, so maybe reducing the numbers to the default levels will help. On a similar note, the numbers of units seem much higher than the unit count and the poor droidekas only have 20 allocated for them, when they number 100.

It's the only things I can think of right now. Happy error hunting.
User avatar
wishihadaname
Captain
Captain
Posts: 493
Joined: Fri Dec 28, 2007 2:10 pm
Projects :: The Corellian Resistance
Games I'm Playing :: Halo Reach and LOTRO
Location: Look to your left.... no, your other left....

Re: custom vehicle crash

Post by wishihadaname »

i did what you told me too. i switched the dc:SIDE to dc:SIDES and i also decresed the number of troops for each team to 16 as fix their numbers in the lua but this is kind of how my attempts have ended so far :cpu: :runaway: basicly it crashes at the loading screen and im ticked and confused

---------------------------------------------------------------------------
-- 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\\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:SIDES\\atxt_beta.lvl",
"rep_walk_atxt");


ReadDataFile("dc:SIDES\\rep_fly_command_BF1Ready.lvl",
"rep_fly_command");


ReadDataFile("dc:SIDES\\light_attack_speeder.lvl",
"com_hover_light_attack_speeder");

ReadDataFile("dc:SIDES\\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",10)
AddUnitClass(REP, "rep_inf_arc_trooper",1)
AddUnitClass(REP, "rep_inf_clone_pilot",2)
AddUnitClass(REP, "rep_inf_clone_sharpshooter",2)
AddUnitClass(REP, "rep_inf_jet_trooper",1)
SetHeroClass(REP, "rep_inf_macewindu")

-- CIS Stats
SetTeamName(CIS, "CIS")
SetTeamIcon(CIS, "cis_icon")
AddUnitClass(CIS, "cis_inf_battledroid",10)
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, 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, 16)
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",16)
SetUnitCount(3, 16)
SetTeamAsEnemy(3, ATT)
-- SetTeamAsEnemy(3, DEF)

-- Level Stats
ClearWalkers()
AddWalkerType(0, 1) -- 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)
User avatar
Laserblast
Second Lance Corporal
Second Lance Corporal
Posts: 105
Joined: Sat Sep 17, 2005 12:25 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Contact:

Re: custom vehicle crash

Post by Laserblast »

Sorry, but you misunderstood. The dc:SIDE was fine. However, the sides provided by psych0fred are not native to the game. I am simply saying they should have the dc: part. Do you have a BFront log, or are you getting nothing at all from it?
User avatar
wishihadaname
Captain
Captain
Posts: 493
Joined: Fri Dec 28, 2007 2:10 pm
Projects :: The Corellian Resistance
Games I'm Playing :: Halo Reach and LOTRO
Location: Look to your left.... no, your other left....

Re: custom vehicle crash

Post by wishihadaname »

i was getting nothing at all andi think i included the dc: part like i sayed it crashes at the loading screen so i just got a new lua and am gonna try again

EDIT: i got it to stop crashing by redoing the lua but now it says "vehicle spawn missing class" for all of the custom vehicles.
User avatar
Laserblast
Second Lance Corporal
Second Lance Corporal
Posts: 105
Joined: Sat Sep 17, 2005 12:25 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Contact:

Re: custom vehicle crash

Post by Laserblast »

Did the custom sides munge? I was wondering if that could cause a crash earlier, but perhaps it just results in missing classes.
User avatar
wishihadaname
Captain
Captain
Posts: 493
Joined: Fri Dec 28, 2007 2:10 pm
Projects :: The Corellian Resistance
Games I'm Playing :: Halo Reach and LOTRO
Location: Look to your left.... no, your other left....

Re: custom vehicle crash

Post by wishihadaname »

idk how do i check if it munged? also i think i mite just be putting it in incorrectly so could you please tell me exactly what to do with the downloaded files?
User avatar
Laserblast
Second Lance Corporal
Second Lance Corporal
Posts: 105
Joined: Sat Sep 17, 2005 12:25 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Contact:

Re: custom vehicle crash

Post by Laserblast »

To figure out if the Sides munged, go to the map folder, data, lvl_pc, and side. If you do not see the side that you are trying to summon units from, then it probably didn't munge. For example, AddOn\Tat3\Data\lvl_pc\Side has the GAM (gammoreans).

As far as compiling (munging, whatever) the sides, it depends on what you are using. If you are using BFBuilder Pro, then you might get away with telling it to create a new side with the name you already have. Then it's simply a matter of copy and paste. The regular BFBuilder will probably require you to edit the .bats in order for the munge to find the folders (done it before, not fun) or to munge it yourself and move files around (slow, but works).
User avatar
wishihadaname
Captain
Captain
Posts: 493
Joined: Fri Dec 28, 2007 2:10 pm
Projects :: The Corellian Resistance
Games I'm Playing :: Halo Reach and LOTRO
Location: Look to your left.... no, your other left....

Re: custom vehicle crash

Post by wishihadaname »

lol i think i just found my problem. the sides folder in the munged version doesn't even exist!
please tell me how to custom munge
Post Reply