Giter Club home page Giter Club logo

Comments (3)

mhgolkar avatar mhgolkar commented on May 26, 2024

Hi @sorcierlegrand

Arrow's Dialog node is partial.

In other words, each dialog node conveys one side of a conversation.
Yes the name might be a little misrepresenting at the first sight.

Any dialog can be playable or automatic whether the character is NPC or not.

These design choices make Arrow much more flexible. Imagine when you want a play in which any of (2 or more) players can play one of the characters, and you want all the sides to be able to choose all the lines, even the first one.

... to have a character say something and give answer choices to a player, so how do I do this with arrow ?

It's really easy, just chain the dialogs.

And if you want the character's line (or partial-dialog as part of a conversation)
to just be something said and not playable by the user, set the playable checkbox off.
It's right under the list of dialog lines.

Dialogs which are not playable (by user,) will be played automatically.
When you have more than one line in your automatic partial dialog, one of them will be played randomly.

What's the use for the "Interaction" node? It's functionally identical to the dialog one.

Interaction is not identical to dialog.
Besides being independent from characters and having different data structure,
interactions are semantically different and serve another purpose.

Imagine the player/hero entering to a cabin in the woods.
You describe the scene via a content node:

"... dark and moist is the cabin ... On the old wooden table are a gun still smoking, a lantern and an oily bag ."

Now you want to give the player these options:

  • pick the lantern
  • pick the gun
  • inspect the bag

These are not parts of any conversation. Nothing is said.
Here you may use an instance of interaction.

from arrow.

albertjane avatar albertjane commented on May 26, 2024

Hi @mhgolkar , first of all thanks for all your work with Arrow, keep it up 🤗

On that same example of the cabin, if the player inspects the bag and then wants to get back to the same "interaction" but without the inspect the bag, how you would do it resuing the same interaction (without adding an interaction removing that option)?

I've been playing around with variables, update-variables, conditions and jump, but I don't seem to find a way to do it. I'm sure it's something basic I'm missing.

Thanks!

from arrow.

mhgolkar avatar mhgolkar commented on May 26, 2024

Hi @albertjane

Arrow nodes (at least currently) are designed as immutable in runtime. It means they have no way by themselves to remember if you have already played them, or in case of interactions, which path you've taken. They don't pass parameters to each other too. The decision was made chiefly to keep the runtime implementation as simple as possible.

With that in mind, we have a few ways to achieve what you intend:

  1. You can build on top of the existing tools (not really scalable)
    If you have only a handful of such interactions, that are repeated many times, you can use [sequencer +] condition nodes to replicate the same behavior and then put the branches in macros to reuse them. This means tracking each interaction with at least one variable and so on.
    It is not scalable, and would be really cumbersome if you need a lot of them.

  2. Use a smarter runtime
    If you have considerable number of those interactions, or it is a standard behavior for all of your interactions, you will be far better to modify the runtime to track the played nodes and hide/drop the choices already explored. To optimize for memory, you can also add a parameter to your customized interaction node-type, so the runtime knows which ones should be observed. In this approach you can simply jump back to any of your interaction nodes, and let the machine do the crunch. Be aware of corner cases though. You should think of situations where all the options are exhausted as well.

I hope you find this helpful.

from arrow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.