2.0 Preview: Map Editor & Mighty Script

Darkest greetings Underlord,

In just four short days Patch 2.0, the largest update in War for the Overworld’s history, will be made available alongside the already impressively packed expansion: The Under Games. Since we announced the update there’s been many things that you all wanted us to expand upon, but few things have had such an eager response as the extensive updates we’re making to the Map Editor.

So today that’s exactly what we’re going to get into, in a king-sized blog post dedicated entirely to the capabilities of the enhanced Map Editor. There’ll also be some information on the changes we’ve made surrounding it, to make everything work like a well-oiled dungeon.

One quick note before we continue: The new Map Editor functionality introduced with Patch 2.0, such as the Mighty Script Editor and custom campaign features, are currently only available in English. As these are complex and text-heavy updates, we’re waiting to go through a round of feedback and bug fixes before getting it fully localised. Thank you for your patience!

Scripting and You: An Underlord’s Guide

We’ll start with the biggest, baddest, and most anticipated part of the update and that is our new scripting editor, officially known as Mighty Script. Mighty Script is an extension of the capabilities of the current Editor and is designed to fill in a gap which we’ve long wanted to plug, to truly put the power of creativity in the hands of our players!

It wasn’t easy. Years ago in the wake of release, we doubted that we could even release a Map Editor at all. It seemed all but impossible, and when we did release the Editor in 1.3 we knew that adding anything beyond what we released would be an order of magnitude more difficult,adding layers of retroactively-designed features on top of others. Scripting looked like a pipe dream.

But through the dogged determination of our team (especially Nano, the programmer behind the Editor), our volunteers, and of course the support and consistent requests and pressure from our fans, we’re now at a point where we can reveal this:

What you see before you, you may recognise from our announcement trailer. This is our toolbox, where the majority of new features are contained, the vast majority revolving around Mighty Script.

Delving into this box of goodies we can see that it’s divided up into 9 distinct tabs (known as the roots) each containing a handful of useful tools for map creators to work into their creations:

Map Settings – Contains a lot of the core settings for the Map. We’ll look at this later in the post.

Scripts – The meat of Mighty Script, this tab contains all your scripts, each of which has a sequence of triggers which lead to actions, as well as optional conditions to determine whether the script should occur. Through these you can do any number of awesome things, from spawning an attacking hero party to changing the terrain in the level and beyond! We’ll take a deep dive further down!

Timers – A key component of any script, Timers are used to cause an event to happen after a certain amount of time. Once started they being to count up to a number set by the creator and once that is reached they fire an event; if a script is listening it can react. Timers can also be set to loop.

Objectives – In here creators can set up their own objectives to appear and be completed in the top-right display. It’s also possible to set up fake achievements that will appear achieved or not based on your scripts, on completion of the level (in certain game modes). If you want to add some challenge or direction for your players this is the place!

Parties – Units in WFTO are spawned in parties which are set up via this tab. Each party can contain any number of units, with various levels, gold carried, and a few basic modifiers to their damage and resistances. These can then be spawned anywhere into the world – great for spawning an attack wave from an Overworld Gateway!

Patrols – Units in WFTO can be assigned to patrol routes, essentially a series of locations they will attempt to path through. With these you can create units which patrol around a dungeon as a guard or make their way towards a particular enemy player.

Switches – These are a type of variable, a setting which is remembered for future use. Using these you can track whether certain conditions are met and then turn the switch into either its on or off state. This can then be used in scripts as a condition to see if a switch is in a certain state before actioning the script.

Numbers – Our second variable, used for storing a whole number (no decimals here) which can then be used later as a condition. A great way to track a statistic for later use in a script.

List – In here the creator can construct dynamic lists of objects for later use in conditions, triggers, and actions. As an example you could have a script which detects when a unit is slapped; if it’s on the specified list it increments a number then adds the unit to a list. If it’s not on a list it does nothing.

That’s a bird’s-eye view of what each of these roots does, but what is it like to actually put together a small script? We’ll take a look at that a little bit later in the post, but first let’s cross off some of the other big changes in this update!

Game Modes – Find Your Favourite Maps More Easily!

With all the new stuff coming in this update, such as the new King of the Underhill and Core Shards game modes, we realised there was a need to divide our maps up into clear categories so that players can know what to expect.

