Dialogue Response Item with dynamic labels (XP, Reward, New weapon)

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
flyingv
Posts: 5
Joined: Wed Apr 10, 2024 4:03 am

Dialogue Response Item with dynamic labels (XP, Reward, New weapon)

Post by flyingv »

Hi!

I need a similar response system as in the attachment below (+5000 money, +1 weapon). Is there any built-in functionality?
Thanks.
Attachments
vz62vijh0s761.jpg
vz62vijh0s761.jpg (134.78 KiB) Viewed 53 times
User avatar
Tony Li
Posts: 20701
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue Response Item with dynamic labels (XP, Reward, New weapon)

Post by Tony Li »

Hi,

There's built-in functionality for everything except the reward images. This includes Ruby's portrait, name, and text at the top, the choices at the bottom, and the ability to add the reward to the player using each choice's Script field. However, the Dialogue System is designed to let you extend its functionality. Here are my recommendations:

1. Add two new fields to the dialogue entry template (see Templates): reward amount and reward icon.

2. In your reward dialogue entries, set the reward amount (e.g., "1x") and reward icon as an image name (e.g., "kevlar_vest").

3. Make a subclass of StandardUIResponseButton that also supports two extra UI elements: reward amount and reward image. Override the SetFormattedText method to look up the dialogue entry's reward amount and reward icon, and set the UI elements accordingly.
flyingv
Posts: 5
Joined: Wed Apr 10, 2024 4:03 am

Re: Dialogue Response Item with dynamic labels (XP, Reward, New weapon)

Post by flyingv »

Thanks for advices. I'll try to do that)
User avatar
Tony Li
Posts: 20701
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue Response Item with dynamic labels (XP, Reward, New weapon)

Post by Tony Li »

Glad to help! If you have questions about it, let me know.
Post Reply