Plague Inc: Evolved

Plague Inc: Evolved

44 ratings
Custom Scenarios - Custom Events and Event Handling
By Acid_Piss
Intermediate instructions for creating and handling:
Events
Trait Events
Triggering / Trigger Watching
Using / Handling the custom variables

This is NOT going to cover many subjects including (but not limited to):
The why and how of Scenario Data, starting/advanced stats, what is or isn't connected/controlled by Variables and Labs, etc.

   
Award
Favorite
Favorited
Unfavorite
Load or Create new Scenario

So go ahead and load up the scenario you are having the problems with events
Or if you don't have, just create a new one and Choose "Bacteria"


According to Ndemic, "Official" scenarios will have either Disease Lab enabled
or World Lab.....But NOT both (You can....they rarely do that) For the time being
just do it like I'm showing you.....I'm only covering explanations for making custom
events...not much else though.


You can change what you want in here....just follow along.




It is recommended to ENABLE event restrictions. Just enable it. When you are
done....click the Tab on the left side that says "Starting Stats"


Follow these....if you want ANY kind of control over the spread of disease....be
you disable all 4 of the transmission enablers


Setting up New/Existing Trait to do thy bidding

Go ahead and add a trait by "Add Existing" and choose "Weapon Creating"...
Should be at the bottom of the drop down box that pops up


NOTE: To save you future Headache....Starting Trait is really asking you if this
trait is touching other traits, is it to be considered the starting point
(Evolve random trait....which we are about to use, pays attention to this so that
random evolutions will work their way UP the tree of connected traits)






Ok...Here you see requires and requires Either. Very useful for controlling how
and when a trait can become available.

If you mark a trait as starting, you can random evolve it

If you add to that required trait/s...the random evolve won't evolve a trait that is
missing its requirments.

There is MUCH more to this when using multiples of this inconjuction with starting trait is false.

Alright.....when you are done here, click the events tab.
Setting Default Events & Advanced Editing

Before ANYTHING, click more options, then default events


Select all....skip the tutorial one if you like


Go back to the more options then click "Default to advanced Editing Mode"
This is what will allow you GREAT freedom in structuring logic choice trees in events.
If you don't do this....close this tutorial. You can't continue without it!
Single Shot Events

Now, add a new event...Call it watcher then click on the event settings tab
A ONE-Shot event (My own term) is one that will only trigger ONCE....EVER

If you want a message to pop up when it occurs then make sure you enable
the counter reset.

Threshold is the number of days this event will wait before checking it's conditions.

Times to trigger ....duh....-1 means it will check and fire each time the # of days cycles
Switch to conditions and outcomes tab


Add new "IF condition" and then select "Tech trigger" (These are for traits that are loaded and on screen in you scenario....Includes custom made traits you add)

Select the weapon creating trait under the Triggered traits section....then apply


Now click the effect under it and select Variable

There are 2 check boxes that are empty...put a check in both and continue following
what Ive done on the next few screens






After you are done here add new outcome "If else"


We are doing the samething as before except you are now triggering OUR if the
TRAIT is not triggered (Evolved) Triggered/untriggered synonimous with Evolved/unevolved




Don't do this if you didn't put a check mark in the reset trigger count


Follow through everything.
Recurring Events
This part is easy. If you want an event to keep executing

Simply change the number of times event can fire.
-1 means it will evaluate conditions(if any) each time the specified number of days
have lapsed and will fire.

0 is never

>0 when conditions are met, a running tally of executions will be kept until the times to fire
is met.
Events Triggered Event
There are a couple ways to accomplish this task.

There are Tech Triggers and Event Triggers. Alternately, you may create an event to watch for a change in a variable and may trigger another event upon that.

You have to be careful with variables though. If you set an event to watch for an event that is triggered by a variable, depending on how you set that up will determine which of the two fire first.

But I will cover just hooking them together and using conditional statement trees to organize them.
Using Outcome Section ONLY
It is important to include all possible routes when setting these up.

Use the Custom Global Variables and Custom Country Variables to store data to help with that. Such as a custom trait I made



Reset count is checked
Days to count is 1
and times to trigger is -1

The way I have it set up ensures 3 things:
1) If its untriggered and customglobalvariable = 1
2) If its triggered and customglobalvariable = 0
3) If customglobalvariable isn't 0 or 1

The third one is vital because you don't want the event to fire if this is the starting position.
Notice the ORDER in which I wrote them.....order WILL matter. The first condition to be MET is the condition that will be used in the outcomes section. There is nothing in the other sections because there is no need.

This event will run EVERY day AND everyday will reset the Genetic drift.
How to avoid a recursive Event loop
This is difficult to avoid if you haven't established sound logic. It helps to make a small flow chart.

In one of my previous sections, I explained about making an event to watch variables and events.
one way that will ensure an endless loop is if you don't have all your base events watching every day.
Or at LEAST they should be watching ON the same days. The loop would occur in a case like, you have two different events watching the same variable but ONE of the events is also set to change the variable if something ELSE is triggered...say, if you evolve a particular trait. So the first event would fire, then the second....change the variable and from then on the first event would no longer fire, but the second one would fire everytime.
Other things can affect this as well. Just make sure that you account for ALL conditions, especially events that you have set to run EVERY DAY(threshold 0 or 1) and/or times event can trigger is set to -1.

