作弊程式碼列表
作弊
錢+500000 Game.AddToInventory("Items.money",500000)
5++的軍用科技篇章6型+3快速破解插槽(須已裝備篇章6型) TweakDB:SetFlat(TweakDBID.new("Items.HauntedCyberdeck_LegendaryPlusPlus.blueprint"), "Items.CyberdeckBlueprint8Slots")
無限刷新義體詞條(在義體升級選擇詞條時退出再進入即可) ObserveBefore("RipperDocGameController", "StartCWUpgrade", function() Game.GetInventoryManager():IncrementCyberwareUpgradeSeed(3) end)
切換上帝模式(無傷無限彈藥無限耐力) ModStatPl = function(ID, value) Game.GetStatsSystem():AddModifier(Game.GetPlayer():GetEntityID(), RPGManager.CreateStatModifier(ID, gameStatModifierType.Additive, value)) end ApplStatEff = function(effect) Game.GetStatusEffectSystem():ApplyStatusEffect(Game.GetPlayer():GetEntityID(), effect) end RemoStatEff = function(effect) Game.GetStatusEffectSystem():RemoveStatusEffect(Game.GetPlayer():GetEntityID(), effect) end if Game.GetStatusEffectSystem():HasStatusEffect(Game.GetPlayer():GetEntityID(), "BaseStatusEffect.Invulnerable") == false then ApplStatEff("BaseStatusEffect.Invulnerable") ApplStatEff("GameplayRestriction.InfiniteAmmo") ModStatPl("Stamina", 90000) print(" [ GOD MODE TOGGLE ]") print(" - NO DAMAGE TAKEN: ON") print(" - INFINITE AMMO: ON") print(" - INFINITE STAMINA: ON") else RemoStatEff("BaseStatusEffect.Invulnerable") RemoStatEff("GameplayRestriction.InfiniteAmmo") ModStatPl("Stamina", -90000) print(" [ GOD MODE TOGGLE ]") print(" - NO DAMAGE TAKEN: OFF") print(" - INFINITE AMMO: OFF") print(" - INFINITE STAMINA: OFF") end
切換無限耐力 stat = "Stamina"; ModStatPlayer = function(ID, value) Game.GetStatsSystem():AddModifier(Game.GetPlayer():GetEntityID(), RPGManager.CreateStatModifier(ID, gameStatModifierType.Additive, value)) end if Game.GetStatsSystem():GetStatValue(GetPlayer():GetEntityID(), stat) <= 5000 then ModStatPlayer(stat, 90000) print(" - INFINITE STAMINA: ON") else ModStatPlayer(stat, -90000) print(" - INFINITE STAMINA: OFF") end
切換無限彈藥 ApplStatEff = function(effect) Game.GetStatusEffectSystem():ApplyStatusEffect(Game.GetPlayer():GetEntityID(), effect) end RemoStatEff = function(effect) Game.GetStatusEffectSystem():RemoveStatusEffect(Game.GetPlayer():GetEntityID(), effect) end if Game.GetStatusEffectSystem():HasStatusEffect(Game.GetPlayer():GetEntityID(), "GameplayRestriction.InfiniteAmmo") == false then ApplStatEff("GameplayRestriction.InfiniteAmmo") print(" - INFINITE AMMO: ON") else RemoStatEff("GameplayRestriction.InfiniteAmmo") print(" - INFINITE AMMO: OFF") end
切換快速換彈(忽略動畫) v1,v2 = "ReloadTime","EmptyReloadTime" On,Off = " - INSTANT RELOAD: ON (IGNORE THE ANIMATION)", " - INSTANT RELOAD: OFF" SS = Game.GetStatsSystem() CurrentVal = SS:GetStatValue(GetPlayer():GetEntityID(), v1) ModStPl = function(ID, value) SS:AddModifier(Game.GetPlayer():GetEntityID(), RPGManager.CreateStatModifier(ID, gameStatModifierType.Additive, value)) end if CurrentVal == 0 then ModStPl(v1, -1) ModStPl(v2, -1) print(On) elseif CurrentVal == 1 then ModStPl(v1, -2) ModStPl(v2, -2) print(On) elseif CurrentVal ~= 0 or CurrentVal ~= 1 then ModStPl(v1, (CurrentVal*-1)+1) ModStPl(v2, (CurrentVal*-1)+1) print(Off) end for i, v in pairs {"ReloadTime","EmptyReloadTime"} do print(v..": ", SS:GetStatValue(GetPlayer():GetEntityID(), v)) end
切換超級速度 SuperSpeed = not SuperSpeed TS = Game.GetTimeSystem() TDA = TS:IsTimeDilationActive() if TDA == true then TS:SetTimeDilation(CName.new(), 1.0) end if not SuperSpeed then TS:SetTimeDilationOnLocalPlayerZero(CName.new(), 3.0, false) print(" - SUPER SPEED: ON") else TS:UnsetTimeDilationOnLocalPlayerZero(CName.new()) print(" - SUPER SPEED: OFF") end
切換時緩 TS = Game.GetTimeSystem() TDA = TS:IsTimeDilationActive() if TDA == false then TS:SetTimeDilation(CName.new(), 0.4) print(" - SLOW MOTION: ON") else TS:SetTimeDilation(CName.new(), 1.0) print(" - SLOW MOTION: OFF") end --better? TS:UnsetTimeDilation(CName.new())
切換時緩(玩家除外) TS = Game.GetTimeSystem() TDA = TS:IsTimeDilationActive() if TDA == false then TS:SetIgnoreTimeDilationOnLocalPlayerZero(true) TS:SetTimeDilation(CName.new(), 0.15) print(" - SLOW THE WORLD AROUND YOU: ON") else TS:SetIgnoreTimeDilationOnLocalPlayerZero(true) TS:UnsetTimeDilation(CName.new()) print(" - SLOW THE WORLD AROUND YOU: OFF") end
切換時停(玩家除外) toggleStopTime = not toggleStopTime; local TS = Game.GetTimeSystem(); if toggleStopTime then TS:SetIgnoreTimeDilationOnLocalPlayerZero(true) TS:SetTimeDilation('', 0.00000000000001) print('\t- STOP THE WORLD AROUND YOU : ON\n ') else TS:SetIgnoreTimeDilationOnLocalPlayerZero(false) TS:UnsetTimeDilation('') print('\t- STOP THE WORLD AROUND YOU : OFF\n ') end
切換隱身 P = Game.GetPlayer() SES = Game.GetStatusEffectSystem() if Game.GetStatusEffectSystem():HasStatusEffect(P:GetEntityID(), "BaseStatusEffect.Cloaked") == false then SES:ApplyStatusEffect(Game.GetPlayer():GetEntityID(), "BaseStatusEffect.Cloaked") P:SetInvisible(true) P:UpdateVisibility() print(" - INVISIBILITY / UNDETECTABLE: ON") else SES:RemoveStatusEffect(Game.GetPlayer():GetEntityID(), "BaseStatusEffect.Cloaked") P:SetInvisible(false) P:UpdateVisibility() print(" - INVISIBILITY / UNDETECTABLE: OFF") end
切換無墜落傷害(需存檔再讀檔) function toggleNoFallDamage() noFallDamageToggle = not noFallDamageToggle; local function alert(msg) PreventionSystem.ShowMessage(msg, 4.0) end local function get(record) local val = TweakDB:GetFlat(record) return val end; local function set(record, value) TweakDB:SetFlat(record, value) end; local regularNew, safeNew, hardNew, veryHardNew, deathNew = 50000, 60000, 70000, 80000, 90000;local regular = { {flat = 'playerStateMachineBaseLocomotion.locomotionAir.regularLandingHeight', def = 0.2}, {flat = 'playerStateMachineBaseLocomotionLowGravity.locomotionAirLowGravity.regularLandingHeight', def = 0.2}, {flat = 'playerStateMachineBaseLocomotionTakedown.grappleAir.regularLandingHeight', def = 0.2}, {flat = 'playerStateMachineBaseLocomotionTier3.locomotionAirTier3.regularLandingHeight', def = 0.2}, {flat = 'playerStateMachineBaseLocomotionTier4.locomotionAirTier4.regularLandingHeight', def = 0.2}, {flat = 'playerStateMachineBaseLocomotionTier5.locomotionAirTier5.regularLandingHeight', def = 0.2}, {flat = 'playerStateMachineLocomotion.airHover.regularLandingHeight', def = 0.2}, {flat = 'playerStateMachineLocomotion.airThrusters.regularLandingHeight', def = 0.2}, {flat = 'playerStateMachineLocomotion.bodySlamJump.regularLandingHeight', def = 0.2}, {flat = 'playerStateMachineLocomotion.chargeJump.regularLandingHeight', def = 0.2}, {flat = 'playerStateMachineLocomotion.coolExitJump.regularLandingHeight', def = 0.2}, {flat = 'playerStateMachineLocomotion.dodgeAir.regularLandingHeight', def = 0.2}, {flat = 'playerStateMachineLocomotion.doubleJump.regularLandingHeight', def = 0.2}, {flat = 'playerStateMachineLocomotion.fall.regularLandingHeight', def = 0.2}, {flat = 'playerStateMachineLocomotion.hoverJump.regularLandingHeight', def = 0.2}, {flat = 'playerStateMachineLocomotion.jump.regularLandingHeight', def = 0.2}, {flat = 'playerStateMachineLocomotion.ladderCrouch.regularLandingHeight', def = 0.2}, {flat = 'playerStateMachineLocomotion.ladderJump.regularLandingHeight', def = 0.2}, {flat = 'playerStateMachineLocomotion.slideFall.regularLandingHeight', def = 0.2}, {flat = 'playerStateMachineLocomotion.superheroFall.regularLandingHeight', def = 0.2}, {flat = 'playerStateMachineLocomotion.unsecureFootingFall.regularLandingHeight', def = 0.2}, {flat = 'playerStateMachineLocomotionLowGravity.dodgeAirLowGravity.regularLandingHeight', def = 0.2}, {flat = 'playerStateMachineLocomotionLowGravity.fallLowGravity.regularLandingHeight', def = 0.2}, {flat = 'playerStateMachineLocomotionLowGravity.jumpLowGravity.regularLandingHeight', def = 0.2}, {flat = 'playerStateMachineLocomotionLowGravity.sprintJumpLowGravity.regularLandingHeight', def = 0.2}, {flat = 'playerStateMachineLocomotionTakedown.grappleFall.regularLandingHeight', def = 0.2} } local safe = { {flat = 'playerStateMachineBaseLocomotion.locomotionAir.safeLandingHeight', def = 1}, {flat = 'playerStateMachineLocomotion.airHover.safeLandingHeight', def = 1}, {flat = 'playerStateMachineLocomotion.airThrusters.safeLandingHeight', def = 1}, {flat = 'playerStateMachineLocomotion.bodySlamJump.safeLandingHeight', def = 1}, {flat = 'playerStateMachineLocomotion.chargeJump.safeLandingHeight', def = 1}, {flat = 'playerStateMachineLocomotion.coolExitJump.safeLandingHeight', def = 1}, {flat = 'playerStateMachineLocomotion.dodgeAir.safeLandingHeight', def = 1}, {flat = 'playerStateMachineLocomotion.doubleJump.safeLandingHeight', def = 1}, {flat = 'playerStateMachineLocomotion.fall.safeLandingHeight', def = 1}, {flat = 'playerStateMachineLocomotion.hoverJump.safeLandingHeight', def = 1}, {flat = 'playerStateMachineLocomotion.jump.safeLandingHeight', def = 1}, {flat = 'playerStateMachineLocomotion.ladderCrouch.safeLandingHeight', def = 1}, {flat = 'playerStateMachineLocomotion.ladderJump.safeLandingHeight', def = 1}, {flat = 'playerStateMachineLocomotion.slideFall.safeLandingHeight', def = 1}, {flat = 'playerStateMachineLocomotion.superheroFall.safeLandingHeight', def = 1}, {flat = 'playerStateMachineLocomotion.unsecureFootingFall.safeLandingHeight', def = 1} } local hard = { {flat = 'playerStateMachineBaseLocomotion.locomotionAir.hardLandingHeight', def = 5}, {flat = 'playerStateMachineBaseLocomotionLowGravity.locomotionAirLowGravity.hardLandingHeight', def = 24}, {flat = 'playerStateMachineBaseLocomotionTakedown.grappleAir.hardLandingHeight', def = 5}, {flat = 'playerStateMachineBaseLocomotionTier3.locomotionAirTier3.hardLandingHeight', def = 2.5}, {flat = 'playerStateMachineBaseLocomotionTier4.locomotionAirTier4.hardLandingHeight', def = 2.5}, {flat = 'playerStateMachineBaseLocomotionTier5.locomotionAirTier5.hardLandingHeight', def = 2.5}, {flat = 'playerStateMachineLocomotion.airHover.hardLandingHeight', def = 5}, {flat = 'playerStateMachineLocomotion.airThrusters.hardLandingHeight', def = 5}, {flat = 'playerStateMachineLocomotion.bodySlamJump.hardLandingHeight', def = 5}, {flat = 'playerStateMachineLocomotion.chargeJump.hardLandingHeight', def = 5}, {flat = 'playerStateMachineLocomotion.coolExitJump.hardLandingHeight', def = 5}, {flat = 'playerStateMachineLocomotion.dodgeAir.hardLandingHeight', def = 5}, {flat = 'playerStateMachineLocomotion.doubleJump.hardLandingHeight', def = 5}, {flat = 'playerStateMachineLocomotion.fall.hardLandingHeight', def = 5}, {flat = 'playerStateMachineLocomotion.hoverJump.hardLandingHeight', def = 5}, {flat = 'playerStateMachineLocomotion.jump.hardLandingHeight', def = 5}, {flat = 'playerStateMachineLocomotion.ladderCrouch.hardLandingHeight', def = 5}, {flat = 'playerStateMachineLocomotion.ladderJump.hardLandingHeight', def = 5}, {flat = 'playerStateMachineLocomotion.slideFall.hardLandingHeight', def = 5}, {flat = 'playerStateMachineLocomotion.superheroFall.hardLandingHeight', def = 5}, {flat = 'playerStateMachineLocomotion.unsecureFootingFall.hardLandingHeight', def = 5}, {flat = 'playerStateMachineLocomotionLowGravity.dodgeAirLowGravity.hardLandingHeight', def = 24}, {flat = 'playerStateMachineLocomotionLowGravity.fallLowGravity.hardLandingHeight', def = 24}, {flat = 'playerStateMachineLocomotionLowGravity.jumpLowGravity.hardLandingHeight', def = 24}, {flat = 'playerStateMachineLocomotionLowGravity.sprintJumpLowGravity.hardLandingHeight', def = 24}, {flat = 'playerStateMachineLocomotionTakedown.grappleFall.hardLandingHeight', def = 5} } local veryHard = { {flat = 'playerStateMachineBaseLocomotion.locomotionAir.veryHardLandingHeight', def = 10}, {flat = 'playerStateMachineBaseLocomotionLowGravity.locomotionAirLowGravity.veryHardLandingHeight', def = 72}, {flat = 'playerStateMachineBaseLocomotionTakedown.grappleAir.veryHardLandingHeight', def = 10}, {flat = 'playerStateMachineBaseLocomotionTier3.locomotionAirTier3.veryHardLandingHeight', def = 12}, {flat = 'playerStateMachineBaseLocomotionTier4.locomotionAirTier4.veryHardLandingHeight', def = 12}, {flat = 'playerStateMachineBaseLocomotionTier5.locomotionAirTier5.veryHardLandingHeight', def = 12}, {flat = 'playerStateMachineLocomotion.airHover.veryHardLandingHeight', def = 10}, {flat = 'playerStateMachineLocomotion.airThrusters.veryHardLandingHeight', def = 10}, {flat = 'playerStateMachineLocomotion.bodySlamJump.veryHardLandingHeight', def = 10}, {flat = 'playerStateMachineLocomotion.chargeJump.veryHardLandingHeight', def = 10}, {flat = 'playerStateMachineLocomotion.coolExitJump.veryHardLandingHeight', def = 10}, {flat = 'playerStateMachineLocomotion.dodgeAir.veryHardLandingHeight', def = 10}, {flat = 'playerStateMachineLocomotion.doubleJump.veryHardLandingHeight', def = 10}, {flat = 'playerStateMachineLocomotion.fall.veryHardLandingHeight', def = 10}, {flat = 'playerStateMachineLocomotion.hoverJump.veryHardLandingHeight', def = 10}, {flat = 'playerStateMachineLocomotion.jump.veryHardLandingHeight', def = 10}, {flat = 'playerStateMachineLocomotion.ladderCrouch.veryHardLandingHeight', def = 10}, {flat = 'playerStateMachineLocomotion.ladderJump.veryHardLandingHeight', def = 10}, {flat = 'playerStateMachineLocomotion.slideFall.veryHardLandingHeight', def = 10}, {flat = 'playerStateMachineLocomotion.superheroFall.veryHardLandingHeight', def = 10}, {flat = 'playerStateMachineLocomotion.unsecureFootingFall.veryHardLandingHeight', def = 10}, {flat = 'playerStateMachineLocomotionLowGravity.dodgeAirLowGravity.veryHardLandingHeight', def = 72}, {flat = 'playerStateMachineLocomotionLowGravity.fallLowGravity.veryHardLandingHeight', def = 72}, {flat = 'playerStateMachineLocomotionLowGravity.jumpLowGravity.veryHardLandingHeight', def = 72}, {flat = 'playerStateMachineLocomotionLowGravity.sprintJumpLowGravity.veryHardLandingHeight', def = 72}, {flat = 'playerStateMachineLocomotionTakedown.grappleFall.veryHardLandingHeight', def = 10} } local death = {{flat = 'playerStateMachineBaseLocomotion.locomotionAir.deathLanding', def = 20}, {flat = 'playerStateMachineBaseLocomotionLowGravity.locomotionAirLowGravity.deathLanding', def = 100}, {flat = 'playerStateMachineBaseLocomotionTakedown.grappleAir.deathLanding', def = 16}, {flat = 'playerStateMachineBaseLocomotionTier3.locomotionAirTier3.deathLanding', def = 16}, {flat = 'playerStateMachineBaseLocomotionTier4.locomotionAirTier4.deathLanding', def = 16}, {flat = 'playerStateMachineBaseLocomotionTier5.locomotionAirTier5.deathLanding', def = 16}, {flat = 'playerStateMachineLocomotion.airHover.deathLanding', def = 20}, {flat = 'playerStateMachineLocomotion.airThrusters.deathLanding', def = 20}, {flat = 'playerStateMachineLocomotion.bodySlamJump.deathLanding', def = 20}, {flat = 'playerStateMachineLocomotion.chargeJump.deathLanding', def = 20}, {flat = 'playerStateMachineLocomotion.coolExitJump.deathLanding', def = 20}, {flat = 'playerStateMachineLocomotion.dodgeAir.deathLanding', def = 20}, {flat = 'playerStateMachineLocomotion.doubleJump.deathLanding', def = 20}, {flat = 'playerStateMachineLocomotion.fall.deathLanding', def = 20}, {flat = 'playerStateMachineLocomotion.hoverJump.deathLanding', def = 20}, {flat = 'playerStateMachineLocomotion.jump.deathLanding', def = 20}, {flat = 'playerStateMachineLocomotion.ladderCrouch.deathLanding', def = 20}, {flat = 'playerStateMachineLocomotion.ladderJump.deathLanding', def = 20}, {flat = 'playerStateMachineLocomotion.slideFall.deathLanding', def = 20}, {flat = 'playerStateMachineLocomotion.superheroFall.deathLanding', def = 20}, {flat = 'playerStateMachineLocomotion.unsecureFootingFall.deathLanding', def = 20}, {flat = 'playerStateMachineLocomotionLowGravity.dodgeAirLowGravity.deathLanding', def = 100}, {flat = 'playerStateMachineLocomotionLowGravity.fallLowGravity.deathLanding', def = 100}, {flat = 'playerStateMachineLocomotionLowGravity.jumpLowGravity.deathLanding', def = 100}, {flat = 'playerStateMachineLocomotionLowGravity.sprintJumpLowGravity.deathLanding', def = 100}, {flat = 'playerStateMachineLocomotionTakedown.grappleFall.deathLanding', def = 16} } local activeCheck = function() if get(death[1].flat) > death[1].def then return true else return false end end if noFallDamageToggle and not activeCheck() then for k,v in next, regular do set(regular[k].flat, regularNew) end for k,v in next, safe do set(safe[k].flat, safeNew) end for k,v in next, hard do set(hard[k].flat, hardNew) end for k,v in next, veryHard do set(veryHard[k].flat, veryHardNew) end for k,v in next, death do set(death[k].flat, deathNew) end local on_1, on_2 = 'NO FALL DAMAGE : ON', 'SAVE AND RELOAD TO MAKE IT WORK. [ F5 / F9 ]'; alert(on_1..'\n'..on_2) print(' \n\t-\t'..on_1..'\t->\t'..on_2..'\n ') elseif activeCheck() then for k,v in next, regular do set(regular[k].flat, regular[k].def) end for k,v in next, safe do set(safe[k].flat, safe[k].def) end for k,v in next, hard do set(hard[k].flat, hard[k].def) end for k,v in next, veryHard do set(veryHard[k].flat, veryHard[k].def) end for k,v in next, death do set(death[k].flat, death[k].def) end local off_1, off_2 = 'NO FALL DAMAGE : OFF', 'SAVE AND RELOAD TO DISABLE IT. [ F5 / F9 ]'; alert(off_1..'\n'..off_2) print(' \n\t-\t'..off_1..'\t->\t'..off_2..'\n ') end end toggleNoFallDamage()
切換無限二段跳(需裝備強化肌腱)(需存檔再讀檔) function infiniteJumpsToggle() local function hasTendonsCW() local howTo = '\t- YOU NEED TO HAVE ANY TIER OF "Reinforced Tendons" EQUIPPED IN THE LEGS CW ( double jump CW legs ).\n\t- EQUIP THEM FIRST, THEN RE-ENTER THE COMMAND.\n '; local P = Game.GetPlayer(); local SSC = Game.GetScriptableSystemsContainer(); local TS = Game.GetTransactionSystem(); local ES = SSC:Get('EquipmentSystem'); local PD = ES:GetPlayerData(P); local ID = PD:GetItemInEquipSlot(gamedataEquipmentArea['LegsCW'], 0); if ID.tdbid.hash == 0 then print(' \n\t** SCRIPT ABORTED ** YOU HAVE NO CYBERWARE IN THE LEGS CW SLOT.') print(howTo) return false else local itemdata = TS:GetItemData(P, ID); local TwID = TDBID.ToStringDEBUG(itemdata:GetID().id); if string.find(TwID, 'BoostedTendons') then return true else print(' \n\t** SCRIPT ABORTED **') print(howTo) return false end end end local function alert(msg) PreventionSystem.ShowMessage(msg, 8.0) end local function get(rec) local val = TweakDB:GetFlat(rec) return val end; local function set(rec, v) TweakDB:SetFlat(rec, v) end; local newMultiJumps = 5000; local multiJumpFlats = { {flat = 'playerStateMachineBaseLocomotion.locomotionAir.numberOfMultiJumps', def = 1}, {flat = 'playerStateMachineBaseLocomotionTakedown.grappleAir.numberOfMultiJumps', def = 1}, {flat = 'playerStateMachineBaseLocomotionTier3.locomotionAirTier3.numberOfMultiJumps', def = 1}, {flat = 'playerStateMachineBaseLocomotionTier4.locomotionAirTier4.numberOfMultiJumps', def = 1}, {flat = 'playerStateMachineBaseLocomotionTier5.locomotionAirTier5.numberOfMultiJumps', def = 1}, {flat = 'playerStateMachineLocomotion.airHover.numberOfMultiJumps', def = 1}, {flat = 'playerStateMachineLocomotion.airThrusters.numberOfMultiJumps', def = 1}, {flat = 'playerStateMachineLocomotion.bodySlamJump.numberOfMultiJumps', def = 1}, {flat = 'playerStateMachineLocomotion.chargeJump.numberOfMultiJumps', def = 1}, {flat = 'playerStateMachineLocomotion.coolExitJump.numberOfMultiJumps', def = 1}, {flat = 'playerStateMachineLocomotion.dodgeAir.numberOfMultiJumps', def = 1}, {flat = 'playerStateMachineLocomotion.fall.numberOfMultiJumps', def = 1}, {flat = 'playerStateMachineLocomotion.hoverJump.numberOfMultiJumps', def = 1}, {flat = 'playerStateMachineLocomotion.doubleJump.numberOfMultiJumps', def = 1}, {flat = 'playerStateMachineLocomotion.jump.numberOfMultiJumps', def = 1}, {flat = 'playerStateMachineLocomotion.ladderCrouch.numberOfMultiJumps', def = 1}, {flat = 'playerStateMachineLocomotion.ladderJump.numberOfMultiJumps', def = 1}, {flat = 'playerStateMachineLocomotion.slideFall.numberOfMultiJumps', def = 1}, {flat = 'playerStateMachineLocomotion.superheroFall.numberOfMultiJumps', def = 1}, {flat = 'playerStateMachineLocomotion.unsecureFootingFall.numberOfMultiJumps', def = 1}, {flat = 'playerStateMachineLocomotionTakedown.grappleFall.numberOfMultiJumps', def = 1} }; if get(multiJumpFlats[1].flat) == multiJumpFlats[1].def then if hasTendonsCW() then for k,v in next, multiJumpFlats do set(multiJumpFlats[k].flat, newMultiJumps) end local msg1, msg2, msg3, msg4 = 'TOGGLE - INFINITE JUMPS : ON', '- Unless you disable it, it will last for the entire game session.', '- If you remove "Reinforced Tendons" from legs CW, it won\'t work.', '- SAVE AND RELOAD TO MAKE IT WORK. [ F5 / F9 ]'; alert(msg1..'\t'..msg2..'\n'..msg3..'\n'..msg4) print(' \n\t'..msg1..'\n\t\t'..msg2..'\n\t\t'..msg3..'\n\t\t'..msg4..'\n ') end else for k,v in next, multiJumpFlats do set(multiJumpFlats[k].flat, multiJumpFlats[k].def) end local msg1, msg2, msg3 = 'TOGGLE - INFINITE JUMPS : OFF', '** WARNING **', '- SAVE AND RELOAD TO DISABLE IT. [ F5 / F9 ]'; alert(msg1..'\n'..msg2..'\n'..msg3) print(' \n\t'..msg1..'\n\t\t'..msg2..'\n\t\t'..msg3..'\n ') end end infiniteJumpsToggle()
切換裝備空氣推進器(在螢幕變灰時自動推進) nofall = "HasAirThrusters" SS = Game.GetStatsSystem() alert = function(msg) PreventionSystem.ShowMessage(msg, 5.0) end ModStatPl = function(ID, value) SS:AddModifier(Game.GetPlayer():GetEntityID(), RPGManager.CreateStatModifier(ID, gameStatModifierType.Additive, value)) end GetB = SS:GetStatBoolValue(Game.GetPlayer():GetEntityID(), nofall) if GetB == false then ModStatPl(nofall, 1.0) alert("HOLD DOWN THE JUMP BUTTON IN THE AIR WHILE FALLING") print(' - NO FALL DAMAGE: ON') else ModStatPl(nofall, -1.0) alert("NO FALL DAMAGE : OFF") print(' - NO FALL DAMAGE: OFF') end
切換不會進入戰鬥模式(關閉戰鬥狀態) SES = Game.GetStatusEffectSystem() if StatusEffectSystem.ObjectHasStatusEffect(GetPlayer(), TweakDBID("GameplayRestriction.NoCombat")) == false then SES:ApplyStatusEffect(GetPlayer():GetEntityID(), TweakDBID.new("GameplayRestriction.NoCombat"), GetPlayer():GetRecordID(), GetPlayer():GetEntityID()) print(" - NO ONE ATTACKS YOU: ON") else SES:RemoveStatusEffect(GetPlayer():GetEntityID(), TweakDBID.new("GameplayRestriction.NoCombat")) print(" - NO ONE ATTACKS YOU: OFF") end
移除該地區的攝像頭與炮塔 function disposeSecurityDevices() local function alert(msg) PreventionSystem.ShowMessage(msg, 4.0) end local ents = Game.GetEntityList(); local nCam, nTur = 0, 0; for i, v in ipairs(ents) do local name = v:GetClassName().value; if string.find(name, 'SurveillanceCamera') then if v:IsSurveillanceCamera() then nCam = nCam + 1; v:CutPower() v:TurnOffDevice() v:DeactivateDevice() v:Dispose() end elseif string.find(name, 'SecurityTurret') then if v:IsTurret() then nTur = nTur + 1; v:ShootStop() v:TurnOffDevice() v:Dispose() end end end local noCams = 'NO Surveillance Cameras found.'; local noTurs = 'NO Security Turrets found.'; local Cams = 'REMOVED '..nCam..' Surveillance Camera/s.'; local Turs = 'REMOVED '..nTur..' Security Turret/s.'; if nCam == 0 and nTur == 0 then alert(noCams..'\n'..noTurs) print(' \n\t'..noCams..'\n\t'..noTurs..'\n ') elseif nCam > 0 and nTur == 0 then alert(noTurs..'\n'..Cams) print(' \n\t'..Cams..'\n\t'..noTurs..'\n ') elseif nCam == 0 and nTur > 0 then alert(noCams..'\n'..Turs) print(' \n\t'..noCams..'\n\t'..Turs..'\n ') elseif nCam > 0 and nTur > 0 then alert(Cams..'\n'..Turs) print(' \n\t'..Cams..'\n\t'..Turs..'\n ') end end disposeSecurityDevices()
移除該地區的機器人機甲與無人機 function RemoveRobots() nAndro, nDrone, nMech = 0, 0, 0; local function alert(msg) PreventionSystem.ShowMessage(msg, 4.0) end local ents = Game.GetEntityList(); for i, robot in ipairs(ents) do local class = robot:ToString(); if class == 'NPCPuppet' then local andro = robot:IsAndroid(); local drone = robot:IsDrone(); local mech = robot:IsMech(); if andro or drone or mech then if andro then nAndro = nAndro + 1; elseif drone then nDrone = nDrone + 1; elseif mech then nMech = nMech + 1; end robot:Kill() robot:Dispose() end end end local msg, aMsg, dMsg, mMsg = 'ANDROIDS / MECHS / DRONES IN THE AREA', '[ '..nAndro..' ] ANDROID/s FOUND AND REMOVED.', '[ '..nDrone..' ] DRONE/s FOUND AND REMOVED.', '[ '..nMech..' ] MECH/s FOUND AND REMOVED.'; alert(msg..'\n'..aMsg..'\n'..dMsg..'\n'..mMsg) print(' \n\t'..msg..'\n\t\t'..aMsg..'\n\t\t'..dMsg..'\n\t\t'..mMsg..'\n ') end RemoveRobots()
移除該地區的地雷 function disposeMines() local function alert(msg) PreventionSystem.ShowMessage(msg, 4.0) end local ents = Game.GetEntityList(); local nMine, triggerMines = 0, false; for i, mine in ipairs(ents) do local name = mine:GetClassName().value; if string.find(name, 'ExplosiveTriggerDevice') then if triggerMines then nMine = nMine + 1; mine:StartExplosionPipeline(nil) mine:Explode(nil, nil) else nMine = nMine + 1; mine:TurnOffDevice() mine:Dispose() end end end if triggerMines then if nMine == 0 then local msg = 'NO MINES FOUND.'; alert(msg) print(' \n\t'..msg..'\n ') else local msg = 'TRIGGERED '..nMine..' MINE/s'; alert(msg) print(' \n\t'..msg..'\n ') end else if nMine == 0 then local msg = 'NO MINES FOUND.'; alert(msg) print(' \n\t'..msg..'\n ') else local msg = 'REMOVED '..nMine..' MINE/s.'; alert(msg) print(' \n\t'..msg..'\n ') end end end disposeMines()
通緝
切換不會被通緝 toggleCrime = function() local alert = function(txt) PreventionSystem.ShowMessage(txt, 3.5) end local PS = Game.GetScriptableSystemsContainer():Get("PreventionSystem"); local active, heatLvL = PS:IsSystemEnabled(), PS:GetHeatStageAsInt(); if active then if heatLvL ~= 0 then PS:ChangeHeatStage(EPreventionHeatStage.Heat_0, "") end PS:TogglePreventionSystem(false) alert("CRIMINAL SYSTEM : DISABLED\nCRIMES WILL BE IGNORED BY THE POLICE.") print(" - CRIMINAL SYSTEM : DISABLED\n ") else PS:TogglePreventionSystem(true) alert("CRIMINAL SYSTEM : ENABLED\nCRIMES WILL NOT BE IGNORED BY THE POLICE.") print(" - CRIMINAL SYSTEM : ENABLED\n ") end end toggleCrime() --old Game.PrevSys_off() Game.PrevSys_on()
解除通緝 local PS = Game.GetScriptableSystemsContainer():Get("PreventionSystem") PSHS = PS:GetHeatStageAsInt() if PSHS ~= 0 then PS:ChangeHeatStage(EPreventionHeatStage.Heat_0, "") PS:ChangeAgentsAttitude(BackUp) local msg = "HEAT LEVEL RESETTED."; PreventionSystem.ShowMessage(msg, 2.5) print(" - "..msg.."\n ") else PreventionSystem.ShowMessage("NO NEED TO RESET THE HEAT LEVEL", 2.5) end
切換通緝 toggleHeatLevel = function() local function alert(txt) PreventionSystem.ShowMessage(txt, 3.0) end msg = "TOGGLE HEAT LEVEL : "; local PS = Game.GetScriptableSystemsContainer():Get("PreventionSystem") PSHS = PS:GetHeatStageAsInt() if PSHS ~= 0 then PS:ChangeHeatStage(EPreventionHeatStage.Heat_0, "") PS:ChangeAgentsAttitude(BackUp) alert(msg.."OFF") print(" - "..msg.."OFF\n ") else PS:ChangeHeatStage(EPreventionHeatStage.Heat_5, "") alert(msg.."ON") print(" - "..msg.."ON\n ") end end toggleHeatLevel()
通緝等級+1 increaseHeatLevel = function() local alert = function(txt) PreventionSystem.ShowMessage(txt, 2.5) end local PS = Game.GetScriptableSystemsContainer():Get("PreventionSystem") PSHS, msg = PS:GetHeatStageAsInt(), "POLICE HEAT : "; if PSHS == 0 then PS:ChangeHeatStage(EPreventionHeatStage.Heat_1, "") alert(msg.."+1 (Level 1)") elseif PSHS == 1 then PS:ChangeHeatStage(EPreventionHeatStage.Heat_2, "") alert(msg.."+1 (Level 2)") elseif PSHS == 2 then PS:ChangeHeatStage(EPreventionHeatStage.Heat_3, "") alert(msg.."+1 (Level 3)") elseif PSHS == 3 then PS:ChangeHeatStage(EPreventionHeatStage.Heat_4, "") alert(msg.."+1 (Level 4)") elseif PSHS == 4 then PS:ChangeHeatStage(EPreventionHeatStage.Heat_5, "") alert(msg.."+1 (Level 5)") elseif PSHS == 5 then alert(msg.."MAX (Level 5)") end end increaseHeatLevel() print(" - INCREASING HEAT LEVEL...\n ")
時間
切換日夜 dayH = 10; nightH = 22; TiSy = Game.GetTimeSystem(); H = TiSy:GetGameTime():Hours(); if H > 19 then TiSy:SetGameTimeByHMS(dayH, 0, 0) print(" - TIME SETTED TO "..dayH.." AM [ "..dayH..":00 ]\n ") else TiSy:SetGameTimeByHMS(nightH, 0, 0) print(" - TIME SETTED TO ".. (nightH - 12) .." PM [ "..nightH..":00 ]\n ") end
切換凍結時鐘 TiSy = Game.GetTimeSystem(); if TiSy:IsPausedState() then TiSy:SetPausedState(false, '') print(" - TOGGLE FREEZE CLOCK: OFF") else TiSy:SetPausedState(true, '') print(" - TOGGLE FREEZE CLOCK: ON") end
設定時間上午10點 Hour = 10; Minute = 0; Seconds = 0; Game.GetTimeSystem():SetGameTimeByHMS(Hour, Minute, Seconds)
特殊
任意地點打開貯藏處 getStash = function() stash_ID = NewObject('entEntityID') stash_ID.hash = 16570246047455160070ULL return Game.FindEntityByID(stash_ID) end local ok = getStash() if ok then local openEvent = NewObject('handle:OpenStash') openEvent:SetProperties() ok:OnOpenStash(openEvent) end
打開快速傳送選單 UIS = Game.GetUISystem() UIS:RequestFastTravelMenu()
切換門的狀態(打開或關閉) function toggleDoor() local P = Game.GetPlayer(); local msg = function(text) PreventionSystem.ShowMessage(text, 4.0) end local TSLO = Game.GetTargetingSystem():GetLookAtObject(P, false, false); if TSLO == nil then msg('LOOK AT THE DOOR FIRST\nDOOR NOT RECOGNIZED.') return else local Door = TSLO:ToString(); if Door == 'Door' then local DoorPS = TSLO:GetDevicePS(); local DoorProps = DoorPS.doorProperties; local DoorState = TSLO.isVisuallyOpened; if tostring(DoorProps.doorType.value) == 'AUTOMATIC' then DoorPS:SetCloseItself(true) end if DoorState then msg('OPEN DOOR DETECTED, CLOSING!"') TSLO:CloseDoor() else msg('CLOSED DOOR DETECTED, OPENING! \nIF IT IS STILL CLOSED USE THE COMMAND : \n"FORCE OPEN THE DOOR / FAKE DOOR"') TSLO:OpenDoor() DoorPS:ExecuteForceOpen(P) end elseif Door == 'FakeDoor' then msg('FAKE DOOR DETECTED, USE THE COMMAND\n"FORCE OPEN THE DOOR / FAKE DOOR"') elseif Door ~= 'Door' and Door ~= 'FakeDoor' then msg('LOOK AT THE DOOR FIRST\nDOOR NOT RECOGNIZED.') end end TSLO = nil; end toggleDoor()
強制打開不能開的門 function destroyDoor() local P = Game.GetPlayer(); local msg = function(text) PreventionSystem.ShowMessage(text, 4.0) end local TSLO = Game.GetTargetingSystem():GetLookAtObject(P, false, false); if TSLO == nil then msg('LOOK AT THE DOOR FIRST\nDOOR NOT RECOGNIZED.') return else local Door = TSLO:ToString(); if Door == 'Door' or Door == 'FakeDoor' then TSLO:Dispose() msg('GET LOST STUPID DOOR!"') elseif Door ~= 'Door' and D ~= 'FakeDoor' then msg('LOOK AT THE DOOR FIRST\nDOOR NOT RECOGNIZED.') end end TSLO = nil; end destroyDoor()
修復車輛 fixVehicle = function() alert = function(vehType, msg) PreventionSystem.ShowMessage(vehType.." "..msg, 4.0) end if not Game.GetWorkspotSystem():IsActorInWorkspot(Game.GetPlayer()) then alert('', ' You\'re not in a vehicle !') else Fix = Game['GetMountedVehicle;GameObject'](Game.GetPlayer()); if Fix then GVPS = Fix:GetVehiclePS(); GVC = Fix:GetVehicleComponent(); currVehName = Fix:GetDisplayName(); currVehType = Fix:GetVehicleType().value; GVC.damageLevel = 0; if currVehType ~= "Bike" then GVC.bumperFrontState, GVC.bumperBackState = 0, 0; for k, partState in next, {'hood_destruction', 'wheel_f_l_destruction', 'wheel_f_r_destruction', 'bumper_b_destruction', 'bumper_f_destruction', 'door_f_l_destruction', 'door_f_r_destruction', 'trunk_destruction', 'bumper_b_destruction_side_2', 'bumper_f_destruction_side_2'} do AnimationControllerComponent.SetInputFloat(Fix, partState, 0.0) end end flatTires = Fix:GetFlatTireIndex(); if flatTires >= 0 then for i, v in next, {0,1,2,3} do Fix:ToggleBrokenTire(v, false) end end Fix:DestructionResetGrid() Fix:DestructionResetGlass() GVC:UpdateDamageEngineEffects() GVC:RepairVehicle() GVC:VehicleVisualDestructionSetup() GVPS:CloseAllVehDoors(true) GVPS:CloseAllVehWindows() GVPS:ForcePersistentStateChanged() alert(currVehName.." \n"..currVehType, " Fixed !") end end end fixVehicle()
隨機化NPC外觀 function randomizeAppearance() local function alert(msg, secs) if not secs then secs = 4.0; end PreventionSystem.ShowMessage(msg, secs) end local TSLO = Game.GetTargetingSystem():GetLookAtObject(Game.GetPlayer(), false, false) if TSLO == nil then alert('LOOK AT THE NPC FIRST', 1.5) return else local ent = Game.FindEntityByID(TSLO:GetEntityID()); local function setEntity() firstAppName = tostring(ent:GetCurrentAppearanceName().value); entHash = tostring(ent:GetEntityID():GetHash()); return firstAppName, entHash end if TSLO:ToString() == 'NPCPuppet' then local charaName = Game.GetLocalizedTextByKey(TDB.GetLocKey(TSLO:GetRecordID()..'.displayName')); if charaName == '' then charaName = 'Generic NPC' end if entHash and tostring(ent:GetEntityID():GetHash()) == entHash then newEntity = false; else setEntity() newEntity = true; end if newEntity == true then ent:ScheduleAppearanceChange('') alert(charaName..'\nAppearance Randomized.') else if tostring(ent:GetCurrentAppearanceName().value) == '' then ent:ScheduleAppearanceChange(firstAppName) else ent:ScheduleAppearanceChange('') end alert(charaName..'\nAPPEARANCE RANDOMIZED.') end elseif TSLO:ToString() == 'gameObject' then ent:ScheduleAppearanceChange('') alert('ENTITY FOUND ( NOT AS NPC )\nTRYING TO RANDOMIZE APPEARANCE . . .') else alert(TSLO:ToString()..' \nTHIS IS NOT A NPC.', 1.5) end end end randomizeAppearance()
調整FOV(從65到115) cam = Game.GetPlayer():GetFPPCameraComponent(); fov = cam:GetFOV(); cam:SetZoom(0.0) if fov <= 66.0 then cam:SetFOV(70.0) print(" - FOV Setted: 70") elseif fov <= 71.0 then cam:SetFOV(75.0) print(" - FOV Setted: 75") elseif fov <= 76.0 then cam:SetFOV(80.0) print(" - FOV Setted: 80") elseif fov <= 81.0 then cam:SetFOV(85.0) print(" - FOV Setted: 85") elseif fov <= 86.0 then cam:SetFOV(90.0) print(" - FOV Setted: 90") elseif fov <= 91.0 then cam:SetFOV(95.0) print(" - FOV Setted: 95") elseif fov <= 96.0 then cam:SetFOV(100.0) print(" - FOV Setted: 100") elseif fov <= 101.0 then cam:SetFOV(105.0) print(" - FOV Setted: 105") elseif fov <= 106.0 then cam:SetFOV(110.0) print(" - FOV Setted: 110") elseif fov <= 111.0 then cam:SetFOV(115.0) print(" - FOV Setted: 115") elseif fov >= 114.0 then cam:SetFOV(65.0) print(" - FOV Setted: 65") end
結束當前任務 JM = Game.GetJournalManager() TrEn = JM:GetTrackedEntry() QueEn = JM:GetParentEntry(JM:GetParentEntry(TrEn)) QueEnHash = JM:GetEntryHash(QueEn) JM:ChangeEntryStateByHash(QueEnHash, "Succeeded", "Notify")
刪除感歎號(僅裝備的物品) P = Game.GetPlayer(); ES = Game.GetScriptableSystemsContainer():Get(CName.new('EquipmentSystem')); TS = Game.GetTransactionSystem(); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; local slots = { Face = 1, Feet = 1, Head = 1, InnerChest = 1, Legs = 1, OuterChest = 1, Outfit = 1, Weapon = 3 }; for k,v in pairs(slots) do for i=1,v do itemID = PD:GetItemInEquipSlot2(k, i - 1); print(' \nChecking... [' ..k..' - Slot: '..(i - 1)..']') if itemID.tdbid.hash ~= 0 then itemdata = TS:GetItemData(P, itemID); print(' - Item found in ['..k..' - Slot: '..(i - 1)..']') if itemdata:HasTag('Quest') then itemdata:RemoveDynamicTag('Quest') print(' - QUEST TAG FOUND, REMOVING TAG FROM -> ['..k..' - Slot '..(i - 1)..']') else print(' - Quest TAG not present or not accessible.') end else print(' - The Slot is empty...') end end end
獲取所有藏匿牆武器 msg = "STASH WALL WEAPONS ADDED !"; W1 = {"mq007_skippy", "w_melee_Boss_hammer" }; W2 = { "Ajax_Moron_Legendary", "Burya_Comrade_Legendary", "Butchers_Knife_Iconic_Legendary", "Carnage_Mox_Legendary", "Copperhead_Genesis_Legendary", "Dian_Yinglong", "Grad_Panam_Legendary", "Igla_Sovereign_Legendary", "Katana_Saburo_Legendary", "Katana_Takemura_Legendary", "Katana_Wakako_Legendary", "Lexington_Shooting_Competition", "Lexington_Wilson_Legendary", "Liberty_Dex_Legendary", "Liberty_Padre_Legendary", "Nekomata_Breakthrough_Legendary", "Neurotoxin_Knife_Iconic_Legendary", "Nue_Jackie_Legendary", "Overture_Kerry_Legendary", "Overture_River_Legendary", "Pulsar_Buzzsaw_Legendary", "Punk_Knife_Iconic_Legendary", "Silverhand_3516", "Tactician_Dino_Legendary","Tactician_Headsman_Legendary", "Tanto_Saburo", "Katana_E3", "Zhuo_Eight_Star" }; for i, weap in next, W1 do Game.AddToInventory("Items."..weap, 1) end for i, weap in next, W2 do Game.AddToInventory("Items.Preset_"..weap, 1) end PreventionSystem.ShowMessage(msg, 8.0)
將所有衣服添加到衣櫃中 local count = 0; clothes = TweakDB:GetRecords('gamedataClothing_Record'); for _, item in ipairs(clothes) do WA = Game.GetWardrobeSystem(); itemID = item:GetID(); itemTDBID = TDBID.ToStringDEBUG(itemID); locName = Game.GetLocalizedTextByKey(TDB.GetLocKey(item:GetID() .. '.displayName')); PlaGend = Game.GetPlayer():GetResolvedGenderName().value; errMsg1 = " - Broken / Invalid ID"; errMsg2 = " found, skipping -> "..itemTDBID..' - '..locName; local check = function(txt) if string.find(itemTDBID, txt) then return true end end if check('Test') or check('_EP1') or check('sq030_diving_suit') or check ('Q203_folded_jacket') or check('q005_militech_') or check('gle_03_johnny') or check('q203_pants') or check('Items.sp0') or check('leggins0302') or check('sq032_dogtags') or check('Q203_Spacesuit_Helmet') or check('TightJumpsuit_01_test') or check('Proficiency_TightJumpsuit') then print(errMsg1..errMsg2) elseif locName == '' or locName == 'Retrothrusters (from Rogue)' then print(errMsg1..errMsg2) elseif check('Hat_05_old_04') and PlaGend == 'Male' then print(errMsg1.." for MALE character"..errMsg2) elseif check('Hat_06_basic_05') and PlaGend == 'Male' then print(errMsg1.." for MALE character"..errMsg2) elseif WA:IsItemBlacklisted(ItemID.new(itemID)) then print(" - Blacklisted ID"..errMsg2) else count = count + 1; WA:StoreUniqueItemIDAndMarkNew(ItemID.new(TweakDBID.new(itemTDBID))) print(count.." - ADDED -> "..locName.." - "..itemTDBID) end end print(' \n - [ '..count..' ] CLOTHES ADDED! \n ')
獲取並裝備隨機衣服 PlayerDevelopmentSystem.GetInstance(Game.GetPlayer()):GetDevelopmentData(Game.GetPlayer()):RandomizeClothing()
切換強尼的機械手 arm = "Items.PlayerSilverhandArm"; armID = ItemID.FromTDBID(arm); P = Game.GetPlayer(); TS = Game.GetTransactionSystem(); SSC = Game.GetScriptableSystemsContainer(); ESPD = SSC:Get('EquipmentSystem'):GetPlayerData(P); armInInv = TS:GetItemQuantity(P, armID); armInSlot = TDBID.ToStringDEBUG(ESPD:GetItemInEquipSlot(34, 0).id); if armInSlot ~= arm then if armInInv == 0 then TS:GiveItem(P, armID, 1) elseif armInInv > 1 then TS:GiveItem(P, armID, 1-armInInv) end ESPD:EquipItem(ItemID.FromTDBID(arm)) print(" - JOHNNY SILVERHAND ARM: ON") elseif armInSlot == arm then ESPD:UnequipItem(armID) TS:GiveItem(P, armID, -armInInv) print(" - JOHNNY SILVERHAND ARM: OFF") end
切換強尼的UI JohnnyColors = not JohnnyColors if JohnnyColors then Game.GetUISystem():SetGlobalThemeOverride("Possessed") print(' - JOHNNY HUD COLORS: ON') else Game.GetUISystem():ClearGlobalThemeOverride() print(' - JOHNNY HUD COLORS: OFF') end
切換設備 function ToggleDevices() local showMsg = function(txt) PreventionSystem.ShowMessage(txt, 4.0) end local PER = Game.GetPersistencySystem() local TTLO = Game.GetTargetingSystem():GetLookAtObject(Game.GetPlayer(), false, false) if TTLO == nil then showMsg("YOU NEED TO LOOK AT THE DEVICE") return end local object = TTLO:ToString() if TTLO:IsDevice() then if object == 'Door' then showMsg(object.." DETECTED.\nUSE TOGGLE DOOR STATUS COMMAND") elseif object == 'FakeDoor' then showMsg(object.." DETECTED.\nUSE TOGGLE DOOR STATUS COMMAND") elseif object ~= 'gameObject' then local PS = TTLO:GetDevicePS(); local toggle = PS:ActionToggleON(); PER:QueuePSDeviceEvent(toggle) showMsg(object.." DETECTED.\nTOGGLED...") end else showMsg(object.." DETECTED.\nCAN'T BE TOGGLED") end end ToggleDevices()
切換輕鬆贏得蘿卜衝刺遊戲(吃個蘋果加1000分) function toggleEZRoach() local function get(record) local val = TweakDB:GetFlat("RoachRace."..record) return val end; local function set(record, value) TweakDB:SetFlat("RoachRace."..record, value) end; AppleScore, DefAppScore = "Apple.score", 20.0; AppleProb, DefAppProb = "Apple.probability", 0.65; if get(AppleScore) <= 21.0 then set(AppleScore, 1000) set(AppleProb, 8.0) print(" \n\t TOGGLE - EASY WIN ROACH RACE : ON\t ( apples taken will add 1000 points, spawn probability has also been increased ) \n\t If you're already inside the minigame, exit and re-enter to see the changes. \n ") else set(AppleScore, DefAppScore) set(AppleProb, DefAppProb) print(" \n\t TOGGLE - EASY WIN ROACH RACE : OFF\t ( all values restored to default ) \n\t If you're already inside the minigame, exit and re-enter to see the changes. \n ") end end toggleEZRoach()
切換輕鬆贏得創傷小組遊戲(20條命,擊殺多加5萬分) function toggleEZTraumaDrama() local function get(record) local val = TweakDB:GetFlat("Shooter."..record) return val end; local function set(record, value) TweakDB:SetFlat("Shooter."..record, value) end; local MaxHealt = "DefaultPlayerControllerData.maxHealth"; local DefMaxHealt = 4.0; local WeapScore = "DefaultRange.score"; local DefWeapScore = 0.0; if get(MaxHealt) <= DefMaxHealt then set(MaxHealt, 20.0) set(WeapScore, 50000.0) print(" \n\t TOGGLE - EASY WIN TRAUMA DRAMA : ON\t ( 50.000 points per kill + Maximum health set at 20 ) \n\t If you're already inside the minigame, exit and re-enter to see the changes. \n ") else set(MaxHealt, DefMaxHealt) set(WeapScore, DefWeapScore) print(" \n\t TOGGLE - EASY WIN TRAUMA DRAMA : OFF\t ( all values restored to default ) \n\t If you're already inside the minigame, exit and re-enter to see the changes. \n ") end end toggleEZTraumaDrama()
切換輕鬆贏得荒阪塔小遊戲(一擊必殺)(使用切換上帝模式程式碼可不掉血) function toggleEZArasakaTower3D() local function get(record) local val = TweakDB:GetFlat(record) return val end; local function set(record, value) TweakDB:SetFlat(record, value) end; local DPS, defDPS = 'Items.Base_Arasaka3D_Gun_inline2.value', 40.0; if get(DPS) <= defDPS then set(DPS, 1000) print(' \n\t TOGGLE - EASY WIN ARASAKA TOWER 3D : ON\t ( One Hit Kill )\n\tYou need to save and reload to see the changes.\n ') else set(DPS, defDPS) print(' \n\t TOGGLE - EASY WIN ARASAKA TOWER 3D : OFF\t ( Values restored to default )\n\tYou need to save and reload to see the changes.\n ') end end toggleEZArasakaTower3D()
遊戲玩法
殘血立即回血(再次輸入就可啟用,重啟遊戲就失效) if AutoHealUserWarned then if AutoHealActive then print(" \n\t AUTO-HEAL ON HEALTH DECREASE : ALREADY ACTIVE \n ") return end Observe('PlayerPuppet', 'UpdateHealthStateVFX', function() local P = Game.GetPlayer(); P:Revive(100.0) AutoHealActive = true; end) activateMsg = "ENABLED : AUTO-HEAL ON HEALTH DECREASE"; print(" \n\t "..activateMsg.." \n ") PreventionSystem.ShowMessage(activateMsg, 5.0) end if not AutoHealUserWarned then Msg1, Msg2, Msg3 = "<<< WARNING >>>", "This mode will not be deactivated until the game is restarted ( unless you hit \"Reload all Mods\" in CET overlay ).", "TO ENABLE IT, RE-ENTER THE COMMAND ONCE MORE."; warnMsg = Msg1.." \n"..Msg2.." \n"..Msg3; print(" \n\t "..Msg1.." \n\t "..Msg2.." \n\t "..Msg3.." \n ") PreventionSystem.ShowMessage(warnMsg, 12.0) AutoHealUserWarned = true; end
切換二段跳 v1,On,Off = "HasDoubleJump", " - TOGGLE DOUBLE JUMP: ON", " - TOGGLE DOUBLE JUMP: OFF" SS = Game.GetStatsSystem() CurrentVal = SS:GetStatValue(GetPlayer():GetEntityID(), v1) ModStPl = function(ID, value) SS:AddModifier(Game.GetPlayer():GetEntityID(), RPGManager.CreateStatModifier(ID, gameStatModifierType.Additive, value)) end result = 1.0 - CurrentVal if CurrentVal == 0 then ModStPl(v1, 1) print(On) elseif CurrentVal == 1 then ModStPl(v1, -1) print(Off) end print(v1..": ", SS:GetStatValue(GetPlayer():GetEntityID(), v1))
切換浮空跳 v1,On,Off = "HasAirHover", " - TOGGLE AIR HOVER: ON", " - TOGGLE AIR HOVER: OFF" SS = Game.GetStatsSystem() CurrentVal = SS:GetStatValue(GetPlayer():GetEntityID(), v1) ModStPl = function(ID, value) SS:AddModifier(Game.GetPlayer():GetEntityID(), RPGManager.CreateStatModifier(ID, gameStatModifierType.Additive, value)) end result = 1.0 - CurrentVal if CurrentVal == 0 then ModStPl(v1, 1) print(On) elseif CurrentVal == 1 then ModStPl(v1, -1) print(Off) end print(v1..": ", SS:GetStatValue(GetPlayer():GetEntityID(), v1))
切換蓄力跳 v4,On,Off = "HasChargeJump", " - TOGGLE CHARGED JUMP: ON", " - TOGGLE CHARGED JUMP: OFF" SS = Game.GetStatsSystem() CurrentVal = SS:GetStatValue(GetPlayer():GetEntityID(), v4) ModStPl = function(ID, value) SS:AddModifier(Game.GetPlayer():GetEntityID(), RPGManager.CreateStatModifier(ID, gameStatModifierType.Additive, value)) end result = 1.0 - CurrentVal if CurrentVal == 0 then ModStPl(v4, 1) print(On) elseif CurrentVal == 1 then ModStPl(v4, -1) print(Off) end print(v4..": ", SS:GetStatValue(GetPlayer():GetEntityID(), v4))
切換空中躲閃 v5,On,Off = "HasDodgeAir", " - TOGGLE AIR DODGE: ON", " - TOGGLE AIR DODGE: OFF" SS = Game.GetStatsSystem() CurrentVal = SS:GetStatValue(GetPlayer():GetEntityID(), v5) ModStPl = function(ID, value) SS:AddModifier(Game.GetPlayer():GetEntityID(), RPGManager.CreateStatModifier(ID, gameStatModifierType.Additive, value)) end result = 1.0 - CurrentVal if CurrentVal == 0 then ModStPl(v5, 1) print(On) elseif CurrentVal == 1 then ModStPl(v5, -1) print(Off) end print(v5..": ", SS:GetStatValue(GetPlayer():GetEntityID(), v5))
切換墜落傷害最大減免 v6,On,Off = "FallDamageReduction", " - TOGGLE MAX FALL DAMAGE REDUCTION: ON", " - TOGGLE MAX FALL DAMAGE REDUCTION: OFF" SS = Game.GetStatsSystem() CurrentVal = SS:GetStatValue(GetPlayer():GetEntityID(), v6) ModStPl = function(ID, value) SS:AddModifier(Game.GetPlayer():GetEntityID(), RPGManager.CreateStatModifier(ID, gameStatModifierType.Additive, value)) end result = 1.0 - CurrentVal if CurrentVal == 0 then ModStPl(v6, 1) print(On) elseif CurrentVal == 1 then ModStPl(v6, -1) print(Off) end print(v6..": ", SS:GetStatValue(GetPlayer():GetEntityID(), v6))
切換英雄著陸 v7,On,Off = "HasSuperheroFall", " - TOGGLE BERSERK LANDING: ON", " - TOGGLE BERSERK LANDING: OFF" SS = Game.GetStatsSystem() CurrentVal = SS:GetStatValue(GetPlayer():GetEntityID(), v7) ModStPl = function(ID, value) SS:AddModifier(Game.GetPlayer():GetEntityID(), RPGManager.CreateStatModifier(ID, gameStatModifierType.Additive, value)) end result = 1.0 - CurrentVal if CurrentVal == 0 then ModStPl(v7, 1) print(On) elseif CurrentVal == 1 then ModStPl(v7, -1) print(Off) end print(v7..": ", SS:GetStatValue(GetPlayer():GetEntityID(), v7))
切換無超重懲罰 v8,Msg = "BaseStatusEffect.Encumbered", " - NO RESTRICTION OF MOVEMENT FOR OVERWEIGHT: "; On,Nul = Msg.."ENABLED", Msg.."NO NEED TO ACTIVATE"; SES = Game.GetStatusEffectSystem() if SES:HasStatusEffect(Game.GetPlayer():GetEntityID(), v8) == true then SES:RemoveStatusEffect(Game.GetPlayer():GetEntityID(), v8) print(On) else print(Nul) end
強制治療玩家(瞬間回滿血)Game.GetPlayer():Revive(100.0)
瞬間殺死所看的NPC alert = function(msg) PreventionSystem.ShowMessage(msg, 5.0) end TTLO = Game.GetTargetingSystem():GetLookAtObject(Game.GetPlayer(), false, false) if TTLO == nil or TTLO:ToString() ~= "NPCPuppet" then alert("LOOK AT THE NPC FIRST") elseif TTLO:ToString() == "NPCPuppet" then Game.GetStatusEffectSystem():ApplyStatusEffect(TTLO:GetEntityID(), "BaseStatusEffect.ForceKill") alert("Bye Bye...") end
開啟時緩 TDA = Game.GetTimeSystem():IsTimeDilationActive() if TDA == false then TS:SetTimeDilation(CName.new(), 0.4) print(" - SLOW MOTION: ON") end --Game.Slowmo()
關閉時緩 TDA = Game.GetTimeSystem():IsTimeDilationActive() if TDA == false then TS:SetTimeDilation(CName.new(), 1.0) print(" - SLOW MOTION: OFF") end --Game.Noslowmo()
時緩30%持續10s speed = 0.3; expireSecs = 10; GetPlayer():SetSlowMo(speed, expireSecs)
臨時屬性
切換無限負重 effect = "CarryCapacity" ModStatPlayer = function(ID, value) Game.GetStatsSystem():AddModifier(Game.GetPlayer():GetEntityID(), RPGManager.CreateStatModifier(ID, gameStatModifierType.Additive, value)) end if Game.GetStatsSystem():GetStatValue(GetPlayer():GetEntityID(), gamedataStatType.CarryCapacity) >= 49000 then ModStatPlayer(effect, -50000) print(" - INFINITE CARRY CAPACITY: OFF") else ModStatPlayer(effect, 50000) print(" - INFINITE CARRY CAPACITY: ON") end
開無限耐力 stat = "Stamina"; ModStatPlayer = function(ID, value) Game.GetStatsSystem():AddModifier(Game.GetPlayer():GetEntityID(), RPGManager.CreateStatModifier(ID, gameStatModifierType.Additive, value)) end if Game.GetStatsSystem():GetStatValue(GetPlayer():GetEntityID(), stat) <= 5000 then ModStatPlayer(stat, 90000) print(" - INFINITE STAMINA: ON") else print(" - INFINITE STAMINA: ALREADY ACTIVE")
關無限耐力 stat = "Stamina"; ModStatPlayer = function(ID, value) Game.GetStatsSystem():AddModifier(Game.GetPlayer():GetEntityID(), RPGManager.CreateStatModifier(ID, gameStatModifierType.Additive, value)) end if Game.GetStatsSystem():GetStatValue(GetPlayer():GetEntityID(), stat) >= 89000 then ModStatPlayer(stat, -90000) print(" - INFINITE STAMINA: OFF") else print(" - INFINITE STAMINA: NO NEED TO DEACTIVATE")
水下無限氧氣 newStat = "CanBreatheUnderwater"; newValue = 1; ModStatPla = function(stat, value) PlaEnt = Game.GetPlayer():GetEntityID(); SS = Game.GetStatsSystem(); print(" - Current "..stat.." value: "..SS:GetStatValue(PlaEnt, stat).." \n - Added: "..value.." \n ") SS:AddModifier(PlaEnt, RPGManager.CreateStatModifier(stat, gameStatModifierType.Additive, value)) end if SS:GetStatValue(PlaEnt, newStat) == 1 then print(" - "..newStat.." ALREADY ACTIVATED. \n ") else ModStatPla(newStat, newValue) end;
加10%暴擊率 ModStatPla = function(stat, value) PlaEnt = Game.GetPlayer():GetEntityID(); SS = Game.GetStatsSystem(); print(" - Current "..stat.." value: "..SS:GetStatValue(PlaEnt, stat).." \n - Added: "..value.." \n ") SS:AddModifier(PlaEnt, RPGManager.CreateStatModifier(stat, gameStatModifierType.Additive, value)) end for i, v in pairs { "CritChance", "CritChanceTimeCritDamage" } do ModStatPla(v, 10.0) end;
加30%生命恢複速率 ModStatPla = function(stat, value) PlaEnt = Game.GetPlayer():GetEntityID(); SS = Game.GetStatsSystem(); print(" - Current "..stat.." value: "..SS:GetStatValue(PlaEnt, stat).." \n - Added: "..value.." \n ") SS:AddModifier(PlaEnt, RPGManager.CreateStatModifier(stat, gameStatModifierType.Additive, value)) end ModStatPla("HealthInCombatRegenRateMult", 30) ModStatPla("HealthOutOfCombatRegenRateMult", 30)
加30%耐力恢複速率 ModStatPla = function(stat, value) PlaEnt = Game.GetPlayer():GetEntityID(); SS = Game.GetStatsSystem(); print(" - Current "..stat.." value: "..SS:GetStatValue(PlaEnt, stat).." \n - Added: "..value.." \n ") SS:AddModifier(PlaEnt, RPGManager.CreateStatModifier(stat, gameStatModifierType.Additive, value)) end ModStatPla("StaminaRegenRateMult", 30) ModStatPla("StaminaRegenStartDelay", -10)
加30%RAM恢複速率 ModStatPla = function(stat, value) PlaEnt = Game.GetPlayer():GetEntityID(); SS = Game.GetStatsSystem(); print(" - Current "..stat.." value: "..SS:GetStatValue(PlaEnt, stat).." \n - Added: "..value.." \n ") SS:AddModifier(PlaEnt, RPGManager.CreateStatModifier(stat, gameStatModifierType.Additive, value)) end ModStatPla("MemoryInCombatRegenRateMult", 30) ModStatPla("MemoryOutOfCombatRegenRateMult", 30)
加100最大生命 newStat = "Health"; newValue = 100; ModStatPla = function(stat, value) PlaEnt = Game.GetPlayer():GetEntityID(); SS = Game.GetStatsSystem(); print(" - Current "..stat.." value: "..SS:GetStatValue(PlaEnt, stat).." \n - Added: "..value.." \n ") SS:AddModifier(PlaEnt, RPGManager.CreateStatModifier(stat, gameStatModifierType.Additive, value)) end ModStatPla(newStat, newValue)
加100最大護甲 newStat = "Armor"; newValue = 100; ModStatPla = function(stat, value) PlaEnt = Game.GetPlayer():GetEntityID(); SS = Game.GetStatsSystem(); print(" - Current "..stat.." value: "..SS:GetStatValue(PlaEnt, stat).." \n - Added: "..value.." \n ") SS:AddModifier(PlaEnt, RPGManager.CreateStatModifier(stat, gameStatModifierType.Additive, value)) end ModStatPla(newStat, newValue)
加100最大耐力 newStat = "Stamina"; newValue = 100; ModStatPla = function(stat, value) PlaEnt = Game.GetPlayer():GetEntityID(); SS = Game.GetStatsSystem(); print(" - Current "..stat.." value: "..SS:GetStatValue(PlaEnt, stat).." \n - Added: "..value.." \n ") SS:AddModifier(PlaEnt, RPGManager.CreateStatModifier(stat, gameStatModifierType.Additive, value)) end ModStatPla(newStat, newValue)
加100義體容量 newStat = "Humanity"; newValue = 100; ModStatPla = function(stat, value) PlaEnt = Game.GetPlayer():GetEntityID(); SS = Game.GetStatsSystem(); print(" - Current "..stat.." value: "..SS:GetStatValue(PlaEnt, stat).." \n - Added: "..value.." \n ") SS:AddModifier(PlaEnt, RPGManager.CreateStatModifier(stat, gameStatModifierType.Additive, value)) end ModStatPla(newStat, newValue)
加100最大氧氣 newStat = "Oxygen"; newValue = 100; ModStatPla = function(stat, value) PlaEnt = Game.GetPlayer():GetEntityID(); SS = Game.GetStatsSystem(); print(" - Current "..stat.." value: "..SS:GetStatValue(PlaEnt, stat).." \n - Added: "..value.." \n ") SS:AddModifier(PlaEnt, RPGManager.CreateStatModifier(stat, gameStatModifierType.Additive, value)) end ModStatPla(newStat, newValue)
加100%最大暴擊傷害 newStat = "CritDamage"; newValue = 100; ModStatPla = function(stat, value) PlaEnt = Game.GetPlayer():GetEntityID(); SS = Game.GetStatsSystem(); print(" - Current "..stat.." value: "..SS:GetStatValue(PlaEnt, stat).." \n - Added: "..value.." \n ") SS:AddModifier(PlaEnt, RPGManager.CreateStatModifier(stat, gameStatModifierType.Additive, value)) end ModStatPla(newStat, newValue)
加100最大負重 newStat = "CarryCapacity"; newValue = 100; ModStatPla = function(stat, value) PlaEnt = Game.GetPlayer():GetEntityID(); SS = Game.GetStatsSystem(); print(" - Current "..stat.." value: "..SS:GetStatValue(PlaEnt, stat).." \n - Added: "..value.." \n ") SS:AddModifier(PlaEnt, RPGManager.CreateStatModifier(stat, gameStatModifierType.Additive, value)) end ModStatPla(newStat, newValue)
加5最大RAM newStat = "Memory"; newValue = 5; ModStatPla = function(stat, value) PlaEnt = Game.GetPlayer():GetEntityID(); SS = Game.GetStatsSystem(); print(" - Current "..stat.." value: "..SS:GetStatValue(PlaEnt, stat).." \n - Added: "..value.." \n ") SS:AddModifier(PlaEnt, RPGManager.CreateStatModifier(stat, gameStatModifierType.Additive, value)) end ModStatPla(newStat, newValue)
加5移動速度 newStat = "MaxSpeed"; newValue = 5; ModStatPla = function(stat, value) PlaEnt = Game.GetPlayer():GetEntityID(); SS = Game.GetStatsSystem(); print(" - Current "..stat.." value: "..SS:GetStatValue(PlaEnt, stat).." \n - Added: "..value.." \n ") SS:AddModifier(PlaEnt, RPGManager.CreateStatModifier(stat, gameStatModifierType.Additive, value)) end ModStatPla(newStat, newValue)
加5最大入侵協議緩衝區數量 newStat = "BufferSize"; newValue = 5; ModStatPla = function(stat, value) PlaEnt = Game.GetPlayer():GetEntityID(); SS = Game.GetStatsSystem(); print(" - Current "..stat.." value: "..SS:GetStatValue(PlaEnt, stat).." \n - Added: "..value.." \n ") SS:AddModifier(PlaEnt, RPGManager.CreateStatModifier(stat, gameStatModifierType.Additive, value)) end ModStatPla(newStat, newValue)
狀態
開啟所有Buff for i, v in next, { "WellFed", "Sated" } do Game.GetStatusEffectSystem():ApplyStatusEffect(Game.GetPlayer():GetEntityID(), "BaseStatusEffect."..v) print(" - APPLIED:", v) end for i, v in next, { "Energized", "Refreshed", "Rested", "AllowHealthRegenInCombat", "IncreasedStaminaRegen", "IncreasedXPGain" } do Game.GetStatusEffectSystem():ApplyStatusEffect(Game.GetPlayer():GetEntityID(), "HousingStatusEffect."..v) print(" - APPLIED:", v) end
開啟所有deBuff免疫 ModStatPlayer = function(ID, value) Game.GetStatsSystem():AddModifier(Game.GetPlayer():GetEntityID(), RPGManager.CreateStatModifier(ID, gameStatModifierType.Additive, value)) end effects = { "BleedingImmunity", "BlindImmunity", "BurningImmunity", "EMPImmunity", "ElectrocuteImmunity", "KnockdownImmunity", "MemoryWipeImmunity", "PoisonImmunity", "QuickHackImmunity", "StunImmunity", "SystemCollapseImmunity", "UnconsciousImmunity", "TranquilizerImmunity" } print(" ------------------- ADDING IMMUNITIES (if it's not already present)") for i, effect in ipairs(effects) do local Val = Game.GetStatsSystem():GetStatValue(GetPlayer():GetEntityID(), effect) if Val == 1 then print(" - "..effect..": IS ALREADY ACTIVATED...") elseif Val == 0 then ModStatPlayer(effect, 1.0) print(" - "..effect..": ACTIVATED !!!") end end
移除所有Buff StatusEffectHelper.RemoveAllStatusEffects(GetPlayer()) print(" - ALL EFFECTS REMOVED")
移除特定Buff effect = "Buff名稱" Game.GetStatusEffectSystem():RemoveStatusEffect(Game.GetPlayer():GetEntityID(), effect)
移除所有deBuff SES = StatusEffectSystem P = GetPlayer() print(" ") for i, v in next, { "Bleeding", "PlayerBleeding", "MinorBleeding", "Blind", "MajorBlind", "MinorBlind", "MajorQuickHackBlind", "BaseQuickHackBlind", "Burning", "LightBurning", "MediumBurning", "PlayerBurning", "Crippled", "Drunk", "Exhausted", "PlayerExhausted", "TemporarilyBlockMovement", "EMP", "EmpJamWeaponAccuracyDeBuff", "Knockdown", "SecondaryKnockdown", "Poisoned", "PlayerPoisoned", "ConsumablePoison", "Stun", "Stunned", "JohnnySicknessHeavy", "JohnnySicknessLow", "JohnnySicknessMedium", "JohnnySicknessMediumQuest" } do Val = SES.ObjectHasStatusEffect(P, TweakDBID("BaseStatusEffect."..v)) if Val == true then Game.GetStatusEffectSystem():RemoveStatusEffect(Game.GetPlayer():GetEntityID(), "BaseStatusEffect."..v) print(" - [NEGATIVE EFFECT REMOVED] ->", v) else if Val == false then print("Effect:", v, "-> [NOT PRESENT]") end end end print(" ")
移除Relic故障效果 for i, v in next, { "JohnnySicknessHeavy", "JohnnySicknessLow", "JohnnySicknessMedium", "JohnnySicknessMediumQuest" } do Game.GetStatusEffectSystem():RemoveStatusEffect(Game.GetPlayer():GetEntityID(), "BaseStatusEffect." .. v) end print(" - RELIC MALFUNCTION EFFECT REMOVED")
滋養(+5%最大生命720秒) Game.GetStatusEffectSystem():ApplyStatusEffect(Game.GetPlayer():GetEntityID(), "BaseStatusEffect.WellFed")
補水(+10%最大耐力420秒) Game.GetStatusEffectSystem():ApplyStatusEffect(Game.GetPlayer():GetEntityID(), "BaseStatusEffect.Sated")
充滿活力(公寓Buff) Game.GetStatusEffectSystem():ApplyStatusEffect(Game.GetPlayer():GetEntityID(), "HousingStatusEffect.Energized")
煥然一新(公寓Buff) Game.GetStatusEffectSystem():ApplyStatusEffect(Game.GetPlayer():GetEntityID(), "HousingStatusEffect.Refreshed")
休息(公寓Buff) Game.GetStatusEffectSystem():ApplyStatusEffect(Game.GetPlayer():GetEntityID(), "HousingStatusEffect.Rested")
額外生命恢複(公寓Buff) Game.GetStatusEffectSystem():ApplyStatusEffect(Game.GetPlayer():GetEntityID(), "HousingStatusEffect.AllowHealthRegenInCombat")
額外耐力恢複(公寓Buff) Game.GetStatusEffectSystem():ApplyStatusEffect(Game.GetPlayer():GetEntityID(), "HousingStatusEffect.IncreasedStaminaRegen")
額外經驗加成(公寓Buff) Game.GetStatusEffectSystem():ApplyStatusEffect(Game.GetPlayer():GetEntityID(), "HousingStatusEffect.IncreasedXPGain")
隱形(15秒) Game.GetStatusEffectSystem():ApplyStatusEffect(Game.GetPlayer():GetEntityID(), "BaseStatusEffect.OpticalCamoPlayerBuffLegendary")
無懈可擊 Game.GetStatusEffectSystem():ApplyStatusEffect(Game.GetPlayer():GetEntityID(), "BaseStatusEffect.Invulnerable")
即時自殺 Game.GetStatusEffectSystem():ApplyStatusEffect(Game.GetPlayer():GetEntityID(), "BaseStatusEffect.ForceKill") --also: Game.GetPlayer()Revive(0) or Game.GetPlayer():Kill()
麻醉 Game.GetStatusEffectSystem():ApplyStatusEffect(Game.GetPlayer():GetEntityID(), "BaseStatusEffect.DruggedSevere")
醉酒 Game.GetStatusEffectSystem():ApplyStatusEffect(Game.GetPlayer():GetEntityID(), "BaseStatusEffect.Drunk")
常規
列出背包裡所有物品及對應ID local function getIDs() local P = Game.GetPlayer(); local TS = Game.GetTransactionSystem(); local INV = {TS:GetItemList(P)}; local TYP = { {str = 'Clo_', cat = "Clothes"}, {str = 'Wea_', cat = "Weapons"}, {str = 'Fla_', cat = "Other Weapons"}, {str = 'Grena', cat = "Greande"}, {str = 'Cyb', cat = "Cyberware"}, {str = 'Prt_Program', cat = "QuickHack"}, {str = 'Prt_', cat = "Mods / Parts"}, {str = 'Con_', cat = "General"}, {str = 'Gen_', cat = "Other"}}; for i, Type in next, TYP do print(' \n - - - - - - - - - - - - [ Filtering By '..Type.cat..' ] - - - - - - - - - - - -') for i, item in ipairs(INV[2]) do local itemID = item:GetID(); if TweakDB:GetRecord(itemID.id):ItemType() then local itemTDBID = TDBID.ToStringDEBUG(itemID.id); local quantity = TS:GetItemQuantity(P, itemID); local itemType = TweakDB:GetRecord(itemID.id):ItemType():Type().value; local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(itemTDBID..'.displayName')); if itemName == '' then itemName = ''; end if string.find(itemType, Type.str) then print('\t'..quantity..' x '..itemName..'\t( ItemID : "'..itemTDBID..'" )') end end end end print(' \n - - - - - - - - - - - - [ Unfiltered Items ] - - - - - - - - - - - -') for i, item in ipairs(INV[2]) do local itemID = item:GetID(); if not TweakDB:GetRecord(itemID.id):ItemType() then local itemTDBID = TDBID.ToStringDEBUG(itemID.id); local quantity = TS:GetItemQuantity(P, itemID); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(itemTDBID..'.displayName')); if itemName == '' then itemName = ''; end print('\t'..quantity..' x '..itemName..'\t( ItemID : "'..itemTDBID..'" )') end end print('\n ') end getIDs()
強制從背包中移除特定物品 NewID = "把ID替換到引號內"; function removeItem() removed = false; local howTo = 'USE THE COMMAND "LIST ALL ITEMS IN THE INVENTORY + ITEM IDs" TO GET THE ID.'; if TweakDB:GetRecord(NewID) then local P = Game.GetPlayer(); local TS = Game.GetTransactionSystem(); local INV = {TS:GetItemList(P)}; for i, item in ipairs(INV[2]) do local itemID = item:GetID(); local itemQua = TS:GetItemQuantity(P, itemID); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(itemID.id..'.displayName')); local toStrID = TDBID.ToStringDEBUG(itemID.id); if toStrID == NewID then if TS:HasItem(P, itemID) and itemQua >= 1 then local itemData = TS:GetItemData(P, itemID); if itemData:HasTag('Quest') then itemData:RemoveDynamicTag('Quest') end TS:RemoveItemByTDBID(P, NewID, itemQua) removed = true; print(' \n\t- FOUND and REMOVED : '..itemQua..' x '..itemName..' ( "'..toStrID..'" )\n\t- You may need to save and reload to refresh the backpack. \n ') break end end end if not removed then local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(NewID..'.displayName')); print(' \n\t- "'..NewID..'" ( '..itemName..' )\n\t- NOT FOUND IN THE INVENTORY, BE SURE THE ItemID IS CORRECT.\n\t- '..howTo..'\n ') end else print(' \n\t- "'..NewID..'" IS NOT A VALID ID.\n\t- '..howTo..'\n ') end NewID, removed = nil; end removeItem()
按標記刪除項目(第1次在控制台中獲取訊息第2次刪除) Tag = "把標籤名稱替換到引號內"; function removeItemsByTags() P = Game.GetPlayer(); TS = Game.GetTransactionSystem(); ESPD = Game.GetScriptableSystemsContainer():Get('EquipmentSystem'):GetPlayerData(P); INV = {TS:GetItemList(P)}; availableTags = {'Weapon', 'Clothing', 'Cyberware', 'itemPart', 'Junk', 'Ammo', 'CraftingPart', 'Shard', 'Consumable', 'Inhaler', 'Drug', 'Edible', }; if not tagsMSGShown then print(' \n\tUSAGE : Replace "'..Tag..'" with a valid Tag name, then re-enter the command to remove all items you have with that Tag.') print('\tNOTE: Items equipped and items with "Quest" tag are not removed, if you want to remove those use "FORCE REMOVE SPECIFIC ITEM FROM INVENTORY" command. \n\tAvaliable TAG Names : ') for i, tag in next, availableTags do print('\t\t- "'..tag..'"') end print('\n ') count = 0; for i, item in ipairs(INV[2]) do itemID = item:GetID(); itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(itemID.id..'.displayName')); toStrID = TDBID.ToStringDEBUG(itemID.id); if TS:HasTag(P, Tag, itemID) and TS:HasTag(P, 'Quest', itemID) == false then count = count + 1; end end if count ~= 0 then print(' \t[ OK ] Found '..count..' Item/s with "'..Tag..'" Tag.\n\t Enter the command once again to remove them.\n ') tagsMSGShown = true; itemsWithTagsFound = true; else print(' \t[ END ] No Items found with TAG -> "'..Tag..'"\n ') tagsMSGShown = false; itemsWithTagsFound = false; end elseif tagsMSGShown and itemsWithTagsFound then count = 0; for i, item in ipairs(INV[2]) do itemID = item:GetID(); itemQua = TS:GetItemQuantity(P, itemID); itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(itemID.id..'.displayName')); toStrID = TDBID.ToStringDEBUG(itemID.id); skipMsg = '\t. . . Skipping equipped Item in "'..Tag..'" slot: '..itemName..'\t->\t"'..toStrID..'"'; if TS:HasTag(P, Tag, itemID) and TS:HasTag(P, 'Quest', itemID) == false then if ESPD:IsEquipped(itemID) == true then print(skipMsg) elseif string.find(toStrID, '_link') or string.find(toStrID, 'w_melee_0') then print(skipMsg) elseif TS:HasTag(P, 'Inhaler', itemID) or TS:HasTag(P, 'Drug', itemID) then local fixedQuant = itemQua - 1; TS:RemoveItem(P, itemID, fixedQuant) print('\t- REMOVED (Only Inhalers Duplicates) : '..itemName..' x '..fixedQuant..'\t->\t"'..toStrID..'"') else TS:RemoveItem(P, itemID, itemQua) print('\t- REMOVED : '..itemName..' x '..itemQua..'\t->\t"'..toStrID..'"') count = count + itemQua; end end end tagsMSGShown = false; itemsWithTagsFound = false; Tag = "TAG_NAME_HERE"; print(' \n\t[ END ] '..count..' Items Removed.\n ') end end removeItemsByTags()
移除所有垃圾 Tag = "Junk"; LeaveOne = false; P = Game.GetPlayer(); TS = Game.GetTransactionSystem(); INV = {TS:GetItemList(P)}; for i, item in ipairs(INV[2]) do itemID = item:GetID(); itemQua = TS:GetItemQuantity(P, itemID); itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(itemID.id..".displayName")); toStrID = TDBID.ToStringDEBUG(itemID.id); if TS:HasTag(P, Tag, itemID) and not TS:HasTag(P, "Quest ", itemID) then if LeaveOne then if itemQua > 1 then TS:RemoveItem(P, itemID, (itemQua-1)) print(" - REMOVED: "..itemName.." x "..itemQua-1) end else TS:RemoveItem(P, itemID, itemQua) print(" - REMOVED: "..itemName.." x "..itemQua) end end end
從背包中移除所有物品 P = Game.GetPlayer(); currWeight = P.curInventoryWeight; equip = function(id) RPGManager.ForceEquipItemOnPlayer(P, id, true) end Game.GetTransactionSystem():RemoveAllItems(P) P:UpdateInventoryWeight(-currWeight) P:EvaluateEncumbrance() equip("Items.AdvancedMilitechParalineMKICommon") equip("Items.CharacterCustomizationArms") equip("Items.w_melee_004__fists_a")
移除當前背包負重 P = Game.GetPlayer(); currWeight = P.curInventoryWeight; P:UpdateInventoryWeight(-currWeight) P:EvaluateEncumbrance()
移除所有錢 TS = Game.GetTransactionSystem() currentMoney = TS:GetItemQuantity(GetPlayer(), MarketSystem.Money()) TS:RemoveMoney(Game.GetPlayer(), currentMoney-1, CName.new('money')) --TS:GiveItem(Game.GetPlayer(), ItemID.new(TweakDBID.new("Items.money")), (currentMoney*-1)+1)
獲取當前藝術家和曲目名稱 function getRadio() local P = Game.GetPlayer() local WS = Game.GetWorkspotSystem() local function alert(txt, secs) if not secs then secs = 3.0; end PreventionSystem.ShowMessage(txt, secs) end if WS:IsActorInWorkspot(P) then local mounted = Game.GetMountedVehicle(P); if mounted then if mounted:IsRadioReceiverActive() then StationName = GetLocalizedTextByKey(mounted:GetRadioReceiverStationName()); TrackName = GetLocalizedTextByKey(mounted:GetRadioReceiverTrackName()); local ArtistTrack = TrackName:find('-') if ArtistTrack then Artist = TrackName:sub(0, ArtistTrack-2); Track = TrackName:sub(ArtistTrack + 2); else Artist = '< unknown >'; Track = TrackName; end alert(' ~ ~ ~ '..StationName..' ~ ~ ~\nARTIST : '..Artist..'\nTRACK : '..Track, 9) print('\n ') print('\tStation Name :\t'..StationName) print('\tArtist :\t'..Artist) print('\tTrack :\t'..Track) print('\n ') else alert('TURN ON THE RADIO FIRST.') end end else alert('YOU\'RE NOT IN A VEHICLE.') end end getRadio()
顯示所有興趣點(使用前請存檔)(輸入第一次警告,第二次啟動) if showPOIWarn then local JM = Game.GetJournalManager(); JM:DebugShowAllPoiMappins() print(' - SHOW ALL POINT OF INTEREST: ACTIVATED\n ') showPOIWarn = nil; else local warning = ' \n\t<<< WARNING >>>\n\t\"SHOW ALL POINT OF INTEREST\" and \"DISCOVER ALL POINT OF INTEREST\" are DEBUG commands.\n\tIt has been reported that they leave POI marks PERMANENTLY on the map, even for activities already completed.\n\tIF YOU STILL WANT TO ENTER THE COMMAND, ENTER IT ONCE AGAIN.\n '; print(warning) showPOIWarn = true; end
發現所有興趣點(使用前請存檔)(輸入第一次警告,第二次啟動) if discoverPOIWarn then local MS = Game.GetMappinSystem(); MS:DebugDiscoverAllPoiMappins() print(' - DISCOVER ALL POINT OF INTEREST: ACTIVATED\n ') discoverPOIWarn = nil; else local warning = ' \n\t<<< WARNING >>>\n\t\"SHOW ALL POINT OF INTEREST\" and \"DISCOVER ALL POINT OF INTEREST\" are DEBUG commands.\n\tIt has been reported that they leave POI marks PERMANENTLY on the map, even for activities already completed.\n\tIF YOU STILL WANT TO ENTER THE COMMAND, ENTER IT ONCE AGAIN.\n '; print(warning) discoverPOIWarn = true; end
強制取消跟蹤當前任務 untrackMainQuestOnly = false; untrackQuest = function() local mainMenu = Game.GetSystemRequestsHandler():IsPreGame(); local UIDef = Game.GetAllBlackboardDefs().UI_System; local BB = Game.GetBlackboardSystem():Get(UIDef); if not mainMenu and not BB:GetBool(UIDef.IsInMenu) then local JM = Game.GetJournalManager(); if untrackMainQuestOnly then local context = JournalRequestContext.new(); local filter = JournalRequestStateFilter.new(); filter.active = true; context.stateFilter = filter; local entries = JM:GetQuests(context) for i, entry in ipairs(entries) do if JM:GetQuestType(entry) == gameJournalQuestType.MainQuest then if JM:IsEntryTracked(entry) then JM:UntrackEntry() end end end else local curEntry = JM:GetTrackedEntry(); if JM:IsEntryTracked(curEntry) then JM:UntrackEntry() end end BB:SetBool(UIDef.IsInMenu, true) BB:SetBool(UIDef.IsInMenu, false) end end untrackQuest()
切換車輛不會自動消失 function toggleTraffic() local categ = 'Traffic'; local param = 'StopSpawn'; local msg = ' \n\tTOGGLE TRAFFIC PRESENCE : '; local traffic = GameOptions.GetBool(categ, param) if traffic then GameOptions.SetBool(categ, param, false) print(msg..'OFF\n ') else GameOptions.SetBool(categ, param, true) print(msg..'ON\n\t(Vehicles already spawned won\'t despawn)\n ') end end toggleTraffic()
切換呼吸聲 function toggleBreath() local categ = 'Editor/Audio/Features'; local param = 'BreathingSystem'; local msg = ' \n\tTOGGLE BREATHING SOUND : '; local breath = GameOptions.GetBool(categ, param) if breath then GameOptions.SetBool(categ, param, false) print(msg..'OFF\n ') else GameOptions.SetBool(categ, param, true) print(msg..'ON\n ') end end toggleBreath()
切換車輛召喚模式 summonMode = not summonMode; if summonMode then Game.GetVehicleSystem():ToggleSummonMode() print(" - TOGGLE VEHICLE SUMMON MODE: ON \n ") else Game.GetVehicleSystem():ToggleSummonMode() print(" - TOGGLE VEHICLE SUMMON MODE: OFF \n ") end
切換自動保存 autosave = function() GameOptions.Toggle("SaveConfig", "AutoSaveEnabled") if GameOptions.GetBool("SaveConfig", "AutoSaveEnabled") == false then print(" - AUTOSAVE: OFF \n ") else print(" - AUTOSAVE: ON \n ") end end autosave()
切換UI SSystem = Game.GetSettingsSystem() hud = SSystem:GetGroup('/interface/hud') new = not hud:GetVar('healthbar'):GetValue() for _, var in ipairs(hud:GetVars(false)) do var:SetValue(new) end if hud:GetVar('healthbar'):GetValue() == false then print(" - HUD: OFF") else print(" - HUD: ON") end;
切換荒阪UI SSystem = Game.GetSettingsSystem() QS = Game.GetQuestsSystem() hud = SSystem:GetGroup('/interface/hud') On,Off = " - ARASAKA HUD: ON"," - ARASAKA HUD: OFF" new = not new; hud:GetVar('healthbar'):GetValue() for _, var in ipairs(hud:GetVars(false)) do var:SetValue(new) end if hud:GetVar('healthbar'):GetValue() == false and Game.GetQuestsSystem():GetFactStr("q000_var_arasaka_ui_on") == 0 then QS:SetFactStr("q000_var_arasaka_ui_on", 1) print(On) else QS:SetFactStr("q000_var_arasaka_ui_on", 0) print(Off) end
切換字幕 SS_SUB = Game.GetSettingsSystem():GetVar("/audio/subtitles", "Cinematic") if SS_SUB:GetValue() == true then SS_SUB:SetValue(false) print("- SUBTITLES :OFF") else SS_SUB:SetValue(true) print(" - SUBTITLES :ON") end
親密關係
性偶動畫(雙倍時間) Game.GetQuestsSystem():SetFactStr("prostitutes_play_all_anims", 1) --Game.SetDebugFact("prostitutes_play_all_anims", 1)
查看當前所有角色關係狀態(在控制台顯示) local function checkAllRomances() local function CheckRelat(rel_ID) print('\tFact "'..rel_ID..'" : '..Game.GetQuestsSystem():GetFactStr(rel_ID)) end print(' \n- JUDY RELATIONSHIP STATUS') for i, v in next, {'judy_romanceable', 'sq030_judy_lover', 'judy_relationship'} do CheckRelat(v) end print(' \n- PANAM RELATIONSHIP STATUS') for i, v in next, {'panam_romanceable', 'sq027_panam_lover', 'panam_relationship'} do CheckRelat(v) end print(' \n- RIVER RELATIONSHIP STATUS') for i, v in next, {'river_romanceable', 'sq029_river_lover', 'river_relationship'} do CheckRelat(v) end print(' \n- KERRY RELATIONSHIP STATUS') for i, v in next, {'kerry_romanceable', 'sq028_kerry_lover', 'sq028_kerry_relationship'} do CheckRelat(v) end print('\n ') end checkAllRomances()
設定所有人狀態為約會(未測試建議備份存檔) local function allRomanceable() print('\n ') local Facts = {'judy_romanceable', 'river_romanceable', 'kerry_romanceable', 'panam_romanceable'}; local QS = Game.GetQuestsSystem(); local function check(fact) return QS:GetFactStr(fact) end for i, fct in next, Facts do if check(fct) == 1 then print('\tFact "'..fct..'" -> Already Active.') else QS:SetFactStr(fct, 1) print('\tFact "'..fct..'" -> ACTIVATED.') end end print('\n ') end allRomanceable()
刪除所有角色關係狀態 local function removeAllRelat() local allFacts = {'sq030_judy_lover', 'judy_relationship', 'sq027_panam_lover', 'panam_relationship', 'sq029_river_lover', 'river_relationship', 'sq028_kerry_lover', 'sq028_kerry_relationship'}; local QS = Game.GetQuestsSystem(); local function check(fact) return QS:GetFactStr(fact) end local function unset(fact) QS:SetFactStr(fact, 0) print('\tFact "'..fact..'" - DISABLED.') end for i, fct in next, allFacts do if check(fct) == 0 then print('\tFact "'..fct..'" - Already disabled.') else unset(fct) end end print('\n ') end removeAllRelat()
朱迪約會 local function setRomance() print('\n ') local Facts = {'judy_romanceable'}; local QS = Game.GetQuestsSystem(); local function check(fact) return QS:GetFactStr(fact) end for i, fct in next, Facts do if check(fct) == 1 then print('\tFact "'..fct..'" -> Already Active.') else QS:SetFactStr(fct, 1) print('\tFact "'..fct..'" -> ACTIVATED.') end end print('\n ') end setRomance()
朱迪約會加戀愛 local function setRelat() local romance = {'judy_romanceable', 'panam_romanceable', 'river_romanceable', 'kerry_romanceable'}; local judy = {'sq030_judy_lover', 'judy_relationship'}; local QS = Game.GetQuestsSystem(); local function check(fact) return QS:GetFactStr(fact) end local function set(fact, val) QS:SetFactStr(fact, val) end if check(judy[1]) == 1 and check(judy[2]) == 1 then print('\t[ END ] NO NEED TO ACTIVATE.\n ') return else set(romance[1], 1) for i, v in next, judy do print('\tSETTING : "'..v..'"') set(v, 1) end end print('\n ') end setRelat()
帕南約會 local function setRomance() print('\n ') local Facts = {'panam_romanceable'}; local QS = Game.GetQuestsSystem(); local function check(fact) return QS:GetFactStr(fact) end for i, fct in next, Facts do if check(fct) == 1 then print('\tFact "'..fct..'" -> Already Active.') else QS:SetFactStr(fct, 1) print('\tFact "'..fct..'" -> ACTIVATED.') end end print('\n ') end setRomance()
帕南約會加戀愛 local function setRelat() local romance ={'judy_romanceable', 'panam_romanceable', 'river_romanceable', 'kerry_romanceable'}; local panam = {'sq027_panam_lover', 'panam_relationship'}; local QS = Game.GetQuestsSystem(); local function check(fact) return QS:GetFactStr(fact) end local function set(fact, val) QS:SetFactStr(fact, val) end if check(panam[1]) == 1 and check(panam[2]) == 1 then print('\t[ END ] NO NEED TO ACTIVATE.\n ') return else set(romance[2], 1) for i, v in next, panam do print('\tSETTING : "'..v..'"') set(v, 1) end end print('\n ') end setRelat()
瑞弗約會 local function setRomance() print('\n ') local Facts = {'river_romanceable'}; local QS = Game.GetQuestsSystem(); local function check(fact) return QS:GetFactStr(fact) end for i, fct in next, Facts do if check(fct) == 1 then print('\tFact "'..fct..'" -> Already Active.') else QS:SetFactStr(fct, 1) print('\tFact "'..fct..'" -> ACTIVATED.') end end print('\n ') end setRomance()
瑞弗約會加戀愛 local function setRelat() local romance ={'judy_romanceable', 'panam_romanceable', 'river_romanceable', 'kerry_romanceable'}; local river = {'sq029_river_lover', 'river_relationship'}; local QS = Game.GetQuestsSystem(); local function check(fact) return QS:GetFactStr(fact) end local function set(fact, val) QS:SetFactStr(fact, val) end if check(river[1]) == 1 and check(river[2]) == 1 then print('\t[ END ] NO NEED TO ACTIVATE.\n ') return else set(romance[3], 1) for i, v in next, river do print('\tSETTING : "'..v..'"') set(v, 1) end end print('\n ') end setRelat()
克裡約會 local function setRomance() print('\n ') local Facts = {'kerry_romanceable'}; local QS = Game.GetQuestsSystem(); local function check(fact) return QS:GetFactStr(fact) end for i, fct in next, Facts do if check(fct) == 1 then print('\tFact "'..fct..'" -> Already Active.') else QS:SetFactStr(fct, 1) print('\tFact "'..fct..'" -> ACTIVATED.') end end print('\n ') end setRomance()
克裡約會加戀愛 local function setRelat() local romance ={'judy_romanceable', 'panam_romanceable', 'river_romanceable', 'kerry_romanceable'}; local kerry = {'sq028_kerry_lover', 'sq028_kerry_relationship'}; local QS = Game.GetQuestsSystem(); local function check(fact) return QS:GetFactStr(fact) end local function set(fact, val) QS:SetFactStr(fact, val) end if check(kerry[1]) == 1 and check(kerry[2]) == 1 then print('\t[ END ] NO NEED TO ACTIVATE.\n ') return else set(romance[4], 1) for i, v in next, kerry do print('\tSETTING : "'..v..'"') set(v, 1) end end print('\n ') end setRelat()
事實
檢查事實(控制台中的0或1) fact = '任務ID' print(Game.GetQuestsSystem():GetFactStr(fact))
結束禪修 for i, v in pairs { "drugs", "gore", "homosexuality", "nudity", "oversexualized", "religion", "suggestive" } do Game.GetQuestsSystem():SetFactStr("chensorship_" .. v, 0) end print(" - CHENSORSHIP REMOVED: Drugs / Gore / Homosexuality / Nudity / Oversexualized / Suggestive / Religion") for i, v in pairs { "drugs", "gore", "homosexuality", "nudity", "oversexualized", "religion", "suggestive" } do print("chensorship_" ..v.. ": ", Game.GetQuestsSystem():GetFactStr("chensorship_" .. v)) end
四季寶為冷血模式 Game.GetQuestsSystem():SetFactStr("mq007_skippy_aim_at_head", 1)
四季寶為致殘模式 Game.GetQuestsSystem():SetFactStr("mq007_skippy_aim_at_head", 0)
四季寶對主角友好 Game.GetQuestsSystem():SetFactStr("mq007_skippy_goes_emo", 0)
四季寶對主角敵對 Game.GetQuestsSystem():SetFactStr("mq007_skippy_goes_emo", 1)
解鎖隱藏結局 Game.GetQuestsSystem():SetFactStr("sq032_johnny_friend", 1)
傑克死後留在車裡 QS = Game.GetQuestsSystem(); function Jack(fact, v) QS:SetFactStr(fact, v) print(fact..": "..QS:GetFactStr(fact)) end; Jack("q005_jackie_to_hospital", 0) Jack("q005_jackie_to_mama", 0) Jack("q005_jackie_stay_notell", 1)
傑克死後送去老維處 QS = Game.GetQuestsSystem(); function Jack(fact, v) QS:SetFactStr(fact, v) print(fact..": "..QS:GetFactStr(fact)) end; Jack("q005_jackie_to_hospital", 1) Jack("q005_jackie_to_mama", 0) Jack("q005_jackie_stay_notell", 0)
傑克死後送回家裡 QS = Game.GetQuestsSystem(); function Jack(fact, v) QS:SetFactStr(fact, v) print(fact..": "..QS:GetFactStr(fact)) end; Jack("q005_jackie_to_hospital", 0) Jack("q005_jackie_to_mama", 1) Jack("q005_jackie_stay_notell", 0)
指頭哥友好狀態 Game.GetQuestsSystem():SetFactStr("q105_fingers_dead", 0) Game.GetQuestsSystem():SetFactStr("q105_fingers_beaten", 0)
指頭哥存活 Game.GetQuestsSystem():SetFactStr("q105_fingers_dead", 0)
指頭哥死亡 Game.GetQuestsSystem():SetFactStr("q105_fingers_dead", 1)
竹村存活 Game.GetQuestsSystem():SetFactStr("q112_takemura_dead", 0)
竹村死亡 Game.GetQuestsSystem():SetFactStr("q112_takemura_dead", 1)
孵化蜥蜴蛋 local function hatchTheEgg() local QS = Game.GetQuestsSystem(); local eggPlaced = 'mws_wat_02_egg_placed'; local eggHatched = 'mws_wat_02_iguana_hatched'; local endMsg = 'If you are at home (Megabuilding H10) go away and come back to see the iguana.'; if QS:GetFactStr(eggPlaced) == 0 then QS:SetFactStr(eggPlaced, 1) print(' \n\tSetting Fact : "'..eggPlaced..'" (required)') end if QS:GetFactStr(eggHatched) == 0 then QS:SetFactStr(eggHatched, 1) print(' \n\tSetting Fact : "'..eggHatched..'" \n\t'..endMsg..'\n ') else print(' \n\tNo need to activate, the iguana egg has already hatched.\n\t'..endMsg..'\n ') end end hatchTheEgg()
設定V身份為街頭小子(需存檔再讀檔) local newPath = 'StreetKid'; local function changePath(path) local P = Game.GetPlayer(); local QS = Game.GetQuestsSystem(); local DS = PlayerDevelopmentSystem.GetInstance(P):GetDevelopmentData(P); local curLifePath = DS:GetLifePath().value; local lifePaths = {'StreetKid', 'Corporate', 'Nomad'}; local pathFacts = {'q000_street_kid_background', 'q000_corpo_background', 'q000_nomad_background'}; if curLifePath == path then print(' \n\tNo need to set '..path..' Life Path.\n ') return end if path == lifePaths[1] then for i, p in next, pathFacts do QS:SetFactStr(p, 0) end QS:SetFactStr(pathFacts[1], 1) DS:SetLifePath('LifePaths.'..lifePaths[1]) elseif path == lifePaths[2] then for i, p in next, pathFacts do QS:SetFactStr(p, 0) end QS:SetFactStr(pathFacts[2], 1) DS:SetLifePath('LifePaths.'..lifePaths[2]) elseif path == lifePaths[3] then for i, p in next, pathFacts do QS:SetFactStr(p, 0) end QS:SetFactStr(pathFacts[3], 1) DS:SetLifePath('LifePaths.'..lifePaths[3]) end print(' \n\tLife path set to : '..path..'.\n ') end changePath(newPath)
設定V身份為公司員工(需存檔再讀檔) local newPath = 'Corporate'; local function changePath(path) local P = Game.GetPlayer(); local QS = Game.GetQuestsSystem(); local DS = PlayerDevelopmentSystem.GetInstance(P):GetDevelopmentData(P); local curLifePath = DS:GetLifePath().value; local lifePaths = {'StreetKid', 'Corporate', 'Nomad'}; local pathFacts = {'q000_street_kid_background', 'q000_corpo_background', 'q000_nomad_background'}; if curLifePath == path then print(' \n\tNo need to set '..path..' Life Path.\n ') return end if path == lifePaths[1] then for i, p in next, pathFacts do QS:SetFactStr(p, 0) end QS:SetFactStr(pathFacts[1], 1) DS:SetLifePath('LifePaths.'..lifePaths[1]) elseif path == lifePaths[2] then for i, p in next, pathFacts do QS:SetFactStr(p, 0) end QS:SetFactStr(pathFacts[2], 1) DS:SetLifePath('LifePaths.'..lifePaths[2]) elseif path == lifePaths[3] then for i, p in next, pathFacts do QS:SetFactStr(p, 0) end QS:SetFactStr(pathFacts[3], 1) DS:SetLifePath('LifePaths.'..lifePaths[3]) end print(' \n\tLife path set to : '..path..'.\n ') end changePath(newPath)
設定V身份為流浪者(需存檔再讀檔) local newPath = 'Nomad'; local function changePath(path) local P = Game.GetPlayer(); local QS = Game.GetQuestsSystem(); local DS = PlayerDevelopmentSystem.GetInstance(P):GetDevelopmentData(P); local curLifePath = DS:GetLifePath().value; local lifePaths = {'StreetKid', 'Corporate', 'Nomad'}; local pathFacts = {'q000_street_kid_background', 'q000_corpo_background', 'q000_nomad_background'}; if curLifePath == path then print(' \n\tNo need to set '..path..' Life Path.\n ') return end if path == lifePaths[1] then for i, p in next, pathFacts do QS:SetFactStr(p, 0) end QS:SetFactStr(pathFacts[1], 1) DS:SetLifePath('LifePaths.'..lifePaths[1]) elseif path == lifePaths[2] then for i, p in next, pathFacts do QS:SetFactStr(p, 0) end QS:SetFactStr(pathFacts[2], 1) DS:SetLifePath('LifePaths.'..lifePaths[2]) elseif path == lifePaths[3] then for i, p in next, pathFacts do QS:SetFactStr(p, 0) end QS:SetFactStr(pathFacts[3], 1) DS:SetLifePath('LifePaths.'..lifePaths[3]) end print(' \n\tLife path set to : '..path..'.\n ') end changePath(newPath)
啟用亞馬遜空投事件 local QS = Game.GetQuestsSystem(); local drops = {'warden', 'ajax', 'crusher', 'kyubi', 'grit', 'nekomata'}; for _, weapon in next, drops do local fact = weapon .. '_amazon_airdropped'; if QS:GetFactStr(fact) == 1 then print('\t[ '..weapon..' ] Airdrop event already completed or Enabled.') else print('\t[ '..weapon..' ] Airdrop event Enabled.') QS:SetFactStr(fact, 1) end end
卸下衣服
取消裝備內搭(舊) function forceUnequipSlot(equipArea, slot) local P = Game.GetPlayer(); local ES = Game.GetScriptableSystemsContainer():Get('EquipmentSystem'); local PD = ES:GetPlayerData(P); local areaIndex = PD:GetEquipAreaIndex(gamedataEquipmentArea[equipArea]); local forceRemove = true; PD:UnequipItem(areaIndex, slot, forceRemove) end forceUnequipSlot('UnderwearTop', 0)
取消裝備外搭(舊) function forceUnequipSlot(equipArea, slot) local P = Game.GetPlayer(); local ES = Game.GetScriptableSystemsContainer():Get('EquipmentSystem'); local PD = ES:GetPlayerData(P); local areaIndex = PD:GetEquipAreaIndex(gamedataEquipmentArea[equipArea]); local forceRemove = true; PD:UnequipItem(areaIndex, slot, forceRemove) end forceUnequipSlot('UnderwearBottom', 0)
取消裝備頭部 function forceUnequipSlot(equipArea, slot) local P = Game.GetPlayer(); local ES = Game.GetScriptableSystemsContainer():Get('EquipmentSystem'); local PD = ES:GetPlayerData(P); local areaIndex = PD:GetEquipAreaIndex(gamedataEquipmentArea[equipArea]); local forceRemove = true; PD:UnequipItem(areaIndex, slot, forceRemove) end forceUnequipSlot('Head', 0)
取消裝備面部 function forceUnequipSlot(equipArea, slot) local P = Game.GetPlayer(); local ES = Game.GetScriptableSystemsContainer():Get('EquipmentSystem'); local PD = ES:GetPlayerData(P); local areaIndex = PD:GetEquipAreaIndex(gamedataEquipmentArea[equipArea]); local forceRemove = true; PD:UnequipItem(areaIndex, slot, forceRemove) end forceUnequipSlot('Face', 0)
取消裝備內搭 function forceUnequipSlot(equipArea, slot) local P = Game.GetPlayer(); local ES = Game.GetScriptableSystemsContainer():Get('EquipmentSystem'); local PD = ES:GetPlayerData(P); local areaIndex = PD:GetEquipAreaIndex(gamedataEquipmentArea[equipArea]); local forceRemove = true; PD:UnequipItem(areaIndex, slot, forceRemove) end forceUnequipSlot('InnerChest', 0)
取消裝備外搭 function forceUnequipSlot(equipArea, slot) local P = Game.GetPlayer(); local ES = Game.GetScriptableSystemsContainer():Get('EquipmentSystem'); local PD = ES:GetPlayerData(P); local areaIndex = PD:GetEquipAreaIndex(gamedataEquipmentArea[equipArea]); local forceRemove = true; PD:UnequipItem(areaIndex, slot, forceRemove) end forceUnequipSlot('OuterChest', 0)
取消裝備褲子 function forceUnequipSlot(equipArea, slot) local P = Game.GetPlayer(); local ES = Game.GetScriptableSystemsContainer():Get('EquipmentSystem'); local PD = ES:GetPlayerData(P); local areaIndex = PD:GetEquipAreaIndex(gamedataEquipmentArea[equipArea]); local forceRemove = true; PD:UnequipItem(areaIndex, slot, forceRemove) end forceUnequipSlot('Legs', 0)
取消裝備鞋子 function forceUnequipSlot(equipArea, slot) local P = Game.GetPlayer(); local ES = Game.GetScriptableSystemsContainer():Get('EquipmentSystem'); local PD = ES:GetPlayerData(P); local areaIndex = PD:GetEquipAreaIndex(gamedataEquipmentArea[equipArea]); local forceRemove = true; PD:UnequipItem(areaIndex, slot, forceRemove) end forceUnequipSlot('Feet', 0)
取消裝備套裝 function forceUnequipSlot(equipArea, slot) local P = Game.GetPlayer(); local ES = Game.GetScriptableSystemsContainer():Get('EquipmentSystem'); local PD = ES:GetPlayerData(P); local areaIndex = PD:GetEquipAreaIndex(gamedataEquipmentArea[equipArea]); local forceRemove = true; PD:UnequipItem(areaIndex, slot, forceRemove) end forceUnequipSlot('Outfit', 0)
成就
獲取所有成就ID與解鎖要求 AchievRecs = TweakDB:GetRecords("gamedataAchievement_Record"); for i, record in ipairs(AchievRecs) do local AchieveDispName = Game.GetLocalizedText(record:DisplayName().value); local AchieveID = TDBID.ToStringDEBUG(record:GetID()); local AchieveUnlockReq = Game.GetLocalizedText(record:LocalizedDescription()); print("\t - ACHIEMEVEMENT : "..AchieveDispName.." \n\t\t\tID\t->\t"..AchieveID.." \n\t\t\tUnlock Requirements\t->\t"..AchieveUnlockReq.."\n ") end print(" \n ")
解鎖單個成就(注意把ID的Achievements.這個前綴刪掉) Achievement = "把成就ID替換到引號內"; AchievRecord = TweakDB:GetRecord("Achievements."..Achievement); AS = Game.GetAchievementSystem(); platf = AS:GetServiceName(); if AchievRecord then AchievName = Game.GetLocalizedText(AchievRecord:DisplayName().value); AS:SetAchievementProgress(AchievRecord, 100) AS:UnlockAchievement(AchievRecord) print(' \n\t - UNLOCKED : "'..AchievName..'" ( '..platf..' Platform ) \n ') else print(' \n\t - Achievement NOT FOUND.\n\t - You can Find Achievements with "GET ALL ACHIEVEMENTS INFO" script.\n ') end
解鎖所有成就 AS = Game.GetAchievementSystem(); platf = AS:GetServiceName(); AchievRecs = TweakDB:GetRecords("gamedataAchievement_Record"); for i, record in ipairs(AchievRecs) do AchievName = Game.GetLocalizedText(record:DisplayName().value); AS:SetAchievementProgress(record, 100) AS:UnlockAchievement(record) print("\t - UNLOCKED : "..AchievName) end print(" \n\t - ALL ACHIEMEVEMENTS UNLOCKED ("..platf.." platform) \n\t This has NOT been deeply tested. \n ")
工具
設定語言波蘭語 settings = Game.GetSettingsSystem():GetRootGroup():GetGroups(true) lang_settings = settings[6]:GetVars(true) ui_lang = lang_settings[3] ui_lang:SetIndex(0) Game.GetSettingsSystem():ConfirmChanges()
設定語言英語 settings = Game.GetSettingsSystem():GetRootGroup():GetGroups(true) lang_settings = settings[6]:GetVars(true) ui_lang = lang_settings[3] ui_lang:SetIndex(1) Game.GetSettingsSystem():ConfirmChanges()
設定語言西班牙語 settings = Game.GetSettingsSystem():GetRootGroup():GetGroups(true) lang_settings = settings[6]:GetVars(true) ui_lang = lang_settings[3] ui_lang:SetIndex(2) Game.GetSettingsSystem():ConfirmChanges()
設定語言法語 settings = Game.GetSettingsSystem():GetRootGroup():GetGroups(true) lang_settings = settings[6]:GetVars(true) ui_lang = lang_settings[3] ui_lang:SetIndex(3) Game.GetSettingsSystem():ConfirmChanges()
設定語言意大利語 settings = Game.GetSettingsSystem():GetRootGroup():GetGroups(true) lang_settings = settings[6]:GetVars(true) ui_lang = lang_settings[3] ui_lang:SetIndex(4) Game.GetSettingsSystem():ConfirmChanges()
設定語言德語 settings = Game.GetSettingsSystem():GetRootGroup():GetGroups(true) lang_settings = settings[6]:GetVars(true) ui_lang = lang_settings[3] ui_lang:SetIndex(5) Game.GetSettingsSystem():ConfirmChanges()
設定語言日語 settings = Game.GetSettingsSystem():GetRootGroup():GetGroups(true) lang_settings = settings[6]:GetVars(true) ui_lang = lang_settings[3] ui_lang:SetIndex(11) Game.GetSettingsSystem():ConfirmChanges()
設定語言中文 settings = Game.GetSettingsSystem():GetRootGroup():GetGroups(true) lang_settings = settings[6]:GetVars(true) ui_lang = lang_settings[3] ui_lang:SetIndex(8) Game.GetSettingsSystem():ConfirmChanges()
切換遊戲暫停狀態 local SRH = GetSingleton('inkMenuScenario'):GetSystemRequestsHandler(); if SRH:IsGamePaused() == false then SRH:PauseGame() print(" \n\t- GAME PAUSED\n ") else SRH:UnpauseGame() print(" \n\t- GAME RESUMED\n ") end
開啟自動保存 GameOptions.SetBool("SaveConfig", "AutoSaveEnabled", true)
關閉自動保存 GameOptions.SetBool("SaveConfig", "AutoSaveEnabled", false)
加載最近的檢查點 local RequestsHandler = Game.GetSystemRequestsHandler(); RequestsHandler:LoadLastCheckpoint(true)
從背包中移除所有物品(舊) clear = function() local P = Game.GetPlayer(); local currWeight = P.curInventoryWeight; local equip = function(id) RPGManager.ForceEquipItemOnPlayer(P, id, true) end Game.GetTransactionSystem():RemoveAllItems(P) P:UpdateInventoryWeight(-currWeight) P:EvaluateEncumbrance() equip("Items.AdvancedMilitechParalineMKICommon") equip("Items.CharacterCustomizationArms") equip("Items.w_melee_004__fists_a") end clear()
循環遊戲難度 local SDS = Game.GetStatsDataSystem() local curDiff = SDS:GetDifficulty().value; local changed = '\t- GAME DIFFICULTY SETTED TO : '; print(' \n\t- CURRENT DIFFICULTY : '..curDiff) if curDiff == 'Story' then SDS:SetDifficulty(gameDifficulty.Easy) print(changed..'Easy\n ') elseif curDiff == 'Easy' then SDS:SetDifficulty(gameDifficulty.Hard) print(changed..'Hard\n ') elseif curDiff == 'Hard' then SDS:SetDifficulty(gameDifficulty.VeryHard) print(changed..'VeryHard\n ') elseif curDiff == 'VeryHard' then SDS:SetDifficulty(gameDifficulty.Story) print(changed..'Story\n ') end
裝備特定物品 id = "把ID替換到引號內"; RPGManager.ForceEquipItemOnPlayer(GetPlayer(), id, true)
遊戲內消息 local MSG = SimpleScreenMessage.new() MSG.message = 'Hello World' MSG.isShown = true MSG.duration = 8.00 Game.GetBlackboardSystem():Get(GetAllBlackboardDefs().UI_Notifications):SetVariant(GetAllBlackboardDefs().UI_Notifications.OnscreenMessage, ToVariant(MSG), true)
遊戲內碎片消息 head = "This is a title"; body = "This is a message.\n:)"; Game.GetUISystem():QueueEvent(NotifyShardRead.new({title = head, text = body}))
遊戲內警報消息 PreventionSystem.ShowMessage("Hello world", 10.0)
遊戲內中立消息 Text = "Hello world"; Game.GetPlayer():SetWarningMessage(Text, gameSimpleMessageType.Neutral)
遊戲內Relic消息 Text = "Hello world"; Game.GetPlayer():SetWarningMessage(Text, gameSimpleMessageType.Relic)
遊戲內金錢訊息 Text = "Hello world"; Game.GetPlayer():SetWarningMessage(Text, "Money")
獲取當前坐標 function getPosRot() local P = Game.GetPlayer(); local Pos = P:GetWorldPosition(); local Rot = string.format('%i', P:GetWorldYaw()); local X, Y, Z = string.format('%f', Pos.x), string.format('%f', Pos.y), string.format('%f', Pos.z); print('{x = '..X..', y = '..Y..', z = '..Z..', rot = '..Rot..'}\n ') end getPosRot()
獲取當前變焦/FOV cam = Game.GetPlayer():GetFPPCameraComponent() fov = cam:GetFOV() zoom = cam:GetZoom() print("Current FOV:", fov) print("Current Zoom:", zoom)
獲取遊戲時間 local TSGT = Game.GetTimeSystem():GetGameTime(); local h = GameTime.Hours(TSGT); local m = GameTime.Minutes(TSGT); local s = GameTime.Seconds(TSGT); print(' \n\t'..h..' : '..m..' : '..s..'\t( Hours / Minutes / Seconds )\n ')
獲取當前遊戲版本 print(" \n\tCurrent version : "..gameGameVersion.Current.value.."\n ")
獲取玩家當前活躍的效果 local function getAppliedEffects() local PID = Game.GetPlayer():GetEntityID(); local EF = Game.GetStatusEffectSystem(); local effects = TweakDB:GetRecords('gamedataStatusEffect_Record'); local restrictions = TweakDB:GetRecords('gamedataGameplayRestrictionStatusEffect_Record'); for i, v in next, effects do local effID = v:GetID(); if EF:HasStatusEffect(PID, effID) then print('\tFound Effect : '..TDBID.ToStringDEBUG(effID)) end end for i, v in next, restrictions do local effID = v:GetID(); if EF:HasStatusEffect(PID, effID) then print('\tFound Restriction : '..TDBID.ToStringDEBUG(effID)) end end print('\n ') end getAppliedEffects()
獲取玩家當前活躍的效果標籤 local EF = Game.GetStatusEffectSystem():GetAppliedEffects(GetPlayer():GetEntityID()) if EF then for i, effect in ipairs(EF) do local Tags = effect:GetRecord():GameplayTags() if Tags then for ii = 1, #Tags do print("\t"..Tags[ii].value) end end end end
通過關鍵字搜索獲取統計記錄與注釋 Keyword = "Stamina"; records = TweakDB:GetRecords('gamedataStat_Record'); print("\n ") for _, record in ipairs(records) do local stat = tostring(record:EnumName()); if string.find(stat, Keyword) then print(" - \""..stat.."\"\t-\t"..tostring(record:EnumComment())) end end print("\n ")
通過關鍵字獲取玩家統計訊息值 StatType = "Stamina"; value = Game.GetStatsSystem():GetStatValue(GetPlayer():GetEntityID(), StatType); print(" \n"..StatType.."\t( "..TweakDB:GetFlat("BaseStats."..StatType..".enumComment").." ) \n\tValue : "..value .."\t( float: "..string.format("%f", value).." )\n ")
通過關鍵字搜索獲取統計記錄 Keyword = "Stamina"; records = TweakDB:GetRecords('gamedataStat_Record') for _, record in ipairs(records) do local stat = tostring(record:EnumName()); local val = Game.GetStatsSystem():GetStatValue(GetPlayer():GetEntityID(), stat) if string.find(stat, Keyword) then print(" - \""..stat.."\"\t-\t"..tostring(record:EnumComment())) print("\t\tPlayer Current Value: " ..string.format("%f", val)) end end
獲取玩家所有統計訊息值 records = TweakDB:GetRecords('gamedataStat_Record') for _, record in ipairs(records) do local stat = tostring(record:EnumName()); local val = Game.GetStatsSystem():GetStatValue(GetPlayer():GetEntityID(), stat) print(" - ", stat) print("Player Current Value: " ..string.format("%f", val)) print("-------------------------------") end
獲取裝備武器修正值 Area = "WeaEquipmentArea"; Slots = {}; Slots.WeaEquipmentArea = { Weapon = 3 }; P = Game.GetPlayer(); SSC = Game.GetScriptableSystemsContainer(); TS = Game.GetTransactionSystem(); SS = Game.GetStatsSystem(); ES = SSC:Get('EquipmentSystem'); PD = ES:GetPlayerData(P); PD['GetItemInEquipSlot2'] = PD['GetItemInEquipSlot;gamedataEquipmentAreaInt32']; for k,v in pairs(Slots[Area]) do for i=1,v do ID = PD:GetItemInEquipSlot2(k, i - 1); if ID.tdbid.hash ~= 0 then itemdata = TS:GetItemData(P, ID); SOID = itemdata:GetStatsObjectID(); itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(ID.tdbid..'.displayName')); itemTDBID = TDBID.ToStringDEBUG(ID.tdbid); WPStats = {'PowerLevel','ItemLevel', 'Quality', 'IsItemPlus','ItemPlusDPS', 'AttacksPerSecond', 'AttacksPerSecondBase', 'BaseChargeTime', 'BaseDamage', 'BaseDamageMax', 'BaseDamageMin', 'BonusDPS', 'BonusRecoilKick', 'CycleTime', 'CycleTimeAimBlockDuration', 'CycleTimeAimBlockStart', 'CycleTimeBase', 'CycleTimeBonus', 'CycleTimeDPSComponent', 'CycleTimeShootingMult', 'CycleTimeShootingMultPeriod', 'CycleTime_Burst', 'CycleTime_BurstMaxCharge', 'CycleTime_BurstSecondary', 'CycleTriggerModeTime', 'ClipTimesCycle', 'ClipTimesCycleBase', 'ClipTimesCyclePlusReload', 'ClipTimesCyclePlusReloadBase', 'Range', 'EffectiveRange', 'EffectiveRangeBonus', 'MaximumRange', 'EmptyReloadEndTime', 'EmptyReloadTime', 'MagazineCapacity', 'MagazineCapacityBase', 'MagazineCapacityBonus', 'MagazineCapacityDPSComponent', 'RecoilAnimation', 'RecoilDir', 'RecoilDriftRandomRangeMax', 'RecoilDriftRandomRangeMin', 'RecoilHoldDuration', 'RecoilKickMax', 'RecoilKickMin', 'RecoilMaxLength', 'ReloadEndTime', 'ReloadEndTimeBase', 'ReloadSpeedPercentBonus', 'ReloadSpeedPercentBonusModifierHelper', 'ReloadTime', 'ReloadTimeBase', 'ReloadTimeBonus', 'ReloadTimeDPSComponent', 'StaminaAimingCost', 'StaminaCostReduction', 'StaminaCostToBlock', 'StaminaDamage', 'StaminaDecayDelayOnChange', 'StaminaDecayEnabled', 'StaminaDecayEndThrehold', 'StaminaDecayRate', 'StaminaDecayStartDelay', 'StaminaDecayStartThreshold', 'StaminaRatio', 'StaminaRegenDelayOnChange', 'StaminaRegenEnabled', 'StaminaRegenEndThrehold', 'StaminaRegenRate', 'StaminaRegenRateAdd', 'StaminaRegenRateBase', 'StaminaRegenRateMult', 'StaminaRegenStartDelay', 'StaminaRegenStartThreshold', 'Sway', 'SwayCenterMaximumAngleOffset', 'SwayCurvatureMaximumFactor', 'SwayCurvatureM(紅色部分刪除後使用)inimumFactor', 'SwayInitialOffsetRandomFactor', 'SwayResetOnAimStart', 'SwaySideBottomAngleLimit', 'SwaySideMaximumAngleDistance', 'SwaySideMinimumAngleDistance', 'SwaySideStepChangeMaximumFactor', 'SwaySideStepChangeMinimumFactor', 'SwaySideTopAngleLimit', 'SwayStartBlendTime', 'SwayStartDelay', 'SwayTraversalTime'}; if itemdata:HasTag('Weapon') then print(' \n\t[ Weapon Slot '..i..' ] '..itemName.. '\t( "'..itemTDBID..'" )') for v,Stat in next, WPStats do local MinVal = string.format('%i', TweakDB:GetFlat('BaseStats.'..Stat..'.min')); local MaxVal = string.format('%i', TweakDB:GetFlat('BaseStats.'..Stat..'.max')); local enumComment = TweakDB:GetFlat('BaseStats.'..Stat..'.enumComment'); itemStat = SS:GetStatValue(SOID, Stat); print('\t\t'..string.format('%f', itemStat)..'\t->\t'..Stat..' ( Min: '..MinVal..' / Max: '..MaxVal..' )'..' - EnumComment : '..enumComment) end print('END.\n ') end end end end
獲取遊戲內物品名稱 print(Game.GetLocalizedTextByKey(TDB.GetLocKey('ITEM_ID_HERE.displayName')))
獲取遊戲內物品描述 print(Game.GetLocalizedTextByKey(TDB.GetLocKey('ITEM_ID_HERE.localizedDescription')))
獲取遊戲內物品的類名 local ents = Game.GetEntityList(); for i, v in ipairs(ents) do local name = v:GetClassName().value; print('\tFound class : '..name) end
獲取插槽中物品的TweakDBID area = "Weapon"; slot = 1; itemInSlot = Game.GetScriptableSystemsContainer():Get("EquipmentSystem").GetItemsInArea(Game.GetPlayer(), gamedataEquipmentArea[area]); print(' \n\tID found in '..area..' Slot '..slot..':\n\t"'..TDBID.ToStringDEBUG(itemInSlot[slot]:GetTDBID())..'" \n ')
獲取每個插槽中物品的TweakDBID areaEnum = { "Weapon", "Head", "Face", "OuterChest", "InnerChest", "Legs", "Feet", "Outfit", "AbilityCW", "BaseFists", "Consumable", "CyberwareWheel", "Gadget", "PersonalLink", "PlayerTattoo", "QuickSlot", "RightArm", "SilverhandArm", "Splinter", "UnderwearBottom", "UnderwearTop", "VDefaultHandgun", "WeaponHeavy", "WeaponWheel", }; null = ""; print(" \n") getSlots = function() for i,name in next, areaEnum do area = gamedataEquipmentArea[name]; slots = Game.GetScriptableSystemsContainer():Get("EquipmentSystem").GetItemsInArea(Game.GetPlayer(), area); slotTweakID = TDBID.ToStringDEBUG(slots[1]:GetTDBID()) if not slots or not slotTweakID then return else if name == "Weapon" then for i,n in next, {1,2,3} do weapSlotID = TDBID.ToStringDEBUG(slots[n]:GetTDBID()); if weapSlotID == null then print(name..' [slot '..n..'] : ') else print(name..' [slot '..n..'] : "'..weapSlotID..'"') end end end if slotTweakID == null then print(name..': ') else print(name..': "'..slotTweakID..'"') end end end end getSlots()
獲取每個插槽中義體的TweakDBID areaEnum = {"FrontalCortexCW","ArmsCW","MusculoskeletalSystemCW","NervousSystemCW","IntegumentarySystemCW","SystemReplacementCW","EyesCW","HandsCW","CardiovascularSystemCW","LegsCW"}; null = ""; for i,name in next, areaEnum do area = gamedataEquipmentArea[name]; slots = Game.GetScriptableSystemsContainer():Get("EquipmentSystem").GetItemsInArea(Game.GetPlayer(), area); slotTweakID = TDBID.ToStringDEBUG(slots[1]:GetTDBID()) if not slots or not slotTweakID then return else if name == "FrontalCortexCW" or name == "MusculoskeletalSystemCW" or name == "NervousSystemCW" or name == "IntegumentarySystemCW" or name == "CardiovascularSystemCW" then for i,n in next, {1,2,3} do if slots[n] then tempSlotID = TDBID.ToStringDEBUG(slots[n]:GetTDBID()); if tempSlotID == null then print(name..' [slot '..n..'] : < NOTHING FOUND >') else print(name..' [slot '..n..'] : "'..tempSlotID..'"') end end end elseif name == "HandsCW" then for i,n in next, {1,2} do if slots[n] then tempSlotID = TDBID.ToStringDEBUG(slots[n]:GetTDBID()); if tempSlotID == null then print(name..' [slot '..n..'] : < NOTHING FOUND >') else print(name..' [slot '..n..'] : "'..tempSlotID..'"') end end end else if slotTweakID == null then print(name..': < NOTHING FOUND >') else print(name..': "'..slotTweakID..'"') end end end end print(" \n")
獲取背包中組件的TweakDBID function getIDs() local P = Game.GetPlayer(); local TS = Game.GetTransactionSystem(); local INV = {TS:GetItemList(P)}; for i, v in ipairs(INV[2]) do local itemID = TDBID.ToStringDEBUG(v:GetID().id); local itemName = Game.GetLocalizedTextByKey(TDB.GetLocKey(itemID..'.displayName')); local quantity = TS:GetItemQuantity(P, v:GetID()); if itemName == '' then itemName = '< no name >'; end print('\t- Found\t->\t'..quantity..' x '..itemName..'\t( ItemID : "'..itemID..'" )') end end getIDs()
獲取背包中物品的TweakDBID targetType = "ALL"; itemType = {}; itemType.ALL = { Prt_AR_SMG_LMGMod = true, Prt_BlaDemod = true, Prt_BluntMod = true, Prt_BootsFabricEnhancer = true, Prt_Capacitor = true, Prt_FabricEnhancer = true, Prt_FaceFabricEnhancer = true, Prt_Fragment = true, Prt_HandgunMod = true, Prt_HandgunMuzzle = true, Prt_HeadFabricEnhancer = true, Prt_LongScope = true, Prt_Magazine = true, Prt_MeleeMod = true, Prt_Mod = true, Prt_Muzzle = true, Prt_OuterTorsoFabricEnhancer = true, Prt_PantsFabricEnhancer = true, Prt_PowerMod = true, Prt_PowerSniperScope = true,Prt_Precision_Sniper_RifleMod = true, Prt_Program = true, Prt_RangedMod = true, Prt_Receiver = true, Prt_RifleMuzzle = true, Prt_Scope = true, Prt_ScopeRail = true, Prt_ShortScope = true, Prt_ShotgunMod = true, Prt_SmartMod = true, Prt_Stock = true, Prt_TargetingSystem = true, Prt_TechMod = true, Prt_TechSniperScope = true, Prt_ThrowableMod = true, Prt_TorsoFabricEnhancer = true, Wea_AssaultRifle = true, Wea_Axe = true, Wea_Chainsword = true, Wea_Fists = true, Wea_GrenadeLauncher = true, Wea_Hammer = true, Wea_Handgun = true, Wea_HeavyMachineGun = true, Wea_Katana = true, Wea_Knife = true, Wea_LightMachineGun = true, Wea_LongBlade = true, Wea_Machete = true, Wea_Melee = true, Wea_OneHandedClub = true, Wea_PrecisionRifle = true, Wea_Revolver = true, Wea_Rifle = true, Wea_ShortBlade = true, Wea_Shotgun = true, Wea_ShotgunDual = true, Wea_SniperRifle = true, Wea_SubmachineGun = true, Wea_Sword = true, Wea_TwoHandedClub = true, Clo_Face = true, Clo_Feet = true, Clo_Head = true, Clo_InnerChest = true, Clo_Legs = true, Clo_OuterChest = true, Clo_Outfit = true, Cyb_Launcher = true, Cyb_MantisBlades = true, Cyb_NanoWires = true, Cyb_StrongArms = true, Cyb_Ability = true, Cyberware = true }; P = Game.GetPlayer(); SS = Game.GetStatsSystem(); TS = Game.GetTransactionSystem(); INV = {TS:GetItemList(P)}; for i, v in ipairs(INV[2]) do iID = v:GetID(); itemdata = TS:GetItemData(P, v:GetID()); SOID = itemdata:GetStatsObjectID(); IDT = itemdata:GetItemType().value; vType = Game['gameRPGManager::GetItemType;ItemID'](iID); newTargetType = itemType[targetType]; itemtwdbid = TDBID.ToStringDEBUG(iID:GetTDBID()) local PlayerPowerLevel = SS:GetStatValue(P:GetEntityID(), 'PowerLevel'); local ItemLevel = SS:GetStatValue(SOID, 'ItemLevel'); local ItemPowerLevel = SS:GetStatValue(SOID, 'PowerLevel'); local ItemQuality = SS:GetStatValue(SOID, 'Quality'); local ItemPlusLevel = SS:GetStatValue(SOID, 'IsItemPlus'); local ItemPlusDPS = SS:GetStatValue(SOID, 'ItemPlusDPS'); if not string.find(IDT, "Fists") then if newTargetType[IDT] then print(' --- PLAYER POWER LEVEL: ' ..PlayerPowerLevel) print(' - ITEM: ', Game.GetLocalizedTextByKey(TDB.GetLocKey(iID.id..'.displayName'))..' - ID: "'..TDBID.ToStringDEBUG(iID:GetTDBID())..'"' ) print(' - ITEM TYPE: '..IDT) print(' - ITEM QUALITY: ' ..ItemQuality) if string.find(IDT, "Wea_") or string.find(IDT, "Prt_") or string.find(IDT, "Cyb") or string.find(IDT, "Clo_") then print(' - ITEM LEVEL: ' ..ItemLevel) print(' - ITEM POWER LEVEL: ' ..ItemPowerLevel) print(' - ITEM PLUS LEVEL: ' ..ItemPlusLevel) print(' - ITEM PLUS DPS: ' ..string.format('%f', ItemPlusDPS)) end print('-----------------------------------') end end end
使用標籤關鍵字搜索獲取記錄 local TagKeyword = "Quest"; local records = TweakDB:GetRecords('gamedataItem_Record'); for i, rec in next, records do local TDID = TDBID.ToStringDEBUG(rec:GetID()); Tags = TweakDB:GetFlat(TDID..'.tags'); if Tags then for k, tag in next, Tags do if tag.value == TagKeyword then print('\t\"'..TDID..'\"\t->\t'..tag.value) end end end end print('\n ')
獲取遊戲資料 records = TweakDB:GetRecords('gamedataVehicle_Record') for _, record in ipairs(records) do print(TDBID.ToStringDEBUG(record:GetID())) end
獲取遊戲資料(加本地化名稱,圖示路徑) num = 0; records = TweakDB:GetRecords('gamedataItem_Record'); for _, record in ipairs(records) do if record:GetID() then num = num + 1; recTweakDBID = TDBID.ToStringDEBUG(record:GetID()); iconPath = record:IconPath(); recDisplName = Game.GetLocalizedTextByKey(TDB.GetLocKey(record:GetID() .. ".displayName")); print(num+1 ..'\tID: "'..recTweakDBID..'"\tdisplayName: '..recDisplName..'\tIconPath: '..iconPath) end end
獲取遊戲資料(加本地化名稱,圖示路徑,裝備區域) num = 0; records = TweakDB:GetRecords('gamedataItem_Record'); for _, record in ipairs(records) do if record:GetID() then num = num + 1; recTweakDBID = TDBID.ToStringDEBUG(record:GetID()); recDisplName = Game.GetLocalizedTextByKey(TDB.GetLocKey(record:GetID() .. ".displayName")); recQuality = record:Quality():Type().value; recItemType = record:ItemType():Type().value; if not record:EquipArea() then print('\tID: "'..recTweakDBID..'"\tdisplayName: '..recDisplName..'\tQuality: '..recQuality..'\titemType: '..recItemType..'\tequipArea: null') else local recEquiArea = record:EquipArea():Type().value; print('\tID: "'..recTweakDBID..'"\tdisplayName: '..recDisplName..'\tQuality: '..recQuality..'\titemType: '..recItemType..'\tequipArea: '..recEquiArea) end end end print(" - FOUND "..num.." Ids.")
轉儲類型 T = Game.GetPlayer() D = Dump(T, false) print(D)
靜態轉儲 T = DumpType("gameBlackboardSystem", false) print(T)
轉儲目標屬性 object = Game.GetPlayer(); print(" \n ", "\t"..GameDump(object), " \n ")
來源:遊俠網