Page 1 of 1

[Mod] Mines (with Treasurer support) [0.6] [tsm_mines]

PostPosted: Sun Oct 12, 2014 13:06
by Wuzzy
Note: This mod has been abandoned.
Check out tsm_railcorridors instead!


This mod is a fork of BlockMen’s Mines mod.
Like the original, this mod adds abandoned mines in the underground. If you're lucky, you find a chest with goodies inside.

Unlike the original, this mod utilizes Treasurer to spawn the treasures in the chests, so there can be more variety in the treasures you can find. Using Treasurer is optional, if you don’t use this mod, this mod falls back to using default treasures (Minetest Game goodies).

Screenshot:
Image

See also: Railway corridors for Treasurer [tsm_railcorridors], a mod that is very similar


Re: [Mod] Mines (with Treasurer support) [0.4] [tsm_mines]

PostPosted: Mon Oct 27, 2014 05:28
by HeroOfTheWinds
I'm surprised that this got missed...

I actually had been thinking about making a fork of mines, but you beat me to it. Nice job!
Still, perhaps some screenshots would give it some more attention-drawing power.

Hmm, looking at the code, it seems you're using the non-mapgen version of the LVM...? If so, I just might try to make another version combining the mapgen object LVM and building off the principle of paramat's noisegrid. That being said, I doubt I'd get to it anytime soon....

Re: [Mod] Mines (with Treasurer support) [0.4] [tsm_mines]

PostPosted: Fri Mar 25, 2016 12:44
by burli
second time this mod crashes

Code: Select all
2016-03-25 13:34:34: WARNING[Emerge-0]: Assignment to undeclared global "n_switch" inside a function at /home/markus/minetest/bin/../mods/tsm_mines/init.lua:122.
2016-03-25 13:34:34: WARNING[Emerge-0]: Assignment to undeclared global "x5" inside a function at /home/markus/minetest/bin/../mods/tsm_mines/init.lua:184.
2016-03-25 13:34:34: WARNING[Emerge-0]: Assignment to undeclared global "z5" inside a function at /home/markus/minetest/bin/../mods/tsm_mines/init.lua:190.
2016-03-25 13:34:34: ACTION[Emerge-0]: Created mine at (354,-90,-186)
Speicherzugriffsfehler (Speicherabzug geschrieben)


Code: Select all
./bin/minetest --version
Minetest 0.4.13-dev-80cec47
Using Irrlicht 1.8.1
Build info: VER=0.4.13-dev-80cec47 BUILD_TYPE=Release RUN_IN_PLACE=1 USE_GETTEXT=1 USE_SOUND=1 USE_CURL=1 USE_FREETYPE=1 USE_LUAJIT=1 STATIC_SHAREDIR="."

Re: [Mod] Mines (with Treasurer support) [0.4] [tsm_mines]

PostPosted: Sat Mar 26, 2016 18:44
by MineYoshi
Screenshots?
please?

Re: [Mod] Mines (with Treasurer support) [0.5] [tsm_mines]

PostPosted: Sat Mar 26, 2016 19:53
by Wuzzy
I just released version 0.5 with screenshot, code clean up, metadata and bugfixes. The crash reported by burli should be fixed, but if not, please reply.
Please note this mod is still not really complete.

Re: [Mod] Mines (with Treasurer support) [0.5] [tsm_mines]

PostPosted: Sun Mar 27, 2016 12:07
by burli
no, still crashes

Code: Select all
2016-03-27 14:05:38: ACTION[Emerge-2]: Created mine at (-10,-74,-33)
2016-03-27 14:05:53: ACTION[Emerge-0]: Created mine at (-105,-95,-36)
2016-03-27 14:05:54: ACTION[Emerge-2]: Created mine at (-59,-68,108)
Speicherzugriffsfehler (Speicherabzug geschrieben)

Re: [Mod] Mines (with Treasurer support) [0.5] [tsm_mines]

PostPosted: Sun Mar 27, 2016 12:59
by Wuzzy
Okay, I cannot reproduce this crash.
Please provide the following information (if you know it):
- Minetest version
- Subgame you used
- Mods you have activated in your world
- Name of map generator you used
- World seed (you see it in debug screen when you hit F5)
- Operating system

Re: [Mod] Mines (with Treasurer support) [0.5] [tsm_mines]

PostPosted: Sun Mar 27, 2016 14:31
by burli
Code: Select all
./bin/minetest --version
Minetest 0.4.13-dev-80cec47
Using Irrlicht 1.8.1
Build info: VER=0.4.13-dev-80cec47 BUILD_TYPE=Release RUN_IN_PLACE=1 USE_GETTEXT=1 USE_SOUND=1 USE_CURL=1 USE_FREETYPE=1 USE_LUAJIT=1 STATIC_SHAREDIR="."


default minetest_game from github, just a few days old,

3d armor, mobs redo, mobs_more_monsters, treasurer, trmp, tsm_mines and unified_inventory

valley_mg, seed=1213168583886904465

Ubuntu 14.04 64 Bit

It does not crash every time. In this case it crashes the first time I start the map. Than I enter /grant singleplayer all, "fly" through the ground to find a mine and than MT crashes. Next time I start MT I could play without a crash

Edit: is it possible to increase the size of the mines?

