adding cps and speeders

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
Predator_9094
Recruit Womprat Killer
Posts: 14
Joined: Fri Aug 22, 2008 12: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
Contact:

adding cps and speeders

Post 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.
woner11
Sith
Sith
Posts: 1361
Joined: Tue Sep 18, 2007 10:17 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: The lost world of pickels
Contact:

Re: adding cps and speeders

Post 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.
Predator_9094
Recruit Womprat Killer
Posts: 14
Joined: Fri Aug 22, 2008 12: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
Contact:

Re: adding cps and speeders

Post by Predator_9094 »

K. I'll try that and see if I can get it to work... :wink:
User avatar
(RAPTOR)BENSTWO{SGT}
Command Sergeant Major
Command Sergeant Major
Posts: 280
Joined: Tue Jul 22, 2008 3:47 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:

Re: adding cps and speeders

Post 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
Predator_9094
Recruit Womprat Killer
Posts: 14
Joined: Fri Aug 22, 2008 12: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
Contact:

Re: adding cps and speeders

Post by Predator_9094 »

So I just put in "speeder" and it will spawn a speeder??
woner11
Sith
Sith
Posts: 1361
Joined: Tue Sep 18, 2007 10:17 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: The lost world of pickels
Contact:

Re: adding cps and speeders

Post by woner11 »

Read the doc I told you and it will explain everything.
Predator_9094
Recruit Womprat Killer
Posts: 14
Joined: Fri Aug 22, 2008 12: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
Contact:

Re: adding cps and speeders

Post by Predator_9094 »

I got the cps to work. But not the vehicles.... :(
computergeek
General
General
Posts: 770
Joined: Thu Jun 07, 2007 6:26 pm
Projects :: Halo Warthog vehicle for SWBF2
Games I'm Playing :: Bioware RPGs - Halo
xbox live or psn: No gamertag set
Location: Far Far away....

Re: adding cps and speeders

Post by computergeek »

The doc is not complete
What are you trying to add?
User avatar
elfie
Field Commander
Field Commander
Posts: 931
Joined: Fri Jan 25, 2008 8:26 pm
Games I'm Playing :: no games
xbox live or psn: no live
Location: Coruscant, Jedi Temple
Contact:

Re: adding cps and speeders

Post 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.
User avatar
Culvar
1st Lieutenant
1st Lieutenant
Posts: 429
Joined: Thu Jul 10, 2008 10:36 am

Re: adding cps and speeders

Post 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.
Predator_9094
Recruit Womprat Killer
Posts: 14
Joined: Fri Aug 22, 2008 12: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
Contact:

Re: adding cps and speeders

Post 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 :?
MercuryNoodles
Jedi
Jedi
Posts: 1003
Joined: Sun Mar 12, 2006 7:16 pm
Projects :: Space - Boarding Action
xbox live or psn: No gamertag set

Re: adding cps and speeders

Post 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
User avatar
elfie
Field Commander
Field Commander
Posts: 931
Joined: Fri Jan 25, 2008 8:26 pm
Games I'm Playing :: no games
xbox live or psn: no live
Location: Coruscant, Jedi Temple
Contact:

Re: adding cps and speeders

Post 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")
Predator_9094
Recruit Womprat Killer
Posts: 14
Joined: Fri Aug 22, 2008 12: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
Contact:

Re: adding cps and speeders

Post by Predator_9094 »

What lua? There's like... 50 :(
User avatar
elfie
Field Commander
Field Commander
Posts: 931
Joined: Fri Jan 25, 2008 8:26 pm
Games I'm Playing :: no games
xbox live or psn: no live
Location: Coruscant, Jedi Temple
Contact:

Re: adding cps and speeders

Post 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. :)
Predator_9094
Recruit Womprat Killer
Posts: 14
Joined: Fri Aug 22, 2008 12: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
Contact:

Re: adding cps and speeders

Post by Predator_9094 »

I did read the documentations. NVM. I figure it out on my own...
Post Reply