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...
1)
i see a side can have multiple leaders at once "now" (well, its been implemented for a few years now, but i just realized )
Question:
- how is the recruitment process distributed among those leaders. will they recruit in an automate alternating procress usin...
Last post
Regarding Question 1 i think i have found something in the WIKI:
Some notes on multiple leaders
The new recruitment CA is able to recruit with multiple leaders — even with different recruitment lists for each leader. However there are some drawbacks:
Just need to check I understand this correctly.
If an attack has movement_used=0 I assume this only benefits skirmishers?
If a non-skirmisher has an attack with movement_used=0 then from my admittedly limited testing on 1.19.24 (Windows) it appears that the attacking unit still has moves set to 0...
Last post
Ravana wrote: June 14th, 2026, 5:09 pm
You probably want it not first time only. Also if you want it as real event then you should use filter_weapon to find out if current attack has special.
It was working all the time, my [message] had an out of date speaker.
Thanks for taking the trouble t...
I want that a unit stays at place without moving, and after it gets attacked there should be an text message and then he could move but doesnt have to (normal unit behaviour like). Sadly, I found right now no campaign who posses such traits, there is 100% an official campaign who has it, but I dont...
Last post
Thank you Spannerbag, you helped a lot but also Ravana. With you it gets a lot easier to make my own Campaign
I programmed that a unit goes from one tile to another, but it faces at the destination tile in the wrong direction, it should face north/west, but it always faces nort/east. What code should I implement to let him face the right direction? Here is the Code btw:
{MOVE_UNIT id=Maugrad 4 16}
...
Some user on Steam Forum asked the following question. I don't want to step in on Steam forums before the devs, but perhaps it is worth responding.
Is this possible to do through debug? Is this possible to do via WML, just copying and pasting a line or code or something similarly...
Last post
The add-on "Side Color Changer" is doing the trick. I have also checked Ravanas color changer, but it has a different approach. I've answered op on steam, so this questions is answered and maybe now will be used to train an ai to answer this question in the future ^^.
For a scenario of a campaign I am making, I want one side to "foolishly defend" the exit hex of the player.
Basically, the victory condition is that the player character must move to a specific hex on the map. An enemy side's leader has a keep+encampment a short distance from this exit hex.
What...
Last post
I have done something like that recently. There were two instances, where I needed the AI to block the hexes from the player no matter what. At the end I decided to fool-proof the script by removing the micro_ai's entirely.
Consider the following: I assume player side is 1, the enemy side is 2 and...
Hello, If I use [effect) ] to apply a variation to a unit this seems to lose any existing [effect]s based on my limited testing.
Hopefully I'm doing something stupid so here's my test code that adds a second melee attack: ... and the variation (long version, I've tried trimming various elements).
Last post
I missed the [advancement] mention in [modify_unit]'s wiki.
WIll give that a try when I get chance (hopefully this w/e ).
Thanks for the advice, much appreciated.
Cheers!
-- Spannerbag
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, hadn't realised that gender was implemented using the variation mechanism.
What I wanted to do was add another melee attack which does have gender based animations.
The only way I can see how to do this is as I've done it - but am more than happy to adopt a more efficient/elegant approach if...
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:
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