SetMapName

Parameters
name string
comment

Sets the map name.

note

This function shall only be used within the scope of function config in war3map.j, it is executed by the game when you load the lobby/selected the map for preview.

note

v1.32.10: WorldEditor limits map name input to 36 characters (ASCII/Unicode).

note

Old game versions (tested v1.0) used different sources for map name based on where it was intended to be displayed:

  • In map selection (to create a lobby), the map name embedded in HM3W map's header was used (see legacy .w3m/.w3x file format).
  • The map preview (right-hand side) runs the map's config code and thus makes use of SetMapName and strings in .wts files.
  • (Unused) Map name field in war3map.w3i

Reforged runs the configuration code in both cases. Therefore it always uses the proper name at the expense of increasing the loading time of map selection list.

note

Supports color codes (they also affect sorting)

note

Map name length:

  • Classic (1.0): Limited by total text width, e.g. DescriptionFirstL...
  • Reforged (1.32.10): Up to two lines, then limited by text width, e.g. VeryLongMapName-ABCDEFGHIJKLMNOP...
patch

1.00

Source
common.j
return type
nothing
Source code
native SetMapName           takes string name returns nothing