Key Visibility on Automap Question
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
-
IgnyteZero
- Posts: 67
- Joined: Thu Jan 16, 2025 12:17 pm
- Operating System Version (Optional): Windows 10
Key Visibility on Automap Question
I know that there's a setting within the ZDoom branch where you can toggle it showing key locations in the automap, but is there a way to enforce this (or hinder) within a specific map or for a whole wad/pk3?
I noticed there was a command to enforce this if you use ZMAPINFO instead of MAPINFO and set custom skill levels. But I'm more interest in a global setting for it, as that feels like a backwards way to do it, and also, it doesn't do the opposite, ie hinder it.
And adding to that, a dream would be for it to (for each map) be able to define a key order, so you can define if certain keys would only be visible on automap if picked in a certain order (As in, when you pick the blue key you get teh location on the red key etc), or after interacting with something like an item or linedef.
Would it even be possible to script something like that if it can't be done through mapinfo-related settings?
I noticed there was a command to enforce this if you use ZMAPINFO instead of MAPINFO and set custom skill levels. But I'm more interest in a global setting for it, as that feels like a backwards way to do it, and also, it doesn't do the opposite, ie hinder it.
And adding to that, a dream would be for it to (for each map) be able to define a key order, so you can define if certain keys would only be visible on automap if picked in a certain order (As in, when you pick the blue key you get teh location on the red key etc), or after interacting with something like an item or linedef.
Would it even be possible to script something like that if it can't be done through mapinfo-related settings?
Re: Key Visibility on Automap Question
I could be wrong, but, aside from the skill option setting and the user option you mentioned, I don't *think* there is a way to enforce things on a map-by-map basis in MAPINFO (definitely not 100% sure on that).
However, you might be interested in Map Markers. They put an icon on the map and it can be switched on and off to change its visibility. What's more, you can inherit from the base class and include your own map markers with your own graphics. They wouldn't be the vector graphics of the original, but you could switch them on and off in any order, or have place them in the same position as your keys and switch them to not visible when the key is collected - or whatever you want really.
If you do fancy using them, just be aware (as mentioned on the page) activating the markers hides them and deactivating them makes them visible. I missed that the first time I used them and couldn't figure out why they weren't working.
However, you might be interested in Map Markers. They put an icon on the map and it can be switched on and off to change its visibility. What's more, you can inherit from the base class and include your own map markers with your own graphics. They wouldn't be the vector graphics of the original, but you could switch them on and off in any order, or have place them in the same position as your keys and switch them to not visible when the key is collected - or whatever you want really.
If you do fancy using them, just be aware (as mentioned on the page) activating the markers hides them and deactivating them makes them visible. I missed that the first time I used them and couldn't figure out why they weren't working.
-
IgnyteZero
- Posts: 67
- Joined: Thu Jan 16, 2025 12:17 pm
- Operating System Version (Optional): Windows 10
Re: Key Visibility on Automap Question
That could definitely come in handy, and even be a better solution at that.
Thank you.
Edit: So, that function was already implemented with the udmf format it seems. The more you learn.
Thank you.
Edit: So, that function was already implemented with the udmf format it seems. The more you learn.
-
IgnyteZero
- Posts: 67
- Joined: Thu Jan 16, 2025 12:17 pm
- Operating System Version (Optional): Windows 10
Re: Key Visibility on Automap Question
I made a test, tried to add a custom sprite animation instead of the boring default MapMarker symbol. Didn't work well, no matter if I used ZSCRIPT or DECORATE
I got a whole lot of errors seemingly regarding tons of stuff NOT relating to that script.
All I did was add the animation, which ofc doesn't show up.
The ZSCRIPT I tested
The DECORATE I tested
I got a whole lot of errors seemingly regarding tons of stuff NOT relating to that script.
All I did was add the animation, which ofc doesn't show up.
The ZSCRIPT I tested
Code: Select all
class MissionMark : MapMarker
{
States
{
Spawn:
MARK B 4
MARK C 1
MARK D 1
MARK E 1
MARK F 1
MARK G 1
MARK F 1
MARK E 1
MARK D 1
MARK C 1
Loop
}
}Code: Select all
actor MissionMark : MapMarker 21250
{
//$Category MapMarker
Radius 32
Height 64
-SOLID
States
{
Spawn:
MARK B 4
MARK C 1
MARK D 1
MARK E 1
MARK F 1
MARK G 1
MARK F 1
MARK E 1
MARK D 1
MARK C 1
Loop
}
}Re: Key Visibility on Automap Question
The most obvious fault with your ZScript is the lack of ";"
Here's a map marker that I used and I know it works. So, it may be of use as a model for you:
I can't actually remember if the scale parameter works on the automap or not. It might be necessary to use hires replacements if you want to make hi-res markers. Anyway, I know that the above definitely creates an animated marker on the automap.
Here's a map marker that I used and I know it works. So, it may be of use as a model for you:
Code: Select all
//PDA Map Marker
CLASS MapMarkerPDA : MapMarker
{
Default
{
Scale 0.5;
}
States
{
Spawn:
AMK1 A 8;
AMK1 B 8;
Loop;
}
}-
IgnyteZero
- Posts: 67
- Joined: Thu Jan 16, 2025 12:17 pm
- Operating System Version (Optional): Windows 10
Re: Key Visibility on Automap Question
Thanks, I'll try that.
And yes, inexperienced as I am with scripting, that ; is something I tend ot miss all the time
And yes, inexperienced as I am with scripting, that ; is something I tend ot miss all the time
-
IgnyteZero
- Posts: 67
- Joined: Thu Jan 16, 2025 12:17 pm
- Operating System Version (Optional): Windows 10
Re: Key Visibility on Automap Question
Well, that kinda worked. In so far as the script not giving me errors.
However, it doesn't pop up in UDB as a Thing, so I cannot place it. Even after adding categories.
Why I want it to work is because I literally want two kind of Map Markers, one that marks different POI's (which can disappear when a task is completed) and one that marks the end of the map (which is always up). Right now it uses the default (boring) point which I move around when progress is made, which is fine, but not optimal.
However, it doesn't pop up in UDB as a Thing, so I cannot place it. Even after adding categories.
Code: Select all
// Custom Map Markers
CLASS MissionMarker : MapMarker
{
Default
{
//$Title Mission Marker
//$Category ZDoom
Scale 0.5;
}
States
{
Spawn:
MARK A 4;
MARK B 2;
MARK C 2;
MARK D 2;
MARK E 2;
MARK F 2;
MARK G 2;
Loop;
}
}Re: Key Visibility on Automap Question
I assume that you gave you mission marker an EdNum in your MAPINFO lump?
If not, you should.
If you did, I don't know why its not working, but you should still be able to add the actor to map simply by using the EdNum in the UDB things editor dialogue.
If not, you should.
If you did, I don't know why its not working, but you should still be able to add the actor to map simply by using the EdNum in the UDB things editor dialogue.
-
IgnyteZero
- Posts: 67
- Joined: Thu Jan 16, 2025 12:17 pm
- Operating System Version (Optional): Windows 10
Re: Key Visibility on Automap Question
I think I did... But maybe I didn't.. Sometimes I forget to save a lump in Slade after editing it. Might be as easy as that. Or well, rather I save the lump but I forget to save the wad.
-
IgnyteZero
- Posts: 67
- Joined: Thu Jan 16, 2025 12:17 pm
- Operating System Version (Optional): Windows 10
Re: Key Visibility on Automap Question
Yeah Ednum hadn't been saved.
But I fixed that and it still doesn't show up on the automap, just as an exclamation mark (the one indicating an error with a thing) ingame in player view.
But I fixed that and it still doesn't show up on the automap, just as an exclamation mark (the one indicating an error with a thing) ingame in player view.
Re: Key Visibility on Automap Question
There must be something wrong with the mod other than the map marker because I just used your code and it works just fine.
The marker dead ahead is just going through its animation, the one on the left is being activated/deactivated by a script and the one on the right can be switched off using the switch.
The marker dead ahead is just going through its animation, the one on the left is being activated/deactivated by a script and the one on the right can be switched off using the switch.
- Attachments
-
Mark.pk3- (8.52 KiB) Downloaded 5 times
-
IgnyteZero
- Posts: 67
- Joined: Thu Jan 16, 2025 12:17 pm
- Operating System Version (Optional): Windows 10
Re: Key Visibility on Automap Question
Haha, no, it's no the wad there's something wrong with. It's me. Just me being a noob at this
When importing the sprite gfx into my wad, I forgot to rename them, adding the 0 at the end. But your example helped me realise that mistake.
Thanks again for helping me solve this problem. This should work great now!
When importing the sprite gfx into my wad, I forgot to rename them, adding the 0 at the end. But your example helped me realise that mistake.
Thanks again for helping me solve this problem. This should work great now!
Re: Key Visibility on Automap Question
Easy mistake when you are not fully familiar with sprite naming conventions. Glad you got it sorted.
