Forum rules - please read before posting.

Strings used in Action list parameters as translatable

Hi,

I have various action lists with string parameters that are set through "Set Interaction Parameters". For Example, a "Player Line" Action (list) that runs a Dialogue/Player line and the line is set as a parameter from the hotspot. How do I get all these strings to be included in the Speech manager for translations?

// Magnus

Comments

  • Parameter values cannot be translated, and they also cannot predict where they will be used. It's also the case that speech translations contain more data than regular translations - speaker, audio, etc.

    One way to parameterise this situation is to create separate ActionLists - each with a Dialogue: Play speech action - and then use parameters to instead refer to this ActionList in an ActionList: Run Action.

    Alternatively, you can use this wiki script to play a speech line by referring to its Speech Manager ID:

    https://adventure-creator.fandom.com/wiki/Playing_speech_from_ID

    This ID can be generated from anywhere, including a custom script. A custom script, for example, could contain all the speech text as an array.

    The Manual's "Custom translatables" chapter for more details on this, though I can assist with a sample script if this sounds like an acceptable approach.

  • Hi,

    Super quick reply!!
    Thank you for this. Ok, the phrases/strings are usually scene specific so I'll create local string variables and call them with [localvar:xx] in the "Set Interaction parameters" components. Then they will autimatically be included in the speech manager.
    Two questions:

    • Would it be possible to export game text as UTF-8-BOM by default? I don't get the option to choose encoding when saving and as i have Asian languages in the text, I need to Notepad++ the file and change encoding each time.
    • What does the "Reset Text" button do in the Speech Manager?

    // Magnus

  • Would it be possible to export game text as UTF-8-BOM by default? I don't get the option to choose encoding when saving and as i have Asian languages in the text, I need to Notepad++ the file and change encoding each time.

    I can certainly look into a potential option - though it'd be best to work with a real-world example. If you can PM me your game's Speech Manager asset file, that'll be a big help.

    What does the "Reset Text" button do in the Speech Manager?

    It resets the ID numbers from all gathered assets (technically, they're set back to -1, which is ignored), so that there are no lines to translate.

  • Reviving an old post. I should probabIy have used your advice on "custom translatables", but now I use Local Variables predominantly for storing Dialogue text coming from "Set Interaction Parameters", for them to be translatable. I'd like for Local Variables to be excluded from save and load. This to be able to do update dialogue text to games that are midway through. Can I do this in some way without changing the original AC Save script(s).

    // Magnus

  • You can't exclude specific Local variables from the save process, no.

    You could, feasibly, back them up before loading, and restore them after loading - but I'm not clear on the need to. Could you elaborate on how you've approached this?

  • I’m using many action lists, e.g. a close up camera, where one of the parameters is a string that is used as a player line. The string is set through ”set interaction parameters”. I want all of these to be translatable so I’ve set local or global steing parameters where I store the phrases. The problem arises when/if I need to change a phrase and update the game, but the player is loading a save with the old string variable.

    Could I input the phrases manually in the speech manager and call a speech manager ID in the ”set parameter” component?
  • Could I input the phrases manually in the speech manager and call a speech manager ID in the ”set parameter” component?

    All speech text should ideally be placed in Dialogue: Play speech Actions. Speech text is a special kind of translatable text, with extra data to go along with it (audio, lipsync etc).

    What you can do is create a "master" ActionList with all the speech Actions, gather it up, and then have their IDs be referenced using an Integer parameter in your other ActionLists. These lines would then be played with this:

    https://adventure-creator.fandom.com/wiki/Playing_speech_from_ID

  • Ok, thanks a lot! I will try this!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.