Page 1 of 1

Cooperative Carting

Posted: Wed Jan 06, 2021 12:05 pm
by Xandrea
So we can already have player assistance for heaving items but, what about cart pulling? If there could be an extra person pushing or pulling the handcart it could help reduce energy costs and travel time.

Re: Cooperative Carting

Posted: Thu Jan 07, 2021 10:44 am
by Rias
This is something I've wanted to figure out for a while. Movement (room-to-room) mechanics in general are finicky though, and adding pulled/dragged items makes it moreso, and group mechanics even moremoreso. So I want this to be a thing, but the amount of work required makes it fairly low priority. I'll give it an official spot on the to-do list, though!

Re: Cooperative Carting

Posted: Thu Jan 07, 2021 1:49 pm
by nobody
I had a thought about this with regards to programming and thought I would share:
  • Create an ongoing command (assist) that requires a target in one's current group (e.g. join Xandrea; assist Xandrea)
  • Prohibit anyone from assisting themselves.
  • If a person leaves the group, the assist status is canceled. Include it in whatever functions currently break group status.
  • If a person is pushing or dragging, in the function(s) that determines energy cost, check for anyone in the group with the assist status before checking the primary pusher's strength attribute/buffs, and divide out the energy and RT costs, and push them out appropriately within that function to the pusher/dragger and anyone in the group assisting them.
  • Have the push function check appropriately for strength attributes/buffs.
Setting it up this way means that there aren't ever two people pushing a cart (in different directions or otherwise). It's probably still a steep amount of coding though.

Edit to add: And then make assist require not hiding, and either prevent hiding or have hiding break assist. *sigh*
Edit to add 2: There also needs to be some kind of flag such that *pushing* or *dragging* prevents you from *assisting* and vice versa. This seems like the easiest way to prevent two people pushing two carts from assisting each other, although the divided energy and RT should theoretically be conserved, it's still silly.

Re: Cooperative Carting

Posted: Thu Jan 07, 2021 1:54 pm
by Rias
Not a bad idea! That could be a good way of going about it. Thanks.