Tutorial of Karma System in Dialogue System
-
- Posts: 80
- Joined: Sun Jul 17, 2016 3:38 pm
Tutorial of Karma System in Dialogue System
Good day! Is there any tutorials for making a Karma system in the dialogue system?
-
- Posts: 68
- Joined: Sun Aug 16, 2015 3:01 am
- Location: St. Louis, MO
- Contact:
Re: Tutorial of Karma System in Dialogue System
Have you checked out Love/Hate? There is an included demo that does a pretty good job of showing how it's set-up. Works seamlessly with Dialogue System.. http://www.pixelcrushers.com/love-hate/
Re: Tutorial of Karma System in Dialogue System
Thanks @bohnstudios! That's the best way to do it.
Another way is to use the Dialogue System's Status and Relationship Functions. There are no tutorials for them, though. If you have questions about using them, just let me know. I'll be happy to answer here.
Another way is to use the Dialogue System's Status and Relationship Functions. There are no tutorials for them, though. If you have questions about using them, just let me know. I'll be happy to answer here.
-
- Posts: 80
- Joined: Sun Jul 17, 2016 3:38 pm
Re: Tutorial of Karma System in Dialogue System
Thank you for replies. I have an idea but still I don't know how to do it. For example, I declare a variable named "Karma."
I set the initial value to 50.
Now here's the quest, Sergeant Graves commands the player to rescue a hostages. The player have rescue the hostages but, there's still one missing. Now, the player found the terrorist together with the hostage. The terrorist is pointing his gun to the hostage. The terrorist asking the player to surrender. Now here's the choices which the player will decide. Every choices contains value.
a. Don't Surrender, negotiate with the terrorist. (good = 15 points.)
b. Shoot the terrorist together with the hostage. (Evil = -30 points.)
c. Drop your gun. (Neutral = 0 points.)
Now, I put a script on each response.
a.
b.
c.
-
Now here's my question, is this correct?
I set the initial value to 50.
Now here's the quest, Sergeant Graves commands the player to rescue a hostages. The player have rescue the hostages but, there's still one missing. Now, the player found the terrorist together with the hostage. The terrorist is pointing his gun to the hostage. The terrorist asking the player to surrender. Now here's the choices which the player will decide. Every choices contains value.
a. Don't Surrender, negotiate with the terrorist. (good = 15 points.)
b. Shoot the terrorist together with the hostage. (Evil = -30 points.)
c. Drop your gun. (Neutral = 0 points.)
Now, I put a script on each response.
a.
b.
c.
-
Now here's my question, is this correct?
Re: Tutorial of Karma System in Dialogue System
Very close, but you'll want to add/subtract from the current value of Karma, and use the Script field, like this:
In the Script field, you can also use the ShowAlert() function if you want to show a message like "XYZ will remember that" in Telltale games. For example:
- Dialogue Text: Don't Surrender, negotiate with the terrorist.
- Script:
Code: Select all
Variable["Karma"] = Variable["Karma"] + 15;
- Dialogue Text: Shoot the terrorist together with the hostage.
- Script:
Code: Select all
Variable["Karma"] = Variable["Karma"] - 30;
In the Script field, you can also use the ShowAlert() function if you want to show a message like "XYZ will remember that" in Telltale games. For example:
- Dialogue Text: Don't Surrender, negotiate with the terrorist.
- Script:
Code: Select all
Variable["Karma"] = Variable["Karma"] + 15; ShowAlert("Gained 15 karma")
- Dialogue Text: Shoot the terrorist together with the hostage.
- Script:
Code: Select all
Variable["Karma"] = Variable["Karma"] - 30; ShowAlert("<color=red>Lost 30 karma</color>")
-
- Posts: 80
- Joined: Sun Jul 17, 2016 3:38 pm
Re: Tutorial of Karma System in Dialogue System
Thanks for the help! I'll ask more if I still have questions. Have a great day!
-
- Posts: 80
- Joined: Sun Jul 17, 2016 3:38 pm
Re: Tutorial of Karma System in Dialogue System
How will I use Lua codes to trigger a conversation?
For example, if Player has a 65 karma. He needs to talk to Sergeant Graves that he already finish the quest rescuing the hostages.
Sergeant Graves needs 65 karma to trigger the conversation, else another conversation will trigger.
I have an idea, I hope this is correct.
If player has a 65 karma above.
else
.
Are these correct?
For example, if Player has a 65 karma. He needs to talk to Sergeant Graves that he already finish the quest rescuing the hostages.
Sergeant Graves needs 65 karma to trigger the conversation, else another conversation will trigger.
I have an idea, I hope this is correct.
If player has a 65 karma above.
else
.
Are these correct?
Re: Tutorial of Karma System in Dialogue System
Yes. May I make two suggestions?
1. Change the second condition to:
Although it's not likely, if Karma were 64.5 then neither condition would be true with your original conditions. By using the condition above, you guarantee that one condition will be true.
2. The Trigger dropdown is set on OnEnable. This means the Conversation Trigger will only try to run when it's enabled (e.g., when the scene starts, if the GameObject is active when the scene starts). You may need to change the Trigger dropdown to a different value such as OnUse, depending on how the player can trigger the conversation.
1. Change the second condition to:
Code: Select all
Variable["Karma"] < 65
2. The Trigger dropdown is set on OnEnable. This means the Conversation Trigger will only try to run when it's enabled (e.g., when the scene starts, if the GameObject is active when the scene starts). You may need to change the Trigger dropdown to a different value such as OnUse, depending on how the player can trigger the conversation.
-
- Posts: 80
- Joined: Sun Jul 17, 2016 3:38 pm
Re: Tutorial of Karma System in Dialogue System
Ok, I'll change it later.
How will I trigger a conversation using a karma required?
I mean using conditionals.
Like if player has a 65 karma, the conversation named "Rescue" will trigger.
Else, the conversation named "Another mission" will trigger.
How will I trigger a conversation using a karma required?
I mean using conditionals.
Like if player has a 65 karma, the conversation named "Rescue" will trigger.
Else, the conversation named "Another mission" will trigger.
Re: Tutorial of Karma System in Dialogue System
How do you normally trigger conversations in your game?
For example, in the Feature Demo, the player must put an NPC in its crosshairs (using the Selector component) and press the spacebar. This sends an "OnUse" message to the NPC. If the NPC has a Conversation Trigger set to OnUse, it will start the conversation.
For example, in the Feature Demo, the player must put an NPC in its crosshairs (using the Selector component) and press the spacebar. This sends an "OnUse" message to the NPC. If the NPC has a Conversation Trigger set to OnUse, it will start the conversation.