Automatically adding libraries; a AUTOLIB lump?
Moderator: GZDoom Developers
-
- Posts: 789
- Joined: Mon May 03, 2004 7:08 am
- Location: At college!
Automatically adding libraries; a AUTOLIB lump?
With the rise of custom weapons and inventory items the ability to use ACS_EXECUTE as a code pointer, I'm guessing people will be making weapons that use these in combination. Like, maybe a gun that makes the screen shake when it fires (Via a nondamaging earthquake), or an item that increases your speed using ACS. Even cooler, a heavy gun that lowers your speed when you raise it and sets it back to normal when you lower it (To simulate weight) Stuff like this can be very useful and fun in a wad.
The only problem is that for these guns to work, the script needs to be included. While if you make the map these weapons will be on, this is no problem, this is completely impossible with conversion wads (Such as those done by Xaser or Wildweasel), which aim to be compatible with all existing maps.
I'd like to request a lump, perhaps titled AUTOLIB, that is just like a library, only it is loaded regardless of whether or not a #library entry is in the scripts lump. This way, a wad can be loaded with any other wad, and the scripts needed to run the weapon are always present.
For example, I have a wad called myweapons.wad. I load this up with gothicdm.wad. Though gothicdm.wad has no scripts lump, much less a scripts lump that loads a library, because I have a lump named AUTOLIB in myweapons.wad, zdoom notices it and automatically adds it to gothicdm.wad, allowing my weapons to work.
This change would, primarily, greatly help weapon wads. Many people don't like weapon conversion wads, because they throw off the balance. The monsters and weapons in doom are meant to be balanced against one-another, and changing the weapons disturbs this balance. While I understand and agree (for the most part; I still need a good weapon conversion wad to get through TNT) this problem only arises in single player play. Because all players get the weapons in deathmatch play, balance is conserved, almost no matter what weapons the players have. Many deathmaches can be spiced up with unusual weapon settings. A lump that lets you load weapons that use scripts will help these people as well as people like Xaser who use weapon conversion wads in single player games.
I know that if you have a favorite weapon wad that uses scripts, and a favorite deathmatch wad, you could manually add a script library to it, but in the case of a large wad file, such as tormenters map01 remixes, you will have to edit all thirty-two maps in order to include the library in each map. Also, and AUTOLIB will let you load it with anything without having to do work. For those of you who think I'm just being lazy, think of my friend Nachiket Patkar. He likes zdoom, and likes different weapon wads. However, he doesn't have the first clue about scripting, libraries, or decorate. He would appreciate being able to just select gothicdm and myweapons, and move them both over the zdoom icon in order to use it. While you can call me lazy, without an AUTOLIB lump, or something like unto it, people like my friend Nachiket would never be able to play myweapons without learning a bunch of stuff he won't have any intrest in using.
Also, this AUTOLIB will help for other semi-conversion wads as well. With it, you can make custom HUDs, scripts to give you a count of how many enemies remain, and other stuff. (Other stuff being a technical term meaning people much smarter than me will find other cool uses for this new lump.) Best of all, if you have a custom HUD or something that you like, you can load it with any wad, even those you've just downloaded off of the ID games archive.
Am I making any sense? (By this I mean, do you understand what I'm saying, not do you understand why I'm saying it.)
The only problem is that for these guns to work, the script needs to be included. While if you make the map these weapons will be on, this is no problem, this is completely impossible with conversion wads (Such as those done by Xaser or Wildweasel), which aim to be compatible with all existing maps.
I'd like to request a lump, perhaps titled AUTOLIB, that is just like a library, only it is loaded regardless of whether or not a #library entry is in the scripts lump. This way, a wad can be loaded with any other wad, and the scripts needed to run the weapon are always present.
For example, I have a wad called myweapons.wad. I load this up with gothicdm.wad. Though gothicdm.wad has no scripts lump, much less a scripts lump that loads a library, because I have a lump named AUTOLIB in myweapons.wad, zdoom notices it and automatically adds it to gothicdm.wad, allowing my weapons to work.
This change would, primarily, greatly help weapon wads. Many people don't like weapon conversion wads, because they throw off the balance. The monsters and weapons in doom are meant to be balanced against one-another, and changing the weapons disturbs this balance. While I understand and agree (for the most part; I still need a good weapon conversion wad to get through TNT) this problem only arises in single player play. Because all players get the weapons in deathmatch play, balance is conserved, almost no matter what weapons the players have. Many deathmaches can be spiced up with unusual weapon settings. A lump that lets you load weapons that use scripts will help these people as well as people like Xaser who use weapon conversion wads in single player games.
I know that if you have a favorite weapon wad that uses scripts, and a favorite deathmatch wad, you could manually add a script library to it, but in the case of a large wad file, such as tormenters map01 remixes, you will have to edit all thirty-two maps in order to include the library in each map. Also, and AUTOLIB will let you load it with anything without having to do work. For those of you who think I'm just being lazy, think of my friend Nachiket Patkar. He likes zdoom, and likes different weapon wads. However, he doesn't have the first clue about scripting, libraries, or decorate. He would appreciate being able to just select gothicdm and myweapons, and move them both over the zdoom icon in order to use it. While you can call me lazy, without an AUTOLIB lump, or something like unto it, people like my friend Nachiket would never be able to play myweapons without learning a bunch of stuff he won't have any intrest in using.
Also, this AUTOLIB will help for other semi-conversion wads as well. With it, you can make custom HUDs, scripts to give you a count of how many enemies remain, and other stuff. (Other stuff being a technical term meaning people much smarter than me will find other cool uses for this new lump.) Best of all, if you have a custom HUD or something that you like, you can load it with any wad, even those you've just downloaded off of the ID games archive.
Am I making any sense? (By this I mean, do you understand what I'm saying, not do you understand why I'm saying it.)
-
- Posts: 2959
- Joined: Thu Jul 17, 2003 12:07 am
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
-
- Posts: 21706
- Joined: Tue Jul 15, 2003 7:33 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): A lot of them
- Graphics Processor: Not Listed
-
- Posts: 11349
- Joined: Mon Oct 06, 2003 3:41 pm
- Operating System Version (Optional): Windows 10
- Location: United Kingdom
-
- Posts: 789
- Joined: Mon May 03, 2004 7:08 am
- Location: At college!
-
- Posts: 1031
- Joined: Wed Oct 15, 2003 12:19 am
- Location: Czech Republic
-
- Lead GZDoom+Raze Developer
- Posts: 49203
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
-
- Posts: 21706
- Joined: Tue Jul 15, 2003 7:33 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): A lot of them
- Graphics Processor: Not Listed
-
- Lead GZDoom+Raze Developer
- Posts: 49203
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
-
- Posts: 789
- Joined: Mon May 03, 2004 7:08 am
- Location: At college!
999? From a programming prospective, isn't that a bit odd? Why not 1024, or some other bianary number? Could you enable the use of scripts 1000-1024, but make them only available for autoloading scripts? That way, you can use a weapons mod in a wad that already uses scripts up in the 900 ranges, and map authors won't accidentally use scripts that disable weapon mods.
Oh, and that STRFHELP library? You said the code was already there. Does that mean I just put a library in there named STRFHELP in my wad, and it works as described above?
Oh, and that STRFHELP library? You said the code was already there. Does that mean I just put a library in there named STRFHELP in my wad, and it works as described above?
-
- Lead GZDoom+Raze Developer
- Posts: 49203
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
-
- Posts: 188
- Joined: Mon Oct 18, 2004 3:58 pm
- Location: Russia, Moscow
Can't we use ACS-functions then? (And allow only ACS-functions in autoload libraries)
Example:
Example:
Code: Select all
function void somefunction(int arg1, int arg2, int arg3, int arg4, int arg5) {
//...
}
Code: Select all
//...
SOME A 0 A_Call("somefunction", 1, 2, 3, 4, 5)
//...
-
- Posts: 3463
- Joined: Sat Jul 19, 2003 8:39 am
-
- Lead GZDoom+Raze Developer
- Posts: 49203
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
-
- Posts: 11349
- Joined: Mon Oct 06, 2003 3:41 pm
- Operating System Version (Optional): Windows 10
- Location: United Kingdom