Imperator Development Diary - 15th of April

Imperator Development Diary - 15th of April

  • We will be taking the forums down to perform a site upgrade on 26 January 2020 at approximately 8AM CST (14PM UTC). This downtime is estimated to last between 6 and 8 hours.
  • Crusader Kings III Available Now!

    The realm rejoices as Paradox Interactive announces the launch of Crusader Kings III, the latest entry in the publisher’s grand strategy role-playing game franchise. Advisors may now jockey for positions of influence and adversaries should save their schemes for another day, because on this day Crusader Kings III can be purchased on Steam, the Paradox Store, and other major online retailers.


    Real Strategy Requires Cunning

Trin Tragula

Game Designer - Imperator
Moderator
28 Badges
Aug 1, 2003
6.460
11.506
  • Victoria: Revolutions
  • IPO Investor
  • Paradox Order
  • Mount & Blade: Warband
  • Europa Universalis IV: Pre-order
  • Crusader Kings II: Holy Knight (pre-order)
  • 500k Club
  • 200k Club
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Victoria 2
  • Sengoku
  • Semper Fi
  • Rome Gold
  • Europa Universalis III Complete
  • March of the Eagles
  • Magicka
  • Europa Universalis III Complete
  • Heir to the Throne
  • Hearts of Iron III
  • For the Motherland
  • For The Glory
  • Divine Wind
  • Europa Universalis III Complete
  • Deus Vult
  • Crusader Kings II
  • Arsenal of Democracy
Hello and welcome to another Development Diary for Imperator: Rome!
Today will be a different type of Diary compared to some previous ones as we will be focusing entirely on some of the new technical things that Imperator brings to our scripting capabilities. In other words we will be looking at what new things we are adding that you will be able to use to mod the game.
As in any Paradox Game there will be a wide list of triggers, effects, scopes, etc, but this diary will focus on more high level new things and systems, such as the new script value system or the scriptable gui system.
These things are likely best described by those who created them so with that I will leave the word to @blackninja9939 who will talk about scopes, variables and the scriptable GUI and then @Meneth who will be introducing the wonderful world of Scriptvalues.

SCOPES:

Hello all! I'm Matthew Clohessy and I work as a programmer at PDS. Up until six months ago I was a Content Designer before moving roles, some of you might've seen me around in various modding sections of the forums before as I used to mod Crusader Kings 2 a lot. Over the past year whilst working on <insert cool projects here> I've been doing a variety of improvements to the new Jomini script system to make it a lot more usable, versatile and consistent than the old versions.

Jomini is our Grand Strategy Library which is a midlayer between the game projects and the Clausewitz engine, it contains things that a GSG game can share such as the idea of the game state update, multiplayer, provinces and of course our script system.

Here I'll give you a brief overview of some of the brand new things in the Jomini script system as well as updated and improved versions of systems we had in older games.

With that preamble out of the way lets dive in! The idea of scope types and switching between them is in Jomini, the current Jomini scope types are: no scope, bool, value, color and flag. Yes numbers and bools etc. are a scope type, it has its pros and cons. We refer to these scope types as primitive scopes due to their basic nature and generally not having an object attached to it just the raw ID.
Every event or interaction has a “top scope” which stores root, saved scopes and local variables.

Event Targets are how we 1-1 switch between scope objects, they are comprised of one or more “links” separated by dots. Eg: root.mother.father
As they are separated by dots they can be used in one line so you can do
set_character_religion = root.father.mother.religion
A link can have multiple input types to lead to one output type, allowing polymorphic links that can do more than one thing! So “culture” can move from a province, character, country, pop etc. to their culture.

A scope object can be saved with an arbitrary name to reference later on in the top scope, in our older games these were called event targets. The name was changed as internally both were called event targets before and one is shorter to type for script. Eg:
Code:
father = { save_scope_as = cool_person }
scope:cool_person = { kill_painfully = yes }
Gone are the days of needing things like father = { character = root.mother.father } as a condition to see if two characters are the same.
Now we can just do father = root.mother.father, this works for any event target so you can compare things very simply.

This also allows the comparison of numeric values using >, <, >=, <=, = and !=

