Vehicles in hero assault mode [Solved]

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
brant777
Private Third Class
Posts: 52
Joined: Thu Mar 22, 2012 9:05 pm
Projects :: No Mod project currently.
Games I'm Playing :: SWBF2
xbox live or psn: Why? PS3 is better
Location: pennsylvania
Contact:

Vehicles in hero assault mode [Solved]

Post by brant777 »

Alright(before y'all say anything, i did look at the faq 2.0). i am at the part of my map when i want to add vehicles. I did what the documentation said and i put in 2 vehicle spawners of the imperial speeder bike and assigned them to a command post. In C:\BF2_ModTools\data_JAM\Sides\Common i put in the odf's and msh's and i munged and i played the map but i did not see the speeders. I looked around gametoast for something with vehicles, but to no avail i did not see anything related to this.

but one thought i have is that do i need a region for vehicles?

If anyone can help me plz do. Or if there is a topic that i seemed to miss, please show me the link.
ARCTroopaNate
Jedi
Jedi
Posts: 1161
Joined: Mon Mar 21, 2011 8:12 pm
Projects :: Star Wars Battlefront - Tides of War
Games I'm Playing :: SWBF2 RC EAW
xbox live or psn: I have ps4
Location: STALKER!
Contact:

Re: vehicle help!!!

Post by ARCTroopaNate »

You do need a region for vehicles. If you read most tutorials thoroughly you will see that you have to have regions to create vehicles, also if you are using stock vehicles, you do not need the odfs and mshs. To create a region, go to the Regions tab and click create region, place the region over your vehicle spawns. I'm not sure if you've done this but you also need to load your vehicles in your lua script. You should use Firefeks first map tutorial, it's a very good tutorial, the one I used for my first map.
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3285
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: vehicle help!!!

Post by AceMastermind »

Learn how to add vehicles the way the docs tell you first, then once you succeed you can start tweaking stuff to suit your modding needs.

To spawn a stock vehicle you only need to place a vehicle spawn in Zero Editor and indicate which vehicle by ODF name in the ClassNeutral field in Object Instance, increase the DecayTime etc if you want and load it from a shipped Side in the LUA. Everything else just allows you to set certain conditions for the spawning vehicle. You also may have to add or increase memory in the LUA depending on what vehicle type you want spawned.

Have a read through this post linked from the FAQ/EYN Thread.
User avatar
brant777
Private Third Class
Posts: 52
Joined: Thu Mar 22, 2012 9:05 pm
Projects :: No Mod project currently.
Games I'm Playing :: SWBF2
xbox live or psn: Why? PS3 is better
Location: pennsylvania
Contact:

Re: vehicle help!!!

Post by brant777 »

i followed exactly as the guy said to and i added odf and msh to the sides file and i changed the lua but i still cannot get my speeders to pop up :runaway:
User avatar
lucasfart
Sith
Sith
Posts: 1440
Joined: Tue Feb 24, 2009 5:32 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Australia

Re: vehicle help!!!

Post by lucasfart »

What do you mean you added the .odf and the .msh to the side file? If you're loading a stock vehicle you don't need to move any .msh's or .odf's.

You can't very well expect us to be able to solve your problem if you don't post any details of what you did. If you can't make the small effort it requires to tell us exactly what you did, we can't help you. Also, you'd be better off getting one thing right before you move onto another instead of trying to learn everything at once.
Just follow the perfectly good explanation in the getting started document in the documentation folder of your modtools and you shouldn't have any problems.
User avatar
brant777
Private Third Class
Posts: 52
Joined: Thu Mar 22, 2012 9:05 pm
Projects :: No Mod project currently.
Games I'm Playing :: SWBF2
xbox live or psn: Why? PS3 is better
Location: pennsylvania
Contact:

Re: vehicle help!!!

Post by brant777 »

lucasfart wrote: Just follow the perfectly good explanation in the getting started document in the documentation folder of your modtools and you shouldn't have any problems.
i followed the doc tutorial on vehicles exactly. i also removed the .msh and .odf from the sides folder, made sure that the command post, control region, and vehicle spawns were correct. i munged and there are still no speederbikes. i have followed feirfeks tutorial on this and it still didnt work.
User avatar
lucasfart
Sith
Sith
Posts: 1440
Joined: Tue Feb 24, 2009 5:32 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Australia

Re: vehicle help!!!

Post by lucasfart »

Can you post your bfront2.log (Error log) please?

You also added the vehicle in your lua, right?
User avatar
brant777
Private Third Class
Posts: 52
Joined: Thu Mar 22, 2012 9:05 pm
Projects :: No Mod project currently.
Games I'm Playing :: SWBF2
xbox live or psn: Why? PS3 is better
Location: pennsylvania
Contact:

Re: vehicle help!!!

Post by brant777 »

lucasfart wrote:Can you post your bfront2.log (Error log) please?

You also added the vehicle in your lua, right?
ya sure but it is so big so i cant post it here, here is the link http://www.mediafire.com/?dl1v2f798vbsalx .i put it in my lua but since it is in hero assault mode. i wasn't sure what to do so i added speederbike to all factions.
User avatar
lucasfart
Sith
Sith
Posts: 1440
Joined: Tue Feb 24, 2009 5:32 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Australia

Re: vehicle help!!!

Post by lucasfart »

If you can't fit your log in the reply, just use textbin, or something like that. Here's the link on textbin;
http://textbin.com/72q77

What the heck were you typing into your lua?
Hidden/Spoiler:
[code]Message Severity: 3
C:Battlefront2mainBattlefront2SourceLoadUtil.cpp(829)
Unable to find level chunk imp_hover_speederbike in data_lvl_pcSIDEall.lvl


Message Severity: 3
C:Battlefront2mainBattlefront2SourceLoadUtil.cpp(1019)
Unable to find level chunk in SIDEall.lvl

Message Severity: 3
C:Battlefront2mainBattlefront2SourceLoadUtil.cpp(829)
Unable to find level chunk imp_hover_speederbike in data_lvl_pcSIDErep.lvl


Message Severity: 3
C:Battlefront2mainBattlefront2SourceLoadUtil.cpp(1019)
Unable to find level chunk in SIDErep.lvl

Message Severity: 3
C:Battlefront2mainBattlefront2SourceLoadUtil.cpp(829)
Unable to find level chunk imp_hover_speederbike in data_lvl_pcSIDEcis.lvl

Message Severity: 3
C:Battlefront2mainBattlefront2SourceLoadUtil.cpp(1019)
Unable to find level chunk in SIDEcis.lvl
[/code]
Can you post your lua please? I have a feeling you forgot to add "/"s or something like that. Also, notice how the speederbike has "imp" at the start of its name? That means you need to add it to the imp side.

Also, one of your command post regions is misnamed -
Hidden/Spoiler:
[code]
Message Severity: 3
C:Battlefront2mainBattlefront2SourceCommandPost.cpp(498)
Command Post missing control region "cp6_control"

Message Severity: 3
C:Battlefront2mainBattlefront2SourceVehicleSpawn.cpp(135)
Vehicle spawn missing command post "cp6"

Message Severity: 3
C:Battlefront2mainBattlefront2SourceVehicleSpawn.cpp(135)
Vehicle spawn missing command post "cp6"[/code]
Its probably also worth shortening your error log by fixing the Soldier Animation problem.

Here's what your side setup should look like if you're just using the stock hero assault:
Hidden/Spoiler:
ReadDataFile("sound\\tat.lvl;tat2gcw")
ReadDataFile("SIDE\\all.lvl",
"all_hero_luke_jedi",
"all_hero_hansolo_tat",
"all_hero_leia",
"all_hero_chewbacca")

ReadDataFile("SIDE\\imp.lvl",
"imp_hero_darthvader",
"imp_hero_emperor",
"imp_hero_bobafett",
"imp_hover_speederbike"
)

ReadDataFile("SIDE\\rep.lvl",
"rep_hero_yoda",
"rep_hero_macewindu",
"rep_hero_anakin",
"rep_hero_aalya",
"rep_hero_kiyadimundi",
"rep_hero_obiwan")

ReadDataFile("SIDE\\cis.lvl",
"cis_hero_grievous",
"cis_hero_darthmaul",
"cis_hero_countdooku",
"cis_hero_jangofett")
All you need to add is the comma and the name of the speederbike on the following line, as you can see by what's highlighted.
User avatar
brant777
Private Third Class
Posts: 52
Joined: Thu Mar 22, 2012 9:05 pm
Projects :: No Mod project currently.
Games I'm Playing :: SWBF2
xbox live or psn: Why? PS3 is better
Location: pennsylvania
Contact:

Re: vehicle help!!!

Post by brant777 »

here is my lua, i have fixed the side setup after i copied it here
http://textbin.com/02m21
Hidden/Spoiler:
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
-- Mos Eisley Hero Deathmatch (uses Space Assault rules)
-- First team to reach 100 kills wins
--

ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("ObjectiveTDM")

---------------------------------------------------------------------------
-- ScriptPostLoad
---------------------------------------------------------------------------
function ScriptPostLoad()
EnableSPHeroRules()
-- This is the actual objective setup
TDM = ObjectiveTDM:New{teamATT = 1, teamDEF = 2,
multiplayerScoreLimit = 100,
textATT = "game.modes.tdm",
textDEF = "game.modes.tdm2", multiplayerRules = true, isCelebrityDeathmatch = true}
TDM:Start()

AddAIGoal(1, "Deathmatch", 100)
AddAIGoal(2, "Deathmatch", 100)
end


---------------------------------------------------------------------------
-- ScriptInit
---------------------------------------------------------------------------
function ScriptInit()



SetMemoryPoolSize ("ClothData",20)
SetMemoryPoolSize ("Combo",70) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",850) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",850) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",850) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",750) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",8000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",140) -- should be ~1x #combo -- should be ~1x #combo
--tell the game to load our loading image
ReadDataFile("dc:Load\common.lvl")
ReadDataFile("ingame.lvl")

