Autodrive

by Pi-C

Car equipment for train avoidance, logistic network integration, circuit network connectivity, fuel refill, ammo reload, vehicle repair, radio control, enemy targeting, and gate control.

Content
21 days ago
0.17 - 1.1
2.42K
Transportation

b [Fixed?] Panic Mode

I'll quote this from the changelog,
Version: 1.1.5
Date: 2023-05-29
Uploaded by:
- Pi-C

Bugfixes:
- Fixed that state.gun would only be stored after the vehicle actually reloaded its weapons with ammo from the trunk. If both ammo and enemy sensor were installed, but the gun hadn't been auto-reloaded yet because it still had ammo, the enemy sensor would put the vehicle in panic mode instead of ordering it to shoot at the next enemy.

I'm either doing something wrong, or this bug as reverted back. I fully loaded my car with ammo in the trunk, and manually put ammo in the weapon slot. As soon as I run into a biter, it shoots a few rounds, and then immediately enters panic! mode, and drives straight into them. This usually results it in getting stuck in a pack and chewed to tasty metallic bits.

Am I doing something wrong?

5 months ago

Has that car been modified by mods? If I remember correctly, I made another change to the logic: Vehicles that have an enemy sensor will enter panic mode if enemies are near and the vehicle has no usable weapon. A vehicle has no usable weapon if

  • the vehicle prototype doesn't support any weapons, or if
  • none of the vehicle weapons have ammo, or if
  • no enemy is within range of the equipped weapon.

I've added the last point to avoid problems with a vanilla tank that has only the flamethrower left: Flamethrowers have a minimum range in addition to the usual maximum range, so if enemies got so close they can chew at the tank, the flamethrower is useless against them. The tank will enter panic mode in order to increase the distance to the closest enemy and get a chance to shoot again. However, the default vehicle-machine-gun has a minimum range of 0, so it should be able to shoot at any enemies that are less than maximum range away.

You can check the minimum range of your vehicle's weapon:

  • Hover the cursor over the vehicle and press CTRL+SHIFT+F to enter the prototype browser.
  • Look for property "guns" and open that. A new window with the properties of the gun prototype will pop up.
  • Look for property "attack parameters" in the gun prototype. If "min range" has a value other than 0, this may be the reason.

Hey, thanks for the reply.
The mods I am currently running are as follows:
-AutoDrive
-BabelFish
-Even Distribution
-Milestones
-Pavement Drive Assist Continued
-Spawn Tweaks
-Vehicle Corpses

None of these mods effect the vehicles behavior as far as I understand. Vehicle Corpses only causes loot to drop off a destroyed vehicle, and I'm not using Pavement Drive as I don't have any pavement yet.

I tried allowing the mod to auto load the ammo using the sensor combined with the enemy sensor as its the same result. Shoots a few times, enemy is right in its face, and then enters panic mode.

I'm just using the default car with the machine gun, that has a min range of 0 so I don't see how that could be the issue. Scratching my head on it, I just removed the sensor all together as it was just getting me killed constantly XD

4 months ago

I could reproduce this. You did nothing wrong, it seems to be an error in my logic: The bug occurs if the vehicle has just fired and is still waiting until the delay between shots is over (until state.shooting_until_tick == game.tick). If cron_enemy is set naturally (game.tick % 30 == 0) and an enemy is found during the delay, the vehicle is not allowed to shoot and will enter panic mode.

Trying to fix this now. :-)

4 months ago

Please try version 1.1.7!

New response