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...
I have function wesnoth.wml_actions.make_units_wander(cfg) working fine, except for the filter part. I want to pass that filter to wesnoth.units.find_on_map(). Currently, no matter what I try I get all units on the map. At this point, I'm just guessing stuff. How do I...
This is my fifth add-on, Gui Debug Tools.
It is written completely in Lua.
Current version is 0.10.2or the Wesnoth Repository Master Branch / 1.16 series.
First released for BfW 1.13.5.
I have found the tools in this add-on useful in making bug reports and developing add-ons.
I am trying to use Lua to check for and then replace an ability with another one but I ran into some problems which the wiki doesn't seem to have answers to.
I added where my confusion started since I am skeptical if I can add or remove abilities like this. This can be done with WML, but...
I've been using this code for a long time (not mine) to remove objects in all units, including units in the recall list, an advantage that the usual tag doesn't have.
How could I make it support a comma separated list as well? I have many objects to delete in some events, and It would save me...
Is there a way to hide the energy bars, XP, orbs and overlays, the same way this WML code does?
To be able to apply it more generally in more situations with lua, not only on with_bars=no , which is the only way in all WML that I can do that.
Sorry for the newbie lua question.
I'd like to use wesnoth.get_units to get an array of a units for in an area with a given radius around a tile. Something like:
But of course radius is not in SUF, it needs to go within a inside the SUF. What would be the syntax to achieve this? Unfortunately...
Is it possible to replace this text with a custom one?
Apparently, there's no LUA or WML, or txt that you could edit to replace GUI text. Turns out, this particular piece of text is contained in report.cpp. As I understand, it isn't possible to edit compiled C++ files, or download fhem from GIT...
My scenario starts off by generating 2700 hexes. This takes less than a minute.
Every turn, I move 2700 hexes and generate 180. This takes a few seconds.
But when I try to individually move 2700 tiles worth of shroud, it takes more than a minute. Why???
EDIT: This add-on is available on the 1.16 add-ons server and on the following Github repo:
The idea behind the WLP is to collect bits of Lua written by various people that will help supplement the helper library and WML. There are two aspects to WLP:
Hi! I found in man wesnoth that there is --unsafe-scripts option. It says --unsafe-scripts makes the package package available to lua scripts, so that they can load arbitrary packages.
Can somebody guide me what exactly it unlocks and how would be possible to use, let's say, file io if this is...
Hi,
this is my first attempt to learn and use Lua coding
I used the Ei event (found a boss at a random village and I tried to make it 6 bosses at 6 random villages (other villages will give you bandits)
now,
1- I turned to (from boolean to numerical)
2- I replaced to , and to
Does anyone have any experience in Lua versus WML ? I assume that WML has more generic
and far reaching support than Lua but I would be interested how far one can go via lua. For me it
may be easier to go via lua for my campaign, but my impression is that WML is more widely in
use - but I may be...
When working on animation-filled cutscene-style scenario with Hejnewar, we decided to use DiD code that skips animations etc when dialogs are skipped. However, the code not only didn't work well with current development version, but also didn't cover our needs, as we used tag a lot and sometimes...
I have an add-on called Random Units that randomly chooses recruits from all available unit types. In 1.14, the only way to do this without OOS is to include the unit WML in a custom tag and get the unit type ids from the resulting cfg. I was able to include units from both core and Era of Myths...
I'm using Random Units in the Ageless Era with the Random Campaign, lots of fun. But I wanted the Random Units to only be for the human side. In Radom_Units.lua at line 188 I added
if wesnoth.sides .controller == human then
So;
onEvent(
'recruit',
My orignal lua query was sorted in double quick time, thanks again to all who took the trouble to help. I made the fatal error fo fiddling with it and I can't work out how I broke it :annoyed:
This is the original version which works, followed by the WML...
I'd like to give a unittype a laststrike attack special (the reverse of firststrike).
Presently I'm looking at adapting the code for initiative from HttT.
However, if anyone happens to be able to post the (lua?) code for firststrike, I may be able to create this ability just by reversing...
I'm trying to learn some basic lua by creating a custom tag but am finding clear information regarding very basic language elements difficult to find (but then my google-fu is terrible ) and after perusing the web I now have more questions than ever, hence this post.
Hi all, my goal/project 's to add more factions to wc2
It worked but the option Tell me how recruit works gives an error When browsing units of the new faction
I noticed in the error, that lua uses the old/default path for addon, i tried changing that in main.lua and beside every LUAREQUIRE...
Hello, in my quest to patch up 1.15 World Conquest, I have stumbled upon these two deprecation warnings (the last 2 left).
I have checked the wiki but I have found no documentation related to these things and the warning messages don't really seem helpful.
On the topic of map:get_tiles_radius -->...
Getting the following lua error, I believe when enemy units are supposed to drop an item (although I have seen item drops work, at least with 2 players):
Seems simple enough, it identifies the file and the problem (assuming I'm reading it correctly); z_index is being used without being defined....
The call to wesnoth.find_path is causing segmentation fault.
Any help would be appreciated.
Thanks
Edit:
Passing a unit as the first parameter won't crash find_path.
I need to use find_path without having a unit defined. How can I do that?
How can I call the map generation version of...
So after uploading my add-on 'Ageless World Conquest' in 1.14 by Duuuude there is an issue that the standard (Default factions) World Conquest 2 is getting Ageless enemy leaders/commanders recruited. Although it is a different add-on, WC2 is reaching into AEWC2 and choosing ageless leaders 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