Numeric links can be used as the value in an effect such as mother = { add_loyalty = root.prominence }

SCRIPT LISTS:

Script lists are how we move from one scope to one or more from a list of similar objects. Eg: any_sibling

With the new system we internally only register the list builder such as sibling, the code then automatically generates the various versions for the script.
Currently we have four versions created: any_, every_, random_ and ordered_
The first three should be recognizable, but they’ve all been extended with new functionality
  • Any: Is a trigger that returns true if any of the list meet certain conditions, can have an optional count or percent parameter to indicate X many or Y percent of the list must meet the conditions
  • Every: Runs effects on all members of the list if they meet certain conditions. Can have multiple alternative_limits for backup conditions if the previous set was not met.
  • Random: Runs effects one one member of the list if they meet certain conditions. Can also have alternative_limits as well as a weight to influence which random object to run effects on.
  • Ordered: Runs effect on the entry in a list based on position or range of positions. The list can be ordered by any script value such as loyalty or gold. Can have a limit and alternative_limits on it to filter members of the list.
VARIABLES:

Any non-primitive scope type can be made to store variables in it, which scope types to have them is a game level decision so if you find a scope that does not make a request for it to be added, variables themselves can be any scope type. You can store a value, bool, flag or character etc. inside of them.
This allows for recording a saved scope on a specific object instead of just in a top scope.

Variables can be stored in three places: a scope object (character, country etc.), locally in a top scope (like a normal saved scope) or globally in the game state.

Variables themselves are treated as a scope object referring to whatever is stored in them allow you to scope to them.
One could have a best friend variable on a character which they save someone as the value then scope to that best friend variable to give the character a gift later on.

The event target link to scope to a variable depends on the storage type:
Code:
var:name
local_var:name
global_var:name
There are effects and triggers to manipulate and check numeric variables to change their value etc.

LISTS:

You can create a custom list of event scopes or variables which can be iterated over as a script list.
Code:
every_character = {
    limit = {
        has_variable = olympic_attendee
    }
    add_to_list = olympic_competitor_list
}
random_in_list = {
    list = olympic_competitor_list
    die_very_painfully = yes
}
You can remove items from lists and check for their presence etc.

SWEET SWEET DOCUMENTATION:

We have previously made attempts at automatic documentation with varied success, some bits could be outdated or incorrect, some core information was not printed at all etc.
Now the script documentation console command has been moved to Jomini and it outputs to separate files in your games log folder:
  • All effects, the scopes they can be used in and a brief description, if they are a script list the scope they lead to.
  • All triggers, the scopes they can be used in and a brief description, if they are a script list the scope they lead to.
  • All scope types, character, country, value etc.
  • All event target links, the scopes they can be used from, the scope they output to and a brief description.
  • All saved scopes created by the code.
  • All modifiers, the scope they can be applied to eg: levy_reinforcement_rate
  • All on actions, if they are from code or script and the expected scope they are called in

GUI & LOCALIZATION SYSTEM:

We have a new GUI system for the games which works with its own specif setup of scripting, it is also the same system used for the localization system. Collectively this is called the Data System
Everything you can run must be either registered in by the code or made as a scripted gui.

All things you can use in the data are split into four categories:
  1. Types, the type of an object which corresponds to its class/struct in the code
  2. Promotes, moving from an object of one type to an object of another
  3. Functions, calling a function on an object which returns something
  4. Callbacks, calling a function on an object which does not return anything

Another thing to keep in mind is that the data system obeys (for the most part) how const works in C++. Without getting too technical functions, promote and callbacks can be marked as const only, which means that object which are const cannot call non-const. This is unlikely to affect you if you use the scripted guis though.

Scripted GUI

The scripted gui lets you evaluate and execute arbitrary script via the UI in a manner that will keep the game synchronized in multiplayer. You define the script in common/scripted_guis and can then reference that in data entries.

For example a cheat button to give you gold and take it from another character:
Code:
# common/scripted_guis
cheat_gold_button = {
    scope = character
    saved_scopes = {
        second
    }
    is_shown = { # Can be omitted as always true
        always = yes
    }
    is_valid = {
        gold < 5000
    }
    effect = {
        add_gold = 500
        scope:second = {
            add_gold = -500
        }
    }
}

# in a gui entry
button = {
    name = "my_cheat_button"
    datacontext = "[GetScriptedGui('cheat_gold_button')"
    texture = "gfx/interface/icons/shared_icons/bankruptcy.dds"
    visible = "[ScriptedGui.IsShown( GuiScope.SetRoot( SomeCharacter.MakeScope ).AddScope( SomeOtherCharacter.MakeScope ).End )]"
    enabled = "[ScriptedGui.IsValid( GuiScope.SetRoot( SomeCharacter.MakeScope ).AddScope( SomeOtherCharacter.MakeScope ).End )]"
    onclick = "[ScriptedGui.Execute( GuiScope.SetRoot( SomeCharacter.MakeScope ).AddScope( SomeOtherCharacter.MakeScope ).End )]"
    tooltip = "[ScriptedGui.BuildTooltip( GuiScope.SetRoot( SomeCharacter.MakeScope ).AddScope( SomeOtherCharacter.MakeScope ).End )]"
}
The AI will currently not use these buttons, you could however make hidden pulse events to have them evaluate the same actions.

And with that it is time for @Meneth to talk about what Script values are and why we love them.

Script Values

Good afternoon. I'm Magne "Meneth" Skjæran, and I'm a programmer at PDS. I used to work on Crusader Kings II, where I among other things made a variety of improvements to the script system.
For a while now, I've been working on <redacted>, and I've also recently had a 1 month stint on Imperator.
As part of my work, I added a script math system to Jomini. Jomini is the layer between Clausewitz and the game that handles things like script system basics that don't relate to any specific game.
This is not something we've had in any previous game; the closest one could get was heavy use of variables, which was highly limiting.
I'm here today to talk in some detail about this system, outlining what it can do, so let's start from the beginning.

Script values

The script math system builds on the script value system. Most of our games have some version of this: the ability to define named values in one file for use in multiple places:
some_value_name = 1000
Which can then be used wherever:
Code:
add_gold = some_value_name
In our older games, the support for this could at times be spotty. In games based on Jomini, this is supported almost anywhere numbers can be used.
In the Jomini games, these values can also be things that aren't just simple numbers. You can for instance do things like:
Code:
add_gold = scope:some_country.gold # Adds as much gold as "some_country" has
Mathematical operations

With the script math system, you can now do simple math in script. Instead of "some_value_name = 1000", you can insert math:

Code:
some_value_name = {
    value = scope:some_country.gold
    add = 50
    multiply = 100
}
Which would result in ( "some country"'s gold + 50 ) * 100.
We support the following operations:

  • value = ... # Sets the value to the right-hand-side (RHS)
  • add = ... # Adds the RHS
  • subtract = ... # Subtracts the RHS
  • multiply = ... # Multiplies with the RHS
  • divide = ... # Divides with the RHS
  • modulo = ... # Takes the remainder from dividing with the RHS
  • min = ... # Increases the value to the RHS if it is lower
  • max = ... # Decreases the value to the RHS if it is higher
  • floor = yes # Rounds down. 1.2 -> 1, -1.8 -> -2
  • ceiling = yes # Rounds up
  • round = yes # Rounds to the nearest integer
As you can see, this allows you do to complex math, letting you implement things like costs that depend on a lot of factors in a simple manner.

Inlining

Taking the system further, anything that supports taking a script value by name (E.G., add_gold = some_value_name) also supports doing that math inline.
So instead of "add_gold = some_value_name", you can do this:

Code:
add_gold = {
    value = scope:some_country.gold
    add = 50
    multiply = 100
}
Which will give the exact same result. This is very handy when a value is only used in a single place, since you can then easily see and tweak it where it is being used.
You can even do this inside the math itself. Imagine you want to do the math "gold * ( prestige + 50 )". While you could do this by reordering the math, that'd be pretty tedious. With inlining, you don't have to:

Code:
add_gold = {
    value = gold
    multiply = {
        value = prestige
        add = 50
    }
}
There's no limit on how far you can nest the math.

Conditional logic
Beyond just simple math, you can also have conditional logic. For instance, perhaps you want a reward to be higher if a country has a specific innovation:
Code:
add_gold = {
    value = 100
    if = {
        limit = { has_innovation = some_innovation }
        multiply = 3
    }
    else_if = {
        limit = { has_innovation = some_other_innovation }
        multiply = 2
    }
}
This will result in 300 if the country has some_innovation, 200 if it only has some_other_innovation, and 100 if it has neither.

Ranges

For effects, you can also randomize numbers.
You can do this in two ways.
First there's a very simple syntax:
Code:
add_gold = { 10 100 }
Which would result in a random amount between 10 and 100.

This would also work:
Code:
add_gold = { some_value some_other_value }
However, this syntax does not work with inlining of math. So for that, we have two statements; integer_range and fixed_range.
integer_range will give an integer number in the designated range (E.G., 1, 2, 3). fixed_range will give a fixed-point number (E.G., 0.1, 0.2, 0.345).
An example of this:
Code:
add_gold = {
    integer_range = {
        min = { value = gold multiply = 2 }
        max = { value = gold multiply = 10 }
    }
}
This would give between 2 and 10 times the country's gold.

Lists

We also support list operations, allowing you to work with collections of items and base the math on each individual item in the collection.
Any list that works in normal script (E.G., every_country, every_subject, every_character) will also work in script math.
The script below for example would add the gold of all your subjects:
Code:
add_gold = {
    every_subject= {
        add = gold
    }
}
You can also change scope. Perhaps you want to add all of your overlord's subjects' gold instead:
Code:
add_gold = {
    overlord = {
        every_subject = {
            add = gold
        }
    }
}
As you can see, this system makes it simple to do a lot of things that in our past games was either difficult or even impossible to do in script.
We've used the system a lot in Imperator, and we look forward to seeing what modders will do with it as well.

endofdays.png

And with that this developer diary is at an end. Since script does not lend itself to pretty screenshots here is one from the various screens you can get when the game ends. It's appearance and the text will differ depending on how well you did, this was gotten by making the game end in our devclash save, where I'm in control of the proud nation of Bactria. The game seems to think we've achieved little of note sadly :)
 

Meneth

Crusader Kings 3 Programmer
129 Badges
Feb 9, 2011
10.025
4.686
www.paradoxwikis.com
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Holy Knight (pre-order)
  • Crusader Kings II
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: The Republic
  • 500k Club
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Cradle of Civilization
  • Magicka: Wizard Wars Founder Wizard
  • Mount & Blade: Warband
  • Mount & Blade: With Fire and Sword
  • Crusader Kings II: Way of Life
  • Stellaris: Digital Anniversary Edition
  • Hearts of Iron IV: Field Marshal
  • Age of Wonders III
  • Crusader Kings II: Conclave
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Galaxy Edition
  • Surviving Mars
  • Hearts of Iron IV Sign-up
  • Stellaris Sign-up
  • Crusader Kings II: Reapers Due
  • Crusader Kings Complete
  • Steel Division: Normand 44 Sign-up
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Expansion Pass
  • Cities: Skylines - Parklife
  • Prison Architect
  • Stellaris: Leviathans Story Pack
  • Europa Universalis III Complete
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis III Complete
  • Europa Universalis IV: Rule Britannia
  • Teleglitch: Die More Edition
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Charlemagne
  • Magicka 2 - Signup Campaign
  • Knights of Pen and Paper 2
  • Europa Universalis IV: Mare Nostrum
  • Knights of Honor
  • Deus Vult
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
Let me know if you've got any questions about the script math system.
 

Mattzo12

Sergeant
76 Badges
Aug 7, 2014
98
175
  • Crusader Kings II
  • Hearts of Iron III
  • Age of Wonders: Planetfall
  • Surviving Mars: Digital Deluxe Edition
  • Stellaris: Galaxy Edition
  • Prison Architect
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Holy Fury
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Surviving Mars
  • Hearts of Iron IV: Death or Dishonor
  • Cities: Skylines - Parklife
  • Age of Wonders III
  • Cities: Skylines - Green Cities
  • Cities: Skylines - Parklife Pre-Order
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Europa Universalis IV: Rule Britannia
  • Victoria 2
  • Imperator: Rome Deluxe Edition
  • Europa Universalis IV: Dharma
  • Surviving Mars: First Colony Edition
  • Imperator: Rome Sign Up
  • Stellaris: Distant Stars
  • Crusader Kings III
  • Cities: Skylines - Campus
  • Rome: Vae Victis
  • Cities: Skylines
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Stellaris: Lithoids
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis: Rome
  • Europa Universalis IV: Res Publica
  • Cities: Skylines - After Dark
  • Crusader Kings II: The Republic
  • Crusader Kings II: The Old Gods
I'm no modder, but looks interesting.

That artwork is very pretty. Are there desktop background versions?
 

Grzegorz Grzybek

First Lieutenant
89 Badges
Apr 1, 2016
206
146
  • Crusader Kings II
  • Steel Division: Normandy 44 -  Back to Hell
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Cities: Skylines - Natural Disasters
  • Imperator: Rome Sign Up
  • Imperator: Rome - Magna Graecia
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: La Resistance
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Steel Division: Normandy 44
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Death or Dishonor
  • Europa Universalis IV: Rule Britannia
  • Cities: Skylines - Green Cities
  • Stellaris: Apocalypse
  • Cities: Skylines - Parklife
  • Stellaris: Distant Stars
  • Europa Universalis IV: Dharma
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Golden Century
  • Stellaris: Ancient Relics
  • Imperator: Rome Deluxe Edition
  • Europa Universalis 4: Emperor
  • Cities: Skylines - Campus
  • Hearts of Iron IV: Expansion Pass
  • Cities: Skylines - Parklife Pre-Order
  • Crusader Kings II: Conclave
  • Stellaris: Lithoids
  • Victoria 2
  • Cities: Skylines
  • Stellaris: Humanoids Species Pack
  • Europa Universalis IV: El Dorado
  • Battle for Bosporus
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Crusader Kings III
I'm also not a modder, but I work in Jackson-based parser that finally parses almost all game data files from Hearts of Iron 4.
Even if the syntax is not pure JSON, I was able to implement custom parser that now allows me to browse the ships and modules (work in progress).

This summary is nice insight into the syntax.
 
Last edited:

Voidlord

Major
56 Badges
May 30, 2013
737
475
  • Crusader Kings II
  • Europa Universalis IV: Rights of Man
  • Age of Wonders: Planetfall Sign Up
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • BATTLETECH
  • Hearts of Iron IV: Death or Dishonor
  • Age of Wonders III
  • Crusader Kings II: Jade Dragon
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • BATTLETECH - Digital Deluxe Edition
  • Stellaris: Distant Stars
  • Stellaris: Lithoids
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Imperator: Rome Deluxe Edition
  • Hearts of Iron IV: Expansion Pass
  • Prison Architect
  • Imperator: Rome Sign Up
  • Stellaris: Ancient Relics
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: La Resistance
  • Imperator: Rome - Magna Graecia
  • Europa Universalis IV: Wealth of Nations
  • BATTLETECH: Heavy Metal
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Imperator: Rome
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Sword of the Stars
  • Supreme Ruler 2020
  • Stellaris: Synthetic Dawn
You can mod the enddate :)
Oh nice
I hope someone extends the end date till just before the collapse of the Western Roman Empire. Mostly to bridge the gap between I:R and WtWSMS.
 

