really frustrated with doors

User avatar
TumeniNodes
Member
 
Posts: 1335
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes

really frustrated with doors

by TumeniNodes » Fri Jan 06, 2017 15:02

Ok, so I have been asking about centered doors for a while now, here and there.
I have been trying to do it myself for a while now and have absolutely no idea how.
And now in 0.4.15 the code has changed even more to the point I can't make any sense of it at all.
I try changing selection boxes, collision boxes, etc.... and absolutely nothing changes with the doors position.
It's reaaaaaallly frustrating me at this point.
Is it really that much of a huge deal or a pain in the ass to ask for anyone who knows what all this stuff means to make a 2 second change for someone who knows how.. to produce door which are centered and function the same way gates do?
I understand people like/want others to figure stuff out for themselves but, when code is changed over and over to become more and more complex to someone who has no idea in the first place... it's frustrating.
When I first started using MT I was messing around with the doors mod and could somewhat start to figure out some aspects of what does what as far as positioning and stopped at one point figuring I'd try it again later but now the code has changed once or twice since and now I can't figure out any of it...
So I am asking... please.... for someone to at the very least tell me which lines of the code I need to change so I can try yet again?
I honestly do not understand why, when I changes certain positioning numbers now... it seems to have zero effect on the doors? When originally it would... how is that even possible, it's as if none of the positioning code actually does anything because when changed, they do nothing?
And before anyone asks... yes... I am in the right folder to make changes and yes, I open the folder with root privs...

I hope I'm not sounding rude or demanding in this post... I am just truly over frustrated with this at this point... it really should not be this difficult for someone even as completely novice as I am to attempt to make changes... it wasn't this difficult before all these changes.
Flick?... Flick who?
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: really frustrated with doors

by rubenwardy » Fri Jan 06, 2017 16:10

By centered, do you mean in the center of the node rather than at the edge?

ie:

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
          Closed  Open
current:  |_      ||
centered: |--     ||

Where there is a wall to the left and a door to the right


Does it have to have a middle split?

(Btw: it would be beneficial when you write lots of text to split it into paragraphs, and not ramble - it was quite hard to read that post)
 

User avatar
TumeniNodes
Member
 
Posts: 1335
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes

Re: really frustrated with doors

by TumeniNodes » Fri Jan 06, 2017 19:27

rubenwardy wrote:By centered, do you mean in the center of the node rather than at the edge?

ie:

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
          Closed  Open
current:  |_      ||
centered: |--     ||

Where there is a wall to the left and a door to the right


Does it have to have a middle split?



(Btw: it would be beneficial when you write lots of text to split it into paragraphs, and not ramble - it was quite hard to read that post)


I am sorry about that. I keep forgetting to use enter to split up paragraphs.

Yes, I mean doors to be centered to nodes (like the fence gates are). whether as a single door or double doors. And then when opened, they will come into the next node-space a bit.

I would LOVE this as an option in MT, as I usually like to place a glass pane above the doors. And even just simply for the nice option and change.

edit> I was able to get them centered once before but when opened they just opened as they currently do and the tiles were not working on any but the front of the door, I got frustrated and forgot to save when I shut down because I had to rush off for an appt... and now I cannot even remember what I did to get just to that point :P
Flick?... Flick who?
 

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

Re: really frustrated with doors

by Napiophelios » Fri Jan 06, 2017 20:41

you probably need to redesign the nodebox.
edit: nope wrong answer.
 

User avatar
TumeniNodes
Member
 
Posts: 1335
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes

Re: really frustrated with doors

by TumeniNodes » Fri Jan 06, 2017 23:42

Napiophelios wrote:you probably need to redesign the nodebox.
edit: nope wrong answer.


see? :P

I had made new models with NBE, imported to blender to fix the normals, etc... and to get new position boxes.. couldn't get anything to work. I think I still have the models I made. I even made new models directly in Blender

