Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open World Integration #861

Open
OneManMonkeySquad opened this issue Sep 1, 2023 · 2 comments
Open

Open World Integration #861

OneManMonkeySquad opened this issue Sep 1, 2023 · 2 comments

Comments

@OneManMonkeySquad
Copy link

OneManMonkeySquad commented Sep 1, 2023

Hey,
I've toyed and looked around on how to best integrate Ink into an open world game (think Skyrim). Currently my dialog looks like this (please don't laugh, I'm a programmer):

VAR talked_to_faye = 0

=== InteractFaye ===
# npcs: Faye
{ talked_to_faye == 0:
	Faye: Bear. Bring me head get reward.
- else:
	Faye: Bear.
}
~ talked_to_faye++
* {has_item("Player", 22)} [Give Bear Head] {remove_item("Player", 22)} 
    Faye: Good. -> END
* [Make Faye hostile] {make_hostile_to_player("Faye")} -> END
+ [Exit] -> END

The game uses _inkStory.ChoosePathString to "start" a dialog. The __inkStory stays the same, meaning the global state is shared. This means that the knot restarts every time the dialog is triggered, thus I have to use the talked_to_faye variable to give a different reaction. I wonder if I could somehow stay inside the dialog, using threads or parallel "flows". Or if that is even a desirable thing, KISS et al.

edit:
Hmm, maybe the solution of having a [Move] choice together with having one parallel flow per NPC. That would achieve the dialog pause at predefined points. Lots of options, maybe somebody can share some experience.

@IFcoltransG
Copy link

You could look into Inkle's approach to resumable/quittable dialogue for A Highland Song.

@IFcoltransG
Copy link

At the end of the blog post, Jon Ingold mentions that Ink automatically tracks which knots have been seen. In your case, you can check if InteractFaye has been seen using the InteractFaye variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants