Author Topic: [Resolved] Releasing holded item after alt+tabbing  (Read 17495 times)

ushas

  • Hero Member
  • *****
  • Posts: 661
[Resolved] Releasing holded item after alt+tabbing
« on: March 01, 2018, 02:29:10 PM »
(v24, linux, fullscrean)

If you click an item and still hold it while alt+tab out, when return back and release anywhere on the screen the item image will stay at that place. It's justa graphical glitch.


Hm, could be wrong but think haven't had this one several versions back. Possibly os specific.
« Last Edit: May 17, 2018, 07:00:20 PM by ushas »

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1250
Re: Releasing holded item after alt+tabbing
« Reply #1 on: March 01, 2018, 03:47:16 PM »
I dunno whether to laugh or cry :)

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1250
Re: Releasing holded item after alt+tabbing
« Reply #2 on: March 01, 2018, 04:07:50 PM »
Does pressing the inventory button sort them again?

Will try changing a build setting for fixing this in V25. If that doesn't work (it probably won't) will look at finding a way to capture the ALT-TAB keypress and see if can end the drag event. Not sure if this will work, but there are a couple of options.

ushas

  • Hero Member
  • *****
  • Posts: 661
Re: Releasing holded item after alt+tabbing
« Reply #3 on: March 01, 2018, 05:39:53 PM »
Mmnt, will check it out...
For sure it got sorted when doing save and reload, that's why called a glitch.

Edit:
Quote from: Daithi
Does pressing the inventory button sort them again?
So... no. Furthermore, it stays on the same place on screen when you switch between things like inventory, facilities etc. It doesn't prevail on citiscape (which is to be expected as it's separate) but it will be there again when switching from citiscape back. Can't interact with it at all. Windowed won't change anything. Oh, well.

Edit 2: Checked some older versions. And it's there. A bad, a bad tester me.

Ok it's a bit unfortunate. On the other hand, we can make bulletproof smileys in game, yay! (I swear this sounded less silly in head).
« Last Edit: March 01, 2018, 08:14:04 PM by ushas »

ushas

  • Hero Member
  • *****
  • Posts: 661
Re: Releasing holded item after alt+tabbing
« Reply #4 on: March 10, 2018, 06:56:05 PM »
Also tested in a battle. And have read "cancel out of a screen when taking something like multiple pieces of ammo" report by Necroscourge on steam. Wonder if related so tried to reproduce that too.

In a battle, in addition to alt+tab there are other combinations with 'Esc' or keys for inventory or char. sheet (will specify which when).


Encountered issues so far:
1) Alt+tabbing from inventory while holding an item it behaves the same as at home as described above.

2) Escaping to the battlescape (Esc or inv. key) while holding an item and releasing the hold on the battlescape -> then when you come back to inventory the item image might end up released anywhere. Again similar outcome as above.

3) While holding an item pressing any screen changing keys (Esc, char. sheet or inv. keys) and returning back to inventory while still holding (via pressing the inv. key again) and now the hold is released -> Then at first looks it goes to the right place but you may found its image 2x, while it doesn't change the number of items in inventory (though doesn't seem like real item duplication and disappearance).

4) If you were in the process of transferring multiple items and in the moment the "Transfer Items" dialog is on screen and you escape to the battlescape (by Esc or inv. keys) -> then after coming back this dialog is still on screen (and on char. screen too) but its' unusable anymore. The whole inventory (as well as char. sheet) become unresponsive. To be more precise all buttons unresponsive, shortcuts work. Alt+Tabing nor going to char. sheet and back will cause this issue, seems only with escape to the battlescape. However, when you switch to char. sheet the dialog still stays on screen albeit functional. Perhaps always cancel the dialog upon pressing any screen changing key?

Once happened seems (1), (2) and (4) will remain for the whole team for the rest of the battle, out of that (4) leads to inventory unusable. The outcome (3) is much less problematic, it corrects itself once you refresh the inventory screen, but guess it's a bug nevertheless.

Edit: Corrections.
« Last Edit: March 10, 2018, 11:11:15 PM by ushas »

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1250
Re: Releasing holded item after alt+tabbing
« Reply #5 on: March 15, 2018, 03:05:10 PM »
Hey Ushas - working through these now. Have fixed 1+2. Took your suggestion for 4, seemed best way to fix. Moving the character screen also cancels the transfer dialogue. Just fixed 3 now, and there's a cancel button for transferring stacks.

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1250
Re: [Resolved] Releasing holded item after alt+tabbing
« Reply #6 on: March 15, 2018, 03:21:23 PM »
Did you encounter the second bug necro scourge mentioned: Haven't seen it happening, but will try to make it happen now.

2. The AK47 has a double tap fire mode, and it selectively works. Twice now I have told the user to fire in this mode and it switched to a different mode! It's bad enough the AP costs to fire it are so high, but the fact the fire mode does not work correctly really hurts.

ushas

  • Hero Member
  • *****
  • Posts: 661
Re: [Resolved] Releasing holded item after alt+tabbing
« Reply #7 on: March 15, 2018, 09:27:53 PM »
Hey Daithi. Hmm, don't recall anything like that. If he/she is a newcomer it did took me a bit getting used to how left/right buttons work. On the other hand, when you're in such situation then you're also more aware when a real issue happens...

Can try stressing switching modes. It occurs to me, haven't really tested changing it via clicking on the mode name... Though think impression were that it's robust. Dunno.

As for changing modes in overall, could be mistaken but haven't it became harder to do in the past few versions? Seems with a key it works but not always with the left-click. On many occasions couldn't change mode via mouse unless was specifically left-clicking on a unit (eg. on target or anyone else). Other times can do it no matter where pointing. But that's probably unrelated.

Edit: One more thing - how many APs it subtracted, 5/6 or 8? 
« Last Edit: March 15, 2018, 09:44:39 PM by ushas »

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1250
Re: [Resolved] Releasing holded item after alt+tabbing
« Reply #8 on: March 16, 2018, 10:50:21 AM »
I've been testing it, but haven't seen it happening. Like you, had the feeling it works as intended. Based on post, it seems to take 8 and fire a single shot. Another possibility is if on an older system, a drop in frame rate might make it harder to see the bullet being fired.

ushas

  • Hero Member
  • *****
  • Posts: 661
Re: [Resolved] Releasing holded item after alt+tabbing
« Reply #9 on: March 16, 2018, 02:38:18 PM »
Was thinking of possibility that it was burst too. Apart a drop in frame rate can it happen that the game won't play firing a shot?

For example, when getting one miss and one hit, and if you see only one bullet to fly and connect - then psychologically you might not automatically realize that this one "Miss" said above the character's head was referring to the second not-rendered/unseen bullet...

Will describe one suspicious situation happened to me while testing this but haven't recreated since. However, it wasn't many tries, not much free time these days:/ So I urge not to believe me. I don't.


Emilia starts the turn with 9AP, takes one step to the place she is now and then fires in burst mode at lady Urbana. You can see it took 8AP, as there is none left, but I've seen only one bullet fly. That one was a hit. (log added further below, it also says mode=2 etc)

There is something strange with adjacent units going on. It may not be the problem here, but let me describe anyway: If you have a gun and there is an adjacent enemy or more it seems the game somehow forces that your unit has to constantly aim at one of those adjacent enemies (esp. if he has a bat?), no matter at whom else you're pointing the mouse currently. Wondering if this is intended behaviour.

What think have seen was that Elena aims all the time at Bianca. And after clicking on Urbana, Elena swiftly turns around, makes a shot and then immediately turns back to aim at Bianca again. Possible I've been clicking around at the time if things can somehow combine. 

