Effective ACS IWAD Detection
Posted: Thu May 19, 2016 11:13 pm
I just finished today adding support for all the IWADS recognized by ZDoom to my weapon wheel . . . mostly.
I still have a couple small issues with Freedoom and Harmony. The trick/hack I used to figure out what game/mod one is playing, so I know which weapon_list to load, is I check whether the player has in their inventory whatever the default 'melee' weapon is. For example, I use to check if one is playing Heretic, to check if one is playing Trailblazer (a mod by Pillowblaster/DoomNukem, not an IWAD), etc.. This works pretty well, but it has the obvious problem that, if two player classes happen to have the same melee weapon, this trick won't be able to distinguish the two. And that's exactly what happens for Freedoom and Harmony: it seems as if the weapon names for both of these IWADs are exactly the same as those in vanilla Doom.
On one hand, this makes my life easy, because I get functional compatibility with no extra work on my part. The problem, however, is that the sprites on the wheel don't match up with the weapons in the game. I would need to tell the wheel 'engine' to change the sprites, but I can't do that if I can't tell whether the player is playing Doom vs Freedoom vs Harmony.
The best solution would be if there were a way to detect which IWAD a player was playing with ACS. However, it seems as if such a feature was denied previously. Perhaps there is a way to get around this? That is, is there a less straightforward way I could tell whether the player is playing vanilla Doom vs Freedoom vs Harmony? Perhaps Doom vs Freedom would be difficult, but I would imagine there would be at least something different between Doom and Harmony that I would be able to tell. For example, any item a player would have in their inventory in Harmony but not Doom (or vice versa) is enough to do the trick.
Any ideas?
I still have a couple small issues with Freedoom and Harmony. The trick/hack I used to figure out what game/mod one is playing, so I know which weapon_list to load, is I check whether the player has in their inventory whatever the default 'melee' weapon is. For example, I use
Code: Select all
is_heretic = CheckInventory("Staff");
Code: Select all
is_trailblazer = CheckInventory("Macheterang")
On one hand, this makes my life easy, because I get functional compatibility with no extra work on my part. The problem, however, is that the sprites on the wheel don't match up with the weapons in the game. I would need to tell the wheel 'engine' to change the sprites, but I can't do that if I can't tell whether the player is playing Doom vs Freedoom vs Harmony.
The best solution would be if there were a way to detect which IWAD a player was playing with ACS. However, it seems as if such a feature was denied previously. Perhaps there is a way to get around this? That is, is there a less straightforward way I could tell whether the player is playing vanilla Doom vs Freedoom vs Harmony? Perhaps Doom vs Freedom would be difficult, but I would imagine there would be at least something different between Doom and Harmony that I would be able to tell. For example, any item a player would have in their inventory in Harmony but not Doom (or vice versa) is enough to do the trick.
Any ideas?