Timeslip Softworks Forums

Vigilantes => Resolved Bugs => : Nomad June 25, 2017, 03:47:10 AM

: [Resolved] Can't move or shoot in opening sequence
: Nomad June 25, 2017, 03:47:10 AM
Darn it... sorry... broke it straight away.  =(

I started. I've been fighting and moving around. The female enemy healed (but has been hit again since).

I can't move. It's not even drawing the movement lines.
I can't shoot. It's not even giving me target information.
I can't punch. It's still not giving me target info.

It let me reload... but... the AP indicator is showing the 4 yellow squares that would be reserved for the shot I wanted to take.
The correct enemy portrait flashes when I put my cursor over them. I do not get target info.

It did let me end the turn, but then I was in the same position as above. Can't move or attack.
Then I discovered that I can't heal either (which makes sense as I can't act).

(https://scontent.fadl1-1.fna.fbcdn.net/v/t1.0-9/19420609_1738211052875515_385310369496917112_n.jpg?oh=277be7ea5bca16190a5a34d705153efc&oe=59C594BF)
Above image shows that it's not drawing the path line for movement.
Note: The AP indicator is still showing the 4 AP reserved for the shot I was going to take with the gun.

(https://scontent.fadl1-1.fna.fbcdn.net/v/t1.0-9/19429770_1738211276208826_550184119848651563_n.jpg?oh=9da053724f78ffd8839877a304d22d79&oe=59E721A3)
Above image shows no target information. Correct enemy portraits flash when the cursor is over them.

(https://scontent.fadl1-1.fna.fbcdn.net/v/t1.0-9/19260569_1738211452875475_3865832459568000812_n.jpg?oh=123c26c6ceaf6d4ac982ee8ff6a89848&oe=59D581F4)
Above image shows that I managed to get some target information... unfortunately it's for my own character. Correct enemy portrait was flashing while it gave me Sam's targeting information.


Ok.... so I can switch gear. I can access my inventory.
Ahh... it reduces my movement range, but my AP hasn't changed.
(https://scontent.fadl1-1.fna.fbcdn.net/v/t1.0-9/19396888_1738215066208447_1275628375768901148_n.jpg?oh=82957ebcb6afe675e12f24d84f0c5de0&oe=59D2EBE1)
Above image shows my movement radius decreased (from swapping items in and out of my bag), but the AP indicator at the bottom is still showing full AP. Note that this screenshot was after I ended my turn, which is why the woman moved and the guy smacked me for minor damage. The enemy is not affected.
: Re: Can't move or shoot in opening sequence
: Nomad June 25, 2017, 03:57:25 AM
I ended turn again. I figured I'd let them bash me and see what happened when I died. They both missed their attacks.
Now... I have their targeting information... but I still can't move or shoot.

(https://scontent.fadl1-1.fna.fbcdn.net/v/t1.0-9/19429959_1738221646207789_5949293842140571318_n.jpg?oh=e660929c3a306055db510b5a624935cd&oe=59E2FA78)


Interesting... The correct AP is being shown in my inventory screen (top-right of Sam's portrait). See below:
(https://scontent.fadl1-1.fna.fbcdn.net/v/t1.0-9/19399165_1738223866207567_7222147306655402619_n.jpg?oh=88fa701d10b72626ba0cc21037926455&oe=59C865D2)
Correct AP showing in inventory above, but in the game screen it's still showing all eight AP as green.

I switched back to a gun and the targeting information was no longer being shown again. Movement and pathing is still not available.

Ended turn again. I get target info if I switch to fists. None when I have gun.
I still can't punch them though. And I can't switch punch modes (assuming there are any other punch modes in the first scenario).

Buttons work.
Left or Right-clicking on the portraits works (brings the camera focus back).
End Turn works.
Reload works.
Changing incapacitate to kill works.
Entering inventory or character screen works.

Clicked the top-right surrender/flee button and nothing happened. I assume that there isn't a flee zone for the opening scenario, so that makes sense.
: Re: Can't move or shoot in opening sequence
: Nomad June 25, 2017, 04:15:52 AM
I let them beat me senseless and it let me reload.

Problem with the reload is that it gave me all my skill points and stat points back but didn't give me a chance to spend them.
Skills can't be added during the fight. It did let me increase my stats.
This could be fixed by a quick auto-save after character creation (as the mission starts).

Ok... it let me run through the scenario this time... HOWEVER... when I finished and was back at base... I no longer have my starting skill points available to spend (so I missed out). All my skills are at 24 except Firearms, which is at 26 due to the fight.
: Re: Can't move or shoot in opening sequence
: ushas June 26, 2017, 03:26:40 AM
Yeah, that's known issue, it lets you restart scenario but forgets the character created. Better start over at that point? My feeling is, though, that once Daithi implements skill points allocation possible for allies, this may as well be ok as will be able to reassign the points... 
: Re: Can't move or shoot in opening sequence
: Daithi June 26, 2017, 10:45:19 AM
I added code to lock the input, so mouseover wouldn't break animations when strafing, but it seems that it's not being unlocked again in some situations. Managed to get through quite a few hours of testing without this happening, but this is a priority bug. Need to figure out what these are and it should be good. Allowing skill point allocation would be a good way to deal with this loading issue, but there's still the issue with the lack of saving before meeting an ally that needs to be tackled.

: Re: [Fix Req] Can't move or shoot in opening sequence
: Nomad June 26, 2017, 11:33:26 AM
Is it an issue to do a save just before a mission starts?
I assume there's a problem with that, otherwise you'd have done it already.
: Re: [Fix Req] Can't move or shoot in opening sequence
: Daithi June 26, 2017, 11:53:42 AM
If it's a regular save, it would start from home UI, which would require more code for launching first mission. For the allies missions, I think the lack of saving was an quick way around duplicating them. Pretty sure there are workable solutions for both.
: Re: [Fix Req] Can't move or shoot in opening sequence
: ushas June 28, 2017, 07:14:09 AM
You don't need autosaving the first mission. Chances are, if the player failed, he may want to try something different? So offering to kick back to the character creation or simply to the main menu might be even favorable.
: Re: [Fix Req] Can't move or shoot in opening sequence
: Daithi June 28, 2017, 12:19:41 PM
Yeah, makes sense. I'm all for cutting a gordian knot :)
: Re: [Fix Req] Can't move or shoot in opening sequence
: Daithi June 28, 2017, 01:50:32 PM
I've added keycodes to enable input as a temporary measure until the causes are understood. If you experience this problem, it would be a big help if you could note what actions you took, when the input became locked, and whether the last active character was player or criminal, and which button worked to enable input.

Y: Enables input - best to do this first
U: Removes input lock - next step
: Re: [Fix Req] Can't move or shoot in opening sequence
: Daithi June 28, 2017, 02:45:12 PM
Following on: found one condition where input was not being re-enabled, when firing a shot against a specific body part. This is fixed, but given the number of possible outcomes from the input system, it's possible that there are more instances.

@Nomad: Do you remember if you were making targetted shots when this happened?
: Re: [Confirm Fix] Can't move or shoot in opening sequence
: Nomad June 29, 2017, 02:50:52 AM
I do remember. I wasn't making a targeted shot (I've forgotten the key to use).
: Re: [Confirm Fix] Can't move or shoot in opening sequence
: Daithi June 29, 2017, 01:31:37 PM
Thanks! There are other factors then, hopefully they will become apparent soon.

It's Left-Shift - really need to work on keyboard support.
: Re: [Confirm Fix] Can't move or shoot in opening sequence
: Nomad June 29, 2017, 03:20:11 PM
heh heh... I was trying things like the T key.
Isn't it in the options screen? If it can be rebound, then I could have just gone there and looked it up.  =P
: Re: [Confirm Fix] Can't move or shoot in opening sequence
: ushas June 30, 2017, 09:06:49 AM
Lazy Nomad! (yes you can)

What if it can't make the CTH estimate? Will a tooltip show?
What if it locks at the shot but then throws an exception? Will it unlock after?
: Re: [Confirm Fix] Can't move or shoot in opening sequence
: Daithi June 30, 2017, 09:40:14 AM
@ Nomad - I don't think it is - I've been holding off to do all the keyboard support in one go.

@ Ushas - for targetting body parts? If so, it may unlock after you end turn. It's fixed in V18 (but that won't see the light of day for another few weeks)
: Re: [Confirm Fix] Can't move or shoot in opening sequence
: Nomad June 30, 2017, 10:38:57 AM
Yeah, it's totally in the Options settings for Keybinding.
I've now set it to T.   =)
: Re: [Confirm Fix] Can't move or shoot in opening sequence
: ushas June 30, 2017, 10:40:07 AM
I dunno, what is then "Target Body Part" key binding? edit: ninjaed :)

No targeting, you wanted to make those other factors apparent. So recreated according to Nomad's helpful visual story. Was sloppy:( Only managed to copy those errors. Sorry!

Guys lined up exactly as in the first image. On the mouseover with a gun - no target info. In the log for both:
:
BattleControlScript.CalculateShotDifficultyFromDistance. This shot(1) is inside effective range(8). Final difficulty from distance: 11
BattleControlScript.GetShotDifficultyFromDirectionalCover. This character is strafing to fire from tile
ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
  at System.Collections.Generic.List`1[TileScript].get_Item (Int32 index) [0x00000] in <filename unknown>:0
  at BattleControlScript.CalculateShotDifficulty (.CharacterMainScript attackerScriptIn, .CharacterMainScript defenderScriptIn, Int32 tileDistanceIn) [0x00000] in <filename unknown>:0
  at BattleControlScript.GetRangedChanceToHit (.CharacterMainScript attackerScriptIn, Vector2 attackerTilePos, .CharacterMainScript defenderScriptIn, Int32 distanceModifierIn, Int32 thisAttackUseModePosIn, Single bodyPartCTHMultiplierIn, Boolean clampCTHIn) [0x00000] in <filename unknown>:0
  at BattleControlScript.DetermineMouseOverAction (Boolean isAnimationTrigger, Boolean drawPathIn, Boolean shotgunFireModeUpdateCoverAndCharInfoIn) [0x00000] in <filename unknown>:0
  at BattleControlScript.ReportLeftClick () [0x00000] in <filename unknown>:0
  at MouseTrackerScript.Update () [0x00000] in <filename unknown>:0
(Filename:  Line: -1)
BattleControlScript.GetTilePhysicalPosition. Method called. Requested tile: (6.0, 15.0)
BattleControlScript.CalculateShotDifficultyFromDistance. This shot(2) is inside effective range(8). Final difficulty from distance: 22
BattleControlScript.GetShotDifficultyFromDirectionalCover. This character is strafing to fire from tile
ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
  at System.Collections.Generic.List`1[TileScript].get_Item (Int32 index) [0x00000] in <filename unknown>:0
  at BattleControlScript.CalculateShotDifficulty (.CharacterMainScript attackerScriptIn, .CharacterMainScript defenderScriptIn, Int32 tileDistanceIn) [0x00000] in <filename unknown>:0
  at BattleControlScript.GetRangedChanceToHit (.CharacterMainScript attackerScriptIn, Vector2 attackerTilePos, .CharacterMainScript defenderScriptIn, Int32 distanceModifierIn, Int32 thisAttackUseModePosIn, Single bodyPartCTHMultiplierIn, Boolean clampCTHIn) [0x00000] in <filename unknown>:0
  at BattleControlScript.DetermineMouseOverAction (Boolean isAnimationTrigger, Boolean drawPathIn, Boolean shotgunFireModeUpdateCoverAndCharInfoIn) [0x00000] in <filename unknown>:0
  at BattleControlScript.ReportPlayerInput (Vector2 mouseGridPositionIn, Boolean isRightClickIn, Boolean isAnimationTrigger, Boolean drawPathIn, Boolean shotgunFireModeUpdateCoverAndCharInfoIn) [0x00000] in <filename unknown>:0
  at MouseTrackerScript.Update () [0x00000] in <filename unknown>:0

Why strafing there?


Then you right-click to shoot, another exception:
:
BattleControlScript.DisablePlayerInput. Method called
BattleControlScript.DetermineRightClickAction. LOCKING INPUT. Setting up ranged attack. Strafe required. Use mode position is: 0
ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
  at System.Collections.Generic.List`1[TileScript].get_Item (Int32 index) [0x00000] in <filename unknown>:0
  at BattleControlScript.DetermineRightClickAction (Vector2 selectedTileGridPositionIn) [0x00000] in <filename unknown>:0
  at BattleControlScript.ReportPlayerInput (Vector2 mouseGridPositionIn, Boolean isRightClickIn, Boolean isAnimationTrigger, Boolean drawPathIn, Boolean shotgunFireModeUpdateCoverAndCharInfoIn) [0x00000] in <filename unknown>:0
  at MouseTrackerScript.Update () [0x00000] in <filename unknown>:0

Changing to HtH then gives target information but can't attack or move for the rest, that's the locked state right?
: Re: [Confirm Fix] Can't move or shoot in opening sequence
: ushas July 10, 2017, 06:47:30 PM
On locked input:
Ok, so yeah, it's the second error itself that locks the input down or so.

First there is this error when it tries to get targeting CTH, wrongly thinking it should strafe -> we don't see a tooltip (see the first image in the OP). But as said before, the input isn't disabled at that stage. Sam can do other things like HtH attack. He can move and it will update targeting info correctly, and then there is no problem when shooting at previously bugged enemies. So the first error isn't cause of the locked input.

But if I will try to shoot (right-click) at the moment when the targeting info is still bugged (ie. no tooltip), it will disable player's input, then throw an exception, not enabling the input afterwards for the rest of the battle*. This second exception happening at the right-click, see the 2nd log error above, is the consequence of the first targeting error state.

Ad (*): In the log from the point of the bugged shot, there is no line with "BattleControlScript.EnablePlayerInput" happening anymore.


On strafing error:
Now back to the first exception - why the game tries to get ranged CTH via strafing when Sam clearly sees his targets?

Attached are images of two more situations and the log excerpts from 3 for the last couple of turns:
Sam -> brother -> sister -> Sam (when the error happens)

I'm not much wiser from that, but maybe it will help you.

Was able to recreate several times though, so at least can try categorize stuff. But take it with a grain of salt.

Certain: Sam has to be at the corner and points at either of enemies with pistol equipped.

Less-certain:
-- was able to recreate this at the full-cover corners of the car.
-- brother and sister are standing next to each other, at least one of them is adjacent to Sam.
-- they are usually in Sam's LOS.
-- the error occurs right at the Sam's turn start -> the source is perhaps in one of the previous turns (eg. the sister's?)

Phantoms:
-- usually after brother was wounded in one of the previous turns
-- both enemies moved in the last turn, pathfinding around each other
-- one of them attacks Sam, or tries to or so
-- tried to click or point the mouse on various places during the sister's turn (but seen no input enabled during their turn)
: Re: [Confirm Fix] Can't move or shoot in opening sequence
: Daithi July 11, 2017, 11:42:41 AM
This is very useful info - have 3 smallish things to do with this update, then will have a second pass on bugs - should be able to root these out - will keep you posted.
: Re: [Confirm Fix] Can't move or shoot in opening sequence
: ushas July 12, 2017, 12:23:52 PM
Thanks and good luck.

I will try to do some more bug reporting for the next few days when having time. There is at least one more complex issue.
: Re: [Confirm Fix] Can't move or shoot in opening sequence
: Daithi July 13, 2017, 09:50:21 AM
Cheers! Yeah, I think there are some issues surrounding fire also... down to last addition now. Have modified the way the combat queue works, it's simpler but more functional now (you can see who will act in next turn), so hopefully this might short circuit those errors.
: Re: [Confirm Fix] Can't move or shoot in opening sequence
: ushas July 13, 2017, 05:08:10 PM
I see. It's always a good sign if something is possible to simplify. Those queue issues are fairly reproducible. At least for me, if it depends on how one plays. Can also re-check with v18 if you're unsure. 

Btw. I meant that there are things yet to be reported. Alas trapped the butterfly fairly easily during the yesterday's night testing. Maybe it won't be so hard to fix, after all.
: Re: [Confirm Fix] Can't move or shoot in opening sequence
: Daithi July 17, 2017, 10:00:10 AM
Good team effort - this is now fixed. Whether it's the last of the triggers for breaking input, remains to be seen. Will close this one off.