As Dnamro asked me what was the solution found to make my last map work with servers, I thought that it would be a good idea to sum up the content of the Game type files inserted in each map. The problems for my map came indeed from them.

The remed out lines are removed for clarity.

Notice that for each game type, the game type .con file which is under the root directory of the map and the game type .con file which is under the \GameTypes\ must have the same content!

This is not the case of the default game maps (Berlin, Bulge,...). Their root game types .con files don't use the "if v_arg1 == host" loop, and the lines we expected to see in this loop are just followed with " v_arg1". Does it mean that they can't be used to create a game? Are they only "client" maps? Please confirm these aspects!


***** CONQUEST *****

Content of mapname\Conquest.con and mapname\GameTypes\Conquest.con:

QUOTE
Game.setNumberOfTickets 1 100
Game.setNumberOfTickets 2 100
Game.setTicketLostPerMin 1 10
Game.setTicketLostPerMin 2 10

run Conquest/SpawnpointManagerSettings
run Conquest/SoldierSpawnTemplates
run Conquest/SoldierSpawns
run Conquest/ObjectSpawnTemplates
run Conquest/ControlPointTemplates

if v_arg1 == host
run Conquest/ObjectSpawns
run Conquest/ControlPoints
else
endIf

The tickets parameters have to be adapted to your map.


***** COOPERATION *****

Content of mapname\Coop.con and mapname\GameTypes\Coop.con:

QUOTE
if v_arg1 == host
game.timeToNextWave 0
Game.setNumberOfTickets 1 100
Game.setNumberOfTickets 2 100
Game.setTicketLostPerMin 1 10
Game.setTicketLostPerMin 2 10
endIf

run SinglePlayer/SoldierSpawnTemplates
run SinglePlayer/SoldierSpawns
run SinglePlayer/SpawnpointManagerSettings
run SinglePlayer/ObjectSpawnTemplates
run SinglePlayer/ControlPointTemplates

if v_arg1 == host
run ai
run SinglePlayer/ObjectSpawns
run SinglePlayer/ControlPoints
else
endIf

The tickets parameters have to be adapted to your map. Notice that they are in a "if v_arg1 == host" loop, unlike Conquest game type .con files!


***** CAPTURE THE FLAG *****

Content of mapname\Ctf.con and mapname\GameTypes\Ctf.con:

QUOTE
run Ctf/SpawnpointManagerSettings
run Ctf/SoldierSpawnTemplates
run Ctf/SoldierSpawns
run Ctf/ObjectSpawnTemplates
run Ctf/ControlPointTemplates

if v_arg1 == host
run Ctf/ObjectSpawns
run Ctf/ControlPoints
object.create GEBase
Object.absolutePosition 93.58/122.00/827.23
Object.rotation 0/0/0
object.create USBase
Object.absolutePosition 877.75/83.88/441.06
Object.rotation 30/0/0
else
object.create FlagPole
Object.absolutePosition 93.58/122.00/827.23
Object.rotation 0/0/0
object.create FlagPole
Object.absolutePosition 877.75/83.88/441.06
Object.rotation 30/0/0
endIf

The flag parameters have to be adapted to the map. Remember these must NOT be Control points listed in the mapname\Ctf\ files of your map. Attached soldier spawn positions and vehicle spawn positions can't be linked to them, so they must be set for the team instead.


***** TEAM DEATH MATCH *****

Content of mapname\tdm.con and mapname\GameTypes\tdm.con:

QUOTE
run TDM/SpawnpointManagerSettings
run TDM/SoldierSpawnTemplates
run TDM/SoldierSpawns
run TDM/ObjectSpawnTemplates
run TDM/ControlPointTemplates

if v_arg1 == host
run tdm/ObjectSpawns
run tdm/ControlPoints
else
endIf



One last thing, the game type .con file names must respect the big letters / small letters:
Conquest.con
Coop.con
Ctf.con
tdm.con (no big letter).

