Page 1 of 1

[Mod] Sailory [sailory]

PostPosted: Sun Oct 06, 2019 11:27
by Eran
Image


Ahoy!
This is a makeover of the sail boat from the sailing mod. The aim of this mod was to do less than the original and be more modular, most importantly it does not override the mapgen and does not have any hard external dependencies.

I made this to be compatible with the islands mapgen by Termos.

Apart from cutting out a lot of features, this mod contains a different wind mechanic based on perlin noise. This means that wind is not the same everywhere on the map. The colours of flags and sails can also be customized with dye.



How to use

The direction of the wind is displayed by a small flag above the sail. Your speed depends on the angle of the sail to the wind.

Controls:
Jump Raise/Lower the sail
Left/Right Steer left or right
Sneak + Left/Right Turn the sail
Left and Right at the same time Do a wheely.

Dye
Right click the boat with dye to dye the flag or the sail. If the sail is up, it is dyed. Otherwise the flag is dyed.

Crafting
Image


License
Code: MIT
Media CC BY-SA 3.0

Authors
Original: cakenggt
Makeover: NetherEran

Dependencies
default, dye (both optional)

Source
https://notabug.org/NetherEran/sailory

Download
https://notabug.org/NetherEran/sailory/ ... master.zip

Re: [Mod] Sailory [sailory]

PostPosted: Sun Oct 06, 2019 12:07
by Termos
Arr, you beat me to it ;)

However:
Code: Select all
2019-10-06 14:05:41: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'sailing_canoe' in callback luaentity_Step(): ....0.1-win64\bin\..\mods\sailory\sailing_canoe/visuals.lua:102: attempt to call field 'angle' (a nil value)
2019-10-06 14:05:41: ERROR[Main]: stack traceback:
2019-10-06 14:05:41: ERROR[Main]:    ....0.1-win64\bin\..\mods\sailory\sailing_canoe/visuals.lua:102: in function 'show_wind'
2019-10-06 14:05:41: ERROR[Main]:    ...-5.0.1-win64\bin\..\mods\sailory\sailing_canoe/canoe.lua:85: in function <...-5.0.1-win64\bin\..\mods\sailory\sailing_canoe/canoe.lua:77>

Re: [Mod] Sailory [sailory]

PostPosted: Sun Oct 06, 2019 12:35
by Eran
Termos wrote:Arr, you beat me to it ;)

However:
Code: Select all
2019-10-06 14:05:41: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'sailing_canoe' in callback luaentity_Step(): ....0.1-win64\bin\..\mods\sailory\sailing_canoe/visuals.lua:102: attempt to call field 'angle' (a nil value)
2019-10-06 14:05:41: ERROR[Main]: stack traceback:
2019-10-06 14:05:41: ERROR[Main]:    ....0.1-win64\bin\..\mods\sailory\sailing_canoe/visuals.lua:102: in function 'show_wind'
2019-10-06 14:05:41: ERROR[Main]:    ...-5.0.1-win64\bin\..\mods\sailory\sailing_canoe/canoe.lua:85: in function <...-5.0.1-win64\bin\..\mods\sailory\sailing_canoe/canoe.lua:77>


I forgot that vector.angle was new in 5.1. Just pushed a fix. Hopefully it works now.

Re: [Mod] Sailory [sailory]

PostPosted: Sun Oct 06, 2019 13:14
by Krock
Either I cannot figure out how to sail, or the wind changes too frequently. Yet no luck to drive across a small lake (100m)..
The meshes are lovely though. Very well done!

Re: [Mod] Sailory [sailory]

PostPosted: Sun Oct 06, 2019 15:18
by Termos
Now:

