How to get a vehicle in game

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
Typoe99
Private
Posts: 32
Joined: Sat Dec 01, 2007 6:07 pm

How to get a vehicle in game

Post by Typoe99 »

Hey Im working on the DMI map and I have a vehicle in my lot only problem is i cant figure out how to make it show in game. can anyone help me?
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: How to get a vehicle in game

Post by DarthD.U.C.K. »

*cough*link*cough*
Aman/Pinguin
Jedi
Jedi
Posts: 1104
Joined: Tue Jan 30, 2007 6:04 am
Projects :: Inactive
Location: Germany

Re: How to get a vehicle in game

Post by Aman/Pinguin »

*cough*wrong forum*cough*
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: How to get a vehicle in game

Post by DarthD.U.C.K. »

*cough*why?*cough*

its more modding than dmi related in my opinion
or xsi related, if the vehicle is selfcreated and the hardpoints are incorrect (as example) :P
Aman/Pinguin
Jedi
Jedi
Posts: 1104
Joined: Tue Jan 30, 2007 6:04 am
Projects :: Inactive
Location: Germany

Re: How to get a vehicle in game

Post by Aman/Pinguin »

o.O Lol forget my Post, I thought it was the SWBF2 General Forum... o.ô Weird.
obiboba3po
2008 Most Technically Challenging Avatar
Posts: 2376
Joined: Tue Feb 12, 2008 7:46 pm
Projects :: No Mod project currently.
Games I'm Playing :: League of Legends
xbox live or psn: No gamertag set
Location: NJ, USA

Re: How to get a vehicle in game

Post by obiboba3po »

er...just me, i dont like 2-3 links inside a link lol. so...here:
Eagle Eye wrote:I wrote a little tut for you:
EDIT: This tutorial is only for adding existing vehicles from the assets and not from own sides
1) Open your map in ZE
2) click on the Object tag under edit mode
3) open the "com_item_vehicle_spawn.odf" under data_MODID/common/odfs/com_item_vehicle_spawn.odf
4) place the vehspawn somewhere on you map and click on it.
5) now at the left side, u see somewhere under label "team", choose the team of the vehicle u place.
U can see what team the rep or cis is in the lua: (by example this is the c con lua:)
Hidden/Spoiler:
-- REP Attacking (attacker is always #1)
REP = 1;
CIS = 2;
-- These variables do not change
ATT = REP;
DEF = CIS;
So if you want to place a vehicle for using in the rep team, u have to choose 1 in the team field.
6) Now, before we filling in the object instance box at the right side, we need to create the needed region for the vehicle:
Go to "region" in the edit mode and create a new box shaped region called (cp name)+_control. example: cp1_control. Alse paste the same name into the class properties beside the region ID.
Place this region around the vehicle spawn.

Now click on the cp u choosed (in the example: cp1) and where the vehicle belongs to. In the object instance box of this cp u should have the captureregion, controlregion, spawnpath...etc. We placed a control region for the vehicle so we will fill in the control region the name we gived to the region. cp1_control in the example.

7) Click on the vehicle spawn and u see in the right object instance box "controlzone". Fill here only the name of the cp in (ex: cp1).
Go back to your lua and look for the team u choosed for the vehicle, the defending (DEF) or attacking (ATT)team.
So the rep is the attacking team and the cis is the defending team.
Hidden/Spoiler:
-- REP Attacking (attacker is always #1)
REP = 1;
CIS = 2;
-- These variables do not change
ATT = REP;
DEF = CIS;
So go back to the object instance of the vehicle and go down in the box. If you choosed now for example the rep team (ATT) go in the box looking for ClassRepATK. Fill now the name of the vehicle in this field.
In this tutorial we gonna use vehicles from the assets.
So for know the vehicle name, go to BF2_ModTools\assets\sides\ the side u choose \ inside this side open the req file (rep.req for my example). Now u see a whole list of items used in the side. I will choose now the rep_fly_gunship_sc as my vehicle.
8) The last step you have to do is calling the lua wich vehicle you want to use.
Go to your lua script. I work in my example with rep and cis so i have to go in the c_con.lua script.
You will now see the following lines:
Hidden/Spoiler:
ReadDataFile("sound\\yav.lvl;yav1cw")
ReadDataFile("SIDE\\rep.lvl",
"rep_inf_ep3_rifleman",
"rep_inf_ep2_rocketeer",
"rep_inf_ep3_engineer",
"rep_inf_ep3_sniper_felucia",
"rep_inf_ep3_officer",
"rep_inf_ep3_jettrooper",
"rep_hero_anakin")

ReadDataFile("SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_inf_sniper",
"cis_inf_officer",
"cis_inf_droideka",
"cis_hero_darthmaul")
Now add the vehicle name in this line:
Hidden/Spoiler:
ReadDataFile("sound\\yav.lvl;yav1cw")
ReadDataFile("SIDE\\rep.lvl",
"rep_inf_ep3_rifleman",
"rep_inf_ep2_rocketeer",
"rep_inf_ep3_engineer",
"rep_inf_ep3_sniper_felucia",
"rep_inf_ep3_officer",
"rep_inf_ep3_jettrooper",
"rep_hero_anakin",
"rep_fly_gunship_sc")

ReadDataFile("SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_inf_sniper",
"cis_inf_officer",
"cis_inf_droideka",
"cis_hero_darthmaul")
Do not forget to add the , if u place the vehicle after another name like in my example.
9) Munge the map and test!
Thats it! I hope this will help you and if someone found something wrong or a thing i forgot please post so i can update my tutorial!
NOTE: I'm dutch so i hope you can understand it :wink:
Post Reply