ALL = 1
IMP = 2
-- These variables do not change
ATT = 1
DEF = 2

SetMaxFlyHeight(800)
SetMaxPlayerFlyHeight(800)

ReadDataFile("sound\tat.lvl;tat2gcw")
ReadDataFile("SIDE\all.lvl",
"all_hero_luke_jedi",
"all_hero_hansolo_tat",
"all_hero_leia",
"all_hero_chewbacca",
"imp_hover_speederbike")

ReadDataFile("SIDE\imp.lvl",
"imp_hero_darthvader",
"imp_hero_emperor",
"imp_hero_bobafett",
"imp_hover_speederbike")

ReadDataFile("SIDE\rep.lvl",
"rep_hero_yoda",
"rep_hero_macewindu",
"rep_hero_anakin",
"rep_hero_aalya",
"rep_hero_kiyadimundi",
"rep_hero_obiwan",
"imp_hover_speederbike")

ReadDataFile("SIDE\cis.lvl",
"cis_hero_grievous",
"cis_hero_darthmaul",
"cis_hero_countdooku",
"cis_hero_jangofett",
"imp_hover_speederbike")

--[[ Turrets disabled
ReadDataFile("SIDE\tur.lvl",
"tur_bldg_chaingun_roof",
"tur_weap_built_gunturret")
SetMemoryPoolSize("MountedTurret", 15)
--]]

