dhewm3
dhewm3 copied to clipboard
Seperate map and devmap CCmd behavior like in Quake 4 and BFG Edition
In Quake 4 and Doom 3 BFG Edition, the difference between the map and devmap command was that the latter fired a trigger_relay "devmap" if a map is started from console. However, in the original Doom 3 & Dhewm 3, the devmap trigger is always fired, no matter if map or devmap are used to load the map. This makes it difficult to "pistol start" a map, because you can't prevent receiving extra items associated with this trigger. The only known workaround would be to create a copy of the game's maps and rename or delete the devmap trigger from them.
Not sure it's a good idea to change this - existing Doom3 maps could rely on the devmap trigger always being triggered?
The thing is, the devmap trigger is only triggered when loading a map from console, never in continuous play, e.g. progressing through the game normally. I think it should be optional and left to the user. If you want to trigger devmap manually, you can do so anytime ingame. Just enter "trigger devmap" into the console during play and you'll immediately receive the items as you would've on map startup. I think the current behavior is unintentional and a bug, that's why it's changed in later games. id Tech 4 has the 'map' and 'devmap' commands for this, but as mentioned above, in Doom 3 they both behave identically, as if map was an alias for devmap, making it redundant.
there could still be old community maps that rely on devmap triggers always being triggered?
I know of none, but in this case devmap can be used instead of map to force it. Are there any differences to the two commands right now apart from the name?
Looking at the source reveals that devmap is a boolean parameter for StartNewGame. Could the map command be extended to accept "true" or "false" as a parameter after the map name? This way devmaps triggering always can be the default and can be disabled on demand. I don't know any other proposal. Maybe print a notification in the console if the player wishes to start with or without devmap items. Like "map" is deprecated, use "devmap" instead. Like YamagiQ2 does it for gl_clear and r_clear.
Actually, 'always' is a misnomer, because as commented in player.cpp, the devmap key is cleared on any level transition.
Edit: Changed wording to be less confusing. Devmap is a trigger_relay and a console command. In BFG Edition and Quake 4 it's like this: "map game/admin.map" (devmap is not triggered) "devmap game/admin.map" (devmap is triggered)
I don't see how fixing devmap as it is advertised would break old maps. And even if they would 'break', what's the worst that could happen, really.
the fix wouldn't change the behavior of devmap, but that of normal map (so it doesn't behave like devmap anymore)
Exactly what I mean :D