Fallender

Second Lieutenant
81 Badges
May 9, 2012
164
84
  • Crusader Kings II
  • Cities: Skylines
  • Stellaris: Humanoids Species Pack
  • Imperator: Rome - Magna Graecia
  • Stellaris: Apocalypse
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
  • Stellaris: Distant Stars
  • Shadowrun Returns
  • Shadowrun: Dragonfall
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Imperator: Rome Deluxe Edition
  • Prison Architect
  • Imperator: Rome Sign Up
  • Stellaris: Ancient Relics
  • Age of Wonders: Planetfall
  • Age of Wonders: Planetfall Deluxe edition
  • Age of Wonders: Planetfall Premium edition
  • Age of Wonders: Planetfall Season pass
  • Crusader Kings III Referal
  • Stellaris: Lithoids
  • Age of Wonders: Planetfall - Revelations
  • Crusader Kings II: Conclave
  • Teleglitch: Die More Edition
  • War of the Roses
  • 500k Club
  • Europa Universalis IV: Pre-order
  • Magicka: Wizard Wars Founder Wizard
  • Mount & Blade: Warband
  • Mount & Blade: With Fire and Sword
  • Crusader Kings II: Way of Life
  • Magicka 2
  • Cities: Skylines - After Dark
  • Crusader Kings II: Jade Dragon
  • Stellaris
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Crusader Kings II: Reapers Due
  • Tyranny: Archon Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Age of Wonders III
