Forum rules - please read before posting.

Get speech from some file for different occasions

Hey Chris,

I would like to ask if there is any suggestion on how to do the following.

I want to have a file (or multiple for the different characters if its helpfull) with all the speech lines but the player can be a boy or girl and his/her age vary, so most dialogues with the player should be able to change based on gender and age.

If there is a proper way in AC to do something like that i would like your opinion.

Thanks.

Comments

  • edited May 2023

    I'm just a regular AC user, but I've been giving this some thought.

    Are the speech lines all pretty much the same, except you'd adapt pronouns, etc depending on who the character was?

    If so, something that I would suggest to Chris as a useful feature (not sure if it is feasible within AC's token system though) would be to introduce customisable tokens like this:

    In the settings, you'd be able to create a token called "gender" and assign numbers to genders (e.g. 0 male, 1 female, 2 non-binary) and link them to the value of a global integer.

    Then you'd be able to use a tag like this:

    You are a smart [gender,"boy","girl","kid"]. (using quotations to allow for the parsing of longer strings that contain a comma).

    You could also do the same for age (e.g. 0 child, 1 adult, 2 elderly):

    Thanks, [age,"kid","mate","sir"].

    This type of token is great because the people who are localising your game can always introduce them even if you haven't. For example, if an NPC asks the player, "Why so upset?", this is perfectly gender neutral in English, but the translator should be able to use gender tags when their language requires the adjective "upset" to be gendered.

    Tbh, though, I've only ever used a system like this for gender (the game I localised allowed you to pick gender but not age). I can see how nesting these tags might get complicated fast if there are too many permutations, and may not be the best solution.

    I think what you're looking for almost looks like the language switch feature AC already has, except it'd work as a kind of sub-language, meaning it'd swap the string first based on the type of gender/age combination, and only then would it swap it based on the language the game is set to.

    In fact, if you are absolutely sure you have no plans for localisation, I'd recommend repurposing the language system to do this for you. But of course, if you do intend to translate your game, this won't do.

  • Indeed, if it's just a case of swapping occasional words such as pronouns, you could store them as a Global variable which gets inserted into the speech text.

    If you're looking for speech to be more dynamic than that, then you'd instead store information about the Player in a Global variable that can then be used in ActionLists to alter what speech is played.

    You'd probably be best off using a PopUp variable, with discrete values such as Boy, Girl, Man, Woman.

    When the Player chooses their character type, you'd then set this variable's value with the Variable: Set Action.

    When it comes to varying dialogue, you'd then rely on the Variable: PopUp switch Action beforehand. This Action allows you to re-route your ActionList to different branches based on the value of a PopUp variable.

    The advantage of this is that multiple values can result in the same re-routing - so you could have an instance where only the gender affects dialogue - so Boy/Man re-route to one branch and Girl/Woman another - and another where age is the only factor - i.e. Boy/Girl share a branch, and Man/Woman another.

  • edited May 2023

    From a localisation point of view, I wouldn't recommend using a global variable to insert strings such as pronouns, for two reasons:

    (1) Translators likely would have a hard time finding which string is being inserted where in the exported text.

    (2) Even if they did find it, inserting variables is not flexible enough. For instance, "You are a generous [var]" where [var] can be set to "man" or "woman" works in English, but in many romance languages, the word "generous" also needs to be gendered to agree with "man" or "woman". This is why I suggested the implementation of tags:

    "You are a generous [gender:"man","woman"]" in English could be translated as "Você é [gender:"um homem generoso","uma mulher generosa"]" in Portuguese (i.e. the translator could shift the other gendered words into the tag). The translator would also have the flexibility to translate the string "You are generous" as "Você é [gender:"generoso","generosa"]. When it comes to age, German for example has a whole system where they use different pronouns to mark formality, so where in English we'd simply say "you", Germans might use different words depending on the character's age. It's very hard to predict this for languages you don't speak, so I'd be very wary of inserting static variables or not allowing the translators to define their own conditions.

    So if tags like the ones I explained above are not possible, the PopUp switch Chris suggested is a good option! But I would not recommend routing two options into the same branch if you want to localise your game. This would be a nightmare for translators, and you'll likely have to rework your game as you receive their feedback - or, likely, they would not even report it and leave a mistranslation. Either implement more flexible tags, or always have ALL string permutations available for translation. Also remember to include this context in the spreadsheet you send for translation, or else no one will know which is which.

    Following Chris' advice, I put together an actionlist asset like this:

    Which then can be used like this:

    Again, thinking about localisation, this would work just fine for translators, but remember you are paying them by the number of words in the SOURCE text. Giving them the option to use tags is going to be much cheaper than duplicating every single string you have.

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.