Page 1 of 1

adding cps and speeders

Posted: Fri Aug 22, 2008 12:36 pm
by Predator_9094
Hi. I'm new to this forum and modding.(Got modding tools 3 days ago). Can someone plz help me with adding cps and speeders to my map.

Re: adding cps and speeders

Posted: Fri Aug 22, 2008 1:01 pm
by woner11
First, welcome to gametoast! Hope you enjoy it here! :wink:
The answer to your question is in the getting started doc in the modtools, it explains it all.

Re: adding cps and speeders

Posted: Fri Aug 22, 2008 1:03 pm
by Predator_9094
K. I'll try that and see if I can get it to work... :wink:

Re: adding cps and speeders

Posted: Fri Aug 22, 2008 1:26 pm
by (RAPTOR)BENSTWO{SGT}
Also when you get mod tools working you need to go to BF2_modtools/data_abc/common/odfs. In there you will find com_blg_controlzone. That is the CP. Also you will find com_item_vehicle_spawn. When you put it in zero edit there is a section to put the name of the vehicle you want in. Last off welcome to GT! :D

Re: adding cps and speeders

Posted: Fri Aug 22, 2008 1:28 pm
by Predator_9094
So I just put in "speeder" and it will spawn a speeder??

Re: adding cps and speeders

Posted: Fri Aug 22, 2008 1:38 pm
by woner11
Read the doc I told you and it will explain everything.

Re: adding cps and speeders