The game type folder too:
\Conquest\
\SinglePlayer\
\Ctf\
\TDM\ (big letters only, don't ask me why!)

It's really important. DC players have surely notice that when they want to create a game, the game type list contains twice "Team Death Match". One of them gives an access to all the TDM maps, and the other one only gives access to ONE map, DC_Oil_Fields! And you know what? Whereas all the maps respect the big letters rules, the only map which appears in the second TDM map list doesn't! Check its content, with WinRFA for example! As a consequence, the game considers "this" TDM game type as a game type completely different from the other TDM games of the other maps.
I can confirm that
QUOTE
Their [the default game maps (Berlin, Bulge,...)] root game types .con files don't use the "if v_arg1 == host" loop,

is incorrect. The original BF1942 coop maps all have if v_arg1 == host in their main rfa's. The main rfa is where the dedicated server checks for coop and it is important to have that if v_arg1 == host code in there.

I checked
Berlin
Bocage
Battleaxe
El Alamein
GAzala
Guadalcanal
Tobruk
Stalingrad

They all have if v_arg1 == host in the main rfa.

It is important that the main rfa has coop.con and the Gametypes coop.con in it for dedicated server use. The Windows dedicated server can read patches, but I think it sets up the connection from the main rfa.

Here are some other links about dedicated servers and connection problems.
So the main .rfa map map_name\Conquest.con file is always used by servers, even if there are _00X.rfa map files, containing a new map_name\Conquest.con file for example ?

Let's have a look at Berlin:

There is a file Berlin\Conquest.con file in Berlin_003.rfa:
QUOTE
Game.setNumberOfTickets 1 80
Game.setNumberOfTickets 2 100
Game.setTicketLostPerMin 1 30
Game.setTicketLostPerMin 2 5

run Conquest/SpawnpointManagerSettings

run Conquest/SoldierSpawnTemplates
run Conquest/SoldierSpawns

run Conquest/ObjectSpawnTemplates
run Conquest/ControlPointTemplates

run Conquest/ObjectSpawns v_arg1
run Conquest/ControlPoints v_arg1


Look at the two last lines: instead of being in an if loop, they use the " v_arg1" at their end.

But the main Berlin\Conquest.con file we find in the main Berlin.rfa file uses the if loop:
QUOTE
Game.setNumberOfTickets 1 60
Game.setNumberOfTickets 2 100
Game.setTicketLostPerMin 1 50
Game.setTicketLostPerMin 2 10

run Conquest/SpawnpointManagerSettings

run Conquest/SoldierSpawnTemplates
run Conquest/SoldierSpawns

run Conquest/ObjectSpawnTemplates
run Conquest/ControlPointTemplates

if v_arg1 == host
rem ----- Host
rem ----------------------------------------------------------------------------

run Conquest/ObjectSpawns
run Conquest/ControlPoints

rem ----------------------------------------------------------------------------
endIf


Does this file makes the map_name\Conquest.con files of the Berlin_003.rfa map extension be ignored?

Generally speaking, does the file map_name\game_type.con in the main .rfa level file makes the map_name\game_type.con files of the _00X.rfa map extensions be ignored?
I think that if the main rfa has if v_arg1 == host in it, then that is good enough for the server to start. Now, if you make patch files .xxx then you still need the coop.con and conquest.con, but they are mainly for the clients to connect to the server, so I guess for the clients, the if v_arg1 == host is not necessary in the coop or conquest con. So basically, you don't need the if v_arg1 == host in patches because it's already being used by the dedicated server from the main rfa.
i think i have to clarify some things and to correct lots of statements that have been made in here by just reading the original files without thinking of the structure behind them:

1.
QUOTE
Notice that for each game type, the game type .con file which is under the root directory of the map and the game type .con file which is under the \GameTypes\ must have the same content!

this is simply wrong!

my setup:
real code in the root .con files, only one line in the gametypes .con files: "run ../<gametype>.con"
works great.

and i bet, that you may even supply an EMPTY .con file in "gametypes", because its just for enlisting the modes.

it is correct, that the files in the gametypes folder are scanned case-sensitive to list the available game modes.

note, that the game tells you about any gamemode the map has, even if it finds nothing else than an empty new_gamemode.con in the gamemodes folder (and though, the mode won't work). every new game mode will initialy be listed with the name of the .con file, which can be overwritten/translated in the lexiconAll.dat file.

2.
QUOTE
"if v_arg1 == host" loop,

this is a CONDITIONAL STATEMENT, not a LOOP

"while ... endWhile" is a LOOP STATEMENT.

basics in programming chapter I smile.gif

3.
QUOTE
The tickets parameters have to be adapted to your map. Notice that they are in a "if v_arg1 == host" loop, unlike Conquest game type .con files!

this setup with additional if statements is NOT necessary.
i never used it.

4.
QUOTE
if v_arg1 == host
run Ctf/ObjectSpawns
run Ctf/ControlPoints
object.create GEBase
Object.absolutePosition 93.58/122.00/827.23
Object.rotation 0/0/0
object.create USBase
Object.absolutePosition 877.75/83.88/441.06
Object.rotation 30/0/0
else
object.create FlagPole
Object.absolutePosition 93.58/122.00/827.23
Object.rotation 0/0/0
object.create FlagPole
Object.absolutePosition 877.75/83.88/441.06
Object.rotation 30/0/0
endIf

of couse you can not attach spawns to the flagpoles.
this is just the setup for the flags to CAPTURE in CTF, not for controlpoints!!!

QUOTE
The game type folder too:
\Conquest\
\SinglePlayer\
\Ctf\
\TDM\ (big letters only, don't ask me why!)

THIS IS WRONG!!!

you don't even need those folders!
why?
well, just have some deeper looks and don't copy everything from dice, guys!
where are the conquest paths used? and the files in them?
there's only one file to check:
conquest.con
there are several run commands in there, and if you change them, you can setup the files wherever you want.
they even do not have to be in the same .rfa archive.

you may even go one step further:
copy paste all the contents of the .cons in the conquest folder into the conquest.con (order does not matter, but keep the if/else structure!) and you're done.
all those files are not hardcoded and the engine does not need them!
they are just there for more easier editing!


you also could copy paste the code of every vehicle into several HUGE .CON FILE under /objects/common/objects.con,network.con,geometries.con,weapons.con,physics.con

this would work.
same for AI (where we actually do this).

what i'm not sure about is, if the engine simply scans all the objects.rfa for con files and executes them all, so you even may pack ALL THE CODE INTO ONE HUGE FILE.


well, what i wanted to say, is, that VERY VERY FEW things are really hardcoded in bf, regarding file structure, and that there are more possibilities that you do not seem to recognize atm.

think about it.
feel free.
"hardcoded" is a prohibited word