Having Persistent data input from @editable values

Hi, 'm a beginner in verse,
I have this Class as My Main Setting Data

I’m tying to have this Setting Data all over my code to use it’s data,
This Data is the same for all players and will only initialized once on the Creative Device in UEFN
I think i should use “Persistent data” somehow like this:

main_settings  := class<concrete><final><persistable>():
    @editable MoneyPerSecondUIText : string = "GPS"
    @editable TotalMoneyUIText : string = "Total Money"

GameSetting : weak_map(session, main_settings) = map{}

SomeFunction():void=
    Print("{GameSetting.TotalMoneyUIText}"  #wrong

My main purpose to initialize data in UEFN, and use this data all over the code.

Ok, can you be more specific what the data is holding? I feel like there is already some device that can assist with this. I think there might be a misunderstanding what persistent data is.

Persistent data would be data that persists beyond the game session. Like a permanent leader board that updates with every play session but always has the data that you store in it from all game sessions.

Shared data is data that is updated and shared between all the users at runtime. A lot of devices share data in a sense.

There Are Some Widgets that are supposed to be shown to player how much money he has.
The widget text is something like this :

Total Money : $ 1,100

I want that the first part of widget (meaning “Your Total Money”) be a global variable that can be determined using a @editable string. So It Can be changed In (UEFN creative device) before the game lunching.

I’m not sure what exactly I should use to:
set value for a string in UEFN creative device, and that string is accessible for all functions in main scope, like a global variable, so I’m not forced to pass these variables to all functions that I want to use them in.

image_2024-03-26_112500410

This is the string you want global? What would you change it to? Or would it always say the same thing? If you want to interact with something you have to first declare it and set a default variable value. Then you can change the variable at runtime when needed.

So if you want the variable name to be CurrencyDescriptor, your declaration could look like this:

CurrencyDescriptor : string = "Total Money"

That probably does not NEED to be editable. Since it is going to be dynamically set in code.

Then to change it at runtime, you need an event to be triggered. In that event you would want to include:

set CurrencyDescriptor = "Your New String"

Hope that helps.