--ReadDataFile("SIDE\snw.lvl", "snw_inf_wampa")

SetupTeams{
hero = {
team = ALL,
units = 12,
reinforcements = -1,
soldier = { "all_hero_hansolo_tat",1,2},
assault = { "all_hero_chewbacca", 1,2},
engineer= { "all_hero_luke_jedi", 1,2},
sniper = { "rep_hero_obiwan", 1,2},
officer = { "rep_hero_yoda", 1,2},
special = { "rep_hero_macewindu", 1,2},
},
}

AddUnitClass(ALL,"all_hero_leia", 1,2)
AddUnitClass(ALL,"rep_hero_aalya", 1,2)
AddUnitClass(ALL,"rep_hero_kiyadimundi",1,2)

SetupTeams{
villain = {
team = IMP,
units = 12,
reinforcements = -1,
soldier = { "imp_hero_bobafett", 1,2},
assault = { "imp_hero_darthvader",1,2},
engineer= { "cis_hero_darthmaul", 1,2},
sniper = { "cis_hero_jangofett", 1,2},
officer = { "cis_hero_grievous", 1,2},
special = { "imp_hero_emperor", 1,2},

},
}
AddUnitClass(IMP, "rep_hero_anakin",1,2)
AddUnitClass(IMP, "cis_hero_countdooku",1,2)

