Page 1 of 1

[Game] Random... Plus Lots of Other Things

PostPosted: Wed Jun 19, 2013 17:22
by cypher-neo
I suppose I should request this to be moved to games, so I am requesting...

This is a game. This is not a mod. There are several mods inside the game that I haven't gotten around to renaming so they look like other released mods, but I will warn you... don't overwrite any mods in your mods folder with the mods in this game. I'm still a newbie, and I directly edited several mods (including default) to produce this wild game. So many of the mods in this game have been tweaked and may have weird dependencies I can't script for yet.

To use:

PLEASE NOTE: I highly recommend changing your builtin/item.lua file so stack_max = 9999. You will need a larger inventory.

--Download Links--
If you downloaded the file before, please re-download it. There were graphics missing from the first file.
NEW LINK! https://anonfiles.com/file/6c0757c4cd6031d2b5f85287a06bdcf0

Here's the upshot of this game...

I've already released my Glooplava game before, and I just kept expanding on that mod. When obsidian became available in the default game (around 0.4.6?), I merged by lavacooling mod with default so that I could use the in-game obsidian without needing to define an entirely new set of nodes for cooling. I also tweaked the lava cooling, so that lava would spread unpredictably. I scaled back the lava spreading in this game, as it can be a little annoying having the whole world burning from one mistake, but lava does still have unusual properties which I'll get into later.

Using what little understood of LUA and could hack into the code, I was able to make Gloopores randomly drop from stone.

In a previous thread, I asked how to make a pick-dependent drops. Meaning, one class of pick drops one thing, while a better pick gives better drops. PilzAdam was very kind to help me tweak things to get this.

With my success in lavacooling (which is mainly fire and heat-based changes to the world), I turned to making an Erosion mod (water-based changes to the world).

So here's what all this put together does...

--Pick Dependent Drops--
Depending on the type of pick you use, determines what drop you get.

So for a stone node:
Wood pick = 1 cobble
Stone pick = 1 cobble, 1 iron ore
Steel and Bronze pick = 2 cobble, 1 alatro ore, 1 arol ore (these are gloopores)
Alatro and Arol Pick = 3 cobble, 1 iron ore, and 1 kalite ore
Mese, Diamond, and Obsidian picks = 4 cobble, 1 iron ore, 1 kalite, 1 talinite

Desert stone is the same as regular stone, except it drops desert_stone in place of cobble.

Other nodes affected by this are...

Coal
Wood pick = 1 coal
Stone pick = 2 coal
Steel/Bronze pick = 3 coal
Alatro/Arol picks = 4 coal
Mese/Diamond/Obsidian = 5 coal

Iron, Copper, and Gold
Stone pick = 1 lump
Steel/Bronze = 2 lump
Alatro/Arol = 3 lump
Mese/Diamond/Obsidian = 4 lump

Mese
Steel/Bronze pick = 1 crystal
Alatro/Arol = 2 crystals
Mese/Diamond/Obsidian pick = 3 crystals

Obsidian and Moltenrock
Steel/Bronze pick = 1 shard
Alatro/Arol = 2 shards
Mese/Diamond/Obsidian pick = 3 shards

--Lavacooling and Heating--
Flowing lava has a chance to turn into molten rock, which has an equal chance of turning back into flowing lava. (NOTE: in the previous version of Crazylava, moltenrock had a chance to turn into a lava node, which led to unpredictable spreading.) So in this game, lava doesn't spread like it used to, but because moltenrock has a chance to form at the edge of a lava floe, lava might spread a LITTLE further that it would normally.

If you fill up the crafting grid with kalite ore, you can craft lava... though why you'd want to, I don't know.
Gravel can be ignited into lava_source when exposed to lava or kalite torches. Regular torches do not affect lava, only kalite torches.
Sand will turn into glass when exposed to lava or kalite torches
Cobble will turn into stone when exposed to lava or kalite torches.

When exposed to water, lava will turn into obsidian, and moltenrock turns into stone_with_mese

--Erosion--
Water randomly makes: stone turn into gravel, gravel turn into sand, and sand into dirt.
Water also makes cobble turn into mossycobble.

This works quite interesting with the lava mod tweak above, because sometimes when gravel forms by erosion, it turns into lava.

--Random Pick Times--
Now originally, that was where I stopped modding... and it was a great game! I loved how I could fill up my inventory with iseful blocks and start building right away. But... it was very unbalanced, and eventually I got bored with mining a little stone and filling up my inventory. So, while perusing some LUA code one night, I realized I could make the picks have random times. This balanced the expanded drops excellently!

WHAT IF the better pick has a longer dig time than a pick that doesn't have a good drop!? Will you a) develop tendonitis in your mouse wrist digging with the better pick, or b) switch to the faster pick and just dig more nodes to compensate?

To make it even more interesting, the pick times change EVERY TIME YOU LOAD THE GAME, so every time you come back to a world, you need to experiment with all the picks to see which one is the fastest this time around.

--Other Infos--
Let's see, what else do I need to cover?

Mese crystal fragments can be smelted into glowglass. These blocks shine at LIGHT_MAX.

