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...
This is my goal:
After a multiplayer game starts, the AI has its recall list enabled (via a MP Mod), to which certain generated units can be placed in the list for the AI to recall.
This is my obstacle:
For any side to have a recall list, the side's persistent variable must be set to yes /true,...
So I am trying to make a mod that reduces random damage deviation in Wesnoth. The idea is, before every attack I calculate a sequence of chances that will override literal chances of hit for every hit, so that the randomness distribution can be limited.
This is relevant for this sub-forum too. If cross-posting is not allowed, please modify this post and delete the rest of the text, but leave this link: (I can do the modifying if you want me to).
I want to do a lua mod that works with all new versions of Wesnoth. Where is a good place to start,...
hi i have a problem:
i use wesnoth.game_events.on_event and wesnoth.current.event_context to handle events, worked very good so far.
but now i have a problem:
in the enter_hex events the location of the unit and the location where the event is trieggered is not aways the same.
i think...
In short: when your leader dies, an another unit from a pre-defined list takes the mantle and you can fight on. If there's no one left alive from that list, a specific event is called. It's up to you what to do then: proceed to defeat or switch to an another scenario with a spare set of heroes...
hi i wrote a scenario that uses a lot of lua and also some gui2 codes.
the problem is that when i see the replay. the replay shows me the gui2 dialog.
and because the dialog influences the game, the replay will be detroyed if i dont make exactly the same coiches as in the original.
I've decided to put my (limited) knowledge of Lua to use to make some WML tags. So far, I've finished one, but I'll (hopefully) finish the other ideas I have soon.
Tags:
:
This tag blinks an image, like HIGHLIGHT_IMAGE does in core, but in lua, is more compact, and has more options.
Usage:
Hi, as everybody know i am the author of biggest era in wesnoth, even with ordered list of units its hard to find out which unit id is written wrong in codes used in my era. To make it easier i really could be happy if someone could write me here how to change game codes (even this from core...
Lately, I was used to do a lot of variable-related stuff with WML, that resulted in long calculations, than resulted sometimes in visible times of execution (I mean like, 0.3 second, the code was like 200 KiB long, but contained many cycles and macros), while creating and scattering a hundred units...
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...
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