• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

IG11

Second Lieutenant
51 Badges
Oct 24, 2013
133
239
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Third Rome
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Mare Nostrum
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Pre-order
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Call to arms event
  • 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: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis 4: Emperor
  • Europa Universalis IV: Mandate of Heaven
  • Hearts of Iron IV: Death or Dishonor
  • Europa Universalis IV: Cradle of Civilization
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Dharma
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Golden Century
  • Hearts of Iron IV: Expansion Pass
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • Hearts of Iron IV: Together for Victory
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Stellaris: Galaxy Edition
  • Stellaris
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • Victoria 2
  • Europa Universalis IV
  • Crusader Kings II: Jade Dragon
I believe change_dominant_species.

I have not been able to get this to work in any form and it is not used once in the files for the base game. Care to share a specific syntax/example? Because I can't get it to work.
 

Zyrica

Queen of the Zen Swarm
62 Badges
Apr 24, 2012
14
11
  • Dungeonland
  • Europa Universalis III
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Heir to the Throne
  • Magicka
  • Europa Universalis IV: Res Publica
  • Stellaris: Galaxy Edition
  • Stellaris: Distant Stars
  • Imperator: Rome
  • Cities: Skylines - Parklife
  • Cities: Skylines - Parklife Pre-Order
  • Europa Universalis IV: Rule Britannia
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Dharma
  • Shadowrun Returns
  • Stellaris: Megacorp
  • Europa Universalis IV: Golden Century
  • Imperator: Rome Deluxe Edition
  • Stellaris: Necroids
  • Prison Architect
  • Stellaris: Ancient Relics
  • Age of Wonders: Planetfall
  • Crusader Kings II
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III: Chronicles
  • 500k Club
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Magicka: Wizard Wars Founder Wizard
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Rights of Man
  • Tyranny: Archon Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
I'm into machine learning and would like to program an AI for Stellaris. All I can find is how to change decision configruation paramters. I would like to do something deeper then that, is that possible? If so, can someone point me in the right direction?
 

Nihil Aeternus

Private
29 Badges
Sep 22, 2015
11
0
  • Stellaris: Synthetic Dawn
  • Crusader Kings II
  • Stellaris: Humanoids Species Pack
  • Victoria 3 Sign Up
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Crusader Kings III: Royal Edition
  • Crusader Kings III
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Age of Wonders: Planetfall Sign Up
  • Stellaris: Ancient Relics
  • Imperator: Rome Sign Up
  • Stellaris: Megacorp
  • Stellaris: Distant Stars
  • Surviving Mars: Digital Deluxe Edition
  • Stellaris: Apocalypse
  • Age of Wonders III
  • Surviving Mars
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Hearts of Iron IV: Cadet
  • Stellaris Sign-up
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris
  • Europa Universalis IV
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II: The Old Gods
I'm into machine learning and would like to program an AI for Stellaris. All I can find is how to change decision configruation paramters. I would like to do something deeper then that, is that possible? If so, can someone point me in the right direction?

I remember in one of the live streams it was mentioned that you can not rewrite the AI in any way, just modify the existing variables which provide priorities and what actions a given AI will perform.

You can make the AI more aggressive but you can not change how it will approach a battle.

I might be wrong though, someone likely knows more than I do about this.
 

schedim

First Lieutenant
145 Badges
Mar 21, 2005
208
81
  • March of the Eagles
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Impire
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Leviathan: Warships
  • The Kings Crusade
  • Magicka
  • Majesty 2
  • Majesty 2 Collection
  • For The Glory
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Europa Universalis: Rome
  • Rome Gold
  • Semper Fi
  • Sengoku
  • Ship Simulator Extremes
  • Sword of the Stars
  • Sword of the Stars II
  • Supreme Ruler 2020
  • Teleglitch: Die More Edition
  • Hearts of Iron IV: No Step Back
  • Crusader Kings II: Sunset Invasion
  • Ancient Space
  • Arsenal of Democracy
  • Hearts of Iron II: Armageddon
  • Cities in Motion
  • Cities in Motion 2
  • Crusader Kings II
  • 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
  • A Game of Dwarves
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • Deus Vult
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
Tried to search for this but failed to find. Is there a smart way to restrict random_country to Fallen Empires?

[and instantly after this found : is_country_type = fallen_empire ]

My google fu failed me ... Hard!
 
Last edited:
  • 1
Reactions:

Ironbuket

Private
27 Badges
May 10, 2016
23
7
  • Darkest Hour
  • Cities in Motion 2
  • Sword of the Stars II
  • March of the Eagles
  • Heir to the Throne
  • Divine Wind
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • Stellaris: Lithoids
  • Prison Architect
  • Shadowrun: Hong Kong
  • Shadowrun: Dragonfall
  • Shadowrun Returns
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Age of Wonders III
  • Stellaris: Synthetic Dawn
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Stellaris
  • Pillars of Eternity
  • Cities: Skylines
  • War of the Roses
  • Warlock: Master of the Arcane
  • Teleglitch: Die More Edition
