修改武器数据
增加额外的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