Giter VIP home page Giter VIP logo

Comments (3)

clembu avatar clembu commented on July 27, 2024

What's sure is the AI has to be on your game side (Ink's logic is fine enough for state-logging, but actual programming is hard to debug), so what you need is

  • a way for the game to know there are options to choose from
  • a way for the game to know what the options are and what they "mean"
  • a way for the game to choose the option.

You could have a line in the ink code saying "okay, these choices are for this character", like with tags and stuff.

* some player choice
  # npc Mark
  * * Mark's first option
  * * Mark's other option

In your story loop in your game, you then look for the tags "npc", get the name, and then relay the choices to your AI NPC agent.
But here, I have nothing but text to convey, and it would take a lot of logic power to process this text.
So I'd add some tags in there to indicate what these choices would do.

# npc Bob
* * blah blah # aggressive
* * blah bluh # friendly

you can go with a word-based list of "emotions" like aggressive or sarcastic,
or go the numeric route and have a number-based code for your options.
It's up to how you want your AI to work.

Then you have the story loop make the choice with the regular API.

That's if you want an AI.
What you could also do is have variables for each NPC keeping their "personality stats", and have your NPC decisions be computed with if statements like if mark_sarcastic is over 9000 then -> sass_answer (not ink syntax)
The downside to this is, it's way harder to test and fine-tune your NPC's behavior.

from ink-unity-integration.

joningold avatar joningold commented on July 27, 2024

from ink-unity-integration.

clembu avatar clembu commented on July 27, 2024

I edited my answer to better convey what I meant; debugging was indeed my biggest concern.

from ink-unity-integration.

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.