since im a bit new to modding

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
GolfBulb

since im a bit new to modding

Post by GolfBulb »

how do you accuratly add vehicles
User avatar
trainmaster611
Sith Lord
Sith Lord
Posts: 1779
Joined: Thu Aug 24, 2006 5:22 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Building a railway to Coruscant
Contact:

RE: since im a bit new to modding

Post by trainmaster611 »

Read the Getting Started Doc. It talks about spawning vehicles.
GolfBulb

Re: RE: since im a bit new to modding

Post by GolfBulb »

trainmaster611 wrote:Read the Getting Started Doc. It talks about spawning vehicles.
Well i have it all right in ZE.. i think anyways, but i think my lua might be wrong ehre


ReadDataFile("sound\\yav.lvl;yav1cw")
ReadDataFile("dc:SIDE\\rep.lvl",
"rep_inf_ep2_rifleman",
"rep_inf_ep2_rocketeer",
"rep_inf_ep2_engineer",
"rep_inf_ep2_sniper",
"rep_inf_ep3_officer",
"rep_inf_ep2_jettrooper",
"rep_hover_fightertank",
"rep_hero_anakin",
"rep_hover_barcspeeder",
"rep_walk_atte")
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Post by Maveritchell »

I'd bet that you didn't add memorypools for your walker. Right above all the SetMemoryPool lines in your .lua should be something about AddWalkerType (looks like this):
AddWalkerType(0, 4) -- memory pool for droidekas (0 leg pairs, in this case set for 4 'dekas)
AddWalkerType(1, 0) -- memory pool for 1-leg pair vehicles (set to 0, AT-RT, AT-ST)
AddWalkerType(2, 0) -- memory pool for 2-leg pair vehicles (set to 0, Spider Walkers, AT-AT)
AddWalkerType(3, 2) -- memory pool for 3-leg pair vehicles (set to 2, AT-TE)
The second number sets how many can be on the field at once.
GolfBulb

Post by GolfBulb »

Maveritchell wrote:I'd bet that you didn't add memorypools for your walker. Right above all the SetMemoryPool lines in your .lua should be something about AddWalkerType (looks like this):
AddWalkerType(0, 4) -- memory pool for droidekas (0 leg pairs, in this case set for 4 'dekas)
AddWalkerType(1, 0) -- memory pool for 1-leg pair vehicles (set to 0, AT-RT, AT-ST)
AddWalkerType(2, 0) -- memory pool for 2-leg pair vehicles (set to 0, Spider Walkers, AT-AT)
AddWalkerType(3, 2) -- memory pool for 3-leg pair vehicles (set to 2, AT-TE)
The second number sets how many can be on the field at once.
So this is what it shoudl look like, tho this is jsut the droidika, it shoudl look something like this???


-- Level Stats
-- ClearWalkers()
AddWalkerType(0, 4) -- 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)

AddWalkerType(3, 2) -- 3x2 (3 pairs of legs)

And if thats right, which its prolly not, where do i put it?

BTW im only spawning one ATTE now
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Post by Maveritchell »

You don't need to duplicate the AddWalkerType line for 3 leg pairs. Other than that, provided you want to spawn 2 AT-TEs at a time and 4 droidekas at a time, you're good to go.
GolfBulb

Post by GolfBulb »

Maveritchell wrote:You don't need to duplicate the AddWalkerType line for 3 leg pairs. Other than that, provided you want to spawn 2 AT-TEs at a time and 4 droidekas at a time, you're good to go.
would i put somthiong like

instead of Speacial ---- Droideka

also put


vehicle ----- At-te?
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Post by Maveritchell »

No. Anything in a .lua that comes after two dashes ("--") is just a comment. The "special -> droideka" etc. is only there to help you know what's what.
GolfBulb

Post by GolfBulb »

Maveritchell wrote:No. Anything in a .lua that comes after two dashes ("--") is just a comment. The "special -> droideka" etc. is only there to help you know what's what.
well now im right confused i know whati have to do, but i dont knwo how to do it lol, If only it said in the docs "____________PUT THIS IN THAT PART OF YOUR lua" lol
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Post by Maveritchell »

All you need to do is change the second number in the parentheses of the AddWalkerType with the number of legpairs you want. NOTHING ELSE.

Like I said, ignore anything in the .lua after two dashes. They're just notes that the programmers made in there that don't affect the program.
GolfBulb

Post by GolfBulb »

Maveritchell wrote:All you need to do is change the second number in the parentheses of the AddWalkerType with the number of legpairs you want. NOTHING ELSE.

Like I said, ignore anything in the .lua after two dashes. They're just notes that the programmers made in there that don't affect the program.

soooo...... 1?


I am only spawing one atte so im assuming 1 :D
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Post by Maveritchell »

That would be correct. It should look like this:

AddWalkerType(0, 4) -- special -> droidekas
AddWalkerType(1, 0) -- 1x2 (1 pair of legs)
AddWalkerType(2, 0) -- 2x2 (2 pairs of legs)
AddWalkerType(3, 1) -- 3x2 (3 pairs of legs)
GolfBulb

*sighs*

Post by GolfBulb »

Maveritchell wrote:That would be correct. It should look like this:

AddWalkerType(0, 4) -- special -> droidekas
AddWalkerType(1, 0) -- 1x2 (1 pair of legs)
AddWalkerType(2, 0) -- 2x2 (2 pairs of legs)
AddWalkerType(3, 1) -- 3x2 (3 pairs of legs)

After a long day of posting, You helped me More then anyone else! tho ppl have helped me out alot aswell :D THank you so much! lol
GolfBulb

Egg gutrs has pointed out somthing for me

Post by GolfBulb »

Well i kinda left out the control region :D any hlp there? I have chekced the docs, but so far found nothing
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Post by Maveritchell »

You must've missed that whole "getting started" doc, which really has a pretty solid tutorial on adding vehicles. Regardless, as long as you don't assign a controlregion to your vehicle spawn, you don't need one. Just make sure the vehicle spawn is assigned to your REP team (there's a box that says team, and the clones are probably team 1), so that only clones can use the AT-TE.
GolfBulb

