Stellaris - v3.2.2 [abcc] Script error from game rules

  • 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.

corsairmarks

Second Lieutenant
28 Badges
Dec 4, 2020
121
105
  • Stellaris: Humanoids Species Pack
  • Hearts of Iron IV: No Step Back
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Battle for Bosporus
  • Stellaris: Federations
  • Hearts of Iron IV: La Resistance
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Megacorp
  • Stellaris: Distant Stars
  • Surviving Mars: Digital Deluxe Edition
  • Stellaris: Apocalypse
  • Knights of Pen and Paper +1 Edition
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Synthetic Dawn
  • Hearts of Iron IV: Death or Dishonor
  • Surviving Mars
  • Stellaris - Path to Destruction bundle
  • Hearts of Iron IV: Together for Victory
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Knights of Pen and Paper 2
  • Cities: Skylines Deluxe Edition
  • Cities: Skylines
Description
v3.2.2 [abcc] Script error from game rules

Game Version
Lem v3.2.2 [abcc]

What version do you use?
Steam

What expansions do you have installed?
Synthetic Dawn, Utopia, Leviathans Story Pack, Apocalypse, Megacorp, Distant Stars, Ancient Relics, Lithoids, Federations, Nemesis, Aquatics

Do you have mods enabled?
Yes

Please explain your issue is in as much detail as possible.
While playing a recent game, I was monitoring the error logs to see if the mods I have developed cause any issues. I also found that a built-in piece of script caused error logs too. I verified the relevant code is not being overwritten by my active mods:
Code:
[21:26:28][eventscope.cpp:2117]: species rights trigger: Unable to resolve country from 'from' (planet scope) at  file: common/game_rules/00_rules.txt line: 1349
[21:26:28][trigger_impl.cpp:12002]:  file: common/game_rules/00_rules.txt line: 1349: Provide 'country = <target>' when using in species scope.
This block is the relevant game rule:
Code:
# This = planet
# Root = country
can_force_decline_on_planet = {
	custom_tooltip = {
		fail_text = FORCE_DECLINE_NEEDS_POP_CONTROLS
		exists = owner
		owner = { NOT = { has_policy_flag = population_controls_not_allowed } }
	}
	custom_tooltip = {
		fail_text = FORCED_DECLINE_ALREADY_PURGING
		NOT = {
			any_owned_species = {
				has_citizenship_type = { type = citizenship_purge country = from }
				NOT = { has_purge_type = { country = from type = purge_neutering } }
			}
		}
	}
}
This line has_citizenship_type = { type = citizenship_purge country = from } is line 1349. Instead of the from scope, it seems that this should be using root to refer to the intended country.

Steps to reproduce the issue.
Unclear when empire was attempting to force-decline a Pop. Possibly mine (Spears of Iban - Origin: Clone Soldiers) if one of my Pops auto-migrated away from a cloning vat.

Upload Attachment
File(s) attached
 

Attachments

  • khan-defeated-1.sav
    2,2 MB · Views: 0
  • 2022-01-01_21-52-32.png
    2022-01-01_21-52-32.png
    96,3 KB · Views: 0
  • 1
Reactions:

corsairmarks

Second Lieutenant
28 Badges
Dec 4, 2020
121
105
  • Stellaris: Humanoids Species Pack
  • Hearts of Iron IV: No Step Back
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Battle for Bosporus
  • Stellaris: Federations
  • Hearts of Iron IV: La Resistance
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Megacorp
  • Stellaris: Distant Stars
  • Surviving Mars: Digital Deluxe Edition
  • Stellaris: Apocalypse
  • Knights of Pen and Paper +1 Edition
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Synthetic Dawn
  • Hearts of Iron IV: Death or Dishonor
  • Surviving Mars
  • Stellaris - Path to Destruction bundle
  • Hearts of Iron IV: Together for Victory
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Knights of Pen and Paper 2
  • Cities: Skylines Deluxe Edition
  • Cities: Skylines