The old code used pos like {0.5, 1.5, .... and so on.... now it's all {1/2, 1/2, 18, 7/16, 3+1/4, if Johnny has 6 apples x 2.3* and Sally has maleria, what color is the plane in Brooklyn.... and uses some % here n there.... it's like my kids common core math stuff in here... :P

Don't get me wrong, the new code for the doors is great and has really made them smooth, etc.. But, I would really prefer doors to be centered...
It would be nice to have the option which people could use to replace the existing doors mod with, if they want centered doors too.

*note... am I spelling "centered" wrong? it keeps underlining with red :D
centerd.... nope, that's wrong too :P
Flick?... Flick who?
 

ShadMOrdre
Member
 
Posts: 51
Joined: Mon Dec 29, 2014 08:07
In-game: shadmordre

Re: really frustrated with doors

by ShadMOrdre » Wed Jan 11, 2017 21:11

Tumeni,

Here are some simple conversions to assist you. This is based on the idea that the standard cube node of 1m is subdivided into 16 equally sized measurements, since this is both a multiple of 2 and since most textures are either 16x16, 32x32, or some other multiple of 2.

1 = 1
1/2 = 0.5
1/4 = 0.25
1/8 = 0.125
1/16 = 0.0625
1/32 = 0.03125

In various nodebox definitions, measuring from the center of the node:
A standard node would measure {-0.5,-0.5,-0.5 0.5,0.5,0.5} or {-1/2,-1/2,-1/2 1/2,1/2,1/2}
A slab would be {-0.5,-0.5,-0.5 0.5,0,0.5} or {-1/2,-1/2,-1/2 1/2,0,1/2}
A full height node that is only a quarter sized, similar to a vertical, centered, half slab would be like this:
{-0.125,-0.5,-0.125 0.125,0.5,0.125} or {-1/8,-1/2,-1/8 1/8,1/2,1/8}

As for your solution for center aligned doors, I am also interested, as my building_elements mod provides center aligned walls, columns, and other such shapes.

I noticed that the collision box for the fence allows the fence object, ie, the .obj mesh, to swing out from the center, and extend into the node beside it. The collision box for doors assumes a door that is positioned at a corner and swings into the node space, whereas a fence does otherwise. Give me a little time, and I think I can figure out not just center aligned doors, but truly centered doors, that swing from the center of the node.

Shad
My other virtual world is an Opensimulator.
 

User avatar
TumeniNodes
Member
 
Posts: 1335
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes

Re: really frustrated with doors

by TumeniNodes » Thu Jan 12, 2017 01:05

ShadMOrdre wrote:Tumeni,

Here are some simple conversions to assist you. This is based on the idea that the standard cube node of 1m is subdivided into 16 equally sized measurements, since this is both a multiple of 2 and since most textures are either 16x16, 32x32, or some other multiple of 2.

1 = 1
1/2 = 0.5
1/4 = 0.25
1/8 = 0.125
1/16 = 0.0625
1/32 = 0.03125

In various nodebox definitions, measuring from the center of the node:
A standard node would measure {-0.5,-0.5,-0.5 0.5,0.5,0.5} or {-1/2,-1/2,-1/2 1/2,1/2,1/2}
A slab would be {-0.5,-0.5,-0.5 0.5,0,0.5} or {-1/2,-1/2,-1/2 1/2,0,1/2}
A full height node that is only a quarter sized, similar to a vertical, centered, half slab would be like this:
{-0.125,-0.5,-0.125 0.125,0.5,0.125} or {-1/8,-1/2,-1/8 1/8,1/2,1/8}

As for your solution for center aligned doors, I am also interested, as my building_elements mod provides center aligned walls, columns, and other such shapes.

I noticed that the collision box for the fence allows the fence object, ie, the .obj mesh, to swing out from the center, and extend into the node beside it. The collision box for doors assumes a door that is positioned at a corner and swings into the node space, whereas a fence does otherwise. Give me a little time, and I think I can figure out not just center aligned doors, but truly centered doors, that swing from the center of the node.

Shad


That would be awesome Shad, thank you. I'll keep pluggin away at it too. The issue I'm tripping up n is that invisible hinge, I believe that to be the big piece here?
I have the collision and selection boxes centered, and can operate the door with them but that danged door (the textures) remain put :P

And I know sofar is watching.... just laughing..., and laughing..., and laughing... :P

my goal, is to align it with glass plane.

While working on it, I did manage to get the old code to center (textures n all) but yep they still pivot within the same node-space but... I managed to make 3-node-high ones (might be cool for secret labs, or a secret mountain entrance so, I might put them up in case some people might like to use them...

I'm off to check out your link... sounds cool.
Flick?... Flick who?
 

sofar
Member
 
Posts: 781
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: really frustrated with doors

by sofar » Thu Jan 12, 2017 08:09

You can do this with nodeboxes, or with mesh nodes. Mesh nodes are a little bit simpler if you use a really large node (texture map is doable), which is why the default doors are mesh nodes.

The position of the mesh in blender is important. You will need to make 3 mesh nodes and the doors' position in blender needs to reflect the correct position in the game.

Because of symmetry, you will want a left-hinged and right-hinged door, so you will need to make 3 blender models total (the default doors get away with 2 because of the symmetry, but with middle-hinged doors you don't benefit from any symmetry).

The closed door mesh should intersect with the origin. Top view it should be horizontal.

The left hinged opened door should (from the top view in blender) swing out down and left.

The right hinged opened door mesh should (top view) swing out down and right.

Because you have 3 nodes in the end, you can't use the default door registration code. The door API won't work for this case.
 

User avatar
TumeniNodes
Member
 
Posts: 1335
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes

Re: really frustrated with doors

by TumeniNodes » Thu Jan 12, 2017 13:29

sofar wrote:You can do this with nodeboxes, or with mesh nodes. Mesh nodes are a little bit simpler if you use a really large node (texture map is doable), which is why the default doors are mesh nodes.

The position of the mesh in blender is important. You will need to make 3 mesh nodes and the doors' position in blender needs to reflect the correct position in the game.

Because of symmetry, you will want a left-hinged and right-hinged door, so you will need to make 3 blender models total (the default doors get away with 2 because of the symmetry, but with middle-hinged doors you don't benefit from any symmetry).

The closed door mesh should intersect with the origin. Top view it should be horizontal.

The left hinged opened door should (from the top view in blender) swing out down and left.

The right hinged opened door mesh should (top view) swing out down and right.

Because you have 3 nodes in the end, you can't use the default door registration code. The door API won't work for this case.


Thank you sofar.

Gaming physics are an amazing thing... So basically, centered doors will need their own, individual API.
So it wasn't just my stupidity.... It was my stupidity and all the above which I was not aware of :P
Flick?... Flick who?
 

User avatar
TumeniNodes
Member
 
Posts: 1335
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes

Re: really frustrated with doors

by TumeniNodes » Thu Jan 12, 2017 14:35

I guess I'll simply set them up the same as I did for a drawbridge I made for myself for now, using the "on right click" function, until someone else who knows how to write an API similar to the current doors API has some time and/or interest in writing one.

Which works fine for me.

funny note about my drawbridge... I still have not figured out how to get them so I can walk on them, I just fall through... but they look good :D

I sit back now and shake my head, half laughing at the time I have worked trying to get this to work using a code which simply cannot work with it... not knowing it. :P

I may as well have written... doors.register.... toast 0_o
.... ahhhh well. It's all good
Flick?... Flick who?
 

ShadMOrdre
Member
 
Posts: 51
Joined: Mon Dec 29, 2014 08:07
In-game: shadmordre

Re: really frustrated with doors

by ShadMOrdre » Fri Jan 13, 2017 01:56

Tumeni,

I just posted an update to my building_elements mod.

I have centered door shapes for both left and right doors. The fence gates didn't work quite yet, but are there to fiddle with. Chances are, I've missed something small.

The doors work! They swing from the side center, into the node behind them. Right and left are included. They can be made with any material also, so secret walls....

take a peek

Image

Shad MOrdre
My other virtual world is an Opensimulator.
 

User avatar
TumeniNodes
Member
 
Posts: 1335
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes

Re: really frustrated with doors

by TumeniNodes » Fri Jan 13, 2017 22:16

ShadMOrdre wrote:Tumeni,

I just posted an update to my building_elements mod.

I have centered door shapes for both left and right doors. The fence gates didn't work quite yet, but are there to fiddle with. Chances are, I've missed something small.

The doors work! They swing from the side center, into the node behind them. Right and left are included. They can be made with any material also, so secret walls....

take a peek



Image

Shad MOrdre


Very cool Shad,

I'm still pluggin away at my version as well. It's done very differently than yours..., yours is far more sophisticated :D

I really, really like that tree...
Flick?... Flick who?
 

ShadMOrdre
Member
 
Posts: 51
Joined: Mon Dec 29, 2014 08:07
In-game: shadmordre

Re: really frustrated with doors

by ShadMOrdre » Sat Jan 14, 2017 00:19

Tumeni,

I've just posted another update to the building_elements mod. Both doors and gates work. There are currently two door and two gate types. Solid versions for each, a windowed door, and a railed gate. All but the right side windowed door works as it should.

The code was cobbled together from the trapdoor, fencegate, and doors functions from default, subtracting what erred out, and modifying the rest.

Shad MOrdre
My other virtual world is an Opensimulator.
 

User avatar
Nathan.S
Member
 
Posts: 679
Joined: Wed Sep 24, 2014 17:47
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21

Re: really frustrated with doors

by Nathan.S » Sun Jan 15, 2017 02:04

TumeniNodes wrote:funny note about my drawbridge... I still have not figured out how to get them so I can walk on them, I just fall through... but they look good :D


Assuming that you have two nodes for the drawbridge, one for closed/up, and open/down you should just need a collision box that extends the full reach of the open drawbridge.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website.
 

User avatar
TumeniNodes
Member
 
Posts: 1335
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes

Re: really frustrated with doors

by TumeniNodes » Sun Jan 15, 2017 02:41

Nathan.S wrote:
TumeniNodes wrote:funny note about my drawbridge... I still have not figured out how to get them so I can walk on them, I just fall through... but they look good :D


Assuming that you have two nodes for the drawbridge, one for closed/up, and open/down you should just need a collision box that extends the full reach of the open drawbridge.


idk, I've tried everything over some time... each side is 5x5 nodes. It's uuuuuge

I came to consider it feature, a trap/trick if you will... for unsuspecting stalkers... I set fly priv and make it look like I'm walking over and they fall in
Flick?... Flick who?
 


Return to Modding Discussion

Who is online

Users browsing this forum: No registered users and 7 guests

cron