Project Zomboid

Project Zomboid

Gunsmith
このトピックはロックされています
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?
< >
1-1 / 1 のコメントを表示
Dismellion  [開発者] 2024年1月1日 14時05分 
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
< >
1-1 / 1 のコメントを表示
ページ毎: 1530 50