[UDMF] LineDef Automap Draw Flags

Moderator: GZDoom Developers

Post Reply
User avatar
NeuralStunner
 
 
Posts: 12325
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: He/Him
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

[UDMF] LineDef Automap Draw Flags

Post by NeuralStunner »

Code: Select all

drawasceilingdiff = <bool>;
drawasfloordiff = <bool>;
These flags would force the line to be drawn in the automap as if it were a ceiling or floor difference (respectively).

Use cases:
  • Setting lines of a polyobject or "drop" door to appear as a ceiling line, like standard doors do.
  • Forcing any significant ceiling diff to display when it would be "overridden" by an insignificant floor change. (E.G. doors.)
  • Marking railings and other 3D midtexture lines. (The "secret" flag gives the wrong impression if the lines are still passable to some degree.)
  • Making edges of lifts and other important areas visible even when the heights match the neighbor's.
  • Drawing notes or indicators. ("F1", "F2" for example.)
Flag priority (if a line has more than one for some reason):
  1. dontdraw
  2. secret
  3. drawasfloordiff
  4. drawasceilingdiff
More flag ideas (in order of "wantedness"):
  • drawastrigger: Forces the line to be drawn in the trigger color, even if the cheat is off. Great for helpfully marking switches!
  • drawas3dline: Draws as the "3D floor" color, much more useful for railings/walkways/etc.
  • drawas1sided: An alternative to "secret" for lines that don't actually hide secrets, I.E. shouldn't highlight on the map in cheat mode. (If some dipstick abuses this, there are already other cvars to deal with it.)
  • drawas2sided: Uses the color normally set for hidden 2-sided lines in cheat mode. Better for making subtle markings.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [UDMF] LineDef Automap Draw Flags

Post by Graf Zahl »

Usefulness aside, the approach here is just awful. Why not just ONE property?
User avatar
NeuralStunner
 
 
Posts: 12325
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: He/Him
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: [UDMF] LineDef Automap Draw Flags

Post by NeuralStunner »

... Because I was thinking in terms of the standard flags and id didn't occur to me. I'll go with that, then. :lol:

What's a good name for the property? Maybe automapstyle?

Okay, so here's a values list:
  • -1: Hidden. (Maps to the dontdraw flag at run.)
  • 0: Normal/default.
  • 1: As 1-sided.
  • 2: As ceiling diff.
  • 3: As floor diff.
  • 4: As 3D floor edge.
  • 5: As quasi-hidden. (Hidden lines in "show all lines" mode.)
  • 6: As 1-sided/secret, depending on cheat. (Maps to the secret flag at run.)
  • 7: As secret, even with the cheat off.
  • 8: As trigger line, even with the cheat off.
  • 9: As a normal teleporter. (Helpful for script-based teleporters, or marking out areas that teleport via switch.)
  • 10: As exit teeleporter. (Same uses as above... and also for convincing fake exit traps like Doom 1's. :twisted: )
I included the internal ones in the interest of simplicity, and also a possible function to change them at runtime.
Gez
 
 
Posts: 17833
Joined: Fri Jul 06, 2007 3:22 pm

Re: [UDMF] LineDef Automap Draw Flags

Post by Gez »

This property would be ignored when iddt is on, right?
User avatar
Xaser
 
 
Posts: 10772
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

Re: [UDMF] LineDef Automap Draw Flags

Post by Xaser »

I'd be fine with am_cheat modes 1-3 ignoring the property and always showing "the truth", so long as modes 4-6 respect the flag since the intent of those is to display the map as if the player viewed the entire map area without cheats.
User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: [UDMF] LineDef Automap Draw Flags

Post by Major Cooke »

Like a scanner item, you mean?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [UDMF] LineDef Automap Draw Flags

Post by Graf Zahl »

Xaser wrote:I'd be fine with am_cheat modes 1-3 ignoring the property and always showing "the truth", so long as modes 4-6 respect the flag since the intent of those is to display the map as if the player viewed the entire map area without cheats.

Agreed.
User avatar
RockstarRaccoon
Posts: 598
Joined: Sun Jul 31, 2016 2:43 pm

Re: [UDMF] LineDef Automap Draw Flags

Post by RockstarRaccoon »

Done.
Image

UDMF field is "forceAMap". It's a byte. (UINT8 in the engine) Still working out the details.
I can tell you that this will run quicker than letting the engine do it automatically, simply because of what it is, not that anyone is too focused on optimizing something like the Automap, but it's an interesting little side-effect that setting this field will save the line-drawer from a few calculations.
User avatar
Xaser
 
 
Posts: 10772
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

Re: [UDMF] LineDef Automap Draw Flags

Post by Xaser »

Force-a-Map? I guess this is abstracted away from the user/mapper in practice, but that's an odd name for the field.
User avatar
RockstarRaccoon
Posts: 598
Joined: Sun Jul 31, 2016 2:43 pm

Re: [UDMF] LineDef Automap Draw Flags

Post by RockstarRaccoon »

Force Auto Map.
I figured if I'm gonna be shoving new things into a text format they should be brief and to the point.
User avatar
RockstarRaccoon
Posts: 598
Joined: Sun Jul 31, 2016 2:43 pm

Re: [UDMF] LineDef Automap Draw Flags

Post by RockstarRaccoon »

This feature request should probably be closed now. :3

https://github.com/coelckers/gzdoom/pull/485/commits
https://github.com/coelckers/gzdoom/pull/490/commits

485 added a field to UDMF
490 added a line special / ACS function to set it on the fly
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”