Code: Select all
2019-10-06 17:16:10: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'sailing_canoe' in callback luaentity_Step(): ...in64\bin\..\mods\sailory\sailing_canoe/compatibility.lua:5: attempt to call field 'dot' (a nil value)
2019-10-06 17:16:10: ERROR[Main]: stack traceback:
2019-10-06 17:16:10: ERROR[Main]:    ...in64\bin\..\mods\sailory\sailing_canoe/compatibility.lua:5: in function 'angle'
2019-10-06 17:16:10: ERROR[Main]:    ....0.1-win64\bin\..\mods\sailory\sailing_canoe/visuals.lua:102: in function 'show_wind'
2019-10-06 17:16:10: ERROR[Main]:    ...-5.0.1-win64\bin\..\mods\sailory\sailing_canoe/canoe.lua:85: in function <...-5.0.1-win64\bin\..\mods\sailory\sailing_canoe/canoe.lua:77>

Re: [Mod] Sailory [sailory]

PostPosted: Sun Oct 06, 2019 15:36
by Eran
Krock wrote:Either I cannot figure out how to sail, or the wind changes too frequently. Yet no luck to drive across a small lake (100m)..
The meshes are lovely though. Very well done!


It works best on bigger water bodies since you need room for maneuvering. Sailing is fairly hard intentionally if you're not going whereever the wind is taking you. I recommend a mapgen with lots of water to get used to it. The boat doesn't react to the wind direction 100% how i'd like it currently, so it's hopefully going to be a bit more intuitive.

Termos wrote:Now:

Code: Select all
2019-10-06 17:16:10: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'sailing_canoe' in callback luaentity_Step(): ...in64\bin\..\mods\sailory\sailing_canoe/compatibility.lua:5: attempt to call field 'dot' (a nil value)
2019-10-06 17:16:10: ERROR[Main]: stack traceback:
2019-10-06 17:16:10: ERROR[Main]:    ...in64\bin\..\mods\sailory\sailing_canoe/compatibility.lua:5: in function 'angle'
2019-10-06 17:16:10: ERROR[Main]:    ....0.1-win64\bin\..\mods\sailory\sailing_canoe/visuals.lua:102: in function 'show_wind'
2019-10-06 17:16:10: ERROR[Main]:    ...-5.0.1-win64\bin\..\mods\sailory\sailing_canoe/canoe.lua:85: in function <...-5.0.1-win64\bin\..\mods\sailory\sailing_canoe/canoe.lua:77>


oof, the fix used other functions that weren't available before 5.1.
I've pushed a fix for the fix.

Re: [Mod] Sailory [sailory]

PostPosted: Sun Oct 06, 2019 15:37
by Krock
Simple fix for any upcoming issues:
Code: Select all
if not vector.angle then
    error("Please use Minetest version 5.1.0-dev or newer")
end

Re: [Mod] Sailory [sailory]

PostPosted: Sun Oct 06, 2019 17:03
by Termos
Thanks, it doesn't crash now.
I'm so glad you didn't heed Krock's advice ;)

Looks like physics needs some work though, sometimes the boat goes in the opposite direction to what it should according to wind and the sail position. Like in the shot below - it should go forward.
Image

Re: [Mod] Sailory [sailory]

PostPosted: Wed Oct 09, 2019 07:35
by Eran
I have fixed the physics. The flag now shows the wind properly and the sail's rotation is a bit more constrained to disallow sailing against the wind.

Re: [Mod] Sailory [sailory]

PostPosted: Wed Oct 09, 2019 15:10
by voxelproof
Thanks, setting sail for the next journey :)

Re: [Mod] Sailory [sailory]

PostPosted: Wed Oct 09, 2019 15:52
by Termos
Eran wrote:I have fixed the physics. The flag now shows the wind properly and the sail's rotation is a bit more constrained to disallow sailing against the wind.

Sailing upwind should still be possible, by means of tacking.

Physics is still off, when the sail is parallel to the hull longitudinal axis it should never propel the boat regardless the wind direction, yet it does.
Are you sure the sail is correctly attached to the mast? It moves on the mast's right side, yet it would make more sense if it moved on the back side.

Still, sailing is fun and trying to sail through a narrow strait was probably the most difficult thing I tried in MT. It's just totally counter-intuitive to anyone who's ever sailed ;)

Re: [Mod] Sailory [sailory]

PostPosted: Wed Oct 09, 2019 16:05
by Eran
Sailing upwind is possible, just not directly.
I'm not really concerned with realism, I just wanted it to be fun. Feel free to make a more realistic fork though :)