Berserk and Sonic Cannon v2.1


  • Please log in to reply
16 replies to this topic

#1 silencer_pl

silencer_pl

    Captain

  • Members
  • PipPipPipPipPip
  • 4,392 posts
  • Gender:Male
  • Location:Poland

Posted 05 December 2014 - 04:08 PM

Ok, this is new to me and I thought that berserking units can only shoot their max TUs. But recently I've witnessed when a single berserking unit wasted whole 10 ammo clip in sonic cannon. Is it possible?
Posted ImagePosted ImagePosted Image

#2 Zombie

Zombie

    Mr. Grognard of X-COM

  • Admin
  • PipPipPipPipPipPip
  • 5,547 posts
  • Gender:Male
  • Location:Wisconsin, USA

Posted 05 December 2014 - 05:01 PM

I believe it's a bug. NKF mentioned a while ago that berserk units occasionally get 255 TU or something along those lines. *shrugs* I've never seen it happen though. ;)

- Zombie

My X-COM Patch Kit For UFO Defense | Emergency XCOM Meeting spoof on YouTube




JellyfishGreen said:

Zombie: Empirical data's your only man, when formulating a research plan.
A soldier's death is never in vain if it makes the formula more plain.
A few dozen make a better case for refining that third decimal place.
They call me Zombie because I don't sleep, as I slowly struggle to climb this heap,
of corpses, data points, and trials, but from the top - I'll see for miles!

#3 silencer_pl

silencer_pl

    Captain

  • Members
  • PipPipPipPipPip
  • 4,392 posts
  • Gender:Male
  • Location:Poland

Posted 05 December 2014 - 05:16 PM

Hmm with 2.1 it happened to me 2 out of 2 times :/
Posted ImagePosted ImagePosted Image

#4 NKF

NKF

    Mr. Badger in disguise

  • Site Staff
  • PipPipPipPipPip
  • 4,427 posts
  • Gender:Male
  • Location:In my mind

Posted 05 December 2014 - 07:11 PM

This happens in unpatched copies of the game as well. Since shooting costs are percentages, you shouldn't be able to fire more than 2 ~ 3 shots with the sonic weapons, but to go berserk and empty off most of the ammo clip does suggest the aquanaut's been given far more TU's then his or her current maximum TUs to play with.

- NKF
NKF, narrow minded fuddy duddy who refuses to let go of the past and will not accept anything newer than 1979.

#5 silencer_pl

silencer_pl

    Captain

  • Members
  • PipPipPipPipPip
  • 4,392 posts
  • Gender:Male
  • Location:Poland

Posted 05 December 2014 - 07:17 PM

I haven't played TFTD very long time but I don't remember encountering this issue. Does TFTD Extender fix this? I'm waiting for the OpenXCOM to be finally ready with TFTD so I guess they must have fixed it.
Posted ImagePosted ImagePosted Image

#6 NKF

NKF

    Mr. Badger in disguise

  • Site Staff
  • PipPipPipPipPip
  • 4,427 posts
  • Gender:Male
  • Location:In my mind

Posted 05 December 2014 - 07:45 PM

It's certainly not behaviour you'd expect with slow weapons like a sonic cannon, but I'm not sure its a bug bug or if its intended as another degree of panic.

Hmm - perhaps we're not panicking often enough. ;)

- NKF
NKF, narrow minded fuddy duddy who refuses to let go of the past and will not accept anything newer than 1979.

#7 Zombie

Zombie

    Mr. Grognard of X-COM

  • Admin
  • PipPipPipPipPipPip
  • 5,547 posts
  • Gender:Male
  • Location:Wisconsin, USA

Posted 06 December 2014 - 07:13 AM

Hobbes seems to remember his berserk HWP getting 255 TU and firing off all it's rockets during it's phase. So it must be TU misallocation bug of sorts, most likely Current TU getting set to 255 and the Base TU remaining the same, those interacting and causing trouble. I wonder if Tycho knows about this?

- Zombie

My X-COM Patch Kit For UFO Defense | Emergency XCOM Meeting spoof on YouTube




JellyfishGreen said:

Zombie: Empirical data's your only man, when formulating a research plan.
A soldier's death is never in vain if it makes the formula more plain.
A few dozen make a better case for refining that third decimal place.
They call me Zombie because I don't sleep, as I slowly struggle to climb this heap,
of corpses, data points, and trials, but from the top - I'll see for miles!

