Advanced Level Editing and Scripting Guide

Hello everyone! It’s about time we get into advanced level editing, and explain the script commands we used in the campaign and stand-alone scenarios.


In the document we prepared for you today (see below) all Age of Wonders 3 script calls with explanation are listed, as well as a few examples of creating some events step-by-step with screenshots.

Like how this…

Map Edit 05

,..leads to this


The script documentation still very much needs to be considered ‘raw material’. As such, it may contain errors, it will definitely not explain everything you want to know and it will not warn you about everything that can go wrong if you use a script in a specific way. I wish you all good luck with making your own stories and adventures!

Download the 60+ pages Scripting Guide here!

Download the Mirror Pact Example Map here so you can see scripting in action.

If you have questions, feel free to post them on our Level Editing forums!

For a video showcasing basic editing like placing units/structures, painting terrain etc look here.



The following two tabs change content below.



Home Forums Advanced Level Editing and Scripting Guide

This topic contains 14 replies, has 14 voices, and was last updated by  Charlatan 9 months ago.

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
  • #92201

    Lennart Sas

    The scripting guide has been released! 60 + pages of examples and script commands. Please see this news post:




    I can continue with my map. Hope it has some advanced LUA scripting in it.

    Thanx for the update.



    I agree with Rohirrimelf, thanks so much for this! Now to start learning stuff 😛

    Kind regards,


    Why is it when I turn off the laptop, after hours of playing Age of Wonders 3, the girlfriend is there waiting? I'll look up and stare at 140 pounds of pure Satan!




    Thanks for this.

    And another thanks for this condering the circumstances you guys most likly have at your office(s) 😀

    No Mod, but I try to help - Bane of Cockatrice, a Star and an Onion.
    Check out the (not so) official List of Map-Projects aswell as the List of Mod-Projects



    Thats great that this was released but I’m not sure I understand the logic of getting something this complicated out ahead of something like the resource editor (of AOW 2 SM) or a random map generator within the editor itself.



    A Thousand thanks for this. I see where my weekend hours will be spent :)



    Scanning the document I see for items:
    “For now the only way to obtain a resource id is to ask for it on the game’s forums. The devs are the only ones who can look them up. ”

    Is there somewhere (in forums/wiki) we can get the current resource id’s?



    Lennart, thanks, this is great but the download for the .psd world map (with layers) is no longer working in your first map editor article “All about The Age of Wonders III Level Editor”. When you click on the link in the article there you just get an error message saying the file is no longer available for download.

    Can you please enable that download again for us?



    Are there already some known “bugs-that-become-features”? Like in SM, you had the extreme terrain warping when you’ld place cavern walls on water, or like how one of the stone tiles would make it possible to place 2 buildings on top of each other? (…though that last one could be due to the UPatch, been so long I haven’t has SM in vanilla)



    Could someone please tell me what program I can use to open the Scripting guide with AS WELL AS the Mirror Pact Example Map?

    As of right now I don’t even know how to use and open the files. Doesn’t bode well lol.;)

    Thanks in advance!



    Mirror Pact Example Map can be opened with the level editor.

    Script Guide is a Word document.



    I am not sure where the right place to ask questions is so I will start here. I saw the scripting trigger “OnStackEnters” used in the example in the guide, but noticed another trigger “OnStackArrives” in the list with it. I could not find anything in the guide to explain what the difference is and when to use one over the other. Could someone who knows the functional difference explain lest the two similar names cause confusion and/or problems?


    A script with OnStackEnters works if the unit walks through to hex, without stopping on it.

    A script with OnStackArrives only works if the unit stops on that hex. Very useful for setting up hidden areas etc.




    Oi Oi !

    I’ve been wondering, in the scripting guide, is this correct?

    Print the the id of the item in the unit’s head slot
    local item = HexWorld:GetScriptingS():UnitGetInventoryItem(“UNITALIAS”, 3)
    HexWorld:GetScriptingS():ItemHasTag(item, “OVERPOWERED”))

    According to the image beside it, 3 is not the head slot but the second trinket, and how does ItemHasTag print the id? :O

    "The best ideas often come from the worst minds."
    Psycho Path Campaign (Work In Progress):
    My Customization Upgrade Mod: Decodence (Steam Workshop)

Viewing 15 posts - 1 through 15 (of 15 total)

You must be logged in to reply to this topic.