Local RCON Commands

Information and tutorials related to modding BF2.
Post Reply
VapoMan
Retired PR Developer
Posts: 1139
Joined: 2009-05-29 07:11

Local RCON Commands

Post by VapoMan »

RCON commands on local servers are very useful for testing maps, vehicles and weapons ingame.

1. In the launcher, click 'Options' and select the 'Global' tab. Check the 'Enable Local RCON Commands' option, click 'Apply' and then 'Close'.

2. Start a local or Co-op server.
Spoiler for Coop Server Setup:
You might need to enable RCON for coop first:
1-) open with notepad++ the file "realityconfig_coop.py"
2-) scroll down to the last line, where is says: C['PRDEBUG_ALL'] = 0
3-) change the 0 to 1
4-) save file
5-) enjoy rcon in coop
3. Once spawned in ingame bring up chat ( default j,k,l keys).

4. Type in:

Code: Select all

rcon debug
A message should appear saying '*Debug Enabled*'
Enabling debug mode is important as most commands cant be done unless debug is enabled.



Ingame Commands:

Ingame commands must be entered in chat by using the j,k or l keys, NOT in console.

Now that you're logged in and in debug mode you can use the spawner commands.
Its important that you DO NOT spawn anything that isnt in the map you are currently playing as it will crash the game. Example spawning a PLA tank on kashan will crash the game.

The spawner command is:

Code: Select all

rcon spawner thing_you_are_spawning
For example if I wanted to spawn a US logistics truck on kashan desert the command would be:

Code: Select all

rcon spawner us_trk_logistics
There are single player versions of some vehicles, for example tanks that allow the gunner to drive. They have _bf2 on the end of the name. As long as you have the vehcile in the map, you can spawn in the SP varient.

If I wanted to spawn the MEC marksman kit the command would be:

Code: Select all

rcon spawner mec_marksman
If you want to alternate version of the kit put _alt on the end of the code like this:

Code: Select all

rcon spawner mec_marksman_alt
To spawn a deployable firebase the command would be:

Code: Select all

rcon spawner deployable_firebase
If you want to spawn a pre built deployable just put _sp on the end of the name. You can only spawn deployables for the teams on the map.


You can spawn any vehicle or kit on any team as long as it is on the map you are playing on.

Useful for testing and taking screenshots is the flying prbot. The command for that it:

Code: Select all

rcon prbot
To remove the minimap and hud when in the prbot press the switch weapon key (default F).
There is another prbot with different controls, more sutable for smooth video recording. The command for that it:

Code: Select all

rcon prbot2
Also useful for taking screenshots and filming is the camera kit. Its command is:

Code: Select all

rcon camera
The kit will probably be invisible so just walk a few meters infront of you and press G. The kit has a UN helmet, so it can be useful in community events.

For instant respawn type in:

Code: Select all

rcon ready playername
Replace 'playername' with the name of the person you want to instantly respawn.
So If I wanted to do it to myself I would type in:

Code: Select all

rcon ready vapoman
You can also use just the first letter or first few letters of the players name. For example

Code: Select all

rcon ready v
To allow all kits used in vehicles plus no need for driver in tanks etc type in:

Code: Select all

rcon oneman
To disable Vehicle warm up times type in:

Code: Select all

rcon start
To disable Team Kit restrictions so you can use enemy kits, type in:

Code: Select all

rcon onefaction
To spawn every kit for the faction you are currently playing as type:

Code: Select all

rcon kits
It will spawn all the kits and varients for the faction in a long line.

To find out your current health value type:

Code: Select all

rcon health
Fully healed is 100.0, dead is 0

To run a map in the your map rotation type:

Code: Select all

rcon map [i]nn[/i]
Replace nn with the map number. To find out the map number type the follow into the console (by pressing ~):

Code: Select all

maplist.list
To teleport to loctation X amount of meters away in the direction you're facing type (this one only works in the console ~):

