Forum rules - please read before posting.

Best practice for adding conditional logic to conversations?

Your input would be greatly appreciated.

Basic scenario: Player enters a scene with eight NPCs. Initially has three talking points. Learns a bit about the scene, and now has two more talking points. Player resolves a couple of objective and thus no longer has need to ask about four talking points.

What's the best practice here for managing this case? It seems a nifty solution would be to have an 'invisible' inventory item class (think of it as a knowledge inventory), as a checkbox already exists for inventory checks to enable/disable conversation options.

Currently I can manually build all of this structure using local variables to store what the player currently knows/needs to enable/disable talking points for eight conversations, but this is a) labor intensive, and b) opens the door wide for human error. I can't help but think there is a better way.

Any thoughts here would be greatly appreciated - or is there a core AC component that I'm just unaware of that addresses this need that I need to learn more about?

Thanks for your input. Additionally - I must add that I think AC is absolutely brilliant! Chris has really created something special here, and it's a pleasure to work with. I wish I found it years ago.

Comments

  • Welcome to the community, @ScottD7788.

    To understand correctly: each of these "talking points" are shared among all of the NPCs?

    If you want to avoid human-error, it may be that a custom script is best, as it's possible to manually turn on/off dialogue options at the time a Conversation is run.

    However, classifying these points as inventory items is certainly possible. A dialogue option can be linked to an Inventory item in the Conversation Inspector, causing that option to only appear if the Player is currently carrying that item.

    Categories can be defined for items in the Inventory Manager. If you create two (e.g. Default and TalkingPoint), you can then create an item for each talking point and assign it to the new category.

    With your items now categorised, you can limit your Inventory menu's display to just Default items by checking Limit by category? in your InventoryBox element's properties. This will prevent your "talking point" items from being visible to the player.

  • @ChrisIceBox Thanks so much for the reply! I will pursue the Inventory solution you've outlined, as the logic of it seems quite straightforward. As my confidence grows with the AC engine, I'll explore integrating my own custom scripting, but in the short term sticking with the engine allows me to focus on the creativity without getting bogged down too much in the background logic.

    Personally I feel one of the greatest strengths of AC is that it has a great intuitive quality to it - far surpassing any other tool I've seen in the Unity asset store. It allows a person to just drop into the editor and begin/continue creating, without spending 20 minutes trying to remember where I left off, or struggling for the first hour translating my ideas into a clunky environment because I can't remember the personal nuances or vocabulary so-and-so developer uses to define a non-intuitive structure... AC just makes sense to me. AGAIN - really wish I found this ages ago!! Thanks for your hard work! It is greatly appreciated.

  • You're welcome! Asset Store reviews are always appreciated, if you have the time.

  • AC has a very capable conversation system, but my game has some really complex conditional logic, and it was getting very confusing to keep track of everything.

    If you have the money to spend, I'd recommend checking out Dialogue System by Pixel Crushers. Their AC integration works beautifully, and it's saved me tons of time. It might be overkill for your needs, but I'm really happy with it and AC.

  • edited August 2021

    Indeed, Dialogue System is a great choice - especially given it's ability to work with other tools like articy:draft and ChatMapper.

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.