[UDMF] LineDef Automap Draw Flags

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: [UDMF] LineDef Automap Draw Flags

Re: [UDMF] LineDef Automap Draw Flags

by RockstarRaccoon » Thu May 24, 2018 10:33 pm

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

Re: [UDMF] LineDef Automap Draw Flags

by RockstarRaccoon » Thu May 17, 2018 12:47 pm

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.

Re: [UDMF] LineDef Automap Draw Flags

by Xaser » Thu May 17, 2018 12:35 pm

Force-a-Map? I guess this is abstracted away from the user/mapper in practice, but that's an odd name for the field.

Re: [UDMF] LineDef Automap Draw Flags

by RockstarRaccoon » Thu May 17, 2018 11:45 am

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.

Re: [UDMF] LineDef Automap Draw Flags

by Graf Zahl » Tue Jun 14, 2016 5:00 pm

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.

Re: [UDMF] LineDef Automap Draw Flags

by Major Cooke » Tue Jun 14, 2016 3:52 pm

Like a scanner item, you mean?

Re: [UDMF] LineDef Automap Draw Flags

by Xaser » Tue Jun 14, 2016 1:27 pm

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.

Re: [UDMF] LineDef Automap Draw Flags

by Gez » Tue Jun 14, 2016 12:52 pm

This property would be ignored when iddt is on, right?

Re: [UDMF] LineDef Automap Draw Flags

by NeuralStunner » Tue Jun 14, 2016 10:46 am

... 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.

Re: [UDMF] LineDef Automap Draw Flags

by Graf Zahl » Tue Jun 14, 2016 10:29 am

Usefulness aside, the approach here is just awful. Why not just ONE property?

[UDMF] LineDef Automap Draw Flags

by NeuralStunner » Tue Jun 14, 2016 10:01 am

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.

Top