[Mod] Gravel Sieve [gravelsieve]

User avatar
joe7575
Member
Posts: 851
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto wuffi
Location: Germany, in the deep south

[Mod] Gravel Sieve [gravelsieve]

by joe7575 » Post

This mod is now part of the Modpack TechPack



A Mod for those who do not want to spend half of their lives underground...

Inspired from a Minecr**t Video on YT.

This mod simplifies the extraction of ores by the fact that ores can be obtained simply by sieving gravel.

Image

Image

This mod includes three new tools:
- a hammer to produce gravel from Cobblestone
- two gravel sieves to find ores (a manual sieve and an automatic sieve)

The sieved gravel can be crafted to Compressed Gravel (inspired by Modern Hippie) and "cooked" in the furnace to get Cobblestone again.

Recipe for the Gravel Sieve:

Code: Select all

    Wood,  -----------,  Wood
    Wood,  Steel Ingot,  Wood
    Wood,  -----------,  Wood

Recipe for the Automatic Gravel Sieve:

Code: Select all

    Gravel Sieve,  Mese Crystal,  Mese Crystal


Recipe for Compressed Gravel:

Code: Select all

    Sieved Gravel, Sieved Gravel,
    Sieved Gravel, Sieved Gravel,
Code: LGPLv2.1+, textures: CC BY-SA 3.0
Dependencies: default, tubelib
Optionally: moreores, hopper, pipeworks
Last edited by joe7575 on Sun Mar 11, 2018 17:28, edited 15 times in total.
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, vm16, Minecart, Signs Bot.

User avatar
GamingAssociation39
Member
Posts: 858
Joined: Mon Apr 25, 2016 16:09
GitHub: Gerold55
IRC: Gerold55
In-game: Gerold55
Location: Maryland, USA

Re: [Mod] Gravel Sieve [gravelsieve]

by GamingAssociation39 » Post

Could you make it so it's animated so you get the particles and it slowly sieves down as you're hitting the gravel?
Jesus Is Lord and Savior!!!

User avatar
joe7575
Member
Posts: 851
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto wuffi
Location: Germany, in the deep south

Re: [Mod] Gravel Sieve [gravelsieve]

by joe7575 » Post

GamingAssociation39 wrote:Could you make it so it's animated so you get the particles and it slowly sieves down as you're hitting the gravel?
Thanks GamingAssociation39.
I added a "manually mode" where you have to punch the sieve to get results. This mode can be activated in the file "config.lua".
But in addition the process of automated sieving will speed up if you punch a sieve in action.
The new version is on GitHub.

How the particle animation could be implemented is unclear for me so far...
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, vm16, Minecart, Signs Bot.

User avatar
Linuxdirk
Member
Posts: 3217
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Mod] Gravel Sieve [gravelsieve]

by Linuxdirk » Post

joe7575 wrote:This mode can be activated in the file "config.lua".
Have you thought of using settingtypes.txt so the user does not need to alter the mod's files and can updates without any issues?

Put this in front of your mod's logic.

Code: Select all

-- Get the file's content and define the target table
local path = minetest.get_modpath(name)..DIR_DELIM..'settingtypes.txt'
local file = io.open(path, 'rb')
modname_config = {}

-- Iterate over the file's content and load all of default configuration
-- into the global modname's configuration table
if file ~= nil then
    local lines = {}
    for line in file:lines() do
        if line:match("^([a-zA-Z])") then
            local name = line:gsub(' .+', '')
            local value = line:gsub('^[^ ]+ %b() %a+ ', '')
            modname_config[name] = value
        end
    end
end

-- Get the user set value for the given configuration name. If the
-- value was not set by the user load the default configuration
-- value as set in `settingtypes.txt` file.
modname_get_value = function (name)
    local set_value = minetest.setting_get(name)
    return (set_value == nil and modname_config[name] or set_value)
end
Create settingtypes.txt file in your mod's base directory. Syntax is quite simple:

Code: Select all

# A comment or description being shown when opening the setting in
# advanced configuration dialog
modname_setting_name (Human-readable name) type value
Where type can be int, string, bool, float, enum, path, key, flags, or noise_params. Usually only int, or string, bool are needed.

Now when you want to use a configurable value in your mod use modname_get_value('modname_setting_name') to get either the user-set value or the default value form settingtypes.txt. Plus: You don't need to fiddle around with settingtypes.txt and placing values directly into the code because all default configuration is already placed in settingtypes.txt.

No messing around with mod files, no manual editing of Minetest config files, no hassle, just pure convenience for everyone :)
Last edited by Linuxdirk on Fri Jun 16, 2017 12:26, edited 1 time in total.

Sokomine
Member
Posts: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: [Mod] Gravel Sieve [gravelsieve]

by Sokomine » Post

A few screenshots would be nice. Most players won't notice threads about mods that show no pictures.

The mod seems very intresting. I'd love to see it on some servers and play with it there (don't get around to really play in singleplayer...that's just for development). Such a way of getting ores seems far more intresting than the usual way :-) It could also be of particular intrest to more adventure orientated subgames. You'd have to build the gravel sieve and learn how to use it first...and then there'd be no need to dig thousands of meters deep for ores.
A list of my mods can be found here.

User avatar
joe7575
Member
Posts: 851
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto wuffi
Location: Germany, in the deep south

Re: [Mod] Gravel Sieve [gravelsieve]

by joe7575 » Post

Thanks to Linuxdirk and Sokomine.

I have added two screen shots and the file settingtypes.txt.
@Linuxdirk: It is even simpler than explained. You only have to add the following line to your LUA file (in this case for a boolean variable):

Code: Select all

<config-variable> = minetest.settings:get(<modname>_<variable>) or false
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, vm16, Minecart, Signs Bot.

User avatar
GamingAssociation39
Member
Posts: 858
Joined: Mon Apr 25, 2016 16:09
GitHub: Gerold55
IRC: Gerold55
In-game: Gerold55
Location: Maryland, USA

Re: [Mod] Gravel Sieve [gravelsieve]

by GamingAssociation39 » Post

Could you add sand and dust into the mod or no?
Jesus Is Lord and Savior!!!

User avatar
Linuxdirk
Member
Posts: 3217
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Mod] Gravel Sieve [gravelsieve]

by Linuxdirk » Post

joe7575 wrote:

Code: Select all

<config-variable> = minetest.settings:get(<modname>_<variable>) or false
This does not cover the default value not being in the code and it does not cover properly providing configuration options via settingtypes.txt and it does not cover not having to write the options in multiple files. But yes.

Modern Hippie
Member
Posts: 115
Joined: Wed Oct 29, 2014 04:35

Re: [Mod] Gravel Sieve [gravelsieve]

by Modern Hippie » Post

Great ;)
No longer active with this account! Please PM me on my new account "Wolfshippie"!

User avatar
joe7575
Member
Posts: 851
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto wuffi
Location: Germany, in the deep south

Re: [Mod] Gravel Sieve [gravelsieve]

by joe7575 » Post

GamingAssociation39 wrote:Could you add sand and dust into the mod or no?
Are you Minecraft fan? :-)
As far as I know, there is no dust in Minetest...
And I don't like the idea to use sand instead of gravel. Sand should be there where it is, otherwise you change the appearance of the earth surface too much. And I like the sandy beaches...

Or do you mean to make sand from gravel with the hammer?
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, vm16, Minecart, Signs Bot.

bell07
Member
Posts: 604
Joined: Sun Sep 04, 2016 15:15
GitHub: bell07

Re: [Mod] Gravel Sieve [gravelsieve]

by bell07 » Post

I really like it, great Work!
I tried it in a test-world and I like to use it in my "unternull" and "übernull" worlds to get additional ores, mese and diamonds
alongside the ores enabled lava cooling from unternull.

But I have some concerns to enable it because of 2 reasons:
1. To much mese and diamonds: I did taken a cobble stack to the sieve, was AFK for some minutes and then I get 4x mese , 3 diamonds and a lot of ores. So my proposal is to adjust the rarity to be more rare.

2. The output gravel is unusable. Please add some recipes to get rid off gravelsieve:gravel*
Maybe something like 2x gravelsieve:gravel1 => 1x default:gravel; 4x gravelsieve:gravel2 => 1x default:gravel
Or cooking in furnace to default gravel?

An other proposal: Maybe the "auto" and "manual" modes could be combined if you add a fuel consumption for auto-mode? but the manual way does work without fuel too?

Manual does not work at the time because the setting in settingstypes.txt is differ to the lua-code (gravelsieve_enable_manual_mode vs. gravelsieve_manually)

Please remove or change the drop definition from grave1-3. Because it drops default:gravel at the time. Currently I can convert it ti default:gravel by place node and take it back.
Last edited by bell07 on Fri Jun 16, 2017 18:44, edited 1 time in total.

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [Mod] Gravel Sieve [gravelsieve]

by azekill_DIABLO » Post

great mod!
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
GamingAssociation39
Member
Posts: 858
Joined: Mon Apr 25, 2016 16:09
GitHub: Gerold55
IRC: Gerold55
In-game: Gerold55
Location: Maryland, USA

Re: [Mod] Gravel Sieve [gravelsieve]

by GamingAssociation39 » Post

joe7575 wrote:
GamingAssociation39 wrote:Could you add sand and dust into the mod or no?
Are you Minecraft fan? :-)
As far as I know, there is no dust in Minetest...
And I don't like the idea to use sand instead of gravel. Sand should be there where it is, otherwise you change the appearance of the earth surface too much. And I like the sandy beaches...

