Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
doom2day

Quicker way to make doors in DB?

Recommended Posts

I learned how to make maps using DCK and now how it is quicker to make doors instead of fixing the linedefs, assigning the door tags ... IT is too slow for me. I miss the change sector to door / lift options.

Share this post


Link to post
RottingZombie said:

You could always make the door counter-clockwise, then the linedefs are facing out, that takes care of that part.

And you'll even get an unclosed sector for free!

Share this post


Link to post

Hahaha making a door is so easy you can't be serious. Just make the sector, have the linedefs face outwards, and give then DR tags, the end.

Share this post


Link to post

Still, a 'make door from sector' feature that does it automatically wouldn't be that bad. Even DEU had it and that was 10 years ago.

Share this post


Link to post

Graf Zahl: Yeah, all Editors had it back then IIRC: Cause people needed them then, pretty much no one do it now.

Share this post


Link to post

I think it would be nice to have an automatic door maker feature in DB. WA had one and it spoiled me. :P I mean Hell, DB has linedef curving tools and prefabs, why not doors?

A stair-making tool on the other hand I could do without. Those always seem to fuck up somehow. :P

Share this post


Link to post

The biggest problem is that you can't create a sector, door for example, just by clicking the left mouse button on the point where one of the vertices should be placed, and drag&drop it at the opposite vertex...instead you have to place all 4 vertices individually, which takes a whole lot more time in the end.

Share this post


Link to post
kristus said:

Graf Zahl: Yeah, all Editors had it back then IIRC: Cause people needed them then, pretty much no one do it now.



Simple features that make frequent tasks like this easier are what makes an editor great.

And it really can't be that hard to add something like this (modified DEU source), can't it?

///////////////////////////////////////////////////////////////7777
void CEditLevel::MakeDoor(CEditSector * sector) 
{
	CEditSideDef *Sd1,*Sd2;

	CEditLineDef * ldok[100];
	CEditLineDef * ldflip[100];
	CEditLineDef * ld1s[100];

	int cldok=0,cldflip=0,cld1s=0,csect=0;

	int    n,s;
	
	s = 0;
	/* build lists of LineDefs that border the Sector */
	for (n = 0; n < ELineDefs.Size(); n++)
	{
		Sd1=ELineDefs[n].Sd1;
		Sd2=ELineDefs[n].Sd2;
		if (Sd1 && Sd2)
		{
			if (Sd2->Sec==sector) ldok[cldok++]=&ELineDefs[n]; 
			if (Sd1->Sec==sector) ldflip[cldflip++]=&ELineDefs[n]; 
		}
		else if (Sd1 && !Sd2)
		{
			if (Sd1->Sec==sector) ld1s[cld1s++]=&ELineDefs[n];
		}
	}
	/* a normal door has two sides... */
	if (cldok+cldflip < 2)
	{
		MessageBox(NULL,"The door must be connected to two other Sectors.","DEdit",MB_TASKMODAL);
		return;
	}
	/* flip the LineDefs that have the wrong orientation */
	if (cldflip != 0)
	{
		for (n=0;n<cldflip;n++) 
		{
			FlipLineDefs(ldflip[n],TRUE);
			ldok[cldok++]=ldflip[n];
		}
	}
	for(n=0;n<cldok;n++)
	{
		ldok[ n]->type = 1;
		ldok[ n]->flags = 0x04;
		Sd1=ldok[n]->Sd1;
		Sd2=ldok[n]->Sd2;
		/* adjust the textures for the SideDefs */

		if (strncmp(Sd1->texNormal, "-", 8))
		{
			if (!strncmp(Sd1->texUpper, "-", 8)) strncpy(Sd1->texUpper,Sd1->texNormal, 8);
			strncpy(Sd1->texNormal, "-", 8);
		}
		if (!strncmp(Sd1->texUpper, "-", 8)) strncpy(Sd1->texUpper, "BIGDOOR2", 8);
		strncpy(Sd2->texNormal, "-", 8);
	}
	for(n=0;n<cld1s;n++)
	{
		/* give the "door side" flags to the LineDef */
		ld1s[ n]->flags = 0x11;
		Sd1=ld1s[n]->Sd1;
		/* adjust the textures for the SideDef */
		if (!strncmp(Sd1->texNormal, "-", 8)) strncpy(Sd1->texNormal, "DOORTRAK", 8);
		strncpy(Sd1->texUpper, "-", 8);
		strncpy(Sd1->texLower, "-", 8);
	}
	/* adjust the ceiling height */
	sector->ceilh=sector->floorh;

}
@gemini09: If that's your problem, Doom editing is not for you! ;)

