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...
Am setting up a location dependent regen ability but it doesn't work.
Here's the ability definition: However when I test this on saplings with standard regen removed: However when stationed at the matching x,y they don't regenerate. :inspect shows they have the ability and the correct uni...
Last post
I think I have it working.
I had to ensure that the unit vars had the correct value when the ability filter saw them plus, as they are static values I didn't need to use unit variables. I wanted this code to work with variables and this seems to work:
Hi, due to the nature of the campaign I am building I have had to store units including the player in a variable at certain points in the story, after which I have had to resort to manually storing for the rest of the campaign. Is this a bug or am I misunderstanding how to retrieve a variable...
Last post
I think what Ravana mentions is to use x,y=recall,recall in unstore_unit
I am not 100% sure if this is the correct place to ask this, but I have an issue with EoMa that I can seem to get rid off. I want to give one of my units some of the EoMa exlusive weapon specials. Like {WEAPON_SPECIAL_EOMA_VERYSKILLED}, {WEAPON_SPECIAL_EOMA_DAZZLE}, {WEAPON_SPECIAL_EOMA_STUN},...
Last post
UncreativeName131 wrote: August 15th, 2026, 11:04 pm
What do you mean with tags?
That is pretty basic vocabulary. Perhaps you could use this:
vocab50.png
You also need to know that all tags have a strict list of accepted sub-tabs and keys. Anything not in that list is ignored. Ravana is saying that...
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
I would do it differently. Instead of using a variable, I would use a nested event.
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
# +1 creep every wave
{VARIABLE_OP ccw.spawn_count add $ccw.wave}
This line already doesn't do what it is saying.
It is not adding 1 creep but n more creeps, n being the wave number.
When I tried to play a scenario of my campaign one a friend's computer who has linux I noticed a few images were missing. I am not really sure why it didn't work given that the exact same code worked for me on windows, so I wanted to ask if there are any differences between the versions and...
Last post
Thanks for the respones!
Yeah I think that will probably be the reason for my problems, I guess I have to look through all my data paths now
As for your question: The campaign is called "Bloody Legacy" and no it is not uploaded anywhere yet, but funnily enough I am very close to finishing it s...
I have a question about units level.
If I modify unit level after it reach max lvl and lvlup will it affect earlier added bonus effects which increase weapon dmg per unit level or not?
Lets say I add to unit new weapon with +2 dmg bonus per lvl and once it reach lets say 3 lvl as a max form so it...
Last post
So Ive tried to implement it with 2 events name, pre advance and post advance. But everytime I try to modify unit lvl after advance I get errors. I guess this might be unable to modify it during game.
Logic of the events:
1. Pre advance to check is the unit is with advance to equal null then make...
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
You may have discovered a bug, though it's not likely. It's more likely that you are not analyzing your code correctly. (This is nothing against you: I have only ever discovered one bug when I thought I had, and it turned out that I was analyzing my code incorrectly at least 50 times.)
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...
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