[REQUEST] [NICE IDEA] Private Buffer chest

This is the place to request new mods or give ideas about what could be done.
nuhll
Filter Inserter
Filter Inserter
Posts: 820
Joined: Mon Apr 04, 2016 9:48 pm
Contact:

[REQUEST] [NICE IDEA] Private Buffer chest

Post by nuhll » Sat Jan 06, 2018 6:12 pm

Hi,
i would suggest a mod which adds a "private buffer chest" which is actually automatic requesting all the items the player requests, so you can place them where u often visit your factory without waiting long for deliveries... :-)

besides the automtaic requesting what player requests, the chest should behave like a normal buffer chest.
Last edited by nuhll on Sat Jan 13, 2018 2:34 pm, edited 2 times in total.

nuhll
Filter Inserter
Filter Inserter
Posts: 820
Joined: Mon Apr 04, 2016 9:48 pm
Contact:

Re: Private Buffer chest

Post by nuhll » Wed Jan 10, 2018 9:50 am

push this is a good idea :D please someone make it, shouldnt be hard!

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2041
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: [REQUEST] [NICE IDEA] Private Buffer chest

Post by darkfrei » Sat Jan 13, 2018 2:13 pm

Some pseudo code for this mod (I haven't factorio right now)

Code: Select all

On player built entity event
And if entity is Private Buffer Chest then
Global.chests_amount = chests_amount + 1
Global.chests[chests_amount].entity = entity
Global.chests[chests_amount].player = player
End event

On tick event
If Global.chests_amount = 0 then return end
If not tick_index then tick_index = 1 end
If tick_index > chests_amount then tick_index = 1 end
Call function set_requester (tick_index)
Global.tick_index = tick_index + 1
End event

Function set_requester (tick_index)
-- Take all player's  requests Global.chests[tick_index].player and set to chest's request  Global.chests[tick_index].entity
End function
This code runs every tick only one chest and on next tick operates with next chest. So, you can have 10000 chests and performance will be always same.

nuhll
Filter Inserter
Filter Inserter
Posts: 820
Joined: Mon Apr 04, 2016 9:48 pm
Contact:

Re: [REQUEST] [NICE IDEA] Private Buffer chest

Post by nuhll » Sat Jan 13, 2018 2:34 pm

thanks for this.

But i dont know how to build factorio mods xD

I hope someone can use your code to create a mod :)

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2041
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: [REQUEST] [NICE IDEA] Private Buffer chest

Post by darkfrei » Sat Jan 13, 2018 11:56 pm

Here is realization of your nice idea. Please test it enough.
Attachments
PrivateBufferChest_0.0.1.zip
For 0.16
(14.64 KiB) Downloaded 29 times

nuhll
Filter Inserter
Filter Inserter
Posts: 820
Joined: Mon Apr 04, 2016 9:48 pm
Contact:

Re: [REQUEST] [NICE IDEA] Private Buffer chest

Post by nuhll » Sun Jan 14, 2018 12:00 am

hmm, i added it to my mod dir, it shows ingame, its activated, but i cant find the item in the list?

I have ger client, if that matters?

Translation would be "Private Bufferkiste"
Much thanks

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2041
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: [REQUEST] [NICE IDEA] Private Buffer chest

Post by darkfrei » Sun Jan 14, 2018 12:24 am

Forgot this part:

Code: Select all

script.on_configuration_changed(function(data)
  for i, force in pairs (game.forces) do
    if force.technologies["construction-robotics"].researched then
      force.recipes["private-chest-buffer"].enabled = true
    end
  end
end)
Attachments
PrivateBufferChest_0.0.2.zip
For 0.16
(14.72 KiB) Downloaded 27 times

nuhll
Filter Inserter
Filter Inserter
Posts: 820
Joined: Mon Apr 04, 2016 9:48 pm
Contact:

Re: [REQUEST] [NICE IDEA] Private Buffer chest

Post by nuhll » Sun Jan 14, 2018 12:36 am

Yes, works perfetly, now it just need the same request slots as the player :)

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2041
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: [REQUEST] [NICE IDEA] Private Buffer chest

Post by darkfrei » Sun Jan 14, 2018 12:39 am

nuhll wrote:Yes, works perfetly, now it just need the same request slots as the player :)
It's now have update from lowest: player filter and chest filter. Did you need 36 slots? Why 12 is not enough?

nuhll
Filter Inserter
Filter Inserter
Posts: 820
Joined: Mon Apr 04, 2016 9:48 pm
Contact:

Re: [REQUEST] [NICE IDEA] Private Buffer chest

Post by nuhll » Sun Jan 14, 2018 12:43 am

