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

Edopardo

Armchair Nostradamus
88 Badges
Jun 6, 2006
922
6.257
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Dharma
  • Stellaris: Distant Stars
  • Hearts of Iron IV: Expansion Pass
  • Surviving Mars: Digital Deluxe Edition
  • Europa Universalis IV: Rule Britannia
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Hearts of Iron IV: Expansion Pass
  • Crusader Kings II: Jade Dragon
  • Age of Wonders III
  • Shadowrun Returns
  • Hearts of Iron IV: Death or Dishonor
  • Surviving Mars
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II: Monks and Mystics
  • Hearts of Iron IV: Together for Victory
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: La Resistance
  • Hearts of Iron 4: Arms Against Tyranny
  • Hearts of Iron IV: No Step Back
  • Hearts of Iron IV: By Blood Alone
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Europa Universalis 4: Emperor
  • Battle for Bosporus
  • Crusader Kings III
  • Imperator: Rome - Magna Graecia
  • Stellaris: Federations
  • Crusader Kings II: Reapers Due
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Imperator: Rome Sign Up
  • Hearts of Iron IV: Expansion Pass
  • Imperator: Rome
  • Imperator: Rome Deluxe Edition
  • Europa Universalis IV: Golden Century
  • Crusader Kings II: Holy Fury
  • Stellaris: Megacorp
  • Shadowrun: Dragonfall
  • Europa Universalis IV: Art of War
  • Semper Fi
  • Victoria: Revolutions
  • Europa Universalis IV: Res Publica
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
Sooo I've been working on a small personal mod to replace title names with custom ones, and I'm failing miserably so I'm hoping a better coder than I can help me.

Essentially, I've defined in my localization folder names with always the same key_[title_name]="Name" structure:
Code:
key_k_thessalonika:0 "Europa"
   key_d_thrace:0 "Europa"
     key_c_byzantion:0 "Constantinopolis"
And then I've defined the following scripting effect:
Code:
rename_title_effect = { this = { set_title_name = key_$TITLE$ } }
I then try to call event to iteratively rename all titles in my empire:
Code:
roman_events.8 = {
    hidden = yes
    orphan = yes
    immediate = {
        hidden_effect = {
            title:e_byzantium = { every_in_de_jure_hierarchy = { rename_title_effect = { TITLE = this } } }
        }
    }
}
But somehow the substitution is not working and it just takes "this" as a literal string value, instead of the corresponding title it should refer to,, so I just rename all provinces to the literal string instead of the supposed reference:
1741451958914.png