aliens

Author Topic: [Answered] inconsistent behavior with throwing objects  (Read 2208 times)

Offline Rubber Cannonball

  • Colonel
  • ****
  • Posts: 195
    • View Profile
[Answered] inconsistent behavior with throwing objects
« on: February 17, 2020, 08:35:03 am »
Attached is a save made with 6.3.4 (v2020-01-11) and x-piratez v.k2

Case 1:
If Ruthless Snow aims a gas grenade 1 tile past either the ratman in front of her or 1 tile past the ratman 3 tiles to her left, that ratman will start flashing as if it was blocking terrain.  The "Unable to throw here" message is not displayed and the throw occurs.  The ratman will continue to flash indefinitely until left-clicking on any tile.

Case 2:
If Ruthless Snow aims the grenade at the ratman 2 tiles in front of her, the fence in the ratman's tile will flash temporarily as blocking terrain and the "Unable to throw here" message is displayed.  The throw doesn't occur. Seems normal.  However, repeated attempts to make the throw will eventually result in the throw occurring.  It is hard to repeat and may take 30 tries or so before the throw occurs.  I had confirm fire on so it wasn't a misclick.  I couldn't find any spot in the tile where the throw would always occur but moving the tip of the cursor arrowhead around the ratman's right hand area seemed to make the throw occur in fewer tries.

Case 3:
Ruthless Snow moves back one tile so that she is 3 tiles away from the ratman on the other side of the fence.  She again aims the grenade at the same ratman on the other side of the fence which is now 3 tiles away.  This time the fence does not flash, nor does anything else, but the "Unable to throw here" message is displayed and no throw occurs.  Repeated attempts will eventually allow the throw to occur.

Moving Ruthless Snow farther back allows the throw to occur in fewer tries.  Moving her 8 squares away from the ratman so that she is in the same tile as the white door behind her and the throw has a roughly 50% chance to occur.

When the throw eventually occurs through the fence, the fence does not flash and no message is displayed as expected.  The F10 snapshot shows the chain link fence modeled as a rail fence with 5 rails.  Does the game calculate a random trajectory instead of an ideal trajectory for each throw attempt?  And if no obstacle is detected then allow the throw which follows that same trajectory?  If so and if the ideal trajectory hits a rail, that might explain why the chance for the throw to occur increases the farther away Ruthless Snow is from the fence since the random trajectories spread apart with distance.  But this seems like an exploit.  If the player has a 1 in 20 chance of throwing an object through a hole in a wall, he merely has to attempt the throw 20 times, on average, and when the throw occurs the object sails through the hole nearly every time?   Except for the few times throw lands short of the wall.
« Last Edit: February 12, 2023, 10:36:21 am by Meridian »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9091
    • View Profile
Re: bug or inconsistant behavior with throwing objects
« Reply #1 on: October 08, 2020, 02:37:28 pm »
The ratman will continue to flash indefinitely until left-clicking on any tile.

Was fixed one day after this report.

Does the game calculate a random trajectory instead of an ideal trajectory for each throw attempt?  And if no obstacle is detected then allow the throw which follows that same trajectory?

It's more complicated than that, but short answer is yes.

But this seems like an exploit.  If the player has a 1 in 20 chance of throwing an object through a hole in a wall, he merely has to attempt the throw 20 times, on average, and when the throw occurs the object sails through the hole nearly every time?   Except for the few times throw lands short of the wall.

The only object complicated enough to cause this behavior in vanilla is TFTD fence.
Exploit is only possible under very specific circumstances, when you have mostly "tunnel vision", like in your example a tunnel made of apple trees and the desired trajectory is practically the only allowed trajectory. Even in your case, I mostly got misses one tile to the left or right from the ratman.