New to Scenario building

The place to post your WML questions and answers.

Moderators: Forum Moderators, Developers

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.

New to Scenario building

Postby Ephelemi » September 22nd, 2017, 10:15 am

Dear Wesnoth Content Creators,

currently I am on a venture to become one of you, but as you might remember, the start of learning this is a bit confusing. So I have a few questions. First of all, I am not new to programming, in fact I have experience in both Microsoft VB and C, but from what I've seen, WML is not that similair to either of those. But it doesn't look to complicated either. There seem however to be a lot of special terms, which imo seems counterintuitive for a language that's supposed to be easy to use. Anyways, my real question is if it is legal to use code snippets from any add-on on the server if i want to use it for content i want to upload there myself or is that frowned upon (And I'm talking snippets, not pages of code)?
My next question concerns the implementation of Lua. I guess it comes in whenever you want to make something that WML isn't powerful enough for? Or am I wrong here? And are there any clearly arranged examples where it is used?
So I guess the best way to start is to get down the WML basics by reading the tutorial (or better reading the code of a simple campaign) and go from there using the WML reference whenever you need something that hasn't been covered?

Thanks in advance!
Ephelemi
 
Posts: 5
Joined: September 11th, 2017, 10:47 am

Re: New to Scenario building

Postby Paulomat4 » September 22nd, 2017, 10:34 am

Yes, WML is quite easy to learn. The best way to learn it is to follow the tutorials on the wiki. You will get used to it pretty soon :)
Yes, you may use any code snippets you find on the add-on server. Try to find code similar to what you want to do and modify it to suit your needs. That is the best way to learn. If you have questions about the code or errors then post in the wml workshop, the wml wizards from the forum will gladly help you.

Lua is indeed more powerful and often faster than wml but it is not at all required to code a campaign or anything. You'll most likely never need it. There are also a few examples floating around on the wiki. The User Enclave has a big Lua thread here on the forum that you might want to look at if you want to tackle Lua.
Creator of Dawn of Thunder and Global Unitmarkers

"I thought Naga's used semi-automatic crossbows with incendiary thermite arrows . . . my beliefs that this race is awesome are now shattered." - Evil Earl
User avatar
Paulomat4
Moderator
 
Posts: 684
Joined: October 16th, 2012, 3:32 pm
Location: Wesmere library, probably summoning Zhangor

Re: New to Scenario building

Postby Tad_Carlucci » September 22nd, 2017, 4:20 pm

Also look at the mainline campaigns. They have had more eyes them and so should have better code with fewer errors.

Lua can be much faster and can do things WML can not. But you generally do not need it. When you do you will know so wait on learning Lua.
I forked real life and now I'm getting merge conflicts.
Tad_Carlucci
Developer
 
Posts: 216
Joined: April 24th, 2016, 4:18 pm


Return to WML Workshop

Who is online

Users browsing this forum: No registered users and 3 guests