Last active
February 22, 2021 09:38
-
-
Save psiberx/e434c2d03bec65780e524d691afe5c81 to your computer and use it in GitHub Desktop.
Cyberpunk 2077: Sample mod that fixes Dead-Eye clothing mod
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ | |
After the fix is applied you need to reequip clothing item with Dead-Eye installed | |
]] | |
registerForEvent('onInit', function() | |
local deadEyeTweakDbId = TweakDBID.new('Items.PowerfulFabricEnhancer08') | |
local deadEyeOnAttach = TweakDB:GetFlat(TweakDBID.new(deadEyeTweakDbId, '.OnAttach')) | |
-- Check if Dead-Eye is broken | |
if #deadEyeOnAttach == 0 then | |
deadEyeOnAttach[1] = TweakDBID.new('Items.SimpleFabricEnhancer03_inline0') | |
deadEyeOnAttach[2] = TweakDBID.new('Items.SimpleFabricEnhancer04_inline0') | |
TweakDB:SetFlat(TweakDBID.new(deadEyeTweakDbId, '.OnAttach'), deadEyeOnAttach) | |
TweakDB:Update(deadEyeTweakDbId) | |
print('Dead-Eye Fix Applied') | |
end | |
end) | |
--[[ | |
Simplified version with no checks: | |
TweakDB:SetFlat(TweakDBID.new('Items.PowerfulFabricEnhancer08.OnAttach'), { | |
TweakDBID.new('Items.SimpleFabricEnhancer03_inline0'), | |
TweakDBID.new('Items.SimpleFabricEnhancer04_inline0'), | |
}) | |
TweakDB:Update(TweakDBID.new('Items.PowerfulFabricEnhancer08')) | |
]] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment