project reality header
Go Back   Project Reality Forums > PR:BF2 Mod Forums > PR:BF2 Community Modding > Modding Tutorials
19 Nov 2019, 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.

Reply
 
Thread Tools Display Modes
Old 2013-01-09, 21:35   #1
Rabbit

Rabbit's Avatar
Default Using a tmp.con File To Preserve Map Settings

This is a simple, basic tutorial over the tmp.con, a file that will help you with lines of code that you wish to load or lines that disappear any time you edit that section of the level, ie when you set
Code:
terrainCuller.setUseStitchedLods 0
into your terrain.con and you edit the terrain, you need to place it back in the file.

Setting up the tmp

First copy your init.con in your level folder, it should copy as "Init - Copy"


Now rename it to "tmp" with out the "". You now have your tmp.con file.

Now this is how my tmp looks for Shikotan Island...

Code:
terrainCuller.setUseStitchedLods 0

windmanager.globalWindSpeed 11
windmanager.globalWinddirection 0/0/1
First you can see I added
Code:
terrainCuller.setUseStitchedLods 0
This usually goes in the terrain.con for a 4km level, the problem you can encounter, is if you place that code in your terrain.con, and you edit your level in the terrain editor, you lose this line. But by placing it in the tmp.con, it will never go away, and will always load.

A few other terrainCuller's that you can add that are not naturally in the terrain.con, thus will be removed anytime you make changes in the terrain editor are....

Code:
terrainCuller.lodSwitchDistance 
terrainCuller.baseCellSize 
terrainCuller.detailCullMaxLevel
Two of these can pretty much be set values, but others should be based on what your average VD is in the game.

Code:
terrainCuller.lodSwitchDistance 0
terrainCuller.baseCellSize 128
terrainCuller.detailCullMaxLevel VD Based
If you have a level like fallujah, which is pretty much flat and urban, you can get away with lower numbers based around 100-250, if not, no ingame and see at what distance you see your "fog" begin to start to have an effect, and work off that value.

These are my values.
Code:
terrainCuller.lodSwitchDistance 0
terrainCuller.baseCellSize 128
terrainCuller.detailCullMaxLevel 100
Before

After


Another line of code I like to add is
Code:
windmanager.globalWindSpeed 11
windmanager.globalWinddirection 0/0/1
(NOTE) This does not effect projectiles. Now, what this does change is effects. What I did was bumped it up to speed 80 to show you. Here I threw a smoke grenade in the left along the hesco's and you can see the smoke trailing off to the right.


Here we have black smoke coming from the mid factory building, as you can see because wind is set to "80" in this picture, it's stretched out to the right. Generally settings from 1-11 are best. (1 calm, 11 storm rolling in)


Wind speed 0


Wind speed 6


Code:
windmanager.globalWinddirection 0/0/1
Quote:
1/0/0 East
-1/0/0 West
0/0/1 North
0/0/-1 South
This works the direction of the wind, play around with the numbers to find what best suits you and make sure water and clouds are going with it.

Along with direction you want to make sure cloud speed, water speed, and undergrowth speed fit with what you have.

That's it for the tmp.con Have fun and see you on the battlefield!

Rabbit is offline
Last edited by Rabbit; 2013-01-31 at 19:14..
Reply With Quote
Old 2013-01-13, 07:53   #2
Durkie

Durkie's Avatar
Default re: [Tutorial] Using a tmp.con file to preserve map settings

Thanx for this tut I wish I had know this earlier

"Goddam it, you'll never get the Purple Heart hiding in a foxhole! Follow me!"
Captain Henry P. Jim Crowe
Durkie is offline
Last edited by Durkie; 2013-01-13 at 09:45..
Reply With Quote
Old 2013-01-13, 09:16   #3
[R-DEV]​Rhino
PR:BF2 Developer
Supporting Member

Rhino's Avatar
Default Re: [Tutorial] Using a tmp.con file to preserve map settings

Nice tut, didn't know the windmanager worked in BF2. I saw it in BFH when it was released and pretty sure I did try it in BF2 back then but it didn't work, they must have added it in BF2 v1.5 or something.

Its not a good idea to put the kit loading bit in the tmp.con however since as you said, it will load the ones out of the init.con before any other, personally I just make my init.con read only so the editor doesn't save over it.

Rhino is offline Reply With Quote
Old 2013-01-13, 10:51   #4
[R-DEV]Mineral
PR:BF2 Lead Designer
Supporting Member
PR Server License Administrator

Mineral's Avatar
Default Re: [Tutorial] Using a tmp.con file to preserve map settings

Question, are mappers allowed to use the Wind modifier? As I told gx it was not due to it influencing the gameplay element of smoke.just confirming if I told gx the right thing or not

Mineral is offline Reply With Quote
Old 2013-01-13, 11:10   #5
[R-DEV]​Rhino
PR:BF2 Developer
Supporting Member

Rhino's Avatar
Default Re: [Tutorial] Using a tmp.con file to preserve map settings

effects are very much a client side thing so they shouldn't be used in such a way that affects gameplay, as we had one map in PR ages ago that had a massive sand storm over the map, and while in your view, the area in front of you was totally blocked by sand, for another player standing right next to you, or looking back at you from the other ridge, there might be a gap in the sand storm for them that they can see perfectly well though. But having it just affect chimney smoke etc a little is fine

Rhino is offline Reply With Quote
Old 2013-01-13, 11:11   #6
rodrigoma

rodrigoma's Avatar
Default Re: [Tutorial] Using a tmp.con file to preserve map settings

but if it does affect smoke grenades as well ;/
rodrigoma is offline Reply With Quote
Old 2013-01-13, 12:23   #7
[R-DEV]Mineral
PR:BF2 Lead Designer
Supporting Member
PR Server License Administrator

Mineral's Avatar
Default Re: [Tutorial] Using a tmp.con file to preserve map settings

yeah, I meant smoke grenades.

Mineral is offline Reply With Quote
Old 2013-01-13, 16:13   #8
Rabbit

Rabbit's Avatar
Default Re: [Tutorial] Using a tmp.con file to preserve map settings

Quote:
Originally Posted by [R-DEV]
Its not a good idea to put the kit loading bit in the tmp.con however since as you said, it will load the ones out of the init.con before any other, personally I just make my init.con read only so the editor doesn't save over it.[/QUOTE]

You are correct, but even if your init. says

Code:
gameLogic.setTeamName 1 "CHinsurgent"
gameLogic.setTeamName 2 "RU"

gameLogic.setTeamLanguage 1 "rebels"
gameLogic.setTeamLanguage 2 "RU"

gameLogic.setTeamFlag 0 "flag_neutral"
gameLogic.setTeamFlag 1 "flag_re"
gameLogic.setTeamFlag 2 "flag_ru"

gameLogic.setKit 1 0 "chinsurgent_officer" "pr_chinsurgent_soldier4"
gameLogic.setKit 2 0 "ru_officer" "pr_ru_soldier4"

gameLogic.setKit 1 1 "chinsurgent_officer_alt" "pr_chinsurgent_soldier5"
gameLogic.setKit 2 1 "ru_officer_alt" "pr_ru_soldier1"

gameLogic.setKit 1 2 "chinsurgent_rifleman" "pr_chinsurgent_soldier2"
gameLogic.setKit 2 2 "ru_rifleman" "pr_ru_soldier3"

gameLogic.setKit 1 3 "chinsurgent_rifleman_alt" "pr_chinsurgent_soldier3"
gameLogic.setKit 2 3 "ru_rifleman_alt" "pr_ru_soldier2"

gameLogic.setKit 1 4 "chinsurgent_specialist" "pr_chinsurgent_soldier1"
gameLogic.setKit 2 4 "ru_specialist" "pr_ru_soldier1"

