project reality header
Go Back   Project Reality Forums > PR:BF2 Mod Forums > PR:BF2 Community Modding > Modding Tutorials
17 Jan 2021, 00:00:00 (PRT)
Register Developer Blogs Project Reality Members List Search Today's Posts Mark Forums Read
Modding Tutorials Information and tutorials related to modding BF2.

Thread Tools Display Modes
Old 2011-01-24, 22:05   #1
Retired PR Developer
Supporting Member

AFsoccer's Avatar
Default AASv4 Game Mode

This tutorial will explain how to set up control points on your map using AASv4 (Assault and Secure version 4).

Tools Needed:

BF2 Editor


A map that has at least one gameplay layer created (i.e. AAS 64 etc.)

Creating combat zones, object spawners, and spawn points won't change from previous AAS versions so that won't be covered in this tutorial. For basic layer information, refer to: [Map Tutorial] Layers (16, 32 And 64 Size Maps etc) and Creating a Basic Level - BFEditor

Setting up your Teams

The CP capture order always starts with Team 1. So the closest control point to Team 1's main will be CP#1 and working it's way out from there. So the first thing you'll want to do it establish which team will be Team 1. You do this by editing the init.con, which is found in your map's main folder. Open it up and you'll see something like this:

rem *** Generated by BF2Editor ***
if v_arg1 == BF2Editor

run Heightdata.con
run Terrain.con BF2Editor
run StaticObjects.con BF2Editor
run Sounds.con
run Sky.con BF2Editor
run Editor/GamePlayObjects.con host
Undergrowth.load Levels\yourmapname\
run Overgrowth/Overgrowth.con
Overgrowth.editorEnable 1
run AmbientObjects.con BF2Editor
run Water.con
run TriggerableTemplates.con BF2Editor


run Heightdata.con
run Terrain.con v_arg2
run Sky.con v_arg2
run CompiledRoads.con
run Sounds.con
run tmp.con v_arg1
Undergrowth.load Levels\yourmapname\
run Overgrowth/Overgrowth.con
run Overgrowth/OvergrowthCollision.con
run AmbientObjects.con
run Water.con
run TriggerableTemplates.con
run Fields.con


rem ------------------------------- LevelSettings -------------------------------
rem -----------------------------------------------------------------------------

run ../../Factions/faction_init.con 1 "gb"
run ../../Factions/faction_init.con 2 "ch"

rem -----------------------------------------------------------------------------

gameLogic.setBeforeSpawnCamera -728/24/-1075 -124.292/-2.23791/0

if v_arg1 == BF2Editor
LevelSettings.CustomTextureSuffix "Woodland"
texturemanager.customTextureSuffix "Woodland"
rem -----------------------------------------------------------------------------

GameLogic.MaximumLevelViewDistance 800

rem -----------------------------------------------------------------------------

gameLogic.setDefaultNumberOfTicketsEx 16 1 50
gameLogic.setDefaultNumberOfTicketsEx 16 2 50
gameLogic.setDefaultNumberOfTicketsEx 32 1 250
gameLogic.setDefaultNumberOfTicketsEx 32 2 250
gameLogic.setDefaultNumberOfTicketsEx 64 1 300
gameLogic.setDefaultNumberOfTicketsEx 64 2 300
gameLogic.setDefaultNumberOfTicketsEx 128 1 50
gameLogic.setDefaultNumberOfTicketsEx 128 2 50
gameLogic.setDefaultTimeToNextAIWave 8
gameLogic.setTicketLossAtEndPerMin 1000
gameLogic.setTicketLossPerMin 1 20
gameLogic.setTicketLossPerMin 2 20
Scroll to the section that starts with "rem ------------------------------- LevelSettings -------------------------------". That's where your teams are defined. The easiest thing to do is to check other maps' init.con for the team abbreviations that you want to use. Place Team 1 on the first line and Team 2 on the second, then re-save.

