《電馭叛客2077》控制台程式碼大全 (第5頁:修改武器資料) - 遊戲狂
廣告

《電馭叛客2077》控制台程式碼大全 (第5頁:修改武器資料)

請拿手機掃描此QRCODE

傳到手機看

2024-10-23

廣告

修改武器資料

增加額外的DPS

1號位的武器 NewStatValue = 0.05; weapSlot = 1; StatsModifiers = {'ItemPlusDPS'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

廣告

2號位的武器 NewStatValue = 0.05; weapSlot = 2; StatsModifiers = {'ItemPlusDPS'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 0.05; weapSlot = 3; StatsModifiers = {'ItemPlusDPS'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

增加物理傷害

1號位的武器 NewStatValue = 1; weapSlot = 1; StatsModifiers = {'PhysicalDamage'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 1; weapSlot = 2; StatsModifiers = {'PhysicalDamage'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 1; weapSlot = 3; StatsModifiers = {'PhysicalDamage'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

增加化學傷害

1號位的武器 NewStatValue = 1; weapSlot = 1; StatsModifiers = {'ChemicalDamage'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 1; weapSlot = 2; StatsModifiers = {'ChemicalDamage'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 1; weapSlot = 3; StatsModifiers = {'ChemicalDamage'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

增加電能傷害

1號位的武器 NewStatValue = 1; weapSlot = 1; StatsModifiers = {'ElectricDamage'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 1; weapSlot = 2; StatsModifiers = {'ElectricDamage'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 1; weapSlot = 3; StatsModifiers = {'ElectricDamage'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

增加熱能傷害

1號位的武器 NewStatValue = 1; weapSlot = 1; StatsModifiers = {'ThermalDamage'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 1; weapSlot = 2; StatsModifiers = {'ThermalDamage'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 1; weapSlot = 3; StatsModifiers = {'ThermalDamage'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

增加流血機率

1號位的武器 NewStatValue = 10; weapSlot = 1; StatsModifiers = {'BleedingApplicationRate'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 10; weapSlot = 2; StatsModifiers = {'BleedingApplicationRate'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 10; weapSlot = 3; StatsModifiers = {'BleedingApplicationRate'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

增加中毒機率

1號位的武器 NewStatValue = 10; weapSlot = 1; StatsModifiers = {'PoisonedApplicationRate'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 10; weapSlot = 2; StatsModifiers = {'PoisonedApplicationRate'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 10; weapSlot = 3; StatsModifiers = {'PoisonedApplicationRate'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

增加電擊機率

1號位的武器 NewStatValue = 10; weapSlot = 1; StatsModifiers = {'ElectrocutedApplicationRate'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 10; weapSlot = 2; StatsModifiers = {'ElectrocutedApplicationRate'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 10; weapSlot = 3; StatsModifiers = {'ElectrocutedApplicationRate'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

增加燃燒機率

1號位的武器 NewStatValue = 10; weapSlot = 1; StatsModifiers = {'BurningApplicationRate'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 10; weapSlot = 2; StatsModifiers = {'BurningApplicationRate'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 10; weapSlot = 3; StatsModifiers = {'BurningApplicationRate'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

增加擊暈機率

1號位的武器 NewStatValue = 10; weapSlot = 1; StatsModifiers = {'StunApplicationRate'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 10; weapSlot = 2; StatsModifiers = {'StunApplicationRate'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 10; weapSlot = 3; StatsModifiers = {'StunApplicationRate'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

增加爆頭倍率

1號位的武器 NewStatValue = 0.5; weapSlot = 1; StatsModifiers = {'HeadshotDamageMultiplier'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 0.5; weapSlot = 2; StatsModifiers = {'HeadshotDamageMultiplier'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 0.5; weapSlot = 3; StatsModifiers = {'HeadshotDamageMultiplier'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

增加暴擊機率

1號位的武器 NewStatValue = 5; weapSlot = 1; StatsModifiers = {'CritChance'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 5; weapSlot = 2; StatsModifiers = {'CritChance'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 5; weapSlot = 3; StatsModifiers = {'CritChance'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

增加暴擊傷害

1號位的武器 NewStatValue = 25; weapSlot = 1; StatsModifiers = {'CritDamage'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 25; weapSlot = 2; StatsModifiers = {'CritDamage'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 25; weapSlot = 3; StatsModifiers = {'CritDamage'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

增加護甲穿透

1號位的武器 NewStatValue = 0.25; weapSlot = 1; StatsModifiers = {'CanWeaponIgnoreArmor'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 0.25; weapSlot = 2; StatsModifiers = {'CanWeaponIgnoreArmor'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 0.25; weapSlot = 3; StatsModifiers = {'CanWeaponIgnoreArmor'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

增加射程

1號位的武器 NewStatValue = 1; weapSlot = 1; StatsModifiers = {'EffectiveRange'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 1; weapSlot = 2; StatsModifiers = {'EffectiveRange'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 1; weapSlot = 3; StatsModifiers = {'EffectiveRange'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

增加射速(減少射擊間隔)

1號位的武器 NewStatValue = -0.005; weapSlot = 1; StatsModifiers = {'CycleTimeBase',} ; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = -0.005; weapSlot = 2; StatsModifiers = {'CycleTimeBase',} ; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = -0.005; weapSlot = 3; StatsModifiers = {'CycleTimeBase',} ; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

增加彈夾容量

1號位的武器 NewStatValue = 1; weapSlot = 1; StatsModifiers = { 'MagazineCapacityBase' }; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 1; weapSlot = 2; StatsModifiers = { 'MagazineCapacityBase' }; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 1; weapSlot = 3; StatsModifiers = { 'MagazineCapacityBase' }; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

設定後坐力為0

1號位的武器 NewStatValue = 0; weapSlot = 1; StatsModifiers = {'RecoilKickMax', 'RecoilKickMin'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); if currVal <= 0 then print(' \n\t[ WARNING ] This is NOT cumulative, the recoil of the weapon in slot '..weapSlot..' has already been removed.\n ') return end print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 0; weapSlot = 2; StatsModifiers = {'RecoilKickMax', 'RecoilKickMin'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); if currVal <= 0 then print(' \n\t[ WARNING ] This is NOT cumulative, the recoil of the weapon in slot '..weapSlot..' has already been removed.\n ') return end print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 0; weapSlot = 3; StatsModifiers = {'RecoilKickMax', 'RecoilKickMin'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); if currVal <= 0 then print(' \n\t[ WARNING ] This is NOT cumulative, the recoil of the weapon in slot '..weapSlot..' has already been removed.\n ') return end print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

減少手動換彈時間

1號位的武器 NewStatValue = -0.1; weapSlot = 1; StatsModifiers = {'ReloadTimeBase'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = -0.1; weapSlot = 2; StatsModifiers = {'ReloadTimeBase'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = -0.1; weapSlot = 3; StatsModifiers = {'ReloadTimeBase'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

減少自動換彈時間

1號位的武器 NewStatValue = -0.1; weapSlot = 1; StatsModifiers = {'EmptyReloadTime'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = -0.1; weapSlot = 2; StatsModifiers = {'EmptyReloadTime'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = -0.1; weapSlot = 3; StatsModifiers = {'EmptyReloadTime'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

設定換彈完的僵直時間為0

1號位的武器 NewStatValue = 0; weapSlot = 1; StatsModifiers = {'ReloadEndTimeBase','EmptyReloadEndTime'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); if currVal <= 0 then print(' \n\t[ WARNING ] This is NOT cumulative, the recoil of the weapon in slot '..weapSlot..' has already been removed.\n ') return end print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 0; weapSlot = 2; StatsModifiers = {'ReloadEndTimeBase','EmptyReloadEndTime'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); if currVal <= 0 then print(' \n\t[ WARNING ] This is NOT cumulative, the recoil of the weapon in slot '..weapSlot..' has already been removed.\n ') return end print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 0; weapSlot = 3; StatsModifiers = {'ReloadEndTimeBase','EmptyReloadEndTime'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); if currVal <= 0 then print(' \n\t[ WARNING ] This is NOT cumulative, the recoil of the weapon in slot '..weapSlot..' has already been removed.\n ') return end print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

減少投擲回收時間(每用一次減少0.5秒)

1號位的武器 NewStatValue = -0.5; weapSlot = 1; StatsModifiers = {'ThrowRecovery'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = -0.5; weapSlot = 2; StatsModifiers = {'ThrowRecovery'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = -0.5; weapSlot = 3; StatsModifiers = {'ThrowRecovery'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

減少充能時間

1號位的武器 NewStatValue = -0.25; weapSlot = 1; StatsModifiers = {'ChargeTime'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = -0.25; weapSlot = 2; StatsModifiers = {'ChargeTime'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = -0.25; weapSlot = 3; StatsModifiers = {'ChargeTime'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

增加充能倍率

1號位的武器 NewStatValue = 0.25; weapSlot = 1; StatsModifiers = {'ChargeMultiplier'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 0.25; weapSlot = 2; StatsModifiers = {'ChargeMultiplier'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 0.25; weapSlot = 3; StatsModifiers = {'ChargeMultiplier'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

設定武器腰射子彈散布為0

1號位的武器 NewStatValue = 0; weapSlot = 1; StatsModifiers = {'SpreadMaxX', 'SpreadMaxY'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); if currVal <= 0 then print(' \n\t[ WARNING ] This is NOT cumulative, the recoil of the weapon in slot '..weapSlot..' has already been removed.\n ') return end print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 0; weapSlot = 2; StatsModifiers = {'SpreadMaxX', 'SpreadMaxY'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); if currVal <= 0 then print(' \n\t[ WARNING ] This is NOT cumulative, the recoil of the weapon in slot '..weapSlot..' has already been removed.\n ') return end print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 0; weapSlot = 3; StatsModifiers = {'SpreadMaxX', 'SpreadMaxY'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); if currVal <= 0 then print(' \n\t[ WARNING ] This is NOT cumulative, the recoil of the weapon in slot '..weapSlot..' has already been removed.\n ') return end print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

設定武器瞄準子彈散布為0

1號位的武器 NewStatValue = 0; weapSlot = 1; StatsModifiers = {'SpreadAdsMaxX', 'SpreadAdsMaxY'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); if currVal <= 0 then print(' \n\t[ WARNING ] This is NOT cumulative, the recoil of the weapon in slot '..weapSlot..' has already been removed.\n ') return end print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 0; weapSlot = 2; StatsModifiers = {'SpreadAdsMaxX', 'SpreadAdsMaxY'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); if currVal <= 0 then print(' \n\t[ WARNING ] This is NOT cumulative, the recoil of the weapon in slot '..weapSlot..' has already been removed.\n ') return end print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 0; weapSlot = 3; StatsModifiers = {'SpreadAdsMaxX', 'SpreadAdsMaxY'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); if currVal <= 0 then print(' \n\t[ WARNING ] This is NOT cumulative, the recoil of the weapon in slot '..weapSlot..' has already been removed.\n ') return end print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

增加近戰與投擲武器的攻擊範圍

1號位的武器 NewStatValue = 1; weapSlot = 1; StatsModifiers = {'Range'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 1; weapSlot = 2; StatsModifiers = {'Range'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 1; weapSlot = 3; StatsModifiers = {'Range'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

增加近戰武器攻速

1號位的武器 NewStatValue = 0.25; weapSlot = 1; StatsModifiers = {'AttackSpeed'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 0.25; weapSlot = 2; StatsModifiers = {'AttackSpeed'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 0.25; weapSlot = 3; StatsModifiers = {'AttackSpeed'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

增加近戰武器攻擊段數

1號位的武器 NewStatValue = 1; weapSlot = 1; StatsModifiers = {'AttacksNumber'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 1; weapSlot = 2; StatsModifiers = {'AttacksNumber'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 1; weapSlot = 3; StatsModifiers = {'AttacksNumber'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

設定近戰武器能否重擊飛撲(1為能0為否)

1號位的武器 NewStatValue = 1; weapSlot = 1; StatsModifiers = {'CanMeleeLeap'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 1; weapSlot = 2; StatsModifiers = {'CanMeleeLeap'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 1; weapSlot = 3; StatsModifiers = {'CanMeleeLeap'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

設定武器消音

1號位的武器 NewStatValue = 1; weapSlot = 1; StatsModifiers = {'CanSilentKill'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 1; weapSlot = 2; StatsModifiers = {'CanSilentKill'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 1; weapSlot = 3; StatsModifiers = {'CanSilentKill'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

減少智能武器鎖定時間

1號位的武器 NewStatValue = -0.05; weapSlot = 1; StatsModifiers = {'SmartGunAdsTimeToLock', 'SmartGunHipTimeToLock',} ; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = -0.05; weapSlot = 2; StatsModifiers = {'SmartGunAdsTimeToLock', 'SmartGunHipTimeToLock',} ; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = -0.05; weapSlot = 3; StatsModifiers = {'SmartGunAdsTimeToLock', 'SmartGunHipTimeToLock',} ; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

增加智能武器最大鎖定人數

1號位的武器 NewStatValue = 1; weapSlot = 1; StatsModifiers = {'SmartGunAdsMaxLockedTargets', 'SmartGunHipMaxLockedTargets'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 1; weapSlot = 2; StatsModifiers = {'SmartGunAdsMaxLockedTargets', 'SmartGunHipMaxLockedTargets'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 1; weapSlot = 3; StatsModifiers = {'SmartGunAdsMaxLockedTargets', 'SmartGunHipMaxLockedTargets'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

設定智能武器每個目標的鎖定部位數量

1號位的武器 NewStatValue = 4; weapSlot = 1; StatsModifiers = {'SmartGunMaxLockedPointsPerTarget'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 4; weapSlot = 2; StatsModifiers = {'SmartGunMaxLockedPointsPerTarget'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 4; weapSlot = 3; StatsModifiers = {'SmartGunMaxLockedPointsPerTarget'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

增加智能武器子彈飛行速度

1號位的武器 NewStatValue = 10; weapSlot = 1; StatsModifiers = {'SmartGunPlayerProjectileVelocity'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 10; weapSlot = 2; StatsModifiers = {'SmartGunPlayerProjectileVelocity'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 10; weapSlot = 3; StatsModifiers = {'SmartGunPlayerProjectileVelocity'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

設定智能瞄準的準星大小(豎向)

1號位的武器 NewStatValue = 20; weapSlot = 1; StatsModifiers = {'SmartGunHipLockingAnglePitch', 'SmartGunHipTargetableAnglePitch', 'SmartGunAdsLockingAnglePitch', 'SmartGunAdsTargetableAnglePitch'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 20; weapSlot = 2; StatsModifiers = {'SmartGunHipLockingAnglePitch', 'SmartGunHipTargetableAnglePitch', 'SmartGunAdsLockingAnglePitch', 'SmartGunAdsTargetableAnglePitch'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 20; weapSlot = 3; StatsModifiers = {'SmartGunHipLockingAnglePitch', 'SmartGunHipTargetableAnglePitch', 'SmartGunAdsLockingAnglePitch', 'SmartGunAdsTargetableAnglePitch'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

設定智能瞄準的準星大小(橫向)

1號位的武器 NewStatValue = 20; weapSlot = 1; StatsModifiers = {'SmartGunHipLockingAngleYaw', 'SmartGunHipTargetableAngleYaw', 'SmartGunAdsLockingAngleYaw', 'SmartGunAdsTargetableAngleYaw'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 20; weapSlot = 2; StatsModifiers = {'SmartGunHipLockingAngleYaw', 'SmartGunHipTargetableAngleYaw', 'SmartGunAdsLockingAngleYaw', 'SmartGunAdsTargetableAngleYaw'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 20; weapSlot = 3; StatsModifiers = {'SmartGunHipLockingAngleYaw', 'SmartGunHipTargetableAngleYaw', 'SmartGunAdsLockingAngleYaw', 'SmartGunAdsTargetableAngleYaw'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

設定智能武器命中率為100%

1號位的武器 NewStatValue = 1; weapSlot = 1; StatsModifiers = {'SmartGunHitProbability'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 1; weapSlot = 2; StatsModifiers = {'SmartGunHitProbability'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 1; weapSlot = 3; StatsModifiers = {'SmartGunHitProbability'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

設定智能武器準星離開敵人後會保持鎖定5秒

1號位的武器 NewStatValue = 5; weapSlot = 1; StatsModifiers = {'SmartGunAdsTimeToUnlock', 'SmartGunHipTimeToUnlock'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 5; weapSlot = 2; StatsModifiers = {'SmartGunAdsTimeToUnlock', 'SmartGunHipTimeToUnlock'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 5; weapSlot = 3; StatsModifiers = {'SmartGunAdsTimeToUnlock', 'SmartGunHipTimeToUnlock'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

增加每次射出子彈數

1號位的武器 NewStatValue = 1; weapSlot = 1; StatsModifiers = {'ProjectilesPerShot'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 1; weapSlot = 2; StatsModifiers = {'ProjectilesPerShot'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 1; weapSlot = 3; StatsModifiers = {'ProjectilesPerShot'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

設定武器耐力消耗減免為100%

1號位的武器 NewStatValue = 1; weapSlot = 1; StatsModifiers = {'CanIgnoreStamina'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 1; weapSlot = 2; StatsModifiers = {'CanIgnoreStamina'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 1; weapSlot = 3; StatsModifiers = {'CanIgnoreStamina'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

設定武器為不朽

1號位的武器 NewStatValue = 1; weapSlot = 1; StatsModifiers = {'IsItemIconic'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 1; weapSlot = 2; StatsModifiers = {'IsItemIconic'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 1; weapSlot = 3; StatsModifiers = {'IsItemIconic'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

設定武器可以穿牆

1號位的武器 NewStatValue = 1; weapSlot = 1; StatsModifiers = {'TechPierceEnabled'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 1; weapSlot = 2; StatsModifiers = {'TechPierceEnabled'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 1; weapSlot = 3; StatsModifiers = {'TechPierceEnabled'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

設定武器瞄準放大倍數

1號位的武器 NewStatValue = 10; weapSlot = 1; StatsModifiers = {'ZoomLevel'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 10; weapSlot = 2; StatsModifiers = {'ZoomLevel'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 10; weapSlot = 3; StatsModifiers = {'ZoomLevel'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

設定瞄準時的武器擺動為0

1號位的武器 NewStatValue = 0; weapSlot = 1; StatsModifiers = {'SwayTraversalTime'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 0; weapSlot = 2; StatsModifiers = {'SwayTraversalTime'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 0; weapSlot = 3; StatsModifiers = {'SwayTraversalTime'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

設定拔出武器補充100%子彈

1號位的武器 NewStatValue = 1; weapSlot = 1; StatsModifiers = {'MagazineAutoRefill'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 1; weapSlot = 2; StatsModifiers = {'MagazineAutoRefill'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 1; weapSlot = 3; StatsModifiers = {'MagazineAutoRefill'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

設定武器潛行傷害加成

1號位的武器 NewStatValue = 200; weapSlot = 1; StatsModifiers = {'StealthHitDamageBonus'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 200; weapSlot = 2; StatsModifiers = {'StealthHitDamageBonus'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 200; weapSlot = 3; StatsModifiers = {'StealthHitDamageBonus'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

設定武器跳彈傷害加成

1號位的武器 NewStatValue = 100; weapSlot = 1; StatsModifiers = {'BonusRicochetDamage'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 100; weapSlot = 2; StatsModifiers = {'BonusRicochetDamage'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 100; weapSlot = 3; StatsModifiers = {'BonusRicochetDamage'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

設定跳彈機率

1號位的武器 NewStatValue = 1; weapSlot = 1; StatsModifiers = {'RicochetChance'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 1; weapSlot = 2; StatsModifiers = {'RicochetChance'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 1; weapSlot = 3; StatsModifiers = {'RicochetChance'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

設定跳彈次數

1號位的武器 NewStatValue = 9; weapSlot = 1; StatsModifiers = {'RicochetCount'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 9; weapSlot = 2; StatsModifiers = {'RicochetCount'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 9; weapSlot = 3; StatsModifiers = {'RicochetCount'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

設定跳彈額外暴擊機率

1號位的武器 NewStatValue = 1; weapSlot = 1; StatsModifiers = {'BonusRicochetCritChance'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 1; weapSlot = 2; StatsModifiers = {'BonusRicochetCritChance'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 1; weapSlot = 3; StatsModifiers = {'BonusRicochetCritChance'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

設定跳彈目標搜尋角度

1號位的武器 NewStatValue = 360; weapSlot = 1; StatsModifiers = {'RicochetTargetSearchAngle'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 360; weapSlot = 2; StatsModifiers = {'RicochetTargetSearchAngle'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 360; weapSlot = 3; StatsModifiers = {'RicochetTargetSearchAngle'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

設定跳彈最大角度

1號位的武器 NewStatValue = 90; weapSlot = 1; StatsModifiers = {'RicochetMaxAngle'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 90; weapSlot = 2; StatsModifiers = {'RicochetMaxAngle'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 90; weapSlot = 3; StatsModifiers = {'RicochetMaxAngle'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

設定對精英敵人傷害加成50%

1號位的武器 NewStatValue = 50; weapSlot = 1; StatsModifiers = {'BonusDamageAgainstElites'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 50; weapSlot = 2; StatsModifiers = {'BonusDamageAgainstElites'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 50; weapSlot = 3; StatsModifiers = {'BonusDamageAgainstElites'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

設定對機械敵人傷害加成50%

1號位的武器 NewStatValue = 0.5; weapSlot = 1; StatsModifiers = {'BonusDamageAgainstMechanicals'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 0.5; weapSlot = 2; StatsModifiers = {'BonusDamageAgainstMechanicals'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 0.5; weapSlot = 3; StatsModifiers = {'BonusDamageAgainstMechanicals'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

設定對Boss傷害加成50%

1號位的武器 NewStatValue = 0.5; weapSlot = 1; StatsModifiers = {'BonusDamageAgainstBosses'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

2號位的武器 NewStatValue = 0.5; weapSlot = 2; StatsModifiers = {'BonusDamageAgainstBosses'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end

3號位的武器 NewStatValue = 0.5; weapSlot = 3; StatsModifiers = {'BonusDamageAgainstBosses'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end


來源:遊俠網

廣告

廣告

遊戲資訊

電馭叛客2077 (Cyberpunk 2077)

類別: 動作
平台: PC, PS4, PS5, XboxONE, XboxSeriesX, Stadia
開發: CD Projekt RED
發行: CD Projekt RED
上市: 2020年12月10日

《電馭叛客2077》是一款由《巫師》系列開發商CD Projekt開發並於2020年12月10日發行的動作角色扮演遊戲。本作採用了桌上遊戲《電馭叛客2020》的世界觀與規則設計,背景為2077年美國加利福尼亞州的「賽博龐克」風格反烏托邦式城市「夜城」,玩家在這一開放世界中扮演名為「V」的僱傭兵。遊戲定位為一款成人RPG,故事設定在未來科技極度發達的腐敗世界中,構建在筆和紙系統的基礎上,兼有沙盤元素及RPG機制。本作由CD Projekt RED聯合《電馭叛客》筆紙系統(Cyberpunk Pen & Paper system)作者Mike Pondsmith共同開發。

更多 電馭叛客2077 攻略|新聞

廣告
修改武器資料 https://gamemad.com/guide/347927 增加額外的DPS 1號位的武器 NewStatValue = 0.05; weapSlot = 1; StatsModifiers = {'ItemPlusDPS'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 0.05; weapSlot = 2; StatsModifiers = {'ItemPlusDPS'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 0.05; weapSlot = 3; StatsModifiers = {'ItemPlusDPS'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 增加物理傷害 1號位的武器 NewStatValue = 1; weapSlot = 1; StatsModifiers = {'PhysicalDamage'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 1; weapSlot = 2; StatsModifiers = {'PhysicalDamage'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 1; weapSlot = 3; StatsModifiers = {'PhysicalDamage'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 增加化學傷害 1號位的武器 NewStatValue = 1; weapSlot = 1; StatsModifiers = {'ChemicalDamage'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 1; weapSlot = 2; StatsModifiers = {'ChemicalDamage'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 1; weapSlot = 3; StatsModifiers = {'ChemicalDamage'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 增加電能傷害 1號位的武器 NewStatValue = 1; weapSlot = 1; StatsModifiers = {'ElectricDamage'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 1; weapSlot = 2; StatsModifiers = {'ElectricDamage'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 1; weapSlot = 3; StatsModifiers = {'ElectricDamage'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 增加熱能傷害 1號位的武器 NewStatValue = 1; weapSlot = 1; StatsModifiers = {'ThermalDamage'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 1; weapSlot = 2; StatsModifiers = {'ThermalDamage'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 1; weapSlot = 3; StatsModifiers = {'ThermalDamage'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 增加流血機率 1號位的武器 NewStatValue = 10; weapSlot = 1; StatsModifiers = {'BleedingApplicationRate'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 10; weapSlot = 2; StatsModifiers = {'BleedingApplicationRate'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 10; weapSlot = 3; StatsModifiers = {'BleedingApplicationRate'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 增加中毒機率 1號位的武器 NewStatValue = 10; weapSlot = 1; StatsModifiers = {'PoisonedApplicationRate'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 10; weapSlot = 2; StatsModifiers = {'PoisonedApplicationRate'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 10; weapSlot = 3; StatsModifiers = {'PoisonedApplicationRate'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 增加電擊機率 1號位的武器 NewStatValue = 10; weapSlot = 1; StatsModifiers = {'ElectrocutedApplicationRate'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 10; weapSlot = 2; StatsModifiers = {'ElectrocutedApplicationRate'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 10; weapSlot = 3; StatsModifiers = {'ElectrocutedApplicationRate'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 增加燃燒機率 1號位的武器 NewStatValue = 10; weapSlot = 1; StatsModifiers = {'BurningApplicationRate'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 10; weapSlot = 2; StatsModifiers = {'BurningApplicationRate'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 10; weapSlot = 3; StatsModifiers = {'BurningApplicationRate'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 增加擊暈機率 1號位的武器 NewStatValue = 10; weapSlot = 1; StatsModifiers = {'StunApplicationRate'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 10; weapSlot = 2; StatsModifiers = {'StunApplicationRate'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 10; weapSlot = 3; StatsModifiers = {'StunApplicationRate'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 增加爆頭倍率 1號位的武器 NewStatValue = 0.5; weapSlot = 1; StatsModifiers = {'HeadshotDamageMultiplier'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 0.5; weapSlot = 2; StatsModifiers = {'HeadshotDamageMultiplier'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 0.5; weapSlot = 3; StatsModifiers = {'HeadshotDamageMultiplier'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 增加暴擊機率 1號位的武器 NewStatValue = 5; weapSlot = 1; StatsModifiers = {'CritChance'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 5; weapSlot = 2; StatsModifiers = {'CritChance'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 5; weapSlot = 3; StatsModifiers = {'CritChance'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 增加暴擊傷害 1號位的武器 NewStatValue = 25; weapSlot = 1; StatsModifiers = {'CritDamage'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 25; weapSlot = 2; StatsModifiers = {'CritDamage'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 25; weapSlot = 3; StatsModifiers = {'CritDamage'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 增加護甲穿透 1號位的武器 NewStatValue = 0.25; weapSlot = 1; StatsModifiers = {'CanWeaponIgnoreArmor'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 0.25; weapSlot = 2; StatsModifiers = {'CanWeaponIgnoreArmor'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 0.25; weapSlot = 3; StatsModifiers = {'CanWeaponIgnoreArmor'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 增加射程 1號位的武器 NewStatValue = 1; weapSlot = 1; StatsModifiers = {'EffectiveRange'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 1; weapSlot = 2; StatsModifiers = {'EffectiveRange'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 1; weapSlot = 3; StatsModifiers = {'EffectiveRange'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 增加射速(減少射擊間隔) 1號位的武器 NewStatValue = -0.005; weapSlot = 1; StatsModifiers = {'CycleTimeBase',} ; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = -0.005; weapSlot = 2; StatsModifiers = {'CycleTimeBase',} ; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = -0.005; weapSlot = 3; StatsModifiers = {'CycleTimeBase',} ; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 增加彈夾容量 1號位的武器 NewStatValue = 1; weapSlot = 1; StatsModifiers = { 'MagazineCapacityBase' }; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 1; weapSlot = 2; StatsModifiers = { 'MagazineCapacityBase' }; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 1; weapSlot = 3; StatsModifiers = { 'MagazineCapacityBase' }; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 設定後坐力為0 1號位的武器 NewStatValue = 0; weapSlot = 1; StatsModifiers = {'RecoilKickMax', 'RecoilKickMin'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); if currVal <= 0 then print(' \n\t[ WARNING ] This is NOT cumulative, the recoil of the weapon in slot '..weapSlot..' has already been removed.\n ') return end print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 0; weapSlot = 2; StatsModifiers = {'RecoilKickMax', 'RecoilKickMin'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); if currVal <= 0 then print(' \n\t[ WARNING ] This is NOT cumulative, the recoil of the weapon in slot '..weapSlot..' has already been removed.\n ') return end print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 0; weapSlot = 3; StatsModifiers = {'RecoilKickMax', 'RecoilKickMin'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); if currVal <= 0 then print(' \n\t[ WARNING ] This is NOT cumulative, the recoil of the weapon in slot '..weapSlot..' has already been removed.\n ') return end print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 減少手動換彈時間 1號位的武器 NewStatValue = -0.1; weapSlot = 1; StatsModifiers = {'ReloadTimeBase'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = -0.1; weapSlot = 2; StatsModifiers = {'ReloadTimeBase'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = -0.1; weapSlot = 3; StatsModifiers = {'ReloadTimeBase'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 減少自動換彈時間 1號位的武器 NewStatValue = -0.1; weapSlot = 1; StatsModifiers = {'EmptyReloadTime'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = -0.1; weapSlot = 2; StatsModifiers = {'EmptyReloadTime'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = -0.1; weapSlot = 3; StatsModifiers = {'EmptyReloadTime'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 設定換彈完的僵直時間為0 1號位的武器 NewStatValue = 0; weapSlot = 1; StatsModifiers = {'ReloadEndTimeBase','EmptyReloadEndTime'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); if currVal <= 0 then print(' \n\t[ WARNING ] This is NOT cumulative, the recoil of the weapon in slot '..weapSlot..' has already been removed.\n ') return end print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 0; weapSlot = 2; StatsModifiers = {'ReloadEndTimeBase','EmptyReloadEndTime'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); if currVal <= 0 then print(' \n\t[ WARNING ] This is NOT cumulative, the recoil of the weapon in slot '..weapSlot..' has already been removed.\n ') return end print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 0; weapSlot = 3; StatsModifiers = {'ReloadEndTimeBase','EmptyReloadEndTime'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); if currVal <= 0 then print(' \n\t[ WARNING ] This is NOT cumulative, the recoil of the weapon in slot '..weapSlot..' has already been removed.\n ') return end print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 減少投擲回收時間(每用一次減少0.5秒) 1號位的武器 NewStatValue = -0.5; weapSlot = 1; StatsModifiers = {'ThrowRecovery'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = -0.5; weapSlot = 2; StatsModifiers = {'ThrowRecovery'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = -0.5; weapSlot = 3; StatsModifiers = {'ThrowRecovery'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 減少充能時間 1號位的武器 NewStatValue = -0.25; weapSlot = 1; StatsModifiers = {'ChargeTime'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = -0.25; weapSlot = 2; StatsModifiers = {'ChargeTime'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = -0.25; weapSlot = 3; StatsModifiers = {'ChargeTime'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 增加充能倍率 1號位的武器 NewStatValue = 0.25; weapSlot = 1; StatsModifiers = {'ChargeMultiplier'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 0.25; weapSlot = 2; StatsModifiers = {'ChargeMultiplier'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 0.25; weapSlot = 3; StatsModifiers = {'ChargeMultiplier'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 設定武器腰射子彈散布為0 1號位的武器 NewStatValue = 0; weapSlot = 1; StatsModifiers = {'SpreadMaxX', 'SpreadMaxY'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); if currVal <= 0 then print(' \n\t[ WARNING ] This is NOT cumulative, the recoil of the weapon in slot '..weapSlot..' has already been removed.\n ') return end print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 0; weapSlot = 2; StatsModifiers = {'SpreadMaxX', 'SpreadMaxY'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); if currVal <= 0 then print(' \n\t[ WARNING ] This is NOT cumulative, the recoil of the weapon in slot '..weapSlot..' has already been removed.\n ') return end print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 0; weapSlot = 3; StatsModifiers = {'SpreadMaxX', 'SpreadMaxY'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); if currVal <= 0 then print(' \n\t[ WARNING ] This is NOT cumulative, the recoil of the weapon in slot '..weapSlot..' has already been removed.\n ') return end print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 設定武器瞄準子彈散布為0 1號位的武器 NewStatValue = 0; weapSlot = 1; StatsModifiers = {'SpreadAdsMaxX', 'SpreadAdsMaxY'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); if currVal <= 0 then print(' \n\t[ WARNING ] This is NOT cumulative, the recoil of the weapon in slot '..weapSlot..' has already been removed.\n ') return end print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 0; weapSlot = 2; StatsModifiers = {'SpreadAdsMaxX', 'SpreadAdsMaxY'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); if currVal <= 0 then print(' \n\t[ WARNING ] This is NOT cumulative, the recoil of the weapon in slot '..weapSlot..' has already been removed.\n ') return end print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 0; weapSlot = 3; StatsModifiers = {'SpreadAdsMaxX', 'SpreadAdsMaxY'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); if currVal <= 0 then print(' \n\t[ WARNING ] This is NOT cumulative, the recoil of the weapon in slot '..weapSlot..' has already been removed.\n ') return end print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 增加近戰與投擲武器的攻擊範圍 1號位的武器 NewStatValue = 1; weapSlot = 1; StatsModifiers = {'Range'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 1; weapSlot = 2; StatsModifiers = {'Range'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 1; weapSlot = 3; StatsModifiers = {'Range'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 增加近戰武器攻速 1號位的武器 NewStatValue = 0.25; weapSlot = 1; StatsModifiers = {'AttackSpeed'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 0.25; weapSlot = 2; StatsModifiers = {'AttackSpeed'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 0.25; weapSlot = 3; StatsModifiers = {'AttackSpeed'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 增加近戰武器攻擊段數 1號位的武器 NewStatValue = 1; weapSlot = 1; StatsModifiers = {'AttacksNumber'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 1; weapSlot = 2; StatsModifiers = {'AttacksNumber'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 1; weapSlot = 3; StatsModifiers = {'AttacksNumber'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 設定近戰武器能否重擊飛撲(1為能0為否) 1號位的武器 NewStatValue = 1; weapSlot = 1; StatsModifiers = {'CanMeleeLeap'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 1; weapSlot = 2; StatsModifiers = {'CanMeleeLeap'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 1; weapSlot = 3; StatsModifiers = {'CanMeleeLeap'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 設定武器消音 1號位的武器 NewStatValue = 1; weapSlot = 1; StatsModifiers = {'CanSilentKill'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 1; weapSlot = 2; StatsModifiers = {'CanSilentKill'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 1; weapSlot = 3; StatsModifiers = {'CanSilentKill'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 減少智能武器鎖定時間 1號位的武器 NewStatValue = -0.05; weapSlot = 1; StatsModifiers = {'SmartGunAdsTimeToLock', 'SmartGunHipTimeToLock',} ; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = -0.05; weapSlot = 2; StatsModifiers = {'SmartGunAdsTimeToLock', 'SmartGunHipTimeToLock',} ; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = -0.05; weapSlot = 3; StatsModifiers = {'SmartGunAdsTimeToLock', 'SmartGunHipTimeToLock',} ; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 增加智能武器最大鎖定人數 1號位的武器 NewStatValue = 1; weapSlot = 1; StatsModifiers = {'SmartGunAdsMaxLockedTargets', 'SmartGunHipMaxLockedTargets'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 1; weapSlot = 2; StatsModifiers = {'SmartGunAdsMaxLockedTargets', 'SmartGunHipMaxLockedTargets'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 1; weapSlot = 3; StatsModifiers = {'SmartGunAdsMaxLockedTargets', 'SmartGunHipMaxLockedTargets'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 設定智能武器每個目標的鎖定部位數量 1號位的武器 NewStatValue = 4; weapSlot = 1; StatsModifiers = {'SmartGunMaxLockedPointsPerTarget'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 4; weapSlot = 2; StatsModifiers = {'SmartGunMaxLockedPointsPerTarget'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 4; weapSlot = 3; StatsModifiers = {'SmartGunMaxLockedPointsPerTarget'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 增加智能武器子彈飛行速度 1號位的武器 NewStatValue = 10; weapSlot = 1; StatsModifiers = {'SmartGunPlayerProjectileVelocity'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 10; weapSlot = 2; StatsModifiers = {'SmartGunPlayerProjectileVelocity'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 10; weapSlot = 3; StatsModifiers = {'SmartGunPlayerProjectileVelocity'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 設定智能瞄準的準星大小(豎向) 1號位的武器 NewStatValue = 20; weapSlot = 1; StatsModifiers = {'SmartGunHipLockingAnglePitch', 'SmartGunHipTargetableAnglePitch', 'SmartGunAdsLockingAnglePitch', 'SmartGunAdsTargetableAnglePitch'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 20; weapSlot = 2; StatsModifiers = {'SmartGunHipLockingAnglePitch', 'SmartGunHipTargetableAnglePitch', 'SmartGunAdsLockingAnglePitch', 'SmartGunAdsTargetableAnglePitch'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 20; weapSlot = 3; StatsModifiers = {'SmartGunHipLockingAnglePitch', 'SmartGunHipTargetableAnglePitch', 'SmartGunAdsLockingAnglePitch', 'SmartGunAdsTargetableAnglePitch'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 設定智能瞄準的準星大小(橫向) 1號位的武器 NewStatValue = 20; weapSlot = 1; StatsModifiers = {'SmartGunHipLockingAngleYaw', 'SmartGunHipTargetableAngleYaw', 'SmartGunAdsLockingAngleYaw', 'SmartGunAdsTargetableAngleYaw'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 20; weapSlot = 2; StatsModifiers = {'SmartGunHipLockingAngleYaw', 'SmartGunHipTargetableAngleYaw', 'SmartGunAdsLockingAngleYaw', 'SmartGunAdsTargetableAngleYaw'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 20; weapSlot = 3; StatsModifiers = {'SmartGunHipLockingAngleYaw', 'SmartGunHipTargetableAngleYaw', 'SmartGunAdsLockingAngleYaw', 'SmartGunAdsTargetableAngleYaw'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 設定智能武器命中率為100% 1號位的武器 NewStatValue = 1; weapSlot = 1; StatsModifiers = {'SmartGunHitProbability'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 1; weapSlot = 2; StatsModifiers = {'SmartGunHitProbability'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 1; weapSlot = 3; StatsModifiers = {'SmartGunHitProbability'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 設定智能武器準星離開敵人後會保持鎖定5秒 1號位的武器 NewStatValue = 5; weapSlot = 1; StatsModifiers = {'SmartGunAdsTimeToUnlock', 'SmartGunHipTimeToUnlock'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 5; weapSlot = 2; StatsModifiers = {'SmartGunAdsTimeToUnlock', 'SmartGunHipTimeToUnlock'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 5; weapSlot = 3; StatsModifiers = {'SmartGunAdsTimeToUnlock', 'SmartGunHipTimeToUnlock'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 增加每次射出子彈數 1號位的武器 NewStatValue = 1; weapSlot = 1; StatsModifiers = {'ProjectilesPerShot'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 1; weapSlot = 2; StatsModifiers = {'ProjectilesPerShot'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 1; weapSlot = 3; StatsModifiers = {'ProjectilesPerShot'}; cumulativeMode = true; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 設定武器耐力消耗減免為100% 1號位的武器 NewStatValue = 1; weapSlot = 1; StatsModifiers = {'CanIgnoreStamina'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 1; weapSlot = 2; StatsModifiers = {'CanIgnoreStamina'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 1; weapSlot = 3; StatsModifiers = {'CanIgnoreStamina'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 設定武器為不朽 1號位的武器 NewStatValue = 1; weapSlot = 1; StatsModifiers = {'IsItemIconic'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 1; weapSlot = 2; StatsModifiers = {'IsItemIconic'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 1; weapSlot = 3; StatsModifiers = {'IsItemIconic'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 設定武器可以穿牆 1號位的武器 NewStatValue = 1; weapSlot = 1; StatsModifiers = {'TechPierceEnabled'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 1; weapSlot = 2; StatsModifiers = {'TechPierceEnabled'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 1; weapSlot = 3; StatsModifiers = {'TechPierceEnabled'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 設定武器瞄準放大倍數 1號位的武器 NewStatValue = 10; weapSlot = 1; StatsModifiers = {'ZoomLevel'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 10; weapSlot = 2; StatsModifiers = {'ZoomLevel'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 10; weapSlot = 3; StatsModifiers = {'ZoomLevel'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 設定瞄準時的武器擺動為0 1號位的武器 NewStatValue = 0; weapSlot = 1; StatsModifiers = {'SwayTraversalTime'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 0; weapSlot = 2; StatsModifiers = {'SwayTraversalTime'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 0; weapSlot = 3; StatsModifiers = {'SwayTraversalTime'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 設定拔出武器補充100%子彈 1號位的武器 NewStatValue = 1; weapSlot = 1; StatsModifiers = {'MagazineAutoRefill'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 1; weapSlot = 2; StatsModifiers = {'MagazineAutoRefill'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 1; weapSlot = 3; StatsModifiers = {'MagazineAutoRefill'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 設定武器潛行傷害加成 1號位的武器 NewStatValue = 200; weapSlot = 1; StatsModifiers = {'StealthHitDamageBonus'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 200; weapSlot = 2; StatsModifiers = {'StealthHitDamageBonus'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 200; weapSlot = 3; StatsModifiers = {'StealthHitDamageBonus'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 設定武器跳彈傷害加成 1號位的武器 NewStatValue = 100; weapSlot = 1; StatsModifiers = {'BonusRicochetDamage'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 100; weapSlot = 2; StatsModifiers = {'BonusRicochetDamage'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 100; weapSlot = 3; StatsModifiers = {'BonusRicochetDamage'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 設定跳彈機率 1號位的武器 NewStatValue = 1; weapSlot = 1; StatsModifiers = {'RicochetChance'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 1; weapSlot = 2; StatsModifiers = {'RicochetChance'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 1; weapSlot = 3; StatsModifiers = {'RicochetChance'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 設定跳彈次數 1號位的武器 NewStatValue = 9; weapSlot = 1; StatsModifiers = {'RicochetCount'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 9; weapSlot = 2; StatsModifiers = {'RicochetCount'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 9; weapSlot = 3; StatsModifiers = {'RicochetCount'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 設定跳彈額外暴擊機率 1號位的武器 NewStatValue = 1; weapSlot = 1; StatsModifiers = {'BonusRicochetCritChance'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 1; weapSlot = 2; StatsModifiers = {'BonusRicochetCritChance'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 1; weapSlot = 3; StatsModifiers = {'BonusRicochetCritChance'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 設定跳彈目標搜尋角度 1號位的武器 NewStatValue = 360; weapSlot = 1; StatsModifiers = {'RicochetTargetSearchAngle'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 360; weapSlot = 2; StatsModifiers = {'RicochetTargetSearchAngle'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 360; weapSlot = 3; StatsModifiers = {'RicochetTargetSearchAngle'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 設定跳彈最大角度 1號位的武器 NewStatValue = 90; weapSlot = 1; StatsModifiers = {'RicochetMaxAngle'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 90; weapSlot = 2; StatsModifiers = {'RicochetMaxAngle'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 90; weapSlot = 3; StatsModifiers = {'RicochetMaxAngle'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 設定對精英敵人傷害加成50% 1號位的武器 NewStatValue = 50; weapSlot = 1; StatsModifiers = {'BonusDamageAgainstElites'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 50; weapSlot = 2; StatsModifiers = {'BonusDamageAgainstElites'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 50; weapSlot = 3; StatsModifiers = {'BonusDamageAgainstElites'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 設定對機械敵人傷害加成50% 1號位的武器 NewStatValue = 0.5; weapSlot = 1; StatsModifiers = {'BonusDamageAgainstMechanicals'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 0.5; weapSlot = 2; StatsModifiers = {'BonusDamageAgainstMechanicals'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 0.5; weapSlot = 3; StatsModifiers = {'BonusDamageAgainstMechanicals'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 設定對Boss傷害加成50% 1號位的武器 NewStatValue = 0.5; weapSlot = 1; StatsModifiers = {'BonusDamageAgainstBosses'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 2號位的武器 NewStatValue = 0.5; weapSlot = 2; StatsModifiers = {'BonusDamageAgainstBosses'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 3號位的武器 NewStatValue = 0.5; weapSlot = 3; StatsModifiers = {'BonusDamageAgainstBosses'}; cumulativeMode = false; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get(CName.new('EquipmentSystem')); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; ID = PD:GetItemInEquipSlot2('Weapon', weapSlot - 1); print('\n ') for i, StatName in next, StatsModifiers do if ID.tdbid.hash == 0 then print(' \n\t[ SLOT '..weapSlot..' ]\t->\tNO WEAPON FOUND IN THIS SLOT\n ') elseif ID.tdbid.hash ~= 0 then itemData = TS:GetItemData(P, ID); SOID = itemData:GetStatsObjectID(); local currVal = SS:GetStatValue(SOID, StatName); local itemID = TDBID.ToStringDEBUG(ID.id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TDBID.ToStringDEBUG(ID.id..'.displayName'))); local MinVal = TweakDB:GetFlat('BaseStats.'..StatName..'.min'); local MaxVal = TweakDB:GetFlat('BaseStats.'..StatName..'.max'); print('\t[ Slot '..weapSlot..' ]\t->\t'..itemName..'\t( "'..itemID..'" )') print('\t'..StatName..'\t->\tMIN Settable value : '..string.format('%f', MinVal)) print('\t'..StatName..'\t->\tMAX Settable value : '..string.format('%f', MaxVal)) print('\t'..StatName..'\t->\tCURRENT STAT VALUE : '..string.format('%f', currVal)) if cumulativeMode then newValue = currVal + NewStatValue; statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', newValue) print('\t . . . Adding : '..string.format('%f', NewStatValue)) else statMod = Game['gameRPGManager::CreateStatModifier;gamedataStatTypegameStatModifierTypeFloat'](StatName, 'Additive', NewStatValue) print('\t . . . setting : '..string.format('%f', NewStatValue)) end SS:RemoveAllModifiers(SOID, StatName, true) SS:AddSavedModifier(SOID, statMod) local newCurrVal = SS:GetStatValue(SOID, StatName); print('\t'..StatName..'\t->\tNEW STAT VALUE: '..string.format('%f', newCurrVal)..'\n ') end end 來源:遊俠網
https://gamemad.com/guide/347927
0