-Ghost- wrote:Is there any way to get a durability/maintenance system or something working? It might help with some of the loadout balance as well; we have something like that for LitDoom so you're always scavenging to a degree, but a new weapon pickup is better/lasts longer than something you grab off a zombie.
EDIT: I got it basically working, but I'm not going to implement it because I don't know how to have it track the conditions of individual weapons. I got it where a weapon would break after being fired so many times, picking it up would give you a random amount of the condition health, and made a second version of the weapon giver that gives much less of the condition health. When depleted the gun breaks and you throw it on the ground. When you had 2 reloads worth of condition left a warning would be printed up.
The biggest issue is that you could just drop it and pick up another of the gun and you would have both the old and the new weapon's conditions added to your inventory. I would have to find a way to have the game track each individual weapon pickup's conditions separately and to intelligently discern between them when you pick weapons up. I know it's doable (Hideous Destructor does a similar thing where it tracks the ammunition held in individual weapons,) but that is WAY outside my skill set.
If some mad man out there wants to write up the code to execute something like that, be sure to get in contact with me and we can talk about it. But I am unable to do that by myself without learning ZScript (and I can't really be assed to do that, sorry folks.)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Original message below:
I doubt I'd be able to implement it as gracefully as a system like that deserves (It sounds like it'd require ZScript or ACS, neither of which I know anything about,) but I'll faff about a bit with it to see if there's a way to make it work in DECORATE. Ain't making any promises here, which is a shame because I actually do like the sound of weapon degradation.
I could probably have it work so that there's a unique inventory item that is added to the player's inventory and every time you attack with a weapon it uses one of this item. Once you run out the weapon breaks and you throw it on the ground. Quality of life addition, once you hit a certain level of degradation you'll get a warning saying your weapon is close to breaking. Weapons you find spawned on the map will give more of this item than ones dropped off zombie corpses, and the amount given would be completely randomized either way.
Additionally, weapon repair kits could be thrown in, just generic box what makes your gun last longer. Shouldn't be difficult, just "if holding X weapon, give Y amount of XWeaponCondition," but my lord that'd be some ugly code.
A more elegant solution lies within the field of ZScript, I'm certain, but that'd require me to:
A) Learn ZScript,
B) Rewrite every single weapon to convert the code into ZScript.
I'll see what I can do in DECORATE, and I'll edit this post once I figure out if it's worth doing or not.