[Mod] ships spawning at mapgen time [ships_on_mapgen]

Sokomine
Member
 
Posts: 3616
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine

[Mod] ships spawning at mapgen time [ships_on_mapgen]

by Sokomine » Sun Aug 05, 2018 19:12

Image
This mod spawns ships on ocans and lakes.

The largest one is the big pirate ship built (so it is rumored) by AspireMint. If you find one, explore it! But take care of pirates! (In small print: Pirates not included!)
Image

The second larger sailship has been built by me. To the right is a small raft.
Image

In addition to the two capital ships, three types of rafts exist and may also show up on water. It is possible that rafts will lose the very tree trunks they mostly consist of; mapgen thinks they're trees. There is no good way to prevent that. Lucikly, most ships will survive intact and await explorers.

Download: https://github.com/Sokomine/ships_on_ma ... master.zip
Browse code: https://github.com/Sokomine/ships_on_mapgen
Version: 1.0
Licence: GPLv3
License of models: CC-BY-SA 3.0
Depends on: handle_schematics
Recommends: cottages, moreblocks
Attachments
ship_sokomine.jpg
(79.74 KiB) Not downloaded yet
ship_aspiremint.jpg
(124.06 KiB) Not downloaded yet
ships_colored.jpg
(101.6 KiB) Not downloaded yet
A list of my mods can be found here.
 

Sokomine
Member
 
Posts: 3616
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine

Re: [Mod] ships spawning at mapgen time [ships_on_mapgen]

by Sokomine » Sun Aug 05, 2018 19:19

(second posting mostly for adding more images)

Right now, one ship (or raft) is placed in each mapchunk if possible:
Image

Rafts are a lot smaller than ships and come in three variants:
Image
Image

You can of course add your own ships. Just edit init.lua and an appropriate entry in ships_on_mapgen.schematics. If you use an .mts file saved by handle_schematics, the mod can automaticly determine from the filename how deep the ship proceeds under water. Else set e.g. yoff=-2 if your ship continues 2 nodes below water. Example:
Code: Select all
{scm="name_of_file_in_schems_folder_without_extension", typ="ship", is_ship=true, yoff=-1, orients={0}}


Other ships you might want to spawn with this mod are:
boat from Chiantos (diffrent style of ship)
and small galeon by Dan Duncombe (fits well into this mod).
The license of these schematics was unclear. You can still grab them from the forum, save them in the schems/ folder and add an entry for them in the init.lua file.
Attachments
ship_raft_1.jpg
(81.29 KiB) Not downloaded yet
ship_raft_3.jpg
(78.71 KiB) Not downloaded yet
ships_and_raft.jpg
(101.8 KiB) Not downloaded yet
A list of my mods can be found here.
 

User avatar
Chiantos
Member
 
Posts: 199
Joined: Sun Jan 15, 2017 09:04
Location: Earth
GitHub: BlockColor
IRC: mrchiantos
In-game: mrchiantos

Re: [Mod] ships spawning at mapgen time [ships_on_mapgen]

by Chiantos » Sun Aug 05, 2018 19:28

Hello, Thank for this mod.

I think use this, because i have a problem actually for generate boats in mapgen.

Good day.
Game : BlockColor - Avatar Mod with Cms : SkinKey
 

Sokomine
Member
 
Posts: 3616
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine

Re: [Mod] ships spawning at mapgen time [ships_on_mapgen]

by Sokomine » Sun Aug 05, 2018 20:22

Chiantos wrote:I think use this, because i have a problem actually for generate boats in mapgen.

Yes, I promised you this mod before (was working on it some time ago already). For your purpose, you'll have to edit init.lua so that it reads:
Code: Select all
ships_on_mapgen.schematics = {
        -- yoff: how deep is the ship burried in water?
      {scm="boat", typ="ship", is_ship=true, yoff=-1, orients={0}},
       }

and add your boat.mts file into the schems/ folder. If you change ships_on_magen.schematics as above, only your ship type will spawn (the others won't really fit into your game). I couldn't do that as the license you specified - "GPL" - is a bit too broad and does not really fit media data. It is fine for mods. Perhaps you can choose CC-BY-SA 3.0 as well? Or something similar.

Note: The Yellow Submarine would be far too large to spawn as a mapblock is only 80x80x80 blocks and thus no larger flat surface can be found with the method used here. The same applies for the U-Boot. Submarines are certainly possible. Just not that big.

The Big Galleon by Dan Duncombe might fit in. But it's really quite big and empty.
A list of my mods can be found here.
 

User avatar
Chiantos
Member
 
Posts: 199
Joined: Sun Jan 15, 2017 09:04
Location: Earth
GitHub: BlockColor
IRC: mrchiantos
In-game: mrchiantos

Re: [Mod] ships spawning at mapgen time [ships_on_mapgen]

by Chiantos » Sun Aug 05, 2018 20:35

Hello,

I saw more mts like code, so I used Gpl. I corrected the license for that of the media, I'm not always sure in some cases, if a work is code or media. Not problem ;) . Good Day to you, i look for test your mod, Thank for help.

Edit : Problem ...

Code: Select all
2018-08-06 00:39:40: ACTION[Main]: World at [/storage/emulated/0/Minetest/worlds/singleplayerworld]
2018-08-06 00:39:40: ACTION[Main]: Server for gameid="minetest" listening on 0.0.0.0:54216.
2018-08-06 00:39:52: ACTION[Server]: singleplayer [127.0.0.1] joins game.
2018-08-06 00:39:52: ACTION[Server]: singleplayer joins game. List of players: singleplayer
2018-08-06 00:41:09: ERROR[Main]: ServerError: AsyncErr: Lua: finishGenRuntime error from mod 'ships_on_mapgen' in callback environment_OnGenerated(): ..._game/mods/handle_schematics/replacements_global.lua:67: bad argument #2 to 'random' (interval is empty)
2018-08-06 00:41:09: ERROR[Main]: stack traceback:
2018-08-06 00:41:09: ERROR[Main]:    [C]: in function 'random'
2018-08-06 00:41:09: ERROR[Main]:    ..._game/mods/handle_schematics/replacements_global.lua:67: in function 'replace_randomized'
2018-08-06 00:41:09: ERROR[Main]:    ...ame/mods/handle_schematics/detect_flat_land_fast.lua:323: in function 'place_schematic_on_flat_land'
2018-08-06 00:41:09: ERROR[Main]:    ...st/games/minetest_game/mods/ships_on_mapgen/init.lua:87: in function '?'
2018-08-06 00:41:09: ERROR[Main]:    ...torage/emulated/0/Minetest/builtin/game/register.lua:412: in function <...torage/emulated/0/Minetest/builtin/game/register.lua:392>
2018-08-06 00:41:09: ACTION[Server]: singleplayer leaves game. List of players:
Game : BlockColor - Avatar Mod with Cms : SkinKey
 

User avatar
paramat
Developer
 
Posts: 3181
Joined: Sun Oct 28, 2012 00:05
Location: UK
GitHub: paramat
IRC: paramat
 

User avatar
Chiantos
Member
 
Posts: 199
Joined: Sun Jan 15, 2017 09:04
Location: Earth
GitHub: BlockColor
IRC: mrchiantos
In-game: mrchiantos

Re: [Mod] ships spawning at mapgen time [ships_on_mapgen]

by Chiantos » Mon Aug 06, 2018 01:22

I have test with GnuRootdebian (Jessie Backport) on Android, this works. Boats Spawn, not problem.

I have test with Android Minetest. This not work. This is a problem of my Android 4.2 or Minetest Android ?

I have problem with others mods use mathematic function (plotme so), and not others ... I not understand.

Good day.

Edit for resolve problem, i have delete this in replacements_global.lua to handle-schematics mod

Code: Select all
   if( not(new_materials['roof']) or not( minetest.registered_nodes[ new_materials['roof'] ])) then
      new_materials['roof'] =  replacements_group['roof'].found[
         math.random( 1, #replacements_group['roof'].found )];
   end


Not problem Actually for generate boat on Android, what is Roof ?

Edit 2 : Add un blockcolor 1.43.5, Thank you for this mod.
Game : BlockColor - Avatar Mod with Cms : SkinKey
 

User avatar
CBugDCoder
Member
 
Posts: 11
Joined: Tue Jul 31, 2018 12:13
Location: Home
GitHub: CBugDCoder
IRC: CBugDCoder
In-game: CalebDavis

Re: [Mod] ships spawning at mapgen time [ships_on_mapgen]

by CBugDCoder » Tue Aug 07, 2018 16:22

Looks Great Sokomine you could also add shipwrecks that would be cool.
A wise man once said "The more you learn, the more you find out you don't know".
 

Sokomine
Member
 
Posts: 3616
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine

Re: [Mod] ships spawning at mapgen time [ships_on_mapgen]

by Sokomine » Sat Aug 11, 2018 21:41

Shipwrecks where planned from the beginning. AspireMint has built three nice models. Unfortionately they where a bit big and so place for them on the ground of the ocean was seldmon found. Shipwrecks now "sink" until they hit solid ground. They may often be found embedded in the ocean's floor.
Important: You need the newest version of handle_schmematics for the shipwrecks to spawn.

Ship investigating the fate of several wrecks:
Image

It is assumed that the water level was higher when this ship sailed here and eventually sank. The weather in MineTest does not seem to contain many storms; a surprisingly large amount of ship masts can still be seen standing and may give you hints where the wrecks rest.
Image

Some wrecks rest well below the ocean, where it is cold and dark. Watch out for them! The chests are often filled with rich treasures.
Image
Attachments
shipwreck3.jpg
(84.43 KiB) Not downloaded yet
shipwreck2.jpg
(100.71 KiB) Not downloaded yet
shipwreck1.jpg
(113.79 KiB) Not downloaded yet
A list of my mods can be found here.
 

User avatar
CBugDCoder
Member
 
Posts: 11
Joined: Tue Jul 31, 2018 12:13
Location: Home
GitHub: CBugDCoder
IRC: CBugDCoder
In-game: CalebDavis

Re: [Mod] ships spawning at mapgen time [ships_on_mapgen]

by CBugDCoder » Mon Aug 13, 2018 21:15

Ok cool
A wise man once said "The more you learn, the more you find out you don't know".
 

User avatar
TK Ethan
Member
 
Posts: 16
Joined: Wed Aug 29, 2018 18:04
Location: Colorado,USA
IRC: MangoNinja
In-game: MangoNinja
 

User avatar
TK Ethan
Member
 
Posts: 16
Joined: Wed Aug 29, 2018 18:04
Location: Colorado,USA
IRC: MangoNinja
In-game: MangoNinja
 


Return to WIP Mods



Who is online

Users browsing this forum: No registered users and 3 guests