Page 1 of 1

Help me with adding vehicles plz!

Posted: Fri Aug 15, 2008 9:55 pm
by totallytoenails
Need serious help, plz. I try making maps, and they're fine, until I add a vehicle. Plz walk me through placing vehicles. I need every bit of info, plz. :plokoon:

Re: Help me with adding vehicles plz!

Posted: Fri Aug 15, 2008 10:01 pm
by computergeek
Welcome to Gametoast!
So you need help with adding vehicles?
Read the Getting Started Documentation in the documentation folder of your BF2_Modtools folder
It will tell you exactly how to add vehicles

Re: Help me with adding vehicles plz!

Posted: Fri Aug 15, 2008 10:26 pm
by totallytoenails
I did, and I did what it said, and it didn't work... :(

Re: Help me with adding vehicles plz!

Posted: Fri Aug 15, 2008 10:31 pm
by obiboba3po
ya welcome to GT, hope you have a good time here. anyways, thats cause the tut is incomplete. heres what u need, i posted this a while back.
obiboba3po wrote: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: