What if the player just wants the map without additional scripting?
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
The challenge mode already has .ini files that allow you to add scripts to a map. I am going to look into reusing this functionality for non-challenge maps. Ideally, non-challenge maps should be able to set all the same things that challenge maps do. I may have to modify the challenge .ini file format a bit to generalize this.
If you alter the challenge ini file, could you change it so that things are zero-indexed like in the rest of WZ? It's über-confusing having 1-referenced values in challenge inis. Same applies to team numbers in <mapname>.ini.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
Some maps with challenges do exist already, probably not a good idea to break compatibility; i'd easily fix mine (whenever they are suitable for 3.2+), but there may be some we don't know about.
Also, i'm a bit scared to allow arbitrary file names for scripts. Maps may start to conflict if somebody includes an edited version of the script into his map and doesn't rename it. Even with challenges: we don't have a good naming convention for challenge files anywhere. I believe everything must be forced to stay inside the map's physfs folder.
Maybe deprecate the /challenges/ folder completely and merge its functionality into the map .ini?
Currently it's possible to create a challenge for any existing map, and that functionality is useful IMHO. If we force challenges and maps to be bundled together, it will be harder for people who don't make maps to create challenges. There should be some ability for a non-mapmaker to create a challenge (or mini campaign) and a non-scripter to make maps.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
If I understand correctly, when a map is selected that adds it's folders to the search paths in the physfs system, couldn't you just override multiplay/skirmish/rules.js by having that path and file in the map?
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
aubergine wrote:Currently it's possible to create a challenge for any existing map, and that functionality is useful IMHO. If we force challenges and maps to be bundled together, it will be harder for people who don't make maps to create challenges. There should be some ability for a non-mapmaker to create a challenge (or mini campaign) and a non-scripter to make maps.
It's easy to target an existing map in the .addon file
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
If you create two event listeners of same name, the second overwrites the first, unless you do some clever stuff with getter/setter properties.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
aubergine wrote:If you create two event listeners of same name, the second overwrites the first, unless you do some clever stuff with getter/setter properties.