Several of our mainline campaigns are in the works for upgrades at the moment, which includes adding characters and enhancing existing scenarios. We are looking for more artwork to supplement these upgrades, including the following:
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,...
Last post
It looks good at the bottom since the page isnt too long; i had no problem finding it.
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...
Last post
The Community Guidelines have been updated.
The Moderation section has been expanded to cover Discord moderation issues.
You are welcome to post any WML-related question here, even if they pertain to a campaign or map that you're working on.
If this is you:
"How do I..."
"Can you help me debug..."
"In my campaign, I am trying to..."
"On my map, I want to..."
"Can you add the following to WML..."
"I need help...
Last post
There is also a partially-complete WML Tutorial which would be helpful to the WML newcomer. Note that it is a work-in-progress and that some sections are more complete than others, but it does exist. The ReferenceWML page, while extremely helpful to those who already understand WML, can be...
Here you can find configuration files to enable WML syntax highlighting for various text editors :
Gedit (and other Gnome based editors): Has full WML support and partial inline lua support. wml.lang goes in /usr/share/gtksourceview-3.0/language-specs. cobalt-wml.xml goes in...
Last post
Just for the record, for those on Linux (at least Ubuntu and consorts) who don't want to fuss, KWrite can do WML highlighting natively.
That's what I've been using for years, since it's included in my software manager lineup.
It's very easy to modify the highlighting rules (there is a nice menu...
Does you campaign produce obscure WML errors on startup and you don't know what line in your 2000 lines of WML causes it? Instead of going through everything line by line and try to spot the mistake you've made, or before posting your entire campaign on the forums in the hopes that someone wants to...
Last post
totally YMMV
i used grok a lot to learn the Wesnoth map editor ("Where is..." "How do i...") and that worked great
for example: How do I make a map description that shows up in the multiplayer screen and not just on the addon server
and it told me in so many words "do that in the file dude doh!...
The purpose of this thread is to provide links to particularly useful information and code examples of WML and Lua on the wiki, without cluttering up this forum with more and more stickies. As such, the wiki pages linked here should be kept working and up to date - if an unmodified piece of...
Last post
Saratos wrote: May 31st, 2018, 1:56 am
Would love if there was a link to a thread on "Balancing" maps/factions/etc.
not sureifyou have found this already, but here is a guide on faction design/balancing as you requested
People often use WML attribute or tag names that are misspelled or just plain fictitious when trying to debug WML — or even tag structures that (to the trained eye) are logical to the writer but have no basis in reality. You should always look up the proper format first, and we have a dedicated...
Recently I have been very interested in coding an add-on for Wesnoth. I am quite new to coding still and was wondering if anyone could enlighten me on the subject of AI involvement in the creation of add-ons. Is AI completely banned in any way from helping with code or are you allowed to...
Last post
Celtic_Minstrel wrote: Yesterday, 1:17 am
it will probably do a pretty decent job of producing WML files, but it won't be able to write you some Lua.
btw this is ofc also completely wrong
(i somehow overread this)
So conclusion:
Celtic_Minstrel holds a personal grudge against AI, many mai...
I am updating one of my campaigns; in one scenario, victory can be achieved in three different ways.
It's important to know that the scenario had victory_when_enemies_defeated=no
The first way requires defeating the boss in chief, an enemy leader, while the other two involve defeating other enemies...
Last post
gnombat wrote: August 13th, 2026, 9:13 pm
Isn't it actually supposed to be [put_to_recall_list], not [put_in_recall_list]?
I have noticed the standard [teleport] doesn't work for the AI: They can land right on a teleporter tile and nothing happens.
But an even bigger problem is they don't know how to use them (that they have to step on them to go somewhere), even if those teleporters worked...
Now it happens I have a...
Last post
[random_placement] accepts [command], and sentence is about that same. Container means variable which consists of wml tag, so with variable=container you can use container.x.
Mainline campaigns have examples for many situations.
Is someone able to tell me what I've done wrong? I wanted my hero to be based on a level 0 unit so at first I just used a Peasant as the type in [side] but then I thought I'd try to make them a new custom type of "Civilian" instead...
I added {~add-ons/my_first_campaign/units}in my _main.cfg...
Hi, Just want to check that a unit doesn't have any more advancements. Using BfW 1.19.24 on Windows 11.
This code works fine: But I can't seem to get the formula syntax correct? I'd prefer to use WFL if possible so I can and it with a working formula already in [filter that references a different...
I wanted to make an abbility that would automatically give a constructed drone (from the EoMa_Constructor) the 'additional armour' upgrade for free. Eventhough the stats work, the design doesn't actually update to show said additional armour.
Here is the code, which is copy pasted from EoMa...
Last post
Celtic_Minstrel wrote: August 4th, 2026, 12:33 am
Broadly speaking, [modify_unit] is better for changing temporary values such as moves, current HP, or variables, while [object and friends is better for permanent or semi-permanent values such as max HP, abilities, or resistances.
I want to put a picture under the little campaign selection text, the one you see when you scroll through all installed campaigns in the game.
Unfortunately apparently the binary path has not yet been read when _main.cfg is parsed, because the game doesn't show my picture. In other words, m...
I've several groups of orcs who are prohibited from leaving the battle and go climb a mountain instead. They all use this pretty basic AI setting: Now almost all of them do indeed respect it, but I found some Goblin Pillager who had crossed the forbidden territory. How comes?
AFAIK for player side(s) the only way I can think of doing this offhand is to manually add gold to the side. It wouldn't appear as income but would be indicated in total gold. However people cleverer than me might have more elegant ideas on how to do this...
A search told me this is probably "base_income", supposedly set arbitrarily to 2 in "game_config.cfg". Is that true?
Why doesn't "income=0" invalidate it?
Am I to understand that...
Last post
Ravana wrote: August 1st, 2026, 4:59 pm
In your last thread you already learned to set income to -2.
Oops, missed that post because of the page change. Sorry.
Anyway, for anybody who finds this thread through searching, the solution is here.
Back in 1.12 it only worked for the length of a scenario, but wouldn't be ported to the next scenario.
The suggested solution was to use {TRAIT_LOYAL} instead.
Is this still true or has this been fixed? Do you still have to use a trait to keep a unit free...
Last post
Campervans as mobile villages you can take with you from scenario to scenario...
I don't quite understand how units are handled between scenarios in a campaign. Is there a decent how-to doc somewhere?
I wanted to auto recall loyal & level0 units, and that worked, but I don't quite know how. I just asked to get a list of units for team 1 and filtered on those criteria. In aop...
Last post
WarDead0 wrote: August 1st, 2026, 4:01 am
I don't quite understand how units are handled between scenarios in a campaign. Is there a decent how-to doc somewhere?
Probably not, but you could look at the source code for campaigns like LotI to see how they do it.
This should be easy but I can't find the solution. I have tried including \n in the string and even \\n (in case it needs escaping). Once I know it will be obvious but I can't find it with various searches....
Last post
WarDead0 wrote: August 1st, 2026, 4:16 am thanks that worked - messes with my indentation in the source tho
If you find the indentation too ugly, you could do something like this:
it seems weird that, for some reason, the pre-attack calculation does not simply use the actual HP for the calculation (well it does) but seems to cap it off at max HP, if for some reason if the HP is higher than that.
so all calculations with HP higher than max HP are wrong and there is...
Please confirm: • {LIMIT_CONTEMPORANEOUS_RECRUITS 10 "Dread Bat" 3} will limit side 10 from fielding more than 3 Dread bats at a time, isn't it? • And this macro has to be placed inside {scenario], but not inside any event, isn't it?
Why does side 10 keep recruiting Dread Bats like there ...
Last post
Yes, on would assume it's the same function (recruiting), just with a common and an individual list. Actually it's two different functions doing a similar thing...
I have access to https://notebooklm.google.com/, so to try it I added all relevant WML and Lua documentation pages as sources. If your google account is considered educational or otherwise allowed to use notebooklm, I can give you direct access to my notebook.
I am creating a unit in a [moveto] event, which is fine. I specify x,y=$x1,$y1, so the unit is placed north-west of the one that has just moved to that location (always). I however want it to appear to the south (or the direction the unit is facing preferably). How do you make x,y=$x1,$y1+1 work?...
Last post
WarDead0 wrote: July 29th, 2026, 1:53 am
Ok, thanks for pointing me in the right direction; I tried a few syntax variations and eventually got y="$($y1+1)" working.
Yes, that's WFL.
WarDead0 wrote: July 29th, 2026, 1:53 am
I think I am starting to learn when to use $ and that is to get the value...
If I want to draw a city with lots of buildings purely for aesthetic reasons how can that be done? I want to be able to have units walk over them like any plain tile and not "capture" villages (so they function just like grass, dirt, etc). I assume I would have to at least edit the map file...
Last post
I haven't looked at this terrain pack, but here is what I think happened: It has an exact copy of the shallow water terrain and its associated macros with a slight adjustment that is needed for some other terrains in the pack. It is set with a higher z-level than the core water to make sure that it...
I've got a strange issue with a cumulative [illuminates] ability: It doesn't accumulate in the dark...
Imagine a unit which illuminates (mage of light), standing besides another which has a special cumulative illumination*. When outside (daylight), lawful units affected by both indeed display the...
Hello, I'm making a custom era where there's a faction that instead of normal advancements has custom AMLAs. One of my ideas was to give an advancement that gives an ability "explodes after death". When the unit that has this ability dies, it deals 7 times it's level damage to all adjacent units....
I wanted to make an event where the player isn't allowed the enter a specific area yet, so to restrict them, I want the unit to instantly move back to where it was with the same movementpoints it had as if it never went there. This is the code: The problem I face is that the unti always ends...
This is really hard to search for as "attack" is used a lot for unit properties but I found a 20 year old thread where someone asked the same/similar but was told it was "impossible" when surely that can't be true. viewtopic.php?t=16006
In my case I have 2 units (already known in WML), at this...
Last post
Actually ended up using [animate_unit] and [kill] as I didn't want the unit to get experience (for a forced action like this)
I want my hero to interact with (most) neutral units in a standard way (per scenario) but I don't understand the dialog complexities. I have a moveto event that works but am stuck after that. I want to include the unit's name in the dialog and then have three options: ignore (default), attack & tal...
Last post
unstore_unit places them back to map. To take them off you store them or kill them.
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