Dev build/Linux: spells at range use do not match classic [RESOLVED]

User avatar
pango
Posts: 3358
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Dev build/Linux: spells at range use do not match classic [RESOLVED]

Post by pango »

- in Daggerfall classic, to cast a spell at range (say, a fireball), you select the spell in your spellbook, then aim at enemy(ies) and release the spell. If you recast, you have to aim then release again.
- in Daggerfall Unity, if you select a spell at range in your spellbook, it's immediately released; So you have to aim before selecting the spell. Recasting however works just like in classic.

Was it done to help people that could be confused by the need to release spells at range separately from their selection in the spellbook, or is it just a bug?
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
Interkarma
Posts: 7247
Joined: Sun Mar 22, 2015 1:51 am

Re: Dev build/Linux: spells at range use do not match classic

Post by Interkarma »

I matched this behaviour to classic when I built casting. Might have been broken recently with enemy casting being added.

User avatar
Interkarma
Posts: 7247
Joined: Sun Mar 22, 2015 1:51 am

Re: Dev build/Linux: spells at range use do not match classic

Post by Interkarma »

I just tested live code. Target-at-range, area-at-range, area around caster, and touch spells spells are still correctly prompting for button press after being selected from spellbook. Only self-cast releases instantly.

Perhaps you could provide a save in this case and let me know which spell is the problem one. There's likely something less obvious going on.

User avatar
pango
Posts: 3358
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: Dev build/Linux: spells at range use do not match classic

Post by pango »

Mmmh after more testing, it's probably more subtle than I thought.
If I select the spell in the spellbook but validate my choice using the keyboard, then I can aim before releasing the spell everytime.
Using double-click however, the spell is immediately released most of the time. In fact I haven't found a way to control the spells reliably. It could be platform/hardware/settings dependant though.
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
Interkarma
Posts: 7247
Joined: Sun Mar 22, 2015 1:51 am

Re: Dev build/Linux: spells at range use do not match classic

Post by Interkarma »

Interesting. I'm only using double-clicks here and don't experience the issue. Sounds like an extra click is getting into input somehow.

Interested if anyone else experiencing this also.

R.D.
Posts: 379
Joined: Fri Oct 07, 2016 10:41 am

Re: Dev build/Linux: spells at range use do not match classic

Post by R.D. »

I'm getting the same thing as pango, double-click shoots immediately, keyboard allows aiming first.

Even being very careful to only click the minimum necessary to select the spell, it still happens. Running from the editor, BTW.

R.D.
Posts: 379
Joined: Fri Oct 07, 2016 10:41 am

Re: Dev build/Linux: spells at range use do not match classic

Post by R.D. »

This part in EntityEffectManager is triggering:

Code: Select all

                // Cast spell
                if (InputManager.Instance.ActionStarted(InputManager.Actions.ActivateCenterObject) && readySpell != null)
                {
                    CastReadySpell();
                    return;
                }
even though ActivateCenterObject doesn't seem to actually happen. For example, cast while standing in front of an NPC, and it won't behave as if you clicked the NPC.

User avatar
Interkarma
Posts: 7247
Joined: Sun Mar 22, 2015 1:51 am

Re: Dev build/Linux: spells at range use do not match classic

Post by Interkarma »

ActivateCentreObject is just the event for "pressed left mouse button" - or whatever you have this bound to. It's fine for this to fire, it's just responding to input state. The problem is that the input system seems to be having some click-through issues here, nothing to do with magic system.

Allofich, which platform are you on?

R.D.
Posts: 379
Joined: Fri Oct 07, 2016 10:41 am

Re: Dev build/Linux: spells at range use do not match classic

Post by R.D. »

Windows 7 x64
Unity 2018.2.11f1 Personal
Latest GitHub master
Running from editor

User avatar
Interkarma
Posts: 7247
Joined: Sun Mar 22, 2015 1:51 am

Re: Dev build/Linux: spells at range use do not match classic

Post by Interkarma »

Thank you. This actually sounds like a UI > Input System click-through bug I fixed a number of years ago. Code might have been removed at some point without me catching it. I'll take a look when I can.

Locked