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

xImperialist

Sergeant
2 Badges
Feb 18, 2019
61
26
  • Crusader Kings II: The Old Gods
  • Victoria 3 Sign Up
Hello,

I would like to display a country variable in localization. I know how to display a global variable, which is this way:

Code:
[GetGlobalVariable('MoneyPool').GetValue]

The code above works perfectly. However, i have a country variable that i would like to display, and i cannot find a way to do so. I see in the script explorer that it exists, i just don't know how to display it.

1667720079944.png


I tried all the following formats and nothing worked:

Code:
[GetVariable('MoneyPool').GetValue]

Code:
[GetCountryVariable('MoneyPool').GetValue]

Code:
[GetCountry.GetVariable('MoneyPool').GetValue]

Code:
[GetPlayer.GetCountry.GetVariable('MoneyPool').GetValue]

Any advice?

Thanks in advance,
 
I tried this and i got a new error in error.txt log:

Code:
[SCOPE.GetRootScope.GetVariable('moneypool').GetValue|+D]

Error:

Code:
Data error in loc key 'money_pool_value_desc'
 
  • 1
Reactions:
[ROOT.Var('value_name').GetValue] should do the trick. :)
 
This answer/example might point the way:


The dev says the feature isn't implemented in Jomini yet (in 2019) but would be soon. So it probably works by now.

He's using a player variable, but the scope-setting technique seems like it should work for countries or anything else.
 
This answer/example might point the way:


The dev says the feature isn't implemented in Jomini yet (in 2019) but would be soon. So it probably works by now.

He's using a player variable, but the scope-setting technique seems like it should work for countries or anything else.
It didn't work, i looked in the replies and tried the codes suggested, nothing worked for me, unfortunately... I think they just did not implement it in Victoria 3 at all...
 
At this moment I am having this very question. And I received no response when I asked this question previously. I would very much appreciate it if xImperialist's question were to be answered. Like xImperialist I tried the suggestions mentioned above, but without success.
 
  • 1Like
Reactions:
At this moment I am having this very question. And I received no response when I asked this question previously. I would very much appreciate it if xImperialist's question were to be answered. Like xImperialist I tried the suggestions mentioned above, but without success.
I asked many times, even went on stream and asked the devs, they did read my question but said they don’t know. I then asked the devs directly via DMs, and got warned for contacting devs. Then the discord moderator promised me to ask the question for me, then I was told that the matter ‘was passed on to be looked into’ but they can’t answer.

This is so weird, apparently paradox did not implement a method to display local variables in Victoria 3.
 
Oh man.. it's so frustrating to see how no one can answer your question. I'm interested in the answer too. For my mods i need scripted guis but i can't use it like in ck3 and my question how it works in vic3 didn't get answered.

I don't understand why paradox won't help people who invest time to make there game better.

I spent dozens of hours to find the answers in existing scripts. A short answer that it isn't possible would help and would save us a lot of time...
 
Oh man.. it's so frustrating to see how no one can answer your question. I'm interested in the answer too. For my mods i need scripted guis but i can't use it like in ck3 and my question how it works in vic3 didn't get answered.

I don't understand why paradox won't help people who invest time to make there game better.

I spent dozens of hours to find the answers in existing scripts. A short answer that it isn't possible would help and would save us a lot of time...
It indeed is so frustrating. This game’s engine is so fucking outdated, even Imperator Rome and CK3 have that function and you can show a variable in localization. Tells you about how long this game has been in development and how neglected it is.
 
  • 1Like
Reactions:
searching results led me here, was facing similar problem hours ago
in case you didn't get a solution after months, I just happen to found mine.

try [your_scope_string.MakeScope.Var('your_variable').GetValue]
works for me
if your error.log showed "Can find a promote for 'Var' in blablablabla", then this should be the thing
 
searching results led me here, was facing similar problem hours ago
in case you didn't get a solution after months, I just happen to found mine.

try [your_scope_string.MakeScope.Var('your_variable').GetValue]
works for me
if your error.log showed "Can find a promote for 'Var' in blablablabla", then this should be the thing
Hi, i know its been 2 years, but do you know how to do it to String values? Example: Im trying to do it with a Character's name