Jump to content

Scenario Games/custom map - can't remove the ceasefire timer


Apeterson
 Share

Recommended Posts

Hi All,

I've been experimenting with my own maps and have run into an issue.  When I play them, I can't remove the ceasefire timer in Scenario mode (and it is a long, 25 minute one.)  I can't seem to find a way to shut it off in the Atlas editor or in game (in game, it won't allow my to remove it because the option isn't interactable.)  Any ideas?

Thanks!

Link to comment
Share on other sites

Thanks, I checked the XML file for the map, but couldn't see any field for it.  Maybe it's optional, and isn't included by default?  Could you tell me the field name, and the structure it should be added into?

One other thing, I've seen the value in game change, first, there was no ceasefire, then it was 25 minutes, and now it's 10 minutes.  The only thing I can think of is that when I load other maps, it might be grabbing those map's info and using it for later maps.

Link to comment
Share on other sites

Not the 'perisstmatchsettings' feature, but the equal persisting of settings when changing the map.

I couldn't find any map that specifies a Ceasefire timer currently, so if this is truly happening with scenario maps only, I guss you have some custom maps with ceasefire timers.

Basically this one, besides that all of the hardcoding should be removed.

diff --git a/binaries/data/mods/public/gui/gamesetup/gamesetup.js b/binaries/data/mods/public/gui/gamesetup/gamesetup.js
index 7096014..fc7a3d3 100644
--- a/binaries/data/mods/public/gui/gamesetup/gamesetup.js
+++ b/binaries/data/mods/public/gui/gamesetup/gamesetup.js
@@ -2054,6 +2054,7 @@ function selectMap(name)
                delete g_GameAttributes.settings.WonderDuration;
                delete g_GameAttributes.settings.LastManStanding;
                delete g_GameAttributes.settings.RegicideGarrison;
+               delete g_GameAttributes.settings.Ceasefire;
        }
 
        if (mapSettings.PlayerData)

One may argue that scenario maps should persist some settings such as the gamespeed, or argue that none of them shoud be persisted. The problem is that every setting has a different character, it was and still is hard to unify them because they are inherently different.

Anyway; you can add a workaround for the map and just force 0 ceasefire for your scenario map. You can see the format of the gamesettings in the first line of the replay file commands.txt. One can format that line with https://jsonlint.com:

start {
	"settings": {
		"PlayerData": [{
			"Name": "elexis",
			"Civ": "iber",
			"Color": {
				"r": 21,
				"g": 55,
				"b": 149
			},
			"AI": "",
			"AIDiff": 3,
			"AIBehavior": "random",
			"Team": -1
		}, {
			"Name": "Player 2",
			"Civ": "rome",
			"Color": {
				"r": 150,
				"g": 20,
				"b": 20
			},
			"AI": "",
			"AIDiff": 3,
			"AIBehavior": "random",
			"Team": -1
		}, {
			"Name": "Player 3",
			"Civ": "ptol",
			"Color": {
				"r": 86,
				"g": 180,
				"b": 31
			},
			"AI": "",
			"AIDiff": 3,
			"AIBehavior": "random",
			"Team": -1
		}, {
			"Name": "Player 4",
			"Civ": "ptol",
			"Color": {
				"r": 231,
				"g": 200,
				"b": 5
			},
			"AI": "",
			"AIDiff": 3,
			"AIBehavior": "random",
			"Team": -1
		}, {
			"Name": "Player 5",
			"Civ": "ptol",
			"Color": {
				"r": 50,
				"g": 170,
				"b": 170
			},
			"AI": "",
			"AIDiff": 3,
			"AIBehavior": "random",
			"Team": -1
		}, {
			"Name": "Player 6",
			"Civ": "cart",
			"Color": {
				"r": 160,
				"g": 80,
				"b": 200
			},
			"AI": "",
			"AIDiff": 3,
			"AIBehavior": "random",
			"Team": -1
		}, {
			"Name": "Player 7",
			"Civ": "iber",
			"Color": {
				"r": 220,
				"g": 115,
				"b": 16
			},
			"AI": "",
			"AIDiff": 3,
			"AIBehavior": "random",
			"Team": -1
		}, {
			"Name": "Player 8",
			"Civ": "gaul",
			"Color": {
				"r": 64,
				"g": 64,
				"b": 64
			},
			"AI": "",
			"AIDiff": 3,
			"AIBehavior": "random",
			"Team": -1
		}],
		"VictoryConditions": [],
		"CircularMap": true,
		"Size": 320,
		"PopulationCap": 300,
		"StartingResources": 300,
		"Ceasefire": 0,
		"RelicCount": 2,
		"RelicDuration": 20,
		"WonderDuration": 20,
		"RegicideGarrison": false,
		"Nomad": false,
		"RevealMap": false,
		"ExploreMap": false,
		"DisableTreasures": false,
		"DisableSpies": false,
		"LockTeams": false,
		"LastManStanding": false,
		"CheatsEnabled": true,
		"Name": "African Plains",
		"Script": "african_plains.js",
		"Description": "The central region of the vast continent of Africa, birthplace of humanity. Players start in a lush area teeming with vegetation and wildlife.",
		"Preview": "african_plains.png",
		"Keywords": [],
		"RatingEnabled": false,
		"TriggerScripts": [],
		"VictoryScripts": [],
		"mapType": "random",
		"Seed": 2739431346,
		"AISeed": 100161980
	},
	"mapType": "random",
	"mapPath": "maps/random/",
	"mapFilter": "all",
	"script": "african_plains.js",
	"gameSpeed": 1,
	"map": "maps/random/african_plains",
	"matchID": "77899E47129312ED",
	"timestamp": 1531835751,
	"engine_version": "0.0.23",
	"mods": [
		["public", "0.0.23"]
	]
}

 

Link to comment
Share on other sites

Thanks, I was able to add the ceasefire line to my file and get it to work.

By the way, I'm a veteran game dev, and I like your game.

From my perspective, as a general rule, map-related settings should not persist across maps (ex: the ceasefire timer for one map shouldn't persist onto another map.) This is because the map is balanced based on these settings, and the way one map plays can be drastically different than another.

I think the real question is the gameplay settings (e.g. AI difficulty, game speed, etc.) and I think that in general, these can persist across maps.

Link to comment
Share on other sites

That is true for some map settings for some map types.

In onlne multiplayer almost exclusively random maps are used and currently 70+ random maps support all gamesettings. So people (rightfully) expect their settings to be persisted, when they already discussed for 30min the teams and settings but only want to play a different map.

For scenario maps only the gamespeed can be chosen currently, and I guess that also makes sense to persist (but certainly not the rest including ceasefire)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...