Page 1 of 2

[Mod] xtrablocks [0.0.1] [Marble_Blocks] New File Host

PostPosted: Sun Sep 30, 2012 20:52
by GJH105775
This is my mod named "xtrablocks"
Post any comments good or bad. I am open to ideas.

Here is the newest Init.Lua. It fixes items not showing in inventory
Direct: http://dc737.4shared.com/download/ENDkqFDJba/init__1_.lua?tsid=20150225-012235-ef80c1be&lgfp=2000

Indirect: http://www.4shared.com/file/ENDkqFDJba/init__1_.html

Code if you don't want to download

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
    --fancy wood
    minetest.register_node("xtrablocks:fancywood", {
        tile_images = {"xtrablocks_fancywood.png"},
        groups={snappy=2,choppy=3,oddly_breakable_by_hand=2,flammable=3},
       description = "FancyWood"   
    })
minetest.register_craft({
    output = '"xtrablocks:fancywood" 5',
    recipe = {
        {'default:wood', 'default:wood', 'default:wood'},
        {'default:wood', 'default:wood', 'default:wood'},
        {'', '', ''},
    }
})

--fancy tile cobble,stone
minetest.register_node("xtrablocks:fancytile", {
    tile_images = {"xtrablocks_fancytile.png"},
    groups={cracky=3},
   description = "FancyCobble" 
})
minetest.register_craft({
    output = '"xtrablocks:fancytile" 2',
    recipe = {
        {'default:cobble', 'default:stone', ''},
        {'default:stone', 'default:cobble', ''},
        {'', '', ''},
    }
})


--fancy marble
minetest.register_node("xtrablocks:fancymarble", {
    tile_images = {"xtrablocks_fancymarble.png"},
    groups={cracky=1},
   description = "FancyMarble"   
})

minetest.register_craft({
    type = "cooking",
    output = "xtrablocks:fancymarble",
    recipe = "default:stone",
})


--fancy pure white marble
minetest.register_node("xtrablocks:fancypurewhitemarble", {
    tile_images = {"xtrablocks_fancypurewhitemarble.png"},
    groups={cracky=1},
   description = "FancyPureWhite"   
})

--fancy green marble
minetest.register_node("xtrablocks:fancygreenmarble", {
    tile_images = {"xtrablocks_fancygreenmarble.png"},
    groups={cracky=1},
   description = "FancyGreen"   
})


--fancy black marble
minetest.register_node("xtrablocks:fancyblackmarble", {
    tile_images = {"xtrablocks_fancyblackmarble.png"},
    groups={cracky=1},
   description = "FancyBlack"   
})

--fancy red marble
minetest.register_node("xtrablocks:fancyredmarble", {
    tile_images = {"xtrablocks_fancyredmarble.png"},
    groups={cracky=1},
   description = "FancyRed"   
})
--generation

local function generate_ore(name, wherein, minp, maxp, seed, chunks_per_volume, ore_per_chunk, height_min, height_max)
   if maxp.y < height_min or minp.y > height_max then
      return
   end
   local y_min = math.max(minp.y, height_min)
   local y_max = math.min(maxp.y, height_max)
   local volume = (maxp.x-minp.x+1)*(y_max-y_min+1)*(maxp.z-minp.z+1)
   local pr = PseudoRandom(seed)
   local num_chunks = math.floor(chunks_per_volume * volume)
   local chunk_size = 3
   if ore_per_chunk <= 4 then
      chunk_size = 2
   end
   local inverse_chance = math.floor(chunk_size*chunk_size*chunk_size / ore_per_chunk)
   --print("generate_ore num_chunks: "..dump(num_chunks))
   for i=1,num_chunks do
   if (y_max-chunk_size+1 <= y_min) then return end
      local y0 = pr:next(y_min, y_max-chunk_size+1)
      if y0 >= height_min and y0 <= height_max then
         local x0 = pr:next(minp.x, maxp.x-chunk_size+1)
         local z0 = pr:next(minp.z, maxp.z-chunk_size+1)
         local p0 = {x=x0, y=y0, z=z0}
         for x1=0,chunk_size-1 do
         for y1=0,chunk_size-1 do
         for z1=0,chunk_size-1 do
            if pr:next(1,inverse_chance) == 1 then
               local x2 = x0+x1
               local y2 = y0+y1
               local z2 = z0+z1
               local p2 = {x=x2, y=y2, z=z2}
               if minetest.env:get_node(p2).name == wherein then
                  minetest.env:set_node(p2, {name=name})
               end
            end
         end
         end
         end
      end
   end
   print("generate_ore done")
end

minetest.register_on_generated(function(minp, maxp, seed)
generate_ore("xtrablocks:fancymarble", "default:stone", minp, maxp, seed+16,   1/11/11/11,    8, -31000,  64)
generate_ore("xtrablocks:fancypurewhitemarble", "default:stone", minp, maxp, seed+17,   1/8/8/8,    2, -31000,  8)
generate_ore("xtrablocks:fancygreenmarble", "default:stone", minp, maxp, seed+18,   1/9/9/9,    5, -31005,  2)
generate_ore("xtrablocks:fancyredmarble", "default:stone", minp, maxp, seed+16,   1/12/12/12,    9, -31000,  64)
generate_ore("xtrablocks:fancyblackmarble", "default:stone", minp, maxp, seed+17,   1/15/15/15,    2, -31000,  8)
--generate_ore("xtrablocks:fancygreenmarble", "default:stone", minp, maxp, seed+18,   1/9/9/9,    5, -31005,  2)
--generate_ore("moreores:xtrablocks:fancyblackmarble", "default:stone", minp, maxp, seed+18,   1/10/10/10,    5, -31000,  2)
--generate_ore("moreores:xtrablocks_fancyredmarble", "default:stone", minp, maxp, seed+19,   1/11/11/11,    5, -31000,  -64)
--generate_ore(":mineral_mithril", "default:stone", minp, maxp, seed+20,   1/6/6/6,    1, -31000,  -512)
end)



Plan to add
-crystals
-Furnace like crafting device
-more woods
-more tiles
Release: 0.0.1
screenshot
All of theese spawned naturally I used nuke from the urainum mod and made a big sphere
http://dc414.2shared.com/download/ZtuC5pZ9/Screenshot_from_2012-10-01_100.png?tsid=20121002-013130-9455eba0
Image
Image

Download
2 Shared - Click smaller download button
http://www.2shared.com/file/vjpYSQOQ/xtrablockstar.html
or direct link
http://dc589.2shared.com/download/vjpYSQOQ/xtrablockstar.gz?tsid=20121001-135003-8f1aac84
4 Shared - Recommended
Tar.gz
http://www.4shared.com/archive/yT6L7kiq/xtrablockstar.html
or .zip
http://www.4shared.com/zip/UITyXQ3Hce/xtrablocks.html
has mutiple marble stone, tile and wood
Glitches include xtrablocks:fancyredmarble and xtrablocks:fancyblackmarble do not spawn
*fixed red marble glitch, now red marble spawns
*fixed black marble glitch, now black marble spawns


Crafting for fancy (cobble, stone tile)
{'default:cobble', 'default:stone', blank''},
{'default:stone', 'default:cobble',blank ''},
{'blank, ''blank, 'blank''},

Crafting for fancy wood
{'default:wood', 'default:wood', 'default:wood'},
{'default:wood', 'default:wood', 'default:wood'},
{''blank, ''blank, ''blank},

License WTFPL [url]http://sam.zoy.org/wtfpl/[/url]

Known bugs

-
balthazariv wrote:Hello,

I am in creative mode and I have no objects that appear in my inventory.


Any suggestions are very welcomed.

