[Mod] Lucky Ore [lucky_ore]

User avatar
jordan4ibanez
Member
 
Posts: 1893
Joined: Tue Sep 27, 2011 18:44
Location: Rhode Island, USA
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

[Mod] Lucky Ore [lucky_ore]

by jordan4ibanez » Fri Nov 25, 2016 00:49

Lucky Ore

This mod adds a lucky ore to the game which gives you the chance to get any item in the game when you mine it.

Features:

  • Ore glows and has animated texture
  • When you mine it it shows every item that can be obtained
  • Will drop item after end of cycle or explode half the time
  • Spawns like coal

Github

Download

Video

I can't really show a picture of due to the nature of the ore, so the video will show you how this mod works.

License: WTFPL
Code: Select all
            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
                    Version 2, December 2004

 Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>

 Everyone is permitted to copy and distribute verbatim or modified
 copies of this license document, and changing it is allowed as long
 as the name is changed.

            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. You just DO WHAT THE FUCK YOU WANT TO.
Last edited by jordan4ibanez on Fri Nov 25, 2016 08:10, edited 1 time in total.
If you can think it, you can make it! My Patreon :D
 

juli
Member
 
Posts: 203
Joined: Sat Jun 11, 2016 10:31
GitHub: cpdef
In-game: juli

Re: [Mod] Lucky Ore [lucky_ore]

by juli » Fri Nov 25, 2016 07:06

I have tested it, ok if u need fun install it :)

But there has been a bug, the sound doesn't end after explode!
 

User avatar
jordan4ibanez
Member
 
Posts: 1893
Joined: Tue Sep 27, 2011 18:44
Location: Rhode Island, USA
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

Re: [Mod] Lucky Ore [lucky_ore]

by jordan4ibanez » Fri Nov 25, 2016 08:09

juli wrote:I have tested it, ok if u need fun install it :)

But there has been a bug, the sound doesn't end after explode!

Hey thanks! I've fixed that in the latest release. Redownload and it'll be all fixed.

Here's an update video:
https://youtu.be/YUxfhinE4lI

Changes:
  • only 20% chance of explosion now
  • uses math.random(3,15)+math.random() for a chance to get every item in the game
  • win particles
  • item entity is immortal
If you can think it, you can make it! My Patreon :D
 

User avatar
D00Med
Member
 
Posts: 937
Joined: Sat Feb 07, 2015 22:49
Location: Australia...somewhere
GitHub: D00Med
 

Kosmos
Member
 
Posts: 131
Joined: Sun Sep 11, 2016 12:42
In-game: KosmosHD
 

User avatar
Wuzzy
Member
 
Posts: 3243
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: [Mod] Lucky Ore [lucky_ore]

by Wuzzy » Mon Nov 28, 2016 21:59

The problem with mods which randomly select an item from literally all possible items is that there is quite a chance that the player obtains a node which the player is NEVER EVER supposed to get, because the node is only used internally, it would screw things up if the player possessed it directly, etc.
Examples: air, ignore, doors:hidden (hidden door segment), farming:wheat_3, etc.
I think a good heuristic would be by filtering out any item with an empty or nil description, and items with not_in_creative_inventory=1. Granted, this will also filter out some legit items, but at least you can be pretty sure the player does not get any “forbidden” items.
I wish there would be a possibilty for modders to tell modders “this item is not for the inventory”, but sadly, this is not possible yet. :-/

Also, do you actually intend a totally random item, i.e. equal probabiliy for all items? Or would you actually like it more if some itesm would be more likely than others?

In my first few tries, I managed to get an ignore. xD

Other notes:
- The ka-ching sound is evil, it does not mean anything. It can still explode afterwards. :( Maybe this is the joke (you intended it)? xD
- In inventory it looks like a coal ore. Maybe try to change the looks of the first animation frame so the block looks different from coal ore
- I would like it more if the animation would be more customized anyway (instead of just plugging existing Minetest Game images together). But basing the texture on stone is OK IMO
- Block sounds are missing (footstep sounds, dig sound, dug sound)
- BUG: If you mine a lucky ore, then quickly run far away (so that the entity gets unloaded), you'll contiue to hear the sound forever. If you return, a NEW lucky ore sound can be heard. Repeat this again and again and it becomes louder and louder until your ears bleed. XD
- BUG? If you run away after mining a lucky block (so that the entity gets unloaded), it seems the timer is reset when you return. Not sure, please verify this for yourselves.


EDIT:
- I think the spawn rate is quite high. You very soon find caves full of these. I think it should be a bit rarer. And I think it also would be better if lucky ores always spawn alone, never in groups. This is because digging multiple lucky ores in quick succession can get quite noisy soon
My creations. I gladly take any bitcoins you have lying around: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH
 

User avatar
RSLRedstonier
Member
 
Posts: 449
Joined: Wed May 10, 2017 21:00
Location: some were in middle earth
GitHub: RSL-Redstonier
In-game: RSLRedstonier

Re: [Mod] Lucky Ore [lucky_ore]

by RSLRedstonier » Thu Jan 04, 2018 22:09

Wuzzy wrote:The problem with mods which randomly select an item from literally all possible items is that there is quite a chance that the player obtains a node which the player is NEVER EVER supposed to get, because the node is only used internally, it would screw things up if the player possessed it directly, etc.
Examples: air, ignore, doors:hidden (hidden door segment), farming:wheat_3, etc.
I think a good heuristic would be by filtering out any item with an empty or nil description, and items with not_in_creative_inventory=1. Granted, this will also filter out some legit items, but at least you can be pretty sure the player does not get any “forbidden” items.
I wish there would be a possibilty for modders to tell modders “this item is not for the inventory”, but sadly, this is not possible yet. :-/

Also, do you actually intend a totally random item, i.e. equal probabiliy for all items? Or would you actually like it more if some itesm would be more likely than others?


I like the fact that you can get unobtainable able items its fun also since there are SO many possibility's its fine to have a ton of them spawning just make sure you have a lot of inventory space when you go mining for them or at least have some sort of bag/portable chest/ backpack mod (I suggest inventory bags) or else your inventory will get filled with random items

its sorta addicting to open them as you never know what your gona get
"A programmer is just a tool which converts caffeine into code"

try out my skytest mod always being updated!
https://forum.minetest.net/viewtopic.php?f=9&t=17568
 

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

Re: [Mod] Lucky Ore [lucky_ore]

by bell07 » Fri Jan 05, 2018 05:52

I like the fact that you can get unobtainable able items its fun also since there are SO many possibility's its fine to have a ton of them spawning just make sure you have a lot of inventory space
I had the same attitude as I wrote trm_generic
But in fact Wuzzy has right (again), some items should not be obtainable. For example the realchess mod adds chess items that used only internally because the game board is implemented technically as inventory. This items never ever should be used in players inventory.

Maybe you just use the treasurer framework too in your lucky-ore to manage the treasures? Otherwise you can copy my item filters to your mod.
 

User avatar
RSLRedstonier
Member
 
Posts: 449
Joined: Wed May 10, 2017 21:00
Location: some were in middle earth
GitHub: RSL-Redstonier
In-game: RSLRedstonier

Re: [Mod] Lucky Ore [lucky_ore]

by RSLRedstonier » Fri Jan 05, 2018 12:55

bell07 wrote:
I like the fact that you can get unobtainable able items its fun also since there are SO many possibility's its fine to have a ton of them spawning just make sure you have a lot of inventory space
I had the same attitude as I wrote trm_generic
But in fact Wuzzy has right (again), some items should not be obtainable. For example the realchess mod adds chess items that used only internally because the game board is implemented technically as inventory. This items never ever should be used in players inventory.

Maybe you just use the treasurer framework too in your lucky-ore to manage the treasures? Otherwise you can copy my item filters to your mod.


true though I have modified this mod to add lucky blocks which drop about 30-40 random items exactly like the ore but with no explosions I have filled several walls of technic golden chests and have never once gotten any chess pieces or items that were only used as buttons in inventories(including tetris mod, robot mod, and chess mod)
"A programmer is just a tool which converts caffeine into code"

try out my skytest mod always being updated!
https://forum.minetest.net/viewtopic.php?f=9&t=17568
 


Return to WIP Mods



Who is online

Users browsing this forum: No registered users and 4 guests