[SOLVED] [DEC] How the hell do I stop vanilla weapons from appearing?

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
yum13241
Posts: 875
Joined: Mon May 10, 2021 8:08 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): EndeavorOS (basically Arch)
Graphics Processor: Intel with Vulkan/Metal Support
Contact:

[SOLVED] [DEC] How the hell do I stop vanilla weapons from appearing?

Post by yum13241 »

So I'm making mod that aims to be compatible with Doom and Chex Quest (because my brothers enjoy it) and I also aim for Zandronum compatibility because online is fun. The way I achieve Chex Quest compatibility is with a separate mod.

I have 2 issues:

1. In both Zandronum and GZDoom, when you type IDKFA (or IDFA), the game gives you vanilla weapons.
2. In GZDoom, the Game keyword seems to be ignored, as I also get "Chex Quest" weapons in Doom, and vice versa.

Stuff I've tried:
1. Filter folders. They don't work with Zandronum.
2. Player class weapon slots. They don't seem to prevent you from selecting unspecified weapons.
3. KEYCONF. This stops you from being able to select the weapons, but doesn't prevent them from being given (which ruins stuff like the AltHUD). Using KEYCONF to do this is also deprecated.
4. An ACS script that walks through a predefined array of both Doom and Chex Quest weapons. No matter what I try, it just doesn't work. If it doesn't give me a runaway error, it still doesn't work (I'm an ACS noob ok)

Mod files:
Main Mod Nope.
Chex Quest Addon Nope.


And before you ask, yes, I am using the replaces keyword with each weapon like I'm supposed to.
Last edited by yum13241 on Tue May 13, 2025 3:24 pm, edited 4 times in total.
User avatar
merlin86
Posts: 154
Joined: Tue Jan 29, 2008 4:02 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11 Pro
Graphics Processor: nVidia with Vulkan support
Contact:

Re: [DECORATE] How the hell do I stop vanilla weapons from appearing?

Post by merlin86 »

Not a DECORATE expert but have you looked at Samsara? I know it has player classes and it's designed to be used in multiplayer.

And yes IDKFA / IDFA giving all the weapons should be that by design.

ACS "runway error" is because it's a loop , you should put a delay at the end.
yum13241
Posts: 875
Joined: Mon May 10, 2021 8:08 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): EndeavorOS (basically Arch)
Graphics Processor: Intel with Vulkan/Metal Support
Contact:

Re: [DECORATE] How the hell do I stop vanilla weapons from appearing?

Post by yum13241 »

merlin86 wrote: Not a DECORATE expert but have you looked at Samsara? I know it has player classes and it's designed to be used in multiplayer.
The classes here aren't for actual Hexen-style classes like the Fighter/Mage/Cleric, it's purely so I can assign appropriate start items and weapon slots for each game. With the way the mod is structured, only the appropriate class is allowed for each game.
Hell, in another mod I'm working on that uses ZScript I've completely eschewed player classes (for now), since I have an event handler to do stuff that I'd use player classes for.

I'll still be sure to take a look at Samsara some time.
merlin86 wrote: And yes IDKFA / IDFA giving all the weapons should be that by design.
You missed the point, cheats aren't supposed to give replaced items, and definitely not items from other games, otherwise typing give all in the console would give you Heretic weapons in Doom, which is obviously stupid.
merlin86 wrote: ACS "runway error" is because it's a loop , you should put a delay at the end.
I have added more Delay(1);s than any one can count, but as usual, things never seem to work on the first try. Larger values don't seem to help, at least the last time I tried. I'm not at my computer though, so I can't test for sure.

Either way, thanks for the suggestions/
User avatar
Enjay
 
 
Posts: 27336
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: [DECORATE] How the hell do I stop vanilla weapons from appearing?

Post by Enjay »

yum13241 wrote: Mon May 12, 2025 8:28 am You missed the point, cheats aren't supposed to give replaced items, and definitely not items from other games, otherwise typing give all in the console would give you Heretic weapons in Doom, which is obviously stupid.
"replaces" is for replacing actors that spawn in the world. You can still have replaced items in your inventory.
If the heretic weapons had sprites, then give all would indeed give them in Doom. Of course, to cycle through them in the normal way, they would still need to be allocated to a slot, but even with out that you could type use WeaponName and you would change to it.

Unless you remove the weapon sprites, the weapons will have the potential to be there.

However, if you create a custom player class that does not have the Doom weapons allocated to any of the weapon slots, players couldn't accidentally switch to them using the normal methods.

As for the AltHUD, that is configurable and you can set it so that certain items do not appear. https://zdoom.org/wiki/Classes:AltHUD
There also used to be a lump called AltHUDCfg which could be used to configure the standard althud, but I don't see that in the wiki, so maybe it's been deprecated?
yum13241
Posts: 875
Joined: Mon May 10, 2021 8:08 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): EndeavorOS (basically Arch)
Graphics Processor: Intel with Vulkan/Metal Support
Contact:

Re: [DECORATE] How the hell do I stop vanilla weapons from appearing?

Post by yum13241 »

Thanks for the help, but between you writing your reply and me seeing it (since I was able to get to my computer in the mean time), I tried out stuff and it seems that:

a. I was using VisibleToPlayerClass when all that does it hide from listed player classes, and I felt it was doing more harm than good.
b. I started using Inventory.RestrictedTo <class1>, <class2> along with Inventory.ForbiddenTo <class3>, which fixed things.

It seems that both in tandem fixed things, and I don't get unneccesary weapons anymore. (i.e, I don't get the vanilla SSG when typing IDKFA in my mod anymore, only my modded one, yay!)

And as for ALTHUDCF, I was using that so my custom ammo would show, but I never knew it could be used to blacklist items, I'll take a look (if I can).

Thanks to everyone who replied.
User avatar
Enjay
 
 
Posts: 27336
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: [DECORATE] How the hell do I stop vanilla weapons from appearing?

Post by Enjay »

yum13241 wrote: Tue May 13, 2025 3:23 pm And as for ALTHUDCF, I was using that so my custom ammo would show, but I never knew it could be used to blacklist items, I'll take a look (if I can).
From memory, you just have to provide a blank entry for the item that you don't want to appear. e.g.

Code: Select all

Chainsaw ""
yum13241
Posts: 875
Joined: Mon May 10, 2021 8:08 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): EndeavorOS (basically Arch)
Graphics Processor: Intel with Vulkan/Metal Support
Contact:

Re: [SOLVED] [DEC] How the hell do I stop vanilla weapons from appearing?

Post by yum13241 »

Thanks, I'll keep that in mind.
Post Reply

Return to “Scripting”