balthazariv wrote:
You have :

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
--fancy wood
minetest.register_node("xtrablocks:fancywood", {
    tile_images = {"xtrablocks_fancywood.png"},
    groups={snappy=2,choppy=3,oddly_breakable_by_hand=2,flammable=3},
   description = "FancyWood"
    }
})


You need :

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
--fancy wood
minetest.register_node("xtrablocks:fancywood", {
    tile_images = {"xtrablocks_fancywood.png"},
    groups={snappy=2,choppy=3,oddly_breakable_by_hand=2,flammable=3},
   description = "FancyWood"   
})





Image

PostPosted: Mon Oct 01, 2012 02:28
by InfinityProject
Can you please put it on another download site such as http://ompldr.org/ or http://www.mediafire.com/ ? I don't want to have to create an account just to download it.

PostPosted: Mon Oct 01, 2012 12:03
by GJH105775
Ok, I will do that.

PostPosted: Mon Oct 01, 2012 12:38
by GJH105775
I donot care too much for either of those sites know any others?

PostPosted: Mon Oct 01, 2012 12:49
by Topywo
GJH105775 wrote:I donot care too mmuch for those two sites know any others?


You could try dropbox. It would be a waste not to publish this mod to a bigger group of players, because your marble textures (64x64) look really great!

The red and black marble didn't spawn naturally. Maybe because of their seed.

Changing the seed of the red marble to +19 made it generate too.

Changing the seed of black marble to +20 or +350 still didn't make it generate. I don't know why, because I didn't look up somewhere how the seed thing is supposed to work. Calinou's Moreores uses a function "get_next_seed()". That mod works.

(I used free + fast move and a cheap x-ray texture to look for it in a big area)

PostPosted: Mon Oct 01, 2012 12:58
by GJH105775
I was going to use dropbox but it needs to be downloaded and I am on a linux base. I want a site that is quick to upload a file, free, and easy for people to download a file. Got any ideas?

PostPosted: Mon Oct 01, 2012 13:07
by GJH105775
Topywo wrote:
GJH105775 wrote:I donot care too mmuch for those two sites know any others?


You could try dropbox. It would be a waste not to publish this mod to a bigger group of players, because your marble textures (64x64) look really great!

The red and black marble didn't spawn naturally. Maybe because of their seed.

Changing the seed of the red marble to +19 made it generate too.

Changing the seed of black marble to +20 or +350 still didn't make it generate. I don't know why, because I didn't look up somewhere how the seed thing is supposed to work. Calinou's Moreores uses a function "get_next_seed()". That mod works.

(I used free + fast move and a cheap x-ray texture to look for it in a big area)



Thanks for helping on the bug.

PostPosted: Mon Oct 01, 2012 13:36
by GJH105775
I found a site to use that would work.

PostPosted: Mon Oct 01, 2012 13:45
by GJH105775
I set black marble seed to 99 and I got a few spawns per every few chunks!!

PostPosted: Mon Oct 01, 2012 13:45
by cornernote
GJH105775 wrote:I was going to use dropbox but it needs to be downloaded and I am on a linux base. I want a site that is quick to upload a file, free, and easy for people to download a file. Got any ideas?


Github

PostPosted: Mon Oct 01, 2012 13:56
by GJH105775
cornernote wrote:
GJH105775 wrote:I was going to use dropbox but it needs to be downloaded and I am on a linux base. I want a site that is quick to upload a file, free, and easy for people to download a file. Got any ideas?


Github

I have a site that is perfect now but thanks anyways.

PostPosted: Mon Oct 01, 2012 16:43
by rubenwardy
The screenshot does not work, because it links to a webpage, not an image

Use this link, it is a direct link to the image: http://dc414.2shared.com/download/ZtuC5pZ9/Screenshot_from_2012-10-01_100.png?tsid=20121001-164051-72ceef5c

PostPosted: Tue Oct 02, 2012 01:34
by GJH105775
rubenwardy wrote:The screenshot does not work, because it links to a webpage, not an image

Use this link, it is a direct link to the image: http://dc414.2shared.com/download/ZtuC5pZ9/Screenshot_from_2012-10-01_100.png?tsid=20121001-164051-72ceef5c



Ok thanks it was working, but must have been changed by the file sharing site.

PostPosted: Fri Oct 05, 2012 11:37
by GJH105775
I need some suggestions! :)

PostPosted: Fri Oct 05, 2012 11:44
by Topywo
GJH105775 wrote:I need some suggestions! :)


Pillars made out of marble would look really nice. Small pillars (1 block to make 1 layer) and big pillars (4 blocks to make 1 layer). I guess you'll need to use nodebox for it.

PostPosted: Sat Oct 06, 2012 12:32
by GJH105775
Topywo wrote:
GJH105775 wrote:I need some suggestions! :)


Pillars made out of marble would look really nice. Small pillars (1 block to make 1 layer) and big pillars (4 blocks to make 1 layer). I guess you'll need to use nodebox for it.


Nice idea.

Re: [Mod] xtrablocks [0.0.1] [Marble_Blocks]

PostPosted: Thu Aug 21, 2014 16:53
by Krock
Please add more stones and use an other file hoster for this. I would prefer mediacrush, mediafire and dropbox.

Re: [Mod] xtrablocks [0.0.1] [Marble_Blocks]

PostPosted: Thu Aug 21, 2014 17:32
by balthazariv
Hello,

I am in creative mode and I have no objects that appear in my inventory.

Re: [Mod] xtrablocks [0.0.1] [Marble_Blocks]

PostPosted: Thu Aug 21, 2014 17:42
by GJH105775
Ok, will try to transfer to another fileshareing site.
Won't allow on mediacrush.

-----------------EDIT-----------------
Added to 4shared, in both tar.gz and .zip .

Re: [Mod] xtrablocks [0.0.1] [Marble_Blocks]

PostPosted: Wed Aug 27, 2014 20:52
by GJH105775
balthazariv wrote:Hello,

I am in creative mode and I have no objects that appear in my inventory.


What do I have to do to fix this?

Re: [Mod] xtrablocks [0.0.1] [Marble_Blocks] New File Host

PostPosted: Wed Aug 27, 2014 22:25
by balthazariv
I know nothing in programming but I think you should be able to find a solution in this article http://dev.minetest.net/minetest.register_node

But people should certainly be able to help you.

Thanks

Re: [Mod] xtrablocks [0.0.1] [Marble_Blocks] New File Host

PostPosted: Thu Aug 28, 2014 03:15
by GJH105775
Been too long scince I have messed with minetest mods. I forgot the different variable and class names.

Re: [Mod] xtrablocks [0.0.1] [Marble_Blocks]

PostPosted: Thu Aug 28, 2014 09:38
by Topywo
GJH105775 wrote:
balthazariv wrote:Hello,

I am in creative mode and I have no objects that appear in my inventory.


What do I have to do to fix this?


Add this line of code under each minetest.register_node:
description = "Name you want to give the node in the inventory",

Re: [Mod] xtrablocks [0.0.1] [Marble_Blocks] New File Host

PostPosted: Sun Aug 31, 2014 17:18
by GJH105775
I am not near any of my Linux PCs and cannot test it. If someone could test by replacing your init.lua with this http://www.4shared.com/file/50JIkDNhba/init.html

Then go to creative mode and see if you have the items in your inventory.

Re: [Mod] xtrablocks [0.0.1] [Marble_Blocks] New File Host

PostPosted: Wed Sep 03, 2014 21:17
by balthazariv
http://www.4shared.com requires registration to download.
I don't want to register for having to download a single file. Why no you not use simply Github to post your mod ?
Or insert you code in forum between code tags [code][/code]

Thanks

Re: [Mod] xtrablocks [0.0.1] [Marble_Blocks] New File Host

