Limited number of weapons per player

General help and assistance forum.
Post Reply
2.5d_camper
New User
Posts: 9
Joined: Sat Jul 12, 2025 8:53 pm
Location: Tatarstan

Limited number of weapons per player

#1

Post by 2.5d_camper » Mon Aug 18, 2025 9:35 am

Hi.
My goal is to make different weapons for players, that is, for one player to have no more than four weapons to choose from:
close: fist, knife, axe, etc.
weak: pistol, sawed-off shotgun, etc.
medium: automatic rifle, submachine gun, shotgun, etc.
strong: plasma rifle, gauss rifle, bfg, etc.

How can this be done? Through different classes of players who have only one specific set of weapons?
Or does the inventory in zandronum also allow this and not pick up weapons if the slot is already occupied by some weapon?
I would appreciate help and working examples.

p.s. Is it possible to do it like it is implemented in ROTT, in which there can only be one strong weapon in the last slot and it can be changed if you pick up another one.

User avatar
Fused
Contributor
Posts: 683
Joined: Sat Nov 09, 2013 9:47 am
Location: Netherlands
Contact:

Re: Limited number of weapons per player

#2

Post by Fused » Wed Aug 20, 2025 6:56 am

If it has to be based on a tier then you will need to keep an array with the tier and what weapons fall under it in an ACS file. You can make weapon spawns inherit from CustomInventory and call a script that checks it on pickup and determines if you can grab the weapon by checking the weapon name using GetWeapon() and iterating the list. With the new lump reading you can make it easily modifiable and even extendable with patches.

As for the rest your question is confusing. What do slots and player classes have to do with this when the system you want is based on configurable tiers determined by yourself? I could have a weak slot 7 weapon, for example.
My mods
Image Image

My socials
Image Image

Post Reply