Page 1 of 1
Custom Lua using Quest & Item & Acotr dropdown
Posted: Fri Jan 10, 2025 4:06 am
by ds2497
Hi there,
I'm aware that the Bridge in Dialogue System Support has a dropdown where I can select quest names from a string. It also provides a dropdown for NPC names. I was wondering if I can achieve the same functionality with my custom Lua function. Right now, everything is in string format.
Do you have any hints on how I might accomplish this? Would it be very complicated to implement?
Thanks!
Re: Custom Lua using Quest & Item & Acotr dropdown
Posted: Fri Jan 10, 2025 8:17 am
by Tony Li
Hi,
Yes. Create a Custom Lua Function Info asset, and set the parameter dropdowns to Actor or Quest. Example:
- customLuaFunctionInfo.png (31.55 KiB) Viewed 343 times
In the example above, the selected actor's and quest's Names will be passed to the function.
Re: Custom Lua using Quest & Item & Acotr dropdown
Posted: Fri Jan 10, 2025 11:20 am
by ds2497
I never really paid close attention to the parameter data types available in the dropdowns for custom Lua functions. I just noticed there’s no int option, so I’ve been using double instead. Now that you’ve pointed out options like Actor and Quest, my question is easily resolved—and it also makes my question seem kind of funny. At the same time, it explains why no one else has asked similar questions on the forums lol.
Thank you so much!
Re: Custom Lua using Quest & Item & Acotr dropdown
Posted: Fri Jan 10, 2025 11:37 am
by Tony Li
Glad to help!
Re: Custom Lua using Quest & Item & Acotr dropdown
Posted: Sun Jan 12, 2025 11:21 am
by ds2497
I would like to ask an additional question: Currently, the parameters include options for Actor and Quest, but why is there no option for Location? I saw in another post that Location is only used as a record, which is a bit of a pity. In my case, aside from Actor and Quest, if Location were integrated with CustomLua, there would be many ways to automate the process when calling it, making it more convenient. Is there a chance this feature might be added in the future?
Re: Custom Lua using Quest & Item & Acotr dropdown
Posted: Sun Jan 12, 2025 12:41 pm
by Tony Li
Yes, I'll try to get that added in 2.2.51. It just wasn't a priority since no one had requested it yet.
Re: Custom Lua using Quest & Item & Acotr dropdown
Posted: Sun Jan 12, 2025 1:12 pm
by ds2497
Thanks, Tony! That sounds great!
Re: Custom Lua using Quest & Item & Acotr dropdown
Posted: Fri Jan 17, 2025 2:21 am
by ds2497
Since we're already talking about custom Lua, I wanted to take this chance to ask: In the Bridge's SetQuestNodeState function, is there any specific reason why the Node State parameter isn’t set up as a dropdown? I’m currently just typing the strings manually, which works fine, but I’d prefer having a dropdown to select something like "success"—it’d save me from the typos I keep making!
Re: Custom Lua using Quest & Item & Acotr dropdown
Posted: Fri Jan 17, 2025 8:13 am
by Tony Li
Hi,
It's because the Dialogue System doesn't have a concept of quest nodes, which are a Quest Machine-specific thing. So the dropdown helper feature can't provide quest node dropdowns.
Re: Custom Lua using Quest & Item & Acotr dropdown
Posted: Fri Jan 17, 2025 8:45 am
by ds2497
Got it, thanks for answering!