Well, I'll give away my aproch of the problem too.
I used a CSV to store all the dialogs according to this format :
PNJname;DialogID;type;dialog1;action1;param1;dialog2;action2;param2;dialog3;action3;param3
Each and every dialog is then called using the PNJ.UID and the dialogID.
- the type of dialog is "story", "random" or "choice" and will change how the columns are used.
- in story mode, dialog1 will display first. If there is an action1/param1, I'll do a call function on the action1, giving param1 as parameter. If not, I'll display dialog2, then dialog3 using the same logic.
- random will trigger a random dialog between the 3 present. It will then execute the action1 if it is mentioned.
- choice will make the 3 lines appear and let the player choose one. It will then call the action corresponding to the dialog.
It was quite long to program in events (around 50 to handle everything) but worth it, as it can easily accept a new type of dialog, and can be used in a lot of ways.
The CSV was also a pretty easy choice to store the datas as rexrainbow's plugin is so simple to use and quite fast in runtime. Plus, it lets you prepare dialogs in excel ^^