Using json, txt or script to manage text resources.

Started by eatseverything, Sat 24/03/2018 23:31:53

Previous topic - Next topic

eatseverything

Hello everyone, I'm new to this community and so far loving AGS!

I come from a web development background and commonly use external files to manage text resources.
I am getting started with AGS and following the tutorials atm, just up to the Hotspot section.
A thought occurred to me, can I prepare all my game's text in some kind of array or object based structure somewhere, then use the trigger eg'look' to use the text at an array position or id?

I hope this makes sense, just trying to get a sense for the workflow and how to best manage the game's resources.

Crimson Wizard

Having texts in array is of course possible, and I've seen some people doing that. In earlier versions of AGS that was also best way to handle object description changes during the course of the game, but since AGS 3.4.0 you can also use custom properties for that (see Get/SetTextProperty functions in the manual).

Having game text in an external file and reading from it is also technically possible, but here's a warning: when AGS creates translation files it only adds text found in project files (scripts etc). If you are planning to support translations, having any text in separate file will force you to override built-in behavior somehow, maybe even script your own translation mechanics.

SMF spam blocked by CleanTalk