Comments (3)
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.
from ink-unity-integration.
I edited my answer to better convey what I meant; debugging was indeed my biggest concern.
from ink-unity-integration.
Related Issues (20)
- Performance issue in Project view with large projects HOT 2
- High CPU usage when Ink Player showning. HOT 2
- Retrieving tags from Choice broken in Ink-Unity HOT 1
- Error: Object reference not set to an instance of an object HOT 1
- Ink Player GUI Errors HOT 4
- Replace InkBrowserIcons
- null path and null currentPointer during the first line of a knot HOT 3
- OnWillSaveAssets saving InkSettings causes VCS to trigger HOT 1
- ShouldShowContentWithSearchString and SearchStringMatch do the same thing?
- Visibility options should use PopupWindow
- Unexpected line break returned from story.Continue()
- How to transfer variable values from one Ink story to another Ink story? HOT 1
- How does the include system work? HOT 3
- Unity 2022.3.7f1 issues: demo scenes do not open, reload doesnt work. HOT 3
- Unity 2022.3.7f1 addressables build failure HOT 1
- Are built in functions somehow covered in plugin? HOT 1
- Do flows support choices? HOT 1
- Missing tags after loading from json
- Compiler bug prevented compilation of JSON file. Please help us fix it by reporting this as a bug.
- Why isn't the parent ink file attached to the data of the knot? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ink-unity-integration.