Kalite Torches can be crafted into regular torches as well.

I haven't gotten around to tweaking axes and shovels to have random times yet, mostly because I haven't expanded drops for dirt or wood nodes. If you would like expanded drops for axes and shovels as well, along with random dig times, let me know.

--Plans for the Future?--
Someone once told me I could override default simply by using :: and I don't understand that yet. I have more learning to do in LUA, and as I get better, I'm sure this mod will change.

--Screenshots--
None needed. It's all basic stuff. All that is affected is how the world interacts with you. :P

--License--
All of this is WTFPL (how could it be anything else, because I sure as did WTF I wanted with it... lol)

I'd like to thank everyone who has assisted me in learning LUA and in making interesting mods along the way.

PostPosted: Wed Jun 19, 2013 20:47
by Jordach
Cool! Love the ideas, must test this tomorrow.

PostPosted: Wed Jun 19, 2013 20:49
by sfan5
Sound awesome!
But anonfiles.com, really? It's not like we need to share this game secretly..

PostPosted: Wed Jun 19, 2013 21:18
by cypher-neo
sfan5 wrote:Sound awesome!
But anonfiles.com, really? It's not like we need to share this game secretly..


I have issues with Dropbox (my dropbox is basically empty, but although I can upload to Dropbox, they won't let me or anyone else download the file because I somehow maxed out my yearly allotment of bandwidth). That was the last time I used Dropbox - now mind you, that might have been last year so it may be working now... but I got irritated at being locked out of my own files for so long, so I don't use them anymore.

I used to use Megaupload, and I have a MEGA account, but I have issues with that as well (MEGA clearly says on the sharing screen that you should be careful who you share the decryption key with... so I've been using MEGA for personal storage needs only)

I don't remember how I stumbled across AnonFiles... all I remember liking about Anonfiles was that is was simplistic like Dropbox (upload, then share link), but no need to create a profile or login made it even easier to share small files like Minetest code.

But if you want, I can upload it elsewhere. Any preferences?

PostPosted: Wed Jun 19, 2013 22:07
by Jordach
sfan5 wrote:Sound awesome!
But anonfiles.com, really? It's not like we need to share this game secretly..
Think omploader.

PostPosted: Wed Jun 19, 2013 22:14
by Evergreen
Jordach wrote:
sfan5 wrote:Sound awesome!
But anonfiles.com, really? It's not like we need to share this game secretly..
Think omploader.
Don't think omploader think github. :D

PostPosted: Thu Jun 20, 2013 10:58
by Mito551
cypher-neo wrote:--Plans for the Future?--
Someone once told me I could override default simply by using :: and I don't understand that yet. I have more learning to do in LUA, and as I get better, I'm sure this mod will change.


since it's a game, not a mod, you don't have to override anything. you just go and chage itself.

and code for override loks something like this:

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
minetest.register_node(":default:rail", {
    description = "Rail",
    drawtype = "raillike",
    tiles = {"default_rail.png", "default_rail_curved.png", "default_rail_t_junction.png", "default_rail_crossing.png"},
    inventory_image = "default_rail.png",
    wield_image = "default_rail.png",
    paramtype = "light",
    walkable = false,
    selection_box = {
        type = "fixed",
                -- but how to specify the dimensions for curved and sideways rails?
                fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
    },
    groups = {bendy=2,snappy=7,dig_immediate=3,rail=1,attached_node=1},
    after_place_node = function(pos, placer, itemstack)
        if not mesecon then
            minetest.get_meta(pos):set_string("cart_acceleration", "0.5")
        end
    end,
   
    mesecons = {
        effector = {
            action_on = function(pos, node)
                minetest.get_meta(pos):set_string("cart_acceleration", "0.5")
            end,
           
            action_off = function(pos, node)
                minetest.get_meta(pos):set_string("cart_acceleration", "0")
            end,
        },
    },
})
(it's from the carts mod, by PilzAdam)

the most important part is
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
minetest.register_node(":default:rail" ...


you have to add : before the redefinition of the node.

PostPosted: Sun Jun 23, 2013 00:33
by cypher-neo
Mito551 wrote:the most important part is
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
minetest.register_node(":default:rail" ...


you have to add : before the redefinition of the node.


Oh... I see!

PostPosted: Wed Jun 26, 2013 15:33
by cypher-neo
New version uploaded! https://anonfiles.com/file/c481940b2d7d8c80b432df24d7cc8f35

On this version I tweaked the random pick times to make them a little less ridiculous. Pick times still vary wildly, but it won't cramp your mouse finger so much now.

Also tweaked Erosion a bit.
Stone has an equal chance of turning into either gravel or sand when exposed to water.
When exposed to water: Sand turns into clay. Clay turns into Dirt. Dirt turns into sand (full circle)
Gravel turns into stone_with_coal. stone_with_coal eventually erodes and the coal washes away, so stone_with_coal turns into regular stone (another full circle).

Added a full reset into CrazyLava to reset most things to stone. Sand still turns into glass, and gravel into lava. But clay, dirt, and cobble all turn into stone when exposed to massive heat. So if erosion goes crazy, just reset it.