#8 Space Voyager

Space Voyager

    I've got my eye on you!

  • Site Staff
  • PipPipPipPipPipPip
  • 5,452 posts
  • Gender:Male
  • Location:Slovenia

Posted 07 December 2014 - 03:35 PM

HWP can become berserk?

#9 silencer_pl

silencer_pl

    Captain

  • Members
  • PipPipPipPipPip
  • 4,392 posts
  • Gender:Male
  • Location:Poland

Posted 07 December 2014 - 05:06 PM

Quote

your HWPs can only lose morale by killing friendly units

or as the talk says - one alien grenade to wipe the whole squad.
Posted ImagePosted ImagePosted Image

#10 Zombie

Zombie

    Mr. Grognard of X-COM

  • Admin
  • PipPipPipPipPipPip
  • 5,547 posts
  • Gender:Male
  • Location:Wisconsin, USA

Posted 07 December 2014 - 06:25 PM

View PostSpace Voyager, on 07 December 2014 - 03:35 PM, said:

HWP can become berserk?

You bet, and panic too. Here's a post I made way back in 2005 (had to re-up the old pics as the forum software changed how it handled images over the years).

View PostZombie, on 20 August 2005 - 04:15 AM, said:

I tried getting a tank to panic by allowing my squad to be wiped out by the aliens with no luck.

I wonder... what would happen if the tank itself is responsible for killing a friendly? Ah, ha! A reduction in morale! Being a bit lazy, I MC'd all the aliens (except for one) on a landed UFO mission. Then I bunched them all up and fired a Fusion bomb into their midst from my Hovertank/Launcher. Since the aliens were considered "friendly" while under X-COM control, my hovertank lost almost all of its morale.

I didn't have to wait long because my HWP panicked! I reloaded the game and also got it to go berserk! (It fortunately didn't fire its weapon, though). Here are a couple of screen shots:



You won't see that happening every day, that's for sure!  Posted Image

- Zombie

Hovertank_Panic.png Hovertank_Berserk.png


Here's the post NKF made about berserk which makes so much more sense than I can ever explain from memory:

View PostNKF, on 04 April 2006 - 06:14 AM, said:

Bug? Bug? This isn't a bug. It's the effect of cocktail of bodily chemicals that give your soldiers superhuman strength and speed while under extreme mental duress. Or something like that. It happens in the PC versions of UFO and TFTD - although I don't have the playstation version so I can't really tell how it works in there. We'd need someone with the Amiga version to give us an overall picture of whether or not it's meant to be a bug. I say it makes things so much more dangerous - for everyone.

The reason you get so many shots is beacuse all your weapon costs are based off your Max TUs. Say 60. Using a laser rifle, we can get snapshots at 15 TUs each (4 shots at 25% each). Not bad.

Now, when your soldier goes berserk, your Current TUs is pushed to 255 or slightly less points. Even at this level, your firing cost is still based off your Max TUs. In my example, it's 15 TUs per snap. This is 255/15 = 17 possible snapshots. It won't be 17, exactly, as you still need TUs to turn about wildly.

Just imagine what you'd get with a soldier at 50 Max TUs and a laser pistol or pistol?

How about trying to get an alien to do this? Might have to help it pick up its gun every so often.

- NKF

Edit: assuming units get 255TU (not 235 as is sometimes reported), I back calculated and found your soldier's TU to be ~51. Is that correct silencer?

- Zombie

My X-COM Patch Kit For UFO Defense | Emergency XCOM Meeting spoof on YouTube




JellyfishGreen said:

Zombie: Empirical data's your only man, when formulating a research plan.
A soldier's death is never in vain if it makes the formula more plain.
A few dozen make a better case for refining that third decimal place.
They call me Zombie because I don't sleep, as I slowly struggle to climb this heap,
of corpses, data points, and trials, but from the top - I'll see for miles!

#11 Space Voyager

Space Voyager

    I've got my eye on you!

  • Site Staff
  • PipPipPipPipPipPip
  • 5,452 posts
  • Gender:Male
  • Location:Slovenia

Posted 08 December 2014 - 05:21 AM

He he he, thank you, Zombie! You get zombie points for testing such a thing out! ;)

#12 silencer_pl

