organizing for large projects

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
timbecile
Posts: 110
Joined: Mon Mar 12, 2018 11:00 pm

organizing for large projects

Post by timbecile »

Hey Tony,

I had some questions about large projects. I'm probably going to have hundreds of NPCs over a large area (making an RPG). What's the best way to organize them? I guess folders would be nice, but I was thinking of separate dialog files. Would that work? Can one dialog file check data in another? (ie, could a guy in one city check about a quest done in another)
User avatar
Tony Li
Posts: 21080
Joined: Thu Jul 18, 2013 1:27 pm

Re: organizing for large projects

Post by Tony Li »

Hi,

There are two general ways to handle it.

Some large games keep everything in a single database for simplicity. Disco Elysium is an example.

Other large games assign a primary database to the Dialogue Manager's Initial Database field and use Extra Databases component(s) to load additional databases. (See Working With Multiple Databases for details.) Tortured Hearts is an example. The primary database has all data that's shared across the whole game, typically actors and quests may be referenced in more than one location. The additional databases use the Sync Assets option to be able to reference data in the primary database, and each one typically contains conversations specific to one region or city. Since quests are synced from the primary database, any guy in any city can check about a quest in another city.
timbecile
Posts: 110
Joined: Mon Mar 12, 2018 11:00 pm

Re: organizing for large projects

Post by timbecile »

perfect, which would you consider Best Practice?
User avatar
Tony Li
Posts: 21080
Joined: Thu Jul 18, 2013 1:27 pm

Re: organizing for large projects

Post by Tony Li »

Either is fine.

For simplicity, I recommend sticking with one database unless it becomes an issue, either because it's too big to manage or you have multiple writers working at the same time.

Remember that you can organize quest names and conversation titles into submenus by using forward slashes, such as: "NPCs/Companions/Leliana/Camp Chat", "NPCs/Bosses/Cauthrien/Taunts", etc. Variable names will also break into submenus on dots (e.g., "Denerim.Temperature", "Denerim.IsRaining", etc.).

If you're using Unity 2019.2 - 2019.3, it may become an issue sooner than you expect. These editor versions have a bug that causes performance issues in the Inspector with large assets, including large dialogue databases. Unity fixed the bug in 2020.1, and they tentatively expect to fix it in 2019.4, too.
timbecile
Posts: 110
Joined: Mon Mar 12, 2018 11:00 pm

Re: organizing for large projects

Post by timbecile »

I've been using this for like 2 years. had no idea of the /folder feature. That would definitely be ideal, I just upgraded to 2019.3, but my database isn't large yet. maybe it will be next year though
timbecile
Posts: 110
Joined: Mon Mar 12, 2018 11:00 pm

Re: organizing for large projects

Post by timbecile »

Hey Tony,

is the slash folder trick supposed to put submenus in the conversation dropdown? Do you have a screenshot of how it would look? I can't seem to get it to work
User avatar
Tony Li
Posts: 21080
Joined: Thu Jul 18, 2013 1:27 pm

Re: organizing for large projects

Post by Tony Li »

Hi,

It should look like this:

convSubmenus.png
convSubmenus.png (21.03 KiB) Viewed 999 times
timbecile
Posts: 110
Joined: Mon Mar 12, 2018 11:00 pm

Re: organizing for large projects

Post by timbecile »

Mine doesn't look like that at all. it's still a flat list.

Maybe I'm putting the slash in the wrong place? I put it on the Actor name.
User avatar
Tony Li
Posts: 21080
Joined: Thu Jul 18, 2013 1:27 pm

Re: organizing for large projects

Post by Tony Li »

Put it in the conversation title. To change a conversation's title, edit the conversation and click on blank space in the canvas. This will show the conversation's properties in the Inspector.

Technically you can also use forward slashes in actor names. This will use submenus when selecting an actor -- for example, when selecting the node's speaker and listener. In this case, you'll want to also set the actor's Display Name so it doesn't show the forward-slash version in player-visible UIs.
timbecile
Posts: 110
Joined: Mon Mar 12, 2018 11:00 pm

Re: organizing for large projects

Post by timbecile »

Now it works! Thanks Tony!

Good tip about the actor name. I'm wondering if I'll have troubles later on with a giant actor name list. We'll see!
Post Reply