Is it possible to add logic to a trigger in the code, IE multiple values need to be true like AND/OR evaluations? If so, how would you code this?

e.g. in the below , say you wanted an action if the pop was male and a leader and not have them as separate conditions with whatever comes last writing over the earlier one. With the intention of having a separate female leader trigger also.
add = {
trigger = {
gender = male
}
portraits = {
type_02
}
}

add
trigger = {
leader_class = ruler
}
portraits = {
type_01
}
}

Can you use & or commas or this just isn't possible?
 

Yard1PL

Second Lieutenant
9 Badges
Apr 6, 2016
152
54
  • Crusader Kings II
  • Europa Universalis IV
  • Cities: Skylines
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Stellaris: Apocalypse
  • Stellaris: Lithoids
  • Hearts of Iron IV: La Resistance
  • Battle for Bosporus
Is it possible to add logic to a trigger in the code, IE multiple values need to be true like AND/OR evaluations? If so, how would you code this?

e.g. in the below , say you wanted an action if the pop was male and a leader and not have them as separate conditions with whatever comes last writing over the earlier one. With the intention of having a separate female leader trigger also.


Can you use & or commas or this just isn't possible?
Just use OR, AND and NOT like you would in an if limit block.
 

Axelius

Scriptkid
86 Badges
Sep 23, 2003
585
538
  • War of the Roses
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Semper Fi
  • Sengoku
  • Sword of the Stars
  • Teleglitch: Die More Edition
  • The Showdown Effect
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Warlock: Master of the Arcane
  • March of the Eagles
  • 500k Club
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Magicka: Wizard Wars Founder Wizard
  • Mount & Blade: Warband
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Stellaris: Nemesis
  • Divine Wind
  • 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
  • Dungeonland
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Crusader Kings II
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Europa Universalis III Complete
  • Leviathan: Warships
Is it possible to add logic to a trigger in the code, IE multiple values need to be true like AND/OR evaluations? If so, how would you code this?

e.g. in the below , say you wanted an action if the pop was male and a leader and not have them as separate conditions with whatever comes last writing over the earlier one. With the intention of having a separate female leader trigger also.


Can you use & or commas or this just isn't possible?

As Yard1PL said.
Just use OR, AND and NOT like you would in an if limit block.


Do something like this
Code:
trigger= { 
OR = {
AND = {gender = male
leader_class = ruler}
AND = {gender = female
leader_class = ruler}
}
}
 

Ironbuket

Private
27 Badges
May 10, 2016
23
7
  • Darkest Hour
  • Cities in Motion 2
  • Sword of the Stars II
  • March of the Eagles
  • Heir to the Throne
  • Divine Wind
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • Stellaris: Lithoids
  • Prison Architect
  • Shadowrun: Hong Kong
  • Shadowrun: Dragonfall
  • Shadowrun Returns
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Age of Wonders III
  • Stellaris: Synthetic Dawn
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Stellaris
  • Pillars of Eternity
  • Cities: Skylines
  • War of the Roses
  • Warlock: Master of the Arcane
  • Teleglitch: Die More Edition
Just use OR, AND and NOT like you would in an if limit block.
Thanks for the reply. I've been searching since I posted this and found instructions for EUIV which seem to work. I've only just tested it and this (also?) seems to work:

You add a rule in the common\scripted_triggers folder and then refer to that in the trigger condition. e.g.
male_sci_trigger = {
leader_class = scientist
gender = male
}

Then in with your trigger condition you do the following
add = {
trigger = {
male_sci_trigger = yes
}
portraits = {
male_sci_05
}
}

In the EUIV instructions it says AND has to be used like this if you want to check two values are equal, I guess it doesnt matter which method you use?
AND = { adm_power = 10 dip_power = 10 }
 

Kyojin

Sergeant
27 Badges
Jun 27, 2012
82
36
  • Victoria 2: Heart of Darkness
  • Stellaris: Synthetic Dawn
  • Pillars of Eternity
  • Victoria 2: A House Divided
  • Crusader Kings II
  • Europa Universalis IV: Res Publica
  • Magicka
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Europa Universalis IV
  • Prison Architect
  • Shadowrun: Dragonfall
  • Shadowrun Returns
  • Cities: Skylines - Parklife
  • Cities: Skylines - Parklife Pre-Order
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Stellaris Sign-up
  • Stellaris
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • Victoria 2
I am at the final stages for my mod, all the events work when I do not have a namespace and I trigger them through the console.

The problem is that once I add a namespace nothing works anymore. I get this error message ([23:49:39][eventmanager.cpp:534]: unknown namespace '[civ_trade' defined in event files) event though my namespace is civ_trade not [civ_trade.

The other weird thing is that on some of the events when i try and trigger them through console with a namespace they instead trigger an advisor event that corresponds with the number at the end of the event. So civ_trade.2 triggers advisor.2 and civ_trade.10 triggers advisor.10. This happens for events 1-3 and then event 10 for some reason.

Any idea what might be going on?