[Mod] Lucky Ore [lucky_ore]

User avatar
jordan4ibanez
Member
 
Posts: 1865
Joined: Tue Sep 27, 2011 18:44
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
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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.
 

User avatar
juli
Member
 
Posts: 109
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!
Please tell me if i have written bad english.
Planets/Asteroids mod: https://forum.minetest.net/viewtopic.php?t=15933
servers where i'am:
mars-server
jungle-server
buildersworld
 

User avatar
jordan4ibanez
Member
 
Posts: 1865
Joined: Tue Sep 27, 2011 18:44
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.
 

User avatar
D00Med
Member
 
Posts: 712
Joined: Sat Feb 07, 2015 22:49
GitHub: D00Med

Re: [Mod] Lucky Ore [lucky_ore]

by D00Med » Fri Nov 25, 2016 21:47

ooh cool!
Look! I have a signature :]
My subgame: https://forum.minetest.net/viewtopic.php?f=15&t=14051#p207242
dmobs2 is coming...
 

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

Re: [Mod] Lucky Ore [lucky_ore]

by Kosmos » Sat Nov 26, 2016 09:22

Very cool.
 

User avatar
Wuzzy
Member
 
Posts: 2161
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
I'm creating MineClone 2, a Minecraft clone for Minetest.
I made the Help modpack, adding in-game help to Minetest.
 


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 6 guests

cron