REMEMBER
  • The event will "run" at the specified threshold

  • "Run" does NOT equate to "Event Fired"

  • An event is considered as having "Fired" when the "Outcomes" section of an event is executed

  • IT DOES NOT MATTER if you have a conditional outcome section. If NO global OR country conditions are specified, the event will be COUNTED AS FIRED at the threshold.
I want an event that ...
  • Gives {X DNA Bonus} every {Y days} it goes "UnNoticed" for {Z days}

  • (TechTriggered) Gives {X DNA Bonus} every {Y days} it goes "UnNoticed" for {Z days}

  • (At Game Start) Turns Genetic Drift OFF and sets Genetic Drift Multiplier to 0

  • (Continually) Turns Genetic Drift OFF and resets Genetic Drift Multiplier to 0

  • (Continually) Will notify user of Genetic Drift variable changes

  • Compares Infected Percentage
    In your event conditions, (whether Global, Country or Outcomes) This example will
    use Outcomes.

    Add a New Condition
    Add a new IF outcome
    Add an "AND" then use "Set Variable"
    On your left side expression choose option "Variable" and it will bring up a list
    Select the drop down next to "Population" and choose the game variable you want to compare.

    NOTE: The first 2 on my list under "Population" end with the word "Percentage", if you want to
    use total infected you will have to do other things to make it work...like compare numbers against starting world population or if you are going the route of comparing vs a country you will have to do similar actions of comparison.

    For simplicity sake we are comparing a Global Percentage so we will select "Infected Percentage"

    here's the IMPORTANT piece

    on the right side expression (What we are comparing it to) select numeric value and enter your
    percentage as a DECIMAL, This range is 0.0 to 1.0. So 25% is 0.25, 66% is 0.66.

    I believe you have it from here, if I understood your original question properly you were only unable to locate Infected Population variables.

    Events are things, mainly, that YOU the scenario creator MAKE. Hence the requirement for
    you to NAME the event when you make a new one. This is so you can "Call" this event at any
    point during the game, attach it to other events or run this event when certain conditions are met
    elsewhere.
Custom Event and Properties from my Local File
If you know how to read XML Data and are confident you can pull the proper parts out to merge with your existing "events.txt" on your system....Then here you go.....WARNING....other settings I have in other files that YOU don't have in yours may cause unexpected....things. Like, it might not work like it's supposed to.

It's called events.txt in the local storage of your pc under
C:\Users\[User Name]\AppData\Local\Ndemic Creations\Plague Inc. Evolved\Scenario Creator

The Tech called 27898d8f-3cb7-4d67-8055-d1cc7dab8e82 needs to be swapped with whatever trait you want to be the trigger mech.....Ie- Water 1, Cold Resistance 1, Coughing....etc
**************************************************************************

<Data xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GameEvents>
<GameEvent Tutorial="false" Debug="false" RecentEventCounter="1" ResetRecentEventCounter="true" Name="DP-ST" Editable="HIDDEN" Scenarios="ALL" Limit="-1">
<TypeCondition>
<Type>BACTERIA</Type>
</TypeCondition>
<Outcomes>
<Outcome Chance="1" LogicalOp="IF">
<NewsPriority>1</NewsPriority>
<LocalEffect>
<Effects>
<Effect Target="DISEASE" Field="evolveTech" Op="SET" Val="transmission" />
<Effect Target="DISEASE" Field="customGlobalVariable2" Op="SET">
<Parameter>
<LiteralVal Val="0" />
</Parameter>
</Effect>
</Effects>
</LocalEffect>
<PopupIcon>scenario_nipah_virus</PopupIcon>
<PopupTitle OnlyIfNotNoticed="false">FREE<Parameter /></PopupTitle>
<PopupMessage OnlyIfNotNoticed="false">%D evolved %E<Parameter /></PopupMessage>
<NewsMessage OnlyIfNotNoticed="false"><Parameter /></NewsMessage>
<DynamicNewsItem>false</DynamicNewsItem>
<DiseaseCondition>


<Conditions>
<Cond CombineOp="AND">
<Cond>
<TechVal isTriggered="false" tech="27898d8f-3cb7-4d67-8055-d1cc7dab8e82" />
</Cond>
</Cond>
<Cond CombineOp="EQUALS">
<Cond Target="DISEASE">
<FieldVal Field="customGlobalVariable2" Op="SET" />
</Cond>
<Cond>
<LiteralVal Val="1" />
</Cond>
</Cond>
</Conditions>
</DiseaseCondition>
</Outcome>
<Outcome Chance="1" LogicalOp="ELSEIF">
<NewsPriority>1</NewsPriority>
<LocalEffect>
<Effects>
<Effect Target="DISEASE" Field="evolveTech" Op="SET" Val="transmission" />
<Effect Target="DISEASE" Field="customGlobalVariable2" Op="SET">
<Parameter>
<LiteralVal Val="1" />
</Parameter>
</Effect>
</Effects>
</LocalEffect>
<PopupIcon>scenario_nipah_virus</PopupIcon>
<PopupTitle OnlyIfNotNoticed="false">FREE<Parameter /></PopupTitle>
<PopupMessage OnlyIfNotNoticed="false">%D evolved %E<Parameter /></PopupMessage>
<NewsMessage OnlyIfNotNoticed="false">
<Parameter />
</NewsMessage>
<DynamicNewsItem>false</DynamicNewsItem>
<DiseaseCondition>


