A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Discussion in 'Assets and Asset Store' started by TonyLi, Oct 12, 2013.
How can I remove specific trees so players don't see them twice?
Hi @FrostedBrain - You can either use a variable to record that the branch was shown:
Or you can use SimStatus:
The caveat about SimStatus is that it saves data for every single node. If you have a huge amount of dialogue, it can amount to a lot of data. Then again, ZA/UM Studio used SimStatus in Disco Elysium, and that game has a lot of dialogue.
Hello, i have some trouble with events. I have quest bring 3 skins. I would like to update the questEntry after collecting all the skins and change next questEntry on state active. Are there any built-in ways to implement the above?
I dont use Condition Observer for this, becouse its resource intensive.
Now, I implemented it like this(screenshots). But I think this is not the best solution. What can you recommend?
public class Test : MonoBehaviour
[VariablePopup] public string variablePopupAttribute;
[QuestPopup] public string questCondition;
public int entryNubmer = 0;
[QuestState] public QuestState questState;
public void Check()
if (DialogueLua.GetVariable(variablePopupAttribute).AsInt >= 3)
QuestLog.SetQuestEntryState(questCondition, entryNubmer, questState);
And one more thing. I want to make an inventory. You have items, but I have not found examples of working with them anywhere. There is no way to add an item or change its status in actions. Why is this not? And why then objects if variables can be used instead? Can I add items during the game and track their addition?
Now I add items like this (screenshot). It is right?
Thanks for the incredible asset. This is a titanic work!
You can do it without writing any scripts. This is similar to the "Kill Enemies" quest in DemoScene2. Each enemy has an Increment On Destroy component:
Increments a variable named "enemiesKilled".
Shows an alert message.
Runs DialogueSystemTrigger.OnUse on a separate GameObject named Enemies.
The separate GameObject named Enemies has a Dialogue System Trigger that checks the value of enemiesKilled:
If the variable is >= 5, it sets the quest to success. In your case, you could set the current quest entry to success and set the next quest entry to active. You could either use 2 Dialogue System Triggers, or you could use 1 Dialogue System Trigger and set both entries' states with a Run Lua Code action. Use the "..." dropdown to select the quest entries so you don't have to type anything:
The Dialogue System doesn't include a full inventory system. The Item table in the dialogue database is really just a table of data fields. You can use it like in your screenshot and it will work fine. But if you need to present an inventory UI to the player, you will have to write it yourself or use a separate inventory system that has Dialogue System integration such as Inventory Engine or Inventory Pro. If you're using a framework such as Adventure Creator or ORK, the Dialogue System's integration also works with their inventory systems, too.
Hi, I'm using DIalogue System with TopDown Engine 2D. I'm trying to use the demo Scene included with the 3rd support package. It's giving me this error.
Assets\Pixel Crushers\Dialogue System\Third Party Support\TopDown Engine Support\Scripts\DialogueSystemTopDownEventListener.cs(52,13): error CS0103: The name 'SaveLoadManager' does not exist in the current context
Unity version. 2019.3.0f6
It's strange because it was working fine on 2018.3.1.4f
Please download and import the updated TopDown Engine Support package from the Dialogue System Extras page.
TopDown Engine doesn't tell you, but when you download it from inside an older version of Unity, it delivers an older version of TopDown Engine. When you downloaded it from 2019.3, you got the latest version, which has an API change that's handled in the updated support package.
Im looking for ways to call a method from a script attached to the NPC Im talking with, so when I click a button I can call my own method. So far I have found SendMessage, is there any other alternative especially if I can somehow print out an error if that method doesnt exist?
Hi @skinwalker - You can write a sequencer command. If by "button" you mean a player response menu button, then in the sequencer command the "speaker" will be the player and the "listener" will be the NPC. The guts of the sequencer command could look something like this:
var myScript = listener.GetComponent<MyScript>();
if (myScript == null) Debug.LogWarning("MyScript is not present on " + listener);
Okay I will give this a try, it needs to execute code that will open a vendor window (the vendor script attached to the npc currently speaking with). Its an end node so the dialogue will end there and I hope that sequence command has time to execute.
Sounds good! That's how most of the integrations with assets that have vendors work. There's typically a sequencer command like "OpenShop()" that designers use on the last node of a conversation.
How can i Map Enter key to Continue button?
Tick the Dialogue Manager's Input Device Manager > Always Auto Focus. This will make sure the continue button is selected (focused) by Unity UI's Event System. When you press the Event System's Submit input, it will click the currently-selected button. By default, the Submit input is mapped to Enter and Spacebar.
I have been looking for a way to get rid of the Portrait Name in the RPG template, I dont want to use a name or icon for the npc talking, the problem is that I only found a way to get rid of the icon and the separator between the name and dalogue.
Hi @skinwalker - If you're talking about this:
then delete the dialogue UI's Dialogue Panel > Main Panel > Portrait Name field.
If you're talking about this:
then inspect the Subtitle Panel Info GameObject's StandardUISubtitlePanel component and untick the Add Speaker Name checkbox.
I tried that it's not working. below am attaching the screenshots of input settings and input manager inspector.
@goutham12 - While playing in the editor, keep the inspector on the EventSystem. When the conversation shows a subtitle panel, make sure the EventSystem has selected the continue button:
Also check that you've enabled continue button mode by setting the Dialogue Manager's Subtitle Settings > Continue Button dropdown to Always, and that you've actually added a continue button and assigned it to the subtitle panel.
Gestalt: Steam & Cinder at PAX East
At PAX East? Stop by the Metamorphosis Games / Sold Out Games booth and play Gestalt: Steam & Cinder, made with the Dialogue System for Unity and coming out this year on Switch, Xbox One, PS4, and Windows. It's a steampunk metroidvania RPG set in a huge, beautiful pixel art world.You can also wishlist it on Steam.
Gestalt's heroine is even there in person! ;-)
Lake at PAX East
Also at PAX East: The first publicly playable demo of Gamious's Lake, made with the Dialogue System for Unity. Available to wishlist on Steam.
Disco Elysium - Meet Cuno: Behind the Voice
Curious about voice acting in the Dialogue System for Unity? Here's a behind the scenes look of the voicing for the character Cuno:
Studio ZA/UM used the Dialogue System for Unity with articy:draft to write their dialogue and handle voice acting.
Hello, how can I know when an Variable has changed? Is there a easy way like a event subscription to it?
Im using Variables to control when i'm giving Items to Player from NPC, im not using the DialogueSystem implementation of Item because i'm handling my own inventory system.
So, when the NPC gives a Item, I change the variable from false to true, theres a specific UI that will inform the reward to player and the way to do this connection is not clear yet.
Hi @Deviarc - You can use a Condition Observer, which is a polling method, but it's better to register a C# method with the Dialogue System's Lua environment. This way you don't have to use a variable in the first place. In the dialogue entry node's Script field, just call your C# method to give the player an item. This is how it's done in the existing integrations, such as Inventory Pro and Inventory Engine.
I'm struggling with something I knew how to do but seem to have forgotten.
I have the same 4 standard response options for every conversation in my game. For which I have made 4 images. How can I set it up so response(1) always shows Image(1) rather than response text inside of the response button? Response(2) = image(2), etc etc.
Basically how do I get my response buttons to use images rather than text to describe their purpose in-game?
Hi @Candy-Bomber - If they're always the same 4 buttons with same 4 images, you can deactivate the text label and assign the images to the buttons' Image components. Add your 4 buttons to the StandardUIMenuPanel's Buttons list. If you want to assign a node to a specific button, use the [position=#] markup tag. Otherwise it will use the buttons in the Buttons list in forward or reverse order depending on the Button Alignment dropdown.
Thank you. That did the trick
Glad to help!
Just gave it a try and damn, it works really well!
Never saw a lua integration like this, this is really nice.
Thanks for solving my problem!
@TonyLi What is the API method, or is there one, to save DS data and reload without it reloading the scene? I am trying to integrate with GKC save system and I want to be able to simply call DS and save its state whenever GKC saves and then to have DS reload its state when GKC loads. I tried calling the SaveSystem SaveGameToSlot and LoadGameFromSlot and it saves DS data fine, but when I have it do the LoadGameFromSlot it re-loads the scene also instead of just applying the saved states to the scene's game objects such as Position Savers.
Also, I noticed that if I call LoadGameFromSlot that it works as described above, but if I first load the scene from GKC and try LoadGameFromSlot that it doesn't do anything at all. No scene load, no object updates either.
Hi @magique - Untick the Save System component's Save Current Scene checkbox. Then LoadGameFromSlot will not load a scene; it will just apply the save data found in the slot.
This assumes you've set up the Dialogue System's save system components.
If you haven't set it up, and if you only want to save the Dialogue System's Lua environment (i.e., variables and quest states), then you can call PersistentDataManager.GetSaveData() and PersistentDataManager.ApplySaveData(). This will only save the Lua environment to a string; it won't save the states of any "saver" components such as PositionSaver or ActiveSaver.
@TonyLi Is there something else that needs to be done after calling LoadGameFromSlot to make it work? I was sure that I successfully loaded at least once, but now when I call the function it doesn't do anything.
And just after I said that I turned debug on and when I tried it and it worked fine. Not sure what was wrong before. If I see it again I'll let you know.
Ok, so it seems hit or miss. I just tried again and this time the debug didn't print and nothing loaded. Not sure what's going on.
I think maybe it's not DS. It might be GKC conflicting. I will check with GKC author. If both are saving to PlayerPrefs then maybe GKC is wiping out the DS saved data.
@magique - If GKC is being a little heavy-handed and wiping all PlayerPrefs, you can always get the DS save data as a string and let GKC save it. Instead of this:
you can do something like this:
string s = SaveSystem.Serialize(SaveSystem.RecordSavedGameData());
Then tell GKC to save string s.
And instead of this:
you can get the string from GKC and do something like this:
Also, make sure your Dialogue Manager has a DialogueSystemSaver component.
We worked it out. GKC was deleting PlayerPrefs unnecessarily and removing that fixed the issue. GKC author said it was fine to do it. Thanks for the help as always.
Always happy to help!
Disco Elysium Earns 7 BAFTA Nominations
Congratulations to Studio ZA/UM for garnering a whopping 7 BAFTA awards nominations! Disco Elysium is made with the Dialogue System for Unity, and is nominated in these categories:
@TonyLi Hi there, the downloadable doc seems to be offline. Please re-enable it, it would be super helpful, thanks.
Also, 7 BAFTA nominations for an indie Unity game is huge, especially how it was made using Dialogue System. Congrats!
Hi @Gregorik - Please try the link again. Maybe the hosting service was doing maintenance. The link seems to work fine now: https://www.pixelcrushers.com/dialogue_system/manual2x/Documentation.zip
I'm glad the Dialogue System was able to remove technical hurdles so Studio ZA/UM could just focus on their writing and creativity. But that wonderful writing was all theirs.
@TonyLi link works now, thanks. In the meantime I saved the entire dox site with HTTrack: it took almost an hour and the result is 100mb, but the html works as expected.
The manual has a lot of screenshots. Even zipped, it's 77 MB.
Hi I purchased your asset awhile ago but just getting around to trying it ou . Previously when making my own UI on the canvas I've always set the scale (sorry that might be the wrong name I'm doing this on my phone) to scale with screen size. The canvas on the dialogue manager prefab however does not have that option. I don't want to just add that to the prefab as I'm sure there's a good reason why it's not on there but how can I set my UI to scale with screen size without it using the dialogue system?
You can absolutely add a Canvas Scaler if you want. There's no problem doing that.
Hi I am trying to use Adventure Creator with Dialogue System, using the latest version of Unity. I have imported the third party support package, and I am trying to add the Adventure Creator bridge. When I go to Component → Pixel Crushers → Dialogue System → there is no menu item for Third Party. How can I resolve this please?.
Hi @mikemuk01 - If there are any red compiler errors in the Console window, new components will not be available in the Component menu. If you're using Dialogue System version 2.2.4 (the current version) or earlier, please download and import the updated Adventure Creator Support package from the Dialogue System Extras page. A new version of Adventure Creator came out since DS version 2.2.4 was released, and it requires an update to the Adventure Creator support package.
DS version 2.2.5 also contains the updated Adventure Creator Support package. This version should be available early next week.
Thank you Tony. That solves the problem
Glad to help!
Hello! Before I go messing around inside your code, I was wondering if dialogue system has functionality to instantly complete the current typewriter text on the first continue click, and then actually continue on the second click? I dug around for quite awhile last night but never saw anything like that in the documentation, but I could have missed it. Thanks!
Hi @Mixxy - Yes, that's the way the example prefabs that ship with the Dialogue System work. Add a StandardUIContinueButtonFastForward component to your continue button. Assign the subtitle text GameObject's typewriter effect. Then configure the continue button's OnClick() to call StandardUIContinueButtonFastForward.OnFastForward().
Hi Tony, I am using the latest updates of Dialogue System and Adventure Creator, with Unity 2019.3.3. I have installed the Third Party support package and the Adventure Creator bridge and everything works fine except for one thing. When the NPC dialogue line appears, it is followed by the Player response but the cursor is locked in the middle of the screen so I cannot click on the Player response to move the conversation on. How can I resolve that problem please?
Hi @mikemuk01 - If you're using the Adventure Creator action "Third Party: Dialogue System Conversation", make sure the Adventure Creator Bridge's "Use Dialog State" dropdown is set to any value except for Never. This will put Adventure Creator in its Dialog State during conversations, which unlocks the mouse cursor.
If the mouse cursor is still locked, some other component, such as another asset, is probably locking it.
If you're using a Dialogue System Trigger to start the conversation, tick Show Cursor During Conversation. However, since you're using Adventure Creator the preferred method is to use the Adventure Creator "Third Party: Dialogue System Conversation" action since this lets Adventure Creator know what's going on.