Retroactive (Z)MAPINFO Editing...

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

Retroactive (Z)MAPINFO Editing...

Postby DoomKrakken » Wed May 30, 2018 3:26 pm

Dear developers...

Here I am again, with the same issue presented in this thread: viewtopic.php?f=18&t=60734

Now I advocate for a different solution that does not yet exist. I request for the ability to retroactively edit (Z)MAPINFO in order to allow custom maps to be linked to pre-existing maps as hubs.

Examples can be seen here (thank you, Nash!):

viewtopic.php?f=7&t=35343
viewtopic.php?p=948276#p948276 (Rachael's post)
viewtopic.php?p=822827#p822827
User avatar
DoomKrakken
All but inactive here on the forums. Contact me on Discord for quicker replies.
 
Joined: 19 Oct 2014
Location: Plahnit Urff
Discord: DoomKrakken#2719

Re: Retroactive (Z)MAPINFO Editing...

Postby RockstarRaccoon » Wed May 30, 2018 7:06 pm

I'm trying to figure out how this is different from just, like, writing a MAPINFO yourself which does this...
User avatar
RockstarRaccoon
Totally Babies
 
Joined: 31 Jul 2016

Re: Retroactive (Z)MAPINFO Editing...

Postby Graf Zahl » Thu May 31, 2018 12:16 am

My guess is he wants to inject some additional flags into existing mods.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Retroactive (Z)MAPINFO Editing...

Postby Rachael » Thu May 31, 2018 5:09 am

RockstarRaccoon wrote:I'm trying to figure out how this is different from just, like, writing a MAPINFO yourself which does this...

It's nowhere near the same as what you are thinking. While yes, that is feasible to do, then you are stuck with a map definition that may or may not actually match the map that is currently loaded. That can be disastrous if you want to load on top of anything except vanilla Doom.

Graf Zahl wrote:My guess is he wants to inject some additional flags into existing mods.

This is pretty close, although to be fair I'm going to guess this was a typo. He wants to be able to change all previously defined maps with a single set of flags, rather than having to redefine all the maps.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Graphics Processor: nVidia with Vulkan support

Re: Retroactive (Z)MAPINFO Editing...

Postby JPL » Fri Jun 01, 2018 10:28 pm

Here's some thoughts on how this could work from the data side.

The top-level feature would be a new MAPINFO keyword called something like "overridemap", which works exactly like "map" keyword except that its block's contents override properties on any already-defined map by the same name instead of outright replacing the entirety of any previously defined one.
No idea what the code implications of this are, what the code for loading map defintions looks like, or more importantly when it runs in relation to other stuff, but if it's straightforward to just load in these overridemap blocks as each new wad is loaded, that's how I'd expect it to work as a user and modder.

As far as use cases, here are a few I can think of:
- make an existing map's exit switch travel to a special map not included in the original wad
- make a vanilla IWAD / PWAD level revisitable by declaring it part of a hub
- add one of the many useful map definition properties, eg NoIntermission, to an already-defined map
(obviously, mods doing these things would have additional logic that makes it a meaningful change, eg scripting that tracks the player across levels, RPG mechanics, etc)

As for what kind of mods would take advantage of this: there are a huge number of existing WADs that have identical structure (32 maps with secret exits at 15 and 31, etc) which could be modified without having to override meaningful wad-specific data like map names, specials, skies, etc.
As far as I can tell, there are still some things that can be defined in a map defintion that can't be defined or worked around in Zscript or ACS. As Rachael says, the current method of replacing map defintions doesn't work when you just want to make a tweak.
User avatar
JPL
 
 
 
Joined: 09 Apr 2012

Re: Retroactive (Z)MAPINFO Editing...

Postby Rachael » Fri Jun 01, 2018 10:56 pm

@ Graf:

If I were to do this what would be the best way? Something that actually modifies the data structure of previous maps, or to use a single overlaying structure that is |'d over the individual maps on load? I feel like the latter will by far produce the cleanest code, but wanted your thoughts first.

Each method has different ending consequences, obviously.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Graphics Processor: nVidia with Vulkan support

Re: Retroactive (Z)MAPINFO Editing...

Postby Graf Zahl » Sat Jun 02, 2018 12:28 am

What do you mean by "single overlaying structure"?
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Retroactive (Z)MAPINFO Editing...

Postby Rachael » Sat Jun 02, 2018 1:05 am

Originally I meant that all flags defined in such a definition would just be OR'd upon map load when filling the structs, but I realized that solution might be unworkable due to the presence of strings and how they work, so never mind about it. >_<
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Graphics Processor: nVidia with Vulkan support

Re: Retroactive (Z)MAPINFO Editing...

Postby DoomKrakken » Sun Jun 03, 2018 4:30 am

@RockstarRaccoon Because it won't work generically, that's why. If I had the patience to write a custom MAPINFO lump for every single map mod out there in order to turn certain maps into hubs, then I wouldn't even be here requesting a feature to do that during runtime.

@JPL What I wanted to do was create an item that, upon using it, would transfer the player to a different map. Once that map is completed, it'd transport the player back to the original map, with no progress lost.
User avatar
DoomKrakken
All but inactive here on the forums. Contact me on Discord for quicker replies.
 
Joined: 19 Oct 2014
Location: Plahnit Urff
Discord: DoomKrakken#2719

Re: Retroactive (Z)MAPINFO Editing...

Postby Apeirogon » Thu Jun 07, 2018 12:36 pm

Double this dommkrakken.
With this some one can make something like....emmm "battle for life" from conan games. Like, if player die in battle with enemies (important), player will be teleport to "divine arena" where he must kill pair of strong mobs using starting/very weak sword. In case of success resurrection on place of death, if defeat go to save/load screen.
Apeirogon
I have a strange sense of humour
 
Joined: 12 Jun 2017

Re: Retroactive (Z)MAPINFO Editing...

Postby JPL » Thu Jun 07, 2018 12:54 pm

DoomKrakken wrote:@JPL What I wanted to do was create an item that, upon using it, would transfer the player to a different map. Once that map is completed, it'd transport the player back to the original map, with no progress lost.


I believe this would require a combination of what I described above, plus some ACS/ZScript. The ACS function ChangeLevel can load the player into a different level, so your "divine arena" map would have its own unique name within your mod's WAD. When the player uses the item, ZScript could save out the player's current level, then call some ACS to ChangeLevel to the arena. Then when the player completes the arena, ChangeLevel back to the previous level name stored in ZScript. But without the MAPINFO override capability I described (giving all unspecified vanilla maps Hub status), this would restart the level instead of loading the player back in to its previous state.

I could be wrong, but I think it would be possible with what I described plus that existing tech.
User avatar
JPL
 
 
 
Joined: 09 Apr 2012

Re: Retroactive (Z)MAPINFO Editing...

Postby RockstarRaccoon » Fri Jun 08, 2018 10:55 am

I have an idea. What about a new MAPINFO flag to tell it not to unload the last map, maybe add an ACS function to go back to that last map... Would that work?

I've actually been thinking about requesting a system to give the mapper more control over which maps are loaded at one time...
User avatar
RockstarRaccoon
Totally Babies
 
Joined: 31 Jul 2016

Re: Retroactive (Z)MAPINFO Editing...

Postby JPL » Fri Jun 08, 2018 2:01 pm

RockstarRaccoon wrote:I have an idea. What about a new MAPINFO flag to tell it not to unload the last map, maybe add an ACS function to go back to that last map... Would that work?


I'm not sure I understand what you mean by "not unloading the last map"; as far as I can tell GZDoom only ever has a single map loaded at a time. I guess maybe you mean the serialized data it keeps in memory/savegames to preserve hub travel changes?

I've actually been thinking about requesting a system to give the mapper more control over which maps are loaded at one time...


Anything that's not covered by the current cluster system functionality?
User avatar
JPL
 
 
 
Joined: 09 Apr 2012

Re: Retroactive (Z)MAPINFO Editing...

Postby RockstarRaccoon » Sun Jun 10, 2018 6:13 pm

JPL wrote:Anything that's not covered by the current cluster system functionality?

I'm not sure. I'd have to look at exactly what it does under the hood, but if Membrane turns out to be a good idea, I'd like to do something with a non-linear open world setup next. Being able to fine tune the handling of large, interconnected maps would be useful for that...

That's another request for another time though.
User avatar
RockstarRaccoon
Totally Babies
 
Joined: 31 Jul 2016


Return to Feature Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest