Secret Passages! :D

Gatharoth
Member
 
Posts: 196
Joined: Thu Dec 22, 2011 02:54

Secret Passages! :D

by Gatharoth » Fri Dec 30, 2011 20:08

Want to hide your treasury? Want to make your house/castle/home look smaller than it really is? Well come try this simple mod! XP Haha, okay okay. Enough joking around.

Anyway, this is a simple mod that will create false wall, which you can pass through, but not see through. :D

Default False Nodes:
  • Dirt
  • Brick
  • Cobble
  • Wood
  • Sand
  • Stone
  • Tree
  • Glass
  • Jungle Tree
  • Mossy Cobble
  • Mese
  • Steel Block
  • Sand Stone
  • Gravel
  • Clay
  • Cactus
  • Papyrus
  • Bookshelf
  • Desert Stone
  • Desert Sand

Crafting:
C X C

C = component
X = What ever node you want to false-a-fy

Component:
G G G
G D G
G G G

G = Glass
D = Dirt.


Other Modders! If you want to add a node to become a false node, use this code

Registering:
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
register_secret_passage(modname, yournodename, yournode, drawtype)

Example:
register_secret_passage("secret_passage", "cobble", 'secret_passage:cobble', 'normal')


Download Zip
Download Here

Known Problems:

Unsolved:
  • Minor error with textures when using fake glass with real glass.

Solved:

Updates:

2012/7/3
  • Added desert stone and sand
  • Updated code for current version.
  • All false blocks are instantly destructible.
  • Increased glass required to craft components
  • Decreased components required to make false blocks

2012/02/04
  • Added more nodes, probably some that won't be used.
  • Made possible for other mods to add nodes to become false nodes as well.
  • Fix for bugs thanks to Kahrl_


2012/02/12
  • Added drawtype definition for other modders
  • Manually registered fake glass to avoid errors.
Last edited by Gatharoth on Wed Jul 04, 2012 04:35, edited 1 time in total.
 

User avatar
Hackeridze
Member
 
Posts: 310
Joined: Thu Nov 03, 2011 13:35

by Hackeridze » Fri Dec 30, 2011 20:19

Good job! But recipe... Is not so god as can be.
My game: RTMG
GENTOO USER
 

rahonejm
Member
 
Posts: 88
Joined: Wed Dec 28, 2011 01:58

by rahonejm » Fri Dec 30, 2011 20:19

TRAPS! Awesome mod!
Sorry for possible language mistakes
 

Gatharoth
Member
 
Posts: 196
Joined: Thu Dec 22, 2011 02:54

by Gatharoth » Fri Dec 30, 2011 20:39

Hackeridze wrote:Good job! But recipe... Is not so god as can be.


You can change them. They were just something I threw together quickly.
 

rahonejm
Member
 
Posts: 88
Joined: Wed Dec 28, 2011 01:58

by rahonejm » Fri Dec 30, 2011 20:43

you should try doing a especial block for false things, like a transparent block or something like that... Then, instead of using wood blocks, use the special one!
Sorry for possible language mistakes
 

Gatharoth
Member
 
Posts: 196
Joined: Thu Dec 22, 2011 02:54

by Gatharoth » Fri Dec 30, 2011 20:44

rahonejm wrote:you should try doing a especial block for false things, like a transparent block or something like that... Then, instead of using wood blocks, use the special one!

Hmmm :D good idea!
 

Gatharoth
Member
 
Posts: 196
Joined: Thu Dec 22, 2011 02:54

by Gatharoth » Fri Dec 30, 2011 21:28

Updated mod.
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

by sfan5 » Fri Dec 30, 2011 21:41

i like this Mod!
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

rahonejm
Member
 
Posts: 88
Joined: Wed Dec 28, 2011 01:58

by rahonejm » Fri Dec 30, 2011 22:41

hell yeah now is fu###n awesome!
Sorry for possible language mistakes
 

User avatar
Jeija
Member
 
Posts: 686
Joined: Fri Dec 23, 2011 21:46

by Jeija » Sat Dec 31, 2011 05:49

Great Idea! +1
Redstone for minetest: Mesecons (mesecons.net)
 

User avatar
redcrab
Member
 
Posts: 831
Joined: Tue Dec 13, 2011 13:45

by redcrab » Sat Dec 31, 2011 11:37

I love it , but I guess you should use the default texture and not a copy of default texture. by this way secret passage stay secret even after customization of the default textures
may be there is a constraint that avoid a mod can't use texture from another mod ?

Great idea .
Last edited by redcrab on Sat Dec 31, 2011 11:39, edited 1 time in total.
0.4 for serious builder click here
Dedicated Minetest redcrab server forum at http://minetestbb.suret.net

It's nice to be important but it is more important to be nice.
 

User avatar
RAPHAEL
Member
 
Posts: 627
Joined: Tue Nov 01, 2011 09:09

by RAPHAEL » Sat Dec 31, 2011 15:57

Excellent mod but came across some issues.

When you make something like say a hidden bookshelf, make sure there is no light coming from behind it or above it or someone will spot that it is brighter than the other bookshelves.
"Before you speak, ask yourself: Is it kind, is it true, is it necessary, does it improve upon the silence?"
My mods: http://goo.gl/n4kpn
(Currently Various, Industrial, Fakeblocks, Jail, MoarCraft, Christmas, Replicator, minetest dev installer for linux, bash mod installer, windows mod installer)
 

Gatharoth
Member
 
Posts: 196
Joined: Thu Dec 22, 2011 02:54

by Gatharoth » Sat Dec 31, 2011 19:15

redcrab wrote:I love it , but I guess you should use the default texture and not a copy of default texture. by this way secret passage stay secret even after customization of the default textures
may be there is a constraint that avoid a mod can't use texture from another mod ?

Great idea .


Well, the reason why I used a customization of the default textures, is so that way, it can be seen as a different type of block. Think about it, in most games, when there's a false wall, it is generally a little bit different in texture from the real wall next to it. So that's what I was aiming for.

RAPHAEL wrote:Excellent mod but came across some issues.

When you make something like say a hidden bookshelf, make sure there is no light coming from behind it or above it or someone will spot that it is brighter than the other bookshelves.


Yeah, this is my first attempt at a mod, I don't have all the attributes down yet. So there is probably something I added, or didn't change that does/caused that.
Last edited by Gatharoth on Sat Dec 31, 2011 19:16, edited 1 time in total.
 

rahonejm
Member
 
Posts: 88
Joined: Wed Dec 28, 2011 01:58

by rahonejm » Sat Jan 07, 2012 00:31

hey, can you make a false sand block? The one that looks like a wood, but colored like a sand? I'm making a pyramid and would like to make some traps ;D
I've tried to do it by myself, copying your code and substituting the names... but it didn't work :(
Last edited by rahonejm on Sat Jan 07, 2012 02:42, edited 1 time in total.
Sorry for possible language mistakes
 

User avatar
sdzen
Member
 
Posts: 1170
Joined: Fri Aug 05, 2011 22:33

by sdzen » Sat Jan 07, 2012 14:45

Gatharoth wrote:
redcrab wrote:I love it , but I guess you should use the default texture and not a copy of default texture. by this way secret passage stay secret even after customization of the default textures
may be there is a constraint that avoid a mod can't use texture from another mod ?

Great idea .


Well, the reason why I used a customization of the default textures, is so that way, it can be seen as a different type of block. Think about it, in most games, when there's a false wall, it is generally a little bit different in texture from the real wall next to it. So that's what I was aiming for.

you could put a one pixel watermark on the corner such as this
Image
of course maybe less evident
BTW that is a false sand block!
Last edited by sdzen on Sat Jan 07, 2012 15:03, edited 1 time in total.
[h]Zen S.D.[/h] The next generation of tranquility!
malheureusement mon français n'est pas bon :<
Owner of the Zelo's
In game name: MuadTralk, spdtainted, sdzen, sd zen, sdzeno
 

Gatharoth
Member
 
Posts: 196
Joined: Thu Dec 22, 2011 02:54

by Gatharoth » Sat Jan 07, 2012 17:52

@Rahonejm
Why didn't it work?
All you need to do is use this code, and replace the names and image.
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('somenode', {
    drawtype = 'allfaces',
    tile_images = {'someimage.png'},
    inventory_image = 'someimage.png',
    sunlight_propagates = false,
    paramtype = 'light',
    walkable = false,
    climable = false,
    selection_box = {
        type = "fixed",
        fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7},
    },
    material = minetest.digprop_constanttime(1.0),
    dug_item = 'NodeItem "somenode" 1',
})

If you still can't get it to work, then I'll make one. But for now I'm working on some code for Mesecon.

@sdzen
A watermark like that would be too visible for me tastes.

Also, those "false sand" blocks do not look like blocks, just 1-sided nodes. FYI (for your information).
 

User avatar
sdzen
Member
 
Posts: 1170
Joined: Fri Aug 05, 2011 22:33

by sdzen » Sat Jan 07, 2012 18:24

about the sand I know I was just messing around with your mod bored out of my mind one day altering random stuff
[h]Zen S.D.[/h] The next generation of tranquility!
malheureusement mon français n'est pas bon :<
Owner of the Zelo's
In game name: MuadTralk, spdtainted, sdzen, sd zen, sdzeno
 

rahonejm
Member
 
Posts: 88
Joined: Wed Dec 28, 2011 01:58

by rahonejm » Sat Jan 07, 2012 22:23

Well, don't know what, but i'm doing something wrong. Here's what i've did:

minetest.register_node('secret_passage:sand', {
drawtype = 'allfaces',
tile_images = {'sp_sandstone.png'},
inventory_image = 'sp_sandstone.png',
sunlight_propagates = false,
paramtype = 'light',
walkable = false,
climable = false,
selection_box = {
type = "fixed",
fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7},

But then, i need a recipe huh?

minetest.register_craft({
output = 'NodeItem "secret_passage:sand" 1',
recipe = {
{'node "secret_passage:compoent" 1', 'node "default:sandstone" 1', 'node "secret_passage:compoent" 1'},
{'node "secret_passage:compoent" 1', 'node "default:sandstone" 1', 'node "secret_passage:compoent" 1'},

What happens:

ERROR[main]: ModError: Failed to load and run C:\Documents and Settings\Marcelino\Meus documentos\Downloads\minetest-0.4.dev-20120102-1-win32\bin\..\data\mods\secret_passage\init.lua
20:17:18: ERROR[main]: error_message = ModError: Failed to load and run C:\Documents and Settings\Marcelino\Meus documentos\Downloads\minetest-0.4.dev-20120102-1-win32\bin\..\data\mods\secret_passage\init.lua

P.S I've copied the default_sandstone and pasted it on the textures folder, then renamed it sp_sandstone
Sorry for possible language mistakes
 

Gatharoth
Member
 
Posts: 196
Joined: Thu Dec 22, 2011 02:54

by Gatharoth » Sat Jan 07, 2012 22:51

You need to close the register. So after
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
    selection_box = {
        type = "fixed",
        fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7},


add 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
    },
    material = minetest.digprop_constanttime(1.0),
    dug_item = 'NodeItem "secret_passage:sand" 1',
})
Last edited by Gatharoth on Sat Jan 07, 2012 22:52, edited 1 time in total.
 

rahonejm
Member
 
Posts: 88
Joined: Wed Dec 28, 2011 01:58

by rahonejm » Sun Jan 08, 2012 02:18

Gatharoth wrote:You need to close the register. So after
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
    selection_box = {
        type = "fixed",
        fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7},


add 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
    },
    material = minetest.digprop_constanttime(1.0),
    dug_item = 'NodeItem "secret_passage:sand" 1',
})


My god i'm definetly not a minetest modder... I still can't make it work :(
Sorry for possible language mistakes
 

Gatharoth
Member
 
Posts: 196
Joined: Thu Dec 22, 2011 02:54

by Gatharoth » Sun Jan 08, 2012 04:08

This code should work. Just copy it and paste it below the register_node for the component (compoent due to my spelling error that I never fixed).

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('secret_passage:sand', {
    drawtype = 'allfaces',
    tile_images = {'sp_sandstone.png'},
    inventory_image = 'sp_sandstone.png',
    sunlight_propagates = false,
    paramtype = 'light',
    walkable = false,
    climable = false,
    selection_box = {
        type = "fixed",
        fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7},
    },
    material = minetest.digprop_constanttime(1.0),
    dug_item = 'NodeItem "secret_passage:sand" 1',
})
minetest.register_craft({
    output = 'NodeItem "secret_passage:bookshelf" 1',
    recipe = {
        {'node "secret_passage:compoent" 1', 'node "default:sandston" 1', 'node "secret_passage:compoent" 1'},
        {'node "secret_passage:compoent" 1', 'node "default:sandstone" 1', 'node "secret_passage:compoent" 1'},
    },
})
 

Gatharoth
Member
 
Posts: 196
Joined: Thu Dec 22, 2011 02:54

by Gatharoth » Sun Feb 05, 2012 06:31

Updated:
Added more default nodes
False defaults use same image as real defaults
Made possible for other mods to create false version of nodes.
 

Gatharoth
Member
 
Posts: 196
Joined: Thu Dec 22, 2011 02:54

by Gatharoth » Sun Feb 05, 2012 07:49

Update:
Bug fixes thanks to Kahrl
 

Gatharoth
Member
 
Posts: 196
Joined: Thu Dec 22, 2011 02:54

by Gatharoth » Mon Feb 13, 2012 01:02

Updated:
Changed registering parameters
Manually register glass to avoid errors.
 

User avatar
IPushButton2653
Member
 
Posts: 666
Joined: Wed Nov 16, 2011 22:47

by IPushButton2653 » Tue Feb 14, 2012 00:07

All this is is changing walkable = true to walkable = false. But he had the intuition to make it. Well done sir
 

Gatharoth
Member
 
Posts: 196
Joined: Thu Dec 22, 2011 02:54

by Gatharoth » Tue Feb 14, 2012 18:49

IPushButton2653 wrote:All this is is changing walkable = true to walkable = false. But he had the intuition to make it. Well done sir


Haha. Thanks I think? If anything, I'm just an Idea Factory.

Besides, when I was younger, I loved to draw out dungeons, and castles that were full of traps, secret passages, hidden treasures, ect. This was caused by my uncle who play(s/ed) DnD. But yeah, my dungeons and castles were more elaborate, and "more suited" for a game of DnD than any of his were, or so he told me. XD
 

SelfishCar
Member
 
Posts: 137
Joined: Sun Dec 04, 2011 12:22

by SelfishCar » Sat Mar 24, 2012 17:57

ERROR[main]: error_message = ModError: Failed to load and run C:\Documents and Settings\Charlotta\Mina dokument\Downloads\minetest-0.4.dev-20120122-1-win32 (1)\minetest-0.4.dev-20120122-1-win32\bin\..\data\mods\secret_passage\init.lua
18:55:00: ERROR[main]: Check debug.txt for details.


Any help here?
In-game Username: Axel
In-game Username #2: SelfishCar

SoLA: Part 1: Angela's Disappearance: http://minetest.net/forum/viewtopic.php?id=1586
 

User avatar
bgsmithjr
Member
 
Posts: 436
Joined: Thu Mar 08, 2012 23:21

by bgsmithjr » Sun Mar 25, 2012 02:53

open minetest/bin/debug.txt look for a block of text
[ SOMETHING LUA ERROR]
text text
text
[ END OF LUA ERROR ]
and post the text here.
 

SelfishCar
Member
 
Posts: 137
Joined: Sun Dec 04, 2011 12:22

by SelfishCar » Sun Mar 25, 2012 14:19

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
18:58:19: ERROR[main]: [LUA]
18:58:19: ERROR[main]: [LUA] ...netest-0.4.dev-20120122-1-win32\bin\..\data\mods\secret_passage\init.lua:64: ')' expected near 'typename'
18:58:19: ERROR[main]: [LUA]


Is this right?
In-game Username: Axel
In-game Username #2: SelfishCar

SoLA: Part 1: Angela's Disappearance: http://minetest.net/forum/viewtopic.php?id=1586
 

Gatharoth
Member
 
Posts: 196
Joined: Thu Dec 22, 2011 02:54

by Gatharoth » Sun Apr 01, 2012 05:01

SelfishCar wrote:
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
18:58:19: ERROR[main]: [LUA]
18:58:19: ERROR[main]: [LUA] ...netest-0.4.dev-20120122-1-win32\bin\..\data\mods\secret_passage\init.lua:64: ')' expected near 'typename'
18:58:19: ERROR[main]: [LUA]


Is this right?


I believe there's typo problems currently. So with your problem, just open up the init.lua, then scroll down to the "minetest.register_node(modname" line. In that line put ".." in front of the "typename," and it should be fine.

Sorry for those little mistakes. I've been busy for awhile now. Haven't been able to work on anything for minetest.
Last edited by Gatharoth on Sun Apr 01, 2012 05:02, edited 1 time in total.
 

Next

Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 8 guests

cron