- Joined
- Oct 13, 2012
- Messages
- 28
I tested custom code in the config() function using JassHelper feature:
I didn't notice any difference with custom values in SetMapName() and SetMapDescription(): what do these functions? It looks like WC3 in the lobby takes names from the metadata, not by calling config() function.
Also I tried to test timers: they start only after game loading (however, I had no opportunity to test it for 2 players: probably, it allows to measure loading time with respect to the very first player with fastest time?).
I wonder if somebody knows useful/curious tricks with config() function. For example, in theory, if SetMapName() changes the name of the map for Battle.net lobby interface, one can detect language of the client (e.g. via GetLocalizedString) and set translated names and descriptions (if names/descriptions are not part of sync algorithm of course).
Code:
//! inject config
call SetMapName("Foo")
call SetMapDescription("Bar")
call SetPlayers(10)
call SetTeams(10)
call SetGamePlacement(MAP_PLACEMENT_TEAMS_TOGETHER)
// ...
call InitCustomPlayerSlots()
call InitCustomTeams()
call InitAllyPriorities()
//! endinject
I didn't notice any difference with custom values in SetMapName() and SetMapDescription(): what do these functions? It looks like WC3 in the lobby takes names from the metadata, not by calling config() function.
Also I tried to test timers: they start only after game loading (however, I had no opportunity to test it for 2 players: probably, it allows to measure loading time with respect to the very first player with fastest time?).
I wonder if somebody knows useful/curious tricks with config() function. For example, in theory, if SetMapName() changes the name of the map for Battle.net lobby interface, one can detect language of the client (e.g. via GetLocalizedString) and set translated names and descriptions (if names/descriptions are not part of sync algorithm of course).