[Request] - Bulk Transportation

Started by Olek, May 22, 2014, 02:00:58 AM

Previous topic - Next topic

Olek

With all the futuristic tech in game I find it a bit underwhelming that all my colonists are still running around and carrying stuff around by hand, is it at all possible to mod in wheel barrows or something similar? something that could increase their carrying capacity? even backpacks.

Crimsonknight3

reminds me of gnomoria. that game is extrenely similar to rimworld and those gnomea are very low tech but they have wheel barrows lol

pawnstorm

This is a really nice idea, but it'd be pretty hard to implement with the way rimworld handles jobs. Jobs are just given to pawns with a single target (which can be a thing or a location). I suppose it'd be possible to keep collecting things that are of the same type, but managing the storage reservations would be an issue, especially when odd things happen like the job gets interrupted.
Another thing I think would be hard to do right is drawing the wheelbarrow correctly in relation to the colonist using it. If the colonist is moving up, the colonist would have to be drawn over the wheelbarrow, if he's moving down it's the other way around.
Also, pathing would be tricky. You'd have to take into account that one square ahead of the colonist also has to be a passable square, since that's where the wheelbarrow is.

Rousel

Quote from: pawnstorm on May 23, 2014, 06:07:47 AM
This is a really nice idea, but it'd be pretty hard to implement with the way rimworld handles jobs. Jobs are just given to pawns with a single target (which can be a thing or a location). I suppose it'd be possible to keep collecting things that are of the same type, but managing the storage reservations would be an issue, especially when odd things happen like the job gets interrupted.
Another thing I think would be hard to do right is drawing the wheelbarrow correctly in relation to the colonist using it. If the colonist is moving up, the colonist would have to be drawn over the wheelbarrow, if he's moving down it's the other way around.
Also, pathing would be tricky. You'd have to take into account that one square ahead of the colonist also has to be a passable square, since that's where the wheelbarrow is.

There must be some part of the colonist thingdef that defines how much a person can carry? with some .dll I would think some one can make this stat subject to conditions, such as I've seen a mod that gives damage mitigation, so it could say give them 45+ to that definition when wearing a back pack?

mrofa

Colonisty dont have specification how much they can carry, did see that on compression mod, when you unpack a crate and you get 10 weapons in one square. Colonist then will take all that 10 weapons at once and put them in storage :D
All i do is clutter all around.

Austupaio

I'm not positive, but they do seem to show a strong preference to carry 1 weapon, or 75 resources per hauling trip.

pawnstorm

I think they just haul one stack of anything. Whether an item is stackable or the amount that can be stacked is defined elsewhere. With backpacks, you'd have the same problem drawing them as with wheelbarrows. Aside from the drawing issue, it'd probably be possible to allow colonists to carry an extra stack of something by rewriting the jobdrivers to pick up another stack and handle the extra storage reservation. I don't think it's worth the effort though.

Crimsonknight3

Quote from: pawnstorm on May 25, 2014, 03:18:40 PM
I think they just haul one stack of anything. Whether an item is stackable or the amount that can be stacked is defined elsewhere. With backpacks, you'd have the same problem drawing them as with wheelbarrows. Aside from the drawing issue, it'd probably be possible to allow colonists to carry an extra stack of something by rewriting the jobdrivers to pick up another stack and handle the extra storage reservation. I don't think it's worth the effort though.

Thats how wheelbarrows in gnomoria work, workers can still only transport 1 kind of item but taking a wheel barrow increases the amount of items they can carry

Austupaio

Quote from: pawnstorm on May 25, 2014, 03:18:40 PM
I think they just haul one stack of anything.
Yes, but they'll make an effort to stack together things until it reaches 75. This is especially apparent when you tell them to pick up several small stacks, such as from fallen pods.

pawnstorm

Quote from: Austupaio on May 25, 2014, 04:28:30 PM
Quote from: pawnstorm on May 25, 2014, 03:18:40 PM
I think they just haul one stack of anything.
Yes, but they'll make an effort to stack together things until it reaches 75. This is especially apparent when you tell them to pick up several small stacks, such as from fallen pods.
Until it reaches the max stack count, which happens to be 75 for a lot of items. Try hauling silver, they'll carry a lot more of that than 75. They carry one stack, and the amount of items that go in a stack is defined elsewhere.

Austupaio

Oh, that's interesting. I assumed 75 was default since I hadn't seen anything go above that. Taters, metal, mod materials and such have all been 75 and I didn't notice the silver. My bad then.

SSS

The thingdef for the resource/item defines how much of it can be stacked together in the stackLimit tag.

Crimsonknight3

Quote from: SSS on May 25, 2014, 06:59:07 PM
The thingdef for the resource/item defines how much of it can be stacked together in the stackLimit tag.

Using an assembly though is it possible to dynamically change the defined stack size? If so, then its totally plausible to add wheelbarrows which, when a pawn is using will change the defined stack size of items by a multiplier, 2x for basic wheel barrow 4x for electric wheel barrow or something haha

SSS

Quote from: Crimsonknight3 on May 26, 2014, 10:07:18 AM
Quote from: SSS on May 25, 2014, 06:59:07 PM
The thingdef for the resource/item defines how much of it can be stacked together in the stackLimit tag.

Using an assembly though is it possible to dynamically change the defined stack size? If so, then its totally plausible to add wheelbarrows which, when a pawn is using will change the defined stack size of items by a multiplier, 2x for basic wheel barrow 4x for electric wheel barrow or something haha

I honestly don't know. I'm lost when it comes to dll's. :p

pawnstorm

#14
Maybe you can, but it's easier to just put multiple stacks in the wheelbarrow.

Edit: I would consider making a mod for this if I can find an elegant solution to these two problems:

1. How do I draw the wheelbarrow in the right location without making it look silly?
Consider a colonist moving around a corner with the wheelbarrow, if the wheelbarrow is one square ahead of the colonist and facing in the same direction, he'll push it into the wall.
Or imagine the colonist has to go through a door first. He'll push the wheelbarrow onto the closed door square, then open the door, and then continue on his way.
I suppose I could solve this by making a little cart which they drag behind them and which follows the same path, but I'd prefer wheelbarrows and this still leaves me with problem number 2:

2. How do I handle storage reservations when a colonist gets interrupted while hauling things with the wheelbarrow?
Before colonists haul things, they reserve a storage location for it. Suppose a colonist is carrying some stacks of potatoes in his wheelbarrow, but something happens that makes him stop his job (simplest example, he gets drafted), all the storage reservations will be lost and there's no guarantee there will still be enough storage locations available when another colonist picks up the job again. What should happen to the stacks of potatoes that are in the wheelbarrow? If they stay in the wheelbarrow, the wheelbarrow can't be used for anything else. Should they be thrown out of the wheelbarrow? There's no guarantee that there will be enough empty squares around the wheelbarrow to hold those potatoes. I could drop them all in the same square below the wheelbarrow, but squares aren't supposed to hold multiple stacks.