Re: [Mod] Mines (with Treasurer support) [0.5] [tsm_mines]

PostPosted: Fri Apr 01, 2016 16:02
by Fixer
I was testing extreme survival that has this mod and noticed huge max_lag spike once, looked into debug, thousands of "Map::getNodeMetadata(): Block not found" and then "Created mine at (blabla)", I feel that this can be connected to your mod. It happend only once, and seems to occur rarely, other times it generates without that big lag. I can't be wrong, if you can, please investigate (code/profiling).

Re: [Mod] Mines (with Treasurer support) [0.5] [tsm_mines]

PostPosted: Tue Apr 05, 2016 11:04
by linushsao
tested,have no error msg,but my problem is WHERE IS THE MINES?...anyidea?

Re: [Mod] Mines (with Treasurer support) [0.5] [tsm_mines]

PostPosted: Wed Apr 06, 2016 06:42
by burli
linushsao wrote:tested,have no error msg,but my problem is WHERE IS THE MINES?...anyidea?

In the underground. Enable fly and noclip and fly through the underworld. As far as I remember mines spawn from -70 and below

Re: [Mod] Mines (with Treasurer support) [0.5] [tsm_mines]

PostPosted: Wed Apr 06, 2016 23:08
by kaeza
I just tried this fork, and it's quite nice.

I went ahead and added a bit of code to detect and add floors (or bridges, depending on your point of view) whenever a corridor meets a cave and would otherwise have no floor:

Image

Code is at corridor_floors tree on my fork at Github if you want to integrate.

Edit: It's not 100% perfect, but works most of the time. There are some times that for whatever reason it creates floors where there's already solid floor. Will try to fix that ASAP.

Re: [Mod] Mines (with Treasurer support) [0.5] [tsm_mines]

PostPosted: Fri Apr 08, 2016 00:25
by Wuzzy
Interesting. I haven't checked it out, since I am currenty not very active in Minetest.
I plan to move some of my mods on the community mod repository sooner or later.
This might hopefully make things easier for everyone involved.

But I am not sure about including this one, however, it is still pretty much experimental, sorry. :-/

Re: [Mod] Mines (with Treasurer support) [0.5] [tsm_mines]

PostPosted: Fri Apr 08, 2016 06:35
by linushsao
i have enable mod "treasure & tsm_mines",but when i opening chest in mines,it's empty. it happen to every chest,why?

Re: [Mod] Mines (with Treasurer support) [0.5] [tsm_mines]

PostPosted: Fri Apr 08, 2016 06:39
by burli
You need to add trmp mod

Re: [Mod] Mines (with Treasurer support) [0.5] [tsm_mines]

PostPosted: Fri Apr 08, 2016 10:26
by linushsao
burli wrote:You need to add trmp mod


tks,burli. it works,and i do some study. if my thought is correct. when treasurer mod is enabled,the kind of Treasure spawned in chest is depended on what items is registered by TRM.

Re: [Mod] Mines (with Treasurer support) [0.5] [tsm_mines]

PostPosted: Tue Jun 21, 2016 23:53
by Fixer
tsm_mines uses quite a lot of cpu cycles, probably needs optimisations, you can check it with mod profiler.

Version 0.6 released

PostPosted: Sat Nov 19, 2016 01:41
by Wuzzy
Version 0.6 released!

Changelog:
- Allow to configure mod in advanced settings menu
- Add metadata files
- MIT License
- Larger screenshot
- Refactoring

I don't think I will really seriously support this mod in the future. I may phase out this mod in favor of tsm_railcorridors, or merge the map generation algorithm of this mod into tsm_railcorridors. But I am not sure about this yet.

Re: [Mod] Mines (with Treasurer support) [0.6] [tsm_mines]

PostPosted: Sun Jan 15, 2017 16:29
by xisd
I get repetitive warnings while mines are being generated :

Code: Select all
2017-01-15 16:13:45: WARNING[Emerge-0]: Map::getNodeMetadata(): Block not found
2017-01-15 16:13:45: WARNING[Emerge-0]: Map::removeNodeMetadata(): Block not found


That make the game freeze , but it doesn't make it crash (though sometimes warnings are followed by a segmentation fault (so, yes... crash))

I use minetest v 0.4.15 on debian 8 with minetest_game (intllib) and a lot of other mods but I am quite sure it come from tsm_mines because it stop happening if I remove it.
It also happen just before log message "created mine at...." and is quite easy to reproduce by creating a new world, and moving fast in free-move... when a mine appears, game freeze (you can walk in dark ungenerated areas) and warnings are showed...
It also happen with kaeza's fork.

This kind of warning if often due to trying to do something to a node that as not been generated yet.

  • Note/hint :
    It It seem similar to one issue I fixed with (blockmen's ruins mod) and it was caused by 'can-replace' function supposed to check if it was ok to continue :
    Code: Select all
    local function can_replace(pos)
       local n = minetest.get_node_or_nil(pos)
       if n and n.name and minetest.registered_nodes[n.name] and not minetest.registered_nodes[n.name].walkable then
          return true
       elseif not n then
          return true
       else
          return false
       end
    end

    The 'elseif not n ...' shouldn't return true because it mean a node not generated (ignore)
    Anyway that is very annoying because that keep happening and I didn't find the exact cause of it