[Mod] Hidden Doors [1.12.1] [hidden_doors]

User avatar
Hamlet
Member
Posts: 748
Joined: Sat Jul 29, 2017 21:09
IRC: H4mlet
In-game: Hamlet
Location: Lombardy, Italy

Re: [Mod] Hidden Doors [1.0.0] [hidden_doors]

by Hamlet » Post

Dev 1.3.0 released

- Recipes changed to prevent any conflict
- Added the opening and closing sounds for the stone doors

Generic recipe:

DSS
XXX
XXX

D = wooden door, S = Slab, X = empty

Trunk-made doors' recipe:

DTX
XXX
XXX

D = wooden door, T = tree trunk, X = empty

If you are wondering why two recipes: because there are no trunks' slabs.
My repositories: Codeberg.org | My ContentDB's page | I'm on PureOS with XFCE

lonestar
Member
Posts: 52
Joined: Mon Jul 17, 2017 03:25
Location: Texas,USA

Re: [Mod] Hidden Doors [1.0.0] [hidden_doors]

by lonestar » Post

The latest commits are suppose to have corrected textures? Cause for me, textures are stretched.
screenshot_20170819_182330.png
(642.49 KiB) Not downloaded yet

User avatar
Napiophelios
Member
Posts: 1017
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: [Mod] Hidden Doors [1.0.0] [hidden_doors]

by Napiophelios » Post

lonestar wrote:The latest commits are suppose to have corrected textures? Cause for me, textures are stretched.
screenshot_20170819_182330.png
Hamlet wrote:...be warned that using textures bigger than 16 pixels will make things look weird...
Are you using 16px textures? If so then there is a problem.
If not, you will have to use the non dev version that has custom textures included.
or make your own textures to suit your texture pack.


...or edit the ini file.

EDIT: Removed botched file share
Last edited by Napiophelios on Mon Aug 21, 2017 03:54, edited 1 time in total.

lonestar
Member
Posts: 52
Joined: Mon Jul 17, 2017 03:25
Location: Texas,USA

Re: [Mod] Hidden Doors [1.0.0] [hidden_doors]

by lonestar » Post

ahh, missed the 16px warning. Anyways, the texture pack I converted uses 128x128 images :( Not sure how to edit to make it work.

Edit:
Got my texture pack to work somewhat, only issue is the bottom part of the door, texture doesn't line up correctly, maybe this was an issue with original code, just not visible with smaller images?
screenshot_20170819_230606.png
(725.11 KiB) Not downloaded yet
Edit 2:
texture on back of door is fine, front bottom is off.

User avatar
Napiophelios
Member
Posts: 1017
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: [Mod] Hidden Doors [1.0.0] [hidden_doors]

by Napiophelios » Post

Lonestar, replace with this:

Code: Select all

	tiles = {"[combine:304x256:176,0=" .. modname .. "_" .. subname
		.. ".png:176,126=" .. modname .. "_" .. subname
		.. ".png:126,0=" .. modname .. "_" .. subname
		.. ".png:126,126=" .. modname .. "_" .. subname
		.. ".png:0,126=" .. modname .. "_" .. subname
		.. ".png:0,0=" .. modname .. "_" .. subname .. ".png"},



	inventory_image = "hidden_doors_item_overlay.png^" .. modname .. "_" .. subname
		.. ".png^hidden_doors_item_overlay.png^[makealpha:255,126,126",
I tested it with VanessaE's 128px pack and
I don't get any mis-alignment in the textures;
it actually looks pretty seamless
Image
screenshot_20170820_045106.png
(445.32 KiB) Not downloaded yet

User avatar
Hamlet
Member
Posts: 748
Joined: Sat Jul 29, 2017 21:09
IRC: H4mlet
In-game: Hamlet
Location: Lombardy, Italy

Re: [Mod] Hidden Doors [1.0.0] [hidden_doors]

by Hamlet » Post

Image

I've made this for reference, but I haven't solved the issue yet.
First of all, I would like to know if 0,0 actually is the upper left corner and if X is actually the width (from left to right) and if Y is the height (from top to bottom); being not certain of how the [combine texture modifier uses these coordinates is a royal pain.
#### `[combine:<w>x<h>:<x1>,<y1>=<file1>:<x2>,<y2>=<file2>:...`
* `<w>` = width
* `<h>` = height
* `<x>` = x position
* `<y>` = y position
* `<file>` = texture to combine
Isn't clear about my doubt, thus I'm getting crazy trying to figure which .png goes where.

Anyway, about the picture size - 16px, 32px, etc. - I've thought to add an option to allow the user to select the preferred one, adding something like hidden_doors_res = 32 in the minetest.conf; this for compatibility with HD texture packs.
Attachments
door_schematic.png
(55.67 KiB) Not downloaded yet
My repositories: Codeberg.org | My ContentDB's page | I'm on PureOS with XFCE

User avatar
Napiophelios
Member
Posts: 1017
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: [Mod] Hidden Doors [1.0.0] [hidden_doors]

by Napiophelios » Post

The diagram seems legit :)

I had originally had way to many of the '[combines' arguments
I have been using this code below and everything seems to work okay,
but on larger textures the order of the arguments might matter...I am not sure.

Code: Select all

tiles = {"[combine:38x32:0,0=" .. modname .. "_" .. subname
.. ".png:0,16=" .. modname .. "_" .. subname
.. ".png:16,16=" .. modname .. "_" .. subname
.. ".png:16,0=" .. modname .. "_" .. subname
.. ".png:32,16=" .. modname .. "_" .. subname
.. ".png:32,0=" .. modname .. "_" .. subname .. ".png"},

	inventory_image = "hidden_doors_item_overlay.png^" .. modname .. "_" .. subname
		.. ".png^hidden_doors_item_overlay.png^[makealpha:255,126,126",
the images are still reversed/mirrored
I am not sure you can fix that.

User avatar
azekill_DIABLO
Member
Posts: 7494
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [Mod] Hidden Doors [1.0.0] [hidden_doors]

by azekill_DIABLO » Post

Hamlet wrote: I owe this guy a bottle of wine for his help! :D
Don't do this every time he helps you, he would get drunk xD

User avatar
Napiophelios
Member
Posts: 1017
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: [Mod] Hidden Doors [1.0.0] [hidden_doors]

by Napiophelios » Post

..and I also don't drink :)

lonestar
Member
Posts: 52
Joined: Mon Jul 17, 2017 03:25
Location: Texas,USA

Re: [Mod] Hidden Doors [1.0.0] [hidden_doors]

by lonestar » Post

Napiophelios wrote:Lonestar, replace with this:

Code: Select all

	tiles = {"[combine:304x256:176,0=" .. modname .. "_" .. subname
		.. ".png:176,126=" .. modname .. "_" .. subname
		.. ".png:126,0=" .. modname .. "_" .. subname
		.. ".png:126,126=" .. modname .. "_" .. subname
		.. ".png:0,126=" .. modname .. "_" .. subname
		.. ".png:0,0=" .. modname .. "_" .. subname .. ".png"},



	inventory_image = "hidden_doors_item_overlay.png^" .. modname .. "_" .. subname
		.. ".png^hidden_doors_item_overlay.png^[makealpha:255,126,126",
Thanks, I was getting close by just guessing and entering dif numbers, seems that some of the modifiers weren't needed after all. And as far as textures being reversed, depending on the door, does not really show that much, would really have to look hard to see it.

User avatar
Hamlet
Member
Posts: 748
Joined: Sat Jul 29, 2017 21:09
IRC: H4mlet
In-game: Hamlet
Location: Lombardy, Italy

Re: [Mod] Hidden Doors [1.0.0] [hidden_doors]

by Hamlet » Post

--- Step 1
Issue: final image mirrored.

Idea: mirror the original image to obtain a final image looking good.

How: using the ^[transformFX operator


--- Step 2
Issue: ^[transformFX doesn't produce the expected results when
used on the fly with the [combine operator.

Idea: apply the ^[transformFX before using [combine

How: applying it on a separate image to be used later


--- Step 3
Issue: same results as in Step 2

Idea: the mirrored image isn't actually created until it gets used, thus
no matter which approach I try: it will always lead to the same result
because it's like doing Step 2 over and over in different ways.


--- Step 4
Issue: I can not solve this bug.

Idea: I will pretend it is a feature.

How: Telling people a story that justifies this oddity; e.g. hidden doors
have flipped textures because the mason worked secretly in the darkness,
misplacing the bricks; e.g. I have done it purposedly to help players find
some of these doors to reward their commitment while searching for them;
e.g. <put your story here>


--- Step 5
Just For The Record - the alternative code mentioned in Step2
+ Spoiler
--- Step 6

Start working on the solution that allows users to choose their favorite resolution.
My repositories: Codeberg.org | My ContentDB's page | I'm on PureOS with XFCE

User avatar
Napiophelios
Member
Posts: 1017
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: [Mod] Hidden Doors [1.0.0] [hidden_doors]

by Napiophelios » Post

Yah! I got it to work
It corrects the mirror image problem,
but I don't know what kinda lag it's gonna cause :)

Code: Select all

function hidden_doors.register_hidden_doors(modname, subname, recipeItem, desc, sounds, sound_open, sound_close)

local new_texture = "[combine:38x32:0,0=" .. modname .. "_" .. subname .. ".png:0,16=" .. modname .. "_" .. subname .. ".png:6,0=" .. modname .. "_" .. subname .. ".png:6,16=" .. modname .. "_" .. subname .. ".png:22,0=" .. modname .. "_" .. subname .. ".png:22,16=" .. modname .. "_" .. subname .. ".png"

 doors.register("hidden_door_" .. subname, {
   description = description_1 .. desc .. description_2,
   tiles = {{ name = "("..new_texture .. "^[transformFX)^[combine:38x32:16,0=" .. modname .. "_" .. subname .. ".png:16,16=" .. modname .. "_" .. subname .. ".png", backface_culling = true }},
   inventory_image = "hidden_doors_item_overlay.png^" .. modname .. "_" .. subname
    .. ".png^hidden_doors_item_overlay.png^[makealpha:255,126,126",
   groups = {cracky = 3},
   sounds = sounds,
   sound_open = sound_open,
   sound_close = sound_close,
   recipe = {
   {recipeItem, '', ''},
   {recipeItem, 'doors:door_wood', ''},
    }
  })
end
EDIT :removed 2 duplicate [combines in the "local new_texture" deal
Last edited by Napiophelios on Sun Aug 20, 2017 23:15, edited 1 time in total.

User avatar
Hamlet
Member
Posts: 748
Joined: Sat Jul 29, 2017 21:09
IRC: H4mlet
In-game: Hamlet
Location: Lombardy, Italy

Re: [Mod] Hidden Doors [1.0.0] [hidden_doors]

by Hamlet » Post

Dev 1.4.0 released

- optional support for resolutions higher than 16px using
hidden_doors_res = <number> into minetest.conf; defaults to 16
- supported resolutions: 16, 32, 64, 128, 256, 512

e.g. if you are using a 512px texture pack add this line to your minetest.conf:

Code: Select all

hidden_doors_res = 512
Note: I've tested it on the default 16px textures, I do not use higher res packs; as usual, if you spot a bug let me know.

--- EDIT: I've just seen Napiophelios' post, I'll patch the Git code as soon as possible. :)
My repositories: Codeberg.org | My ContentDB's page | I'm on PureOS with XFCE

lonestar
Member
Posts: 52
Joined: Mon Jul 17, 2017 03:25
Location: Texas,USA

Re: [Mod] Hidden Doors [1.0.0] [hidden_doors]

by lonestar » Post

Very nice work, downloaded latest commits and works beautifully. The texture pack I'm using, I converted into into 4 different sizes, 16;32;64 and 128 to test and all work with latest commits.

Edit:
Not to much lag, I am running 36 mods in SP and just a little lag when first putting door and opening/closing a few time. But after that, no lag. Also, maybe add dirt door?

User avatar
Napiophelios
Member
Posts: 1017
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: [Mod] Hidden Doors [1.0.0] [hidden_doors]

by Napiophelios » Post

looks like your latest dev version is missing some nodes: brick and stone

Code: Select all

hidden_doors.register_hidden_doors("default", "brick", recipeItem1,
"stairs:slab_brick", "stairs:slab_brick", S("Brick"),
stone_default, stone_open, stone_close)

hidden_doors.register_hidden_doors("default", "stone", recipeItem1,
"stairs:slab_stone", "stairs:slab_stone", S("Stone"), stone_default,
stone_open, stone_close)

lonestar
Member
Posts: 52
Joined: Mon Jul 17, 2017 03:25
Location: Texas,USA

Re: [Mod] Hidden Doors [1.0.0] [hidden_doors]

by lonestar » Post

Napiophelios wrote:looks like your latest dev version is missing some nodes: brick and stone

Code: Select all

hidden_doors.register_hidden_doors("default", "brick", recipeItem1,
"stairs:slab_brick", "stairs:slab_brick", S("Brick"),
stone_default, stone_open, stone_close)

hidden_doors.register_hidden_doors("default", "stone", recipeItem1,
"stairs:slab_stone", "stairs:slab_stone", S("Stone"), stone_default,
stone_open, stone_close)
Yeah, seen that earlier, thought it was my texture pack, as it is still missing several images. I added missing pngs to texture pack and doors still had missing textures, so I just manually edited my init.lua.

Also, I added to my local mod a dirt door :D

Code: Select all

hidden_doors.register_hidden_doors("default", "dirt", recipeItem1,
	"default:dirt", "default:dirt", S("Dirt"),
	stone_default, stone_open, stone_close)

User avatar
azekill_DIABLO
Member
Posts: 7494
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [Mod] Hidden Doors [1.0.0] [hidden_doors]

by azekill_DIABLO » Post

Napiophelios wrote:..and I also don't drink :)
Good lord, there are still a few reasonable people on this planet.

Chibi ghost
Member
Posts: 845
Joined: Fri Jan 08, 2016 21:17
In-game: Ghost

Re: [Mod] Hidden Doors [1.0.0] [hidden_doors]

by Chibi ghost » Post

azekill_DIABLO wrote:
Napiophelios wrote:..and I also don't drink :)
Good lord, there are still a few reasonable people on this planet.
I think minetest is his drug of choice :P

User avatar
azekill_DIABLO
Member
Posts: 7494
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [Mod] Hidden Doors [1.0.0] [hidden_doors]

by azekill_DIABLO » Post

Yeah, i'm totally addicted to it.

Chibi ghost
Member
Posts: 845
Joined: Fri Jan 08, 2016 21:17
In-game: Ghost

Re: [Mod] Hidden Doors [1.0.0] [hidden_doors]

by Chibi ghost » Post

me too I used to play other games but that was before I found MT

User avatar
azekill_DIABLO
Member
Posts: 7494
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [Mod] Hidden Doors [1.0.0] [hidden_doors]

by azekill_DIABLO » Post

:P

User avatar
Napiophelios
Member
Posts: 1017
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: [Mod] Hidden Doors [1.0.0] [hidden_doors]

by Napiophelios » Post

...
Last edited by Napiophelios on Fri Sep 08, 2017 00:51, edited 3 times in total.

User avatar
Hamlet
Member
Posts: 748
Joined: Sat Jul 29, 2017 21:09
IRC: H4mlet
In-game: Hamlet
Location: Lombardy, Italy

Re: [Mod] Hidden Doors [1.0.0] [hidden_doors]

by Hamlet » Post

1.5.0-dev released

This is a minor release:

- New hidden doors: dirt, brick, metals, gems

It still has the old mirrored textures issue, I would suggest using Napiophelios' release while I bang things for the v1.5.1 ... it may take a while.
My repositories: Codeberg.org | My ContentDB's page | I'm on PureOS with XFCE

User avatar
Napiophelios
Member
Posts: 1017
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: [Mod] Hidden Doors [1.0.0] [hidden_doors]

by Napiophelios » Post

@Hamlet: I updated the download above with a crude version of your configurable dev branch.
It's crude but it works pretty good.

Is it possible to have the settings configurable by the main game menu like T.N.T. and fire mods?
Or are those coded into the game engine?

Man that would be cool for lots of different mods.

User avatar
Hamlet
Member
Posts: 748
Joined: Sat Jul 29, 2017 21:09
IRC: H4mlet
In-game: Hamlet
Location: Lombardy, Italy

Re: [Mod] Hidden Doors [1.5.1] [hidden_doors]

by Hamlet » Post

Master 1.5.1 released

- This fixes the mirrored images issue as well as rendering correctly the inventory images, thanks to Napiophelios.

@Napiophelios I've been looking at how to implement client-side configuration, it will be added in the next Dev version.

I would like to thank those who have followed the development of this mod, this release should meet the quality expected from a mature mod and of course give you what it is aimed to add; so far it is supporting only the MTG nodes, but the roadmap does include support for other mods like Castles, Darkage and More Nodes.

And now, off to play with your dungeons, secret chambers and stuff. :)
My repositories: Codeberg.org | My ContentDB's page | I'm on PureOS with XFCE

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests