Show items count in quest log

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Volandpro
Posts: 9
Joined: Sat Feb 04, 2023 3:28 am

Show items count in quest log

Post by Volandpro »

Hello!

Is it possible to show count of quest items I have in the quest log? I am using my own inventory system. For example, I need to find 5 stones, so, if I open quest log, I will see 2/5 (if I have 2 stones).
User avatar
Tony Li
Posts: 22135
Joined: Thu Jul 18, 2013 1:27 pm

Re: Show items count in quest log

Post by Tony Li »

Yes. Write a C# function returns the amount of an item in your inventory. For example, maybe it would be called GetItemCount(itemName). Then register it with Lua.

In your quest text, use the [lua(code)] markup tag, such as:
  • Entry 1: [lua(GetItemCount("Stone"))] / 5 Stones
Volandpro
Posts: 9
Joined: Sat Feb 04, 2023 3:28 am

Re: Show items count in quest log

Post by Volandpro »

Thank you very much :)
User avatar
Tony Li
Posts: 22135
Joined: Thu Jul 18, 2013 1:27 pm

Re: Show items count in quest log

Post by Tony Li »

Glad to help!
Post Reply