RepairChest Mod
RepairChest Mod
Would be nice if I could have a chest which request all the necessary materials to repair a given area. Then, the construction bots can use it as a source.
Heck, I am working on learning how to mod right now so I can do that sort of thing.
Heck, I am working on learning how to mod right now so I can do that sort of thing.
-
- Inserter
- Posts: 42
- Joined: Sun May 24, 2015 9:08 am
- Contact:
Re: RepairChest Mod
I suppose you could simply use a requester chest and insert the contents into a roboport.
Not really too hard to make a mod for either, so I would highly suggest you take a few hours to learn the API and how to add new items.
Not really too hard to make a mod for either, so I would highly suggest you take a few hours to learn the API and how to add new items.
Re: RepairChest Mod
Got to the point of having a working "repair chest" but it's still basically a copy of the requester chest.
From now on, I'll have to write new code and make it do something different. Currently, I should be focused on identifying all objects within a limited area. Say, 5x5.
From now on, I'll have to write new code and make it do something different. Currently, I should be focused on identifying all objects within a limited area. Say, 5x5.
Re: RepairChest Mod
I am trying to find the code for various logistic modes, but I can't find it anywhere.
I don't know where to look even. I think I'll have to look at different mods and see how they do stuff.
I don't know where to look even. I think I'll have to look at different mods and see how they do stuff.
Re: RepairChest Mod
I am not sure what you are exactly looking for, but if I correctly remember TreeFarm's fieldmk2 (or its overlay can't remember) is extending from logistic chest.kiba wrote:I am trying to find the code for various logistic modes, but I can't find it anywhere.
I don't know where to look even. I think I'll have to look at different mods and see how they do stuff.
You can give it a try I guess.
Re: RepairChest Mod
I want to know:semvoz wrote:kiba wrote:
I am not sure what you are exactly looking for, but if I correctly remember TreeFarm's fieldmk2 (or its overlay can't remember) is extending from logistic chest.
You can give it a try I guess.
1) How the robotic network gets a list of items to supply a given area.
2) How to make the robots use the chest as a source.
But baby step first, or at least find where should I take a baby step.
The first question that pop up in my mind is how to access the content of the chest. That I will figure out tomorrow.
Re: RepairChest Mod
I am just guessing here, but I am not sure there's such area you are talking of unless you implement it.
If my understanding is correct (and that is a big if), the list should be computed by checking each requester chest in the logistic network.
If your chest extends passive/active provider chest, the robots (logistic) should be able to access it, not sure for construction robots as they might need to take the repair pack from a roboport. Maybe you can simulate the chest behavior by automatically adding the repair pack to a roboport? But then you'll lose the control over the repair area.
Could also extends roboport and change the size of the construction area, just ideas, don't take my words as truth, I'm also a beginner in modding
Accessing the content of the chest is pretty easy but it's good exercise to search for it so I won't spoil the pleasure
If my understanding is correct (and that is a big if), the list should be computed by checking each requester chest in the logistic network.
If your chest extends passive/active provider chest, the robots (logistic) should be able to access it, not sure for construction robots as they might need to take the repair pack from a roboport. Maybe you can simulate the chest behavior by automatically adding the repair pack to a roboport? But then you'll lose the control over the repair area.
Could also extends roboport and change the size of the construction area, just ideas, don't take my words as truth, I'm also a beginner in modding
Accessing the content of the chest is pretty easy but it's good exercise to search for it so I won't spoil the pleasure
Re: RepairChest Mod
Not quite it.semvoz wrote:I am just guessing here, but I am not sure there's such area you are talking of unless you implement it.
If my understanding is correct (and that is a big if), the list should be computed by checking each requester chest in the logistic network.
The idea is that the repair chest takes a list of items in a small area. That list becomes a request list.
For example, within a five by five area, you have five turrets, one medium electric pole, 5 inserters and five transport belts.
Thus, the repair chest requests those long list of items from the logistic network to be kept there when objects go BOOM and you need to replace them. It doesn't help you replace the repair chest when it goes boom though.
Re: RepairChest Mod
I misunderstood what you were saying there:kiba wrote:Not quite it.semvoz wrote:I am just guessing here, but I am not sure there's such area you are talking of unless you implement it.
If my understanding is correct (and that is a big if), the list should be computed by checking each requester chest in the logistic network.
The idea is that the repair chest takes a list of items in a small area. That list becomes a request list.
For example, within a five by five area, you have five turrets, one medium electric pole, 5 inserters and five transport belts.
Thus, the repair chest requests those long list of items from the logistic network to be kept there when objects go BOOM and you need to replace them. It doesn't help you replace the repair chest when it goes boom though.
I thought you wanted to know how the actual logistic network was handling the requested items.kiba wrote:1) How the robotic network gets a list of items to supply a given area.
Based on what you say, I do not understand the difference with a classic provider chest then.
I am getting confused.
Re: RepairChest Mod
I think what the OP wants to do is a requester chest that can make an inventory of all entities built within a given range (20, or 50 tiles maybe), and request a few of each entity preventively. Like that, if an entity is damaged, the construction bots can rebuild faster (they don't have to fly waaaay to the storage area to get that turret or that wall : there will always be a certain amount of what's needed to rebuild close by).
Koub - Please consider English is not my native language.
Re: RepairChest Mod
I see a sort of local buffer, why notKoub wrote:I think what the OP wants to do is a requester chest that can make an inventory of all entities built within a given range (20, or 50 tiles maybe), and request a few of each entity preventively. Like that, if an entity is damaged, the construction bots can rebuild faster (they don't have to fly waaaay to the storage area to get that turret or that wall : there will always be a certain amount of what's needed to rebuild close by).
-
- Inserter
- Posts: 42
- Joined: Sun May 24, 2015 9:08 am
- Contact:
Re: RepairChest Mod
If that's the case, a few storage chests placed near areas of interest would work great, since (i'm pretty sure) construction bots can obtain repair packs from them. Call me out if i'm wrong.Koub wrote:I think what the OP wants to do is a requester chest that can make an inventory of all entities built within a given range (20, or 50 tiles maybe), and request a few of each entity preventively. Like that, if an entity is damaged, the construction bots can rebuild faster (they don't have to fly waaaay to the storage area to get that turret or that wall : there will always be a certain amount of what's needed to rebuild close by).
Just make sure it's within the logistics zone. Not sure if it matters, but it's better to be safe.
Re: RepairChest Mod
Thing with storage chests is, they get only filled with one item as long as free storage chests avilable in the system. and they get filled somwhat randomly.
But yes Construction bots can take Items out of any of the tree providing chests, the activ the passiv and the storage chest.
They however have no acess to items in requesterchests, well, items in requester chests are no longer considert avilable for the system.
But yes Construction bots can take Items out of any of the tree providing chests, the activ the passiv and the storage chest.
They however have no acess to items in requesterchests, well, items in requester chests are no longer considert avilable for the system.
Re: RepairChest Mod
This is correct!Koub wrote:I think what the OP wants to do is a requester chest that can make an inventory of all entities built within a given range (20, or 50 tiles maybe), and request a few of each entity preventively. Like that, if an entity is damaged, the construction bots can rebuild faster (they don't have to fly waaaay to the storage area to get that turret or that wall : there will always be a certain amount of what's needed to rebuild close by).
-
- Inserter
- Posts: 42
- Joined: Sun May 24, 2015 9:08 am
- Contact:
Re: RepairChest Mod
Requester chest with a smart inserter, and 2 red/green wires will fix this. Just tell it "as long as the amount of repair packs in the red/green network is over/under said amount, activate"Takezu wrote:Thing with storage chests is, they get only filled with one item as long as free storage chests avilable in the system. and they get filled somwhat randomly.
But yes Construction bots can take Items out of any of the tree providing chests, the activ the passiv and the storage chest.
They however have no acess to items in requesterchests, well, items in requester chests are no longer considert avilable for the system.
Nice to hear that construction-bots can use items from the chests. I have fun things in plan for next game I start.
Re: RepairChest Mod
Well you're aware that if you transfer items from a requester back into a storage chest creat a loop?
Item gets transferd bot comes packs it back in the requester, item gets transfered, and so on and so forth.
Afaik items in a smart chest aren'T available for bots either. So the thing would be pretty funny to watch as the bot packs the item right back into the requester chest as son as the inserter has transfered it. Sad side is that the bot is occupied by that task and not available for other tasks.
Item gets transferd bot comes packs it back in the requester, item gets transfered, and so on and so forth.
Afaik items in a smart chest aren'T available for bots either. So the thing would be pretty funny to watch as the bot packs the item right back into the requester chest as son as the inserter has transfered it. Sad side is that the bot is occupied by that task and not available for other tasks.
-
- Inserter
- Posts: 42
- Joined: Sun May 24, 2015 9:08 am
- Contact:
Re: RepairChest Mod
I didn't think of that! I suppose using an off-network requester or a belt-based one, you could work around that limitation. Smart use of smart inserters and local wire networks might also help.Takezu wrote:Well you're aware that if you transfer items from a requester back into a storage chest creat a loop?
Item gets transferd bot comes packs it back in the requester, item gets transfered, and so on and so forth.
Afaik items in a smart chest aren'T available for bots either. So the thing would be pretty funny to watch as the bot packs the item right back into the requester chest as son as the inserter has transfered it. Sad side is that the bot is occupied by that task and not available for other tasks.
It's worth noting that logistics chests have the same capabilities as smart chests, so you can hook a wire to a storage chest and then to an inserter.
It's confirmed that the chests have to be within the logistics zone, so that makes things a lot harder for me to figure out. Seems the only solution is to belt around all of your repair packs to all of the different areas.
Last edited by omega_haxors on Fri Jun 26, 2015 8:15 am, edited 1 time in total.
Re: RepairChest Mod
Yeah right, but the logistics network and the wire network are seperate things.
Bots can only take and deliver things in the supplyarea, construction bots can also construct and deconstruct in the cunstruction area.
I don't now where you want to went there, but items for construction have to be provided in the supply area. The bad thing is, any provider is equally valid.
The priority chain says only take first from activ then storage then take from passiv. if you request something, and how ever you build it if in the end it lands in a provider or stroage, which it inevetablie must because the bots have to take it, it lands in the end again by the provider. The bots don't care about wires as far as i'm aware. Neither can they grab things out of smart chests. so sooner or later your item has to land in a storage or provider chest in the supply area to be available for the constructors. And if your starting point is a requester chest, it's highly possible that the thing starts the circle anew. What might work is changing the requester to a belt feed smart chest. but that works only if the thing wouldn'T be needet at some other point. and if you would have more then one of those storages there is no guarantee that the bots grab from the nearest point. All points are equal whereever they are, as long as they are in the supplyarea of the network, which the have to be for the bots.
So in the end i don't see a reliable path to prevent that logibots grab the thing to bring it back to the start, or the constuctor grab the things near the constuction site, if all is in the same logisticsystem.
If you where to seperate the system wich does the constuction from the sytsem with the item and shortcut it with an inserter, then it would work. But that would raise new logistical problems i think. but thats where they leave me, i've no experience with more then one Network
Bots can only take and deliver things in the supplyarea, construction bots can also construct and deconstruct in the cunstruction area.
I don't now where you want to went there, but items for construction have to be provided in the supply area. The bad thing is, any provider is equally valid.
The priority chain says only take first from activ then storage then take from passiv. if you request something, and how ever you build it if in the end it lands in a provider or stroage, which it inevetablie must because the bots have to take it, it lands in the end again by the provider. The bots don't care about wires as far as i'm aware. Neither can they grab things out of smart chests. so sooner or later your item has to land in a storage or provider chest in the supply area to be available for the constructors. And if your starting point is a requester chest, it's highly possible that the thing starts the circle anew. What might work is changing the requester to a belt feed smart chest. but that works only if the thing wouldn'T be needet at some other point. and if you would have more then one of those storages there is no guarantee that the bots grab from the nearest point. All points are equal whereever they are, as long as they are in the supplyarea of the network, which the have to be for the bots.
So in the end i don't see a reliable path to prevent that logibots grab the thing to bring it back to the start, or the constuctor grab the things near the constuction site, if all is in the same logisticsystem.
If you where to seperate the system wich does the constuction from the sytsem with the item and shortcut it with an inserter, then it would work. But that would raise new logistical problems i think. but thats where they leave me, i've no experience with more then one Network
-
- Inserter
- Posts: 42
- Joined: Sun May 24, 2015 9:08 am
- Contact:
Re: RepairChest Mod
You would be surprised what you can do with the wire network.
That said, the problem boils down to what you mentioned; sooner or later you need to get resources from somewhere, and that somewhere tends to be the closest storage chest.
Although the solution may be a lot simpler than we have been thinking. Active provider from the factory. The bots will search out for storage chests when no valid target is found. Won't work as well if there's other storage chests on the same network, but a few smart inserters can filter them out.
That said, the problem boils down to what you mentioned; sooner or later you need to get resources from somewhere, and that somewhere tends to be the closest storage chest.
Although the solution may be a lot simpler than we have been thinking. Active provider from the factory. The bots will search out for storage chests when no valid target is found. Won't work as well if there's other storage chests on the same network, but a few smart inserters can filter them out.
Last edited by omega_haxors on Fri Jun 26, 2015 8:35 am, edited 3 times in total.
Re: RepairChest Mod
Yeah but you'll end up with one itemtype per storage chest as long as free storage chests available. The bots only put different items together if the find no free storage chest.