by Xeotroid » Wed Jul 20, 2022 10:32 am
Can this be solved, then? It is pretty common to load a map-only mod with a gameplay mod, and this works fine for most scenarios including ZDoom maps because things are usually spawned into the map where they're affected by replacements. Some maps, however, decide to use GiveInventory either in tandem with ClearInventory to just give the player the Fist, or to give the player more stuff upon picking up an item placed in the map, and this causes problems.
I get that handling compatibility between two different mods might be a bit out of scope, so would it at least be possible to add an optional console warning when a script gives the player an item that would be replaced by a different one were it spawned in the map? That way it's not necessary to open up the map's script to see what the player should give themselves through console. It's not ideal – that would be something where the end user doesn't have to use console commands at all – and it would get annoying when handling a script that uses GiveInventory in a loop (dear god), but better than figuring out why map X doesn't give you Y weapons to use with all the ammo lying around.
Edit: What about a new ZScript/DECORATE keyword that signifies "replace the thing I'm replacing even in inventory functions et al."? This would allow weapon replacement mods to work properly in the situations I've described without possibly breaking stuff by default. It might introduce other problems, but it would probably be far fewer cases than currently. It would also allow Smooth Doom to add back cards and skulls replacements – they used to be there, but because the original class names are checked for in custom scripts much more often, they had to be removed.
Can this be solved, then? It is pretty common to load a map-only mod with a gameplay mod, and this works fine for most scenarios including ZDoom maps because things are usually spawned into the map where they're affected by replacements. Some maps, however, decide to use GiveInventory either in tandem with ClearInventory to just give the player the Fist, or to give the player more stuff upon picking up an item placed in the map, and this causes problems.
I get that handling compatibility between two different mods might be a bit out of scope, so would it at least be possible to add an optional console warning when a script gives the player an item that would be replaced by a different one were it spawned in the map? That way it's not necessary to open up the map's script to see what the player should give themselves through console. It's not ideal – that would be something where the end user doesn't have to use console commands at all – and it would get annoying when handling a script that uses GiveInventory in a loop (dear god), but better than figuring out why map X doesn't give you Y weapons to use with all the ammo lying around.
[b]Edit:[/b] What about a new ZScript/DECORATE keyword that signifies "replace the thing I'm replacing even in inventory functions et al."? This would allow weapon replacement mods to work properly in the situations I've described without possibly breaking stuff by default. It might introduce other problems, but it would probably be far fewer cases than currently. It would also allow Smooth Doom to add back cards and skulls replacements – they used to be there, but because the original class names are checked for in custom scripts much more often, they had to be removed.