Multiple databases and custom Lua types
Posted: Sat Aug 14, 2021 7:31 pm
Hello, couple more questions:
Is it generally good practice to have multiple dialogue databases such as one for cutscene dialogues and one for random dialogues? Or is there some easy way to tag dialogues within the same database so that they can be easily fetched? For example, if the player talks to an NPC I want to fetch a couple random dialogues that can be displayed. I wouldn't want to fetch a random dialogue and come back with a boss dialogue or a dialogue from a different NPC. Is there an easy way to do this or do I have to manage it in my application's code?
The other thing I noticed is for Lua methods - there are some predefined types such as Item. However I'm using my own item system. Is it possible to create a Lua template with a custom parameter type?
Is it generally good practice to have multiple dialogue databases such as one for cutscene dialogues and one for random dialogues? Or is there some easy way to tag dialogues within the same database so that they can be easily fetched? For example, if the player talks to an NPC I want to fetch a couple random dialogues that can be displayed. I wouldn't want to fetch a random dialogue and come back with a boss dialogue or a dialogue from a different NPC. Is there an easy way to do this or do I have to manage it in my application's code?
The other thing I noticed is for Lua methods - there are some predefined types such as Item. However I'm using my own item system. Is it possible to create a Lua template with a custom parameter type?