Author Topic: [Resolved] Jammed in strafe  (Read 12753 times)

ushas

  • Hero Member
  • *****
  • Posts: 661
[Resolved] Jammed in strafe
« on: September 14, 2017, 05:34:22 PM »
(v19, linux)

Problem: During normal turn, when an ally is strafing to fire around corner, jamming right at the point of the fire can lead to character stopping at adjacent tile and not returning back. It doesn't freeze the battle but further issues possible.

Notes:
Emilia got her rifle jammed in the middle of strafing and stays on the spot (see the first attachment). I thought the game is frozen, but I could end the turn afterwards and continue the battle.

Problem is that the game thinks that she is at the original tile while visually she isn't (see the second attachment - at the beginning of the next turn). Although the first turn didn't produce any error in the log, from the next one on, there are some exceptions occurring.

Jamming at strafing on the first turn:
Code: [Select]
BattleControlScript.GetShotDifficultyFromDirectionalCover. This character is strafing to fire from tile. selected cover move position: 0
BCS.CalculateShotDifficulty. Shot difficulty is: 137 base shot difficulty: 60 shot difficulty from distance: 55 shot difficulty from crouching target: 0 shot difficulty from smoke: 0 shot difficulty from directional cover: 0 defense from evasion: 18 defense from armour: 4
BattleControlScript.CalculateShotScore. Character gets accuracy bonus from cover
BattleControlScript.GetRangedCTH. Method called. This weapon's minimum range is: 4
BattleControlScript.GetRangedChanceToHit. Method called. This weapon's minimum range is: 4 this shot distance: 5
CharacterMainScript.CheckIfCrowded. Is using rifle
CharacterMainScript.CheckIfCrowded. No adjacent enemy
BattleControlScript.GetRangedChanceToHit. Nocturnal daytime CTH penalty
BCS.GetRangedChanceToHit. Shot difficulty is: 137 / shot score is: 136.4 chance to hit is: 95 use mode: 0
CharInfoPanel.PopulateCharacterInfoPanel. number of status effects: 1
CharacterInfoPanelScript.ActivateCharacterInfoPanel. Method called.
BattleControlScript.CheckIfClearLOS. No LOS between current tile and target current tile. Checking for LOS to 0 full cover adj move tiles
BattleControlScript.CheckForFullCoverFiringSolution. Character does not have LOS, but has: 1 full cover adjacent movement opportunities. Target has: 0 move tiles.
BattleControlScript.CheckForFullCoverFiringSolution. Found LOS from attacker move tile: (5.0, 28.0) to target current tile: (10.0, 26.0)
CharacterMainScript.SetFullCoverTilePosition. Method called. Position is: 0
BattleControlScript.CalculateShotDifficulty. Method called. Distance is: 5
BattleControlScript.GetShotDifficultyFromDirectionalCover. This character is strafing to fire from tile. selected cover move position: 0
BCS.CalculateShotDifficulty. Shot difficulty is: 137 base shot difficulty: 60 shot difficulty from distance: 55 shot difficulty from crouching target: 0 shot difficulty from smoke: 0 shot difficulty from directional cover: 0 defense from evasion: 18 defense from armour: 4
BattleControlScript.CalculateShotScore. Character gets accuracy bonus from cover
BattleControlScript.GetRangedCTH. Method called. This weapon's minimum range is: 4
BattleControlScript.GetRangedChanceToHit. Method called. This weapon's minimum range is: 4 this shot distance: 5
CharacterMainScript.CheckIfCrowded. Is using rifle
CharacterMainScript.CheckIfCrowded. No adjacent enemy
BattleControlScript.GetRangedChanceToHit. Nocturnal daytime CTH penalty
BCS.GetRangedChanceToHit. Shot difficulty is: 137 / shot score is: 136.4 chance to hit is: 95 use mode: 0
CharInfoPanel.PopulateCharacterInfoPanel. number of status effects: 1
CharacterInfoPanelScript.ActivateCharacterInfoPanel. Method called.
MouseTrackerScript.Update. Right Click. Tile is: (10.0, 26.0)
BattleControlScript.DetermineRightClickAction. Second click on same tile
BattleControlScript.DetermineRightClickAction. CHARACTER HAS A FIREARMS
CharMainScript.CheckIfEnoughAP. Ap required:6 / current AP: 8
BattleControlScript.DetermineRightClickAction. SHIFT NOT BEING HELD DOWN
BattleControlScript.DisablePlayerInput. Method called
BattleControlScript.LockUserInput. Method called.
BattleControlScript.DetermineRightClickAction. LOCKING INPUT. Setting up ranged attack. Strafe required. Use mode position is: 0
CharacterMovementScript.SetupStrafe. Method called. is strafing to origin: False is overwatch strafe: False
CharacterMovementScript.DetermineStrafeAnimationDirection. From position: (5.0, 29.0, 0.0) to position: (5.0, 28.0, 0.0) strafe direction X: 0 strafe direction y: -1
CharacterMovementScript.StartStrafe. Should character strafe right: False
CharacterMainScript.SetupRangedAttack. Method called. Selected weapon name is: Normandy use mode pos: 0 body part damage modifier1 status effect: -1 is overwatch: False
CharacterMainScript.CheckIfWeaponJams. This weapon can jam. Condition is: 0.4900005 Jam %: 0
CharacterMainScript.CheckIfWeaponJams. This weapon can jam. Condition is: 0.4900005 Jam %: 26.49993
CharacterMainScript.CheckIfAttackCritical. Success! Roll chance: 26.49993 Random number (must be lower): 5
CharacterMainScript.CheckIfWeaponJams. Weapon jams: True condition: 0.4900005
CharacterVoiceScript.PlayVoiceClip. Method called. Clip type: 0 Char has voice clips: True
BattleControlScript.EnablePlayerInput. Time is: 556.3975 time until user input enabled: 522.5174

Trying to strafe to fire while Emilia is somewhere else than the game thinks on the second turn:
Code: [Select]
CharacterMainScript.StartRangedSingleTargetAttack. Should setup strafe.
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 CharacterMainScript+<StartRangedSingleTargetAttack>c__Iterator3A.MoveNext () [0x00000] in <filename unknown>:0

And so on, next turns will be problematic too. For the rest of the battle she changed to Patriot and technically could fire twice snap in a turn. But I could fire only the first time and the second shot will be bugged. For example, targeting both guys in the picture on the second turn: She shoots the guy on the right as if through the corner. However, when I tried to target the left one - she won't do it and you loose any tooltips info (similar like in Nomad's input issue, back then with siblings).

Pre-edit:  couldn't attach attachments, some error about upload path. Will add later.
« Last Edit: September 18, 2017, 07:31:56 PM by Daithi »

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1250
Re: Jammed in strafe
« Reply #1 on: September 14, 2017, 08:24:47 PM »
Good catch, will look at this. Guess need to pre-check if jams before starting, or just prevent jamming in strafes (gasp!).

Think some server migration happened over last few days, may be cause.

Oh, and welcome back :)

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1250
Re: Jammed in strafe
« Reply #2 on: September 14, 2017, 08:31:00 PM »
Whoops I seem to have nuked a comment of yours after splitting it. Reminder to check weapon breakage issues in overwatch too.

ushas

  • Hero Member
  • *****
  • Posts: 661
Re: Jammed in strafe
« Reply #3 on: September 14, 2017, 09:22:15 PM »
Such a simple feature, yet so treacherous, isn't it?
If I think of that wanted to make an enquiry about encumbrance...

or just prevent jamming in strafes (gasp!).
Cheese alert!

Oh, and welcome back :)
Thanks:)

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1250
Re: Jammed in strafe
« Reply #4 on: September 14, 2017, 09:42:04 PM »
Such a simple feature, yet so treacherous, isn't it?
If I think of that wanted to make an enquiry about encumbrance...

Yep, even small things increase the number of outcomes. Encumbrance is likely, it just hasn't climbed as high on the priority list as its many siblings.

Cheese alert!

Note to self: be especially vague on how this issue is resolved.

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1250
Re: Jammed in strafe
« Reply #5 on: September 18, 2017, 07:31:44 PM »
Fixed this, also added code to handle melee weapons.

ushas

  • Hero Member
  • *****
  • Posts: 661
Re: [Resolved] Jammed in strafe
« Reply #6 on: September 18, 2017, 08:30:35 PM »
Note to self: ask how this issue was resolved.:)

Was trying to wear down CC weapons lately - better not test OW/breaking in v19 anymore?
« Last Edit: September 18, 2017, 08:33:23 PM by ushas »

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1250
Re: [Resolved] Jammed in strafe
« Reply #7 on: September 18, 2017, 08:34:57 PM »
Oh I fixed it by *data transmission error*, figured you'd like to know.

Yeah, best to leave it till 20, very interested in ally KO issue though

ushas

  • Hero Member
  • *****
  • Posts: 661
Re: [Resolved] Jammed in strafe
« Reply #8 on: September 18, 2017, 08:57:32 PM »
Ok. I will try a few more missions, sacrificing allies. Wasn't testing much lately, unsure how close to v20 you are.

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1250
Re: [Resolved] Jammed in strafe
« Reply #9 on: September 18, 2017, 09:03:06 PM »
Very close. Probably late tomorrow or the next day. Testing overwatch now - would be good if there's nothing game breaking in 20, as having to rebuild and re-upload is going to eat up time.