[Mod] Boost cart [boost_cart]

ABJ
Member
Posts: 3015
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ
Location: In Earth orbit, with a perigee of 1048 km and an apogee of 1337 km and an inclination of 69 degrees.

Re: [Mod] Boost cart [boost_cart]

by ABJ » Post

Krock, I want to contribute to this mod. I'm planning to add more rail types. How do I make the mod work with the rails?

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Mod] Boost cart [boost_cart]

by Krock » Post

ABJ wrote:Krock, I want to contribute to this mod. I'm planning to add more rail types. How do I make the mod work with the rails?
I do not plan to add more rails to this mod. Create a new mod and add there all your new rails.
To get different types (wide- or narrow-gauge), simply set the group "connect_to_raillike" to 2, 3 or something else.

If you have a rail with multiple acceleration states, use the function

Code: Select all

boost_cart:boost_rail(node position, acceleration)
to push the cart after switching the rail to an "On"-state.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

ABJ
Member
Posts: 3015
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ
Location: In Earth orbit, with a perigee of 1048 km and an apogee of 1337 km and an inclination of 69 degrees.

Re: [Mod] Boost cart [boost_cart]

by ABJ » Post

What is the "node position" and how many nodes per number does the cart accelerate?
And how about brake rails? Do you simply set the "acceleration" value to a minus one?

User avatar
lightonflux
Member
Posts: 384
Joined: Mon Nov 11, 2013 07:22
In-game: lof
Location: Germany

Re: [Mod] Boost cart [boost_cart]

by lightonflux » Post

ABJ wrote:That said, what about my second question?
First click at commits at the upper bar:

Image

Then select the commit you want to download/view/browse:

Image

When you are in the browse view and the branch button should look like this:

Image

Then press the download button and you get the content of the repo at that commit.

http://a.pomf.se/eabnya.png

User avatar
Splizard
Member
Posts: 227
Joined: Wed Jan 25, 2012 07:20
GitHub: Splizard
IRC: Splizard
In-game: Splizard
Location: New Zealand
Contact:

Re: [Mod] Boost cart [boost_cart]

by Splizard » Post

We need upside down rails so we can make rollercoasters!
Games: Builda City, The Hungry Games Mods: Lifters, Snow Biomes and Gates. Also checkout my texture pack Gridtoon!

ABJ
Member
Posts: 3015
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ
Location: In Earth orbit, with a perigee of 1048 km and an apogee of 1337 km and an inclination of 69 degrees.

Re: [Mod] Boost cart [boost_cart]

by ABJ » Post

Thank you very much lightonflux :)
Only problem? The commits needed for CiaranG's railcarts mod has mysteriously disappeared :'( But that's not your fault tho :)

ABJ
Member
Posts: 3015
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ
Location: In Earth orbit, with a perigee of 1048 km and an apogee of 1337 km and an inclination of 69 degrees.

Re: [Mod] Boost cart [boost_cart]

by ABJ » Post

I am making my own version of this. Is it OK if I release? And what else do I have to do?

Image
Image
Image

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Mod] Boost cart [boost_cart]

by Krock » Post

Splizard wrote:We need upside down rails so we can make rollercoasters!
That would require a rotation function for the vertical axis.
ABJ wrote:I am making my own version of this. Is it OK if I release? And what else do I have to do?
You can release it whenever you want but I suggest to change more things. It's nonsense to have +/- the same mod 3 times on this forum.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

ABJ
Member
Posts: 3015
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ
Location: In Earth orbit, with a perigee of 1048 km and an apogee of 1337 km and an inclination of 69 degrees.

Re: [Mod] Boost cart [boost_cart]

by ABJ » Post

Yes Krock that is just a small demo of what I'm planning for. And is it OK if I keep the same name? I want this mod to replace the default one and the crafting recipes are also same as I don't want to change.

TODO:
-Fancy gold/silver/glowing rails
-Maybe giving the cart a makeover?
-Changing this mod A LOT.

EDIT: And what do you think of this mod's current progress? Is it looking better or worse?

ABJ
Member
Posts: 3015
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ
Location: In Earth orbit, with a perigee of 1048 km and an apogee of 1337 km and an inclination of 69 degrees.

Re: [Mod] Boost cart [boost_cart]

by ABJ » Post

Here it is!
Hicarts
It's very different from this mod. Notably in that it has collision detection :)

arifsaha
New member
Posts: 2
Joined: Sun Mar 29, 2015 14:10
GitHub: arifsaha
Contact:

Re: [Mod] Boost cart [boost_cart]

by arifsaha » Post

Unfortunately I consistently experience server crashing whenever I right-click the cart. The log shows this:

Code: Select all

May 18 14:34:20 2013lr minetestserver[11467]: 14:34:20: ACTION[ServerThread]: MYUSER right-clicks object 2: LuaEntitySAO at (-14,19,-64)
May 18 14:34:21 2013lr minetestserver[11467]: 14:34:21: ERROR[main]: ERROR: An unhandled exception occurred: /var/lib/minetest/.minetest/mods/boost_cart/init.lua:47: attempt to index field 'player_attached' (a nil value)
May 18 14:34:21 2013lr minetestserver[11467]: 14:34:21: ERROR[main]: stack traceback:
May 18 14:34:21 2013lr minetestserver[11467]: 14:34:21: ERROR[main]: #011/var/lib/minetest/.minetest/mods/boost_cart/init.lua:47: in function </var/lib/minetest/.minetest/mods/boost_cart/init.lua:37>
May 18 14:34:21 2013lr minetestserver[11467]: In thread 7f7b8d498880:
May 18 14:34:21 2013lr minetestserver[11467]: /builddir/build/BUILD/minetest-0.4.9/src/main.cpp:1860: int main(int, char**): Assertion '0' failed.
May 18 14:34:21 2013lr minetestserver[11467]: Debug stacks:
May 18 14:34:21 2013lr minetestserver[11467]: DEBUG STACK FOR THREAD 7f7b8d498880:
May 18 14:34:21 2013lr minetestserver[11467]: #0  int main(int, char**)
May 18 14:34:21 2013lr minetestserver[11467]: (Leftover data: #1  Dedicated server branch)
May 18 14:34:21 2013lr minetestserver[11467]: (Leftover data: #2  virtual void ServerMap::save(ModifiedState))
May 18 14:34:21 2013lr minetestserver[11467]: (Leftover data: #3  virtual void Database_SQLite3::saveBlock(MapBlock*))
Any thought?

Thanks!

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Mod] Boost cart [boost_cart]

by Krock » Post

Today is an update day!
arifsaha wrote:Unfortunately I consistently experience server crashing whenever I right-click the cart. The log shows this:
<snip>
Fixed.

New detector rails for mesecons, added by numberZero:

Image
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

uind_w
Member
Posts: 29
Joined: Sun Jul 19, 2015 13:10
Location: Japan

Re: [Mod] Boost cart [boost_cart]

by uind_w » Post

I read "detector.lua" and find...

Code: Select all

minetest.register_craft({
	output = "boost_cart:detectorrail 6",
	recipe = {
		{"default:steel_ingot", "mesecon:mesecon", "default:steel_ingot"},
		{"default:steel_ingot", "group:stick", "default:steel_ingot"},
		{"default:steel_ingot", "mesecon:mesecon", "default:steel_ingot"},
	},
(Line 43-49)
"mesecon:mesecon" is should be "mesecons:mesecon"?

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Mod] Boost cart [boost_cart]

by Krock » Post

uind_w wrote:"mesecon:mesecon" is should be "mesecons:mesecon"?
Thanks for pointing this out. I shouldn't use creative mode to test the new features :)
https://github.com/SmallJoker/boost_cart/commit/ddb6
The recipe will also work when "mesecons_alias" isn't activated.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
tomlukeywood
Member
Posts: 87
Joined: Sat Oct 10, 2015 13:13
IRC: tomlukeywood
In-game: tomlukeywood
Location: earth

Re: [Mod] Boost cart [boost_cart]

by tomlukeywood » Post

i get the error /home/tom/MinetestGame/bin../mods/carts_mod/init.lua:2: attempt to concatenate a nil value

:(

any ideas?

User avatar
TenPlus1
Member
Posts: 3715
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

Re: [Mod] Boost cart [boost_cart]

by TenPlus1 » Post

tomlukeywood: rename carts_mod directory to just carts.

katsukitty
New member
Posts: 1
Joined: Thu Feb 26, 2015 22:47

Re: [Mod] Boost cart [boost_cart]

by katsukitty » Post

TenPlus1 wrote:tomlukeywood: rename carts_mod directory to just carts.
"2015-11-11 18:57:11: ERROR[Main]: ...e/katsu/Programs/minetest/bin/../mods/carts/init.lua:16: attempt to concatenate field 'modpath' (a nil value)"

I get the same error when it's named "carts". Possible bug?

Ivà
Member
Posts: 115
Joined: Sun Feb 22, 2015 07:11
GitHub: melzua
IRC: melzua
In-game: melzua
Location: Catalonia

Re: [Mod] Boost cart [boost_cart]

by Ivà » Post

katsukitty wrote:"2015-11-11 18:57:11: ERROR[Main]: ...e/katsu/Programs/minetest/bin/../mods/carts/init.lua:16: attempt to concatenate field 'modpath' (a nil value)"

I get the same error when it's named "carts". Possible bug?
It should be boost_cart, as the title says.

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Mod] Boost cart [boost_cart]

by Krock » Post

katsukitty wrote:I get the same error when it's named "carts". Possible bug?
Here's the early XMAS gift for everybody who can't rename mod directories correctly.
I hope this is an understandable error for everybody with this problem.

EDIT: Post #3100
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
TenPlus1
Member
Posts: 3715
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

Re: [Mod] Boost cart [boost_cart]

by TenPlus1 » Post

Nicely done Krock... btw sorry for typing wrong folder name folks.

User avatar
Alienant1
Member
Posts: 69
Joined: Mon Jul 20, 2015 10:33
In-game: alienant1 or alienant2

Re: [Mod] Boost cart [boost_cart]

by Alienant1 » Post

is the power rail/mesecons compatibility now part of the standard download or do I still need to download separately?
Merry Christmas Everyone!!!

amadin
Member
Posts: 549
Joined: Tue Jun 16, 2015 16:23

Re: [Mod] Boost cart [boost_cart]

by amadin » Post

Can you add stop cart by punching against the moving direction to last commit? I saw it in old commit.

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Mod] Boost cart [boost_cart]

by Krock » Post

Alienant1 wrote:is the power rail/mesecons compatibility now part of the standard download or do I still need to download separately?
Sorry for the late reply. The mesecons compatibility is there with the standard download.
amadin wrote:Can you add stop cart by punching against the moving direction to last commit? I saw it in old commit.
It's already now possible to slow down the cart by punching in the opposite direction. Just move slowly (or press the back/down key) to make it stop.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

amadin
Member
Posts: 549
Joined: Tue Jun 16, 2015 16:23

Re: [Mod] Boost cart [boost_cart]

by amadin » Post

It's already now possible to slow down the cart by punching in the opposite direction. Just move slowly (or press the back/down key) to make it stop.
If cart drive on power rails only it don't stop by punching in the opposite direction or pressing back key.

Can you add different texture inside and outside cart? I want replace texture with wheels like in minecart.
Can you set contorl by keys (up, down), like in minecraft, or how can i do this by itself?.

Laudrin
New member
Posts: 8
Joined: Mon Dec 21, 2015 10:23
IRC: Laudrin
In-game: laudrin

Re: [Mod] Boost cart [boost_cart]

by Laudrin » Post

Thank you Krock, for your awesome addition to the carts mod. It eliminates some of the restrictions. Now I can build a rail network in my world. :-)

I recognized that boost_cart rails have a slightly brighter texture then the original cart mod rails I build before installing your mod. Nothing serious, but is that an intentional choice?

Some suggestions if you should plan to develop more features: It would be great to have the ability to switch railroad junctions i. e. via mesecon singnal or digiline bus or something like that. And signals would be great, when the signal is red, a brake rail would stop the cart (not only decelerate) independent of its speed.

Post Reply

Who is online

Users browsing this forum: No registered users and 20 guests