Action Special to reveal lines on automap

Moderator: GZDoom Developers

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

Action Special to reveal lines on automap

Post by RockstarRaccoon »

As someone who has been designing large, non-linear,multi-area maps I've been wanting the ability, for some time, to give the player parts of the automap in chunks. After chatting with some people in the Discord chat, I'd like to request an Action Special to reveal unseen lines on the automap by Line ID.

Obviously this would only be truly useful in large UDMF maps, so I wouldn't worry about making it work with older formats. You might also make passing 0 reveal the entire map like the item would. I, personally, would mainly be using this from ACS, so please make sure it works from there too.

Thanks!
User avatar
Rachael
Posts: 13561
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Action Special to reveal lines on automap

Post by Rachael »

If any prospective coder wanted to this on, one has to remember that the automap is different for every player, therefore it should accept an activator/TID argument
User avatar
RockstarRaccoon
Posts: 598
Joined: Sun Jul 31, 2016 2:43 pm

Re: Action Special to reveal lines on automap

Post by RockstarRaccoon »

So, like...

Code: Select all

AutoMap_Reveal(int Lid = 0, int Tid = 0)
Lid 0 is the whole map
Tid 0 is every player
Gez
 
 
Posts: 17835
Joined: Fri Jul 06, 2007 3:22 pm

Re: Action Special to reveal lines on automap

Post by Gez »

I'd like something a lot more generic, if possible. Not simply hide or reveal, but something that can change most line flags, including the seen, hidden, and secret flags.

And a new flag for "revealed" that would behave like the automap pickup for unseen lines, but without needing to have an automap.
User avatar
RockstarRaccoon
Posts: 598
Joined: Sun Jul 31, 2016 2:43 pm

Re: Action Special to reveal lines on automap

Post by RockstarRaccoon »

Gez wrote:I'd like something a lot more generic, if possible. Not simply hide or reveal, but something that can change most line flags, including the seen, hidden, and secret flags.

And a new flag for "revealed" that would behave like the automap pickup for unseen lines, but without needing to have an automap.
I'm not sure what you're saying... Are you just wanting to change the hidden line flags? I think you can already do that...
User avatar
Nash
 
 
Posts: 17439
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Action Special to reveal lines on automap

Post by Nash »

He's saying instead of making something to cater to only your specific use case, it's better to make a generalized function that will do to the lines more than just hiding and showing them.
User avatar
RockstarRaccoon
Posts: 598
Joined: Sun Jul 31, 2016 2:43 pm

Re: Action Special to reveal lines on automap

Post by RockstarRaccoon »

Nash wrote:He's saying instead of making something to cater to only your specific use case, it's better to make a generalized function that will do to the lines more than just hiding and showing them.
I'm pretty sure this is a different functionality. I'm looking for something like a more isolated version of the automap pickup. He's looking for a way to alter automap flags. They both have their own applications, but his may be harder to implement...
User avatar
Nash
 
 
Posts: 17439
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Action Special to reveal lines on automap

Post by Nash »

I'm pretty sure this is a different functionality
Yes. Gez was suggesting something that will do more than just what YOU want. Maybe other modders want to manipulate lines' secret flag. Not just line seen/revealed flag.

Making a line appear or disappear on the automap DOES require you to alter line flags. It's how the engine does it internally - when a line is see by you, its ML_MAPPED flag is set to on.

///////////////

Ok now here's the problem with your idea.

Internally, when you pick up the MapRevealer, it just sets a global variable (level.allmap) to on. Then, the automap drawing routine just checks if this value is true, and if so, draws ALL lines with disregard to whether it's "seen" flag has been set or not. "Revealed" will unconditionally draw every line in the level.

In other words, the "revealed" status of a line (the effect you'd get when picking up the MapRevealer) is not tracked anywhere. Doing this would require adding a new flag to a line that says "ok, this line is revealed but not seen yet". So basically, it's not as easy as you think it is.

Source: AM_drawWalls in am_map.cpp

Secondly, but probably not related to your suggestion - ZScript already allows you to alter line flags. The flag in particular is ML_MAPPED. But I'm not sure what effect this would have. Doing this will probably draw the line like as if you've physically seen it (with full colour), if I had to guess.
User avatar
RockstarRaccoon
Posts: 598
Joined: Sun Jul 31, 2016 2:43 pm

Re: Action Special to reveal lines on automap

Post by RockstarRaccoon »

Nash wrote:Ok now here's the problem with your idea.

Internally, when you pick up the MapRevealer, it just sets a global variable (level.allmap) to on. Then, the automap drawing routine just checks if this value is true, and if so, draws ALL lines with disregard to whether it's "seen" flag has been set or not. "Revealed" will unconditionally draw every line in the level.

In other words, the "revealed" status of a line (the effect you'd get when picking up the MapRevealer) is not tracked anywhere. Doing this would require adding a new flag to a line that says "ok, this line is revealed but not seen yet". So basically, it's not as easy as you think it is.

Source: AM_drawWalls in am_map.cpp

Secondly, but probably not related to your suggestion - ZScript already allows you to alter line flags. The flag in particular is ML_MAPPED. But I'm not sure what effect this would have. Doing this will probably draw the line like as if you've physically seen it (with full colour), if I had to guess.
Ahh, I see... I didn't think about it like that... I'd still like for them to implement this though.

So I might be able to do something like this manually? That'd be a good stopgap if they don't implement this anytime soon: I can just make a function like this with that method and replace it with the action special later...
User avatar
Nash
 
 
Posts: 17439
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Action Special to reveal lines on automap

Post by Nash »

The original idea in the OP is still legit. There is no "revealed" flag for lines... only "mapped" (seen). To do that however, the drawing logic in AM_drawWalls needs to be modified. And that's a question of who's willing to put time into it. :P

(I'm saying it's not as easy as adding 1 line and 1 new flag, but it's not by all means difficult either. It's just a matter of who is motivated enough to do it)
Gez
 
 
Posts: 17835
Joined: Fri Jul 06, 2007 3:22 pm

Re: Action Special to reveal lines on automap

Post by Gez »

If you want a "partial automap", you'll need a new line flag for that, as Nash explained.

I'd like something that could manipulate existing line flags and this proposed new one. Example of use: a secret area. Its door is mapped with the "secret" flag (that makes it look like a normal wall) and the rest of the lines are mapped with the "hidden" flag (to prevent them from showing up if the player has picked up an automap). Truly secret. But if the player opens the secret, then remove the secret flag from the door (so it will no longer appear as a wall on the automap, since its door status is now known) and the walls of the secret area lose the "hidden" flag (so that the player can actually map them).
User avatar
RockstarRaccoon
Posts: 598
Joined: Sun Jul 31, 2016 2:43 pm

Re: Action Special to reveal lines on automap

Post by RockstarRaccoon »

Gez wrote:If you want a "partial automap", you'll need a new line flag for that, as Nash explained.

I'd like something that could manipulate existing line flags and this proposed new one. Example of use: a secret area. Its door is mapped with the "secret" flag (that makes it look like a normal wall) and the rest of the lines are mapped with the "hidden" flag (to prevent them from showing up if the player has picked up an automap). Truly secret. But if the player opens the secret, then remove the secret flag from the door (so it will no longer appear as a wall on the automap, since its door status is now known) and the walls of the secret area lose the "hidden" flag (so that the player can actually map them).
Yeah, I got that. Your thing also sounds useful. :3
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Action Special to reveal lines on automap

Post by Graf Zahl »

This suggestion is entirely useless if it ignores textured sectors. Just revealing lines will only look strange.
Gez
 
 
Posts: 17835
Joined: Fri Jul 06, 2007 3:22 pm

Re: Action Special to reveal lines on automap

Post by Gez »

Conceptually, changing line status and changing sector status should remain different actions.
User avatar
RockstarRaccoon
Posts: 598
Joined: Sun Jul 31, 2016 2:43 pm

Re: Action Special to reveal lines on automap

Post by RockstarRaccoon »

Graf Zahl wrote:This suggestion is entirely useless if it ignores textured sectors. Just revealing lines will only look strange.
I'm confused... Is there a feature I'm not aware of where we can alter the way sectors look when shown by the map pickup in the automap? Perhaps it should take a third argument?

Edit: Oh. Duh. I'm on my phone and I don't use the textured automap.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”