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

Richard Karlsson

Second Lieutenant
60 Badges
Mar 13, 2017
108
70
www.richardkarlsson.se
  • Europa Universalis IV: Wealth of Nations
  • Cities: Skylines - After Dark
  • Cities: Skylines - Snowfall
  • Cities: Skylines Deluxe Edition
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Europa Universalis IV
  • Europa Universalis IV: Third Rome
  • Crusader Kings II: The Republic
  • Crusader Kings II: The Old Gods
  • Cities in Motion 2
  • Crusader Kings II
  • Stellaris: Federations
  • Europa Universalis IV: Mandate of Heaven
  • Hearts of Iron IV: Death or Dishonor
  • Cities: Skylines - Green Cities
  • Imperator: Rome - Magna Graecia
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Apocalypse
  • PDXCON 2018 "The Baron"
  • Europa Universalis IV: Rule Britannia
  • Cities: Skylines - Parklife
  • Europa Universalis IV: Dharma
  • Cities: Skylines Industries
  • Hearts of Iron IV: By Blood Alone
  • Europa Universalis IV: Golden Century
  • Imperator: Rome
  • Europa Universalis 4: Emperor
  • Battle for Bosporus
  • Cities: Skylines - Campus
  • Crusader Kings III: Royal Edition
  • Crusader Kings III
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Hearts of Iron IV: No Step Back
  • Crusader Kings II: Conclave
  • Hearts of Iron 4: Arms Against Tyranny
  • Hearts of Iron IV: Cadet
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: Sons of Abraham
Is it possible to display dynamic localization in game?

Example:
An event explains the situation and presents one of the actors as "...leader of the rural folk, John Smith".
I would like to be able to change the role, the interest group and the name depending on who the character is.

So, something like:
"...[character.role] of the [character.interest_group],[character.firstname] [character.lastname]" ?

I believe that should be a basic thing to do, but I haven't found any information regarding this.

Any suggestions?
 
Look at examples in the localization files, such as content_1_l_english.yml, for example event german_unification.3. There are all those sorts of commands, though many rely on setting an event target (save_scope_as in Vic3 scripting), in the immediate of an event.

That event has the description text:
Code:
"A nobleman named [SCOPE.sCharacter('bismarck_scope').GetFullName] has risen to a prominent position among the [ROOT.GetCountry.GetAdjectiveNoFormatting] [SCOPE.gsInterestGroup('junkers').GetName].
Advocating for German national unity and political pragmatism, he offers his services to the state."

And the flavor text:
Code:
""I shall soon be compelled to undertake the conduct of the [ROOT.GetCountry.GetAdjectiveNoFormatting] Government.
My first care will be to reorganize the army, with or without the help of the Landtag.
As soon as the army shall have been brought into such a condition as to inspire respect, I shall seize the first best pretext to declare war against Austria, dissolve the German Diet, subdue the minor States, and give national unity to Germany under [ROOT.GetCountry.GetAdjectiveNoFormatting] leadership.""
 
  • 1Like
Reactions:
Look at examples in the localization files, such as content_1_l_english.yml, for example event german_unification.3. There are all those sorts of commands, though many rely on setting an event target (save_scope_as in Vic3 scripting), in the immediate of an event.

That event has the description text:
Code:
"A nobleman named [SCOPE.sCharacter('bismarck_scope').GetFullName] has risen to a prominent position among the [ROOT.GetCountry.GetAdjectiveNoFormatting] [SCOPE.gsInterestGroup('junkers').GetName].
Advocating for German national unity and political pragmatism, he offers his services to the state."

And the flavor text:
Code:
""I shall soon be compelled to undertake the conduct of the [ROOT.GetCountry.GetAdjectiveNoFormatting] Government.
My first care will be to reorganize the army, with or without the help of the Landtag.
As soon as the army shall have been brought into such a condition as to inspire respect, I shall seize the first best pretext to declare war against Austria, dissolve the German Diet, subdue the minor States, and give national unity to Germany under [ROOT.GetCountry.GetAdjectiveNoFormatting] leadership.""

Thank you so much! That was exactly what I was looking for! :)
 
Is there a way to combine several components into one text, depending on different factors?

For example, if I want the main text of the event to be a combination by three elements:


PART I
Introduction of the event.

if Monarchy { Version 1 }
else if Theocracy { Version 2 }
else { Version 3 }



PART II
Main text, describing the event.

if ruler = Royalist { Version 1 }
else if ruler = Market Liberal { Version 2 }
else { Version 3 }



PART III
End of event description.

if trade union not marginalized { Version 1 }
else { Version 2 }



I'm not looking for the title, description and flavor - elements of the events. I want to be able to vary to the content of the event based on the context.
 
Scripted localization should be able to do that. I've not tried in Vic3, but it's certainly possible to combine scripted localization in other Paradox games that way. I know Stellaris makes use of this principle at least.
 
Scripted localization should be able to do that. I've not tried in Vic3, but it's certainly possible to combine scripted localization in other Paradox games that way. I know Stellaris makes use of this principle at least.
Ok, thanks! I'll look into that more, and perhaps look through some Stellaris files as well.