Placing Control Points (CPs):

As a quick refresher to the layer tutorial, here's how to create control points (CPs):

1. Open BF2 Editor in it's "Level" function.
2. In the right column of the Editor screen, select the layer you'd like to add a control point to.
3. Move the camera around in the map and locate where you want to put your control point.
4. Right-click on the spot where you want to place the control point and choose "Create ControlPoint" from the menu that pops up.
5. A window will pop up prompting you for a name.

PR uses a specific naming convention. Ignore the suggestion that the editor recommends and use this naming template:


Example: "cpname_kashan_desert_aas64_northvillage"

"cpname" = literally always just the text "cpname"

"nameofthemap" = the name of the map, if spaces are needed use _

"gamemode" = the game mode and number. Valid values are:
followed by either 16, 32, 64 without a space

"nameofcpalloneword" = literally all one word of the cpname. 
No other characters except alpha characters should be used.

ALL of this needs to be lower case.  Do this each time you want a control point.

Using AASv4, you have a lot more options at your disposal on how you want your control points to show up in game. The order and choice of CPs will depend on the SupplyGroupId in the control point's tweaker bar (highlighted in yellow below).

In AASv4, we'll be changing the default SGID of -1 to a specific number, depending on what you want to do.

AASv4 gives you a LOT more options than ever before, so I'll explain each option and how to set up the SGIDs using an imaginary PR map.

Main Bases

As you probably know, in PR the main bases are not usually in play. They are a safe haven for spawning, vehicle repairs, etc. In order to set up AAS, it's important to decide how you want your main bases to be set up. The most common is to make them uncappable and assigned to the team that has a main base there. So looking at the tweaker bar above, you would set:

Team = 1 (or 2)
Check the box for "unabletochangeteam"

SGIDs for main bases are as follows:

Team 1 = 1
Team 2 = -1

The only change to this is if you want a main base to be cappable. Then you would assign it a unique SGID based on the tutorial that follows.

You can also delete the SGID for Team 2's main if you like by opening the text file and deleting the line "ObjectTemplate.supplyGroupId -1".

Basic Randomization

This is best for smaller (1km and 2km) maps with few control points.

CPs are assigned a 2-digit SGID (AB) where:

