Forum rules - please read before posting.

Player/NPC Component Dialog Settings

edited October 2020 in Technical Q&A

Our team recently picked up the Adventure Creator Unity Plugin and I have been working to ramp up and learn about all of its features and capabilities before we begin building our game ideas.

We're ultimately looking at making visual novel style games and one thing we called out as something we want is to be able to during dialogue cutscenes dynamically manipulate the player/npc portraits during dialogue.

I see that out of the box AC allows you to define multiple expression textures for your player/npc in the Dialogue settings section of the Player/NPC components and then you can activate those expressions dynamically via special text tokens during PlaySpeech Actions.

That functionality is great and will definitely get us something we want; however, we also want to be able to dynamically affect the character portraits facing direction, as well as its Y position dynamically during various events in our dialogue. Is there any way to specify these type of things via Actions out of the box, or would this require additional custom scripting (i.e. customized actions/events)?


  • Welcome to the community, @avazquez.

    Seems like this boils into two separate tasks: how to change the menu display, and how to trigger such changes.

    For changing the menu display, you've a couple of options:

    1. Create different Subtitle menus for each layout variation, and then lock all of them except the one you want to show.
    2. Using Unity UI to create a single Subtitle menu, use an Animator to change the layout through animation, and then control that animation playback.

    For triggering such changes, you can certainly rely on Actions for the above (Menu: Change state to lock/unlock Menus, and Object: Animate to control animation playback), but if you have a lot of such changes you'd likely be best off relying on a bit of scripting.

    As you've seen, speech can accept text tokens such as [expression:ID] and [wait:X] to alter the behaviour of subtitles - but it's also possible to define custom tokens of the form [key:value].

    Such tokens can then be listened for in a custom script, so you could have e.g. the token [portrait:top] could be used to alter your UI-based Subtitles menu to move the portrait graphic to the top of the screen.

    See the Manual's "Speech event tokens" chapter for more details on this technique, as well as some example code.

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.