gameLogic.setKit 1 5 "chinsurgent_medic" "pr_chinsurgent_soldier3"
gameLogic.setKit 2 5 "ru_medic" "pr_ru_soldier2"

gameLogic.setKit 1 6 "chinsurgent_support" "pr_chinsurgent_soldier6"
gameLogic.setKit 2 6 "ru_support" "pr_ru_soldier3"
But your tmp says.

Code:
run ../../Factions/faction_init.con 1 "chinsurgent"
run ../../Factions/faction_init.con 2 "ru"
Everything will load correctly, and because I'm already putting in info to my tmp.con I just do it anyway.

[QUOTE='[R-CON]rodrigoma;1853748
but if it does affect smoke grenades as well ;/
It does, for example

Wind speed 0


Wind speed 6


It effects it, but from the testing I have done, it's still very much usable. It's also nice to see the dust from a grenade fired from a grenade launcher wash away in the wind, looks awesome.

Rabbit is offline
Last edited by Rabbit; 2013-01-13 at 16:19..
Reply With Quote
Old 2013-01-13, 16:29   #9
[R-DEV]Mineral
PR:BF2 Lead Designer
Supporting Member
PR Server License Administrator

Mineral's Avatar
Default Re: [Tutorial] Using a tmp.con file to preserve map settings

therefore my concern, although it indeed maybe look visually better, PR players are used to the way PR smoke grenades work and know exactly how much it covers up in terms of volume. With a wind modifier this changes. So each player needs to get used of their smoke grenades being different on multiple maps. I don't think there is anything wrong with that, just asking for confirmation from the DEV-team on this Therefore my question.

Mineral is offline Reply With Quote
Old 2013-01-13, 16:46   #10
Amok@ndy
Retired PR Developer
Supporting Member

Amok@ndy's Avatar
Default Re: [Tutorial] Using a tmp.con file to preserve map settings

Quote:
Originally Posted by gx View Post
You are correct, but even if your init. says

Code:
gameLogic.setTeamName 1 "CHinsurgent"
gameLogic.setTeamName 2 "RU"

gameLogic.setTeamLanguage 1 "rebels"
gameLogic.setTeamLanguage 2 "RU"

gameLogic.setTeamFlag 0 "flag_neutral"
gameLogic.setTeamFlag 1 "flag_re"
gameLogic.setTeamFlag 2 "flag_ru"

gameLogic.setKit 1 0 "chinsurgent_officer" "pr_chinsurgent_soldier4"
gameLogic.setKit 2 0 "ru_officer" "pr_ru_soldier4"

gameLogic.setKit 1 1 "chinsurgent_officer_alt" "pr_chinsurgent_soldier5"
gameLogic.setKit 2 1 "ru_officer_alt" "pr_ru_soldier1"

gameLogic.setKit 1 2 "chinsurgent_rifleman" "pr_chinsurgent_soldier2"
gameLogic.setKit 2 2 "ru_rifleman" "pr_ru_soldier3"

gameLogic.setKit 1 3 "chinsurgent_rifleman_alt" "pr_chinsurgent_soldier3"
gameLogic.setKit 2 3 "ru_rifleman_alt" "pr_ru_soldier2"

gameLogic.setKit 1 4 "chinsurgent_specialist" "pr_chinsurgent_soldier1"
gameLogic.setKit 2 4 "ru_specialist" "pr_ru_soldier1"

gameLogic.setKit 1 5 "chinsurgent_medic" "pr_chinsurgent_soldier3"
gameLogic.setKit 2 5 "ru_medic" "pr_ru_soldier2"

gameLogic.setKit 1 6 "chinsurgent_support" "pr_chinsurgent_soldier6"
gameLogic.setKit 2 6 "ru_support" "pr_ru_soldier3"

if your init.con is looking like that, you havent set your init.con to read-only,

only place the 4km Fix in the tmp.con nothin more


Amok@ndy is offline Reply With Quote
Reply


Tags
file, map, preserve, settings, tmpcon, tutorial, tutorialtmpcon
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 04:37.