Page 1 of 1

Add/remove items from vehicle equipment grids?

Posted: Sat Jan 11, 2020 11:24 pm
by Illiander42
My search skills have failed me. I'm looking for a way to automate replacing spent battery packs and schall gun pods in trains.

From the API it looks like its possible, but I couldn't find any mod that gives you any way to automatically manipulate vehicle equipment grids.

Does it exist, or will I have to get my coding hat out and write it?

Re: Add/remove items from vehicle equipment grids?

Posted: Wed Jan 15, 2020 3:10 am
by Honktown
Unfortunately there's no events like that (no disposable battery, no limited-ammo items by default). It's easy enough to work on an equipment grid (I think one can even iterate over equipment without regards to place in armor). Probably would also need an on_nth_tick event to check for the removal/insertion condition (dead battery, location, item in inventory, whatever). Don't know how disposable batteries normally work, so I have no idea on how that would be managed.