The log says:
Code: [Select]
CharMainScript.CheckIfEnoughAP. Ap required:8 / current AP: 8
BattleControlScript.DetermineRightClickAction. SHIFT NOT BEING HELD DOWN
BattleControlScript.DisablePlayerInput. Method called
BattleControlScript.DetermineRightClickAction. Setting up ranged attack. No strafe. Use mode position is: 2
CharacterMainScript.SetupRangedAttack. Method called. Selected weapon name is: Raskol 148 use mode pos: 2 body part damage modifier1 status effect: -1 is overwatch: False
Item.CheckIfEnoughAmmoForAttack. Use mode: 2 has enough ammo
CharacterMainScript.CheckIfWeaponJams. This weapon can jam. Condition is: 1 Jam %: 0
CharacterMainScript.CheckIfWeaponJams. Weapon jams: False condition: 1
CharMainScript.SetupRangedAttack. Weapon has not jammed.
Item.ApplyDeteriorationFromUse. Method called. Item condition %: 1.057778
BattleControlScript.CheckForAdjacentEnemies. Criminal found at: (10.0, 2.0)
CharacterMainScript.SetupRangedAttack. Method called. Chance to hit: 20 body part modified CTH: 1
BattleControlScript.ReturnCriticalHitsList. Crit: 5.6 target penalty: 0
CharacterMainScript.StartRangedAttack. Method called. Is overwatch attack: False
BattleControlScript.NotifyEnemyTheyAreUnderAttack. Method called.
CameraControlScript.CheckIfRangedAttackerAndDefenderWithinFieldOfView. Method called.
CameraControlScript.CheckIfCameraHasLOSToBothCharacters. Character B has LOS.
CTHDisplayObjectScript.SetParticleSelectorBusy. METHOD CALLED
CharacterMainScript.StartRangedAttack. selected item is: Raskol 148 ranged weapon clas: 2 bullet spawn point is: 1
Gunscript.HandleFiringEffects. Is shotgun: False
CharacterMainScript.FireBullet. Method called. direction is: (1.0, 0.0, 0.0)
BulletScript.SetDirection. Method called. Direction is: (1.0, 0.0, 0.0)
BulletScript.OnTriggerEnter. Trigger event detected with object of tag: Characterbullet hits target: True
BulletScript.OnTriggerEnter. Hit character ID is: 7 target character id is: 7
BulletScript.OnTriggerEnter. Bullet hit correct character, destroying. Time when shot hit: 166
CharMainScript.StartRangedAttack. Attack has succeeded. Hit miss count: 2 attack damage list: 2
CharacterMainScript.ReduceHP. Method called. is overwatch: False /is AOO: Falsecharacter: Urbana Romero
Item.ReturnDamageAfterResistance. Damage is: 13.77 / damage type: 0
Item.ReturnDamageAfterResistance. Start Damage: 13.77 /armour condition %: 1 /absorbed 0 /resisted: 1.6524 /damage applied: 12.1176
Item.ApplyDamageToArmour. Method called damage: 13.77 /armour damage level: 2 /is crit:False /wrecking ball: False targetted body: False
Item.ApplyDamageToArmour. Total armour damage: 1.1016 /Total %: 0.08 /base: 0.08 /from crit: 0 /from wrecking ball: 0 /from target body: 0
CharMainScript.ReduceHP. This character is in combat. Updating combatant icons
CombatQueueManager.UpdateCombatantIcon. Method called for character ID: 7 health is: 6.8824
CharacterMainScript.ReduceHP. This character HP current: 6.8824
CharacterMainScript.ReduceHP. HP for Urbana Romero is > 0
CharMainScript.ReduceHP. Health for Urbana Romero reduced by 13.77
CharacterMainScript.HandleHitByRangedFire. Method called. Hit character is: Urbana Romero
CharacterMainScript.StartRangedAttack. selected item is: Raskol 148 ranged weapon clas: 2 bullet spawn point is: 1
CharMainScript.RaycastForMissedRangedAttack. This raycast hasn't hit anything and is valid
Gunscript.HandleFiringEffects. Is shotgun: False
BulletScript.SetDirection. Method called. Direction is: (1.0, 0.0, 0.0)
CharMainScript.StartRangedAttack. Attack has failed
CharacterMainScript.StartRangedSingleTargetAttack. Is in strafe origin: True
CharacterMainScript.ConcludeRangedAttack. Method called. Number of hits: 1 number of misses: 1
BattleControlScript.CheckForAdjacentEnemies. Criminal found at: (10.0, 2.0)
GameDataScript.IncreaseSkillAmountToNextLevel. Skill no: 1 amt to increase: 0.05 facility bonus: 1
GameDataScript.IncreaseSkillAmountToNextLevel. Skill no: 1 amt to increase: 0.025 facility bonus: 1
CharacterMainScript.ConcludeRangedAttack. ENABLING PLAYER INPUT
BattleControlScript.UnlockUserInput. Method called.
BulletScript.OnTriggerEnter. Trigger event detected with object of tag: Characterbullet hits target: False
BattleControlScript.DetermineMouseOverAction. Not enough AP for pistol attack

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1250
Re: [Resolved] Releasing holded item after alt+tabbing
« Reply #10 on: March 16, 2018, 02:49:37 PM »
The log seems to suggest 2 bullets fired, but the second hit a character (which was not the target) and was possibly destroyed. Agree that there's a good chance perception is at play here. Characters will rotate to an enemy that enter adjacent tile. Will look at this when testing - would likely only go after it though if it's causing a bug.

