Page 1 of 1

Best approach to dynamically load dialogue DBs at start

Posted: Mon Dec 07, 2015 1:07 pm
by mandi
Hi Tony,
what is the best approach to dynamically load dialogues DBs at level start? I wrote myself a component that finds Dialogue Manager and sets the DB to the one I choose, but it fails to work.

Best

Re: Best approach to dynamically load dialogue DBs at start

Posted: Mon Dec 07, 2015 1:22 pm
by Tony Li
Hi,

Add an Extra Databases component:

Image

Set the Add Trigger to OnStart, and assign your databases to the Databases section.

Re: Best approach to dynamically load dialogue DBs at start

Posted: Mon Dec 07, 2015 1:27 pm
by mandi
Hi Tony,
splendid! I'm sure I've read about it, but there's so many features in DS, I must have forgotten about this one...

And it doesn't matter what is the Initial Database set in Dialogue Manager? Or should I set this to null?

Best,
Artur

Re: Best approach to dynamically load dialogue DBs at start

Posted: Mon Dec 07, 2015 1:49 pm
by Tony Li
Hi Artur,

You can set it to null and ignore the warning that no initial database is assigned.

Instead, I prefer to assign a global database to the Initial Database. This database contains all the data that persists across scene changes, such as global variables, global quests, etc. -- basically anything that needs to be in a saved game file.

Then in each scene I use Extra Databases to load databases that are only needed in that scene. The Add Trigger is OnStart, and the Remove Trigger is OnDestroy.

Re: Best approach to dynamically load dialogue DBs at start

Posted: Mon Dec 07, 2015 2:17 pm
by mandi
Hi Tony,
that makes perfect sense. Thank you for advice!
Artur