I usually request everything i need, so 36 is already really limiting :D (so i dont need to add and remove everytime). I just go back to base and i know i have everything i need.

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2041
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: [REQUEST] [NICE IDEA] Private Buffer chest

Post by darkfrei » Sun Jan 14, 2018 12:50 am

nuhll wrote:I usually request everything i need, so 36 is already really limiting :D (so i dont need to add and remove everytime). I just go back to base and i know i have everything i need.
36 for request, 36 total?
Attachments
PrivateBufferChest_0.0.3.zip
For 0.16
(14.72 KiB) Downloaded 28 times

nuhll
Filter Inserter
Filter Inserter
Posts: 820
Joined: Mon Apr 04, 2016 9:48 pm
Contact:

Re: [REQUEST] [NICE IDEA] Private Buffer chest

Post by nuhll » Sun Jan 14, 2018 12:56 am

yeah, atm im requesting 35 items :> Would show you a screenshot, but it seems like u cant screenshot "E" :(

Seems like u cant place it via bots, or nothing gets requestet. Besides that, working perfectly. Many thanks.

Thanks for the fix.

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2041
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: [REQUEST] [NICE IDEA] Private Buffer chest

Post by darkfrei » Sun Jan 14, 2018 1:08 am

nuhll wrote:yeah, atm im requesting 35 items :> Would show you a screenshot, but it seems like u cant screenshot "E" :(
Why 35? It must be 36.
nuhll wrote:Seems like u cant place it via bots, or nothing gets requestet. Besides that, working perfectly. Many thanks.
This chests are for player supply, so tou must place it by youself, one for big part of factory is enough.

Please post any error or when you haven't, then please post about after few weeks.

Grüße
darfrei

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2041
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: [REQUEST] [NICE IDEA] Private Buffer chest

Post by darkfrei » Sat Jan 20, 2018 11:32 pm

The mod is submitted to mod portal: https://mods.factorio.com/mod/PrivateBufferChest

nuhll
Filter Inserter
Filter Inserter
Posts: 820
Joined: Mon Apr 04, 2016 9:48 pm
Contact:

Re: [REQUEST] [NICE IDEA] Private Buffer chest

Post by nuhll » Sun Jan 21, 2018 12:02 am

Thanks! So far didnt noticed bugs.

Does the chest automatic have the same slot amount as the player?

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2041
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: [REQUEST] [NICE IDEA] Private Buffer chest

Post by darkfrei » Sun Jan 21, 2018 12:23 am

nuhll wrote:Thanks! So far didnt noticed bugs.

Does the chest automatic have the same slot amount as the player?
You are welcome! The same, but not more than 36.

nuhll
Filter Inserter
Filter Inserter
Posts: 820
Joined: Mon Apr 04, 2016 9:48 pm
Contact:

Re: [REQUEST] [NICE IDEA] Private Buffer chest

Post by nuhll » Sun Jan 21, 2018 12:36 am

Perfect.

nuhll
Filter Inserter
Filter Inserter
Posts: 820
Joined: Mon Apr 04, 2016 9:48 pm
Contact:

Re: [REQUEST] [NICE IDEA] Private Buffer chest

Post by nuhll » Sun Jan 21, 2018 3:17 am

okay first crash, i put accidently for one second a - in it. Instant crash to main menu.

Also, could you make the chest bigger? Maybe via research? Not all my requestet items fit into it :/

Xelan
Burner Inserter
Burner Inserter
Posts: 17
Joined: Fri Feb 17, 2017 4:09 pm
Contact:

Re: [REQUEST] [NICE IDEA] Private Buffer chest

Post by Xelan » Tue Jan 23, 2018 8:57 am

Very very nice idea. Just gave it a try though and it doesn't seem to work :?
Yes, the mod is enabled and yes I placed the chest by hand. Heavily modded game though with full suit of bobs and pyanodons coal+fusion, which might be the issue.
Oh and also, is it possible for the private chest to be a seperate entity? I also use the chests to buffer large amounts of concrete and ammo, which wouldn't be possible if all buffer chests always request my stuff.

And a bigger chest would be nice indeed with bobs, since you can request more then 36 items in the lategame. I for one play with the warehousing mod too, so there might be a possible optional variant with a private buffer store-/warehouse

nuhll
Filter Inserter
Filter Inserter
Posts: 820
Joined: Mon Apr 04, 2016 9:48 pm
Contact:

Re: [REQUEST] [NICE IDEA] Private Buffer chest

Post by nuhll » Tue Jan 23, 2018 2:26 pm

I guess the chest should scale with how much a player can request and scale with the inventory a player has.

If that is poissible, just let us place multiple near, and they become one bigger chest?

Post Reply

Return to “Ideas and Requests For Mods”

Who is online

Users browsing this forum: No registered users