Hi I have text documents for all my text in my game this is so I can translate it later in the future
Since the files are JSON
I don’t think I can store variables in the text
Normally in gdev you’d put
“Hi” + “Playernamevariable” + “wanna fight”
But because JSON can’t store values like that or idk how
id like to have a feature where I can put
“Hi 1 Wanna fight”
But could there could be an event or something that changes 1 to “Playernamevariable”
For find and replace there’s the Regular Expressions extension.
https://wiki.gdevelop.io/gdevelop5/extensions/reg-ex/
If you’re using the dialog tree, that might have something built-in. I don’t know much about it.
hey im reading the replace document im very very confused on what the 4 variables
The documentation is weak.
This would replace all of the -n with Dave.
You need to be careful because some letters might be reserved.
The flags add options.
i is used to ignore cases. Like Apple and apple
g is used to match every occurrence.
I noticed the 2nd image used Fred instead of Dave. It’s the same otherwise. -n is just an example. It could be anytime. It just needs to be unique enough to not cause accidental matches.