Originally Posted by
Fire Cape
Are we having a dialogue system competition? :D
We should totally do that. Host regular competitions on who can come up with the best way to solve a problem.
I have not worked on a proper system for it yet, but i'm thinking when I get around to it I will put npc dialogue in json files and start the file name with the npc name mapped from the npc definitions (so man.json, etc).
Precisely speaking, a dialogue is a conversation. So speaking about some things here in terms of dialogue is a little misleading. Player dialogue would be public chat.
I'd check if the speaker was an instance of an entity to decide what model to send and then pull it from the definition mapping above.
Dialogue is also quite a lot more complicated than many think because of factors like priority (not just in the action queue which is simple enough but in the decision of which dialogue to show based on quest stage etc).
I think the lambda here is overly complicated and storing in Java unnecessary really, also a little intimidating and clunky for new users.
I am absolutely anal about constants having precise terms, the whole 'case 320: etc' does my nut in, although I do see why you might do it for things that are very obvious (for example there's probably no point naming the logout button when all it does is call a method that tells it to logout, like no shit that's what it is).