作弊代码列表
作弊
钱+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 ")