A = Its order in the sequence (starting nearest to Team 1's main)
B = If more than one CP has the same A number, B tells the computer how many to pick to be in play.

If you don't want a control point to be randomized, assign it a unique "A" digit and then make "B" a zero.


In the photo, Team 1 is located on the carrier and Team 2's main is the hashed area. The CP layout is as such:

CP#1: Village
CP#2: Bridge and Farm both have an SGID number starting with 3, so the computer will look at the second (B) digit to determine that the mapper only wants 1 of them to be picked. This will happen randomly, so sometimes Bridge will show up and sometimes Farm will.
CP#3: Junction

As you can see, this is a basic layout. Team 1 will have to capture Village first, then either Farm or Bridge, then lastly Junction. Team 2 has to attack Junction first. Their second flag will be either Farm or Bridge, then their last flag will be Village.

Now let's say you want both Farm and Bridge to be picked. By changing the "B" digit from 1 to 2, the computer will now pick both CPs as CP#2. This means that both CPs must be held by a team before it can capture the next flag in the sequence. Be careful using this option as it's difficult to defend two CPs while attacking a third.

AASv4 Attack Routes

Attack routes are the heart and soul of AASv4. Basically what you'll be doing is adding a third digit to the SupplyGroupId, so now you'll have "ABC", where:

A = Its order in the sequence (starting nearest to Team 1's main)
B = If more than one CP has the same A number, B tells the computer how many to pick to be in play.
C= The route it belongs to

The third digit (or route number) tells the computer that before it does anything else, it should pick a route to use. Since I think showing is better than telling, let me show you some examples:

Here you'll see two routes, Blue and Green. The first thing you should notice is that the SGIDs have a third digit, where the Green route is designated as route #1 and the Blue route is designated as route #2. When the map loads, the computer will see that your SGIDs have a third digit and will randomly pick a route. It may be Blue for one game and Green the next.

You can have up to 9 routes on your map, which should be plenty.

Ok, so that's the basic route set-up. Using this information, you can now incorporate more complexity into your routes. For example, you can add random flags (just like you did in the first part of this tutorial):

In the above example, I've added another CP to the Blue route called Village. This new CP has the same SGID as Port, so let's break it down by its ABCs:

A = 2, designating it second in the sequence. No change here.
B = 1. Since Village and Port both start with an A = 2, the computer needs to know how many of the flags should show up. In this case, setting B = 1 tells the map to pick just one.
C = 2, the route designation.

So, if the computer picks route #2, it will then pick either Port or Village (and not both) since you assigned B = 1.

If you are feeling comfortable with how all that works, let's move on.

Same Area, Different CPs

One of the features of AASv4 that has never been available before is having multiple CPs for the same area. This is possible by assigning the CPs to different routes.

So why would we want to do this, you ask?

Building on the Blue and Green route examples above, let's start with a simple example. Say you really like the "Village" CP area. It's fun, is in a great location, and will make for great battles... so you want it to be in more than one route. Solution: create another CP.

Yes, that's right. Just create another CP and name it something slightly different. To avoid confusion, you can place the route number in the CPs name, such as:

The Green route "Village" would be: cpname_mapname_aas64_1village"
The Blue route "Village" would be: cpname_mapname_aas64_2village"

Simple! Now you can move/edit the CPs within Editor so they have the exact same radius or make them slightly different. Now regardless if route #1 or route #2 gets picked, Village will be a possible CP.

Another reason you may want more than one CP for an area is to offer variety. This is a little more difficult to explain, but I'll try.

Firstly, I've made the "village" into a "city" (forgive my photoshopping abilities). By using the multiple CP option, I can now make it so that if route #3 (Orange) is picked, the players may see a 150m North City, 150m South City, or a 300m Entire City flag. The computer will pick just one because B=1 and it won't interfere with the CPs in other routes because C=3 (designating it as route 3).

Now putting it all together, you get:

You can see why it will be important to properly name your CPs so it includes the route number... but you can also see the amazing possibilities AASv4 gives you.

Using One CP on All Routes

Depending on your map layout, you may want to include one CP on all of your routes. For example, here is an old Fools Road AASv4 set-up:

You can see that CP#1 and CP#5 are on all of the routes. This often makes sense when the map has a final location that the armies have a "mission" to capture or defend... such as a missile silo, airfield, etc. When this is the case, you don't have to create separate CPs for each route but can instead assign it a single digit. If the CP is at the beginning of the route, it would have an SGID = 1. You would then set both main bases to SGID = -1 since neither is in a route. Basically, here's the way to look at it: The computer needs to see an SGID = 1, so if your main base fulfills that role then great. If it doesn't, then the first flag needs to be SGID = 1.

Ok, so what if your shared CP is at the end of the route? Now it gets slightly more complicated. You can either change your team assignments in the init.con so that it becomes the first flag, but that may not be possible based on the map layout. The second option is to assign it a single digit SGID that ends all of the routes. The drawback to option 2 is that all of your routes must end at the same number. For example, when you look at Fools Road, all of the routes end at flag #5.

It's important to note here that you can't have a gap in the sequence. So if Fools Road had a route that only had SGIDs of 1, 205, 305, and 5 then there would be a gap between 305 and 5 and it wouldn't work. The map would load just fine, but neither team could cap the other out.

A Few More Things about Main Bases
  • I know we've talked about main bases several times in this tutorial already, but there are still a few things to cover. If you make one (or both) of your main bases part of a route, then they must be single digit SGIDs with Team 1 = 1 and Team 2 = the last number in the routes. The reason behind this is that all of your spawn points and objectspawners are linked to this CP and having the spawners assigned to one route causes a lot of issues if that route isn't picked. So the best thing to do is ensure your spawners are tied to a CP that isn't cappable and is not assigned to a route. The simplest way to do this is to assign Team 1 = 1 and Team 2 = -1. If you want your spawners to be associated with a CP that is cappable, so that the team loses it's ability to spawn, then you must give it a single digit SGID so that it is part of all routes.

  • With the exception of CnC mode, 99% of main bases should be marked with a CP. This let's players know where the main bases are and thus where the domes of deaths are. So if your main is not cappable and not part of your routes, you'll still need to make sure the CP is marked on the map.

Looking back at the Fools Road example, you could do it either way. You could set all of your spawners to the closest flag, which means it's cappable by the enemy and when it's lost, no one can spawn or repair, etc. Or you can create a uncappable CP for your spawns that is always active.

Flag Names on Minimap

When your map is nearly final (or ready for play testing), there are two more steps that you'll need to take:

Adding flag names to the localization file: Since you don't want players to see the confusing flag name that you used above (ie. cpname_map_aas64_flagname), you'll want to follow this tutorial.

Ensuring flag name doesn't go off the minimap: Once you've updated your localization file, jump in game and check to make sure the flag names don't go off the minimap. This is especially common with main bases and flags near the map edge with long names. To correct this, go back into editor and edit the "MinimapNameOffset" values:

If you click on the + sign, it will expand so you can change the X value (left/right) and Y value (up/down). This is typically trial and error getting the value just right so you will likely have to go in-game several times to see how it looks.

Verifying your routes

We got a tool to verify these routes and other things on nice little overview images.

Like this:

It has a nice set of options to tweak it to your settings.

I'm sure you'll be able to figure it out how to get it to work. If not feel free to ask further here.

Download link:

In Closing

Have fun and experiment. These new capabilities should allow you to create more focused fighting, more strategic points of interest, more logical avenues of attack, more variety, and so much more!

If you have any questions, please post them here.


AFsoccer is offline
Last edited by [R-DEV]Mineral; 2017-07-15 at 12:09.. Reason: Re-uploaded missing images
Reply With Quote
Old 2011-01-25, 21:10   #2
Supporting Member

Shovel's Avatar
Default Re: [Map Tutorial] AASv4

ITS UP!!!!



Shovel is offline Reply With Quote
Old 2011-01-27, 15:04   #3
Retired PR Developer

VapoMan's Avatar
Send a message via MSN to VapoMan
Default Re: [Map Tutorial] AASv4

1. If I put AASv4 Attack Routes in my map will it work in this current version of PR?

2. In my map I want to have a starting flag for each team that will be the start and finish of every attack route. Will I have to make several flags at those points for every attack route or can they be seperate like the main bases?

EDIT: im asking 2 because I have spawn points and objects spawners connected to them, but I guess I can just use the same control point ID for all of them?

"Eight glorious sides and eight stunning angles!"
VapoMan is offline
Last edited by VapoMan; 2011-01-27 at 15:11..
Reply With Quote
Old 2011-01-27, 15:14   #4

sylent/shooter's Avatar
Default Re: [Map Tutorial] AASv4

Yes i believe all servers have had a hotfix with the new python code

Killing the enemy sylently
sylent/shooter is offline Reply With Quote
Old 2011-01-28, 01:34   #5
Retired PR Developer
Supporting Member

AFsoccer's Avatar
Default Re: [Map Tutorial] AASv4

Originally Posted by VapoMan View Post
1. If I put AASv4 Attack Routes in my map will it work in this current version of PR?
I've been told that the servers have the new python code, but I'm not 100% sure. If you're asking because you want to set up a dedicated server using Hamachi or something, then it won't work unless you install the python code to mods/pr/python using the .zip file. AASv4 is completely backwards compatible with AASv3 so you'll still be able to play maps on PR servers, but make a backup of your PR folder just in case.

2. In my map I want to have a starting flag for each team that will be the start and finish of every attack route. Will I have to make several flags at those points for every attack route or can they be seperate like the main bases?

EDIT: im asking 2 because I have spawn points and objects spawners connected to them, but I guess I can just use the same control point ID for all of them?
It's funny you asked this because it's the one snag we've run up against. Luckily there's an easy work-around.

So here's the problem:
If you have a control point that shares routes because you gave it an SGID of 1, then it shouldn't be a problem because it's at the start of the routes. However, if you have a control point at the end of the routes, then all of the routes leading up to that control point must be of equal length. So if your last control point has an SGID of 6, then all of the routes that use it must have controls points 1, 2XX, 3XX, 4XX, and 5XX.

But here's the solution:
You can still have a beginning control point that's shared, but if your routes aren't all the same length, then you'll have to create new control points at the end for each of your routes. They would look like this:


They can all be stacked on top of each other but they'll have different SGIDs. Once again, this is only necessary if your routes aren't the same length.

As for objectspanwers, I would recommend creating a new control point, such as at main and assigning it an SGID of -1. Make it uncappable and then assign all of your object spawners to it. You can even hide it on the minimap if you want by selecting that option in the tweaker bar. Remember that when you create an objectspawner, the Editor will automatically assign it to the nearest CP but you can change that really easily through the tweaker bar and move the object where ever you want on the map.

Hope that helps.

AFsoccer is offline Reply With Quote
Old 2011-01-28, 02:20   #6
Supporting Member

Shovel's Avatar
Default Re: [Map Tutorial] AASv4

Just a quick question, how many attack routs to the developers recommend for maps? Three? Five? Nine?

Shovel is offline Reply With Quote
Old 2011-01-28, 08:51   #7
Retired PR Developer
Supporting Member

Amok@ndy's Avatar
Default Re: [Map Tutorial] AASv4

its up to the mapper but having less then 3 routes doesnt really worth it

Amok@ndy is offline Reply With Quote
Old 2011-03-21, 23:56   #8
Retired PR Developer
Supporting Member

AFsoccer's Avatar
Default Re: [Map Tutorial] AASv4

Updated to reflect new discoveries.

AFsoccer is offline Reply With Quote
Old 2011-06-08, 13:38   #9
Retired PR Developer

billoute's Avatar
Default Re: [Map Tutorial] AASv4

very nice tuto ,I have learned more

Also ,I have a question related to the PC and the tickets. AFsoccer can you explain to us the real operation about the AeravalueTeam1 an AeravalueTeam2 . How are these values done to manage the ticket bleed ? how to choose the level of these values ?I think that is complementary to the creation of PC .


La faim justifie les moyens ......
billoute is offline
Last edited by Hauteclocque; 2011-06-08 at 13:48..
Reply With Quote
Old 2011-06-08, 14:59   #10
PR:BF2 Developer
Supporting Member

Rhino's Avatar
Default Re: [Map Tutorial] AASv4

As per my Audit tut:


These values control your ticket bleed. Once a team captures enough flags to reach a total area value of 100 or more, ticket bleed will happen for the other team. So if you set 1 flag with a area flag of 50, and 2 others with 25, and if team 2 controls all 3 of those flags 50+25+25=100, means ticket bleed will start for the other team and continue until team 2 looses one of those flags. If say the area value reaches 200, ticket bleed should happen at double the rate it is set to in the init.con file. Also take note that there are 2 sets of area values, one for each team. so you can make a flag have a high or lower value for one team than it dose for another.
For the last flag (main base) in the capture order, you should give the attack teams side as much area value as you can so ticket bleed would soon end the game if they took the flag. IE, final flag should have an area value of 99999 for the attacking team.

Rhino is offline Reply With Quote

aasv4, control, create, game, map, mode, points, tutorial
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT. The time now is 21:26.