My birthday is in 10 days. :)
The two hours modding stream will be awsome!
 

Darkath

Scholar-Official
92 Badges
Apr 9, 2012
3.430
4.236
  • 500k Club
  • Humble Paradox Bundle
  • Crusader Kings III: Royal Edition
  • Crusader Kings III
  • Crusader Kings III Referal
  • Crusader Kings II
  • Hearts of Iron IV Sign-up
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Pre-order
  • Prison Architect
  • Shadowrun: Hong Kong
  • Shadowrun: Dragonfall
  • Shadowrun Returns
  • Cities: Skylines Deluxe Edition
  • Cities: Skylines
  • Europa Universalis III Complete
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • Teleglitch: Die More Edition
  • Tyranny: Archon Edition
  • Age of Wonders III
  • Victoria 2
  • Pillars of Eternity
  • Hearts of Iron III
  • Magicka
  • Magicka 2
  • Mount & Blade: Warband
Did you think about including an animated map of your conquests, on the end screen like in total war ? That is very satisfying to watch. Also graphs and various stats can do.
 

magriboy0750

Colonel
85 Badges
Jun 27, 2018
913
272
  • Europa Universalis IV: Third Rome
  • Surviving Mars: Digital Deluxe Edition
  • Stellaris: Ancient Relics
  • Victoria 2
  • Crusader Kings Complete
  • Europa Universalis IV: Cradle of Civilization
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Apocalypse
  • Europa Universalis III: Collection
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Pre-order
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Mandate of Heaven
  • Hearts of Iron IV: La Resistance
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Golden Century
  • Imperator: Rome Deluxe Edition
  • Imperator: Rome
  • Imperator: Rome Sign Up
  • Age of Wonders: Planetfall
  • Age of Wonders: Planetfall Deluxe edition
  • Europa Universalis 4: Emperor
  • Age of Wonders: Planetfall Premium edition
  • Age of Wonders: Planetfall Season pass
  • Age of Wonders III
  • Europa Universalis IV: Call to arms event
  • Imperator: Rome - Magna Graecia
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • Surviving Mars: First Colony Edition
  • Europa Universalis IV: Dharma
  • Stellaris: Distant Stars
  • Surviving Mars
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Res Publica
Is this possible to create an event that give permanent 100 loyalty and 100 hapiness for all characters and pops of a country?I want to do it for rp reasons.
Thanks for any reply about this.
 

blackninja9939

Programmer
74 Badges
Aug 28, 2013
2.301
4.211
  • Crusader Kings III: Royal Edition
  • Crusader Kings III
  • Europa Universalis 4: Emperor
  • Battle for Bosporus
  • Crusader Kings II
  • Crusader Kings II: Holy Fury
  • Imperator: Rome - Magna Graecia
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Old Gods
  • Europa Universalis IV: Rights of Man
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Synthetic Dawn
  • Surviving Mars
  • BATTLETECH
  • Europa Universalis IV: Mandate of Heaven
  • Crusader Kings II: Monks and Mystics
  • Tyranny: Archon Edition
  • Europa Universalis IV: Rule Britannia
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Colonel
  • Stellaris Sign-up
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Apocalypse
  • Stellaris: Lithoids
  • Stellaris: Distant Stars
  • Europa Universalis IV: Dharma
  • Shadowrun Returns
  • Imperator: Rome Deluxe Edition
  • Prison Architect
  • Imperator: Rome Sign Up
  • Stellaris: Ancient Relics
  • Age of Wonders: Planetfall
  • Crusader Kings II: Conclave
  • Crusader Kings II: The Republic
  • Victoria 2
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Stellaris
  • Mount & Blade: Warband
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Jade Dragon
  • Europa Universalis IV: Third Rome