ushas

  • Hero Member
  • *****
  • Posts: 661
Re: [Resolved] Releasing holded item after alt+tabbing
« Reply #11 on: March 16, 2018, 05:34:06 PM »
On a side note, this is a construction site - the map of minusculely displaced columns, including the one next to Elena. But I should shut up with unfounded ideas already:)

Re "Characters will rotate to an enemy that enter adjacent tile": Perhaps just give it a short duration (plus maybe once per turn per unit limit)? Currently it looks behaving like if enter means if adjacent (again just describing impressions). But you'll see for yourself. Not recalling any definite bugs indeed.

ushas

  • Hero Member
  • *****
  • Posts: 661
Re: [Resolved] Releasing holded item after alt+tabbing
« Reply #12 on: May 17, 2018, 07:25:39 PM »
(v26, linux)

Unfortunately, the op issue and #1 are in, at least on linux (edit: edited to explain how behaviour is different, will recheck):
If you click an item and still hold it while alt+tab out, when return back and release anywhere on the screen the item stays there. Now the difference from before is that the game completely freezes and become unresponsive. If alt+tab afterwards the screen blacks out completely, no HUD, still no response. In either case have to kill the process. Tested at home as well as during a battle.

PS: the image sharing site I've been using changed address. Edited the op image, and will repair others when coming across. Please don't hesitate let me know when need any past image or feel free to edit yourself. The edit only requires to change "postimg.org" to "postimg.cc" in the image address.
« Last Edit: May 17, 2018, 07:36:22 PM by ushas »

ushas

  • Hero Member
  • *****
  • Posts: 661
Re: [Resolved] Releasing holded item after alt+tabbing
« Reply #13 on: May 17, 2018, 10:34:16 PM »
Progress report for v26:

1) Alt+tabbing from inventory while holding an item:
Tried a couple of more times. The game freeze and the blackout as mentined above doesn't happen always. A few times in the battle inventory, after alt+tabbing back and an item on wrong place, the game is seemingly frozen for very long time but after a while (me trying to escape by Esc ot I key, or clicking on icons) it resumes to the battlescape. Then when you go to inventory the item is correctly placed and can continue. So looks the fix works (after switching screens), but it somehow causes very long freeze which often won't unfreeze at all. The log contains many lines:
Code: [Select]
UIManagerScript.RefreshInventory. Method called.   
Wondering if the situation might be different on windows.
If having time will try check if there are any new linux-specific alt+tab issues to be aware of.


2 & 3) If escape from inv. to battlescape and back, regardless on which screen the holded item released - the item disappears. Don't know if for real, but I don't see it in inventory nor on hands, nor on the floor. The good news is no freeze here! Edit: Seems happens only when the item was initially on ground or on hands. When it was originally in per. inventory it returns there all right.


4) When in battle and the transfer items dialog is on screen, Esc and character sheet ("C") shortcuts will cancel the dialog, but pressing the inventory screen one ("I") will not cancel (<- include this key too?). However this time the dialog stays responsive so it's easy to cancel and no freeze. Ha, realized this way we can teleport bullets or medkids from a backpack of one ally to under feet of another ally:D

Additionally: when you move countable items from ground to inv. and back through confirming this dialog, it doesn't cost any AP.
« Last Edit: May 19, 2018, 09:51:00 AM by ushas »

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1250
Re: [Resolved] Releasing holded item after alt+tabbing
« Reply #14 on: August 18, 2018, 03:48:15 PM »
All except 1 fixed. It's difficult to imagine 1 occuring unless the player is deliberately trying to break game, in which case... tada!