Hi,
I couldn't find a solution after hours searching the docs and here, so I hope I can get some help!
I'm currently using the JRPG template with the New Input System and it works fine, but I can't find a way to make both Mouse and gamepad coexist. When I go to make a choice with gamepad, it works fine and I can select from the list using the dpad or the WASD/arrow keys, but as soon as I touch the mouse I'm no longer able to do that and have to use the mouse from there on if I want to choose anything. I can still move and even advance the conversation with any input, but I can't make the responses panel to work again. For reference, I'm using the new Third Person starter asset from Unity. It uses the new input system. https://assetstore.unity.com/packages/e ... ler-196526
The other issue I've been having is that when a vcam is set to a higher priority at the start of a convo, it does a hard cut instead of easing in and out, as per the cinemachine brain settings. It only starts doing easing in and out when I talk to the NPC a second time.
Here's a sample:
See how the camera only moves smoothly when I speak to the NPC a second time.
Also, it doesn't show, but I tried to choose from the list with my gamepad and because I used the mouse to move the camera I couldn't do that.
JRPG template, the New Input System, and a Cinemachine problem
Re: JRPG template, the New Input System, and a Cinemachine problem
Hi,
If Input Device is set to Joystick -- or if the Always Auto Focus checkbox is ticked -- then Dialogue System UIs will focus (aka select/highlight) the first response menu button so you can navigate the menu using the d-pad or arrow keys.
If the Input Device is set to Mouse, then Dialogue System UIs will not focus the first response button, again unless Always Auto Focus is ticked.
One solution is to tick Always Auto Focus. The downside to this, which might not be relevant to your game, is that the first response button will be highlighted even when using a mouse. Some designers don't like this; they feel like it subtly coerces the player into preferring the first response button.
Another solution is to make sure the Input Device Manager is configured to detect when you're using the joystick. This way you can untick Always Auto Focus. Assuming you've registered some joystick inputs with the Input Device Manager as per the New Input System Tutorial, add those inputs to the Joystick Buttons To Check and/or Joystick Axes To Check lists. If the Input Device Manager reads any input from them, it will switch the Input Device Mode back to Joystick.
The Dialogue Manager GameObject has an Input Device Manager component. This component detects whether the player is using a joystick (gamepad) or mouse. The Input Device dropdown shows the current detected device.
If Input Device is set to Joystick -- or if the Always Auto Focus checkbox is ticked -- then Dialogue System UIs will focus (aka select/highlight) the first response menu button so you can navigate the menu using the d-pad or arrow keys.
If the Input Device is set to Mouse, then Dialogue System UIs will not focus the first response button, again unless Always Auto Focus is ticked.
One solution is to tick Always Auto Focus. The downside to this, which might not be relevant to your game, is that the first response button will be highlighted even when using a mouse. Some designers don't like this; they feel like it subtly coerces the player into preferring the first response button.
Another solution is to make sure the Input Device Manager is configured to detect when you're using the joystick. This way you can untick Always Auto Focus. Assuming you've registered some joystick inputs with the Input Device Manager as per the New Input System Tutorial, add those inputs to the Joystick Buttons To Check and/or Joystick Axes To Check lists. If the Input Device Manager reads any input from them, it will switch the Input Device Mode back to Joystick.
How are you setting the vcam/priority? Are you using the latest Cinemachine package?moetan14 wrote: ↑Thu Jun 24, 2021 8:40 pmThe other issue I've been having is that when a vcam is set to a higher priority at the start of a convo, it does a hard cut instead of easing in and out, as per the cinemachine brain settings. It only starts doing easing in and out when I talk to the NPC a second time.
Re: JRPG template, the New Input System, and a Cinemachine problem
Hey, just for a quick update: The cinemachine thing... fixed itself? I have no idea what I did but after messing around more with the project it just kinda stopped happening. I'll let you know if I can reproduce it later on.Tony Li wrote: ↑Thu Jun 24, 2021 9:18 pm Hi,The Dialogue Manager GameObject has an Input Device Manager component. This component detects whether the player is using a joystick (gamepad) or mouse. The Input Device dropdown shows the current detected device.
If Input Device is set to Joystick -- or if the Always Auto Focus checkbox is ticked -- then Dialogue System UIs will focus (aka select/highlight) the first response menu button so you can navigate the menu using the d-pad or arrow keys.
If the Input Device is set to Mouse, then Dialogue System UIs will not focus the first response button, again unless Always Auto Focus is ticked.
One solution is to tick Always Auto Focus. The downside to this, which might not be relevant to your game, is that the first response button will be highlighted even when using a mouse. Some designers don't like this; they feel like it subtly coerces the player into preferring the first response button.
Another solution is to make sure the Input Device Manager is configured to detect when you're using the joystick. This way you can untick Always Auto Focus. Assuming you've registered some joystick inputs with the Input Device Manager as per the New Input System Tutorial, add those inputs to the Joystick Buttons To Check and/or Joystick Axes To Check lists. If the Input Device Manager reads any input from them, it will switch the Input Device Mode back to Joystick.
How are you setting the vcam/priority? Are you using the latest Cinemachine package?moetan14 wrote: ↑Thu Jun 24, 2021 8:40 pmThe other issue I've been having is that when a vcam is set to a higher priority at the start of a convo, it does a hard cut instead of easing in and out, as per the cinemachine brain settings. It only starts doing easing in and out when I talk to the NPC a second time.
I'm yet to test the gamepad stuff, but only because I've been stuck trying to understand how quests work. So far I managed to make it work but the last node won't trigger after the quest is set to "success", and none of the nodes will trigger if I use booleans, only quest entries. Edit: Your suggestion for the input stuff worked just fine, thanks a lot!
This is an example of what I mean. Am I doing anything wrong?
Thanks for the swift response!
Re: JRPG template, the New Input System, and a Cinemachine problem
Hi,
Set the Conditions on "Yo! What did she say?" to:
or:
If a node doesn't have Conditions, it's the same as if the Conditions are true. The NPC will choose the first node whose Conditions are true.
Set the Conditions on "Yo! What did she say?" to:
Code: Select all
CurrentQuestState("Talk to Gyaru") == "unassigned"
Code: Select all
CurrentQuestState("Talk to Gyaru") ~= "success"
Re: JRPG template, the New Input System, and a Cinemachine problem
Thanks a lot for this tip. I'm sure I'll keep having troubles with the quest system (I'm not a very bright person) but for now I think it will be smooth sailing.Tony Li wrote: ↑Fri Jun 25, 2021 8:46 am Hi,
Set the Conditions on "Yo! What did she say?" to:or:Code: Select all
CurrentQuestState("Talk to Gyaru") == "unassigned"
If a node doesn't have Conditions, it's the same as if the Conditions are true. The NPC will choose the first node whose Conditions are true.Code: Select all
CurrentQuestState("Talk to Gyaru") ~= "success"
Thanks again for the help!
Re: JRPG template, the New Input System, and a Cinemachine problem
Glad to help! If any other questions come up, just let me know.