Action Special to reveal lines on automap
Moderator: GZDoom Developers
- RockstarRaccoon
- Posts: 598
- Joined: Sun Jul 31, 2016 2:43 pm
Action Special to reveal lines on automap
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!
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!
Re: Action Special to reveal lines on automap
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
- RockstarRaccoon
- Posts: 598
- Joined: Sun Jul 31, 2016 2:43 pm
Re: Action Special to reveal lines on automap
So, like...
Lid 0 is the whole map
Tid 0 is every player
Code: Select all
AutoMap_Reveal(int Lid = 0, int Tid = 0)
Tid 0 is every player
Re: Action Special to reveal lines on automap
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.
And a new flag for "revealed" that would behave like the automap pickup for unseen lines, but without needing to have an automap.
- RockstarRaccoon
- Posts: 598
- Joined: Sun Jul 31, 2016 2:43 pm
Re: Action Special to reveal lines on 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...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.
Re: Action Special to reveal lines on automap
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.
- RockstarRaccoon
- Posts: 598
- Joined: Sun Jul 31, 2016 2:43 pm
Re: Action Special to reveal lines on automap
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...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.
Re: Action Special to reveal lines on automap
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.I'm pretty sure this is a different functionality
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.
- RockstarRaccoon
- Posts: 598
- Joined: Sun Jul 31, 2016 2:43 pm
Re: Action Special to reveal lines on automap
Ahh, I see... I didn't think about it like that... I'd still like for them to implement this though.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.
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...
Re: Action Special to reveal lines on automap
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)
(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)
Re: Action Special to reveal lines on automap
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).
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).
- RockstarRaccoon
- Posts: 598
- Joined: Sun Jul 31, 2016 2:43 pm
Re: Action Special to reveal lines on automap
Yeah, I got that. Your thing also sounds useful. :3Gez 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).
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Action Special to reveal lines on automap
This suggestion is entirely useless if it ignores textured sectors. Just revealing lines will only look strange.
Re: Action Special to reveal lines on automap
Conceptually, changing line status and changing sector status should remain different actions.
- RockstarRaccoon
- Posts: 598
- Joined: Sun Jul 31, 2016 2:43 pm
Re: Action Special to reveal lines on automap
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?Graf Zahl wrote:This suggestion is entirely useless if it ignores textured sectors. Just revealing lines will only look strange.
Edit: Oh. Duh. I'm on my phone and I don't use the textured automap.