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

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

Previous topic - Next topic

Rock5

Definitely good ides from Famous Shoes.


       
  • 1-5. Even though, yes, the teleporter can provide these functions, I like the idea of a low tech solution. Seems over the top to have a high tech device like a teleporter just to move an item a couple of squares. I particularly like the underground idea, although I don't know if thats possible. Can you have a 1x3 construction that is impassible on the ends but passable in the middle? But if it was possible you could use it to allow people to pass, to cross walls and even to have crossed belts. So multiple uses. In fact I'd probably prefer that than the teleporter which, I agree with Famous Shoes, is a bit off-lore. If people want a teleporter it's probably better off as a separate mod.

       
  • 4. People are talking about item deterioration on the belt but I think nothing deteriorates on the belt. Correct me if I'm wrong.

       
  • 8. Items jam already don't they? That annoys me I admit but I like the idea of items occasionally falling off, hopefully not too often.

       
  • 9. Not sure I follow that but to save power how about an unpowered belt? Items wont move forward unless pushed from behind? I'm not sure how many people would find a use for it though and be happy to have a belt full of items they can't reach.

       
  • 10. I have to second that facepalm. It's definitely a nice solution to have 1 go straight and 2 go left or right depending on what's connected. Acting as a splitter too is just a bonus. It's simpler than my suggestion of somehow sensing what sides are connected and adjusting accordingly, which would be hard to program and confusing to users.

       
  • 12. Another brilliant idea. Definitely belong in another mod. If I had the skill I'd jump on that project right away.

Quote from: MsMeiriona on February 23, 2015, 05:51:15 PM
I get the issue with the selector. It's fairly annoying the limits we currently have, I had wanted to do a selector with, for example, using NSWE, N/S Input, W/E output, instead of W/S Input N/E Output. I don't know how it would be coded without making a different selector to cover every option once rotation is accounted for, which would be just waaay too much because it'd be like, 12 different combinations or something (math was not my strong subject)
I suggested such a selector to Noone but he didn't implement it. And I ended up agreeing it was a wise choice. It would be an unnecessary extra piece because you can simulate a left/right selector with the current selector using only 1 extra square.
Rock5 [B18] Mods
- Butchers Can Count Meat
- Sun Lamp Planner
- JTZoneButtons
- RimSearch
- JTExport

TehJoE

Quote from: Rock5 on February 24, 2015, 03:29:40 AM
Definitely good ides from Famous Shoes.


       
  • 1-5. Even though, yes, the teleporter can provide these functions, I like the idea of a low tech solution. Seems over the top to have a high tech device like a teleporter just to move an item a couple of squares. I particularly like the underground idea, although I don't know if thats possible. Can you have a 1x3 construction that is impassible on the ends but passable in the middle? But if it was possible you could use it to allow people to pass, to cross walls and even to have crossed belts. So multiple uses. In fact I'd probably prefer that than the teleporter which, I agree with Famous Shoes, is a bit off-lore. If people want a teleporter it's probably better off as a separate mod.

I don't think it's possible to mix passability and impassability like that... There is still the very real problem of rendering order which is actually not trivial to change. As much code as I've written for this mod so far, the entire process of rendering items on the belt is still magic to me. I've been considering a "crossover" component to let belts cross but I'm not sure it's got enough uses to be an entire component. And for me personally, the overkill of using teleporters to break up conveyor belts is part of the charm of the mod ;)

Quote from: Rock5 on February 24, 2015, 03:29:40 AM

       
  • 4. People are talking about item deterioration on the belt but I think nothing deteriorates on the belt. Correct me if I'm wrong.

Beyond weird edge cases like completely-surrounded belts becoming "outdoors" (a problem that will be fixed in the next release), items should only deteriorate on belts if they would have deteriorated in that cell otherwise, i.e. the belts don't affect item deterioration at all.

Quote from: Rock5 on February 24, 2015, 03:29:40 AM

       
  • 8. Items jam already don't they? That annoys me I admit but I like the idea of items occasionally falling off, hopefully not too often.

They should not. If you have any situations that produce jams in v0.9.0+, please submit a bug report on github.

Quote from: Rock5 on February 24, 2015, 03:29:40 AM

       
  • 9. Not sure I follow that but to save power how about an unpowered belt? Items wont move forward unless pushed from behind? I'm not sure how many people would find a use for it though and be happy to have a belt full of items they can't reach.