Post by GolfBulb »

Maveritchell wrote:You must've missed that whole "getting started" doc, which really has a pretty solid tutorial on adding vehicles. Regardless, as long as you don't assign a controlregion to your vehicle spawn, you don't need one. Just make sure the vehicle spawn is assigned to your REP team (there's a box that says team, and the clones are probably team 1), so that only clones can use the AT-TE.
Well it doesnt spawn
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Post by Maveritchell »

You need this line in your .lua, also, if it's not there. It goes with the rest of the memorypools:
SetMemoryPoolSize("CommandWalker", 1)
Look in the geo1c_con.lua if you're having .lua problems, especially with a Geonosis map.
GolfBulb

Post by GolfBulb »

Maveritchell wrote:You need this line in your .lua, also, if it's not there. It goes with the rest of the memorypools:
SetMemoryPoolSize("CommandWalker", 1)
Look in the geo1c_con.lua if you're having .lua problems, especially with a Geonosis map.
so i jsut throw it somwhere in here: (well after the addwalkertype ofcoarse

-- Level Stats
-- ClearWalkers()
AddWalkerType(0, 4) -- special -> droidekas
AddWalkerType(1, 0) -- 1x2 (1 pair of legs)
AddWalkerType(2, 0) -- 2x2 (2 pairs of legs)
AddWalkerType(3, 1) -- 3x2 (3 pairs of legs)
local weaponCnt = 1024
SetMemoryPoolSize("Aimer", 75)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 1024)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 32)
SetMemoryPoolSize("EntityFlyer", 32)
SetMemoryPoolSize("EntityHover", 32)
SetMemoryPoolSize("EntityLight", 200)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("EntitySoundStatic", 32)
SetMemoryPoolSize("MountedTurret", 32)
SetMemoryPoolSize("Navigator", 128)
SetMemoryPoolSize("Obstacle", 1024)
SetMemoryPoolSize("PathNode", 1024)
SetMemoryPoolSize("SoundSpaceRegion", 64)
SetMemoryPoolSize("TreeGridStack", 1024)
SetMemoryPoolSize("UnitAgent", 128)
SetMemoryPoolSize("UnitController", 128)
SetMemoryPoolSize("Weapon", weaponCnt)
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Post by Maveritchell »

Yes.
GolfBulb

Post by GolfBulb »

Maveritchell wrote:Yes.
okay, i am munging now, Well, I will be sure to put you into the read me for helping me so much, thank you, Now if only i can find the ATTE skin ha
Post Reply