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...
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!...
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...
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...
Hi, Spent ages investigating unit variation not working as I expected on v1.19.23 on Windows.
Issue Created clone of Mage then added variation to same (added a melee attack). Worked OK for male version, didn't on female.
Relevant code 1: Apply variation 2: unit_type Resolution Works as expected...
Last post
Ah, OK, thanks.
I gave both genders the same variation id and that worked fine.
Is this the preferred/recommended way to assign a variation in a single command that works for both genders?
Presumably the variation name (if specified) can be different for each gender?
Hello, I am currently trying to figure out the following macro. It works as intented until "name=side 2 turn $random" event included. However, at "name=side 2 turn refresh" it starts to fail substituting variables. The "current_{DIR}_spots" variable never changes; even though {DIR}_spots does get...
Last post
BajMic wrote: May 13th, 2026, 6:41 pm What is the rationale behind $|this_spot?
Ravana wrote: May 13th, 2026, 6:49 pm $| evaluates to $, so that next evaluation will see it.
Here's a really simplified example to illustrate the problem: If you run this, you will find that this_item_1 and...
Hi,
My campaign has several [event]s that can fire in (m)any scenario(s) so appear in _main.cfg.
Everything works fine, I'm just wondering if at what point it becomes more efficient/better practice to embed a macro into scenarios rather than have a global event?
I am here to ask the feasibility of a project I’m thinking about attempting in Wesnoth.
I am not a programmer or a modder, I have a very general baseline knowledge of coding and custom content.
Recently, I have run a game for my friends that I’ve been calling Realm.io. While run digitally, all the...
Last post
You know, the numbers there make it clear why using Wesnoth would be a bad idea, I guess that settles it for me haha
In all honesty, I may also outsource art to the players when the time comes, given that it is a highly community driven thing (something that I know Wesnoth enjoyers will fully...
Can anyone suggest some uses for macros? Have already got character, deaths and starting gold macros too. Was wondering if anyone knows some other macros that would be useful to know.
Is there any way in a unit's code to make them gain a certain amount of experience after every turn passes?
I'm trying to make an egg, and originally I based it off of the Ant Egg, however that unit hatches depending on factors that I do not want.
I wish for my egg to hatch after a certain amount...
Last post
if you want all units, then just use the addon which gives free xp
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...
I made a simple scenario but haven't figured out how to enable day/night cycles. LLMs have been no help. Anyone mind letting me know what code to use, or would you mind editing the scenario file for me? The scenario is otherwise all ready to go, and I've already sunk too much time into it....really...
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.
So while playtesting the next Update for SXRPG,
there is actually one thing that bothers me.
if player is defeated, the whole map can be seen, units included.
while "grayed out" and foggy and not revealed on mini map, players can still scroll over the maps and watch position of units etc.
now im...
Last post
will try it. thank you very much
edit:
i assume the level is only ended for the certain player? or will it end for all players then?
edit2:
i see it would end for all players then, however, i could trigger it if only NO player remains.
--> which lead me to the question what can defeatd p...
Hello. Sometimes I need to double check some stuff to rule out false-positives during testing. Please excuse me if this is somewhere in the wiki, I couldn't actually find it.
My first question is - is this correct syntax for my [if] clause?
Last post
I'm not sure what you mean by "override/supersede" or what "[avoid] [ai]" is supposed to be (perhaps you meant "[ai] [avoid]"), but… the simple attack AI does not take [avoid] into account at all. It ignores most other aspects too, like aggression.
The initial AI: The change that doesn't seem to work:
Last post
Hello,
Thank you, I checked the :inspect above at the start of the first turn. When I fixed "leader" to "leader_id", the problem persisted.
The problem persists in my current solution, where I am activating each leader separately at different times with the three blocks below: whereas on the AI...
I made this for my campaign, but I don't think there is enough room for this feature. I will probably remove it.
This macro places a very susfishious object on the map. You may ignore it at your own peril, but if a weak enough unit closes in...
You can also step on it, with satisfying result....
Last post
Haha, thanks for the replies.
I am always trying to come up with extra decisions that the player could make. Lining the shore up with washed-out fish carcass that can come back to life (or be stomped to death) could entice more strategic movement from the player, without necessarily introducing...
Hi, I am currently struggling with Lich's recruiting animation.
My code looks like this: I also tried the simple version: None works. He does have a recruiting animation in his core file: I am not entirely sure what am I doing wrong. Can someone help me?
Last post
I tried defining an existing unit (undead unit due to animation filters) as secondary unit, but that didn't work either. I also tried defining a vague unit (race=undead), still didn't work. I have not tried an unit that is in a recall list. I already moved on to the next task, but I'll try that out...
This is a simple WML syntax highlighter for Microsofts Visual Studio Code editor.
You can find both syntax support and color theme in the Visual Studio Marketplace or direclty in the editor's plugin tab. Just search for "wml" and you will find both syntax support and color theme. :)
Last post
I've augmented the original WML extension to add LSP features via by my own LSP parser/WML parser-preprocessor. Still under heavy development, but an alpha version with several new features is available from here:
When I define an unit variation, I know how to modify it. But how can I remove it? Can that be done easily, by first picking the original unit that the variation is based on and then adding lines just to remove features entirely?
In particular - I would like to make (i) Peasant that...
Last post
Hello,
I would like to use this thread to ask a quick question (through the means of my goal related to this topic):
When I use the [item] tag, is "visible_in_fog=no" supposed to work with "halo"? It doesn't. Examples of what I can see through the for of war:
I am a bit confused with how the code below turned out to work. The coins spawn in the right place and message prompt gives me the right coordinates, and yet the 'moveto' event activates anywhere. So, as soon as the barrel is broken (dies), coins spawn, and the next unit that moves anywhere...
Hello everyone, again. I return with the same question that I removed yesterday. And it involves an ability called "Terror" it is a specific ability of Mal-Ravanal, the big bad boi of the company. He has reviving too, but i want to focus on his terror firstly. Mainly bc im not interested in his...
I've just started to learn WML so I may be wrong, but I figure it would be done with two triggers
One trigger where it forbids recruitment from the player when your maximum unit count (or maximum upkeep) is reached. Can the number be checked on its own? Or would it have to be detected by an action...
Last post
You could [modify_side] to remove and add full recruit list whenever you need.
How does radius work in abilities? Or does it work at all? I have this from AbilitiesWML, which states:
for "Illuminates" --"radius: (Version 1.19.15 and later only) defines the radius of the ability, by default only the terrain the user is on and adjacent hexes are affected, but this can now be...
Does [effect] → apply_to=type work the same as [transform_unit] if applied to a unit with no more levelups available (i.e. at maximum level and only AMLAs available)?
FWIW the unit is 4th level.
Celtic_Minstrel wrote: February 16th, 2026, 9:44 pm
Although advances_to can indeed be placed inside [unit], it's one of those things that could be randomly overwritten when the unit is "rebuilt". I'd recommend instead using [effect]apply_to=remove_advancement and/or...
I am trying to make a weapon special that multiplies damage based on how much the opponent moved. But it instead of increasing the damage only if the attacker has moved, it always squares the damage.
I am doing something wrong, or is it just impossible? If it is impossible, I will just make a...
Last post
Mathel wrote: February 2nd, 2026, 4:26 pm
Skirmishers aren't a problem. I tested that.
Uh, if you're referring to my post I was talking about non-skirmishers.
Mathel wrote: February 2nd, 2026, 4:26 pm
I ended up using a calculation of distance from starting position and current position...
I think that even if my view is locked, that the camera would still scroll to the following: Available source literature does not mention possibility of using "force_scroll=no". I don't suppose this is intentional?
Last post
I saved these maps "as scenario" merely as a precaution. They do have separate .cfg files referencing them and they even worked fine when played on 1.18, I just couldn't open them in the editor. I haven't tested the other way, yet, simply to avoid breaking anything before I make backups. Thank you,...
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