Wireless Charging

by mknejp

Induction stations and equipment allowing wireless charging of batteries in vehicles and armor.

8 years ago
0.14
17

b Infinite Explosive Tank Shells.

8 years ago

This is a weird one, and I'm not 100% where the bug is in coding. I Have an electric tank sitting on a charging station and have the extra inventory filled in with filtered striped concrete so that the only slots that can be filled are the shell slot and machine gun ammo slot. If the tank is charging batteries while at the same time inserters are placing shells (specifically I was using long handed inserters) into the tank when it has an empty shell slot while also having extra shells in your "hand" when pressing Q to return item to inventory there is a brief moment that can cause the ammo to spike its damage value and instead of the normal "10/10 ammo" it (speculation after a few tests) charges the ammo causing the damage value to read "110/10 ammo," "46/10 ammo" the front number would vary wildly but would still be a fairly high number. That's how I got it to be semi-repeatable, however at random, even without messing with shells in my hand, It would spike the ammo damage value when charging and filling the tank with shells. I should note I also have maxed out stack inserter bonus. Not sure if that would mess with anything but... I could do some more testing as I would imagine the same issue could happen with any of the other ammo types on any vehicle but that's just speculation at this point.

8 years ago

That sounds more like a bug with the game itself. Have you tried it with other mods or just vanilla vehicles modded with grids? I have absolutely zero idea how charging batteries could in any way affect anything ammo-related.

8 years ago

It very well could be. I did try with a vanilla tank but could not reproduce. I was thinking it might be an issue with the equipment grids as vanilla vehicles don't have a grid to interact with. I'll probably start a fresh save in isolation and test around with it to see if it happens again. The way I could see a problem would be if battery charge levels act on an item's damage value and then the ammo "count per item" also acts on a damage value somehow that damage value string gets rewritten causing the spike. However, I'm not sure if it is a vanilla bug, your mod's bug, or just me doing too many things with mods. Probably the latter but I posted to see if anyone else has this issue. Even though it is somewhat obscure.

New response