Tutorials?

The place for chatting and discussing subjects unrelated to Wesnoth.

Moderator: Forum Moderators

Post Reply
aaronfeld
Posts: 52
Joined: June 9th, 2010, 7:30 pm

Tutorials?

Post by aaronfeld »

Are there any easily accseable tutorials about WML on the fourms here? I didn't know where to put this so Off-Topic was the safest way to go.

Thanks
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Tutorials?

Post by zookeeper »

Tutorials? Not really. Bits and pieces of information here and there mostly. I'll quote myself from some other thread:
zookeeper wrote:
Apparantly this would be ever so easy to code, so the issue isn't the difficulty of coding, its the difficulty of learning coding in the first place. Those who already know how to code wouldn't have this trouble.
Yes, that's the problem. It isn't hard once you understand the basic way to create your own usermade content, but that part is what's usually hard for newbies. There isn't any good tutorial for that. It'll take a bit of time and quite a lot of effort.

If you're a newbie with no prior experience in programming or modding games, then the first steps to make are pretty much always these:

Preliminary steps: a text editor and some search or grep tool, the latter because it's very very very convenient to be able to search for all occurrences of for example [store_unit] inside any directory tree so you can quickly find real, working examples of how it's used.

1. Download an add-on. Some simple campaign usually, maybe Dark Hordes for example.
2. Find out where the files of that add-on go.
3. Start changing things and testing our your changes, using the WML reference to look up what each tag or key does and what kind of values you can use.
4. Poke around the mainline data tree to learn a bit where which things go and use your search/grep to find examples if you're not sure how you can use some tag that you think you want to use.
5. Repeat steps 3 and 4 for as long as you wish.
6. Make a copy of that add-on, rename it, and start changing, removing and adding things so that you'll end up with a creation of your own.

Always take something that you know works as a base and then change that. I'm not sure if I've ever started to write a scenario or campaign file from scratch instead of just copying something that works and changing what I need.

Also you can apply the same to the mainline campaigns. HttT is a good, clean campaign to use as a base. Or EI, or TRoW. Take a backup of whatever campaign directory you're messing with or be prepared to uninstall and reinstall when you break them, because that will happen. I might even recommend mainline campaigns as a better playground, since the code of most of them tends to be a bit cleaner and simpler than what you'd find in many add-ons, I think. Maybe.
aaronfeld
Posts: 52
Joined: June 9th, 2010, 7:30 pm

Re: Tutorials?

Post by aaronfeld »

Okay I took Descent Into Darkness alrighty and started what you said before. Is that a good one to start with or sould I go to a different one? I have some knowedge of Ruby if that means anything in this.

Thanks
User avatar
Golden_Soldier
Posts: 265
Joined: July 20th, 2010, 10:26 pm
Location: Roanoke

Re: Tutorials?

Post by Golden_Soldier »

you may want to download the final exam it is help to people who are new to wml it helped me a lot :D
User avatar
Captain_Wrathbow
Posts: 1664
Joined: June 30th, 2009, 2:03 pm
Location: Guardia

Re: Tutorials?

Post by Captain_Wrathbow »

To elaborate a bit, "The Final Exam" is a very short UMC campaign that can be downloaded from the addon server. It's intended to help new coders learn about WML.

Also, when you hit the wall, post your question in the WML workshop. There are plenty of people willing to help you out when you get stuck. :)
User avatar
Gambit
Loose Screw
Posts: 3266
Joined: August 13th, 2008, 3:00 pm
Location: Dynamica
Contact:

Re: Tutorials?

Post by Gambit »

You can ask questions in IRC too.
User avatar
artisticdude
Moderator Emeritus
Posts: 2424
Joined: December 15th, 2009, 12:37 pm
Location: Somewhere in the middle of everything

Re: Tutorials?

Post by artisticdude »

Or try looking it up in the wiki.
"I'm never wrong. One time I thought I was wrong, but I was mistaken."
User avatar
pauxlo
Posts: 1047
Joined: September 19th, 2006, 8:54 pm

Re: Tutorials?

Post by pauxlo »

aaronfeld wrote:Are there any easily accseable tutorials about WML on the fourms here? I didn't know where to put this so Off-Topic was the safest way to go.
WML Workshop would be the right forum to ask, and there would be those tutorials as well.
aaronfeld
Posts: 52
Joined: June 9th, 2010, 7:30 pm

Re: Tutorials?

Post by aaronfeld »

The Wiki really is nice source of info.
User avatar
Captain_Wrathbow
Posts: 1664
Joined: June 30th, 2009, 2:03 pm
Location: Guardia

Re: Tutorials?

Post by Captain_Wrathbow »

Except it can be messy, difficult to navigate, and occasionally outdated. Despite all that, I still use it quite a bit, and yes, it is very useful. :)
aaronfeld
Posts: 52
Joined: June 9th, 2010, 7:30 pm

Re: Tutorials?

Post by aaronfeld »

Captain_Wrathbow wrote:Except it can be messy, difficult to navigate, and occasionally outdated. Despite all that, I still use it quite a bit, and yes, it is very useful. :)
Indeed!
Post Reply