-- Level Stats
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)

local weaponCnt = 96
SetMemoryPoolSize("Aimer", 1)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 320)
SetMemoryPoolSize("ConnectivityGraphFollower", 23)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth",41)
SetMemoryPoolSize("EntityDefenseGridTurret", 0)
SetMemoryPoolSize("EntityDroid", 0)
SetMemoryPoolSize("EntityFlyer", 5) -- to account for 5 chewbaccas
SetMemoryPoolSize("EntityLight", 80, 80) -- stupid trickery to actually set lights to 80
SetMemoryPoolSize("EntityPortableTurret", 0) -- nobody has autoturrets AFAIK - MZ
SetMemoryPoolSize("EntitySoundStream", 2)
SetMemoryPoolSize("EntitySoundStatic", 45)
SetMemoryPoolSize("FLEffectObject::OffsetMatrix", 120)
SetMemoryPoolSize("MountedTurret", 0)
SetMemoryPoolSize("Navigator", 23)
SetMemoryPoolSize("Obstacle", 667)
SetMemoryPoolSize("Ordnance", 80) -- not much ordnance going on in the level
SetMemoryPoolSize("ParticleEmitter", 512)
SetMemoryPoolSize("ParticleEmitterInfoData", 512)
SetMemoryPoolSize("PathFollower", 23)
SetMemoryPoolSize("PathNode", 128)
SetMemoryPoolSize("ShieldEffect", 0)
SetMemoryPoolSize("TentacleSimulator", 24)
SetMemoryPoolSize("TreeGridStack", 290)
SetMemoryPoolSize("UnitAgent", 23)
SetMemoryPoolSize("UnitController", 23)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:JAM\JAM.lvl", "JAM_eli")
SetDenseEnvironment("false")

-- Sound Stats

ScriptCB_EnableHeroMusic(0)
ScriptCB_EnableHeroVO(0)

voiceSlow = OpenAudioStream("sound\global.lvl", "all_unit_vo_slow")
AudioStreamAppendSegments("sound\global.lvl", "imp_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\global.lvl", "global_vo_slow", voiceSlow)

voiceQuick = OpenAudioStream("sound\global.lvl", "all_unit_vo_quick")
AudioStreamAppendSegments("sound\global.lvl", "imp_unit_vo_quick", voiceQuick)

OpenAudioStream("sound\global.lvl", "gcw_music")
OpenAudioStream("sound\tat.lvl", "tat2")
OpenAudioStream("sound\tat.lvl", "tat2")
-- OpenAudioStream("sound\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\global.lvl", "global_vo_slow")

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(1, "Allleaving")
SetOutOfBoundsVoiceOver(2, "Impleaving")