<Conditions>
<Cond CombineOp="AND">
<Cond>
<TechVal isTriggered="true" tech="27898d8f-3cb7-4d67-8055-d1cc7dab8e82" />
</Cond>
</Cond>
<Cond CombineOp="EQUALS">
<Cond Target="DISEASE">
<FieldVal Field="customGlobalVariable2" Op="SET" />
</Cond>
<Cond>
<LiteralVal Val="0" />
</Cond>
</Cond>
</Conditions>
</DiseaseCondition>
</Outcome>
<Outcome Chance="1" LogicalOp="ELSEIF">
<NewsPriority>1</NewsPriority>
<LocalEffect>
<Effects>
<Effect Target="DISEASE" Field="customGlobalVariable2" Op="SET">
<Parameter>
<LiteralVal Val="1" />
</Parameter>
</Effect>
</Effects>
</LocalEffect>
<DynamicNewsItem>false</DynamicNewsItem>
<DiseaseCondition>


<Conditions>
<Cond CombineOp="NOT_EQUAL">
<Cond Target="DISEASE">
<FieldVal Field="customGlobalVariable2" Op="SET" />
</Cond>
<Cond>
<LiteralVal Val="0" />
</Cond>
</Cond>
<Cond CombineOp="NOT_EQUAL">
<Cond Target="DISEASE">
<FieldVal Field="customGlobalVariable2" Op="SET" />
</Cond>
<Cond>
<LiteralVal Val="1" />
</Cond>
</Cond>
</Conditions>
</DiseaseCondition>
</Outcome>
<Outcome LogicalOp="ALWAYS">
<NewsPriority>1</NewsPriority>
<LocalEffect>
<Effects>
<Effect Target="DISEASE" Field="geneticDriftMax" Op="SET">
<Parameter>
<LiteralVal Val="0.0" />
</Parameter>
</Effect>
</Effects>
</LocalEffect>
<DynamicNewsItem>false</DynamicNewsItem>
</Outcome>
<Outcome LogicalOp="ALWAYS">
<NewsPriority>1</NewsPriority>
<LocalEffect>
<Effects>
<Effect Target="DISEASE" Field="geneticDrift" Op="SET" Val="False" />
</Effects>
</LocalEffect>
<DynamicNewsItem>false</DynamicNewsItem>
</Outcome>
</Outcomes>
</GameEvent>
</GameEvents>
</Data>
60 Comments
Iron Trident 20 Mar @ 4:03pm 
I hear there is a way, but you'd have to go into the game files and use code from the Necroa Virus to get a specific trait to be evolved. Sounds like a pain in the ass if you ask me.
Iron Trident 18 Mar @ 2:01pm 
Ah. There is?
Acid_Piss  [author] 18 Mar @ 11:37am 
I am wanting to say yes, there is a way
Acid_Piss  [author] 18 Mar @ 11:36am 
@Iron Trident

I will take a look for you tonight. Sent you a friend req, I'll mesg you what I can find out.
Iron Trident 28 Feb @ 2:45pm 
I know you haven't played this in over five years, but is there a way to specifically evolve a trait? (For context I am trying to evolve a trait based on starting country. I already have the country condition needed, but right now I still can't figure out how to target the trait(s) I want to auto evolve.)
Acid_Piss  [author] 31 Dec, 2022 @ 3:19pm 
I'm not sure....I haven't actually played this in about 4 years.
Lord Raganow 31 Dec, 2022 @ 12:12pm 
There is any way to make translation of own pop ups? I mean like translating UI text.
Acid_Piss  [author] 9 Sep, 2020 @ 9:32am 
Gasterdark: I assume you want to have that available the user to select and launch. I REALLY need to go into the editor and see whats new(Haven't actually played the game or used the editor in 4 years) But I remember there being a scenario where you can use planes to select a launch site and a destination site for increased infection. If there is a way to replicate that, you can instead use it as a nuclear attack.

If not, your other option is to do it like the spores from the fungus type. They pay for the nuke, select a country that has at least 1 infected. With this, I would say it should kill infected AND noninfected. I leave it to you to decide the other side effects of using that option to nuke. But you could make it VERY interesting, for sure.
Acid_Piss  [author] 9 Sep, 2020 @ 9:15am 
spyguyix: Not sure....there are a few things that could cause that issue. 1) It could be that you made events that are not tied to anything that would MAKE it fire
2) It could be that the conditions for the firing event are never reached OR are surpassed before the event fires(IE-You specified a SPECIFIC number to match like = instead of >= or <=)
3) Something else I'm unaware of
Acid_Piss  [author] 9 Sep, 2020 @ 9:07am 
GoGraystripe: I have no idea, I don't use mac.