Interesting, so how would you scope to a random POP? By going province.city.? or by something like any_pop and limit the search?
Yeah pretty much, there is a script list to move from a city to the pops in it and then you use the limit to restrict the search.
 

Riekopo

Field Marshal
On Probation
90 Badges
Apr 24, 2013
3.060
1.977
  • Crusader Kings II
  • Pillars of Eternity
  • Europa Universalis IV: Pre-order
  • Warlock: Master of the Arcane
  • Rome: Vae Victis
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Semper Fi
  • Rome Gold
  • Victoria: Revolutions
  • Europa Universalis IV: Res Publica
  • March of the Eagles
  • King Arthur II
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • Europa Universalis IV: Call to arms event
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • For the Motherland
  • Crusader Kings II: Conclave
  • Stellaris: Leviathans Story Pack
  • Stellaris
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV Sign-up
  • Stellaris Sign-up
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Mount & Blade: With Fire and Sword
  • Mount & Blade: Warband
  • Pride of Nations
  • Europa Universalis IV: El Dorado
  • Victoria 2
  • Hearts of Iron IV: Together for Victory
I'd be really pissed if I got a depressing screen like that at the end of my game.
 

ToraktheNord

Sergeant
35 Badges
Aug 15, 2015
93
91
  • Victoria 2: Heart of Darkness
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Hearts of Iron IV Sign-up
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Common Sense
  • Hearts of Iron IV: Death or Dishonor
  • Europa Universalis IV: Cradle of Civilization
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Golden Century
  • Imperator: Rome
  • Imperator: Rome Sign Up
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Victoria 2: A House Divided
  • Victoria 2
  • Crusader Kings II: Horse Lords
  • Victoria: Revolutions
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Art of War
  • Crusader Kings II
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Charlemagne
Another question, I reckon scripted GUIs have the same capabilities as they are implemented in HoI4, or can we expect new things like pie charts since Imperator uses them relatively often, or even sliders?

I also want to say how awesome you guys are for ever expanding the modding possibilities!
 

Apologist

Second Lieutenant
15 Badges
Jul 1, 2015
175
1
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Res Publica
  • Cities: Skylines Deluxe Edition
  • Cities: Skylines
  • Stellaris
  • Hearts of Iron IV Sign-up
  • Hearts of Iron IV: Cadet
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
  • Imperator: Rome
  • Imperator: Rome Sign Up
  • Crusader Kings II
  • Europa Universalis IV: Call to arms event
Can you use more advanced maths like finding the square root of a number or multiplying a number to the power of another number?
 

Raphadorus

Recruit
30 Badges
Jun 8, 2016
1
0
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Pre-order
  • Cities: Skylines Deluxe Edition
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Crusader Kings II
  • Hearts of Iron III
  • Europa Universalis IV: Rights of Man
  • Imperator: Rome Sign Up
  • Imperator: Rome
  • Imperator: Rome Deluxe Edition
  • Europa Universalis IV: Golden Century
  • Europa Universalis IV: Dharma
  • Cities: Skylines - Parklife
  • Cities: Skylines - Parklife Pre-Order
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Cradle of Civilization
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • Victoria 2
  • Europa Universalis IV: Third Rome
Code:
add_gold = {
integer_range = {
min = { value = gold multiply = 2 }
max = { value = gold multiply = 10 }
}
}
This would give between 2 and 10 times the country's gold.
Interesting read! Just wondering, in EU4 when you get a bad event that costs you more money than you have, it will leave you with a negative amount of gold until the monthly tick turns this deficit into loans. In Imperator, could it be possible that after such an event your negative amount of gold will be multiplied and you'll actually lose a shitload of money?