As such we’ve now added some defined Game Modes to the game. When you first make any map in the Editor you’ll be putting it into one of six distinct modes, each with their own restrictions on what is required to make a valid map and what tools can be used. These modes are:

Deathmatch – The straight skirmish mode: destroy your enemies’ Dungeon Cores with no other modifiers such as scripting.

King of the Underhill – A new skirmish mode where two factions fight over Underhills to defeat their foes. It uses the King of the Underhill feature set.

Core Shards – The second new skirmish mode which allows up to four factions to seek out each other’s Core Shards and destroy them. Features the Core Shards feature set.

My Pet Dungeon – The My Pet Dungeon mode from the expansion of the same name now supports custom maps! Place your Toybox of heroes and script in whatever objectives you can think of. With a comprehensive feature set you can make the dungeons of your dreams like never before! (Please note that the My Pet Dungeon DLC is required to play My Pet Dungeon levels)

Scenario – Want to create an awesome single-player scenario? This is the mode you’ll want. With access to nearly all feature sets and the full power of scripting, this is where you can make great story-driven experiences.

Custom – No holds barred here, everything is available for your most insane creations. Wield the full power of the Editor to create anything you desire!

Naturally, although you declare the mode of your map when you create it, you can switch at any time to another mode through the mode switcher!

That’s a lot of modes! But what about all the maps created in the past that used to inhabit the Skirmish menu? How do they fit in? After all there’s already over 3000 maps on the Workshop! Well that’s where our seventh mode comes in:

Legacy – The maps of the past continue to exist with their own ruleset, but you can’t make maps for this mode anymore. You’ll find them all in their own mode in the Skirmish menu.

Phew, all this work to support all the new features for the Map Editor, but there’s more! We’ve overhauled the UI in the Skirmish and My Pet Dungeon menus, as well as added a new Scenario menu, to make all of this more accessible.

Custom Campaigns – By Popular Demand

One of the things people most wanted us to provide support for was chaining levels together, so that you could easily play through a whole campaign of great custom levels, right from within the game! Well now with the new Map Editor update you can!

Next time you head into the Map Editor menu you’ll find the Campaign Editor, the tool by which you can assemble your campaign.

In it you’ll be able to pick any type of map that you’ve made and include it as part of the campaign. Better yet, you can choose how your player progresses through the campaign with three distinct modes of progression:

Unlocked – All the levels are available to pick from immediately, and you can play them in any order. Great for map collections, or if the order of completion doesn’t matter.

Linear – All maps must be completed in the order they are listed in the Campaign Editor, so this campaign progresses in a linear fashion.

– Flexible – Want to create branching paths? Use the key tools to make completing a level award a certain key that unlocks one or more levels!

We hope you’ll make great use of this to introduce some fantastic campaigns to War for the Overworld! We’re so eager to see this that you’ll find custom campaigns filed under a large button in our new Campaigns menu!

Now that we’ve covered those let’s have a deep dive into how the scripting system actually works shall we?

Trigger Warning: May Contain Awesome!

As mentioned above, scripts are the heart and soul of Mighty Script; they make everything possible and fortunately they’re pretty easy to setup once you understand them. One of our goals was to make scripting accessible for as many of our players as possible. So what goes into a script? Let’s take a look!

When you’re on the Script root tab you’ll find a list of all your scripts. In the image below you’ll see that we’ve set up a few scripts already. But what we want to do is add an entirely new one, perhaps to spawn an attack wave to assault our player.

By clicking the plus button in the scripts list (to the left side) we add a new script. Each script is composed of Triggers, Conditions, and Actions; together they allow a wide variety of events to be scripted by a map creator:

Triggers – The event which causes the script to start. This can be any number of events that occur in the game, such as a unit being spawned or a Dungeon Core being destroyed. If any of the triggering events are met then the script checks the Conditions.

Conditions – These are comparison values that check whether a certain state is matched. For example, you can check whether a switch is in an on or off state, or whether the player has a certain amount of gold or not. If all the Conditions are achieved then the script proceeds to the Actions. Conditions are optional and can help make events unfold more dynamically, based on the game state.

Actions – Once all the Conditions have been confirmed then the script will move through each of the Actions in turn. This is where the magic happens, doing anything from spawning parties to placing VFX to controlling the camera for cinematics.

Configuring and adding these Triggers, Conditions, and Actions is straightforward. Simply click the add button on the appropriate category and it will open up our Magic Finder, which lets you select exactly what you need.