SetAmbientMusic(ALL, 1.0, "gen_amb_celebDeathmatch", 0,1)
-- SetAmbientMusic(ALL, 0.9, "all_tat_amb_middle", 1,1)
-- SetAmbientMusic(ALL, 0.1, "all_tat_amb_end", 2,1)
SetAmbientMusic(IMP, 1.0, "gen_amb_celebDeathmatch", 0,1)
-- SetAmbientMusic(IMP, 0.9, "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("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")

SetAttackingTeam(ATT)

-- Camera Stats
--Tat2 Mos Eisley
AddCameraShot(0.974338, -0.222180, 0.035172, 0.008020, -82.664650, 23.668301, 43.955681);
AddCameraShot(0.390197, -0.089729, -0.893040, -0.205362, 23.563562, 12.914885, -101.465561);
AddCameraShot(0.169759, 0.002225, -0.985398, 0.012916, 126.972809, 4.039628, -22.020613);
AddCameraShot(0.677453, -0.041535, 0.733016, 0.044942, 97.517807, 4.039628, 36.853477);
AddCameraShot(0.866029, -0.156506, 0.467299, 0.084449, 7.685640, 7.130688, -10.895234);
end
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: vehicle help!!!

Post by AQT »

You should only use TextBin if whatever you are posting exceeds the maximum character count. Your lua does not fall under that category, so you posting it on TextBin was unnecessary. Just keep this in mind for next time.

Anyway, "imp_hover_speederbike" does not exist in the stock rep.lvl, cis.lvl, and all.lvl, and loading it once from the imp.lvl would already be enough.
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3285
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: vehicle help!!!

Post by AceMastermind »

brant777 wrote:here is my lua, i have fixed the side setup after i copied it here
http://textbin.com/02m21
Remember when I typed this?
AceMastermind wrote:...You also may have to add or increase memory in the LUA depending on what vehicle type you want spawned.
A speeder bike is a hover class vehicle. Add this to your LUA since Assault mode doesn't have it by default:

Code: Select all

SetMemoryPoolSize("EntityHover", 32)
Just copy that and paste it where the other 'SetMemoryPoolSize' lines are.
Save it, munge it, test it.
Post screenshots of anything you did in ZeroEditor regarding this vehicle spawn if you're still having trouble, like from 'Object Instance' etc.
User avatar
brant777
Private Third Class
Posts: 52
Joined: Thu Mar 22, 2012 9:05 pm
Projects :: No Mod project currently.
Games I'm Playing :: SWBF2
xbox live or psn: Why? PS3 is better
Location: pennsylvania
Contact:

Re: vehicle help!!!

Post by brant777 »

i added that line, munged, still no speeders, so here are my screenshots.

http://postimage.org/gallery/lifqwxc/
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3285
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: vehicle help!!!

Post by AceMastermind »

Control regions(image #7) are optional and have no effect on vehicles spawning so you can rule that out immediately. You can also remove the 'imp_hover_speederbike' entries from 'ClassNeutral' fields in 'Object Instance' too. Associating a vehicle spawn with a control zone(command post) is also optional but leave that how it is for now. Stick with the basics until you get one vehicle spawning.
Your command post #6 is called eli_cp6, in image #4 and #5 you are having these vehicle spawns controlled by cp6 which doesn't exist.
Post your updated LUA one more time also so we can look over your edits.
User avatar
brant777
Private Third Class
Posts: 52
Joined: Thu Mar 22, 2012 9:05 pm
Projects :: No Mod project currently.
Games I'm Playing :: SWBF2
xbox live or psn: Why? PS3 is better
Location: pennsylvania
Contact:

Re: vehicle help!!!

Post by brant777 »

i did what you said and no speeders came up, but here is my lua.
Hidden/Spoiler:
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
-- Mos Eisley Hero Deathmatch (uses Space Assault rules)
-- First team to reach 100 kills wins
--

ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("ObjectiveTDM")

---------------------------------------------------------------------------
-- ScriptPostLoad
---------------------------------------------------------------------------
function ScriptPostLoad()
EnableSPHeroRules()
-- This is the actual objective setup
TDM = ObjectiveTDM:New{teamATT = 1, teamDEF = 2,
multiplayerScoreLimit = 100,
textATT = "game.modes.tdm",
textDEF = "game.modes.tdm2", multiplayerRules = true, isCelebrityDeathmatch = true}
TDM:Start()

AddAIGoal(1, "Deathmatch", 100)
AddAIGoal(2, "Deathmatch", 100)
end


---------------------------------------------------------------------------
-- ScriptInit
---------------------------------------------------------------------------
function ScriptInit()

SetMemoryPoolSize("EntityHover", 32)
SetMemoryPoolSize ("SoldierAnimation",500)
SetMemoryPoolSize ("ClothData",20)
SetMemoryPoolSize ("Combo",70) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",850) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",850) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",850) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",750) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",8000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",140) -- should be ~1x #combo -- should be ~1x #combo
--tell the game to load our loading image
ReadDataFile("dc:Load\\common.lvl")
ReadDataFile("ingame.lvl")

