[mod] Zero-Effort Custom Minerals [instant_ores]
- Piezo_
- Member
- Posts: 219
- Joined: Fri Jul 20, 2018 21:36
- GitHub: is proprietary I use NotABug
- Location: (x,y,z)
[mod] Zero-Effort Custom Minerals [instant_ores]
I'm lazy.
I don't like writing out lots of code, especially the amount required to create a new ore, and I really don't like doing all of the math that's also required to balance the speed, strength, etc. of a new material.
Calinou may have made moreores to partially simplify things for those of us who are mildly lazy, but I'm not mildly lazy, I'm extremely lazy.
I am the absolute embodiment of sloth! I want making an entire mineral to be as easy as if I were registering a simple node!
So, for those of you who are as lazy as me, I present instant_ores.
Now, you can have all the ores you desire, with as few lines of code as possible, using the power of dark magic (hacky, questionably sane code and terrible math).
It's as easy as instant_ores.register_metal(definition table) (or instant_ores.register_crystal, if you prefer).
So, next time you're making a mod with ores in it, why do things the hard way? Don't resist the temptation. It's not 'cheating'. If they judge you, they're just jealous. Come on, download it. You know you want to......give me your soul!
Technical details
License: GPLV3+ for code, various Creative Commons licenses for textures.
Depends: default
Optional: farming
I don't like writing out lots of code, especially the amount required to create a new ore, and I really don't like doing all of the math that's also required to balance the speed, strength, etc. of a new material.
Calinou may have made moreores to partially simplify things for those of us who are mildly lazy, but I'm not mildly lazy, I'm extremely lazy.
I am the absolute embodiment of sloth! I want making an entire mineral to be as easy as if I were registering a simple node!
So, for those of you who are as lazy as me, I present instant_ores.
Now, you can have all the ores you desire, with as few lines of code as possible, using the power of dark magic (hacky, questionably sane code and terrible math).
It's as easy as instant_ores.register_metal(definition table) (or instant_ores.register_crystal, if you prefer).
So, next time you're making a mod with ores in it, why do things the hard way? Don't resist the temptation. It's not 'cheating'. If they judge you, they're just jealous. Come on, download it. You know you want to......give me your soul!
Technical details
License: GPLV3+ for code, various Creative Commons licenses for textures.
Depends: default
Optional: farming
while (true) { suffer(); }
- BuckarooBanzay
- Member
- Posts: 437
- Joined: Tue Apr 24, 2018 05:58
- GitHub: BuckarooBanzay
- IRC: BuckarooBanzai
- In-game: BuckarooBanzai
Re: [mod] Zero-Effort Custom Minerals [instant_ores]
I really like your mod descriptions :)
For the next stage of lazyness: how about default values?
For the next stage of lazyness: how about default values?
- Piezo_
- Member
- Posts: 219
- Joined: Fri Jul 20, 2018 21:36
- GitHub: is proprietary I use NotABug
- Location: (x,y,z)
Re: [mod] Zero-Effort Custom Minerals [instant_ores]
Oh, we've got those. The absolute minimum you have to specify is a name and a color (and a description, unless you don't mind your material being called "Terribly Programmed Ingot").BuckarooBanzay wrote:I really like your mod descriptions :)
For the next stage of lazyness: how about default values?
while (true) { suffer(); }
- Pyrollo
- Developer
- Posts: 385
- Joined: Mon Jan 08, 2018 15:14
- GitHub: pyrollo
- In-game: Naj
- Location: Paris
Re: [mod] Zero-Effort Custom Minerals [instant_ores]
I propose a improvement: a mod that chooses new ores ramdomly so you don't even have make effort for that.BuckarooBanzay wrote:I really like your mod descriptions :)
For the next stage of lazyness: how about default values?
[ Display Modpack ] - [ Digiterms ] - [ Crater MG ] - [ LATE ]
- davidthecreator
- Member
- Posts: 452
- Joined: Mon Aug 18, 2014 19:48
- GitHub: daviddoesminetest
- In-game: DavidDoesMinetest
- Location: Lithuania
Re: [mod] Zero-Effort Custom Minerals [instant_ores]
> too lazy to register something as simple as ores with some basic uses for them the classical way
> Makes an advanced ore registration system, that was probably extremelly hard to make
+11
> Makes an advanced ore registration system, that was probably extremelly hard to make
+11
- Piezo_
- Member
- Posts: 219
- Joined: Fri Jul 20, 2018 21:36
- GitHub: is proprietary I use NotABug
- Location: (x,y,z)
Re: [mod] Zero-Effort Custom Minerals [instant_ores]
Ok, now you've got me really thinking:Pyrollo wrote:I propose a improvement: a mod that chooses new ores ramdomly so you don't even have make effort for that.
A couple of ores created based on the map seed, using perlin noise.
Each world would truly be unique, then!
I could probably do it, but in a different mod that depended on this one.
I'm tempted. Should I?
while (true) { suffer(); }
- v-rob
- Developer
- Posts: 971
- Joined: Thu Mar 24, 2016 03:19
- GitHub: v-rob
- IRC: v-rob
- Location: Right behind you.
Re: [mod] Zero-Effort Custom Minerals [instant_ores]
It all depends. How lazy do you feel?Piezo_ wrote:I'm tempted. Should I?
- Piezo_
- Member
- Posts: 219
- Joined: Fri Jul 20, 2018 21:36
- GitHub: is proprietary I use NotABug
- Location: (x,y,z)
Re: [mod] Zero-Effort Custom Minerals [instant_ores]
Actually, the biggest issue would be if minetest.get_perlin doesn't work properly during the initialization phase.v-rob wrote:It all depends. How lazy do you feel?Piezo_ wrote:I'm tempted. Should I?
I'll have to try to find out.
while (true) { suffer(); }
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: [mod] Zero-Effort Custom Minerals [instant_ores]
Yes please!Piezo_ wrote:A couple of ores created based on the map seed, using perlin noise.
- Piezo_
- Member
- Posts: 219
- Joined: Fri Jul 20, 2018 21:36
- GitHub: is proprietary I use NotABug
- Location: (x,y,z)
Re: [mod] Zero-Effort Custom Minerals [instant_ores]
Alright, I guess I have no excuse to just sit around and not do this any more.texmex wrote:Yes please!Piezo_ wrote:A couple of ores created based on the map seed, using perlin noise.
*Piezo_ opens mousepad
while (true) { suffer(); }
- Piezo_
- Member
- Posts: 219
- Joined: Fri Jul 20, 2018 21:36
- GitHub: is proprietary I use NotABug
- Location: (x,y,z)
Re: [mod] Zero-Effort Custom Minerals [instant_ores]
So, I've almost finished unique_ores, that adds 2 ores which are unique to every map.
Is 2 enough?
Is 2 enough?
while (true) { suffer(); }
- Pyrollo
- Developer
- Posts: 385
- Joined: Mon Jan 08, 2018 15:14
- GitHub: pyrollo
- In-game: Naj
- Location: Paris
Re: [mod] Zero-Effort Custom Minerals [instant_ores]
I think you have been too lazy :pPiezo_ wrote:Is 2 enough?
[ Display Modpack ] - [ Digiterms ] - [ Crater MG ] - [ LATE ]
- Piezo_
- Member
- Posts: 219
- Joined: Fri Jul 20, 2018 21:36
- GitHub: is proprietary I use NotABug
- Location: (x,y,z)
Re: [mod] Zero-Effort Custom Minerals [instant_ores]
Too late, it's already here.Pyrollo wrote:I think you have been too lazy :pPiezo_ wrote:Is 2 enough?
while (true) { suffer(); }
- Piezo_
- Member
- Posts: 219
- Joined: Fri Jul 20, 2018 21:36
- GitHub: is proprietary I use NotABug
- Location: (x,y,z)
Re: [mod] Zero-Effort Custom Minerals [instant_ores]
Update
I just learned about the level group, and have put it to use allowing for minerals to properly have hardness above 3
I just learned about the level group, and have put it to use allowing for minerals to properly have hardness above 3
while (true) { suffer(); }
- Piezo_
- Member
- Posts: 219
- Joined: Fri Jul 20, 2018 21:36
- GitHub: is proprietary I use NotABug
- Location: (x,y,z)
Re: [mod] Zero-Effort Custom Minerals [instant_ores]
Update
- Added 3d_armor and shields support
- Changed tool groups to the new standard (see topic: viewtopic.php?f=5&t=22075)
- Added options to disable armor or tools in mineral definitions
while (true) { suffer(); }
- Inky_Bendy
- Member
- Posts: 19
- Joined: Wed Jan 15, 2020 21:22
- In-game: Inky_Bendy
Re: [mod] Zero-Effort Custom Minerals [instant_ores]
Help, I'm terrible at coding, and EVEN MORE LAZY. How do I add new ores.
Re: [mod] Zero-Effort Custom Minerals [instant_ores]
The easiest, laziest way is to also use Piezo_'s unique_ores. I guess the second easiest would be to glance at the coding in unique_ores and strip out the random part, just specify the colors and characteristics you want.
https://notabug.org/Piezo_/unique_ores.git
https://notabug.org/Piezo_/unique_ores.git
Re: [mod] Zero-Effort Custom Minerals [instant_ores]
I have made myownium, for my server:
but minetest 5.3 says:
Code: Select all
instant_ores.register_metal({
name = "gnu_slash_ores:myownium",
description = "Myownium",
rarity = 14,
depth = 18000,
color = "#180202:128",
-- no_armor = true;
durability = 64000,
power = 200,
cooktime = 96,
})
Re: [mod] Zero-Effort Custom Minerals [instant_ores]
It looks right on your character, just not on the armor stand? Or is that a problem, too?
Re: [mod] Zero-Effort Custom Minerals [instant_ores]
I am creating an ore randomizer mod that adds 100 new ores but I want to add special effects to armor, such as fire protection rating, heal, and higher jump along with other things. I also want to add stuff to tools like a chance of dropping something useful and adding the ability to light mobs on fire or to knock them back. I also want to be able to disable shards. The problem right now is that I am not that good with coding and I do not want to modify your mod to my needs if I don't have to. Can you add any optional special effects in the mod?
eh
- KatzEyez
- Member
- Posts: 50
- Joined: Tue Aug 08, 2017 18:24
- GitHub: KatzPetz
- IRC: LadyK
- In-game: LadyK
- Location: (IG: Depends) (RL: USA)
Re: [mod] Zero-Effort Custom Minerals [instant_ores]
I am loving the ore name!!! Ingenious!barbas72n wrote: ↑Thu Aug 13, 2020 11:02I have made myownium, for my server:
but minetest 5.3 says:Code: Select all
instant_ores.register_metal({ name = "gnu_slash_ores:myownium", description = "Myownium", rarity = 14, depth = 18000, color = "#180202:128", -- no_armor = true; durability = 64000, power = 200, cooktime = 96, })
Why wish upon a star when you can pray to the one who created it.
- sirrobzeroone
- Member
- Posts: 593
- Joined: Mon Jul 16, 2018 07:56
- GitHub: sirrobzeroone
- Contact:
Re: [mod] Zero-Effort Custom Minerals [instant_ores]
I'm not sure if something has changed in 5.3 and minetest is now throwing an error but I can see why it is throwing an error - the image strings in the armor:register_armor() parts of instant_ores are cut off at the end example:
line 81 from init.lua
Code: Select all
texture = "3d_armor_dummy_image.png^(armor_chestplate.png^[colorize:"..color..")^3d_armor_dummy_image",
line65 --local sanity=nil to
line110 in init.lua it should fix boots,helmets,leggings and chestplates.
Code: Select all
--local sanity = nil
armor:register_armor(":"..mod..":helmet_"..name, {
description = desc.." Helmet",
inventory_image = "armor_inv_helmet.png^[colorize:"..color,
texture = "3d_armor_dummy_image.png^(armor_helmet.png^[colorize:"..color..")^3d_armor_dummy_image.png",
-- I'm not going to try to explain how this texture hack works. Really, it shouldn't.
preview = "3d_armor_preview_dummy_image.png^(armor_helmet_preview.png^[colorize:"..color..")^3d_armor_preview_dummy_image.png",
groups = {armor_head=1, armor_heal=0, armor_use=uses,
physics_speed=-0.01*weight, physics_gravity=0.01*weight},
reciprocate_damage = hurt_back,
armor_groups = {fleshy=small_armor},
damage_groups = {cracky=2, snappy=3, choppy=2, crumbly=1, level=level},
})
armor:register_armor(":"..mod..":chestplate_"..name, {
description = desc.." Chestplate",
inventory_image = "armor_inv_chestplate.png^[colorize:"..color,
texture = "3d_armor_dummy_image.png^(armor_chestplate.png^[colorize:"..color..")^3d_armor_dummy_image.png",
preview = "3d_armor_preview_dummy_image.png^(armor_chestplate_preview.png^[colorize:"..color..")^3d_armor_preview_dummy_image.png",
groups = {armor_torso=1, armor_heal=0, armor_use=uses,
physics_speed=-0.04*weight, physics_gravity=0.04*weight},
reciprocate_damage = hurt_back,
armor_groups = {fleshy=big_armor},
damage_groups = {cracky=2, snappy=3, choppy=2, crumbly=1, level=level},
})
armor:register_armor(":"..mod..":leggings_"..name, {
description = desc.." Leggings",
inventory_image = "armor_inv_leggings.png^[colorize:"..color,
texture = "3d_armor_dummy_image.png^(armor_leggings.png^[colorize:"..color..")^3d_armor_dummy_image.png",
preview = "3d_armor_preview_dummy_image.png^(armor_leggings_preview.png^[colorize:"..color..")^3d_armor_preview_dummy_image.png",
groups = {armor_legs=1, armor_heal=0, armor_use=uses,
physics_speed=-0.03*weight, physics_gravity=0.03*weight},
reciprocate_damage = hurt_back,
armor_groups = {fleshy=big_armor},
damage_groups = {cracky=2, snappy=3, choppy=2, crumbly=1, level=level},
})
armor:register_armor(":"..mod..":boots_"..name, {
description = desc.." Boots",
inventory_image = "armor_inv_boots.png^[colorize:"..color,
texture = "3d_armor_dummy_image.png^(armor_boots.png^[colorize:"..color..")^3d_armor_dummy_image.png",
preview = "3d_armor_preview_dummy_image.png^(armor_boots_preview.png^[colorize:"..color..")^3d_armor_preview_dummy_image.png",
groups = {armor_feet=1, armor_heal=0, armor_use=uses,
physics_speed=-0.01*weight, physics_gravity=0.01*weight},
reciprocate_damage = hurt_back,
armor_groups = {fleshy=small_armor},
damage_groups = {cracky=2, snappy=3, choppy=2, crumbly=1, level=level},
})
I had a look as Im poking around 3d_armor at the moment and wondered if it might be a 3d_armor bug. BTW really like this mod :)
Edit: I dont like not testing stuff - fix worked okay I am on 5.3
- Attachments
-
- armor_instantores.png (319.67 KiB) Viewed 2535 times
- BuckarooBanzay
- Member
- Posts: 437
- Joined: Tue Apr 24, 2018 05:58
- GitHub: BuckarooBanzay
- IRC: BuckarooBanzai
- In-game: BuckarooBanzai
Re: [mod] Zero-Effort Custom Minerals [instant_ores]
Just fyi: Piezo_ has quit minetest for good last time i checked, it may be worth migrating/adopting that mod to the "minetest-mods" github orgsirrobzeroone wrote: ↑Mon Dec 28, 2020 09:25I'm not sure if something has changed in 5.3 and minetest is now throwing an error but I can see why it is throwing an error - the image strings in the armor:register_armor() parts of instant_ores are cut off at the end example:
line 81 from init.luaThat last overlay is missing ".png". I tested by putting the .png back on the chestplate and now it is displayed on the armor stand. I haven't fully tested this but my guess is if you copy the below and paste over from:Code: Select all
texture = "3d_armor_dummy_image.png^(armor_chestplate.png^[colorize:"..color..")^3d_armor_dummy_image",
line65 --local sanity=nil to
line110 in init.lua it should fix boots,helmets,leggings and chestplates.Shields look to be okay.Code: Select all
--local sanity = nil armor:register_armor(":"..mod..":helmet_"..name, { description = desc.." Helmet", inventory_image = "armor_inv_helmet.png^[colorize:"..color, texture = "3d_armor_dummy_image.png^(armor_helmet.png^[colorize:"..color..")^3d_armor_dummy_image.png", -- I'm not going to try to explain how this texture hack works. Really, it shouldn't. preview = "3d_armor_preview_dummy_image.png^(armor_helmet_preview.png^[colorize:"..color..")^3d_armor_preview_dummy_image.png", groups = {armor_head=1, armor_heal=0, armor_use=uses, physics_speed=-0.01*weight, physics_gravity=0.01*weight}, reciprocate_damage = hurt_back, armor_groups = {fleshy=small_armor}, damage_groups = {cracky=2, snappy=3, choppy=2, crumbly=1, level=level}, }) armor:register_armor(":"..mod..":chestplate_"..name, { description = desc.." Chestplate", inventory_image = "armor_inv_chestplate.png^[colorize:"..color, texture = "3d_armor_dummy_image.png^(armor_chestplate.png^[colorize:"..color..")^3d_armor_dummy_image.png", preview = "3d_armor_preview_dummy_image.png^(armor_chestplate_preview.png^[colorize:"..color..")^3d_armor_preview_dummy_image.png", groups = {armor_torso=1, armor_heal=0, armor_use=uses, physics_speed=-0.04*weight, physics_gravity=0.04*weight}, reciprocate_damage = hurt_back, armor_groups = {fleshy=big_armor}, damage_groups = {cracky=2, snappy=3, choppy=2, crumbly=1, level=level}, }) armor:register_armor(":"..mod..":leggings_"..name, { description = desc.." Leggings", inventory_image = "armor_inv_leggings.png^[colorize:"..color, texture = "3d_armor_dummy_image.png^(armor_leggings.png^[colorize:"..color..")^3d_armor_dummy_image.png", preview = "3d_armor_preview_dummy_image.png^(armor_leggings_preview.png^[colorize:"..color..")^3d_armor_preview_dummy_image.png", groups = {armor_legs=1, armor_heal=0, armor_use=uses, physics_speed=-0.03*weight, physics_gravity=0.03*weight}, reciprocate_damage = hurt_back, armor_groups = {fleshy=big_armor}, damage_groups = {cracky=2, snappy=3, choppy=2, crumbly=1, level=level}, }) armor:register_armor(":"..mod..":boots_"..name, { description = desc.." Boots", inventory_image = "armor_inv_boots.png^[colorize:"..color, texture = "3d_armor_dummy_image.png^(armor_boots.png^[colorize:"..color..")^3d_armor_dummy_image.png", preview = "3d_armor_preview_dummy_image.png^(armor_boots_preview.png^[colorize:"..color..")^3d_armor_preview_dummy_image.png", groups = {armor_feet=1, armor_heal=0, armor_use=uses, physics_speed=-0.01*weight, physics_gravity=0.01*weight}, reciprocate_damage = hurt_back, armor_groups = {fleshy=small_armor}, damage_groups = {cracky=2, snappy=3, choppy=2, crumbly=1, level=level}, })
I had a look as Im poking around 3d_armor at the moment and wondered if it might be a 3d_armor bug. BTW really like this mod :)
Edit: I dont like not testing stuff - fix worked okay I am on 5.3
- sirrobzeroone
- Member
- Posts: 593
- Joined: Mon Jul 16, 2018 07:56
- GitHub: sirrobzeroone
- Contact:
Re: [mod] Zero-Effort Custom Minerals [instant_ores]
that is a real shame, I really liked a number of his mods hopefully he returns one day. Yes it would be sad to lose this one.BuckarooBanzay wrote: ↑Mon Dec 28, 2020 09:47Just fyi: Piezo_ has quit minetest for good last time i checked, it may be worth migrating/adopting that mod to the "minetest-mods" github org
I just did a quick update to init.lua so it used steel armor as it's base and overlays it's colors ontop of that, mainly to save on the maintenece for Piezo_ but also updated the armor to the new 3d_armor texture.
Given the above (ie Piezo_ left) I've uploaded a full zip fix version attached for the moment and if this gets adopted I'll push a fix through. oh I also changed from colorize to multiply thought the colors looked closer - gold for ref:
- Attachments
-
- instant_ores.zip
- (350.19 KiB) Downloaded 68 times
-
- armor_instant_ores_two.png (261.05 KiB) Viewed 2535 times
- sirrobzeroone
- Member
- Posts: 593
- Joined: Mon Jul 16, 2018 07:56
- GitHub: sirrobzeroone
- Contact:
Re: [mod] Zero-Effort Custom Minerals [instant_ores]
I sort of forked a copy of this across to my github repository, it was important to me that I kept the commit history intact as full credit for this mod belongs with Piezo_, I managed to make that work. So theres an unoffical fork located here:
https://github.com/sirrobzeroone/instant_ores
I've made some minor adjustments and will make some more as I start to understand the code and I think I can add some value.
Once thats done I'll then put in an request to have the minetest-mods team pickup the looking after of the mod, hopefully it'll be accepted, but for now feel free to report any issues against my github version and I'll do my best to fix them...or at least they'll be documented - best to flag issues on github as I can sometimes have problems keeping up with all the forum posts.
https://github.com/sirrobzeroone/instant_ores
I've made some minor adjustments and will make some more as I start to understand the code and I think I can add some value.
- Added mod.conf file
- Removed depends.txt
- Mod no longer needs bundled 3d_armor images and will use the "Steel armor" image as base and colorize on this this should mean if your using a texture pack the armors from instant_ores will look like colored steel versions from that texture pack
- Minor adjustment to armor protection calc so you end up with nil decimal places on armor tab in game...unless your getting a 10% set bonus
- Adjusted armor from colorize to multiply @ about 88% opacity overlay...closer to standard colors but who knows how that will blend with a texture pack
- file name cleanups just so they sort nicer
Once thats done I'll then put in an request to have the minetest-mods team pickup the looking after of the mod, hopefully it'll be accepted, but for now feel free to report any issues against my github version and I'll do my best to fix them...or at least they'll be documented - best to flag issues on github as I can sometimes have problems keeping up with all the forum posts.
Who is online
Users browsing this forum: No registered users and 18 guests