My previous post was not so clear, so i will repost it here, and add examples on how to do an override on map datas.
First of all, i just tested, and you can add custom tags in smd. They are just ignored by the engine.
So, to beging, what a 'normal' smd looks like ?
Code: Select all
[MAP]
{
Description=Battle on the red planet;
TidalStrength=20;
Gravity=130;
MaxMetal=2.6;
ExtractorRadius=30;
...
}
So now, the trick is to make the engine looks at our values for MaxMetal for exemple, but without losing the original values.
This can be achived by creating new flags, so the file looks like this.
Code: Select all
[MAP]
{
Description=Battle on the red planet;
TidalStrength=20;
Gravity=130;
MaxMetal=2.6;
ExtractorRadius=30;
DefaultTidalStrength=20;
DefaultGravity=130;
DefaultMaxMetal=2.6;
DefaultExtractorRadius=30;
...
}
Default values are defined by the map creator (or the client, as we will see later), and are NEVER modified. The client modify only the 'normal' values (MaxMetal for exemple).
So, when you host a game, let's see what would happen :
1. You host or you join a game
2. Client look at the smd file. If it find the Default flags, go to 4. else go to 3.
3. The client create the Default flags and copy the 'normal' values to the Default flags
4. The client read the smd file, and show the Default values.
5. You can modify thoses values
6. You start the game, all the clients modify the smd so the 'normal' flags match the lobby values.
7. When you rehost, the default values are taken, and so the previous game don't hurt all other games.
(Point 3 is for compatibility, so all the old TAS maps don't need to be modified).
This kind of modifications are invisible for the engine, and for the player. Only the lobby know something happened.