Modlist exported from the launcher
Code:
{
    "name": "Main Playset",
    "mods": [
        {
            "displayName": "Animated Aquilese Portraits",
            "enabled": true,
            "position": 0,
            "steamId": "910576007"
        },
        {
            "displayName": "Animated Asari Portraits - Mass Effect",
            "enabled": true,
            "position": 1,
            "steamId": "707779361"
        },
        {
            "displayName": "Animated Eldar Portraits - Warhammer 40K",
            "enabled": true,
            "position": 2,
            "steamId": "707415339"
        },
        {
            "displayName": "Animated Portraits - The Hidden Eye",
            "enabled": true,
            "position": 3,
            "steamId": "1168459329"
        },
        {
            "displayName": "Animated Hollow Portraits",
            "enabled": true,
            "position": 4,
            "steamId": "902526212"
        },
        {
            "displayName": "Holosphere Rising",
            "enabled": true,
            "position": 5,
            "steamId": "868965217"
        },
        {
            "displayName": "Animated Hyena Portraits",
            "enabled": true,
            "position": 6,
            "steamId": "1126014321"
        },
        {
            "displayName": "Animated Octee-lan Portraits",
            "enabled": true,
            "position": 7,
            "steamId": "929140455"
        },
        {
            "displayName": "Animated Quarian Portraits - Mass Effect",
            "enabled": true,
            "position": 8,
            "steamId": "708669421"
        },
        {
            "displayName": "Animated Raptor Portraits",
            "enabled": true,
            "position": 9,
            "steamId": "872596925"
        },
        {
            "displayName": "Animated Serpentoid Portraits",
            "enabled": true,
            "position": 10,
            "steamId": "861800679"
        },
        {
            "displayName": "Animated Shark Portraits",
            "enabled": true,
            "position": 11,
            "steamId": "1098915405"
        },
        {
            "displayName": "Animated Silicoid Portraits",
            "enabled": true,
            "position": 12,
            "steamId": "1160316076"
        },
        {
            "displayName": "Animated Xirmian Portraits",
            "enabled": true,
            "position": 13,
            "steamId": "881118424"
        },
        {
            "displayName": "Silfae's city sets updated",
            "enabled": true,
            "position": 14,
            "steamId": "2247427791"
        },
        {
            "displayName": "Steampunk City Set",
            "enabled": true,
            "position": 15,
            "steamId": "2260562953"
        },
        {
            "displayName": "Infested Room & City Set",
            "enabled": true,
            "position": 16,
            "steamId": "1160405318"
        },
        {
            "displayName": "Animated Ascellian Portraits (2.2.6 Le Guin +)",
            "enabled": true,
            "position": 17,
            "steamId": "1590768077"
        },
        {
            "displayName": "Arthropoid15 Dimorphism (Space Crab)",
            "enabled": true,
            "position": 18,
            "steamId": "783405688"
        },
        {
            "displayName": "Dimorphism - Cat Portraits",
            "enabled": true,
            "position": 19,
            "steamId": "710345134"
        },
        {
            "displayName": "Dimorphism - Chirpy Portraits",
            "enabled": true,
            "position": 20,
            "steamId": "2290480775"
        },
        {
            "displayName": "Dimorphism - Fox Portraits",
            "enabled": true,
            "position": 21,
            "steamId": "711825958"
        },
        {
            "displayName": "Dimorphism - Horse Portraits",
            "enabled": true,
            "position": 22,
            "steamId": "885800185"
        },
        {
            "displayName": "Dimorphism - Llama Portraits",
            "enabled": true,
            "position": 23,
            "steamId": "1119571344"
        },
        {
            "displayName": "Dimorphism - Monkey Portraits",
            "enabled": true,
            "position": 24,
            "steamId": "915274859"
        },
        {
            "displayName": "Dimorphism - Otter Portraits",
            "enabled": true,
            "position": 25,
            "steamId": "939367993"
        },
        {
            "displayName": "Dimorphism - Ox Portraits",
            "enabled": true,
            "position": 26,
            "steamId": "1155933050"
        },
        {
            "displayName": "Dimorphism - Squirrel Portraits",
            "enabled": true,
            "position": 27,
            "steamId": "1084533390"
        },
        {
            "displayName": "Dimorphism - Warthog Portraits",
            "enabled": true,
            "position": 28,
            "steamId": "906565692"
        },
        {
            "displayName": "Dimorphism for Reptilian 2",
            "enabled": true,
            "position": 29,
            "steamId": "1811996940"
        },
        {
            "displayName": "Mucor",
            "enabled": true,
            "position": 30,
            "steamId": "2544556554"
        },
        {
            "displayName": "Reptilian12 Dimorphism (Space Angler Fish)",
            "enabled": true,
            "position": 31,
            "steamId": "782450824"
        },
        {
            "displayName": "Reptilian12 Dimorphism Clothing Fix",
            "enabled": true,
            "position": 32,
            "steamId": "1234172664"
        },
        {
            "displayName": "The Psilons - Animated Species",
            "enabled": false,
            "position": 33,
            "steamId": "740677109"
        },
        {
            "displayName": "Clearer System Occupation Icons - ALTERNATIVE 2",
            "enabled": true,
            "position": 35,
            "steamId": "2461099846"
        },
        {
            "displayName": "Planetary Diversity - Planet View",
            "enabled": true,
            "position": 36,
            "steamId": "1866576239"
        },
        {
            "displayName": "At War: Better Admiral Experience (3.2)",
            "enabled": true,
            "position": 37,
            "steamId": "2506910978"
        },
        {
            "displayName": "At War: Defense Platform Longevity(3.2)",
            "enabled": true,
            "position": 38,
            "steamId": "2501114149"
        },
        {
            "displayName": "Choosable Repeatables [3.1]",
            "enabled": false,
            "position": 39,
            "steamId": "2487827530"
        },
        {
            "displayName": "Arkchitecture Shipsets",
            "enabled": true,
            "position": 43,
            "steamId": "2379282804"
        },
        {
            "displayName": "Machine Shipset",
            "enabled": true,
            "position": 44,
            "steamId": "2077186491"
        },
        {
            "displayName": "Enigmatic Shipset",
            "enabled": true,
            "position": 48,
            "steamId": "2545512457"
        },
        {
            "displayName": "Imperial Necroids",
            "enabled": true,
            "position": 49,
            "steamId": "2672323570"
        },
        {
            "displayName": "Empyreal Cities",
            "enabled": true,
            "position": 50,
            "steamId": "1840797321"
        },
        {
            "displayName": "B.O.S.O.K. Voice Advisor",
            "enabled": true,
            "position": 55,
            "steamId": "2665469716"
        }
    ]
}
Since the export excludes local mods, here are the mods I've authored that were active, with Steam links too:
 