So we want to spawn a party to attack our player. First we need to pick a triggering event; this could be any number of things, such as driven by a timer, or based on how the player is progressing. But for now we’ll select a tile and set up a trigger to detect when a player’s minion enters the area. Select “On Enter/Leave Block Range”: this gives us our fist trigger item in the script.

When you add a new item you’ll find additional settings where you can set up the various properties of the item. In the image below you’ll find a completely set up version of this trigger; as you can see we’ve given it a name so that we know what it does, set the center block for the check, and given it a radius so that it checks the entry/exit line around the edge of a 3×3 area. We’ve made it so that it triggers on entering rather than when something leaves, and we’ve made sure that only units belonging to Underlord 1 will trigger it.

With our trigger set up we now need to consider if we want to add a condition to it. Let’s say we decide that we only want this trigger to activate the first time a minion enters the area. There are a few ways we could achieve this, for example we could use an action to disable the script. But for the purposes of the demonstration we’ll use a condition that checks the state of a switch: the “Is Switch On/Off” condition.

This condition has a very simple setup as seen below. We’ve given it a name again to remind us of its purpose, we’ve selected a switch (which we set up in the Switches root) and we’ve left the desired switch state as on. Incidentally we setup this switch with a default state of being on, so this condition will be enabled by default.

But how does this make it so it only triggers a single time? We’ll get to that in a moment, but first let’s take a look at setting up our actions. Naturally the first thing we’re going to want to do is create a “Spawn Party” action.

This one is a little bit more complicated – in fact this is almost as complicated as a single action will ever get in Mighty Script. Let’s dive in again with the final product in the image below. Once more we have a name; it’s good practice to keep these names coming as reminders or pointers for other creators who might study your map.

When spawning a party we have to know who’s going to own that party when it spawns. In this case we want the Empire to attack the player, so we set the faction to Empire. We then need to pick which party spawns; again we set up a party in our Parties root – here’s what that looks like. For the purposes of staying on track though, we’ll not get into how these are setup; but as with scripts they’re rather straightforward.

In addition to the party, we’ll want to give them a patrol route to set them on the path to the enemy’s Dungeon Core. We can set one up in the Patrol root tab, and it’s a simple case of setting a non-looping patrol with a single destination: the enemy Dungeon Core! Of course, it’s not necessary to set a patrol route for a party, but it wouldn’t be much of an attack if they didn’t attack!

Now we need to set a spawn location and spawn delay. Setting the spawn location is as simple as a few clicks. Once again opening up our Magic Finder, this takes us to a list of every possible point on the map: we could choose the location of a tile, a unit, or any other object in the map. But we want a specific point, and finding the particular location would be a bit unwieldy in the list; so we click the World button and then simply select the spawn point in the map itself.

That was quick, and although we don’t technically need a spawn delay it’s good to set one up; with a delay of 0.2 the game will wait a fifth of a second before spawning each unit in the party.

Now our spawn party is set up, we just need two more small actions to get the party rolling. Now we’re pretty confident there’ll be a path to the player’s dungeon if their units are triggering this, but just in case we’ll want to set up a dig path so that the Sappers in the party can start digging if there’s no path.

This is a simple action that requires a start location and an end location, a faction (in this case the Empire), and whether or not it is a soft path, which means it will only be created if there’s no existing path. In this case we want it to be exactly that.

Finally we want to make sure that this script triggers only on the first time a unit belonging to Underlord 1 enters, and that’s as simple as changing the state of our switch to ensure the condition isn’t met. We do this with the “Set Switch” action, which should be rather self-explanatory.

And with that we have our new Script! Let’s test that in-game shall we?

Excellent, everything seems to be in order: as soon as the player’s minion enters the area we chose, a party appears right there for an ambush! Of course, there is scope for creating much more adventurous encounters; we can’t wait to see what you script!

So that just about wraps up this lengthy look at the Mighty Script and the new Map Editor features. With scripting, game mode types, and custom campaigns, we really can’t wait to see what you make when these tools are in your own Hand of Evil.

On Wednesday we’ll be revealing the final Underlord to join the Under Games: Lamash! So until then, and until the launch of Patch 2.0 on Friday, you’d better start designing your dungeons!

Cheers,

– Brightrock Games Team

Click here to discuss this update on our forums

Click here to chat about this update on our Discord

Never miss an update! Sign up to our newsletter!