I don't know about you guys but power is basically free in this game so far. I don't see a strong utility for unpowered push-only belts. Maybe a fall-back feature for the base belts when their power is cut, but I wouldn't count on it...

Quote from: Rock5 on February 24, 2015, 03:29:40 AM

       
  • 10. I have to second that facepalm. It's definitely a nice solution to have 1 go straight and 2 go left or right depending on what's connected. Acting as a splitter too is just a bonus. It's simpler than my suggestion of somehow sensing what sides are connected and adjusting accordingly, which would be hard to program and confusing to users.

"Hard to program"?  That a challenge? 8)

Anyway, all components already sense connected sides and only send to those if that's what you mean. If we still had any non-symmetrical components I would actually consider putting some mode-toggle buttons in for some of them. A symmetrical selector is in the next release.

Quote from: Rock5 on February 24, 2015, 03:29:40 AM

       
  • 12. Another brilliant idea. Definitely belong in another mod. If I had the skill I'd jump on that project right away.

Skill isn't something you just have, it's something you create yourself. So if you have a project you want to see happen, make it happen  ;)
Do you remember, how many breads have you eaten in your lifetime?

Rock5

Quote from: TehJoE on February 24, 2015, 12:31:52 PM
"Hard to program"?  That a challenge? 8)

Anyway, all components already sense connected sides and only send to those if that's what you mean. If we still had any non-symmetrical components I would actually consider putting some mode-toggle buttons in for some of them. A symmetrical selector is in the next release.

What I meant was have 1 input and 3 possible outputs that allows you to use any 2 of the 3. It would require different textures depending on which 2 are connected. For instance if you have the left and forward connected then you would set left as 1 and forward as 2. If you had the left and right connected then you would set left as 1 and right as 2, etc. But I don't think it's necessary and might be confusing to use. Famous Shoes idea is better and simpler.

Quote from: TehJoE on February 24, 2015, 12:31:52 PM
Skill isn't something you just have, it's something you create yourself. So if you have a project you want to see happen, make it happen  ;)

I'm all for it but every time I've approached languages like c# I've found them too difficult. Even now when I look into mod dlls I'm finding it too hard to get started. It doesn't help that there doesn't seem to be any documentation or guides anywhere. And by guides I mean guides that explain things step by step, not "copy and paste this, compile and you've made your first dll". Or even a references that explains the different values in xmls.

What I'd like to see are separate guides for different features of mod making. For instance a step by step guide to make simple xml mods such as making item, recipes, research etc. There probably are some of those. But then also a guide to add a button to an item, a guide to adding a comp to something (is that what they are called?), a guide to adding a process that runs every tick. I just look at everything and I don't know where to start. It doesn't help that c# isn't like languages I've dealt with before and I've never dealt with dlls before. I sort of understand that dll probably define some classes or objects that are then referenced in the xmls but that's about all I understand.

Yeah so if you have some advice on how I can start learning this stuff I'm all ears.
Rock5 [B18] Mods
- Butchers Can Count Meat
- Sun Lamp Planner
- JTZoneButtons
- RimSearch
- JTExport

Famous Shoes

The various additional conveyor types I was ruminating on could, I think, be done without stepping out of the bounds of what's already in A2B. Except for the overhead conveyor, that's undiscovered country. Here's a few thoughts on how they might work, just in case any of these are of interest to A2B Corp.


  • Step over: a 1x3 piece that, when oriented horizontally, moves items up or down at it's center, can be walked and stood upon, otherwise no special behavior. As the ends of the belt would be just peeking out a pixel or two at the sides of the step over ladder, it needn't have animation or display of the item being conveyed. Or, just a 1x1, but I'm guessing the visual would be too cramped to properly convey the piece's definition to the user, i.e., these are stairs, a bridge, and stairs, plus the 1x3 could make it more of a tradeoff than a freebie standable.
  • Underground: three 1x1 pieces, the first two floor tiles, with no item visibility, just a straight and a corner, likely a minor variation on something like the vanilla metal tile's texture could be plenty--perhaps with a faint industrial yellow/orange stripe indicating straight or corner. The third piece could be texture variation of the current straight piece, this one looking like it's lifting items from a hole on one end and mating smoothly with the standard conveyor at the other. To avoid having to worry about scaling items as they animated from underground to waist level, one could make the texture that of a covered conveyor, perhaps similar to what you see at some airports. If one were feeling pedantic, these could be setup so that only the "lifter" belt could convey items to and from the undergrounds, but I'd bet users would be self-enforce that just fine without a real restriction.
  • Doorway: I suppose this is a bit new, as it would change its heat equalization behavior based on being open or closed, while current segments (I believe) always equalize. And, it would need control code to open and close. Otherwise, it'd look the same as the standard straight conveyor segment, but with a hint of a sliding door and frame at one end.
  • Overheads: there's no getting around these being quite a departure and possibly impossible. I don't think I've seen Rimworld animate a pawn moving under anything, much less a pawn moving under something with an item moving above that. Quite a challenge. Probably too hard. Even old Mushinto would probably have to give it a miss.  ::)

