How to charge the UPS

So I did a lab start and found an A7 laser gun. I went about finding a UPS and got an electric car and installed a charge station. But even after turning the charging station on, there is no charge for the gun. Is there something else I am suppose to do besides just dropping the UPS onto the charger station? Because there is no activate prompt for the UPS near the station.

It also says when i put it on the station’s square, that i put it in the car’s trunk instead of the charger.

IIRC the charging station only recharges batteries that aren’t in anything. You should unload the battery from the UPS and then try recharging it.

This is intended as the recharger itself doesn’t have any cargo capacity an only recharges free batteries in whatever tile it is installed on.

I have tried both installing batteries and unloading them from the UPS, but nothing works. It acts like the UPS is the battery itself because there are no batteries that will go into it.

The UPS needs one of the heavy batteries to function. Did you remove the battery from the UPS and drop said battery in the trunk with the recharging station and then wait a while to see if it will charge?

I have never seen a UPS have any interaction with batteries. I had a large disposable i tried to insert, but that didnt work either.

Unless you play with Aftershock. If it hadn’t been recently updated(I’m still on 10614), AS UPS’s battery is integrated (i.e. you cannot remove/reattach it), and this UPS can be charged by putting it into recharging station.

This run does have aftershock running. But i still run into the same problem if the recharge station on my car not doing anything. Should I just start over without aftershock?

If you’re playing on build after 10614 then it may be that Nested Containers update broke something in aftershock, this something including its version of UPS. I’d say try without AS and see if it works.
Note that vanilla UPS can’t be recharged in the station directly, you have to pull the battery out and drop it into the station.

1 Like

sigh… yup that seems to have been the issue. Aftershock’s UPS is broken so there’s nothing for it, i’ll have to start over again.

Updating the aftershock ups (cdda\data\mods\Aftershock\items\tools.json) to this fixes it:

 {
    "id": "UPS_off",
    "type": "TOOL_ARMOR",
    "copy-from": "UPS_off",
    "name": { "str": "UPS", "str_pl": "UPS's" },
    "description": "This is a unified power supply, or UPS.  It is a device developed jointly by military and scientific interests for use in combat and the field.  The UPS is designed to power armor and some guns, but drains batteries quickly.  It can be worn around to either leg for ease of access, and it's been waterproofed to protect the delicate electronics.  Has it's own custom battery, with higher capacity and rechargeable, but not removeable",
    "coverage": 5,
    "ammo_type": [ "battery" ],
    "capacity": 1500,
    "encumbrance": 2,
    "covers": [ "LEG_EITHER" ],
    "flags": [ "RECHARGE", "WAIST", "FRAGILE", "OVERSIZE", "WATERPROOF", "IS_UPS", "NO_RELOAD", "NO_UNLOAD" ],
    "pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "battery": 1500 } } ]
  },

why not make a PR if you have a fix like that up your sleeve?

Yea, I guess I should, just being a lazy boy. Apologies.

Okay, so my change wasn’t quite there after some testing anyways.

I’m honestly a little stumped as to what is going on. If the item type is TOOL then battery charges in the pocket don’t sync up with how many “charges” the item has. battery will be 1500 and charges 0, this appears to prevent items from using the ups as the see it as uncharged. The name will also be “UPS 0/1500” despite the pocket being full of battery. The ups also fails to charge in this state, if totally empty it will add one battery but charges and the name will not update, it will also prevent other items in the charger from charging.

However, if I change the item type to TOOL_ARMOR like it is in aftershock it will functionally recharge as well as display the proper charge it its title, however, all items no longer recognize it as a UPS.

If i try to reconfigure it like the electric jackhammer, forgo the pocket and just use

"ammo": [
  "battery"
],
"initial_charges": 1500,
"max_charges": 1500,

Then as soon as something uses the UPS it will add batteries down at the bottom of the item description. Item use will continue to drain those batteries but will leave the Charges: 1500 and then throw errors (can’t set ammo null in ups as it is not an ammo item& item::ammo_set(const itype_id&, int) : 579) when it runs out of the mystery batteries it added.

I’m guessing item type TOOL has some special handling for charges and stuff. I’ll screw around with this more tomorrow, maybe put on my big boy pants and learn some c++.

In my case that was about pulling battery out and charging a battery, not UPS!
Thank you, man!