PostPosted: Fri Sep 05, 2014 14:24
by GJH105775
Here is the init.lua

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
--fancy wood
minetest.register_node("xtrablocks:fancywood", {
    tile_images = {"xtrablocks_fancywood.png"},
    groups={snappy=2,choppy=3,oddly_breakable_by_hand=2,flammable=3},
   description = "FancyWood"
    }
})

--fancy tile cobble,stone
minetest.register_node("xtrablocks:fancytile", {
    tile_images = {"xtrablocks_fancytile.png"},
    groups={cracky=3},
   description = "FancyTileStone",
})
minetest.register_craft({
    output = '"xtrablocks:fancytile" 2',
    recipe = {
        {'default:cobble', 'default:stone', ''},
        {'default:stone', 'default:cobble', ''},
        {'', '', ''},
    }
})


--fancy marble
minetest.register_node("xtrablocks:fancymarble", {
    tile_images = {"xtrablocks_fancymarble.png"},
    groups={cracky=1},
   description = "Marble1",
})

minetest.register_craft({
    type = "cooking",
    output = "xtrablocks:fancymarble",
    recipe = "default:stone",
})


--fancy pure white marble
minetest.register_node("xtrablocks:fancypurewhitemarble", {
    tile_images = {"xtrablocks_fancypurewhitemarble.png"},
    groups={cracky=1},
   description = "WhiteMarble",
})

--fancy green marble
minetest.register_node("xtrablocks:fancygreenmarble", {
    tile_images = {"xtrablocks_fancygreenmarble.png"},
    groups={cracky=1},
   description = "GreenMArble",
})


--fancy black marble
minetest.register_node("xtrablocks:fancyblackmarble", {
    tile_images = {"xtrablocks_fancyblackmarble.png"},
    groups={cracky=1},
   description = "BleckMarble",
})

--fancy red marble
minetest.register_node("xtrablocks:fancyredmarble", {
    tile_images = {"xtrablocks_fancyredmarble.png"},
    groups={cracky=1},
   description = "RedMarble",
})
--generation

local function generate_ore(name, wherein, minp, maxp, seed, chunks_per_volume, ore_per_chunk, height_min, height_max)
   if maxp.y < height_min or minp.y > height_max then
      return
   end
   local y_min = math.max(minp.y, height_min)
   local y_max = math.min(maxp.y, height_max)
   local volume = (maxp.x-minp.x+1)*(y_max-y_min+1)*(maxp.z-minp.z+1)
   local pr = PseudoRandom(seed)
   local num_chunks = math.floor(chunks_per_volume * volume)
   local chunk_size = 3
   if ore_per_chunk <= 4 then
      chunk_size = 2
   end
   local inverse_chance = math.floor(chunk_size*chunk_size*chunk_size / ore_per_chunk)
   --print("generate_ore num_chunks: "..dump(num_chunks))
   for i=1,num_chunks do
   if (y_max-chunk_size+1 <= y_min) then return end
      local y0 = pr:next(y_min, y_max-chunk_size+1)
      if y0 >= height_min and y0 <= height_max then
         local x0 = pr:next(minp.x, maxp.x-chunk_size+1)
         local z0 = pr:next(minp.z, maxp.z-chunk_size+1)
         local p0 = {x=x0, y=y0, z=z0}
         for x1=0,chunk_size-1 do
         for y1=0,chunk_size-1 do
         for z1=0,chunk_size-1 do
            if pr:next(1,inverse_chance) == 1 then
               local x2 = x0+x1
               local y2 = y0+y1
               local z2 = z0+z1
               local p2 = {x=x2, y=y2, z=z2}
               if minetest.env:get_node(p2).name == wherein then
                  minetest.env:set_node(p2, {name=name})
               end
            end
         end
         end
         end
      end
   end
   print("generate_ore done")
end

