Plague Inc: Evolved

Plague Inc: Evolved

Bring your deadliest ideas to life
Hit the lab and explore custom disease types and worlds created by the Plague Inc: Evolved community. Design your own scenarios in-game with the Plague Inc: Evolved Scenario Creator.
 This topic has been pinned, so it's probably important
Quick-Start Guide to the Events Lab
The Events Lab uses the term "variable". A variable represents a thing. It might be a game state (eg. "total infected population"), or a condition (eg. "disease noticed"), or an outcome (eg. "airport closed").

The Events Lab allows you to link variables together to form expressions (eg. "if total infected population is greater than 1000 and the disease has been noticed then close the airport").

Try this for a simple example to get you going:

First, create a new event (by clicking the "+" button at the bottom of the events list, or by clicking "Add New Event"). It doesn't matter what you call it.

Now let's create a global condition:

1. Create a new global condition by clicking the "+" button at the top of the Global Conditions box.
2. Click on the menu (where it currently says "Empty") and select "Set Variable". A dialog will appear with two boxes ("Left Side of Expression", and "Right Side of Expression") and a little menu in the middle.
3. In the first box, click the "Choose an option" menu, and select "Variable". Another dialog will appear, with a treeview of lots of variables you can choose from.
4. In the treeview, select "Population" and then select "Total infected population", then click the "Select Variable" button (which will close the dialog and insert that variable into the expression).
5. In the little menu in the middle, select "≥" (greater than or equal to).
6. In the second box, click the "Choose an option" menu, and select "Numerical value". The menu will turn into a textbox.
7. Enter "1000" into the textbox, and then click the main "OK" button.

So we've defined an event that will trigger when "total infected population is greater than or equal to 1000".

Now let's set a country condition:

1. Create a new country condition (by clicking its "+" button).
2. Click on the menu and select "Set Variable".
3. In the first box, click "Choose an option" and select "Variable".
4. In the treeview, select "Country data" then "Starting country", then click the "Select Variable" button.
5. In the middle menu, leave it set to "="
6. In the second box, select "True", and then click "OK".

So now we've specified that the event will only occur in the starting country.

Now we need to do something with that event, so let's specify an outcome:

1. Create a new outcome (by clicking its "+" button).
2. Click on the menu and select "Set News Popup".
3. You're probably already familiar with the news popup dialog. For now, set the title to "W00t!" and the text to "We've got a thousand infections in %C", and set "Trigger News Bar Item" to "No". Then click the "Apply Changes" button.

Now save the scenario, and play it in the game -- select your starting country, and wait for the first 1000 people to be infected ... and there's your popup :-)
Last edited by brothercake; 15 Dec, 2014 @ 8:36am
< >
Showing 1-15 of 37 comments
Ndemic James  [developer] 15 Dec, 2014 @ 8:49am 
Thanks brothercake - a good guide to a basic event! (pinned)
Last edited by Ndemic James; 15 Dec, 2014 @ 8:49am
Jahtzee 8 15 Dec, 2014 @ 12:20pm 
This might come in handy.
Hopefully we will see some high-quality scenarios using the new events lab soon. *looks at brothercake*
Last edited by Jahtzee; 15 Dec, 2014 @ 12:20pm
brothercake 8 15 Dec, 2014 @ 12:29pm 
Well actually .... I have two new ones in the works, two sequels to my star wars scenario :-)

And a third one too ... something very special ;-)
Last edited by brothercake; 7 Jan, 2015 @ 7:28pm
brothercake 8 7 Jan, 2015 @ 7:08pm 
Here's a tip for creating targeted spore bursts -- ie. traits that can infect specific countries, instead of random ones.

Let's say you're making a WWII scenario and you've got a trait called "Invasion of Poland".



Create a new event, and start with the event settings: event counter threshold = 0, times event can trigger = 1, reset event counter when fired = NOT checked

Add a global condition with a Tech Trigger, and specify the name of the trait as the trigger (in this case "Invasion of Poland").

Add a country condition with the "Country name" variable, and set the name of the country it should apply to (in this case "Poland").

Add an outcome, then in the variable selection dialog you'll need to check "Show Advanced", and then find the "Additional infections" variable. Select that variable, and then give it a numerical value -- it must be at least 1, or you could use a random value like random(1, 100)



And that's all there is to it -- when the trait is evolved, the specified country will be infected :-)
Last edited by brothercake; 7 Jan, 2015 @ 7:22pm
brothercake 8 7 Jan, 2015 @ 7:11pm 
Here's something more advanced -- a way to create randomly fluctuating DNA costs :-)

Setup a repeating monthly event (event counter threshold = 28, times event can trigger = -1, reset event counter when fired = checked), then define the following outcomes:

1 - Custom global variable 1 = 1 - (0.5 * infected percentage)
2 - Custom global variable 1 += (random(0, 4) - 2) / 10
3 - Genetic drift multiplier = Custom global variable 1

Then play at Mega-Brutal -- and the cost of every trait will change every month :-)

For example, a trait that costs 20 points might be 14 a month later, then 27 the month after that, then 19 ... and so on, throughout the whole game.

It works by re-purposing genetic drift. The first equation cancels it out, then the second applies some randomisation to increase or decrease the result.

However it does have some biases, because genetic drift is a curve, whereas the outcome equation can only define a straight line. So costs will be generally lower towards the start and end of the game, but higher in the middle.



IMPORTANT NOTE: repeating events effectively lock-out the cycle, so if you use this event:

- any other repeating events with a lower counter threshold will stop this one from firing
- any other events with a higher counter threshold will never fire

So basically, avoid either of those things if you're using this event.
Last edited by brothercake; 16 Jan, 2015 @ 4:28pm
infernalthing 10 16 Jan, 2015 @ 8:42am 
Can you better explain the event settings? I don't really understand the reset thing.
Also, can you make an example where 1 of 4 effects is randomly chosen at the beginning?
brothercake 8 16 Jan, 2015 @ 3:50pm 
Imagine a stopwatch that counts the number of days ... 1,2,3 and so on. Left on its own, it will keep counting higher. But if an event resets it, the stopwatch will go back to 0, and then start counting from 1 again. An event can either reset the clock, or leave it alone.

Now, let's say you've got a repeating event which fires every 7 days and resets the clock. As soon as the clock gets to 7, the event fires, and the clock goes back to 0. When it gets to 7 again, the event fires again, and the clock resets again, and so on.

So if you have a second event that fires after 14 days, that event will never fire, because the clock never gets higher than 7. All events are synchronised by the same clock, so every time any event resets it, it goes back to 0 again.

If you don't reset the clock, then it will carry on counting. But that means the synchronisation of repeating events will no longer be regular. If the event fires after 7 days and doesn't reset the clock, well 8 also qualifies as "after 7" so the event will immediately fire again, and again at 9, and every day until the clock is reset.


The general rule of thumb is -- don't have repeating events. But if you really need them, then make sure you understand their impact on the clock :-)

Alternatively, if you need events that fire at regular intervals without resetting the clock, you can synchronise them to "days since game start", however the down-side of that approach is that you'd need a separate event for each time it should fire (eg. an event that should fire every 28 days for 2 years would require 26 separate events).
Last edited by brothercake; 16 Jan, 2015 @ 4:29pm
brothercake 8 16 Jan, 2015 @ 4:05pm 
For a random choice of 4 things you need 4 events -- let's call them "Event A" through "Event D". Each of them would have "event counter threshold = 0, times event can trigger = 1"

Event A would have a 1 in 4 global condition -- "if random(1,4) = 1" -- and then three global event untrigger conditions -- "if untriggered(Event B), and untriggered(Event C), and untriggered(Event D)".

Then each of the others would be the same random chance, with corresponding untrigger conditions (eg. Event B fires if A, C and D haven't fired).


The relative probabilities of those events are not quite the same, but it's close enough for most practical purposes.

However there is a chance that none of them will fire on the first day. If none of them fire on the first day, then they'll all be evaluated again on the second day, and every day until one of them fires.

There are ways of evening or further-biasing the probabilities, and/or making sure at least one of them fires on the first day, but that's more complicated than it's worth :-)
Last edited by brothercake; 16 Jan, 2015 @ 4:32pm
infernalthing 10 17 Jan, 2015 @ 10:17am 
Thanks a lot! That really helped.
brothercake 8 17 Jan, 2015 @ 11:30am 
You're most welcome :-)
infernalthing 10 19 Jan, 2015 @ 12:03pm 
Is there a way to completely disable ship and plane transmissions without closing air and sea ports? I tried to turn them off in the disease stats, reduce air and sea transmission to 0 but the disease can still be transmitted through planes and ships.
brothercake 8 19 Jan, 2015 @ 12:20pm 
There are also switches in the starting stats where you can turn transmissions on and off -- so just set air transmission and sea transmission to off.

In fact if you do that, but leave the base transmission amount higher than 0, then you'll have the option of bringing it back later.

When transmission is off, it gets turned on again whenever any traits adds to that transmission amount. But this is relative to the base transmission. So if you set (say) sea transmission to off and base sea transmission to 1 (or another value), then you can re-enable it simply by adding a trait that adds sea transmission.
infernalthing 10 20 Jan, 2015 @ 1:49am 
That what I did. Still doesn't work. Testing it on an island, I noticed that when the country is 100% infected planes and ships are able to spread to other countries.

Edit: Making an event that closes air and sea ports when the country is fully infected seems to do the trick.
Last edited by infernalthing; 20 Jan, 2015 @ 2:11am
brothercake 8 20 Jan, 2015 @ 4:05am 
Hmm right, maybe you're getting a trickle of infection.

I've used the method I'm describing for land transmission, and it's completely effective there, but I've never used it for sea or air without also closing the ports.

You could try setting transmission to a big negative number, like -99999, that might do the job. But if closing ports its okay, then that would be most reliable.
Last edited by brothercake; 20 Jan, 2015 @ 4:06am
infernalthing 10 21 Jan, 2015 @ 1:12am 
That doesn't work either.
< >
Showing 1-15 of 37 comments
Per page: 1530 50