How do I learn the proper tags and keys to use?

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
User avatar
Legend_Rider
Posts: 35
Joined: June 20th, 2018, 4:51 pm

How do I learn the proper tags and keys to use?

Post by Legend_Rider »

I know that you can read about (almost?) everything on the wiki, and there are good bits of info on the forums, however it can be difficult to know "what to look for" and in some cases it's pretty challenging to find.
It's been recommended to look through existing content for various tid bits and to figure out how things work.

Best I can conclude, simply going over everything in the wiki (reading the whole thing) seems to be about the best way to understand WML and use the proper tags and especially the correct keys.

I'm very new to this language, (though I have some past experience using it), I never really truly learned I just messed around with pre existing things to make my own scenarios etc.

To use an example of something that will hopefully help point me in the right direction;
I've picked up guitar again recently, and through all of my past experience talking to people, following tutorials and getting lessons, until this time around, I hadn't had anybody tell me "where to place my fingers on the frets" nor "how to check and apply proper tensioning on the strings" it's often these "little things" that are brushed off as "unnecessary details" or "too basic" but they can be core fundamentals of learning.

Any help is greatly appreciated! Many thanks! :D
User avatar
octalot
General Code Maintainer
Posts: 786
Joined: July 17th, 2010, 7:40 pm
Location: Austria

Re: How do I learn the proper tags and keys to use?

Post by octalot »

WML's tags have been written over a long time by many people, which causes the problem that it's not entirely consistent. I think a lot of the learning curve is to know the mainline campaigns (from player experience, not needing to read all the WML), and using that knowledge to work out where to look for examples. Knowledge such as "the last scenario of campaign X auto-recalls all of the player's units", so that's where to look for that reference code.

Alternatively, ask on IRC / Discord and use other people's knowledge of where to look for reference code.

If a WML feature isn't used in any mainline campaign, then sadly it probably isn't being tested either.
User avatar
Legend_Rider
Posts: 35
Joined: June 20th, 2018, 4:51 pm

Re: How do I learn the proper tags and keys to use?

Post by Legend_Rider »

octalot wrote: January 25th, 2021, 4:49 pm WML's tags have been written over a long time by many people, which causes the problem that it's not entirely consistent. I think a lot of the learning curve is to know the mainline campaigns (from player experience, not needing to read all the WML), and using that knowledge to work out where to look for examples. Knowledge such as "the last scenario of campaign X auto-recalls all of the player's units", so that's where to look for that reference code.

Alternatively, ask on IRC / Discord and use other people's knowledge of where to look for reference code.

If a WML feature isn't used in any mainline campaign, then sadly it probably isn't being tested either.
Thank you for your response, good tips! This will help a lot in the journey learning WML!
User avatar
beetlenaut
Developer
Posts: 2825
Joined: December 8th, 2007, 3:21 am
Location: Washington State
Contact:

Re: How do I learn the proper tags and keys to use?

Post by beetlenaut »

WML Guide is a campaign on the add-on server. It's my attempt to explain common WML. There are lots of remarks in the code to explain what the various tags do--hopefully at the basic level you are looking for. The first scenario is simple and may be below your level, but the second scenario has some events, macros, and more complicated structures in it.
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
User avatar
Legend_Rider
Posts: 35
Joined: June 20th, 2018, 4:51 pm

Re: How do I learn the proper tags and keys to use?

Post by Legend_Rider »

beetlenaut wrote: January 26th, 2021, 3:57 am WML Guide is a campaign on the add-on server. It's my attempt to explain common WML. There are lots of remarks in the code to explain what the various tags do--hopefully at the basic level you are looking for. The first scenario is simple and may be below your level, but the second scenario has some events, macros, and more complicated structures in it.
I’ll check it out! Thank you! 8)
User avatar
Straff
Posts: 86
Joined: September 27th, 2020, 2:53 pm

Re: How do I learn the proper tags and keys to use?

Post by Straff »

User avatar
Legend_Rider
Posts: 35
Joined: June 20th, 2018, 4:51 pm

Re: How do I learn the proper tags and keys to use?

Post by Legend_Rider »

Straff wrote: January 26th, 2021, 9:36 pm Have you checked this sites? https://wiki.wesnoth.org/Category:WML_Tutorials
Yes, thank you :D
Very valuable resources!
Post Reply