Or do you mean to make sand from gravel with the hammer?
Make sand from gravel using hammer. Make dust from sand using the hammer and make it the drops vary when sieve each item.
Jesus Is Lord and Savior!!!

User avatar
GamingAssociation39
Member
Posts: 858
Joined: Mon Apr 25, 2016 16:09
GitHub: Gerold55
IRC: Gerold55
In-game: Gerold55
Location: Maryland, USA

Re: [Mod] Gravel Sieve [gravelsieve]

by GamingAssociation39 » Post

joe7575 wrote:
GamingAssociation39 wrote:Could you add sand and dust into the mod or no?
Are you Minecraft fan? :-)
As far as I know, there is no dust in Minetest...
And I don't like the idea to use sand instead of gravel. Sand should be there where it is, otherwise you change the appearance of the earth surface too much. And I like the sandy beaches...

Or do you mean to make sand from gravel with the hammer?
Also someone said something on the forums the other day which is, "Y not make our own versions of the Minecraft mods we all like (tweak it so it has the MineTest feel to it).
Jesus Is Lord and Savior!!!

User avatar
Linuxdirk
Member
Posts: 3217
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Mod] Gravel Sieve [gravelsieve]

by Linuxdirk » Post

100 Gravel, sieving the last stack of gravel three times.

Image

User avatar
joe7575
Member
Posts: 851
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto wuffi
Location: Germany, in the deep south

Re: [Mod] Gravel Sieve [gravelsieve]

by joe7575 » Post

Great output :-)

The recipes are still on a testing level. I wanted to see if it works. If course it needs some more balancing.
Currently the probability to get something from one gravel block is:
- iron lump: 1/15
- copper lump: 1/15
- gold lump: 1/25
- mese crystal 1/50
- diamond 1/50

The second time you sieve the gravel you get statistically half the result.
The third time, its a quarter.
the fourth time, its an eighth.

1. To much mese and diamonds: I did taken a cobble stack to the sieve, was AFK for some minutes and then I get 4x mese , 3 diamonds and a lot of ores. So my proposal is to adjust the rarity to be more rare.
You are right, much to much.
Do you have any suggestions? (see above)
2. The output gravel is unusable. Please add some recipes to get rid off gravelsieve:gravel*
Maybe something like 2x gravelsieve:gravel1 => 1x default:gravel; 4x gravelsieve:gravel2 => 1x default:gravel
Or cooking in furnace to default gravel?
There are a lot of holes in the map which could be filled up :)
What do you think of the possibility to "cook" two useless gravel blocks to one Cobblestone?
Edit: It's not possible, unfortunately. Cooking is always a 1:n recipe.
But I don't like to build a perpetual motion machine. The outcome should be less than the input.
So we need a reprocessing plant for gravel, which needs fuel and produces 50 % "clean" output gravel from the sieved input gravel.
An other proposal: Maybe the "auto" and "manual" modes could be combined if you add a fuel consumption for auto-mode? but the manual way does work without fuel too?
What kind of fuel? Woods is not logical for me. Others?
Manual does not work at the time because the setting in settingstypes.txt is differ to the lua-code (gravelsieve_enable_manual_mode vs. gravelsieve_manually

Please remove or change the drop definition from grave1-3. Because it drops default:gravel at the time. Currently I can convert it ti default:gravel by place node and take it back.)
Thanks for the hints, I will fix that tonight.
Last edited by joe7575 on Sat Jun 24, 2017 17:14, edited 3 times in total.
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, vm16, Minecart, Signs Bot.

User avatar
joe7575
Member
Posts: 851
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto wuffi
Location: Germany, in the deep south

Re: [Mod] Gravel Sieve [gravelsieve]

by joe7575 » Post

An other proposal: Maybe the "auto" and "manual" modes could be combined if you add a fuel consumption for auto-mode? but the manual way does work without fuel too?
What about a punching block which keeps the sieve running, instead of the "auto" mode? Would also be nice.
But then this punching block need fuel... (same problem)
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, vm16, Minecart, Signs Bot.

User avatar
Linuxdirk
Member
Posts: 3217
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Mod] Gravel Sieve [gravelsieve]

by Linuxdirk » Post

joe7575 wrote:What do you think of the possibility to "cook" two useless gravel blocks to one Cobblestone?
After sieving once you get more or less 50% of the blocks back. Since the hammer converts one stone into one gravel you could compress two of the first sieving result gravel into one stone, for the next result four and for the 3rd result eight.

User avatar
GamingAssociation39
Member
Posts: 858
Joined: Mon Apr 25, 2016 16:09
GitHub: Gerold55
IRC: Gerold55
In-game: Gerold55
Location: Maryland, USA

Re: [Mod] Gravel Sieve [gravelsieve]

by GamingAssociation39 » Post

