collapse

* Chat | Чат

Refresh History
  • bratignat: The site is updated with new feutures!
    January 22, 2018, 01:35:28 PM
  • bratignat: Top Page Links are fixed, enjoy
    April 12, 2017, 11:57:29 AM
  • Jukov: Весела Коледа и Весели Празници!
    December 24, 2016, 11:09:55 PM
  • bratignat: Merry Christmas
    December 24, 2016, 11:07:14 PM
  • bratignat: Back in the Game!
    December 12, 2016, 08:20:06 AM

Author Topic: Modding Language  (Read 518 times)

bratignat

+Info

  • Tzar of Vitosha
    • View Profile
    • Vitosha Studio
Modding Language
« on: December 11, 2016, 05:41:03 PM »
  • ▲▲▲0
  • ▼▼▼0
  • The basic thing we have to know about EU III mechanism is that the game has static and dynamic part. The static part defines the game before the player start the game, for example this part defines which ruler rule over country in particular year and which province is held by particular country in particular time, when the game begins. While the dynamic part has in itself the decisions, events and missions. We can imagine the static part as picture of the play world, which we change while playing the game r with the help of decisions, events missions.

    The dynamic part is consist of events and decisions. The events are situated in folder EU3\event, while the decisions are in EU3\decisions. The language in which they are written is almost identical with very few exceptions.

    The events has the following characteristics - they happen when and only when all prerequisites are met defined in the particular event file. While the decisions has 2 levels mechanism - potential - in which level they are visible, but can't be used and only when the prerequisites of the second level are met the player can take the decision.

    The part in event file which defines how and when they will happen is called trigger. When all prerequisites in the trigger part are met the event is "fired" - it happens.

    In events and decisions there are another very important part which is called scope. Scope is the range of the effect and/or trigger. For example if the event effects cultural group its scope would be the cultural group.   In another words this shows who will suffer the consequences.

    The last part of the events and decisions is called - effect. The effect is the consequence of the decision or the event. Such effect might be the transfer of a province from one country to another, change of country religion, declaration of war and much more.
     
    Code: [Select]
    Effects

    COUNTRY SCOPE:

    EU3 1.3:

    treasury
    Deduct/add money to the country’s treasury.
    Scope: country
    Syntax: treasury = x ( x = +-1..)

    prestige
    Increase/decrease the amount of prestige the country has.
    Scope: country
    Syntax: prestige = x ( x = +-0..1)


    inflation
    Increase/decrease the country’s inflation.
    Scope: country
    Syntax: inflation = x ( x = +-1..)

    stability
    Increase/decrease the country’s stability.
    Scope: country
    Syntax: stability = x (x = -3..3)

    war_exhaustion
    Increase/decrease the amount of war exhaustion a country has.
    Scope: country
    Syntax: war_exhuastion = x (x = +-1..10)

    manpower
    Increase/decrease the amount of manpower a country has.
    IN NOMINE 3.1: if x is between -0.999 and +0.999, it means the percentage of the maximum manpower of the country.
    Scope: country
    Syntax: manpower = x (x = +-0..1)

    army_tradition
    Increase/decrease the country’s army tradition.
    Scope: country
    Syntax: army_tradition = x (x = +-0..1)

    navy_tradition
    Increase/decrease the country’s naval tradition.
    Scope: country
    Syntax: navy_tradition = x (x = +-0..1)

    badboy
    Increase/decrease the country’s reputation-value.
    Scope: country
    Syntax: badboy = x (x = +- 1..)


    capital
    Move the capital to a new province.
    Scope: country
    Syntax: capital = province id

    religion
    Change a country’s religion.
    Scope: country
    Syntax: religion = religion type/THIS

    enable_religion
    Enable a certain religion.
    Scope: country
    Syntax: enable_religion = religion type

    add_core
    Make a certain province the country’s core.
    Scope: country
    Syntax: add_core = province id/THIS

    remove_core
    Loose an existing core on a province.
    Scope: country
    Syntax: remove_core = province id

    primary_culture
    Change the country’s primary culture.
    Scope: country
    Syntax: primary_culture = culture name/THIS

    add_accepted_culture
    Make a certain culture accepted by the country.
    Scope: country
    Syntax: add_accepted_culture = culture name/THIS

    remove_accepted_culture
    Remove an accepted culture from the country.
    Scope: country
    Syntax: remove_accepted_culture = culture name

    elector
    Add/remove an elector.
    Scope: country
    Syntax: elector = yes/no

    add_idea
    Give the country a new idea.
    Scope: country
    Syntax: add_idea = name of idea

    remove_idea
    Remove an existing idea from the country.
    Scope: country
    Syntax: remove_idea = name of idea

    government
    Change the current form of government for the country.
    Scope: country
    Syntax: government = government type

    change_tag
    Transform the country into a new nation.
    Scope: country
    Syntax: change_tag = country tag

    technology_group
    Allow the country to change technology group for better or for worse.
    Scope: country
    Syntax: technology_group = latin/eastern/muslim/indian/chinese/
    african/new_world

    add_country_modifier
    Add a country modifier with certain effects to the country.
    Scope: country
    Syntax: add_country_modifier = name of modifier

    set_country_flag
    Set a flag for the country to indicate that certain criteria have been met.
    Scope: country
    Syntax: set_country_flag = name of flag

    clr_country_flag
    Remove a country flag.
    Scope: country
    Syntax: clr_country_flag = name of country flag

    missionaries
    Increase/decrease the number of missionaries that are available to the country.
    Scope: country
    Syntax: missionaries = x (x = +-1..5)

    merchants
    Increase/decrease the number of merchants that are available to the country.
    Scope: country
    Syntax: merchants = x (x = +-1..5)

    colonists
    Increase/decrease the number of colonists that are available to the country.
    Scope: country
    Syntax: colonists = x (x = +-1..5)

    spies
    Increase/decrease the number of spies that are available to the country.
    Scope: country
    Syntax: spies = x (x = +-1..5)

    diplomats
    Increase/decrease the number of diplomats that are available to the country.
    Scope: country
    Syntax: diplomats = x (x = +-1..5)

    discover
    Allow a country to discover a certain province.
    Scope: country
    Syntax: province id = { discover = yes }

    casus_belli
    Give another country a casus belli on the current country.
    Scope: country
    Syntax: random_country = { casus_belli = THIS }
    Syntax: any_neighbor_country = { casus_belli = THIS }

    add_casus_belli
    Give the current country a casus belli on another country.
    Scope: country
    Syntax: random_country = { add_casus_belli = THIS }
    Syntax: any_neighbor_country = { add_casus_belli = THIS }

    relation
    Improve/Worsen relations between two countries. If this is used the scope has to be changed first so that the effects applies to both the current country and some other state.
    Scope: country
    Syntax: relation = { who = country tag/THIS value = x }

    secede_province
    Cede a specific province to the specified country.
    Scope: country
    Syntax: province id = { secede_province = country tag }

    inherit
    Allow the country to inherit the specified country.
    Scope: country
    Syntax: inherit = country tag

    release
    Allow the country to release the specified country and thereby create a new independent nation.
    Scope: country
    Syntax: release = country tag

    remove_advisor
    Remove an advisor from the country’s court.
    Scope: country
    Syntax: remove_advisor = advisor type

    war
    Start a war between the current country and the specified state.
    Scope: country
    Syntax: war = country tag

    loan_size
    Increase/decrease the loan size that is set for the country.
    Scope: country
    Syntax: loan_size = x (x = +-1..)

    policies
    Move the policy slider the specified amount of steps.
    Scope: country
    Syntax: p = x (x = +-1..5)
    (p = aristocracy_plutocracy/
    centralization_decentralization/
    innovative_narrowminded/
    mercantilism_freetrade/
    offensive_defensive/
    land_naval/
    quality_quantity/
    serfdom_freesubjects)

    technology
    Invest a certain amount of money into the specified technology.
    IN NOMINE 3.1: if x is between -0.999 and +0.999, it means the percentage of the current cost for that technology.
    Scope: country
    Syntax: t = x (x = +-1..)
    (t = land_tech
    naval_tech
    trade_tech
    production_tech
    government_tech)





    Napoleon’s Ambition:

    set_revolution_target
    Makes the current country a revolution target.
    Scope: country
    Syntax: set_revolution_target = this / from / tag

    country_event
    Triggers the specified country event for the current country.
    Scope: country
    Syntax: country_event = event_id

    remove_country_modifier
    Removes a certain country modifier from the current country.
    Scope: country
    Syntax: remove_country_modifier = name of modifier

    create_marriage
    Creates a royal marriage with another country.
    Scope: country
    Syntax: create_marriage = this / from / tag

    create_alliance
    Creates an alliance with another country.
    Scope: country
    Syntax: create_allieance = this / from / tag

    create_admiral
    Creates a random admiral that will be equivalent to one generated with the given amount of tradition.
    Scope: country
    Syntax: create_admiral = amount of tradition (0-100)

    create_explorer
    Creates a random explorer that will be equivalent to one generated with the given amount of tradition.
    Scope: country
    Syntax: create_explorer = amount of tradition (0-100)

    create_conquistador
    Creates a random conquistador that will be equivalent to one generated with the given amount of tradition.
    Scope: country
    Syntax: create_conquistador = amount of tradition (0-100)

    create_general
    Creates a random general that will be equivalent to one generated with the given amount of tradition.
    Scope: country
    Syntax: create_general = amount of tradition (0-100)

    define_admiral
    Creates an admiral with the given name and stats.
    Scope: country
    Syntax: define_admiral = {
    name = "name"
    shock = num
    fire = num
    siege = num
    maneuver = num
    }

    define_explorer
    Creates an explorer with the given name and stats.
    Scope: country
    Syntax: define_explorer = {
    name = "name"
    shock = num
    fire = num
    siege = num
    maneuver = num
    }

    define_conquistador
    Creates a conquistador with the given name and stats.
    Scope: country
    Syntax: define_conquistador = {
    name = "name"
    shock = num
    fire = num
    siege = num
    maneuver = num
    }

    define_general
    Creates a general with the given name and stats.
    Scope: country
    Syntax: define_general = {
    name = "name"
    shock = num
    fire = num
    siege = num
    maneuver = num
    }

    define_ruler
    Creates a new ruler with the given name and stats.
    Scope: country
    Syntax: define_ruler = {
    name = "name"
    regent = yes / no
    female = yes / no
    DIP = num
    MIL = num
    ADM = num
    }

    remove_merchant
    Removes a merchant from a random COT.
    Scope: country
    Syntax: remove_merchant = this / from / random / tag

    add_merchant
    Adds a merchant to a random COT.
    Scope: country
    Syntax: add_merchant = this / from / random / tag

    kill_ruler
    Kills a ruler.
    Scope: country
    Syntax: kill_ruler = “name” / this

    kill_leader
    Kills a leader.
    Scope: country
    Syntax: kill_leader = “name” (random does not work)

    release_vassal
    Allow the country to release the specified country as a vassal.
    Scope: country
    Syntax: release_vassal = this / from / random / tag






    In Nomine:

    set_variable
    Creates a new variable and assigns it the specified value.
    Scope: country
    Syntax: set_variable = {
    which = variable_name
    value = x (x = +-1..)
    }

    change_variable
    Increases or decreases the value of an existing variable.
    Scope: country
    Syntax: change_variable = {
    which = variable_name
    value = x (x = +-1..)
    }

    random
    Adds an x percent chance that a given effect will trigger. If the x% is not met, nothing will happen. So for instance it allows to have an event that MAY lower stability, but also may be innocuous.
    Scope: country
    Syntax: random = {
    chance = x
    [effect] (f.ex: stability = -1)
         }

    random_list
    Allows to have an event where any of a number of things can happen, depending on the odds given. For instance, a 50/50 chance of either a loss of stability or a rebellion right there and then.
    Scope: country
    Syntax: random_list = {
    [odds1] = { [effect1] }
    [odds2] = { [effect2] }

    }

    Example: random_list = {
    50 = { owner = { stability = -1 } }
    50 = { anti_tax_rebels = 1 }
    }

    set_global_flag
    Creates a global flag for all countries.
    Scope: global
    Syntax: set_global_flag = name of global flag

    create_advisor
    Creates a random advisor. NEEDS TESTING
    Scope: country
    Syntax: create_advisor = ????


    define_advisor
    Creates an advisor of the given type and stats.
    Scope: country
    Syntax: define_advisor = {
    name = “advisor name”
    type = type of advisor (statesman…)
    skill = num
    }

    remove_fow
    Removes the target country's fog of war for the country that receives the event so he can see everything in the given country for a period of x months. Not sure if it works with events, it only appears in common\spies.txt in vanilla.
    Scope: country
    Syntax: remove_fow = x

    Code: [Select]
    Scopes
    Several commands can change scope. Whenever the scope is changed, every effect from then on will refer to the new country or province.  Some effects accept a THIS as an argument, which refers to the country or province that received the event.

    COUNTRY SCOPE:

    EU3 1.3:

    ally
    Changes the current scope to any allied country.
    Scope: country
    Syntax: ally = { effects… }

    any_country
    Changes the current scope to any available countries.
    Scope: country
    Syntax: any_country = { effects… }

    random_country
    Changes the current scope to any available country.
    Scope: country
    Syntax: random_country = { effects… }

    emperor
    Changes the current scope to the emperor.
    Scope: country
    Syntax: emperor = { effects… }

    controller
    Changes the current scope from the current province to the country that controls it.
    Scope: country
    Syntax: controller = { effects… }

    owner
    Changes the current scope from the current province to the country that owns it.
    Scope: country
    Syntax: owner = { effects… }

    [country tag]
    Changes the current scope to a specific country, chosen by its tag.
    Scope: country
    Syntax: [TAG] = { effects… }










    Napoleon’s Ambition:

    FROM
    Changes the current scope to the country that triggered the current event.
    Scope: country
    Syntax: FROM = { effects… }

    revolution_target
    Changes the current scope to a country that has been chosen as a revolution target..
    Scope: country
    Syntax: revolution_target = { effects… }

    local_enemy
    Changes the current scope from the current province to an enemy country with troops in it.
    Scope: country
    Syntax: local_enemy = { effects… }

    any_neighbor_country
    Changes the current scope to any available neighboring countries.
    Scope: country
    Syntax: any_neighbor_country = { effects… }

    overlord
    Changes the current scope either to the senior partner in a PU with the current country or to its overlord if it’s a vassal.
    Scope: country
    Syntax: overlord = { effects… }




    In Nomine 3.0:

    crusade_target
    Changes the current scope to the country currently targeted by a crusade.
    Scope: country
    Syntax: crusade_target = { effects… }

    any_elector
    Changes the current scope to any elector in the HRE.
    Scope: country
    Syntax: any_elector = { effects… }



    In Nomine 3.1:

    rival_countries
    Changes the current scope to any rival country.
    Scope: country
    Syntax: rival_countries = { effects… }



    threat_countries
    Changes the current scope to any country that is currently perceived as a threat.
    Scope: country
    Syntax: threat_countries = { effects… }
    PROVINCE SCOPE:

    EU3 1.3:

    capital_scope
    Changes the current scope from the current country to its capital.
    Scope: province
    Syntax: capital_scope = { effects… }

    random_owned
    Changes the current scope from the current country to any owned province.
    Scope: province
    Syntax: random_owned = { effects… }

    any_neighbor_province
    Changes the current scope to any neighboring province.
    Scope: province
    Syntax: any_neighbor_province = { effects… }

    [province ID]
    Changes the current scope to a specific province, chosen by its ID number.
    Scope: province
    Syntax: [ID] = { effects… }




    Napoleon’s Ambition:

    any_owned
    Changes the current scope from the current country to any owned provinces, and affects them all.
    Scope: province
    Syntax: any_owned = { effects… }

    random_center_of_trade
    Changes the current scope from the current country to any province with a COT (only the ones that you own or any of them?).
    Scope: province
    Syntax: random_center_of_trade = { effects… }

    heretic
    Changes the current scope to a province with a religion different from the state religion.
    Scope: province
    Syntax: heretic = { effects… }

    random_empty_neighbor_province
    Changes the current scope to any empty neighboring province.
    Scope: province
    Syntax: random_empty_neighbor_province = { effects… }




    In Nomine 3.0:

    [region name]
    Needs to be tested to make sure, but I guess it changes the scope to a province in the specified region.
    Scope: province
    Syntax: [region name] = { effects… }




    Tags: