Map Labels

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
aokces
Posts: 25
Joined: December 21st, 2006, 1:09 am
Location: California, USA

Map Labels

Post by aokces »

I'm pretty new to WML, and I'm wondering how to add Labels to certain tiles on my map. Thanks.
wsultzbach
Posts: 245
Joined: November 28th, 2006, 12:42 am

Post by wsultzbach »

What's this annoying thing that appears at the bottom of every one of my posts?
Drake Blademaster
Posts: 202
Joined: March 26th, 2007, 5:38 am
Location: Wesmere

Post by Drake Blademaster »

If you mean "How do I display a map?" Here's your answer:

Code: Select all

[map]agaggfsgasgasg
asgsdgsadgsagsgsfg
sagasdglkdlksh
ghaqlshgdafhg[/map]
becomes

[map]agaggfsgasgasg
asgsdgsadgsagsgsfg
sagasdglkdlksh
ghaqlshgdafhg[/map]
aokces
Posts: 25
Joined: December 21st, 2006, 1:09 am
Location: California, USA

Post by aokces »

I've read the wiki thing already, but I don't understand the overall concept of where to go to edit/add the label codes. Is there another file thats created in addtion to the map file somewhere?
User avatar
Viliam
Translator
Posts: 1341
Joined: January 30th, 2004, 11:07 am
Location: Bratislava, Slovakia
Contact:

Post by Viliam »

Yes. Map is one file, scenario CFG is another file. (The map is included from scenario CFG.) You write WML tags into scenario file. Something like this:

Map file:

Code: Select all

agaggfsgasgasg
asgsdgsadgsagsgsfg
sagasdglkdlksh
ghaqlshgdafhg
Scenario file:

Code: Select all

[scenario]
  map_data={map file}
  [label]
    x=20
    y=30
    text="The Dark Portal"
  [/label]
[/scenario]
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Post by zookeeper »

Viliam wrote:Yes. Map is one file, scenario CFG is another file. (The map is included from scenario CFG.) You write WML tags into scenario file. Something like this:

Map file:

Code: Select all

agaggfsgasgasg
asgsdgsadgsagsgsfg
sagasdglkdlksh
ghaqlshgdafhg
Scenario file:

Code: Select all

[scenario]
  map_data={map file}
  [label]
    x=20
    y=30
    text="The Dark Portal"
  [/label]
[/scenario]
With the exception that the scenario file is not "like that".
User avatar
Viliam
Translator
Posts: 1341
Joined: January 30th, 2004, 11:07 am
Location: Bratislava, Slovakia
Contact:

Post by Viliam »

OK, this is a better example: (based on 2p_Blitz.cfg)

Code: Select all

[multiplayer]
  id=my_scenario
  name= _ "2p - My Scenario"
  description= _ "My multiplayer scenario. Recommended setting of 2 gold per village."
  map_data="{maps/multiplayer/my_map}"

  {DEFAULT_SCHEDULE}
  {DEFAULT_MUSIC_PLAYLIST}

  [side]
    [ai]
      villages_per_scout=8
    [/ai]
    side=1
    canrecruit=1
    controller=human
    team_name=north
    user_team_name= _ "teamname^North"
    fog=yes
  [/side]
  [side]
    [ai]
      villages_per_scout=8
    [/ai]
    side=2
    canrecruit=1
    controller=human
    team_name=south
    user_team_name= _ "teamname^South"
    fog=yes
  [/side]

  [label]
    x=20
    y=30
    text="The Dark Portal"
  [/label]

[/multiplayer]
Post Reply