If you punch it you won't need fuel but an auto sieve would so split the 2 up into separate sieves to make it easier.
Jesus Is Lord and Savior!!!

bell07
Member
Posts: 604
Joined: Sun Sep 04, 2016 15:15
GitHub: bell07

Re: [Mod] Gravel Sieve [gravelsieve]

by bell07 » Post

Linuxdirk wrote:After sieving once you get more or less 50% of the blocks back.
Why not the simplest way? The gravelsieve returns default:gravel back, but with ratio of 50 %? The other 50 % gets lost.. So no own gravel nodes required on this way

User avatar
joe7575
Member
Posts: 851
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto wuffi
Location: Germany, in the deep south

Re: [Mod] Gravel Sieve [gravelsieve]

by joe7575 » Post

bell07 wrote:
Linuxdirk wrote:After sieving once you get more or less 50% of the blocks back.
Why not the simplest way? The gravelsieve returns default:gravel back, but with ratio of 50 %? The other 50 % gets lost.. So no own gravel nodes required on this way
Although I find your suggestion very good, I have added a recipe for "Compressed Gravel" in the meantime.
That means you can compress 4 "useless" gravel blocks to one Compressed Gravel block and then cook it to Cobblestone again.
Recipe for Compressed Gravel:
"Gravel sifted *", "Gravel sifted *"
"Gravel sifted *", "Gravel sifted *"

GamingAssociation39 wrote:If you punch it you won't need fuel but an auto sieve would so split the 2 up into separate sieves to make it easier.
But the kind of fuel is still unclear. Both kinds of sieves at the same time makes no sense for me. Who will use the "manual" sieve when there is the "auto" sieve available, too.

BTW: The bugs are fixed. The new version is on GitHub.
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, vm16, Minecart, Signs Bot.

User avatar
GamingAssociation39
Member
Posts: 858
Joined: Mon Apr 25, 2016 16:09
GitHub: Gerold55
IRC: Gerold55
In-game: Gerold55
Location: Maryland, USA

Re: [Mod] Gravel Sieve [gravelsieve]

by GamingAssociation39 » Post

---
Last edited by GamingAssociation39 on Sat Jun 17, 2017 00:28, edited 1 time in total.
Jesus Is Lord and Savior!!!

User avatar
GamingAssociation39
Member
Posts: 858
Joined: Mon Apr 25, 2016 16:09
GitHub: Gerold55
IRC: Gerold55
In-game: Gerold55
Location: Maryland, USA

Re: [Mod] Gravel Sieve [gravelsieve]

by GamingAssociation39 » Post

GamingAssociation39 wrote:
GamingAssociation39 wrote:If you punch it you won't need fuel but an auto sieve would so split the 2 up into separate sieves to make it easier.
But the kind of fuel is still unclear. Both kinds of sieves at the same time makes no sense for me. Who will use the "manual" sieve when there is the "auto" sieve available, too.

BTW: The bugs are fixed. The new version is on GitHub.
An auto sieve can be made with materials you get from the manual sieve. You could use any fuel for the sieve like wood coal etc.
Jesus Is Lord and Savior!!!

User avatar
Linuxdirk
Member
Posts: 3217
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Mod] Gravel Sieve [gravelsieve]

by Linuxdirk » Post

bell07 wrote:
Linuxdirk wrote:After sieving once you get more or less 50% of the blocks back.
Why not the simplest way?
Because you can sieve the result two more times getting different outcome.

bell07
Member
Posts: 604
Joined: Sun Sep 04, 2016 15:15
GitHub: bell07

Re: [Mod] Gravel Sieve [gravelsieve]

by bell07 » Post

Rarity: For rarity I analyzed the registered_ores how often the ores are generated by mapgen. I get ~
iron_lump = 30,copper_lump = 50,tin_lump = 65,gold_lump = 150,mese_crystal = 200,diamond = 300
I recommend to do it more rarer then mapgen does, so the gravelsieve could be used in each worlds without take the usual searching for ores whole obsolete, so I recomend the next values at the time:

Code: Select all

	iron_lump = 35,
	copper_lump = 60,
	tin_lump = 80,
	gold_lump = 175,
	mese_crystal = 275,
	diamond = 340,
manual vs. automatic: new idea: If the gravelsieve is at next to the flowing_water it will be auto like: https://de.wikipedia.org/wiki/Goldsuche ... hrinne.jpg But in auto-mode the rarity should be higher (factor 2x?) then manual because "you do not see all treasures"..

I seen an other issue with random number generator. After ~ 10-~15 99-Stack it seems not be working anymore. I get no ores anymore, even with old rarity. I usually use just

Code: Select all

if math.random(probability) == 1 then
in my mods. But I do not know if PseudoRandom() should be used. A static seed 1234 is not a good idea.

Post Reply

Who is online

Users browsing this forum: No registered users and 15 guests