minetest.register_on_generated(function(minp, maxp, seed)
generate_ore("xtrablocks:fancymarble", "default:stone", minp, maxp, seed+16,   1/11/11/11,    8, -31000,  64)
generate_ore("xtrablocks:fancypurewhitemarble", "default:stone", minp, maxp, seed+17,   1/8/8/8,    2, -31000,  8)
generate_ore("xtrablocks:fancygreenmarble", "default:stone", minp, maxp, seed+18,   1/9/9/9,    5, -31005,  2)
generate_ore("xtrablocks:fancyredmarble", "default:stone", minp, maxp, seed+19,   1/12/12/12,    9, -31000,  64)
generate_ore("xtrablocks:fancyblackmarble", "default:stone", minp, maxp, seed+99,   1/15/15/15,    2, -31000,  8)
--generate_ore("xtrablocks:fancygreenmarble", "default:stone", minp, maxp, seed+18,   1/9/9/9,    5, -31005,  2)
--generate_ore("moreores:xtrablocks:fancyblackmarble", "default:stone", minp, maxp, seed+18,   1/10/10/10,    5, -31000,  2)
--generate_ore("moreores:xtrablocks_fancyredmarble", "default:stone", minp, maxp, seed+19,   1/11/11/11,    5, -31000,  -64)
--generate_ore(":mineral_mithril", "default:stone", minp, maxp, seed+20,   1/6/6/6,    1, -31000,  -512)
end)




Re: [Mod] xtrablocks [0.0.1] [Marble_Blocks] New File Host

PostPosted: Fri Sep 05, 2014 16:08
by balthazariv
Hello,

Now, i have items in my inventory but

17:58:18: ERROR[main]: Failed to load and run script from
17:58:18: ERROR[main]: L:\Minetest\minetest - Copie\bin\..\mods\xtrablocks\init.lua:
17:58:18: ERROR[main]: ...inetest\minetest - Copie\bin\..\mods\xtrablocks\init.lua:7: ')' expected (to close '(' at line 2) near '}'


You have :

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
--fancy wood
minetest.register_node("xtrablocks:fancywood", {
    tile_images = {"xtrablocks_fancywood.png"},
    groups={snappy=2,choppy=3,oddly_breakable_by_hand=2,flammable=3},
   description = "FancyWood"
    }
})


You need :

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
--fancy wood
minetest.register_node("xtrablocks:fancywood", {
    tile_images = {"xtrablocks_fancywood.png"},
    groups={snappy=2,choppy=3,oddly_breakable_by_hand=2,flammable=3},
   description = "FancyWood"   
})

Re: [Mod] xtrablocks [0.0.1] [Marble_Blocks] New File Host

PostPosted: Wed Feb 25, 2015 14:18
by GJH105775
Thanks, repaired it. I have not been very active lately. Looking into making a very bright light block for devs, or droppable flares.

Re: [Mod] xtrablocks [0.0.1] [Marble_Blocks] New File Host

PostPosted: Fri Oct 09, 2015 22:50
by GJH105775
Not directly related to the mod, but I may decide to get back into updating and adding onto it haha:

A couple weeks ago I got the contract for a 1C6 job (SPACE SYSTEMS OPERATIONS), I go to AFBMT (Air Force Basic Military Training) this coming July. I got my dream sheet (list of bases that you can choose from, but it is called a dream sheet because you are not guaranteed like jobs are).

I am hoping to get to go to Cape Canaveral, Florida or Vandenberg, California for my first two years of enlistment and after that I'd hope to go to Ramstein AFB in German. Anyways, NASA or DARPA have kinda been dream jobs for me. Any of you guys have advice on bases, or a story of getting your dream job?

Re: [Mod] xtrablocks [0.0.1] [Marble_Blocks] New File Host

PostPosted: Fri Oct 09, 2015 23:21
by blert2112
I live just west of KSC, on the other side of the river. If you have kids pray you do not get sent here... The school system sucks hard. I pulled both my kids out and have been homeschooling them for the past two years. Other than that, Florida is nice.