Hey, I'm wondering if it's possible to use Dialogue System for a skill selection screen. Say you have a variable for total number of points, and you want to assign those points to a variety of skills; strength, intelligence, dexterity, etc. Basically the kind of thing you'd find in most RPGs.
Is it possible to make this out of the box or would it require some custom coding?
Making a skill selection screen with Dialogue System
-
- Posts: 194
- Joined: Mon Jul 01, 2019 1:21 pm
Re: Making a skill selection screen with Dialogue System
Someone did this with the Dialogue System; I don't remember where I saw it, though. I think this is how they did it:
- Added Number variables "SkillPointsLeft", "Str", "Int", "Dex", etc.
- Dialogue Text:
They used a custom dialogue UI with response buttons positioned next to "Strength:", "Intelligence:", etc. The first two were positioned next to "Strength: [var=Str]" and looked like this:
- Added Number variables "SkillPointsLeft", "Str", "Int", "Dex", etc.
- Dialogue Text:
Code: Select all
Skill Points Left: [var=SkillPointsLeft]
Strength: [var=Str]
Intelligence: [var=Int]
Dexterity: [var=Dex]
- Response 0:
- Menu Text: "-"
- Description: "Subtracts 1 from Str and adds it to SkillPointsLeft."
- Conditions: Variable["Str"] > 3
- Script: Variable["Str"] = Variable["Str"] - 1; Variable["SkillPointsLeft"] = Variable["SkillPointsLeft"] + 1
- Response 1:
- Menu Text: "+"
- Description: "Adds 1 to Str and subtracts it from SkillPointsLeft."
- Conditions: Variable["Str"] < 18 and Variable["SkillPointsLeft"] > 0
- Script: Variable["Str"] = Variable["Str"] + 1; Variable["SkillPointsLeft"] = Variable["SkillPointsLeft"] - 1
-
- Posts: 194
- Joined: Mon Jul 01, 2019 1:21 pm
Re: Making a skill selection screen with Dialogue System
Great, this looks like pretty much what I had in mind.
I'm not entirely sure how to make a custom UI...but I'll figure it out Thanks!
I'm not entirely sure how to make a custom UI...but I'll figure it out Thanks!
Re: Making a skill selection screen with Dialogue System
You might start with the Basic Standard Dialogue UI. Add an instance to the Dialogue Manager's Canvas, and assign it to the Dialogue Manager's Dialogue UI field. Remove the Scroll Rect and layout elements from the Response Menu Panel GameObjects. Then duplicate 2 copies of the response button template for each skill (one for +, one for -). Inspect the Standard UI Menu Panel component. Unassign the Button Template. Instead, assign the duplicates to the Buttons list. You'll want to move the buttons around so they line up with the skills. If you have questions about any of it, just let me know.