Page 1 of 3
Custom PR map crash at 100%
Posted: 2013-01-09 14:41
by Ason
Hello, I have just started mapping vbf2/PR and now i set up a small PR map with controlpoints and i have edited the init.con file to add factions and kits etc, when i load the game it crashes at 100%, the mainproblem is there are no guides on how to set up PRcustom maps to the point where you can actually test them ingame, i only find tutorials on specific things, no tut on how to be able to get a map tested in game. So anyway what i did was:
add terrain and static objects,added CPs and changed SGID then i opened the init.con file and changed kits and factions, i basically changed everything i was able to pick up from diffrent tutorials, then i copied my map from PR_edit/levels and pasted it to mods/Pr/levels so i pasted it into the normal pr folder and i am able to load the game but it crashes when it reaches 100%, i got no idea if it's even possible to test PR map like i could test vbf2 maps and i still got no idea if my changes are enough or if maybe there are some other textfile changes that you need to make?
Imageshack - testqa.png
The best thing would be if someone could explain what things are crucial to change/edit in a map to be able to test it ingame.
Appriciate all the help i can get!

Re: Custom PR map crash at 100%
Posted: 2013-01-09 15:15
by Rabbit
Make sure you have a "gameplay"> folder and a "gmp_cq" > "64" folder inside of it with your "gameplayobjects.con"
Also change your info around to.
Code: Select all
<map>
<name> Map_Name </name>
<briefing locid="LOADINGSCREEN_MAPDESCRIPTION_Map_Name">map description for modders maps not localized (english only)</briefing>
<music> common/sound/menu/music/map9.ogg </music>
<modes>
<mode type="gpm_cq">
<maptype players="64" type="headon" locid="GAMEMODE_DESCRIPTION_aasfullassets">Unlocalized test for this mode on this map</maptype>
</mode>
</modes>
</map>
Re: Custom PR map crash at 100%
Posted: 2013-01-09 15:16
by AfterDune
Are you sure you're using PR's way of setting kits and factions and not the vanilla way?
Re: Custom PR map crash at 100%
Posted: 2013-01-09 15:21
by sylent/shooter
Hey, thank you for bringing your concerns to us about this. I will redirect you here...
https://www.realitymod.com/forum/f189-modding-tutorials/20862-maps-tutorial-tool-list-pr-mapping-beginners-up.html
and you will be looking at this section of the tutorials:
Project Reality Mapping Specific Tutorials
1. Setting up the BF2 Editor for Project Reality Mapping/Modding
2. PR Mapping Guidelines
3. Map Auditing, also useful for learning about the level editor
4. Close Support Bridges
5. Map Localisation
6. AASv3 control points setup
7. AASv4 Control points setup
You will want to take a look at the ones highlighted in red. If you have already done so, Great!, however I would go over them again to make sure you didn't miss anything.
Also I do not know if you've packed your map correctly. Rhino made a script which you can download here:
https://www.realitymod.com/forum/f189-modding-tutorials/30267-tool-map-build-script.html that you can run to pack your map correctly.
As per the above tutorials make sure you have downloaded the PR_EDIT.zip folder in the "Setting up the editor for PR Mapping" thread.
If this does still not answer your question after trying these things, post back here and I'm sure a senior Mapper will be able to help you.
thanks,
sylent
EDIT: Ninja'd while getting links

Try what GX mentioned also, you will want to look at your .desc file inside your Info folder.
Re: Custom PR map crash at 100%
Posted: 2013-01-09 15:46
by AFsoccer
A few more suggestions (and yes, I'm sure these are in the tutorials or hints threads somewhere):
- Run your map in windowed mode. If you do this and it crashes, it will likely give you an error message so you can see what caused the crash. So turn off full screen and run in windowed mode.
- There are some things that the editor absolutely requires, such as overgrowth. If you don't get an error, try to create some overgrowth and undergrowth, re-save and try to load it again.
- Lastly, sometimes it helps to go through and re-save everything by going to save --> resave and then select each item. This will correct any issues with corrupted items or things you haven't done yet.
Re: Custom PR map crash at 100%
Posted: 2013-01-09 16:12
by Ason
@ gx: Is that inside my map folder?
Thanks!
@[R-DEV]AfterDune: I don't know really, i did this tutorial in Rhinos tutorial-list:
https://www.realitymod.com/forum/f189-m ... audit.html
But i started at
#2Control points, since the first part is only if you want to make an existing map editable right ??
thanks!
@[R-CON]sylent/shooter: the ones in red were the ones i was looking at, but i will go through them again

Pack the map ? This I know nothing about,i will have a look at it

PR_EDIT is already done

I did everything i had to to set up editor for PR

thanks for the help
@[R-DEV]AFsoccer: I did run in windowed mode and i posted the link to the error image in the first post
Imageshack - testqa.png <---------LINK TO ERROR MESSAGE
I tried adding overgrowth aswell, still no change:/
I will try to resave now!

Thanks m8!
Also notice i start the maps with pr, i saw someones screenshot the other day and he started his pr map in bf2? Anybody know the correct way to go about when wanting to test the map?
Re: Custom PR map crash at 100%
Posted: 2013-01-09 16:16
by AncientMan
You defined your team as "usmc". There is no "usmc" faction in PR. Use "us" for USMC, or "usa" for US Army.
Re: Custom PR map crash at 100%
Posted: 2013-01-09 16:37
by Ason
[R-DEV]AncientMan wrote:You defined your team as "usmc". There is no "usmc" faction in PR. Use "us" for USMC, or "usa" for US Army.
Baah somehow it deleted all my changes in the init.con file even thou i got read-only...
btw i still don't know if i can edit the textfile for my map at the same time i got the map open in the editor ? or do i need to close editor to be able to properly edit textfiles? Maybe that is why it deleted the changes in init.con?
Re: Custom PR map crash at 100%
Posted: 2013-01-09 16:39
by Rabbit
Mrslobodan wrote:Baah somehow it deleted all my changes in the init.con file....i know i have to make it read-only but apparently i forgot it...thanks for the help, will give it another try
Pull the tmp.con out of your editor folder in your level folder and put in in your main level folder with your init.con and put the team names in your tmp.con, that way you will not have that problem/
Re: Custom PR map crash at 100%
Posted: 2013-01-09 17:14
by Ason
gx wrote:Pull the tmp.con out of your editor folder in your level folder and put in in your main level folder with your init.con and put the team names in your tmp.con, that way you will not have that problem/
Hmm, i only got a empty folder named tmp...no tmp.con file :S
Re: Custom PR map crash at 100%
Posted: 2013-01-09 17:16
by Rabbit
Mrslobodan wrote:Hmm, i only got a empty folder named tmp...no tmp.con file :S
Make a copy of your init.con, rename it to tmp, delete everything in it and add what you want to.
Re: Custom PR map crash at 100%
Posted: 2013-01-09 17:21
by Ason
gx wrote:Make a copy of your init.con, rename it to tmp, delete everything in it and add what you want to.
Not sure if troll...^
So you mean i should make a new init.con file named tmp instead ? and delete init.con original file?
Re: Custom PR map crash at 100%
Posted: 2013-01-09 17:23
by Rabbit
Mrslobodan wrote:Not sure if troll...^
So you mean i should make a new init.con file named tmp instead ? and delete init.con original file?
DO NOT delete the original. It's just to get the notepad to be a .con file. Only edit the copied init that you renamed to tmp
Re: Custom PR map crash at 100%
Posted: 2013-01-09 17:41
by Ason
gx wrote:DO NOT delete the original. It's just to get the notepad to be a .con file. Only edit the copied init that you renamed to tmp
Ok, but what about all the changes i have made so far in the init.con file ? for example i have deleted almost everything in the level settings section.
I deleted this:
gameLogic.setKit 1 0 "meinsurgent_insurgent" "meinsurgent_soldier"
gameLogic.setKit 2 0 "us_riflemanab" "us_heavywhite_soldier"
gameLogic.setKit 1 1 "meinsurgent_insurgent" "meinsurgent_soldier"
gameLogic.setKit 2 1 "us_rifleman" "us_heavy_soldier"
gameLogic.setKit 1 2 "meinsurgent_ambusher" "meinsurgent_heavy_soldier"
gameLogic.setKit 2 2 "us_engineer" "us_heavywhite_soldier"
gameLogic.setKit 1 3 "meinsurgent_warveteran" "meinsurgent_medium_soldier"
gameLogic.setKit 2 3 "us_medic" "us_lightarmor_soldier"
gameLogic.setKit 1 4 "meinsurgent_officer" "meinsurgent_soldier"
gameLogic.setKit 2 4 "us_officer" "us_heavywhite_soldier"
and replaced it with:
run ../../Factions/faction_init.con 1 "gb"
run ../../Factions/faction_init.con 2 "ch"
that's what GP_Mineral_Wouter told me in this thred
https://www.realitymod.com/forum/f189-m ... ost1852513
Re: Custom PR map crash at 100%
Posted: 2013-01-09 17:49
by Rabbit
Mrslobodan wrote:Ok, but what about all the changes i have made so far in the init.con file ? for example i have deleted almost everything in the level settings section.
I deleted this:
and replaced it with:
that's what GP_Mineral_Wouter told me in this thred
https://www.realitymod.com/forum/f189-m ... ost1852513
a tmp.con is more of an advanced tool. In a init.con, you will need to change it to what you want after any time you edit anything in the lever editor. If you have a tmp.con it overrides whatever is in the init.con. So your init.con faction can be wrong, but as long as your tmp.con has
Code: Select all
run ../../Factions/faction_init.con 1 "gb"
run ../../Factions/faction_init.con 2 "ch"
You don't have to worry about it, and it will never reset.
For example, my current level is a 4km level so it needs a special line in the terrain.con file, but if I ever edit the terrain, that line will go away from the terrain.con, and I have to put it back in. With it being in my tmp.con, I don't have to worry if it is in my terrain.con file or not, as it gets loaded through the tmp.com.
My tmp looks like...
Code: Select all
terrainCuller.setUseStitchedLods 0
run ../../Factions/faction_init.con 1 "chinsurgent"
run ../../Factions/faction_init.con 2 "ch"
That's all I have in it, and it makes the game ALWAYS load those.
Re: Custom PR map crash at 100%
Posted: 2013-01-09 17:56
by Ason
Alright, thanks for the explanation m8! I got into the game this time, i haven't tried your advice yet. It seems i shouldn't have deleted what i deleted because this time i got into the game but i was unable to choose a kit, seems like i deleted the kits :/
Re: Custom PR map crash at 100%
Posted: 2013-01-09 17:57
by Rabbit
Post your init.con
Re: Custom PR map crash at 100%
Posted: 2013-01-09 18:14
by Ason
alright, i added this into init.con level settings:
gameLogic.setKit 1 0 "chinsurgent_officer" "chinsurgent_heavy_soldier"
gameLogic.setKit 2 0 "chinsurgent_officer" "chinsurgent_heavy_soldier"
gameLogic.setKit 1 1 "chinsurgent_scout" "chinsurgent_soldier"
gameLogic.setKit 2 1 "chinsurgent_scout" "chinsurgent_soldier"
gameLogic.setKit 1 2 "chinsurgent_militant" "chinsurgent_heavy_soldier"
gameLogic.setKit 2 2 "chinsurgent_militant" "chinsurgent_heavy_soldier"
gameLogic.setKit 1 3 "chinsurgent_militant" "chinsurgent_heavy_soldier"
gameLogic.setKit 2 3 "chinsurgent_militant" "chinsurgent_heavy_soldier"
gameLogic.setKit 1 4 "chinsurgent_sapper" "chinsurgent_heavy_soldier"
gameLogic.setKit 2 4 "chinsurgent_sapper" "chinsurgent_heavy_soldier"
gameLogic.setKit 1 5 "chinsurgent_medic" "chinsurgent_soldier"
gameLogic.setKit 2 5 "chinsurgent_medic" "chinsurgent_soldier"
gameLogic.setKit 1 6 "chinsurgent_AT" "chinsurgent_heavy_soldier"
gameLogic.setKit 2 6 "chinsurgent_AT" "chinsurgent_heavy_soldier"
2 Problems:
1.I was only able to see 3 of the kits in the list, Officer,medic and AT. I tried writing the kits in the order I remembered them ingame.(I'm aware both teams are militia that's the plan)
2. As soon as i spawned the game was over and my team won instantly.
anybody got solutions or explanations to this ?
Here is my current init.con list:
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\TEST\
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 tmp.con v_arg1
Undergrowth.load Levels\TEST\
run Overgrowth/Overgrowth.con
run Overgrowth/OvergrowthCollision.con
run AmbientObjects.con
run Water.con
run TriggerableTemplates.con
run ../../objects/common/spawners/spawners_common.con
run ../../objects/common/spawners/spawners_chinsurgent.con
run ../../objects/common/spawners/spawners_chinsurgent.con
endIf
rem ------------------------------- LevelSettings -------------------------------
rem -----------------------------------------------------------------------------
run ../../Factions/faction_init.con 1 "CHinsurgent"
run ../../Factions/faction_init.con 2 "CHinsurgent"
gameLogic.setKit 1 0 "chinsurgent_officer" "chinsurgent_heavy_soldier"
gameLogic.setKit 2 0 "chinsurgent_officer" "chinsurgent_heavy_soldier"
gameLogic.setKit 1 1 "chinsurgent_scout" "chinsurgent_soldier"
gameLogic.setKit 2 1 "chinsurgent_scout" "chinsurgent_soldier"
gameLogic.setKit 1 2 "chinsurgent_militant" "chinsurgent_heavy_soldier"
gameLogic.setKit 2 2 "chinsurgent_militant" "chinsurgent_heavy_soldier"
gameLogic.setKit 1 3 "chinsurgent_militant" "chinsurgent_heavy_soldier"
gameLogic.setKit 2 3 "chinsurgent_militant" "chinsurgent_heavy_soldier"
gameLogic.setKit 1 4 "chinsurgent_sapper" "chinsurgent_heavy_soldier"
gameLogic.setKit 2 4 "chinsurgent_sapper" "chinsurgent_heavy_soldier"
gameLogic.setKit 1 5 "chinsurgent_medic" "chinsurgent_soldier"
gameLogic.setKit 2 5 "chinsurgent_medic" "chinsurgent_soldier"
gameLogic.setKit 1 6 "chinsurgent_AT" "chinsurgent_heavy_soldier"
gameLogic.setKit 2 6 "chinsurgent_AT" "chinsurgent_heavy_soldier"
gameLogic.setTeamName 1 "CHinsurgent"
gameLogic.setTeamName 2 "CHinsurgent"
gameLogic.setTeamLanguage 1 "rebels"
gameLogic.setTeamLanguage 2 "rebels"
gameLogic.setTeamFlag 0 "flag_neutral"
gameLogic.setTeamFlag 1 "flag_re"
gameLogic.setTeamFlag 2 "flag_re"
rem -----------------------------------------------------------------------------
gameLogic.setBeforeSpawnCamera 0/150/0 0/0/0
if v_arg1 == BF2Editor
LevelSettings.CustomTextureSuffix ""
else
texturemanager.customTextureSuffix ""
endIf
rem -----------------------------------------------------------------------------
GameLogic.MaximumLevelViewDistance 850
rem -----------------------------------------------------------------------------
gameLogic.setDefaultNumberOfTicketsEx 16 1 50
gameLogic.setDefaultNumberOfTicketsEx 16 2 50
gameLogic.setDefaultNumberOfTicketsEx 32 1 50
gameLogic.setDefaultNumberOfTicketsEx 32 2 50
gameLogic.setDefaultNumberOfTicketsEx 64 1 50
gameLogic.setDefaultNumberOfTicketsEx 64 2 50
gameLogic.setDefaultNumberOfTicketsEx 128 1 50
gameLogic.setDefaultNumberOfTicketsEx 128 2 50
gameLogic.setDefaultTimeToNextAIWave 8
gameLogic.setTicketLossAtEndPerMin 1000
gameLogic.setTicketLossPerMin 1 10
gameLogic.setTicketLossPerMin 2 10
rem -----------------------------------------------------------------------------
rem -----------------------------------------------------------------------------
renderer.globalStaticMeshLodDistanceScale 1
renderer.globalBundleMeshLodDistanceScale 1
renderer.globalSkinnedMeshLodDistanceScale 1
gameLogic.setTeamDropVehicle 1 "mark_team1"
gameLogic.setTeamDropVehicle 2 "mark_team2"
Re: Custom PR map crash at 100%
Posted: 2013-01-09 18:17
by Moszeusz6Pl
Open other level init.con copy this text and then change that's needed, because you are now using vbf2 init system, not PR one.
Re: Custom PR map crash at 100%
Posted: 2013-01-09 18:19
by Rabbit
Your whole init should look like this
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\shikotan_island\
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 tmp.con v_arg1
Undergrowth.load Levels\shikotan_island\
run Overgrowth/Overgrowth.con
run Overgrowth/OvergrowthCollision.con
run AmbientObjects.con
run Water.con
run TriggerableTemplates.con
endIf
rem ------------------------------- LevelSettings -------------------------------
rem -----------------------------------------------------------------------------
run ../../Factions/faction_init.con 1 "chinsurgent"
run ../../Factions/faction_init.con 2 "ch"
rem -----------------------------------------------------------------------------
gameLogic.setBeforeSpawnCamera -15/279/-252 -8/1/0
if v_arg1 == BF2Editor
LevelSettings.CustomTextureSuffix "Woodland"
else
texturemanager.customTextureSuffix "Woodland"
endIf
rem -----------------------------------------------------------------------------
GameLogic.MaximumLevelViewDistance 900
rem -----------------------------------------------------------------------------
gameLogic.setDefaultNumberOfTicketsEx 16 1 400
gameLogic.setDefaultNumberOfTicketsEx 16 2 400
gameLogic.setDefaultNumberOfTicketsEx 32 1 600
gameLogic.setDefaultNumberOfTicketsEx 32 2 600
gameLogic.setDefaultNumberOfTicketsEx 64 1 650
gameLogic.setDefaultNumberOfTicketsEx 64 2 650
gameLogic.setDefaultNumberOfTicketsEx 128 1 650
gameLogic.setDefaultNumberOfTicketsEx 128 2 650
gameLogic.setDefaultTimeToNextAIWave 8
gameLogic.setTicketLossAtEndPerMin 1000
gameLogic.setTicketLossPerMin 1 10
gameLogic.setTicketLossPerMin 2 10
rem -----------------------------------------------------------------------------
rem -----------------------------------------------------------------------------
renderer.globalStaticMeshLodDistanceScale 1
renderer.globalBundleMeshLodDistanceScale 1
renderer.globalSkinnedMeshLodDistanceScale 1
As mineral you should have
Code: Select all
run ../../Factions/faction_init.con 1 "gb"
run ../../Factions/faction_init.con 2 "ch"
in there, not
Code: Select all
gameLogic.setKit 1 0 "chinsurgent_officer" "chinsurgent_heavy_soldier"
gameLogic.setKit 2 0 "chinsurgent_officer" "chinsurgent_heavy_soldier"
gameLogic.setKit 1 1 "chinsurgent_scout" "chinsurgent_soldier"
gameLogic.setKit 2 1 "chinsurgent_scout" "chinsurgent_soldier"
gameLogic.setKit 1 2 "chinsurgent_militant" "chinsurgent_heavy_soldier"
gameLogic.setKit 2 2 "chinsurgent_militant" "chinsurgent_heavy_soldier"
gameLogic.setKit 1 3 "chinsurgent_militant" "chinsurgent_heavy_soldier"
gameLogic.setKit 2 3 "chinsurgent_militant" "chinsurgent_heavy_soldier"
gameLogic.setKit 1 4 "chinsurgent_sapper" "chinsurgent_heavy_soldier"
gameLogic.setKit 2 4 "chinsurgent_sapper" "chinsurgent_heavy_soldier"
gameLogic.setKit 1 5 "chinsurgent_medic" "chinsurgent_soldier"
gameLogic.setKit 2 5 "chinsurgent_medic" "chinsurgent_soldier"
gameLogic.setKit 1 6 "chinsurgent_AT" "chinsurgent_heavy_soldier"
gameLogic.setKit 2 6 "chinsurgent_AT" "chinsurgent_heavy_soldier"
Any time you go into the level editor it will go back to what you have, so you have to always make sure it did not revert back to this.
Now, if you build a tmp.con and add in the team settings it does not matter what forum your level settings are in as the tmp.con will overwrite it and load that.
What teams do you plan on having in your level? I will build you a tmp.con