We are happy to announce that Wesnoth is now able to accept donations on Liberapay . While Wesnoth does rely on the work of dedicated volunteers, no project can function completely cost-free. Revenue from the Apple App Store and from donations goes towards maintaining our servers,...
There have been numerous important forum posts and wiki articles written by users and developers. We reference these pages a lot, and decided to put them together in a convenient list.
Write clearly, be nice to others, and be very careful when posting anything related to politics or religion. When asking for help, remember that everyone here is a volunteer. Prefer editing your previous post over double posting. No animated avatars or graphical signatures. Don’t plagiarize other’s...
Yesterday I finished writing my second Lua tag. I took inspiration from the FutureWML page, and so we have an tag.
How it works:
This tag should harm selected units in a similar way to what happens in combat, and if their HP goes to 0 or less, kill them.
It requires the following:
-...
I was wondering if it would be possible to modify the right side unit information panel with lua? specifically would it be possible to list abilities vertically? Any tips or links would be appreciated.
They just annoy me! I have no clue how to program in Lua but I've been reverse engineering the files a bit. I had to edit the english.cfg to remove the names, but when that happened, labels just turned into error notes. I made them empty strings instead, but the labels still exist, they are just...
Reading through LuaWML, needing some help to understand a couple of things.
1. Is Lua capable of doing everything WML can inside tags?
2. Saw some functions like W.redraw, W.message, and are they preset in the core or ones the user has to define? I couldn't find further details on them from the...
First, I am a complete noob to lua, but I have read through some documentation, examples and wml_tags.lua, so I suppose I should understand a bit how it works.
In my campaign, I needed to create an useful way to remove s from units. Storing the unit, deleting the object, then unstoring it removes...
Hello!
I am planning an empire builder, and after checking other works, I figured I was going to need to learn Lua. So after reading the wiki page, I'm still slightly confused.
What does Lua do that normal wml cannot?
How and when is Lua used in an event?
For the custom campaign I'm designing, I want to personalize it using JSON data from a server. This would be quite easy to do in Lua if I had access to the Lua socket library from within LuaML, but I realize there are security considerations. I was thinking of modifying Scripting/lua.cpp so as to...
So I started to learn Lua, too. I'll use this thread to ask questions which will come up during my learning phase.
The first is already there:
I'm creating an (easy) inventory system, because I think that this will be useful for some future add-ons of mine while being not too difficult.
After...
Hello everyone. I'm trying to use the dialog building stuff. I'm trying to turn a series of s with s into one dialog with two lists and a set of sliders (much more user friendly).
Here's what I have so far:
It gives me the following error which doesn't really tell me much:
With Wesnoth's built-in dialog creation, there is a lot of flexibility. However, there's also a lot of boilerplate and room for mistakes, making even simple dialogs a pain and a half to set up. With ModularLua, you simply input a quick lua table representing the dialog, and it does the rest for...
Finally, while you can use string.format() , you don't have to.
I'm very sorry to use this thread for my question, but as this topic arose here: What are the advantages / disadvantages of using string.format() ?
Or is it just a matter of taste?
Sapient was right, I should've asked if someone already did this before. Obviously just checking the patches on Gna and the changelog wasn't enough. On that note, why isn't it yet mainlined then? Well, now it is. I committed in trunk the version from the WLP, with a small modification. :)
One thing that bugged me using , is that it's not possible to set any colour. So I just went ahead and modified the tag, so that you may set green, red or blue text colour. The problem is, when qouting the span color part, 'text' is no longer recognized as a variable. Is there any way to solve this?
I've been trying to display a framed dialog message that simply shows text in the format of some of the standard Wesnoth messages, such as It is now XXX's turn , the objectives, defeat messages etc. I'm in way over my head here, but with the help of the posts on this forum and...
Well, there seems to be no such thread until now. No editor war please, just want to hear what others use and the pros and cons.
There seem to be quite some good editors for windows. I'm usually using the SciTe editor included in the Lua for windows package, it is a bit lua-specialized. It...
Below is a list of most of the changes for LuaWML in 1.9.0. As always, the complete documentation can be found at LuaWML .
Action handlers, sides, and unit types, are now stored as simple tables, so as to simplify their handling. Function accessors (e.g. register_wml_action, get_unit_type_ids)...
I'm working on using wesnoth.show_dialog to create a custom dialog in 1.9.0, and I've run into a stumbling block. I need to color the text in a label widget. Using the old dialog, I just applied Pango to the string, but the label doesn't process the markup by default. As far as I can tell, it...
Anyways, I've been looking at a couple online tutorials for Lua and the documentation in LuaWML, and I think I have a general grasp for the syntax and stuff. I've looked at a number or examples (especially the ones in core), and I've been able to...
hi, I'm new to Lua development in Wesnoth. Just trying to write some simple lua code for a task, and I wonder how to log and debug lua. e.g. if i want to print the value of a variable on screen or in a log file or whatever console if there is one, how to do so? i heard that Wesnoth client could be...
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum