Forum rules - please read before posting.

Conversation + displaying inventory item names


Hi everyone,

firstly let me say a huge thanks to everyone here and of course to Chris for an amazing asset and a fantastic community. 

Here's the ONLY thing I cannot do so far:

- enter conversation mode and still be able to see inventory item names at the same time. 

The way my game is setup at the moment is with two identical inventory menus. One appears On Hover during gameplay, and the other During Conversation. Using variables, you can click an inventory item during a conversation with a NPC to ask them questions about it. Pretty simple.

So, in conversation mode, I can select the items, combine them and use them. But I cannot for the life of me enable their labels to appear. 

I suspect it has something to do with the StateHandler script (as mentioned in this forum post). I've even tried replacing a few of the "GameState.DialogOptions" with "GameState.Normal", but I am unfortunately way out of my depth here.

Anyone in a similar boat? Ideas? Suggestions?

Thanks in advance and keep up the good work everyone. I cannot way to play all your games. 




Comments

  • I should add two things to make it clearer:

    1) by inventory item names, I mean the labels you see when you hover over them. Similar to the hotspots.

    2) I tried the solution offered in the aforementioned post. While it does let me access other menus in conversation mode, it also seems to disable the ability to select the dialogue options. 
  • The suggestions I made in the other post are a hack - as I mentioned there, AC is designed to treat the selection of dialogue options as a separate "mode" and so assumes you won't be working with the inventory at the same time.

    I cannot say if this can be changed right now, but I will look into it.
  • Thanks for the prompt reply Chris.

    Keeping the item names the way they are displayed in-game is by far the most elegant solution, but I'm sure there are others. 

    In the meantime, I'm looking at alternative workarounds such as a third Inventory that only displays item names, invisible buttons with labels, etc...
  • edited June 2016
    So I'm clear, what is the intention behind this request?  I believe the neatest way around this would be to have an option to link a Dialogue Option to an Inventory item, so that an option can only appear if a given item is being carried by the player at the time.
  • Well, that's a good question. I'm just "thinking out loud" here and this might be completely game-specific:

    the intention was really to give conversations more scope, to make them more challenging. Since players can collect items and clues, it becomes their responsibility to select the right ones during conversations. 

    From a game-design point of view, I always feel like conversations can become rather linear, whereby players just exhaust all the available lines. When you're in charge of +30 items as well, you might think twice before clicking all the available options. 

    (Besides, I'm always a bit wary of adding too many dialogue options in AC since I have to really think forward in case the action lists become tangled up.)

    So, one alternative is to combine dialogue options and dragging+dropping items onto NPCs to ask questions. However, that's two game mechanics working in parallel which might confuse players. 

    It was so close to the ideal solution when I managed to enable inventories during conversations using your hack. The only thing missing to make it perfect were the labels! 



  • edited June 2016
    Yeah, I'm thinking of doing something similar for my main game project, so you can show items/clues to people so they can then react to the item/clue, just like in Phoenix Wright Ace Attorney series (which are perfect case examples). I also think it's cool to sometimes give players the option to show items/clues images instead of just always choosing plain text.
  • As it was brought up in another thread, I'll be adding a new feature that will allow you to limit a Conversation's dialogue options by whether or not a specific inventory item is currently carried.  So giving it the same name/icon as this item would mean it basically mean inventory items can be used as dialogue options.

    This could already be done by smart use of Inventory: Check Actions of course, but is a bit tedious.  I hope that this would be an acceptable workaround, as changing the current system could bring about unforseen problems.
  • One thing I forgot to mention: the other advantage of using the inventory to trigger dialogue is that it makes for a neater user interface. 

    It reduces the clutter of having tons of dialogue options, and it also means players can intuitively use the same menu in two different game modes. 

    I'll continue investigating other options in the meantime. If you or anyone else has any other hacks, I'd be happy to test them and to report here.
  • Ok, sorry to keep pestering about this, but I think I'm *this* close to a solution to this puzzle. 

    After hours of experimenting with various options, here's the best I can do:

    - following "the Hack" mentioned above allows me to enter conversation mode with normal gameplay interactions. This includes hotspots, inventory and labels. (Because I only want to keep the inventory, my conversations trigger two action: the first one disables all hotspots; the second disables player movement via Engine:manage systems). 

    At the point, I can access my inventory and see the conversation options. Hovering the mouse highlights them but clicking them doesn't do anything. (I tried moving the conversation menu up and down without success).

    However, for some reason, menu buttons are still clickable and responsive.

    So! The idea is to create invisible buttons overlaid above the dialogue options. All these buttons need to do is trigger the dialogue options. 

    But how? I'm guessing via custom script? I've had a quick look at the scripting guide, but I'm afraid this is all going above my head.




  • Why not just stop conversation mode in a junction? instead of figuring out how to hack AC, just stop the conversation then show the menu, record the player's choice, then resume conversation mode? at least that's how I was planning to do it...
  • I'm not quite certain how you could do that, but please, please let me know if you can make it work! This is really the last hurdle for my game mechanics and I'm dying to get it going!

  • edited June 2016
    I'm currently cracking my head over my Inventory system (and models and levels, and other logistics), so it might take me a while to get to that part.... but the gist of it, is variables. 

    My idea is to do the conversations in segments. Picture it like this:

    -Create a variable ActiveItem (or whatever you want to call it) and make sure it's empty prior to starting any conversations. 

    -Then start a conversation, let a few lines be said, then when you want to give the player the chance to show an item: end the conversation and at the same time open the item menu of your choice. 

    Each item should have an action list which on use (or have a script which when "Selected") will overwrite the current ActiveItem variable, using either the item name string or a int code. 

    -Once the player has used/selected an item, have them click on an "accept/show" button which will recommence the conversation (or go to the next segment), then all you'd have to do is run a variable check on ActiveItem to see which item was selected.

    Mind you, I'm using The Dialogue System, so conditioned dialogue lines are a lot easier to do. It might turn out a bit more long winded to do in AC.
  • edited June 2016

    Ok that's a good idea, but unfortunately not exactly the mechanic I'm after. I'd really like to keep the players immersed in the conversation without having to click a dialogue option to select inventory items. 

    and re: my clunky solution cited above, I'm guessing I need to create buttons that make use of activeConversation.RunOption(1); 

    That means modifying MenuSystem.cs, but I have no idea how...

  • Click a dialogue option? what do you mean? Anyway, I was giving you a rough example. Personally, I'm planning to mix and match, I want to give the player the chance to decide what to do whenever possible, and that will involve some mapped inputs (I'm going keyboard/gamepad only), and maybe a timer too (while the NPC waits for a reaction)... by the way, anyone who's played Ace Attorney (or Miles Edgeworth investigations-especially the second-), can tell you the pause when you have to choose a clue doesn't really break the immersion, the tension of having to figure out what's the right answer actually is a good part of the gameplay. But anyways, our aims may be a little different, I'm aiming more for a cinematic effect, like the NPC sitting in his chair sipping at his coffee and looking at you sternly while he waits for your answer (a boring example, but basically a'la wolf among us).
  • GOT IT!

    Turns out you CAN follow the hack described above. After investigating why the dialog options couldn't be clicked, I found there was one GameState.DialogOptions left hiding. 

    It was in MenuDialogList.cs. 

    Replace it with GameState.Normal as Chris suggested and you're good to go!

    Happy to write a detailed tutorial if anyone needs it :)
    Not sure if 
  • Hey, cool! Go right ahead and explain it, please. Besides showing clues, I had several ideas which needed to use menus/inventories live  during conversation, so hearing how to allow them to work would be greatly appreciated!

  • A caveat first! As Chris said: this is not recommended. I guess it could break things down the line. I’m happy to report it’s worked fine for me so far.

    Ok, so you want to make sure Conversations run in the normal game mode. This is done by modifying a few lines of code in AC’s scripts.

    1. Open StateHandler.cs. Search for GameState.DialogOptions and replace with GameState.Normal. There should be x3 of them to replace.
    2. Repeat the step above, but in the script MenuDialogList.cs. Only one of them to replace there.
    3. Open PlayerMenus.cs. Look for the line: 
    if (KickStarter.playerInput.activeConversation != null && KickStarter.stateHandler.gameState == GameState.DialogOptions)” 

    and replace it with: 

    if (KickStarter.playerInput.activeConversation != null && (KickStarter.stateHandler.gameState == GameState.DialogOptions || KickStarter.stateHandler.gameState == GameState.Normal))”

    Now when you run the game, you’ll be able to start a conversation and access your inventory at the same time. However, you will also be able to move your player, click on hotspots and use interactions. This might be distracting/confusing, so:

    1. Go to your Conversation menu. Open (or create) the ActionList when turn on. In this action list, add the action Engine:manage systems and disable Interactions and Movement. 
    2. You might also want to disable hotspots. The way I did it is to create a Hotspot called “all hotspots” and parented all the hotspots to it. Then I can go back in the ActionList mentioned above, and add Hotspots:enable or disable - Disable my “all hotspots”. 
    3. Make sure you re-enable everything in your Conversation Actionlist when turn off.

    Finally, this might be game specific, but I wanted the Inventory to appear automatically during conversations. So: 

    1. Create an exact copy of your standard Inventory menu (or however many inventories you are using). Rename it Inventory Convo or whatever you like.
    2. Set its appear type to During Conversation.
    Pretty neat. But the other inventory is still there when you hover. It might be invisible, but if it has an effect like zoom or pan, you will see it move underneath. No problem, you can simply make sure your Conversation Actionlist when turn on has the action Menu:Change state - Turn Off menu Inventory. However, this didn’t work for me for some reason. So I used Menu:Change state - Hide Menu Element instead, and hid my Inventory Boxes instead. Of course, make sure you re-enable them when you leave the conversation menu.

    Another game-specific thing: I actually duplicate all my items. The first version goes to the normal Inventory. The second version goes to the Inventory Convo clone. I can then make sure that Conversation items don’t have a combine mode. They also trigger a speech line when clicked. Using variables I can create conversation-specific speech lines, and voila!



Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.