Code: Select all

rcon teleport X
If you teleport to a location that is lower in height than you're current you will fall and die, so be careful.

Vehicle and Kit Names:

To find the names of all the vehicles and kits locate the following directory:
Project Reality\Project Reality BF2\mods\pr\content

The kits_server.zip will have all the names of the kits for all the different factions.
The vehicles_server.zip will have all the vehicles names for all the diffents factions.
The common_server.zip has names for deployables, such as firebases, tows ect.

For reference here are the team names so you can identify which kits and vehicles belong to which armies and maps:

Code: Select all

cf = Canadian Forces
ch= PLA
chinsurgent = Militia
GB= British Forces
ger = German Forces
hamas= Hamas
idf = Israeli defence force
Mec = MEC
MEInsurgent = Insurgents
pickup = Random pickup kits (some of the insurgent and taliban kits are in here)
ru = Russian Forces
taliban = Taliban
us = USMC
usa = US Army
Last edited by Suchar on 2022-01-12 15:39, edited 23 times in total.
Reason: Updated for the standalone content path

Image"Eight glorious sides and eight stunning angles!"Image
PatrickLA_CA
Posts: 2243
Joined: 2009-07-14 09:31

Re: [Tutorial] Local RCON Commands

Post by PatrickLA_CA »

That's very useful, thanks Vapo!
In-game: Cobra-PR
AncientMan
Retired PR Developer
Posts: 5111
Joined: 2007-05-22 07:42

Re: [Tutorial] Local RCON Commands

Post by AncientMan »

You don't need to login for it to work, just "rcon debug". And you can just use "rcon camera" for the camera kit.

For listen servers, you need to type the commands into chat (j, k, or l), for dedicated, you type it into console (~). For dedicated, you need to enable debug at the bottom of the relevant realityconfig_*.py file.
Image
VapoMan
Retired PR Developer
Posts: 1139
Joined: 2009-05-29 07:11

Re: [Tutorial] Local RCON Commands

Post by VapoMan »

[R-DEV]AncientMan wrote:For listen servers, you need to type the commands into chat (j, k, or l), for dedicated, you type it into console (~).
Palmface I forgot that lol :mrgreen: . Will quickly edit....

Image"Eight glorious sides and eight stunning angles!"Image
Elektro
Posts: 1824
Joined: 2009-01-05 14:53

Re: [Tutorial] Local RCON Commands

Post by Elektro »

Will spawning a jet on Kashan crash the server?
VapoMan
Retired PR Developer
Posts: 1139
Joined: 2009-05-29 07:11

Re: [Tutorial] Local RCON Commands

Post by VapoMan »

Elektro wrote:Will spawning a jet on Kashan crash the server?
It will not crash as long as the vehicle is in the map.
So if you spawn it in the 64p jet layer it is fine, but if you spawn it in the 32p chopper layer it will crash.

Image"Eight glorious sides and eight stunning angles!"Image
AnimalMother.
Posts: 2476
Joined: 2007-02-25 15:38

Re: [Tutorial] Local RCON Commands

Post by AnimalMother. »

might want to add rcon ready playername to instant respawn

rcon oneman to allow all kits used in vehicles plus no need for driver in tanks etc and rcon start (i think) to have no turrent warm ups etc

rcon map nn - where nn is a number from the maplist to switch to that map
ex |TG-31st|
AnimalMotherUK - YouTube

vistamaster01: "I just dont get people with girl usernames/pics/sigs lol,
for example I thought AnimalMother was a girl :o ops:"

Arte et Marte
VapoMan
Retired PR Developer
Posts: 1139
Joined: 2009-05-29 07:11

Re: [Tutorial] Local RCON Commands

Post by VapoMan »

Thanks Animal.Mother for the extra commands, added those in :)

Image"Eight glorious sides and eight stunning angles!"Image
splatters
Posts: 529
Joined: 2010-01-19 08:02

Re: [Tutorial] Local RCON Commands

Post by splatters »

You can also spawn firebases etc. Static objects can be spawn too, but afaic only the host can see those. Networkable static objects can bee seen by everyone.
VapoMan
Retired PR Developer
Posts: 1139
Joined: 2009-05-29 07:11

Re: [Tutorial] Local RCON Commands

Post by VapoMan »

Updated OP with more commands and removed the login process since it isn't needed.

Image"Eight glorious sides and eight stunning angles!"Image
USMC scout sniper
Posts: 487
Joined: 2010-01-03 04:21

Re: [Tutorial] Local RCON Commands

Post by USMC scout sniper »

Do these commands work in COOP?
HELL HAVE NO FURY LIKE ME WITH A M249 SAW PIP!
Rhino
Retired PR Developer
Posts: 47909
Joined: 2005-12-13 20:00

Re: [Tutorial] Local RCON Commands

Post by Rhino »

USMC scout sniper wrote:Do these commands work in COOP?
Providing its a local server or if on a dedi server, debug is enabled.


- Topic moved to tuts area and stickied :)
Image
AnimalMother.
Posts: 2476
Joined: 2007-02-25 15:38

Re: [Tutorial] Local RCON Commands

Post by AnimalMother. »

rcon onefaction


Removes the penalty for picking up special enemy kits (sniper, officer, medic etc)
ex |TG-31st|
AnimalMotherUK - YouTube

vistamaster01: "I just dont get people with girl usernames/pics/sigs lol,
for example I thought AnimalMother was a girl :o ops:"

Arte et Marte
VapoMan
Retired PR Developer
Posts: 1139
Joined: 2009-05-29 07:11

Re: [Tutorial] Local RCON Commands

Post by VapoMan »

Thanks animal, added to the list.

Image"Eight glorious sides and eight stunning angles!"Image
xWEESERx
Posts: 15
Joined: 2011-02-13 23:43

Re: [Tutorial] Local RCON Commands

Post by xWEESERx »

It doesnt seem to work for me, says something about cannot invoke login :/
VapoMan
Retired PR Developer
Posts: 1139
Joined: 2009-05-29 07:11

Re: [Tutorial] Local RCON Commands

Post by VapoMan »

xWEESERx wrote:It doesnt seem to work for me, says something about cannot invoke login :/
Sounds like you're trying to input commands into the console. You have to type the commands into ingame chat for it to work.
[R-DEV]VapoMan wrote:2. Once spawned in ingame bring up chat ( default j,k,l keys).

Image"Eight glorious sides and eight stunning angles!"Image
Bor
Posts: 38
Joined: 2009-04-12 13:46

Re: [Tutorial] Local RCON Commands

Post by Bor »

Any way to get rid of the camera kit? I cant type when i have my camera kit on :( (I keep on switching between camera kit and prbot2 , and prbot2 disappears after you exit)
BloodyDeed
Retired PR Developer
Posts: 4452
Joined: 2008-05-07 17:43

Re: [Tutorial] Local RCON Commands

Post by BloodyDeed »

Just use the console for the spawner commands.
It opens with the key above "Tab".
Image
VapoMan
Retired PR Developer
Posts: 1139
Joined: 2009-05-29 07:11

Re: [Tutorial] Local RCON Commands

Post by VapoMan »

Not all the rcon commands work in the console though, spawner commands seem to only work in chat.

Bor, if you're just on a local server (it wont work online), you can use the console command, renderer.drawhud 0 and renderer.drawhud 1 to remove the hud.

Image"Eight glorious sides and eight stunning angles!"Image
Finners
Posts: 48
Joined: 2011-05-10 01:23

Re: [Tutorial] Local RCON Commands

Post by Finners »

doesnt seem to work if i launch a local server off my pc any ideas?
Image
Post Reply

Return to “Modding Tutorials”