Project Zomboid

Project Zomboid

Gunsmith
이 토론은 잠겼습니다.
KarpJoe 2023년 12월 23일 오후 5시 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?
< >
전체 댓글 1개 중 1~1개 표시 중
Dismellion  [개발자] 2024년 1월 1일 오후 2시 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