Posted: Fri Aug 22, 2008 4:09 pm
by Predator_9094
I got the cps to work. But not the vehicles.... :(

Re: adding cps and speeders

Posted: Fri Aug 22, 2008 7:26 pm
by computergeek
The doc is not complete
What are you trying to add?

Re: adding cps and speeders

Posted: Fri Aug 22, 2008 7:28 pm
by elfie
Predator_9094 wrote:I got the cps to work. But not the vehicles.... :(
Add the vehicles to your lua under the side in the setupteams section.

Re: adding cps and speeders

Posted: Fri Aug 22, 2008 7:34 pm
by Culvar
Plus supping "Speeder" in the spawn field won't work. You need to put "imp_hover_speederbike" or "rep_hover_barcspeeder" depending on which you want.

Re: adding cps and speeders

Posted: Sat Aug 23, 2008 6:48 am
by Predator_9094
Are the speeder files in the "common" folder. Cause I can't find them. Where are they?

elfie: What do I type in the lua file? Don't know where or what to put in it :?

Re: adding cps and speeders

Posted: Sat Aug 23, 2008 10:14 am
by MercuryNoodles
Speeder files are part of a side, but you don't need to mess with those files unless you're making a custom side. You can just load a stock speeder through the lua. As to how, read below.

All of this is either in the docs that came with the tools, or in various tutorials and help threads here. To make it easier, start with the intro material and docs that are relevant to what you're doing, like Getting Started, Mission LUA Guide, game, ZeroEditor guide, and it wouldn't hurt to look over Jedi Creation as well to see how sides are setup. Beyond that, look through the modding FAQ stickied in this subforum for further info. Then, if you're getting stuck, or whathaveyou, bring the question here.

I know it's a pain to look at those things, but we all have to go through it. Once you do that, you'll have taken your first step into a larger world.

*looks around* What? :P

Re: adding cps and speeders

Posted: Sat Aug 23, 2008 10:36 am
by elfie
I am 150% sure this is in the docs, that is how I learned the basics, not GT. First you need a control region:
Documentation wrote:First, click on New Group in the region tool panel. This time, we’re going to make a box region, so under Shape, click Box.

Now just click where you want to place the region. Note: It should also be slightly sunken into the terrain

Select the region (click on Select Region and then click to select) and enter the name “cp2_control” into the Class Properties and Region ID fields, the same as we did on the Capture Region.

Now we’re going to need to scale the region up a bit. The region should already be selected. Press and hold the Z key. You’ll see a set of axis identical to the ones that you saw when moving objects, and regions. But now, the Left, Middle, and Right mouse buttons will scale the region on each axis. Scale the region up about twice as big as it is to begin with. On the X and Y axis, while leaving the height the same. Center this new region over the CP as well.
Placing a vehicle spawn and assigning a vehicle to it:
Documentation wrote:First, you’ll need to go to Object edit mode. Once in object edit mode, click on Browse as pictured below:



This will open the browse window. Browse to \BF2_ModTools\data_ABC\common\odfs\com_item_vehicle_spawn.odf

Once you select this object, you will be brought back to the Object edit mode. To place the vehicle spawn, click on Place and simply click on the terrain where you want to place your vehicle spawn. You should now have an object in your level that looks like this:



This is your vehicle spawn. The arrow indicates which direction the vehicle will be facing when it spawns in.

Select your vehicle spawn (click Select and then click on the vehicle spawn) and you’ll see the Object Instance box appear to the right. It looks something (exactly like, actually) this:


The first parameter, ControlZone refers to what CP this vehicle is associated to. The value that should be entered here is the name of the CP, NOT THE NAME OF THE CONTROL REGION, that you want this vehicle to be associated to. For example, cp1, or cp5. NOT cp1_control, or cp5_control.

The second parameter specifies how many of these vehicles you want to spawn from this vehicle spawn. I recommend always keeping this set to 1, and just add more vehicle spawns if you want more vehicles at a given CP.

ExpireTimeEnemy specifies how long a vehicle will sit idle, un-manned once the enemy has taken over the associated CP, before the vehicle will begin to decay.

ExpireTimeField specifies how long a vehicle will sit idle, un-manned in the field once it has left it’s control region.

DecayTime specifies how long a vehicle will take to decay and self-destruct once the expire time has been reached.

The vehicle that will spawn from this vehicle spawn is determined by what you enter in the Class fields. For example, if you wanted this vehicle spawn to spawn a rebel combat speeder when the rebels own this CP, you would enter all_hover_combatspeeder into the ClassAllATK field. This is assuming that the rebels are set as team 1. Whether a team is ATK or DEF is determined by what team they are set as. ATK will spawn vehicles when that team is set as team 1, DEF will spawn vehicles if that team is set as team 2.

Note: 2 values that are no longer used are ClassHisATK and ClassHisDEF. Entering values in this field will accomplish nothing, so….just don’t bother.

If you click Page DN you’ll see that there are more Class fields. As another example, if you want this vehicle spawn to spawn an ATST on a map where the rebels are team 1, and the empire is team 2, then you would click Page DN and enter imp_walk_atst into the ClassImpDEF field.

You can also have vehicle spawns spawn vehicles when either team owns the CP. If this is the case, you could enter both all_hover_combatspeeder under ClassAllATK AND imp_walk_atst under ClassImpDEF.

Additionally, you can use a vehicle spawn to spawn vehicles for both eras, you just need to specify the vehicle classes in the corresponding Class parameters.
Next add the vehicle spawn to your lua:
Hidden/Spoiler:
ReadDataFile("sound\\end.lvl;end1gcw")
ReadDataFile("dc:SIDE\\all.lvl",
"all_inf_rifleman",
"all_inf_rocketeer",
"all_inf_sniper",
"all_inf_engineer",
"all_inf_officer",
"all_inf_wookiee",
"all_hero_leia",
"all_fly_kwing",
"all_hero_obiwan")

ReadDataFile("dc:SIDE\\imp.lvl",
"imp_inf_rifleman",
"imp_inf_rocketeer",
"imp_inf_engineer",
"imp_inf_sniper",
"imp_inf_officer_gray",
"imp_inf_dark_trooper",
"imp_hero_bobafett",
"imp_hero_darthvader",
"imp_fly_trooptrans")

Re: adding cps and speeders

Posted: Sat Aug 23, 2008 12:19 pm
by Predator_9094
What lua? There's like... 50 :(

Re: adding cps and speeders

Posted: Sat Aug 23, 2008 3:11 pm
by elfie
Predator_9094 wrote:What lua? There's like... 50 :(
There is not 50, there is only a few, I don't understand why you are asking us questions that you would already know the answer to if you read the documentation like everybody else has to. Then read the FAQ, then as a last resort you may ask us questions, but don't ask us something that would have already been answered if you read the tutorials, that is what they are there for. :)

Re: adding cps and speeders

Posted: Sat Aug 23, 2008 7:35 pm
by Predator_9094
I did read the documentations. NVM. I figure it out on my own...