Spawning vehicles

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
Darth-Derkie
1st Lieutenant
1st Lieutenant
Posts: 453
Joined: Thu Feb 03, 2005 6: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: The Netherlands

Spawning vehicles

Post by Darth-Derkie »

I'm having trouble spawning vehicles. ATTE's are spawning, but other vehicles don't.

.lua:
function ScriptInit()

ReadDataFile("ingame.lvl")


SetMaxFlyHeight(90)
SetMaxPlayerFlyHeight (90)

SetMemoryPoolSize ("ClothData",20)
SetMemoryPoolSize ("Combo",50) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",650) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",550) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",6000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",100) -- should be ~1x #combo

ReadDataFile("sound\\geo.lvl;geo1cw")
ReadDataFile("dc:SIDE\\cis.lvl",
"cis_fly_geofighter")
ReadDataFile("SIDE\\rep.lvl",
"rep_inf_ep3_rifleman",
"rep_inf_ep3_rocketeer",
"rep_inf_ep3_engineer",
"rep_inf_ep3_sniper",
"rep_inf_ep3_officer",
"rep_walk_atte", .spawning
"rep_fly_gunship", .NOT spawning
"rep_inf_ep3_jettrooper",
"rep_hover_fightertank",
"rep_hero_macewindu",
"rep_hover_barcspeeder")
ReadDataFile("SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_inf_sniper",
"cis_inf_officer",
"cis_inf_droideka",
"cis_hero_countdooku",
"cis_tread_hailfire", .NOT spawning
"cis_walk_spider", .NOT spawning
"cis_hover_aat")
ReadDataFile("SIDE\\geo.lvl",
"gen_inf_geonosian")

Memorypools:

-- Level Stats
-- ClearWalkers()
AddWalkerType(0, 4) -- special -> droidekas
AddWalkerType(2, 3) -- 2 spider walkers with 2 leg pairs each
AddWalkerType(3, 0) -- 2 attes with 3 leg pairs each
local weaponCnt = 1024
SetMemoryPoolSize("Aimer", 75)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 1024)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 32)
SetMemoryPoolSize("EntityFlyer", 32)
SetMemoryPoolSize("EntityHover", 64)
SetMemoryPoolSize("EntityLight", 200)
SetMemoryPoolSize("EntityFlyer", 36)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("EntitySoundStatic", 32)
SetMemoryPoolSize("MountedTurret", 180)
SetMemoryPoolSize("Navigator", 128)
SetMemoryPoolSize("Obstacle", 1024)
SetMemoryPoolSize("PathNode", 1024)
SetMemoryPoolSize("SoundSpaceRegion", 64)
SetMemoryPoolSize("TreeGridStack", 1024)
SetMemoryPoolSize("UnitAgent", 128)
SetMemoryPoolSize("UnitController", 128)
SetMemoryPoolSize("Weapon", weaponCnt)
SetMemoryPoolSize("CommandWalker", 2)

Screenshot of a spawn point for the hailfire:

My picture uploading site is offline, I'll post screenshots later
Last edited by Darth-Derkie on Sat Feb 25, 2006 1:44 pm, edited 1 time in total.
Darth-Derkie
1st Lieutenant
1st Lieutenant
Posts: 453
Joined: Thu Feb 03, 2005 6: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: The Netherlands

Post by Darth-Derkie »

Ok settings in Zeroedit:
ImageImageImage

Control region:
Image

I used imageshack... I like http://www.maj.com much better, faster in uploading.
User avatar
Dragonum
2nd Lieutenant
2nd Lieutenant
Posts: 405
Joined: Tue Nov 16, 2004 4:08 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by Dragonum »

i think the problem is, that you CP is called CP13 and in the vehicle spawn you write cp13.
Darth-Derkie
1st Lieutenant
1st Lieutenant
Posts: 453
Joined: Thu Feb 03, 2005 6: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: The Netherlands

Post by Darth-Derkie »

No I renamed them both again and gave them the exact same name, but still no Hailfire, or Spider Walkers, or Gunships.
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Post by Teancum »

Hit the 'page down' button in the 'object instance' window and make sure you filled out both the ATK and DEF values for each faction.
uknightbreed

Post by uknightbreed »

hi all ,my first post ! concerning the vehicle spawn,i had the same trouble !
in your coding ,you have '-- ClearWalkers() '.take off the '-- ' leaving just clear walkers.
hope that sorts it.
im a noob myself to this ,so not sure if im right ,but thats my guess.
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Post by Teancum »

Actually, ClearWakers() removes all walkers from the map.

Welcome to GT, Uknightbreed.
uknightbreed

Post by uknightbreed »

also the coding after ......

on my map script i have.........

AddWalkerType(1, 4) -- 1x2 (1 pair of legs)
AddWalkerType(2, 4) -- 2x2 (2 pairs of legs)
AddWalkerType(3, 1) -- 3x2 (3 pairs of legs)

which works fine.i havnt typed in the vehicle names on this script part like you.

again ,i may not be right as im a noob,but its works for me.
Darth-Derkie
1st Lieutenant
1st Lieutenant
Posts: 453
Joined: Thu Feb 03, 2005 6: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: The Netherlands

Post by Darth-Derkie »

I now have the values put in both ATK and DEF, but still they're not spawning
:(

I had only put in DEF, because CIS is the DEF team, and republic ATK.
Darth-Derkie
1st Lieutenant
1st Lieutenant
Posts: 453
Joined: Thu Feb 03, 2005 6: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: The Netherlands

Post by Darth-Derkie »

Ok, I fixed it! :D:D:D

I saw that the ATTE spawn points were assigned to team 1, republic. The other were assigned to team 0, nothing. So I assigned all spawn points to a team, and it worked!

Image
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Post by Teancum »

You do need to fix the memory pool for the AT-TE's though so we don't crash.

AddWalkerType(3, 0) --change the last number to the number of AT-TE's in the map (the first number referers to the pairs of legs a walker has)
User avatar
squipple
1st Lieutenant
1st Lieutenant
Posts: 420
Joined: Tue Jun 28, 2005 7:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Contact:

Post by squipple »

Is there a list of all the zeroedit vehicle names somewhere?
Leviathan
Missing Jedi Admin
Posts: 3277
Joined: Fri Nov 12, 2004 2:54 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by Leviathan »

squipple, as far as I know, such a list hasn't been written yet...
However, you can do it yourself by looking at the following path : "[Side's label]\REQ". There, you'll find vehicles' *.REQ files, whose label respects this synthax : "[Side's prefix]_[Class of vehicles ("fly", "hover", "walker", etc...)]_[Name of the vehicle]"
Post Reply