Again, I'd hesitate to say these are even suggestions, just thinking aloud in case you lot are interested in cherrypicking anything there.

PS I originally missed that you're using GitHub. So my apologies for filling up this thread, any more bad ideas I'll post over there.

TehJoE

#19
Quote from: Rock5 on February 24, 2015, 01:45:34 PM

I'm all for it but every time I've approached languages like c# I've found them too difficult. Even now when I look into mod dlls I'm finding it too hard to get started. It doesn't help that there doesn't seem to be any documentation or guides anywhere. And by guides I mean guides that explain things step by step, not "copy and paste this, compile and you've made your first dll". Or even a references that explains the different values in xmls.

What I'd like to see are separate guides for different features of mod making. For instance a step by step guide to make simple xml mods such as making item, recipes, research etc. There probably are some of those. But then also a guide to add a button to an item, a guide to adding a comp to something (is that what they are called?), a guide to adding a process that runs every tick. I just look at everything and I don't know where to start. It doesn't help that c# isn't like languages I've dealt with before and I've never dealt with dlls before. I sort of understand that dll probably define some classes or objects that are then referenced in the xmls but that's about all I understand.

Yeah so if you have some advice on how I can start learning this stuff I'm all ears.

Unfortunately a lot of this stuff is still heavily undocumented, especially with changes between Alphas breaking and outdating certain things... The best advice I can give you to figuring out how to do C# dll modding in RimWorld is to download JetBrains' dotPeek decompiler and use it to browse RimWorld's Assembly-CSharp.dll and the dlls of other mods that interest you, and browse open-source mods' source code. (Just don't steal others' work!) C# is really not all that hard to understand compared to some other languages, it just takes some practice. Programming is a highly sought-after skill for a reason though - don't expect everything to come easily!

Basically, play with code, make things, break things, change things, and you'll develop an understanding of how it all works. Haplo's example PowerGeneration mod is a good start if you read the comments inside the source code - it explains several things that will have you well on your way to making mods.

And you're pretty much right about what a dll file is - it's a file containing a bunch of classes that all talk about each other and do a whole bunch of things, and sometimes reference the classes in other dll files. The main .exe file usually loads all the classes in those dlls and puts them to work.
Do you remember, how many breads have you eaten in your lifetime?

noone

I second TehJoE's suggestions on getting modding with Rimworld. As you may know, the first version of A2B was built up entirely by altering Haplo's dark matter generator files. https://ludeon.com/forums/index.php?topic=3408.0

I never modded before, and used mimetism to figure out how to get the stuff I wanted. Of course, the A2B mod has since massively evolved as other more experienced people offered to help - that's the power of this community, and why getting it all open to suggestions on Github is the best thing I ever did.

Note that I have a fair bit of Python experience, and had very old and rusty C++ knowledge. Looking at the code structure of something "simple" like Haplo's code and moving on from there is how I would suggest you to approach the problem if you have any kind of previous programming experience. After all, to a first order, all programming languages are the same, it's just a difference in the vocabulary that differs (in the first order, the grammar is the same).

Rather than figuring out everything before getting started, just get started and figure things out on the way.

One step by step guide could be :
1) get Haplo's mod to compile as is, and run smoothly in the game.
2) rename all the necessary files to whatever mod name you fancy, and see if you can still compile things
3) think about the key elements required for your code to work. In your case, if you want to build machines, I'd suggest checking for near-by hoppers. The rest, you could all code it.
4) I am using Mono Develop for doing the coding, and it has an 'autocompletion' feature. I tend to just look around for generic variables and such, then use autocompletion to see their properties, until I find what I am looking for.
5) Sure, that may not give you an elegant code, but who cares, if it works ? And if it doesn't, you can always ask for help around. It is a lot more likely for you to get help on an existing albeit buggy mod than just asking pople how to do things from scratch. That's because there's so many million ways to do things from scratch - but fixing a bug is "usually" easier and more straightforward.
6) Haplo's tutorial hasn't been updated to Alpha9, but it should be soon, one would hope.

