structure to store dialogs fon an RPG game

Started by
1 comment, last by rogerdv 20 years, 8 months ago
Im trying to figure out how to store dialogs for my game, but I cant find any useful way. I need to keep a quite complex dialog structure that not only have words, but also lua scripts, something like: Possible answers: 1 2 if player.intelligence<10 then Any suggestion?
Advertisement
I''d store it in a graph structure, when player gets to a vertex the scrtipt would be executed to check which answers are available for the player and then shown.


darkone
Registered Linux User #317188
darkoneRegistered Linux User #317188
Assign each state of the game, quests, etc, a number.
Save all the stuff you want in a database, and update the database as events happen.
When you meet an npc, check the variables you need for that npc in the database, and act accordingly to the value you have there.
Lua has some tools to acess sql db''s.

This topic is closed to new replies.

Advertisement