• Advertisement

Archived

This topic is now archived and is closed to further replies.

structure to store dialogs fon an RPG game

This topic is 5326 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

  • Advertisement