Hope that helps. Ultimately, TehJoE's advice is right. Dive right in, and take things one step at a time. Looking around for other 'machines' mod with the soruce could also help - the void hopper could be one of these.

Finally, there's quite a few people interested in machines around ... if you were to put something small together, I am sure it could gain momentum.





bullet

after I made a small factory like in attachment
I started to have a stable lags (freezing every 1-2 seconds on max speed)  :'(

[attachment deleted due to age]

TehJoE

Quote from: bullet on February 24, 2015, 06:36:32 PM
after I made a small factory like in attachment
I started to have a stable lags (freezing every 1-2 seconds on max speed)  :'(

Are there any errors in the console? I don't know if Alpha 9 fixed it or not, but in Alpha 8 I personally had troubles with a lot of construction designations on the map at once causing the freezing you describe. Are you sure that's not going on? If not, try cutting the power to the belts and see if the lag stops. Let me know what you find.
Do you remember, how many breads have you eaten in your lifetime?

bullet

I had some errors but these not related with this mod and not caused the same lags before.

Also I use 275x275 map size (which not recommended) and at this moment I have lots of different items on the map
And game restarting seems like slightly helped. And if screen not focused on the factory, it's helps also (and if screen movement only in pause) And yep, after turning off the factory, all lags are gone

I remember that in the Alpha 8 were similar lags, but latest mod updatings seems like  to fix these problems. Last time when I was playing in the alpha 8 I had a lot of conveyors and there was no lags

Yas

Hey guys, just wanna say how much those new icons and the new merger improves the whole mod concept.
Both helps a real lot. Thank you for taking those suggestions!

Yas

P.S.: Loaders still have standard priority "Important". And I still dont get that. is there a reason for?

Having loaders at important makes my colonists carrying stuff all over the map and ignoring normal storage. So I have to put every loader to "normal" which can get quite frustrating sometimes.

Just wondering if there is a reason for and I dont get it. Or wouldnt it be better to put standard to normal in xml by company itself?

noone

Well, I remember choosing the priority to be larger than normal, but I can't really remember why ... ;)

I agree with you, and don't really see a good reason for it right now. Probably worth changing this to normal as you suggest.

Note that in the next release, all items will be "forbidden" by default in the Loader's list, so your colonists will not start hauling anything until you set up the Loader as you want/need. That should help as well ...

Yas

Quote from: noone on March 04, 2015, 05:07:54 PM
Well, I remember choosing the priority to be larger than normal, but I can't really remember why ... ;)

I agree with you, and don't really see a good reason for it right now. Probably worth changing this to normal as you suggest.

Note that in the next release, all items will be "forbidden" by default in the Loader's list, so your colonists will not start hauling anything until you set up the Loader as you want/need. That should help as well ...

Sounds fair to me. A "Allow all" button would also be nice though :)

1000101

#28
So, I've been using A2B for a while through the different alpha releases and I couldn't imagine playing without it.  Seriously, I basically held off on Alpha 9 until A2B was updated.  Latest release of A2B adding a simple splitter and merger is a great addition and I had a couple ideas.

First, loaders get a toggle option for "wait for full stack" which will ... wait ... for a full stack ... before sending it down the line.

Second, a "soft" selector-splitter hybrid which has one filtered output and two unfiltered outputs.  The key with this hybrid belt section is that it will send accepted items through normally unless it's destination is full then it will use the reject paths which all unfiltered items use.  I came up with the idea for this belt after trying to prevent "log jams" in my system.  I came up with a solution which will yield a 75% success rate in filtered paths with 0% jams.

See the attached mock-ups to help better understand what I mean by the "soft" selector-splitter hybrid.  It basically reduces a complex 2x3 configuration down the one piece.

[attachment deleted due to age]
(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

passi965

#29
Hey guys Pascal here,

i got a little question about the conveyor belts

so the question is:
does food spoil when its inside an Conveyor belt?

So if food does spoil, my system i made in a creative world is useless http://puu.sh/gLX6q/8cba35f20d.jpg
but if not than that system seems pretty usefull

And i know that Conveyor belts sort of act like walls, so the conveyor belts are to small to support a roof (and let through heat) but high enough to be inpassable.