Character inventory uplink

by Quezler

Read the inventory contents of players with circuits and restock them with inserters, early game logistic bots.

4 months ago
2.0
214
Logistics Circuit network Storage Cheats

i Feature Request: Uplinked Personal Logistics

18 days ago

I still love playing around with your awesome mod! <3

My situation is that I progressed through the early game, unlocked logistic robots and built a bot mall.

I built an easy and convenient uplink to pull stuff out of your trash slots and into the logistic network, for the bots to take care of it. Then I observed that the bots still come over and try to pick up items from my inventory that are already pulled by the uplink, before leaving without doing anything - annoying because of the wasted bot activity (and therefore performance) but not a dealbreaker.

The bigger 'problem'/inconvenience is with supplying logistic demands via the uplink. Thanks to the vanilla 2.0 logistics groups, it's easy to sync my requests with a constant combinator that manages the sending of items into the uplink. It's easy to add items into existing groups or change item amounts. The upper limit of items can be handled via the vanilla way right in my inventory, which puts everything that's too much into my trash slots (therefore causing the unnecessary bot traffic). These two parts are tolerable, but I really wished, I wouldn't still have to reconfigure the constant combinator every time I want to disable a logistic group temporarly or add a new one.

TL/DR: Would be awesome to have a 'personal logistics mode' in the uplink's settings dropdown menu, where bots ignore you and interact with the inventory uplink instead, while you could still use the trash slots and configure your requests the usual vanilla way!

A way to tell the bots not to interact with you while still being able to auto-trash would also work (disabling personal logistics disables both), together with a combinator which reads your inventory's ACTIVE logistics groups (maybe all groups on red signal and only active ones on green signal would be even better for some applications). If that's easier to implement

18 days ago

im afraid you'd be running into modding api limitations and/or performance concerns im afraid.

18 days ago

Ohh, I don't know how to mod Factorio or what's possible...

In my naivety I imagine half of a solution could be possible by 'faking' the player position or surface to the logistic network, that it thinks you're always out of range. Then the trash slots would work normally and could be connected via uplink. Refilling items in your inventory exclusively via uplink would also be possible and only half as annoying as it is right now.

Doesn't the api have a way to read the status of the logistics groups in players inventories? For the second part of a solution...

And another cool feature would be a mod setting to enable the uplink across surfaces!

18 days ago

i kinda surface restricted it to avoid players being able to route all the items produced on a planet through their own inventory like an overpowered linked chest, i'd probably break a bunch of planet mods if i did that.

18 days ago

Yeah, I imagine most people find that too cheaty. I'd see it this way myself, if I wouldn't play a only Gleba run at the moment. I build most of the factory on one singular surface anyway. It should be a setting anyone could make the choice for themselves, not a general change.

If it was an option to choose it for individual uplink buildings/surfaces, it would even open the possibility to 'airdrop' supplies directly into your inventory anywhere on the planet, if one would build a mall on an orbiting spaceship.

18 days ago

anyways, if you'd like to play around with how it feels without a surface restriction then just remove player.character.surface == entitydata.entity.surface from the line below, let me know if playing that way is interesting and i might just add it as an actual option:

https://github.com/Quezler/glutenfree/blob/main/mods_2.0/066_character-inventory-uplink/control.lua#L277

18 days ago

Thanks a lot! I'm already playing around with the surface restriction disabled.

Coming back to my initial suggestion:

Would it be feasible to wait for the player character to trigger 'on_entity_logistic_slot_changed', then target the characters 'LuaLogisticPoint', copy its 'sections' array of 'LuaLogisticSection's, check if the 'LuaLogisticSection.active' is true, then '.add_section' these via 'LuaConstantCombinatorControlBehavior' into a constant combinator?
I'd imagine that would mirror the players active logistics groups to a constant combinator in a performant way.

Maybe it's possible to change the player characters 'LuaLogisticPoint.force' to a different one, that the static roboport logistic network of the player would ignore them.

If that worked, it would be possible to completely handle the players personal logistics with the uplink, instead of bots.

New response