silencer_pl

    Captain

  • Members
  • PipPipPipPipPip
  • 4,392 posts
  • Gender:Male
  • Location:Poland

Posted 08 December 2014 - 06:17 AM

More like something near 61-65
Posted ImagePosted ImagePosted Image

#13 Zombie

Zombie

    Mr. Grognard of X-COM

  • Admin
  • PipPipPipPipPipPip
  • 5,547 posts
  • Gender:Male
  • Location:Wisconsin, USA

Posted 08 December 2014 - 07:13 AM

View Postsilencer_pl, on 08 December 2014 - 06:17 AM, said:

More like something near 61-65

Well, that's odd. 60 TU equates to 8.5 shots per berserk event which doesn't match you emptying out an entire Sonic Cannon Clip. Are you sure it was the full 10 rounds or was it 9 or 8? ;)

- Zombie

My X-COM Patch Kit For UFO Defense | Emergency XCOM Meeting spoof on YouTube




JellyfishGreen said:

Zombie: Empirical data's your only man, when formulating a research plan.
A soldier's death is never in vain if it makes the formula more plain.
A few dozen make a better case for refining that third decimal place.
They call me Zombie because I don't sleep, as I slowly struggle to climb this heap,
of corpses, data points, and trials, but from the top - I'll see for miles!

#14 silencer_pl

silencer_pl

    Captain

  • Members
  • PipPipPipPipPip
  • 4,392 posts
  • Gender:Male
  • Location:Poland

Posted 08 December 2014 - 07:17 AM

Full 10 rounds. Or maybe it was 9 - but anyway it was whole clip anyway.
Posted ImagePosted ImagePosted Image

#15 Tycho

Tycho

    Lieutenant

  • Project Staff
  • PipPipPipPip
  • 703 posts
  • Gender:Male

Posted 13 March 2015 - 05:17 PM

This is an oversight in the code for a unit going berserk.  The routine calculates the amount of TUs to subtract for each shot at the beginning of the sequence and then determines if the unit has enough TUs to fire. Later it determines a facing and turns the unit, subtracting the TUs for the turn.  The sequence doesn't check that the unit still has enough TUs after adjusting the unit's facing, so the unit will fire and the TUs for the shot are subtracted from its current amount.  This rolls the value "below" zero. Since TUs are read and stored as an unsigned byte value, the game believes the unit now has a huge amount of TUs to use.

#16 Tycho

Tycho

    Lieutenant

  • Project Staff
  • PipPipPipPip
  • 703 posts
  • Gender:Male

Posted 30 June 2015 - 12:14 AM

I said this was an oversight. But after going over the code to decide how to "resolve" this, I now think that this was an intentional design by the Gallops.  The code for a unit going berserk and making attacks is a loop that ends: 1) if the unit doesn't have enough TUs to make a single shot at the start of the loop or 2) the loop completes 10 cycles.   It is this cap on the number of cycles that makes me think the Gallops intended for berserk units to get more TUs than normally possible.  The sonic cannon has the perfect TU cost to keep this loop rolling: Since the snap shot TU cost is 50%, a berserk unit only has to make one shot, turn its facing one degree, and shoot again to continue the cycle. As long as it can continue to repeat these actions in order, it will do so until either it hits the cap on the number of cycles or it runs out of ammo.

#17 NKF

NKF

    Mr. Badger in disguise

  • Site Staff
  • PipPipPipPipPip
  • 4,427 posts
  • Gender:Male
  • Location:In my mind

Posted 30 June 2015 - 12:47 PM

Looking at it myself, it's either a genuine unintentional effect or a clever adaptation to prevent a potential endless loop.

There's one check as you enter the loop to see if there are enough TUs to make the shot, but this check isn't made again after turning the unit to face the target before firing. The only checks made after that are to see if  the unit is still alive after each shot.

Let's say you enter the loop with just enough TUs to make one shot, but have to turn a few times to point at the right target/direction. This will leave you with less TUs than what you started. Then the firing cost gets deducted, this will cause TUs to go into a negative. As TUs are stored as an unsigned value, this wraps around. On the next cycle, it will see that there are plenty of TUs left so will proceed with the next round. The 10 attempt check is done to stop this from going on forever.

It's quite a specific scenario to get into, but that's the best way I can think of how it could happen.

- NKF
NKF, narrow minded fuddy duddy who refuses to let go of the past and will not accept anything newer than 1979.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users