Last edited:

Rodmar18

General
8 Badges
Sep 19, 2018
1.959
346
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris: Humanoids Species Pack
  • Stellaris: Distant Stars
  • Stellaris: Synthetic Dawn
What about this (feel free to correct me, as I'm still struggling with scopes):

Code:
    custom_tooltip = {
        fail_text = FORCED_DECLINE_ALREADY_PURGING
        exists = owner
        owner = { NOT = { any_owned_species = {
                has_citizenship_type = { type = citizenship_purge country = prev }
                NOT = { has_purge_type = { country = prev type = purge_neutering } }
                } }
        }
    }
 

corsairmarks

Second Lieutenant
28 Badges
Dec 4, 2020
121
105
  • Stellaris: Humanoids Species Pack
  • Hearts of Iron IV: No Step Back
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Battle for Bosporus
  • Stellaris: Federations
  • Hearts of Iron IV: La Resistance
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Megacorp
  • Stellaris: Distant Stars
  • Surviving Mars: Digital Deluxe Edition
  • Stellaris: Apocalypse
  • Knights of Pen and Paper +1 Edition
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Synthetic Dawn
  • Hearts of Iron IV: Death or Dishonor
  • Surviving Mars
  • Stellaris - Path to Destruction bundle
  • Hearts of Iron IV: Together for Victory
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Knights of Pen and Paper 2
  • Cities: Skylines Deluxe Edition
  • Cities: Skylines
What about this (feel free to correct me, as I'm still struggling with scopes):

Code:
    custom_tooltip = {
        fail_text = FORCED_DECLINE_ALREADY_PURGING
        exists = owner
        owner = { NOT = { any_owned_species = {
                has_citizenship_type = { type = citizenship_purge country = prev }
                NOT = { has_purge_type = { country = prev type = purge_neutering } }
                } }
        }
    }
I recommended root because that is what the comments say explicitly is the intended country. It is possibly this might be called for planets not owned by the country in question, but probably not since the code you pointed out already refers to the planet's owner and not root.
 

corsairmarks

Second Lieutenant
28 Badges
Dec 4, 2020
121
105
  • Stellaris: Humanoids Species Pack
  • Hearts of Iron IV: No Step Back
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Battle for Bosporus
  • Stellaris: Federations
  • Hearts of Iron IV: La Resistance
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Megacorp
  • Stellaris: Distant Stars
  • Surviving Mars: Digital Deluxe Edition
  • Stellaris: Apocalypse
  • Knights of Pen and Paper +1 Edition
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Synthetic Dawn
  • Hearts of Iron IV: Death or Dishonor
  • Surviving Mars
  • Stellaris - Path to Destruction bundle
  • Hearts of Iron IV: Together for Victory
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Knights of Pen and Paper 2
  • Cities: Skylines Deluxe Edition
  • Cities: Skylines
from being the planet scope (by default it seems), from.owner should work too, but yeah, root seems to be the logical answer.
The docs for this rule do not indicate that it receives a consisted FROM scope. That's why I proposed referring to either ROOT (which is explicitly the right country) or PREV.owner with is (in that line) known to be the planet's owner.