Project Zomboid

Project Zomboid

Gunsmith
Este tema ha sido cerrado
KarpJoe 23 DIC 2023 a las 17:30
How to get Generic Parts?
I'm trying to repair a weapon (W1866 Carbine) from VFE and it says I need generic parts to repair it. I assume this is because it isn't auto-classified by the mod as any of the normal categories.
How do I get more generic parts?
Do I have to just hope I find another weapon that isn't classified properly?
Is there some way to convert other weapon parts into generic parts?
If not would that be something you could add?
< >
Mostrando 1-1 de 1 comentarios
Dismellion  [desarrollador] 1 ENE 2024 a las 14:05 
Publicado originalmente por FrancisPJ:
I'm trying to repair a weapon (W1866 Carbine) from VFE and it says I need generic parts to repair it. I assume this is because it isn't auto-classified by the mod as any of the normal categories.
How do I get more generic parts?
Do I have to just hope I find another weapon that isn't classified properly?
Is there some way to convert other weapon parts into generic parts?
If not would that be something you could add?

Yes you are right, this is a fallback mechanics in case weapon has no type. And so, unfortunately same type of weapon has to be disassembled to get parts. If this is not a generic problem of the weapon mod I would ask mod maker to fix that issue.

Code below describes the way the gun part type is determined
function GSmith:getPartType(weapon) local weaponType = weapon:getWeaponReloadType(); local fireModes = weapon:getFireModePossibilities(); local isFullAuto = fireModes and fireModes:get(0) == "Auto"; if weaponType == "handgun" then return "Base.WeaponPartsHandgun"; end if weaponType == "revolver" then return "Base.WeaponPartsRevolver"; end if weaponType == "shotgun" or weaponType == "doublebarrelshotgun" then return "Base.WeaponPartsShotgun"; end if weaponType == "boltactionnomag" then return "Base.WeaponPartsRifle"; end if weaponType == "boltaction" then if isFullAuto then return "Base.WeaponPartsAuto"; else return "Base.WeaponPartsRifle"; end end return "Base.WeaponPartsGeneric"; -- I have no idea what that is, just in case end
< >
Mostrando 1-1 de 1 comentarios
Por página: 1530 50