[A13] A2B: conveyor belts & co. [v0.13.2]

Started by A2Bcorp, February 21, 2015, 01:23:14 AM

Previous topic - Next topic

1000101

I plan on updating this mod "soon" to allow the belts to be minified.  I'll also change the default 1000w (which was more of a debugging thing) to 10w if it can't find the base belt component.

Not sure why this would happen, I took a look at UOM to see if that was changing the defName but it's not.  I can't imagine any other mod is changing things with A2B of that nature which means that the code itself is just failing for some people.  There is also the graphic issue which is probably what's causing the lag for people.
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By

Epson


justarandomgeek

I'm thinking about building an inline storage part (similar to MD2's storage bins, but directly on the belt) that automatically dispenses a stack of the stored item onto the belt when both the belt and a designated stockpile are empty of that item. What's the best way for me to try to query the items that are currently riding within the entire belt system, or at least within a given segment of belts?

1000101

The sources are all available on github, so you can download and make changes as you like.

The base belt ThingComp (which all other belt components inherit from) defines a ThingContainer.  This is what a belt component currently has on it.  If the output vector (cell) has belt section in it with the proper input vector, the belt component checks if that belt's ThingContainer is empty.

The more complicated parts (underground components) can be hard to understand, but the basic components (straight belt, curved belt) are fairly easy to follow and most of the logic is handled internally by the main ThingComp.
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By

justarandomgeek

Okay, what I want to do is find the list of all items that are on any belt component that's potentially downstream from me. Is the best way to just brute force walk down the entire belt, one segment at a time, and add up all the stuff I find?

1000101

Unfortunately there is no other way than that.  That is exactly what the underground belt sections do to find a "powered lift."  They are more complicated though since the underground belt sections are inherently directionless so, initially, they have to check every cardinal direction and walk through each belt they find (however, they try to pass straight through before cornering).

But yes, you will need to walk the tree to find what you need.  There are extension methods to get belt sections on a given layer (underground/surface) though which will make your life easier.  Unless you are planning some sort of "underground parking" for items, you will want to use the surface layer extensions.
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By

justarandomgeek

My original idea was some kind of inline item-packing device, but I'm currently working on a 'Picker' that grabs from adjacent storage (like stockpiles or MD2's bins). This can be combined with Unloaders and stockpiles/bins to make inline storage. But I don't want to just be continually cycling the stuff though and wear out my belts, so I'm trying to make it dispense only when needed. I think as a first approximation though, I'm just going to make a sensor to put in the destination cell and just trigger Pickers on a very slow cycle. It'll over-dispense sometimes, but it's a lot less work!


mujina

Any news when this will be updated? :( Im waiting on this mod before I return to try out all the changes (ive not played in a very long time!)

1000101

#218
I have an updated version for A12 which adds some new features, but I am busy getting CCL updated to A13 right now.

New features to expect:

  • No-power bug for underground belts after loading a save game has been fixed
  • Belt components will draw less power while not actively moving items
  • Belts will "roll stacks forward" if the next belt contains a partial stack of the same thing (ie, a->b, both contain steel but "b" only has 10 steel, up to 65 steel from "a" will continue moving into "b" to make a complete stack)
  • Selectors have an option to output to non-belts and can program the selection from a non-belt storage buildings storage settings
  • Loader "overloading" where the loader will immediately "take" the item allowing pawns to continually load the belt

I hope to have CCL ready soon for A13, it's currently in testing by other modders (those that have joined the RimWorld modding slackchat have access to it).  Once the bugs have been quashed in testing, CCL will be released and I will be focusing on A2B.
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By

berni1212

Quote from: 1000101 on April 12, 2016, 03:12:52 PM
I have an updated version for A12 which adds some new features, but I am busy getting CCL updated to A13 right now.

New features to expect:

  • No-power bug for underground belts after loading a save game has been fixed
  • Belt components will draw less power while not actively moving items
  • Belts will "roll stacks forward" if the next belt contains a partial stack of the same thing (ie, a->b, both contain steel but "b" only has 10 steel, up to 65 steel from "a" will continue moving into "b" to make a complete stack)
  • Selectors have an option to output to non-belts and can program the selection from a non-belt storage buildings storage settings
  • Loader "overloading" where the loader will immediately "take" the item allowing pawns to continually load the belt

I hope to have CCL ready soon for A13, it's currently in testing by other modders (those that have joined the RimWorld modding slackchat have access to it).  Once the bugs have been quashed in testing, CCL will be released and I will be focusing on A2B.

This will be when :) if i may ask i love this mod and build a lot of Systems with it mostly Using Industrilation with it the deep mine and the More Mechanoides so they mine it put it on the Belt and the Pawns Store it in my Storage room :) i need it for A13  :)
Thanks for making this awsome mod and srry English isn't my Main language so :D
Lost Soul in the World of Rimworld

A2Bcorp

Alpha 13 Update

This builds against RimWorld Alpha 13 (build 1135)

[adds]

  • Loader "overloading"
  • Stacks on can "roll forward"
  • Selectors can output directly to the floor/non-belts
  • Selectors can be programmed by stockpiles or any storage building they output to (on the "1" output)
  • "Low power mode" for belts which are not actively moving items
  • Surface belts are minifiable, no need to rebuild what you can just move!

[fixes]

  • Underground belts "no power on game load"
  • Undertakers disappearing when switching operational mode

notfood


Tinkerer

This looks awesome! I can't wait to try this!

Corbald

#223
I can't seem to connect the undertaker or covered belts to power. I've run power along side, over the top and connected it to other components, but no dice. The 'Change Mode' button is a red X and doesn't seem to do anything. I'm not going to consider this a bug until I'm sure that it's not just me misunderstanding.

Works fine in a new game on a new world. (Can't believe I didn't try it before posting...)

1000101

A2B should be fine to use on an existing save but with mods you can never be 100% sure.  Also, there were some major internal changes between RimWorld A12 and A13 which the modding community still haven't fully discovered the ramifications of.

Generally speaking, when adding mods, it's always best to,
(a) restart the game after opening the mod menu (even without any changes due to the game auto-reloading data (which can break things));
(b) create a new world, and;
(c) create a new game.
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By