Relationships and Dialogue System

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
Pendergast
Posts: 38
Joined: Sun Oct 18, 2020 1:48 pm

Relationships and Dialogue System

Post by Pendergast »

Hello again,

I was wondering : is there any way Dialogue System allows to manage relationships and love or hate "points" depending on what the answers is choosen by the player ?

I was looking at Love/Hate asset you have, but it's much more than I need for my game. I just need to tell unity "okay, if the player say that line, it cause -5 love for that NPC", and "if that NPC is at -50 love, he will say that, and not that instead".
As i am new to unity, i depend a lot on assets, and i wanna know if i have to buy Love/Hate or if i can do this love/hate points system with Dialogue System only :)

I saw somewhere on the forum that it was mentioned that Dialogue System can handle a little bit of this sort of thing.

Thank you very much in advance !
PENDERGAST / NyxNikita
Artist & Writer
Caroline I. Letuppe
🌿 Instagram: https://instagram.com/nyxnikita
🌿 Site officiel: https://nyxnikita.com
🌿 Boutique: https://shop.nyxnikita.com
🌿 Tous mes liens: https://nyxnikita.carrd.co/
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: Relationships and Dialogue System

Post by Tony Li »

Hi Caroline,

Yes, the Dialogue System can handle that with Lua functions. (See Relationship Lua Functions) The Conversation Conditions tutorial introduces Lua.

Examples:
  • Dialogue Text: "I disagree with what you just did, player."
  • Script: DecRelationship(Actor["Some_NPC"], Actor["Player"], "love", 5)
  • Conditions: GetRelationship(Actor["Some_NPC"], Actor["Player"], "love") < -50
  • Dialogue Text: "No. I don't like you enough to help you with that."
User avatar
Pendergast
Posts: 38
Joined: Sun Oct 18, 2020 1:48 pm

Re: Relationships and Dialogue System

Post by Pendergast »

Thank you so much !!
PENDERGAST / NyxNikita
Artist & Writer
Caroline I. Letuppe
🌿 Instagram: https://instagram.com/nyxnikita
🌿 Site officiel: https://nyxnikita.com
🌿 Boutique: https://shop.nyxnikita.com
🌿 Tous mes liens: https://nyxnikita.carrd.co/
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: Relationships and Dialogue System

Post by Tony Li »

Happy to help!
User avatar
Pendergast
Posts: 38
Joined: Sun Oct 18, 2020 1:48 pm

Re: Relationships and Dialogue System

Post by Pendergast »

Hi again, Tony !

Trying out the relationship scripts, i got a small problem that says:

Dialogue System: Syntax error in relationship function
UnityEngine.Debug:LogWarning(Object)

Here's what i wrote in the script section of the node : IncRelationship(Player, Merevin, "love", 5);

Thanks !
PENDERGAST / NyxNikita
Artist & Writer
Caroline I. Letuppe
🌿 Instagram: https://instagram.com/nyxnikita
🌿 Site officiel: https://nyxnikita.com
🌿 Boutique: https://shop.nyxnikita.com
🌿 Tous mes liens: https://nyxnikita.carrd.co/
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: Relationships and Dialogue System

Post by Tony Li »

Hi,

Please use this:

Code: Select all

IncRelationship(Actor["Player"], Actor["Merevin"], "love", 5);
User avatar
Pendergast
Posts: 38
Joined: Sun Oct 18, 2020 1:48 pm

Re: Relationships and Dialogue System

Post by Pendergast »

Hi,

I used this and there's the same error:

Dialogue System: Syntax error in relationship function
UnityEngine.Debug:LogWarning(Object)

Tho, the game works fine (i did two nodes with conditions who depends on the love variable, and it works still) !

EDIT: Okay, it was my fault, i didn't used the names of the actors i created in the 'Actor' tab of the Dialogue ! Sorry, haha !
PENDERGAST / NyxNikita
Artist & Writer
Caroline I. Letuppe
🌿 Instagram: https://instagram.com/nyxnikita
🌿 Site officiel: https://nyxnikita.com
🌿 Boutique: https://shop.nyxnikita.com
🌿 Tous mes liens: https://nyxnikita.carrd.co/
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: Relationships and Dialogue System

Post by Tony Li »

No problem -- I'm glad you got it working!
Post Reply