[mod] Pullable carts [1.3][pull_cart]
- Skamiz Kazzarch
- Member
- Posts: 619
- Joined: Fri Mar 09, 2018 20:34
- GitHub: Skamiz
- In-game: Skamiz
- Location: la lojbaugag.
[mod] Pullable carts [1.3][pull_cart]
Adds carts which can be pulled by the player.
Rightclick to acces inventory. The item in the first inventory slot is displayed
as visible cargo on the cart.
Shift + rightclick to start pulling the cart. While pulling the cart the players
movement speed is decreased and jumping prevented to incentivize the building of
infrastructure.
Punch it to pick it up. All items in the inventory will be dropped on the ground.
Dependencies: none
Git: https://github.com/Skamiz/pull_cart
Download :https://github.com/Skamiz/pull_cart/archive/main.zip
License: MIT
Important note: This is NOT a mod for MTG. It is intended for games/modpacks in which the transport of items is a much bigger factor of the gamplay. As such there is no default crafting recipe and it is left up to the creators of such games/modpacks to balance the cost of obtaining aditional movable inventory.
Rightclick to acces inventory. The item in the first inventory slot is displayed
as visible cargo on the cart.
Shift + rightclick to start pulling the cart. While pulling the cart the players
movement speed is decreased and jumping prevented to incentivize the building of
infrastructure.
Punch it to pick it up. All items in the inventory will be dropped on the ground.
Dependencies: none
Git: https://github.com/Skamiz/pull_cart
Download :https://github.com/Skamiz/pull_cart/archive/main.zip
License: MIT
Important note: This is NOT a mod for MTG. It is intended for games/modpacks in which the transport of items is a much bigger factor of the gamplay. As such there is no default crafting recipe and it is left up to the creators of such games/modpacks to balance the cost of obtaining aditional movable inventory.
Last edited by Skamiz Kazzarch on Sun May 30, 2021 14:51, edited 3 times in total.
- apercy
- Member
- Posts: 645
- Joined: Wed Mar 25, 2020 16:31
- GitHub: APercy
- In-game: APercy
- Location: Pinheiral - RJ - Brazil
Re: [mod] Pullable carts [1.0][pull_cart]
You forgot to make the recipes.
but fun mod at all
but fun mod at all
- Skamiz Kazzarch
- Member
- Posts: 619
- Joined: Fri Mar 09, 2018 20:34
- GitHub: Skamiz
- In-game: Skamiz
- Location: la lojbaugag.
Re: [mod] Pullable carts [1.0][pull_cart]
You forgot to read the information in the first post.
But good on you for enjoing my mod anyway.
UwU
But good on you for enjoing my mod anyway.
UwU
- Skamiz Kazzarch
- Member
- Posts: 619
- Joined: Fri Mar 09, 2018 20:34
- GitHub: Skamiz
- In-game: Skamiz
- Location: la lojbaugag.
Re: [mod] Pullable carts [1.0][pull_cart]
I have not. I also don't think it would be practical. Of the top of my head:LibraSubtilis wrote: ↑Fri Mar 12, 2021 14:19However, the movement of the cart doesn't look smooth currently. Have you tried to attach it to the player and only update the rotation?
Besides the yaw, which would be simple enough, I would have to start manually simulating gravity so it stays at ground level. The code which controlls the pitch would probably stay the same. The whole way the movement of the cart is handled would probably have to be rewriten. Currently the cart always moves on an axis going through the player (as a cart should), as a result of the way it is 'attached'. (Which also allows the cart to be pushed.) If it instead were attached by 'set_attach', it's natural tendency would be to wildly fly around the player as they look around, like a weirdly shaped backpack. So I would have to constantly override the attachment offset so it stays put, while the player is only looking around and not moving. Another thing that would probably have to be rewritten is how it would interact when colliding with nodes in the world. And lastlly (if I remember right) is, that attached objects don't properly update their positions, so I would have to manually determine that every time the player stops pulling it.
In conclusion: probably not impossible, but a lot of work and with the constant changing of the offset of the attachment (How is that even done? I don't see anything about it in the API) it probably wouldn't even lead to better results.
- Skamiz Kazzarch
- Member
- Posts: 619
- Joined: Fri Mar 09, 2018 20:34
- GitHub: Skamiz
- In-game: Skamiz
- Location: la lojbaugag.
Re: [mod] Pullable carts [1.0][pull_cart]
Well, yes. But the main issue is, that no mater the amount of computing, with having to constantly change the offset of the attachment (and I still don't know how that would be done, besides dettaching and then reattaching with the new offset) the result would still be jittery. In a different way than it is now, but jittery non the less.LibraSubtilis wrote: ↑Sat Mar 13, 2021 12:18I think it is clear that better visuals often involve more computing.
I argue based on experiences made while writing another mod which does use attachment, though admitedly not to the player. If you know anything I have said to be untrue, please tell me so I can update my knowledge, but I am not going to spend the considerable time to fact-check everything "just in case".LibraSubtilis wrote: ↑Sat Mar 13, 2021 12:18You argue based on assumptions, ... , even if those assumptions are wrong.
This is in fact correct. I am quite happy with the current implementation and thus not very motivated to look for alternatives.LibraSubtilis wrote: ↑Sat Mar 13, 2021 12:18... therefore I think you don't want to do it differently ...
I think there is something fundamentally beautifull in how unforced all of this is. You don't have to care or even look into this thread ever again if you don't feel like it. I don't have to write and release mods if I don't want to. You can write your own, better version of this mod. We are all free to do or not do whatever we want.
That all said, I think that moving the cart by 'set_velocity' instead of 'move_to' might produce a smoother result, though I worry it might become less responsive. We will see how that turns out. Or maybe not. Depending on if I feel like trying it out.
- Skamiz Kazzarch
- Member
- Posts: 619
- Joined: Fri Mar 09, 2018 20:34
- GitHub: Skamiz
- In-game: Skamiz
- Location: la lojbaugag.
Re: [mod] Pullable carts [1.1][pull_cart]
Version 1.1 changelog
- make cart movement smoother
- prevent an issue caused by punching a cart that was beeing pulled
Too bad certain people don't care anymore. I am sure they would have enjoyed this update.
- make cart movement smoother
- prevent an issue caused by punching a cart that was beeing pulled
Too bad certain people don't care anymore. I am sure they would have enjoyed this update.
- apercy
- Member
- Posts: 645
- Joined: Wed Mar 25, 2020 16:31
- GitHub: APercy
- In-game: APercy
- Location: Pinheiral - RJ - Brazil
Re: [mod] Pullable carts [1.1][pull_cart]
Good for fuel storage XD
- Attachments
-
- screenshot_20210313_172708.png (445.78 KiB) Viewed 1976 times
- apercy
- Member
- Posts: 645
- Joined: Wed Mar 25, 2020 16:31
- GitHub: APercy
- In-game: APercy
- Location: Pinheiral - RJ - Brazil
Re: [mod] Pullable carts [1.1][pull_cart]
but I found a bug when detaching
- Attachments
-
- error.png (34.61 KiB) Viewed 1976 times
- Skamiz Kazzarch
- Member
- Posts: 619
- Joined: Fri Mar 09, 2018 20:34
- GitHub: Skamiz
- In-game: Skamiz
- Location: la lojbaugag.
Re: [mod] Pullable carts [1.1][pull_cart]
And this is why one should test the code after every single change, no mater how simple it may seem.
Thanks for telling me. The fix is up.
Thanks for telling me. The fix is up.
- StarNinjas
- Member
- Posts: 411
- Joined: Wed Mar 14, 2018 00:32
- GitHub: starninjas
- IRC: StarNinjas
- In-game: J1
- Location: Terrarca
- Contact:
Re: [mod] Pullable carts [1.1][pull_cart]
This is cool! Could you make an option to be able to turn on jumping?
Don't go to bed tonight, without knowing what would happen if you died. https://thegospelfilm.org/
-
- Member
- Posts: 348
- Joined: Tue Apr 14, 2020 16:03
- GitHub: cuthbert
Re: [mod] Pullable carts [1.1][pull_cart]
Pullable Carts !!! . top notch concept . They so belong there . like part of the scenery . make em run smooth ? they are old fashioned carts so should run higdly pigdly like in RL .. .nevertheless they function and look the part .
I have a query , can i put pigs in them ? can they carry livestock ?.
I am also hoping you would reconcider your view on MTG and release with a reciepe as a standalone . MTG is just barebones and content like this deserves to be in the sandbox to enrich the gameplay , doubles as a great display feature too .
maybe in time have cart quests incoperated into the challanges , having to travel set distances in a set time with designated loads etc.Anyway up to you ,they look spot on it would be nice to have them in the MTG sandbox to play with .
I have a query , can i put pigs in them ? can they carry livestock ?.
I am also hoping you would reconcider your view on MTG and release with a reciepe as a standalone . MTG is just barebones and content like this deserves to be in the sandbox to enrich the gameplay , doubles as a great display feature too .
maybe in time have cart quests incoperated into the challanges , having to travel set distances in a set time with designated loads etc.Anyway up to you ,they look spot on it would be nice to have them in the MTG sandbox to play with .
Project BrutalTest...hide your Petz
- Skamiz Kazzarch
- Member
- Posts: 619
- Joined: Fri Mar 09, 2018 20:34
- GitHub: Skamiz
- In-game: Skamiz
- Location: la lojbaugag.
Re: [mod] Pullable carts [1.1][pull_cart]
I could, but it depends on what you want from it.StarNinjas wrote: ↑Sat Mar 13, 2021 21:33This is cool! Could you make an option to be able to turn on jumping?
If you want to traverse the wilds, I would also have to adjust the carts stepheight since it is currently less then a full block. It will just detach once you get a bit farther from it.
If you just don't want to feel quite as glued to the ground as you are now, I would decrease the jump instead of eliminating it completely.
Actually I might do the second as a default, since I found it quite jarring that pressing the jump button didn't give any response at all.
Unless you can turn the livestock into items or nodes the answer is no. And at that point you don't need the cart to transport them. I do see the appeal having to transport animal via cart instead of ... I think the current method is to turn them into an item by a laso? But it would be a whole new mechanic and not one I am invested into implementing since I don't even play with mob mods.cuthbertdoublebarrel wrote: ↑Sat Mar 13, 2021 23:15I have a query , can i put pigs in them ? can they carry livestock ?.
My view on MTG is unlikely to change unless MTG itself undergoes significant changes.cuthbertdoublebarrel wrote: ↑Sat Mar 13, 2021 23:15I am also hoping you would reconcider your view on MTG and release with a reciepe as a standalone .
But! If someone was to write a mini-mod which adds a MTG (or any other game for that mater) compatible recipe, I would be quite happy to link to it from the first post, so everyone can easilly find it.
- Skamiz Kazzarch
- Member
- Posts: 619
- Joined: Fri Mar 09, 2018 20:34
- GitHub: Skamiz
- In-game: Skamiz
- Location: la lojbaugag.
Re: [mod] Pullable carts [1.2][pull_cart]
Version 1.2 changelog
- retain a minimum jumping ability while pulling the cart, so the jump button still gives some feedback
- add offroad_cart option, if enabled the player can still jump up a full block and and the carts step height is increased
I am not a creative builder. Why buid a nice road when walking in a straight line from A to B works just as well? The whole point of this mod was to give me a practical reason to build infrastructure (and because it is something interesting and unique).
But I suppose if that's not your thing and you'd rather take your cart on a trip through the wilderness, you now have the option.
- retain a minimum jumping ability while pulling the cart, so the jump button still gives some feedback
- add offroad_cart option, if enabled the player can still jump up a full block and and the carts step height is increased
I am not a creative builder. Why buid a nice road when walking in a straight line from A to B works just as well? The whole point of this mod was to give me a practical reason to build infrastructure (and because it is something interesting and unique).
But I suppose if that's not your thing and you'd rather take your cart on a trip through the wilderness, you now have the option.
-
- Member
- Posts: 348
- Joined: Tue Apr 14, 2020 16:03
- GitHub: cuthbert
Re: [mod] Pullable carts [1.1][pull_cart]
[quote="Skamiz Kazzarch" post_id=391780 time=1615708085
i am not a cowboy so no lasso .and picking up animals and putting them in your pocket seems silly .so i round them up into a pen ,
significant changes to MTG would kill off the content , the wealth of content like the little practical mod you just made is what makes MTG shine
You can transport livestock in boats in mineclone 2 so the mechanic is there without turning them into an item .Unless you can turn the livestock into items or nodes the answer is no. And at that point you don't need the cart to transport them. I do see the appeal having to transport animal via cart instead of ... I think the current method is to turn them into an item by a laso? But it would be a whole new mechanic .
My view on MTG is unlikely to change unless MTG itself undergoes significant changes.
i am not a cowboy so no lasso .and picking up animals and putting them in your pocket seems silly .so i round them up into a pen ,
significant changes to MTG would kill off the content , the wealth of content like the little practical mod you just made is what makes MTG shine
Project BrutalTest...hide your Petz
- Skamiz Kazzarch
- Member
- Posts: 619
- Joined: Fri Mar 09, 2018 20:34
- GitHub: Skamiz
- In-game: Skamiz
- Location: la lojbaugag.
Re: [mod] Pullable carts [1.2][pull_cart]
Was thinking of another mod with the lasso, not of MC2. As for the mechanic beeing there, well, good for them, but it is only relevant in so far as to show that it isn't literally impossible. Which nobody claimed in the first place.
As for the benefits and detriments of MTG, that discussion was had several dozen times in other parts of the forum. Let's just not go there.
As for the benefits and detriments of MTG, that discussion was had several dozen times in other parts of the forum. Let's just not go there.
- StarNinjas
- Member
- Posts: 411
- Joined: Wed Mar 14, 2018 00:32
- GitHub: starninjas
- IRC: StarNinjas
- In-game: J1
- Location: Terrarca
- Contact:
Re: [mod] Pullable carts [1.2][pull_cart]
Actually I think stephieght is more what I wanted. Sorry for not clarifying.
Don't go to bed tonight, without knowing what would happen if you died. https://thegospelfilm.org/
-
- Member
- Posts: 348
- Joined: Tue Apr 14, 2020 16:03
- GitHub: cuthbert
Re: [mod] Pullable carts [1.2][pull_cart]
Will add it to the fail list .Skamiz Kazzarch wrote: ↑Sun Mar 14, 2021 12:43Was thinking of another mod with the lasso, not of MC2. As for the mechanic beeing there, well, good for them, but it is only relevant in so far as to show that it isn't literally impossible. Which nobody claimed in the first place.
As for the benefits and detriments of MTG, that discussion was had several dozen times in other parts of the forum. Let's just not go there.
pullable carts mod incompatible. no reciepe in MTG survival mode .
Project BrutalTest...hide your Petz
- v-rob
- Developer
- Posts: 971
- Joined: Thu Mar 24, 2016 03:19
- GitHub: v-rob
- IRC: v-rob
- Location: Right behind you.
Re: [mod] Pullable carts [1.2][pull_cart]
Adding a simple minetest.register_craft is not hard at all for you to do. Plus, the mod author already said the rationale behind there being no craft recipe, in the first post no less.cuthbertdoublebarrel wrote: ↑Sun Mar 14, 2021 22:29pullable carts mod incompatible. no reciepe in MTG survival mode .
-
- Member
- Posts: 348
- Joined: Tue Apr 14, 2020 16:03
- GitHub: cuthbert
Re: [mod] Pullable carts [1.2][pull_cart]
It was not hard at all for you to understand the rationale behind the simple concept of a compatible list where no other requirements are needed in order for a mod to run , please keep in mind that i am not interested in creating a custom game to upload , but a list of compatible mods . like to do the same for those mods that run without the mtg depend too .v-rob wrote: ↑Mon Mar 15, 2021 16:36Adding a simple minetest.register_craft is not hard at all for you to do. Plus, the mod author already said the rationale behind there being no craft recipe, in the first post no less.cuthbertdoublebarrel wrote: ↑Sun Mar 14, 2021 22:29pullable carts mod incompatible. no reciepe in MTG survival mode .
Project BrutalTest...hide your Petz
- Nathan.S
- Member
- Posts: 1147
- Joined: Wed Sep 24, 2014 17:47
- GitHub: NathanSalapat
- IRC: NathanS21
- In-game: NathanS21
- Location: Bigsby Texas
- Contact:
Re: [mod] Pullable carts [1.2][pull_cart]
So I just tried this out, and gotta say really well done. The cart tilting when I go up and down slabs is on point!
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course
Check out my website, and brand new Minetest Modding Course
Re: [mod] Pullable carts [1.2][pull_cart]
ran into an error
...in64\minetest-5.4.1-win64\bin\..\mods\pull_cart\init.lua:164: in function '_remove_children'[...in64\minetest-5.4.1-win64\bin\..\mods\pull_cart\init.lua:126: in function '_update_cargo'
2021-05-29 16:27:53: ERROR[Main]: ...in64\minetest-5.4.1-win64\bin\..\mods\pull_cart\init.lua:139: in function <...in64\minetest-5.4.1-win64\bin\..\mods\pull_cart\init.lua:138>/
...in64\minetest-5.4.1-win64\bin\..\mods\pull_cart\init.lua:164: in function '_remove_children'[...in64\minetest-5.4.1-win64\bin\..\mods\pull_cart\init.lua:126: in function '_update_cargo'
2021-05-29 16:27:53: ERROR[Main]: ...in64\minetest-5.4.1-win64\bin\..\mods\pull_cart\init.lua:139: in function <...in64\minetest-5.4.1-win64\bin\..\mods\pull_cart\init.lua:138>/
- Skamiz Kazzarch
- Member
- Posts: 619
- Joined: Fri Mar 09, 2018 20:34
- GitHub: Skamiz
- In-game: Skamiz
- Location: la lojbaugag.
Re: [mod] Pullable carts [1.2][pull_cart]
1. Can you reproduce the error and if so, how?
2. I need to see more of the error message. The bit you posted only tells me roughly where something went worng, but not what went wrong.
Re: [mod] Pullable carts [1.2][pull_cart]
Its pretty much add something into the cart or take something out, it happens at random sometimes.
The error message is short.
The error message is short.
- Skamiz Kazzarch
- Member
- Posts: 619
- Joined: Fri Mar 09, 2018 20:34
- GitHub: Skamiz
- In-game: Skamiz
- Location: la lojbaugag.
Re: [mod] Pullable carts [1.3][pull_cart]
Turns out I was was caching a object reference in the detached inventory callbacks, which was causing issues when the cart was unloaded and reloaded without the game beeing closed in the interim, since I tried to reuse the detached inventory.
Changed it now so the detached inventory is recreated every time the cart is loaded, so that it references the correct object.
Just for reference, the complete error message looks like this:
Changed it now so the detached inventory is recreated every time the cart is loaded, so that it references the correct object.
Just for reference, the complete error message looks like this:
Code: Select all
2021-05-30 16:32:10: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod '??' in callback detached_inventory_OnPut(): C:\Games\minetest\bin\..\mods\pull_cart\init.lua:164: bad argument #1 to 'pairs' (value expected)
2021-05-30 16:32:10: ERROR[Main]: stack traceback:
2021-05-30 16:32:10: ERROR[Main]: [C]: in function 'pairs'
2021-05-30 16:32:10: ERROR[Main]: C:\Games\minetest\bin\..\mods\pull_cart\init.lua:164: in function '_remove_children'
2021-05-30 16:32:10: ERROR[Main]: C:\Games\minetest\bin\..\mods\pull_cart\init.lua:126: in function '_update_cargo'
2021-05-30 16:32:10: ERROR[Main]: C:\Games\minetest\bin\..\mods\pull_cart\init.lua:142: in function <C:\Games\minetest\bin\..\mods\pull_cart\init.lua:141>
Who is online
Users browsing this forum: Ahrefs [Bot] and 29 guests