Adding New World / Subgame / Newbie

webmanoffesto
Member
 
Posts: 35
Joined: Thu Nov 30, 2017 14:30

Adding New World / Subgame / Newbie

by webmanoffesto » Thu Nov 30, 2017 14:41

My son loves MInecraft. I think Minetest looks amazing, and my son likes it. I'm trying to add more features in Minetest for him. Right now I'm trying to add a subgame, Blockland, (just because it looked great and has a lot of mods already in it. I'm open to other suggestions too).

I cloned the "theblackwolf" Git repo, I moved all the files and folders to /home/user/.minetest/games. I unzipped the .zip files and I restarted Minetest. But I don't see how to play these subgames. How do I get the new games / subgames / mods?

I have e.g.
/home/user/.minetest/games/Block Islands
/home/user/.minetest/games/Blocky Adventures

I'm on Linux Ubuntu 16.
 

User avatar
Jordach
Member
 
Posts: 4523
Joined: Mon Oct 03, 2011 17:58
Location: Blender Scene
GitHub: Jordach
IRC: Jordach
In-game: Jordach

Re: Adding New World / Subgame / Newbie

by Jordach » Thu Nov 30, 2017 15:13

Singleplayer Tab:

Hit New

Choose Game from the list (Note: Will not be named after the folder)

Name the world (and add a seed, maybe)

Hit create, then press play. Choose the icons from the bottom to verify you selected the right game.
viewtopic.php?f=10&t=19056 Solar Plains Dev Server
 

webmanoffesto
Member
 
Posts: 35
Joined: Thu Nov 30, 2017 14:30

Re: Adding New World / Subgame / Newbie

by webmanoffesto » Thu Nov 30, 2017 16:32

For New Game
Under "Game" I can choose "Minetest" or "Minimal development test". Same options under "New" / "Game"

When I go to "configure" a world I created I can many many options: beds, boats, bones, bucket. I clicked "Enable All".
So I have all these "mods", I guess. But I don't think this is a "subgame". Is it?

I also downloaded and put dreambuilder_modpack in .minetest/games
But I dont see the results of that yet. Am I doing something wrong, or am I not seeing something?
 

webmanoffesto
Member
 
Posts: 35
Joined: Thu Nov 30, 2017 14:30

Re: Adding New World / Subgame / Newbie

by webmanoffesto » Thu Nov 30, 2017 18:22

Okay I'm making progress now. I unzipped each zip file to its own folder.
Now I can select game
Block Islands, Blocky Adventures, Imagine It, ...
But now I get error messages.

If I try to run Block Islands I get
Code: Select all
An error ocurred in a Lua script, such as a mod
ModError: failed to load and run /home/nathan/.minetest/games/Block_Islands/mods/default/init.lua


I don't see how / where to open the debug.txt file.

I now have
/home/nathan/.minetest/games/Block_Islands/
/home/nathan/.minetest/games/Blocky_Adventures
/home/nathan/.minetest/games/Block_Islands/dreambuilder_modpack
/home/nathan/.minetest/games/Block_Islands/Imagine_It
/home/nathan/.minetest/games/Block_Islands/Terraria_3D

Is that the correct way to do it?

Did I wreck / overwrite the original default Minetest_Game subgame by not correctly unzipping the subgame.zip files in the beginning?
 

User avatar
GreenDimond
Member
 
Posts: 1273
Joined: Wed Oct 28, 2015 01:26
Location: SCP-3008
GitHub: GreenXenith
IRC: GreenDimond
In-game: GreenDimond

Re: Adding New World / Subgame / Newbie

by GreenDimond » Thu Nov 30, 2017 18:40

Alright, the guy that made that subgame has no idea how to use GitHub, so it's not your fault it isn't working well ;P
You only need to download the game you want, in this case Block Islands. Don't clone the git repo. He didn't set it up correctly. Just manually download the block_islands zip file, extract it into your .minetest/games folder, and you should be set.
At the bottom of the Minetest menu there are the subgame icons, select the Block Islands one and make a new world. Everything you need will already be enabled, so just configure your survival/creative tick boxes and play.

As for your progress at this point,
If your minetest_game file is still there, you didn't wreck it, but even if it got removed it wouldn't affect the other subgames.
The debug.txt is usually either in .minetest or if you are unlucky, /usr/share/games/minetest/ or something like that.
It is possible the mods in the subgame need fixing, but it should have said that clearly in the error message, which it didn't.
Y▹uTube | Mods | Patre●n | Twitter | Minetest Discord | GreenDimond#3232

Hey, you. You're finally awake.
You were trying to view their profile, right? Found the rest of their signature, same as us, and that guest over there.
 

webmanoffesto
Member
 
Posts: 35
Joined: Thu Nov 30, 2017 14:30

Re: Adding New World / Subgame / Newbie

by webmanoffesto » Fri Dec 01, 2017 04:04

Thanks

Is there any helpful information in this debug.txt file?
More complete file here https://www.hastebin.com/nokiqihequ.hs

Code: Select all
-------------
2017-11-30 17:51:54: ERROR[main]: ========== ERROR FROM LUA ===========
2017-11-30 17:51:54: ERROR[main]: Failed to load and run script from
2017-11-30 17:51:54: ERROR[main]: /home/nathan/.minetest/games/Blocky_Adventures/mods/doors/init.lua:
2017-11-30 17:51:54: ERROR[main]: ...an/.minetest/games/Blocky_Adventures/mods/doors/init.lua:206: attempt to call field 'register_lbm' (a nil value)
2017-11-30 17:51:54: ERROR[main]: stack traceback:
2017-11-30 17:51:54: ERROR[main]:    ...an/.minetest/games/Blocky_Adventures/mods/doors/init.lua:206: in function 'register'
2017-11-30 17:51:54: ERROR[main]:    ...an/.minetest/games/Blocky_Adventures/mods/doors/init.lua:462: in main chunk
2017-11-30 17:51:54: ERROR[main]: ======= END OF ERROR FROM LUA ========
2017-11-30 17:51:54: ERROR[main]: Server: Failed to load and run /home/nathan/.minetest/games/Blocky_Adventures/mods/doors/init.lua
2017-11-30 17:51:54: ERROR[main]: ModError: ModError: Failed to load and run /home/nathan/.minetest/games/Blocky_Adventures/mods/doors/init.lua
2017-11-30 17:51:54: ERROR[main]: Error from Lua:
2017-11-30 17:51:54: ERROR[main]: ...an/.minetest/games/Blocky_Adventures/mods/doors/init.lua:206: attempt to call field 'register_lbm' (a nil value)
2017-11-30 17:51:54: ERROR[main]: stack traceback:
2017-11-30 17:51:54: ERROR[main]:    ...an/.minetest/games/Blocky_Adventures/mods/doors/init.lua:206: in function 'register'
2017-11-30 17:51:54: ERROR[main]:    ...an/.minetest/games/Blocky_Adventures/mods/doors/init.lua:462: in main chunk
2017-11-30 17:51:54: ERROR[main]: Check debug.txt for details.
 

User avatar
GreenDimond
Member
 
Posts: 1273
Joined: Wed Oct 28, 2015 01:26
Location: SCP-3008
GitHub: GreenXenith
IRC: GreenDimond
In-game: GreenDimond

Re: Adding New World / Subgame / Newbie

by GreenDimond » Fri Dec 01, 2017 04:33

I doubt this will break anything, so I'd say remove lines 205-238
(↓this↓)
Code: Select all
   -- replace old doors of this type automatically
   minetest.register_lbm({
      name = ":doors:replace_" .. name:gsub(":", "_"),
      nodenames = {name.."_b_1", name.."_b_2"},
      action = function(pos, node)
         local l = tonumber(node.name:sub(-1))
         local meta = minetest.get_meta(pos)
         local h = meta:get_int("right") + 1
         local p2 = node.param2
         local replace = {
            { { type = "a", state = 0 }, { type = "a", state = 3 } },
            { { type = "b", state = 1 }, { type = "b", state = 2 } }
         }
         local new = replace[l][h]
         -- retain infotext and doors_owner fields
         minetest.swap_node(pos, {name = name .. "_" .. new.type, param2 = p2})
         meta:set_int("state", new.state)
         -- properly place doors:hidden at the right spot
         local p3 = p2
         if new.state >= 2 then
            p3 = (p3 + 3) % 4
         end
         if new.state % 2 == 1 then
            if new.state >= 2 then
               p3 = (p3 + 1) % 4
            else
               p3 = (p3 + 3) % 4
            end
         end
         -- wipe meta on top node as it's unused
         minetest.set_node({x = pos.x, y = pos.y + 1, z = pos.z},
            {name = "doors:hidden", param2 = p3})
      end
   })


That should fix it.

EDIT: That is in the init.lua of the doors mod.
Last edited by GreenDimond on Fri Dec 01, 2017 04:39, edited 1 time in total.
Y▹uTube | Mods | Patre●n | Twitter | Minetest Discord | GreenDimond#3232

Hey, you. You're finally awake.
You were trying to view their profile, right? Found the rest of their signature, same as us, and that guest over there.
 

webmanoffesto
Member
 
Posts: 35
Joined: Thu Nov 30, 2017 14:30

Re: Adding New World / Subgame / Newbie

by webmanoffesto » Fri Dec 01, 2017 04:37

I installed Big Freaking Dig and that seems to be working well, and it looks cool.
But on Boxel Garden I get the same ModError message
Code: Select all
2017-11-30 23:30:17: ERROR[main]: Server: Failed to load and run /home/nathan/.minetest/games/Voxelgarden-0.4.16.3/mods/hunger/init.lua
2017-11-30 23:30:17: ERROR[main]: ModError: ModError: Failed to load and run /home/nathan/.minetest/games/Voxelgarden-0.4.16.3/mods/hunger/init.lua
2017-11-30 23:30:17: ERROR[main]: Error from Lua:
2017-11-30 23:30:17: ERROR[main]: ...minetest/games/Voxelgarden-0.4.16.3/mods/hunger/init.lua:37: attempt to index field 'settings' (a nil value)
2017-11-30 23:30:17: ERROR[main]: stack traceback:
2017-11-30 23:30:17: ERROR[main]:    ...minetest/games/Voxelgarden-0.4.16.3/mods/hunger/init.lua:37: in main chunk
2017-11-30 23:30:17: ERROR[main]: Check debug.txt for details.
 

User avatar
GreenDimond
Member
 
Posts: 1273
Joined: Wed Oct 28, 2015 01:26
Location: SCP-3008
GitHub: GreenXenith
IRC: GreenDimond
In-game: GreenDimond

Re: Adding New World / Subgame / Newbie

by GreenDimond » Fri Dec 01, 2017 04:40

Oh, if you are using a Minetest version above 0.4.16 (0.4.16-dev or 0.5.0-dev) then things might break.

Best to look at the line it tells you, in this case line 37 in the init.lua of the hunger mod to see what's up.
Y▹uTube | Mods | Patre●n | Twitter | Minetest Discord | GreenDimond#3232

Hey, you. You're finally awake.
You were trying to view their profile, right? Found the rest of their signature, same as us, and that guest over there.
 

webmanoffesto
Member
 
Posts: 35
Joined: Thu Nov 30, 2017 14:30

Re: Adding New World / Subgame / Newbie

by webmanoffesto » Fri Dec 01, 2017 04:45

GreenDimond wrote:I doubt this will break anything, so I'd say remove lines 205-238
Thanks I'll try that.
 

webmanoffesto
Member
 
Posts: 35
Joined: Thu Nov 30, 2017 14:30

Re: Adding New World / Subgame / Newbie

by webmanoffesto » Fri Dec 01, 2017 16:29

GreenDimond wrote:Oh, if you are using a Minetest version above 0.4.16 (0.4.16-dev or 0.5.0-dev) then things might break.

This is Minetest 0.4.13

GreenDimond wrote:Best to look at the line it tells you, in this case line 37 in the init.lua of the hunger mod to see what's up.

Line 37 "end"s a nested loop
Code: Select all
-- Hunger bar
function hunger.update_bar(player, full)
    if not player then return end
    if not full then return end
    local name = player:get_player_name()
    if minetest.get_player_privs(name)["no_hunger"] then
        player:hud_remove(player_bar[name])
        return
    end
    if player_bar[name] then
        player:hud_change(player_bar[name], "number", full)
    else
        player_bar[name] = player:hud_add({
            hud_elem_type = "statbar",
            position = {x=0.5,y=1.0},
            text = "hunger.png",
            number = full,
            dir = 1,
            offset = {x=(9*24)-6,y=-(3*24+8)},
            size = {x=16, y=16},
        })
    end
end

Full file here
https://pastebin.com/5U2tjDci

Description: Hunger
When the hunger bar runs out you only get hurt once and it restarts. The less health you have the faster it runs out. Eating restores two times as much hunger as health.
 

webmanoffesto
Member
 
Posts: 35
Joined: Thu Nov 30, 2017 14:30

Re: Adding New World / Subgame / Newbie

by webmanoffesto » Fri Dec 01, 2017 16:53

GreenDimond wrote:I doubt this will break anything, so I'd say remove lines 205-238

I opened that file, commented out those lines, and Blocky Adventures seems to work now. Thanks!

Do you have any advice on how to get Block_Islands working?
Code: Select all
Block_Islands/mods/default/init.lua

2017-12-01 11:57:05: ERROR[main]: ========== ERROR FROM LUA ===========
2017-12-01 11:57:05: ERROR[main]: Failed to load and run script from
2017-12-01 11:57:05: ERROR[main]: /home/nathan/.minetest/games/Block_Islands/mods/default/init.lua:
2017-12-01 11:57:05: ERROR[main]: ...han/.minetest/games/Block_Islands/mods/default/trees.lua:84: attempt to call field 'register_lbm' (a nil value)
2017-12-01 11:57:05: ERROR[main]: stack traceback:
2017-12-01 11:57:05: ERROR[main]:    ...han/.minetest/games/Block_Islands/mods/default/trees.lua:84: in main chunk
2017-12-01 11:57:05: ERROR[main]:    [C]: in function 'dofile'
2017-12-01 11:57:05: ERROR[main]:    ...than/.minetest/games/Block_Islands/mods/default/init.lua:41: in main chunk
2017-12-01 11:57:05: ERROR[main]: ======= END OF ERROR FROM LUA ========
2017-12-01 11:57:05: ERROR[main]: Server: Failed to load and run /home/nathan/.minetest/games/Block_Islands/mods/default/init.lua
2017-12-01 11:57:05: ERROR[main]: ModError: ModError: Failed to load and run /home/nathan/.minetest/games/Block_Islands/mods/default/init.lua
2017-12-01 11:57:05: ERROR[main]: Error from Lua:
2017-12-01 11:57:05: ERROR[main]: ...han/.minetest/games/Block_Islands/mods/default/trees.lua:84: attempt to call field 'register_lbm' (a nil value)
2017-12-01 11:57:05: ERROR[main]: stack traceback:
2017-12-01 11:57:05: ERROR[main]:    ...han/.minetest/games/Block_Islands/mods/default/trees.lua:84: in main chunk
2017-12-01 11:57:05: ERROR[main]:    [C]: in function 'dofile'
2017-12-01 11:57:05: ERROR[main]:    ...than/.minetest/games/Block_Islands/mods/default/init.lua:41: in main chunk
2017-12-01 11:57:05: ERROR[main]: Check debug.txt for details.


trees.lua file is here
https://pastebin.com/qnubRtWk

The .minetest/games/Block_Islands/mods/default/trees.lua:84 simply is
Code: Select all
dofile(default_path.."/trees.lua")


In ".minetest/games/Block_Islands/mods/default/trees.lua:84"
I see
Code: Select all
minetest.register_lbm({
    name = "default:convert_saplings_to_node_timer",
    nodenames = {"default:sapling", "default:junglesapling",
            "default:pine_sapling", "default:acacia_sapling",
            "default:aspen_sapling"},
    action = function(pos)
        minetest.get_node_timer(pos):start(math.random(1200, 2400))
    end
})
 

User avatar
Jordach
Member
 
Posts: 4523
Joined: Mon Oct 03, 2011 17:58
Location: Blender Scene
GitHub: Jordach
IRC: Jordach
In-game: Jordach

Re: Adding New World / Subgame / Newbie

by Jordach » Fri Dec 01, 2017 19:11

LBMs require a newer version of Minetest, try the PPA or compile from Git HEAD.
viewtopic.php?f=10&t=19056 Solar Plains Dev Server
 

User avatar
GreenDimond
Member
 
Posts: 1273
Joined: Wed Oct 28, 2015 01:26
Location: SCP-3008
GitHub: GreenXenith
IRC: GreenDimond
In-game: GreenDimond

Re: Adding New World / Subgame / Newbie

by GreenDimond » Fri Dec 01, 2017 19:33

Jordach wrote:LBMs require a newer version of Minetest, try the PPA or compile from Git HEAD.


Code: Select all
$ sudo add-apt-repository ppa:minetestdevs/stable
$ sudo apt-get update
$ sudo apt-get install minetest
Y▹uTube | Mods | Patre●n | Twitter | Minetest Discord | GreenDimond#3232

Hey, you. You're finally awake.
You were trying to view their profile, right? Found the rest of their signature, same as us, and that guest over there.
 

webmanoffesto
Member
 
Posts: 35
Joined: Thu Nov 30, 2017 14:30

Re: Adding New World / Subgame / Newbie

by webmanoffesto » Fri Dec 01, 2017 20:21

GreenDimond wrote:
Jordach wrote:LBMs require a newer version of Minetest, try the PPA or compile from Git HEAD.


Code: Select all
$ sudo add-apt-repository ppa:minetestdevs/stable
$ sudo apt-get update
$ sudo apt-get install minetest


I used the PPA and the commandline commands. Things are working great now. Thank you!
 


Return to General Discussion



Who is online

Users browsing this forum: No registered users and 1 guest