ALL = 1
IMP = 2
-- These variables do not change
ATT = 1
DEF = 2

SetMaxFlyHeight(800)
SetMaxPlayerFlyHeight(800)

ReadDataFile("sound\\tat.lvl;tat2gcw")
ReadDataFile("SIDE\\all.lvl",
"all_hero_luke_jedi",
"all_hero_hansolo_tat",
"all_hero_leia",
"all_hero_chewbacca")

ReadDataFile("SIDE\\imp.lvl",
"imp_hero_darthvader",
"imp_hero_emperor",
"imp_hero_bobafett",
"imp_hover_speederbike")

ReadDataFile("SIDE\\rep.lvl",
"rep_hero_yoda",
"rep_hero_macewindu",
"rep_hero_anakin",
"rep_hero_aalya",
"rep_hero_kiyadimundi",
"rep_hero_obiwan")

ReadDataFile("SIDE\\cis.lvl",
"cis_hero_grievous",
"cis_hero_darthmaul",
"cis_hero_countdooku",
"cis_hero_jangofett")

--[[ Turrets disabled
ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_chaingun_roof",
"tur_weap_built_gunturret")
SetMemoryPoolSize("MountedTurret", 15)
--]]

--ReadDataFile("SIDE\\snw.lvl", "snw_inf_wampa")

SetupTeams{
hero = {
team = ALL,
units = 12,
reinforcements = -1,
soldier = { "all_hero_hansolo_tat",1,2},
assault = { "all_hero_chewbacca", 1,2},
engineer= { "all_hero_luke_jedi", 1,2},
sniper = { "rep_hero_obiwan", 1,2},
officer = { "rep_hero_yoda", 1,2},
special = { "rep_hero_macewindu", 1,2},
},
}

AddUnitClass(ALL,"all_hero_leia", 1,2)
AddUnitClass(ALL,"rep_hero_aalya", 1,2)
AddUnitClass(ALL,"rep_hero_kiyadimundi",1,2)

SetupTeams{
villain = {
team = IMP,
units = 12,
reinforcements = -1,
soldier = { "imp_hero_bobafett", 1,2},
assault = { "imp_hero_darthvader",1,2},
engineer= { "cis_hero_darthmaul", 1,2},
sniper = { "cis_hero_jangofett", 1,2},
officer = { "cis_hero_grievous", 1,2},
special = { "imp_hero_emperor", 1,2},

},
}
AddUnitClass(IMP, "rep_hero_anakin",1,2)
AddUnitClass(IMP, "cis_hero_countdooku",1,2)

-- Level Stats
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)

local weaponCnt = 96
SetMemoryPoolSize("Aimer", 1)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 320)
SetMemoryPoolSize("ConnectivityGraphFollower", 23)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth",41)
SetMemoryPoolSize("EntityDefenseGridTurret", 0)
SetMemoryPoolSize("EntityDroid", 0)
SetMemoryPoolSize("EntityFlyer", 5) -- to account for 5 chewbaccas
SetMemoryPoolSize("EntityLight", 80, 80) -- stupid trickery to actually set lights to 80
SetMemoryPoolSize("EntityPortableTurret", 0) -- nobody has autoturrets AFAIK - MZ
SetMemoryPoolSize("EntitySoundStream", 2)
SetMemoryPoolSize("EntitySoundStatic", 45)
SetMemoryPoolSize("FLEffectObject::OffsetMatrix", 120)
SetMemoryPoolSize("MountedTurret", 0)
SetMemoryPoolSize("Navigator", 23)
SetMemoryPoolSize("Obstacle", 667)
SetMemoryPoolSize("Ordnance", 80) -- not much ordnance going on in the level
SetMemoryPoolSize("ParticleEmitter", 512)
SetMemoryPoolSize("ParticleEmitterInfoData", 512)
SetMemoryPoolSize("PathFollower", 23)
SetMemoryPoolSize("PathNode", 128)
SetMemoryPoolSize("ShieldEffect", 0)
SetMemoryPoolSize("TentacleSimulator", 24)
SetMemoryPoolSize("TreeGridStack", 290)
SetMemoryPoolSize("UnitAgent", 23)
SetMemoryPoolSize("UnitController", 23)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:JAM\\JAM.lvl", "JAM_eli")
SetDenseEnvironment("false")

-- Sound Stats

ScriptCB_EnableHeroMusic(0)
ScriptCB_EnableHeroVO(0)

voiceSlow = OpenAudioStream("sound\\global.lvl", "all_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "imp_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)

voiceQuick = OpenAudioStream("sound\\global.lvl", "all_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "imp_unit_vo_quick", voiceQuick)

OpenAudioStream("sound\\global.lvl", "gcw_music")
OpenAudioStream("sound\\tat.lvl", "tat2")
OpenAudioStream("sound\\tat.lvl", "tat2")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")

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(1, "Allleaving")
SetOutOfBoundsVoiceOver(2, "Impleaving")

SetAmbientMusic(ALL, 1.0, "gen_amb_celebDeathmatch", 0,1)
-- SetAmbientMusic(ALL, 0.9, "all_tat_amb_middle", 1,1)
-- SetAmbientMusic(ALL, 0.1, "all_tat_amb_end", 2,1)
SetAmbientMusic(IMP, 1.0, "gen_amb_celebDeathmatch", 0,1)
-- SetAmbientMusic(IMP, 0.9, "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("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")

SetAttackingTeam(ATT)

-- Camera Stats
--Tat2 Mos Eisley
AddCameraShot(0.974338, -0.222180, 0.035172, 0.008020, -82.664650, 23.668301, 43.955681);
AddCameraShot(0.390197, -0.089729, -0.893040, -0.205362, 23.563562, 12.914885, -101.465561);
AddCameraShot(0.169759, 0.002225, -0.985398, 0.012916, 126.972809, 4.039628, -22.020613);
AddCameraShot(0.677453, -0.041535, 0.733016, 0.044942, 97.517807, 4.039628, 36.853477);
AddCameraShot(0.866029, -0.156506, 0.467299, 0.084449, 7.685640, 7.130688, -10.895234);
end
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3285
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: vehicle help!!!

Post by AceMastermind »

In your LUA, move this:

Code: Select all

SetMemoryPoolSize("EntityHover", 32)
to the other MemoryPool section that comes after the vehicles are loaded.

That may or may not help but i've got nothing else to tell you, the process of adding vehicles is quite simple, really. If you can't get it working this time then try again starting from scratch paying close attention to everything you do since all it takes is a typo to break the whole thing.

Edit:
Just so you know, vehicles will spawn in Hero assault mode using instruction discussed in this thread.
Hidden/Spoiler:
Image
I chose the simplest method by just placing a vehicle spawn in the 'eli' layer and entering 'imp_hover_speederbike' in the 'ClassNeutral' field, in hero assault it doesn't really matter anyway since command posts can't be captured. I also added the memory pool and loaded the shipped imp_hover_speederbike from the imp.lvl in the LUA.

Download the map source here and tear it apart:
http://www.mediafire.com/?ynrxv7vyrjke8zv
User avatar
brant777
Private Third Class
Posts: 52
Joined: Thu Mar 22, 2012 9:05 pm
Projects :: No Mod project currently.
Games I'm Playing :: SWBF2
xbox live or psn: Why? PS3 is better
Location: pennsylvania
Contact:

Re: vehicle help!!!

Post by brant777 »

ok, i put in the exact same info as the "map" you sent out but when i try to run the map it closes out on me :x

here is my log, but is there anything i need to add from the imp_hover_speeder?
http://textbin.com/68n08

edit: i forgot to fix something in zeroeditor, but i get speeders now, thank you all for your help :)
Post Reply