Scripting Language
Moderator: Forum Moderators
Scripting Language
Ok, I am absolutely new at this whole thing. I have been searching for well over an hour now and still have not found what i was looking for.
My question is what is the scripting language used by Battle for Wesnoth? I have seen both LUA and python tossed around a lot on Google and in the sites create page. If you can, I would thoroughly enjoy having this answered soon and hopefully maybe some one could point me in a direction where their might be some in depth tutorials on how to create new scripts for the game.
My thanks in advanced!
My question is what is the scripting language used by Battle for Wesnoth? I have seen both LUA and python tossed around a lot on Google and in the sites create page. If you can, I would thoroughly enjoy having this answered soon and hopefully maybe some one could point me in a direction where their might be some in depth tutorials on how to create new scripts for the game.
My thanks in advanced!
Re: Scripting Language
The main scripting language for Wesnoth is WML (Wesnoth Markup Language). With it, most add-ons can be written.
There was some support for a python AI, but IIRC it was removed due to security concerns. Now we have Lua for more advanced tasks than WML can handle (basically Lua is able to create new WML tags, or to manage an AI).
So, I hope this was correct.
There was some support for a python AI, but IIRC it was removed due to security concerns. Now we have Lua for more advanced tasks than WML can handle (basically Lua is able to create new WML tags, or to manage an AI).
So, I hope this was correct.
UMC Story Images — Story images for your campaign!
- Elvish_Hunter
- Posts: 1575
- Joined: September 4th, 2009, 2:39 pm
- Location: Lintanir Forest...
Re: Scripting Language
As the name suggest, WML is a markup language - more like HTML. Its purpose is to describe what happens in a certain scenario. If we want to follow our comparison with a web page, then Lua can be considered our Javascript, as both are scripting languages and both can be used to define functions and other things.Crendgrim wrote:The main scripting language for Wesnoth is WML (Wesnoth Markup Language). With it, most add-ons can be written.
In that case, you need to learn the Lua language first. This site is a good starting point: http://lua-users.org/wiki/TutorialDirectorymrdebose wrote:maybe some one could point me in a direction where their might be some in depth tutorials on how to create new scripts for the game.
Current maintainer of these add-ons, all on 1.16:
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
Re: Scripting Language
It’s important to know that WML is more than just a markup language. WML contains if statements, conditional tags, variables, and other programming features. WML can do a lot; Lua can do even more. However, WML has much simpler syntax, and for most, is much easier to learn and use.
Resources on the wiki:
Resources on the wiki:
Wesnoth Bestiary ( PREVIEW IT HERE )
Unit tree and stat browser
Canvas ( PREVIEW IT HERE )
Exp. map viewer
Unit tree and stat browser
Canvas ( PREVIEW IT HERE )
Exp. map viewer