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

Mourn

Second Lieutenant
102 Badges
Jun 11, 2010
170
273
  • Hearts of Iron IV: Field Marshal
  • Crusader Kings II
  • Hearts of Iron III
  • Pillars of Eternity
  • A Game of Dwarves
  • Surviving Mars: First Colony Edition
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Steel Division: Normandy 44
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Megacorp
  • BATTLETECH
  • Surviving Mars
  • Hearts of Iron IV: Death or Dishonor
  • Cities: Skylines - Green Cities
  • Cities: Skylines Industries
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Prison Architect
  • Cities: Skylines - Parklife
  • Hearts of Iron IV: Expansion Pass
  • Shadowrun Returns
  • Shadowrun: Dragonfall
  • Magicka: Wizard Wars Founder Wizard
  • Europa Universalis IV
  • Imperator: Rome Sign Up
  • Surviving Mars: First Colony Edition
  • Cities: Skylines - Campus
  • Victoria 2
  • Stellaris: Necroids
  • Warlock: Master of the Arcane
  • War of the Roses
  • 500k Club
  • Imperator: Rome Deluxe Edition
  • Europa Universalis IV: El Dorado
  • Hearts of Iron IV: Colonel
  • Mount & Blade: Warband
  • Mount & Blade: With Fire and Sword
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Cities: Skylines - Snowfall
  • Hearts of Iron IV Sign-up
  • Stellaris Sign-up
So I'm working on a mod that will allow militaristic ethics empires to pick a policy option where full bombardment will turn a planet uninhabitable after the defenses are reduced to 0. However, the policy option isn't showing up and I'm getting errors that I do not understand from the error.log. I would really appreciate it if someone with some Paradox modding experience could take a look and let me know where I'm going wrong or point me in the direction to find the answers. Attached is the mod zip and here is the error log I am getting:

Code:
[12:35:39][eventmanager.cpp:534]: unknown namespace 'global_annihilation' defined in event files
[12:35:39][persistent.cpp:34]: Error: "Unexpected token: every_country, near line: 29
" in file: "events/global_annihilation.txt" near line: 35
[12:35:39][persistent.cpp:34]: Error: "Unexpected token: FROM, near line: 36
" in file: "events/global_annihilation.txt" near line: 53
[12:35:39][eventmanager.cpp:183]: an event with id [global_annihilation.1] already exists!  file: events/global_annihilation.txt line: 12
[12:35:39][eventmanager.cpp:226]: Corrupt Event Table Entry - } in events/global_annihilation.txtline: 55
[12:35:39][eventmanager.cpp:534]: unknown namespace 'global_annihilation' defined in event files
[12:35:40][effect_impl.cpp:411]: Error in scripted effect, cannot find: limit
[12:35:40][effect_impl.cpp:411]: Error in scripted effect, cannot find: has_policy_flag
 

Attachments

  • global_annihilation.zip
    4,5 KB · Views: 3
  • 1
Reactions:

Chilled Legumes

Second Lieutenant
84 Badges
Jan 16, 2016
185
169
  • Arsenal of Democracy
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II: Reapers Due
  • Stellaris: Galaxy Edition
  • Warlock: Master of the Arcane
  • Victoria 2: A House Divided
  • Teleglitch: Die More Edition
  • Sword of the Stars
  • Ship Simulator Extremes
  • Semper Fi
  • Rome Gold
  • Victoria: Revolutions
  • Majesty 2
  • Magicka
  • The Kings Crusade
  • Leviathan: Warships
  • Impire
  • Crusader Kings II
  • Stellaris: Apocalypse
  • Stellaris: Synthetic Dawn
  • Steel Division: Normand 44 - Second Wave
  • Ancient Space
  • Europa Universalis III
  • Lead and Gold
  • For The Glory
  • Hearts of Iron III
  • Heir to the Throne
  • Steel Division: Normandy 44
  • Crusader Kings II: Monks and Mystics
  • Hearts of Iron IV: Together for Victory
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • BATTLETECH
  • Hearts of Iron IV: Cadet
  • Stellaris Sign-up
  • Stellaris: Necroids
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Way of Life
  • Magicka: Wizard Wars Founder Wizard
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • Crusader Kings II: Jade Dragon
  • Victoria 2
  • Supreme Ruler 2020
  • Hearts of Iron IV: Death or Dishonor
  • Surviving Mars
Let me preface this with, i have never modded a paradox game ever, and the only code i typically write is in java. That means that the following is just my opinion on what im seeing here. What came to mind was this:

[12:35:39][persistent.cpp:34]: Error: "Unexpected token: every_country, near line: 29

This error here means that the token "every_country", isnt there. You cant use it. its a null function. So you tried to pass "every_country" into something as a parameter, and the game doesnt like that, because it cant handle the outcome, or it was not meant to be done by "every_country".

[12:35:39][eventmanager.cpp:183]: an event with id [global_annihilation.1] already exists! file: events/global_annihilation.txt line: 12

This here means that you tried to register a new event over another event, possibly you're trying to extend or overwrite an existing event, and the game does not like this.

[12:35:39][eventmanager.cpp:226]: Corrupt Event Table Entry - } in events/global_annihilation.txtline: 55
[12:35:39][eventmanager.cpp:534]: unknown namespace 'global_annihilation' defined in event files

This... This i had to take a look into the file to understand. And i'm still not sure what it was. Your closing brace indentation threw me off for a good minute or so, that was a bit confusing, if i'm honest. Im thinking that, along with the first error up there, it doesnt 'compile' for the game, its detecting that it wont be able to run this bit of code syntactically, soits throwing an error right now.
 

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
The error log you posted is noting that you haven't declared a namespace. Look at the other event files, at the top of them they have a declaration of namespace = example_event.

Additionally, it seems on_actions are bugged. Any on_action you declare will overwrite the vanilla one. So by writing your on_monthly_orbital_bombardment none of the normal such are included. Either include the vanilla code in its entirety or rewrite the code. Personally in this case I would turn this into a short MTTH ship_event with triggers owner = {has_policy_flag = global_annihilation_allowed} orbit = {fortification_health = 0}.

Not the neatest solution, but the best I can think of without using the on_action.

As for policies, I don't have enough experience with how they work