Hey guys!
I want to edit Singleplayer Muttrah city and add a kiowa chopper in it just for my own use....
I am wondering if its possible...
Because last time I tried to load any map and non of them loaded, Only my own maps.
Is it even allowed to do so??
I am going to save it as a different map than muttrah city and play just by my self!
Cheers,
Punkbuster
[?] Is it possible to edit a Singleplayer map for my own use?
-
Punkbuster
- Posts: 879
- Joined: 2008-10-24 23:12
[?] Is it possible to edit a Singleplayer map for my own use?
In-game name: =[BF]= Rudy_PR
-
VapoMan
- Retired PR Developer
- Posts: 1139
- Joined: 2009-05-29 07:11
Re: Is it possible to edit a Singleplayer map for my own use?
You can edit the PR files for personal use, you only have to ask for permission if you want to release the changes publically.
Here are some instructions I pm'ed to someone a while ago:
How change the factions for PRSP:
1. Navigate to your: EA GAMES/Battlefield 2/mods folder.
2. Copy the pr folder and paste it in the same location, a folder called "pr - Copy" should be made, rename it to pr_edit.
3. Go into pr_edit/levels Choose the map you want to change. eg operation_archer.
4. Go into the map's folder and open up server.zip with winrar.
5. Open Init_sp.con with NOTEPAD (NOT WORDPAD).
6. These line control the teams:
Code:
init.con for operation archer
[0957] Init System, use the teams with _sp for single player.
List with all available Teamsettings [0957]:
Code:
So if you want the USMC in operation archer, change it to:
Code:
7. After you have made the changes in notepad, go to file>save, and then close notepad.
Winrar will then ask if ou want to update it in the archive, click yes and close server.zip.
8. Use the pr.exe in pr_edit to play the map with the changes. If you make these changes in normal pr, punkbuster will most likely kick you in online servers.
For if you want USMC in Albasrah
So in Init_sp.con it will look like this:
Code:
And the Init.con will be:
Code:
Just to let you know, ziptie on the end of a faction name means that its for insurgency and instead of knifes they will have handcuffs. para in a faction name, means that the faction will have parachutes.
(OPTIONAL)
If you want to change the vehicles to USMC vehicles:
1. Go into the server.zip files of the map you want to change with winrar.
2. Go into gamemodes/gpm_coop/ and into the size you want to change (16, 32 or 64).
3. Open up GamePlayObjects.con with NOTEPAD.
4. Change the vehicles to the ones you want.
eg.
Code:
change to something like:
Code:
To find what vehicles are avaliable go into: pr_edit/objects/vehicles_server.zip
5. Once you have edited to your liking, save in notepad and let winrar update it in the archive.
Hope that that fixes your problem. Have fun.
Here are some instructions I pm'ed to someone a while ago:
How change the factions for PRSP:
1. Navigate to your: EA GAMES/Battlefield 2/mods folder.
2. Copy the pr folder and paste it in the same location, a folder called "pr - Copy" should be made, rename it to pr_edit.
3. Go into pr_edit/levels Choose the map you want to change. eg operation_archer.
4. Go into the map's folder and open up server.zip with winrar.
5. Open Init_sp.con with NOTEPAD (NOT WORDPAD).
6. These line control the teams:
Code:
init.con for operation archer
Code: Select all
rem --------------------------SP Settings---------------------------
[color=Red]run ../../Factions/faction_init.con 1 "taliban_sp_variant2"
run ../../Factions/faction_init.con 2 "cf_sp_variant1"[/color]
rem ---------------------------SP Tickets---------------------------List with all available Teamsettings [0957]:
Code:
Code: Select all
* "cf"
* "cf_para"
* "cf_sp_variant1"
* "cf_vehicles"
* "chinsurgent"
* "chinsurgent_sp_variant2"
* "chinsurgent_sp_variant3"
* "ch"
* "ch_sp_variant3"
* "ch_vehicles"
* "gb"
* "gb_para_sp_variant2"
* "gb_sp_variant1"
* "gb_sp_variant2"
* "gb_sp_variant3"
* "gb_vehicles"
* "gb_ziptie"
* "ger"
* "ger_sp_variant1"
* "ger_para"
* "ger_vehicles"
* "ger_ziptie"
* "hamas"
* "hamas_sp_variant2"
* "hamas_sp_variant3"
* "idf"
* "idf_md"
* "idf_sp_variant1"
* "idf_md_sp_variant3"
* "idf_vehicles"
* "mec"
* "mec_para_sp_variant2"
* "mec_sp_variant4"
* "mec_vehicles"
* "meinsurgent"
* "meinsurgent_sp"
* "ru"
* "ru_sp_variant3"
* "ru_sp_variant4"
* "ru_vehicles"
* "taliban"
* "taliban_sp_variant1"
* "taliban_sp_variant2"
* "usa"
* "usa_para"
* "usa_para_sp_variant2"
* "usa_para_sp_variant3"
* "usa_vehicles"
* "usa_ziptie"
* "us"
* "us_para_sp_variant3"
* "us_para_sp_variant4"
* "us_vehicles"
* "us_ziptie"Code:
Code: Select all
rem --------------------------SP Settings---------------------------
[color=Red]run ../../Factions/faction_init.con 1 "taliban_sp_variant2"
run ../../Factions/faction_init.con 2 "us_para_sp_variant4"[/color]
rem ---------------------------SP Tickets---------------------------
Winrar will then ask if ou want to update it in the archive, click yes and close server.zip.
8. Use the pr.exe in pr_edit to play the map with the changes. If you make these changes in normal pr, punkbuster will most likely kick you in online servers.
For if you want USMC in Albasrah
So in Init_sp.con it will look like this:
Code:
Code: Select all
rem ----------------------------------------------------------------
rem ----------------------------INIT_SP-----------------------------
rem -------------(overwrites main init.con on gpm_coop)-------------
rem ----------------------------------------------------------------
rem ----------------------------SL Spawn----------------------------
ObjectTemplate.active SoldierCamera
ObjectTemplate.create SpawnPoint SquadLeaderSpawnPoint
ObjectTemplate.PreCacheObject 1
ObjectTemplate.setScatterSpawnPositions 1
ObjectTemplate.setSpawnPositionOffset 0/0/0
rem --------------------------SP Settings---------------------------
[color=Red]
run ../../Factions/faction_init.con 1 "meinsurgent_sp"
run ../../Factions/faction_init.con 2 "usa_para_sp_variant3[/color]"
rem ---------------------------SP Tickets---------------------------
gameLogic.setDefaultNumberOfTicketsEx 16 1 350
gameLogic.setDefaultNumberOfTicketsEx 16 2 400
gameLogic.setDefaultNumberOfTicketsEx 32 1 350
gameLogic.setDefaultNumberOfTicketsEx 32 2 400
gameLogic.setDefaultNumberOfTicketsEx 64 1 350
gameLogic.setDefaultNumberOfTicketsEx 64 2 400Code:
Code: Select all
rem *** Generated by BF2Editor ***
if v_arg1 == BF2Editor
run Heightdata.con
LevelSettings.InitWorld
run Terrain.con BF2Editor
run StaticObjects.con BF2Editor
run Sounds.con
run Sky.con BF2Editor
run Editor/GamePlayObjects.con host
UndergrowthEditable.create
Undergrowth.load Levels\albasrah\
run Overgrowth/Overgrowth.con
Overgrowth.editorEnable 1
run AmbientObjects.con BF2Editor
run Water.con
run TriggerableTemplates.con BF2Editor
else
run Heightdata.con
run Terrain.con v_arg2
run Sky.con v_arg2
run CompiledRoads.con
run Sounds.con
run SoundDistances.con
run tmp.con v_arg1
Undergrowth.load Levels\albasrah\
run Overgrowth/Overgrowth.con
run Overgrowth/OvergrowthCollision.con
run AmbientObjects.con
run Water.con
run TriggerableTemplates.con
run SoundDistances.con
endIf
rem ------------------------------- LevelSettings -------------------------------
rem -----------------------------------------------------------------------------
[color=Red]run ../../Factions/faction_init.con 1 "meinsurgent"
run ../../Factions/faction_init.con 2 "us_ziptie"[/color]
rem -----------------------------------------------------------------------------
gameLogic.setBeforeSpawnCamera 253/26/-331 76/-11/0
if v_arg1 == BF2Editor
LevelSettings.CustomTextureSuffix "ab"
else
texturemanager.customTextureSuffix "ab"
endIf
rem -----------------------------------------------------------------------------
GameLogic.MaximumLevelViewDistance 350
rem -----------------------------------------------------------------------------
gameLogic.setDefaultNumberOfTicketsEx 16 1 275
gameLogic.setDefaultNumberOfTicketsEx 16 2 275
gameLogic.setDefaultNumberOfTicketsEx 32 1 275
gameLogic.setDefaultNumberOfTicketsEx 32 2 275
gameLogic.setDefaultNumberOfTicketsEx 64 1 325
gameLogic.setDefaultNumberOfTicketsEx 64 2 325
gameLogic.setDefaultTimeToNextAIWave 8
gameLogic.setTicketLossAtEndPerMin 1000
gameLogic.setTicketLossPerMin 1 10
gameLogic.setTicketLossPerMin 2 10(OPTIONAL)
If you want to change the vehicles to USMC vehicles:
1. Go into the server.zip files of the map you want to change with winrar.
2. Go into gamemodes/gpm_coop/ and into the size you want to change (16, 32 or 64).
3. Open up GamePlayObjects.con with NOTEPAD.
4. Change the vehicles to the ones you want.
eg.
Code:
Code: Select all
rem [ObjectSpawnerTemplate: Airport_HeavyJeep]
ObjectTemplate.create ObjectSpawner Airport_HeavyJeep
ObjectTemplate.activeSafe ObjectSpawner Airport_HeavyJeep
ObjectTemplate.modifiedByUser "marko"
ObjectTemplate.isNotSaveable 1
ObjectTemplate.hasMobilePhysics 0
ObjectTemplate.setObjectTemplate 2 [color=Red]gb_apc_warrior[/color]
ObjectTemplate.minSpawnDelay 360
ObjectTemplate.maxSpawnDelay 360
ObjectTemplate.TimeToLive 1200
ObjectTemplate.Distance 100
ObjectTemplate.team 2
ObjectTemplate.teamOnVehicle 1Code:
Code: Select all
rem [ObjectSpawnerTemplate: Airport_HeavyJeep]
ObjectTemplate.create ObjectSpawner Airport_HeavyJeep
ObjectTemplate.activeSafe ObjectSpawner Airport_HeavyJeep
ObjectTemplate.modifiedByUser "marko"
ObjectTemplate.isNotSaveable 1
ObjectTemplate.hasMobilePhysics 0
ObjectTemplate.setObjectTemplate 2 [color=Red]us_ifv_m2a2[/color]
ObjectTemplate.minSpawnDelay 360
ObjectTemplate.maxSpawnDelay 360
ObjectTemplate.TimeToLive 1200
ObjectTemplate.Distance 100
ObjectTemplate.team 2
ObjectTemplate.teamOnVehicle 15. Once you have edited to your liking, save in notepad and let winrar update it in the archive.
Hope that that fixes your problem. Have fun.
"Eight glorious sides and eight stunning angles!"
-
Punkbuster
- Posts: 879
- Joined: 2008-10-24 23:12
Re: Is it possible to edit a Singleplayer map for my own use?
Thank you, I just need to know one more thing, How can I choose the spawn time and location for the specific vehicle??VapoMan wrote: (OPTIONAL)
If you want to change the vehicles to USMC vehicles:
1. Go into the server.zip files of the map you want to change with winrar.
2. Go into gamemodes/gpm_coop/ and into the size you want to change (16, 32 or 64).
3. Open up GamePlayObjects.con with NOTEPAD.
4. Change the vehicles to the ones you want.
eg.
Code:
change to something like:Code: Select all
rem [ObjectSpawnerTemplate: Airport_HeavyJeep] ObjectTemplate.create ObjectSpawner Airport_HeavyJeep ObjectTemplate.activeSafe ObjectSpawner Airport_HeavyJeep ObjectTemplate.modifiedByUser "marko" ObjectTemplate.isNotSaveable 1 ObjectTemplate.hasMobilePhysics 0 ObjectTemplate.setObjectTemplate 2 [color=Red]gb_apc_warrior[/color] ObjectTemplate.minSpawnDelay 360 ObjectTemplate.maxSpawnDelay 360 ObjectTemplate.TimeToLive 1200 ObjectTemplate.Distance 100 ObjectTemplate.team 2 ObjectTemplate.teamOnVehicle 1
Code:
To find what vehicles are avaliable go into: pr_edit/objects/vehicles_server.zipCode: Select all
rem [ObjectSpawnerTemplate: Airport_HeavyJeep] ObjectTemplate.create ObjectSpawner Airport_HeavyJeep ObjectTemplate.activeSafe ObjectSpawner Airport_HeavyJeep ObjectTemplate.modifiedByUser "marko" ObjectTemplate.isNotSaveable 1 ObjectTemplate.hasMobilePhysics 0 ObjectTemplate.setObjectTemplate 2 [color=Red]us_ifv_m2a2[/color] ObjectTemplate.minSpawnDelay 360 ObjectTemplate.maxSpawnDelay 360 ObjectTemplate.TimeToLive 1200 ObjectTemplate.Distance 100 ObjectTemplate.team 2 ObjectTemplate.teamOnVehicle 1
5. Once you have edited to your liking, save in notepad and let winrar update it in the archive.
Hope that that fixes your problem. Have fun.
EDIT: It worked thanks.
However, I have one more question, Is it possible to add a new vehicle not replace an old one??
Last edited by Punkbuster on 2011-01-03 19:44, edited 1 time in total.
In-game name: =[BF]= Rudy_PR
-
VapoMan
- Retired PR Developer
- Posts: 1139
- Joined: 2009-05-29 07:11
Re: Is it possible to edit a Singleplayer map for my own use?
If you want to add a new one, you will first have to find the coordinates of where you want to have the new vehicle spawn.
To do this you will need bf2 editor 1.3
See this tutorial HEREto set up the bf2 editor for PR.
To load up muttrah city in the editor you first need to go into its map files in pr_edit and unpack server.zip and client.zip. Then you can start bf2 editor and load muttrah city.
Once its loaded place a small object in the place where you want the vehicle spawn (I have placed one top of the carrier), then double click on it to bring up the Absolute Transformation box. Take a note of the numbers in there.
eg. 739.970/48.131/914.935 -137.2/0.0/0.0
Then you can close the editor (dont save), and delete alll the files in the muttrah city map folder except for info, server.zip and client.zip.
Go into server.zip/gamemodes/gpm_coop/ and into the size you want to change (16, 32 or 64).
Open up GamePlayObjects.con with NOTEPAD
under rem ********** Object Spawner ********** fill in and then copy and paste this template:
here is one I prepared earlier.
Then you will also have to add the coordinates under: if v_arg1 == host
Here is a template:
To find the control point ID go down to rem ********** Spawn Points ********** and look for the apropriate flag (eg cpname_mc_64_carrier_1_0).
Under the apropriate flag, check ObjectTemplate.setControlPointId X (there will be a number in place of the X, eg 1). That number will be the control point ID to use in your object spawner.
So heres the object spawner coordinates I prepared earlier.
Once you've made the changes, save and update in archive.
Dont forget to use the pr.exe in the pr_edit folder to play your edited version.
To do this you will need bf2 editor 1.3
See this tutorial HEREto set up the bf2 editor for PR.
To load up muttrah city in the editor you first need to go into its map files in pr_edit and unpack server.zip and client.zip. Then you can start bf2 editor and load muttrah city.
Once its loaded place a small object in the place where you want the vehicle spawn (I have placed one top of the carrier), then double click on it to bring up the Absolute Transformation box. Take a note of the numbers in there.
eg. 739.970/48.131/914.935 -137.2/0.0/0.0
Then you can close the editor (dont save), and delete alll the files in the muttrah city map folder except for info, server.zip and client.zip.
Go into server.zip/gamemodes/gpm_coop/ and into the size you want to change (16, 32 or 64).
Open up GamePlayObjects.con with NOTEPAD
under rem ********** Object Spawner ********** fill in and then copy and paste this template:
Code: Select all
rem [ObjectSpawnerTemplate: [color=Red]name_of_the_object_spawner[/color]
ObjectTemplate.create ObjectSpawner [color=Red]name_of_the_object_spawner[/color]
ObjectTemplate.activeSafe ObjectSpawner [color=Red]name_of_the_object_spawner[/color]
ObjectTemplate.modifiedByUser "[color=Red]name[/color]"
ObjectTemplate.isNotSaveable 1
ObjectTemplate.hasMobilePhysics 0
ObjectTemplate.setObjectTemplate [color=Blue]2[/color] [color=Red]name of the vehicle[/color] (note that [color=Blue]2 [/color]is for blufor and [color=Blue]1[/color] is for opfor)
ObjectTemplate.minSpawnDelay [color=Red]spawntime (eg. 60 for 1 minute)[/color]
ObjectTemplate.maxSpawnDelay [color=Red]spawntime (eg. 60 for 1 minute)[/color]
ObjectTemplate.TimeToLive [color=Red]how much time it can sit away from the spawn without a driver until it explodes (eg. 60 for 1 minute)[/color]
ObjectTemplate.Distance [color=Red]how far the vehicle has be away from the spawn for another to spawn (eg 300)[/color]
ObjectTemplate.maxNrOfObjectSpawned [color=Red]how many vehciles can be in the game world at once (eg 1)[/color]
ObjectTemplate.teamOnVehicle 1Code: Select all
rem [ObjectSpawnerTemplate: [color=Red]usmc_carrier_kiowa[/color]
ObjectTemplate.create ObjectSpawner [color=Red]usmc_carrier_kiowa[/color]
ObjectTemplate.activeSafe ObjectSpawner [color=Red]usmc_carrier_kiowa[/color]
ObjectTemplate.modifiedByUser "[color=Red]VapoMan[/color]"
ObjectTemplate.isNotSaveable 1
ObjectTemplate.hasMobilePhysics 0
ObjectTemplate.setObjectTemplate [color=Blue]2[/color] [color=Red]us_ahe_kiowa[/color]
ObjectTemplate.minSpawnDelay [color=Red]60[/color]
ObjectTemplate.maxSpawnDelay [color=Red]60[/color]
ObjectTemplate.TimeToLive [color=Red]300[/color]
ObjectTemplate.Distance [color=Red]300[/color]
ObjectTemplate.maxNrOfObjectSpawned [color=Red]1[/color]
ObjectTemplate.teamOnVehicle 1Then you will also have to add the coordinates under: if v_arg1 == host
Here is a template:
Code: Select all
rem [ObjectSpawner: [color=Red]name_of_the_object_spawner[/color]]
Object.create [color=Red]name_of_the_object_spawner[/color]
Object.absolutePosition [color=Red]coordinates we found ealier in the Absolute Transformation box (eg 0.000/0.000/0.000)[/color]
Object.rotation [color=Red]rotation we found ealier in the Absolute Transformation box (eg 0.000/0.000/0.000)[/color]
Object.setControlPointId [color=Red]control point ID for the flag connected to the object spawner (eg 1)[/color]
Object.layer 2Under the apropriate flag, check ObjectTemplate.setControlPointId X (there will be a number in place of the X, eg 1). That number will be the control point ID to use in your object spawner.
So heres the object spawner coordinates I prepared earlier.
Code: Select all
rem [ObjectSpawner: [color=Red]usmc_carrier_kiowa[/color]]
Object.create [color=Red]usmc_carrier_kiowa[/color]
Object.absolutePosition [color=Red]739.970/48.131/914.935[/color]
Object.rotation [color=Red]-137.200/0.000/0.000[/color]
Object.setControlPointId [color=Red]1[/color]
Object.layer 2Dont forget to use the pr.exe in the pr_edit folder to play your edited version.
"Eight glorious sides and eight stunning angles!"
-
Punkbuster
- Posts: 879
- Joined: 2008-10-24 23:12
Re: Is it possible to edit a Singleplayer map for my own use?
Thanks a lot mate! I will try this ASAP!
In-game name: =[BF]= Rudy_PR