Share this post


Link to post
kristus said:

Prefabs are stupid.


For simple tasks like doors I agree. They do have use if the stuff they represent gets more complex.

Share this post


Link to post

Even in DeePsea wich has prefabs pretty much for making an entire map with one prefab I don't use prefabs... stairs I do by hand, doors I do by hand, the only prefab I use is the occasional copy/paste, and who doesn't do that nowadays? ;)

Share this post


Link to post

The "make door from sector" feature is one of the few automatic tools I use in DeePsea.

Why waste time manually setting sector ceiling height, DR specials, door front/back texture, door side textures and side unpeggedness, and ceiling texture, when one command is enough?

Share this post


Link to post
Graf Zahl said:

Simple features that make frequent tasks like this easier are what makes an editor great.

And it really can't be that hard to add something like this (modified DEU source), can't it?

///////////////////////////////////////////////////////////////7777
void CEditLevel::MakeDoor(CEditSector * sector) 
{
	CEditSideDef *Sd1,*Sd2;

	CEditLineDef * ldok[100];
	CEditLineDef * ldflip[100];
	CEditLineDef * ld1s[100];

	int cldok=0,cldflip=0,cld1s=0,csect=0;

	int    n,s;
	
	s = 0;
	/* build lists of LineDefs that border the Sector */
	for (n = 0; n < ELineDefs.Size(); n++)
	{
		Sd1=ELineDefs[n].Sd1;
		Sd2=ELineDefs[n].Sd2;
		if (Sd1 && Sd2)
		{
			if (Sd2->Sec==sector) ldok[cldok++]=&ELineDefs[n]; 
			if (Sd1->Sec==sector) ldflip[cldflip++]=&ELineDefs[n]; 
		}
		else if (Sd1 && !Sd2)
		{
			if (Sd1->Sec==sector) ld1s[cld1s++]=&ELineDefs[n];
		}
	}
	/* a normal door has two sides... */
	if (cldok+cldflip < 2)
	{
		MessageBox(NULL,"The door must be connected to two other Sectors.","DEdit",MB_TASKMODAL);
		return;
	}
	/* flip the LineDefs that have the wrong orientation */
	if (cldflip != 0)
	{
		for (n=0;n<cldflip;n++) 
		{
			FlipLineDefs(ldflip[n],TRUE);
			ldok[cldok++]=ldflip[n];
		}
	}
	for(n=0;n<cldok;n++)
	{
		ldok[ n]->type = 1;
		ldok[ n]->flags = 0x04;
		Sd1=ldok[n]->Sd1;
		Sd2=ldok[n]->Sd2;
		/* adjust the textures for the SideDefs */

		if (strncmp(Sd1->texNormal, "-", 8))
		{
			if (!strncmp(Sd1->texUpper, "-", 8)) strncpy(Sd1->texUpper,Sd1->texNormal, 8);
			strncpy(Sd1->texNormal, "-", 8);
		}
		if (!strncmp(Sd1->texUpper, "-", 8)) strncpy(Sd1->texUpper, "BIGDOOR2", 8);
		strncpy(Sd2->texNormal, "-", 8);
	}
	for(n=0;n<cld1s;n++)
	{
		/* give the "door side" flags to the LineDef */
		ld1s[ n]->flags = 0x11;
		Sd1=ld1s[n]->Sd1;
		/* adjust the textures for the SideDef */
		if (!strncmp(Sd1->texNormal, "-", 8)) strncpy(Sd1->texNormal, "DOORTRAK", 8);
		strncpy(Sd1->texUpper, "-", 8);
		strncpy(Sd1->texLower, "-", 8);
	}
	/* adjust the ceiling height */
	sector->ceilh=sector->floorh;

}
@gemini09: If that's your problem, Doom editing is not for you! ;)


Would that work if it was added to DB's code or would it need more code?

Share this post


Link to post
kristus said:

Prefabs are stupid.

Not really. I really hate to make the same damn hall light with shaded lighting 3,000 times. And sometimes copy + paste doesn't cut it because I need it for another map.

Frad said:

Why waste time manually setting sector ceiling height, DR specials, door front/back texture, door side textures and side unpeggedness, and ceiling texture, when one command is enough?

Yeah, I almost always forget to unpeg the door track and to give a texture to the underside of the door. Sometimes I even forget to texturise the track. >_<

Share this post


Link to post
MasterOfPuppets said:

Kristus said:
Prefabs are stupid.


I'm so used to making doors manually that it seems to foreign any other way...

Share this post


Link to post
boris said:

And you'll even get an unclosed sector for free!


??? That won't happen if you draw 'across' the sector first.



If I were to draw from D -> A first then it would fuck up the sector.

---------------------------------

All in all though an auto-door from sector feature would be nothing to complain about. And I'd add it if i knew an ounce of programming.

Share this post


Link to post
Linguica said:

Seriously, DB is open source, add the feature yourself or quit yer whinin.



Seriously, DB is written in Visual Basic which limits the source's usefulness quite a lot.

Share this post


Link to post

No, it limits in platform compatibility, but the Basic language is a very common language. It was already there with MSDOS and still has a large community developing software using Visual Basic.

Back on topic; I could make a "Make Door" feature, but not any time soon. I have other things to do at the moment, sorry.

Share this post


Link to post

Could you make a sector-build mode too? Which is totally seperate from the linedef editing mode, because now, you're forced to create 5 vertices, then delete the fifth one, when for example making a door in an existing sector. Feel free to ask me what my other suggestions were too (like free overview movement with the mouse at any time, if the mapper wishes to enable this option, the "M" hotkey feature is pretty useless to me personally, I dunno about other people).

Share this post


Link to post

Ctrl+insert will create a 4 sided sector.

Dunno what you mean about that thing with making 5 vertices and removing the fifth though.

Share this post


Link to post
gemini09 said:

Could you make a sector-build mode too? Which is totally seperate from the linedef editing mode, because now, you're forced to create 5 vertices, then delete the fifth one, when for example making a door in an existing sector.

You do know that you can simply draw the sectors, right? Just press CTRL-D and click where you want your vertices.

Share this post


Link to post
boris said:

You do know that you can simply draw the sectors, right? Just press CTRL-D and click where you want your vertices.


I didn't actually know this myself and was always having to draw 5 vertexes and delete the fifth :oP

I had a feeling this feature existed, just never knew what the short-cut was...

Share this post


Link to post

For those who are too lazy to draw 4 vertices in case they only want a square sector, you can use one of these prefabs. Put them on one of the spots in the menu to which you can assign a shortcut key and just press that shortcut key to paste the prefab.

Share this post


Link to post

Ebola, I know about that, and it's pretty useless to me. Maybe it's useful if you start a brand new map, and plan to create one giant block that takes time to draw from vertex to vertex.

Boris, now I know. That eliminates the 5 vertex problem...

But still, you still have to place 4 vertices in order to create a square, instead of 2, if there was a sector drawing method like DCK's (hotkey R function, I think it was).

IT'S NOT ABOUT LAZINESS FOR FUCK SAKE, IT'S A USEFUL, SIMPLE FEATURE THAT ALOT OF PEOPLE WILL SAVE TIME USING. Understand?

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×