ZDoom / gzdoom

GZDoom is a feature centric port for all Doom engine games, based on ZDoom, adding an OpenGL renderer and powerful scripting capabilities
http://zdoom.org
GNU General Public License v3.0
2.33k stars 526 forks source link

[Feature] GetWADName() for classes #2592

Open MajorCooke opened 4 weeks ago

MajorCooke commented 4 weeks ago

I'm working on creating a mod called KEYCONF Destroyer which allows for organizing and selecting weapons in different orders in whatever order a player desires via menu.

However, one flaw that I've yet to overcome is solving what to do when coming across a class of the same name coming from a different mod. This is assuming both mods are mutually incompatible and cannot be loaded together, mind - one is loaded at one point, then another time, the other mod.

This could easily be solved if there is a GetWADName() function for classes which returns the file name this class comes from so the mod can load the appropriate definition in the event there are duplicates.

RicardoLuis0 commented 4 weeks ago

that wouldn't ever be reliable -- the name of a wad can change when it updates, or someone could rename multiple wads to have the same name, etc

MajorCooke commented 4 weeks ago

I know that's a downside, but that'd be on the player to keep in mind so whenever a mod decides to put in version numbers in their packages, they'll have to adapt.

yum13241 commented 4 weeks ago

whenever a mod decides to put in version numbers in their packages

Which everyone does.

You're better off trying to find a lump unique to every mod, or get Graf to add a modID system similar to modern Minecraft mods.

MajorCooke commented 3 weeks ago

You're better off trying to find a lump unique to every mod

That's counter-intuitive. The point is to be able to remember the package name.

get Graf to add a modID system similar to modern Minecraft mods

Exactly. Effectively a checksum, but for mods.

yum13241 commented 3 weeks ago

GZDoom could further expand on this "modID" idea by separating config files for every modID. However, tons of mods exist so I'd say we'd add a minimum version as well. I don't think tying the ZScript version to this is a good idea.

That's counter-intuitive. The point is to be able to remember the package name.

Then maybe this function should return 8 characters, or just everything until a number is reached, or something stupid like that.