Thank you for sharing. But, how do I use it? Requirements: UE4SS < Follow this link and for more info Readme GMTrainer < LuaScript (this mod)
I asked Claude if This 'mod' is just adding keybinds to native cheats? It's not a created menu or traditional cheat trainer?
Existing Game Cheats: The cheats and GUI you're seeing are likely already built into the game, possibly for developer testing or debugging purposes.
Lua Script Function: This Lua script is not creating these cheats or the GUI. Instead, it's providing easier access to them through key bindings.
Key Bindings: The main purpose of this Lua script is to set up key bindings (like F1, F2, F3, etc.) that activate these pre-existing cheat functions.
Native Function Calls: When you press these keys, the script calls native game functions that were already implemented in the game's code.
GM GUI: The GUI with Chinese text is probably a built-in "Game Master" or debug interface, activated by the GM() function when you press F1.
Limited Modification: This script isn't creating new functionality; it's just providing shortcuts to existing game features.
So yes, your assessment is correct. This 'mod' is essentially just adding convenient key bindings to activate cheats and debug features that are already present in the game. It's not creating these features from scratch in Lua. If you want to build upon this, you'd likely need to:
Understand the existing native functions you can call.
Potentially find ways to combine or sequence these functions for new effects.
Possibly inject new Lua code that interacts with the game in more complex ways, if the modding system allows for it.
Trying to figure out how to translate the menu to English has been an interesting journey. Protip: Download the zDEV version or if you're using this 'mod' Change the UE4SS-settings.ini line to [Debug] ; Whether to enable the external UE4SS debug console. ConsoleEnabled = 1 GuiConsoleEnabled = 1 GuiConsoleVisible = 1
This will let you troubleshoot the trainer by displaying a console and gui when you launch the game. This modhas it's own Lua that outputs on it when you press one of the hotkeys.
Hidden extras? Examine the comments in the Lua that are in English. I color coded a little bit to match what my theme does on Visual Studio Code. It helps figure out what the cheat is doing and I was hoping it would have stuff to just change to English. no such luck.
RegisterKeyBind(Key.F5, {}, function() print("[XDT] F5 Modify Character") local chars = GetCharacters() -- local cm = FindCM() -- mchar = cm.GetMasterCharacter() -- print(string.format("%d", mchar.AbilityPoint)) for index, char in pairs( chars ) do if true then -- print(char.CharacterNewName) char_name = char.CharacterNewName char_ap = char.AbilityPoint print(string.format("%s Ability Point: %d", char_name , char_ap )) if char_ap == 103 then print("get_target") local char_appear_s = char.AppearanceID:get() local char_appear = char_appear_s.ID print(type(char_appear)) print(char_appear) end else print("Not valid or not player controlled\n") end end end)
local view_locked = false RegisterKeyBind(Key.F8, {}, function() print("[XDT] F8 Toggle Lock") if view_locked then FindPCC().UnlockPlayerView() else FindPCC().LockPlayerView() end view_locked = not view_locked end)
-- ) -- AmmoAttributeSet /Temp/Game/Outpost/Maps/BatchedLevel/Art/LootMap/General/Batched_OP_Map_E_Small_House01_Art_LevelInstance_8d54927f6e3e0cc3_1.Batched_OP_Map_E_Small_House01_Art:PersistentLevel.StaticMeshActor_347.AmmoAttributeSet -- BP_OP_Gun_CIWSTypeZero_C /Game/Outpost/Maps/Logic/AreaMap/Explore/World01/OP_Map_E_World01_Start.OP_Map_E_World01_Start:PersistentLevel.BP_OP_Gun_CIWSTypeZero_C_2147446052 -- BP_OP_Turret_ShootComponent_C /Game/Outpost/Maps/Logic/AreaMap/Explore/World01/OP_Map_E_World01_Start.OP_Map_E_World01_Start:PersistentLevel.BP_OP_Gun_CIWSTypeZero_C_2147446052.Turret_ShootComponent -- AmmoAttributeSet /Game/Outpost/Maps/Logic/AreaMap/Explore/World01/OP_Map_E_World01_Start.OP_Map_E_World01_Start:PersistentLevel.BP_OP_Gun_CIWSTypeZero_C_2147446052.AmmoAttributeSet_2147446029 RegisterKeyBind(Key.F9, function() print("F9") -- local weapons = FindAllOf("BP_OP_Gun_CIWSTypeZero_C") -- local weapons = FindObjects(10, nil, "AmmoAttributeSet", nil,nil, false ) local weapons = FindAllOf("AmmoAttributeSet") print('ammo') if not weapons then print("No instances of 'Actor' were found\n") else for i, w in pairs(weapons) do w_fullname = w:GetFullName() w_fname = w:GetFName() -- target_name = "BP_OP_Gun_CIWSTypeZero_C" target_name = "W_Turret_" target_name2 = "BP_OP_" if (string.find(w_fullname, target_name) or string.find(w_fullname, target_name2)) then print("found!") print(w_fullname)
33 comments
Stopped working after last update.still working
Also here are some item codes i found.
But, how do I use it?
Requirements: UE4SS < Follow this link and for more info Readme
GMTrainer < LuaScript (this mod)
I asked Claude if This 'mod' is just adding keybinds to native cheats? It's not a created menu or traditional cheat trainer?
- Existing Game Cheats: The cheats and GUI you're seeing are likely already built into the game, possibly for developer testing or debugging purposes.
- Lua Script Function: This Lua script is not creating these cheats or the GUI. Instead, it's providing easier access to them through key bindings.
- Key Bindings: The main purpose of this Lua script is to set up key bindings (like F1, F2, F3, etc.) that activate these pre-existing cheat functions.
- Native Function Calls: When you press these keys, the script calls native game functions that were already implemented in the game's code.
- GM GUI: The GUI with Chinese text is probably a built-in "Game Master" or debug interface, activated by the
- Limited Modification: This script isn't creating new functionality; it's just providing shortcuts to existing game features.
So yes, your assessment is correct. This 'mod' is essentially just adding convenient key bindings to activate cheats and debug features that are already present in the game. It's not creating these features from scratch in Lua.GM()
function when you press F1.If you want to build upon this, you'd likely need to:
- Understand the existing native functions you can call.
- Potentially find ways to combine or sequence these functions for new effects.
- Possibly inject new Lua code that interacts with the game in more complex ways, if the modding system allows for it.
Trying to figure out how to translate the menu to English has been an interesting journey. Protip: Download the zDEV version or if you're using this 'mod'Change the UE4SS-settings.ini line to
[Debug]
; Whether to enable the external UE4SS debug console.
ConsoleEnabled = 1
GuiConsoleEnabled = 1
GuiConsoleVisible = 1
This will let you troubleshoot the trainer by displaying a console and gui when you launch the game. This modhas it's own Lua that outputs on it when you press one of the hotkeys.
Hidden extras?
Examine the comments in the Lua that are in English. I color coded a little bit to match what my theme does on Visual Studio Code. It helps figure out what the cheat is doing and I was hoping it would have stuff to just change to English. no such luck.
-- ==========================================================================
-- Xenium Dubug Trainer ------------------------------------------------------
--
-- Description:
-- Enable GM console
-- Enable Enemy scan
-- TODO: handle chat to execute command
-- scanner
-- MaxAmmo x3 Resupply Ammo x2
--
-- Author:
-- Xe-No
--
-- Credits:
-- leave-l
--
-- Time: 2024-4-16 01:41:32
-- ==========================================================================
local function handleException(err)
-- 在这里处理异常,例如打印错误信息
local traceback = debug.traceback(err, 2)
print( err)
print(traceback)
end
local UEHelpers = require("UEHelpers")
print("[XDT] Mod loaded\n")
local function execute(self)
print("[XDT] Player initialized.")
end
local function handle_chat(self)
print("[XDT] chat checked")
end
local function handle_reload(OldValue)
print("[XDT] Reloading!" .. OldValue)
end
local function FindPCC()
return FindFirstOf("BP_OP_PlayerCheatComponent_C")
end
local function FindCM()
return FindFirstOf("OPCharacterManager")
end
local function Give(item_name, item_num)
FindPCC().AddWareItem(FName(item_name), item_num)
end
local function HandleAdd()
print('dsasdas')
end
local function GetCharacters()
return FindAllOf("OPCharacterData")
end
RegisterKeyBind(Key.F1, {}, function()
print("[XDT] Key F1 pressed\n")
FindPCC().GM()
end)
RegisterKeyBind(Key.F2, {}, function()
print("[XDT] Key F2 pressed\n")
FindPCC().Godlike()
end)
RegisterKeyBind(Key.F3, {}, function()
print("[XDT] F3 scan enemies\n")
-- FindPCC().ToggleMonsterHPBar()
FindPCC().MarkAllMonsters()
end)
RegisterKeyBind(Key.F4, {}, function()
print("[XDT] F4 Toggle Lock")
end)
RegisterKeyBind(Key.F5, {}, function()
print("[XDT] F5 Modify Character")
local chars = GetCharacters()
-- local cm = FindCM()
-- mchar = cm.GetMasterCharacter()
-- print(string.format("%d", mchar.AbilityPoint))
for index, char in pairs( chars ) do
if true then
-- print(char.CharacterNewName)
char_name = char.CharacterNewName
char_ap = char.AbilityPoint
print(string.format("%s Ability Point: %d", char_name , char_ap ))
if char_ap == 103 then
print("get_target")
local char_appear_s = char.AppearanceID:get()
local char_appear = char_appear_s.ID
print(type(char_appear))
print(char_appear)
end
else
print("Not valid or not player controlled\n")
end
end
end)
-- RegisterKeyBind(Key.F4, {}, function()
-- print("[XDT] F4 add basic material\n")
-- -- Give("M_BaseMaterial", 50)
-- local s#*! = FName("M_BaseMaterial")
-- FindPCC().AddWareItem(s#*! , 1, false)
-- Give("M_C", 50)
-- Give("M_Al", 50)
-- Give("M_Alloy", 50)
-- Give("M_FeOre", 50)
-- end)
-- RegisterKeyBind(Key.F5, {}, function()
-- print("[XDT] F5 add legendary material\n")
-- Give("M_Repeater", 1)
-- Give("M_NukeMat", 1)
-- Give("M_XeniumPlant", 1)
-- Give("M_XeniumRareEarth", 1)
-- Give("M_QuantumChip", 1)
-- Give("M_QuantumChip", 1)
-- end)
-- RegisterKeyBind(Key.F6, {}, function()
-- print("[XDT] F6 add basic turret material\n")
-- Give("M_TurretBarror", 1)
-- Give("M_TurretBody", 1)
-- Give("M_TurretFundation", 1)
-- end)
-- RegisterKeyBind(Key.F9, {}, function()
-- print("[XDT] F9 revive")
-- FindPCC().ReviveSelf()
-- end)
-- RegisterKeyBind(Key.F4, {}, function()
-- print("[XDT] F4 PrintHeroLocation")
-- FindPCC().PrintHeroLocation()
-- end)
-- RegisterKeyBind(Key.F5, {}, function()
-- print("[XDT] F5 Add Bullets")
-- FindPCC().ResetCharacterPos()
-- end)
-- RegisterKeyBind(Key.F6, {}, function()
-- print("[XDT] F6 Add 1000XP")
-- FindPCC().AddGlobalExp(1000)
-- end)
local view_locked = false
RegisterKeyBind(Key.F8, {}, function()
print("[XDT] F8 Toggle Lock")
if view_locked then
FindPCC().UnlockPlayerView()
else
FindPCC().LockPlayerView()
end
view_locked = not view_locked
end)
-- crashed function
-- FindPCC().AddBullet()
-- RegisterKeyBind(Key.F8, {}, function()
-- local weapon = StaticFindObject("/Script/Outpost.OPWeaponRowType")
-- print(type(weapon))
-- end)
-- )
-- AmmoAttributeSet /Temp/Game/Outpost/Maps/BatchedLevel/Art/LootMap/General/Batched_OP_Map_E_Small_House01_Art_LevelInstance_8d54927f6e3e0cc3_1.Batched_OP_Map_E_Small_House01_Art:PersistentLevel.StaticMeshActor_347.AmmoAttributeSet
-- BP_OP_Gun_CIWSTypeZero_C /Game/Outpost/Maps/Logic/AreaMap/Explore/World01/OP_Map_E_World01_Start.OP_Map_E_World01_Start:PersistentLevel.BP_OP_Gun_CIWSTypeZero_C_2147446052
-- BP_OP_Turret_ShootComponent_C /Game/Outpost/Maps/Logic/AreaMap/Explore/World01/OP_Map_E_World01_Start.OP_Map_E_World01_Start:PersistentLevel.BP_OP_Gun_CIWSTypeZero_C_2147446052.Turret_ShootComponent
-- AmmoAttributeSet /Game/Outpost/Maps/Logic/AreaMap/Explore/World01/OP_Map_E_World01_Start.OP_Map_E_World01_Start:PersistentLevel.BP_OP_Gun_CIWSTypeZero_C_2147446052.AmmoAttributeSet_2147446029
RegisterKeyBind(Key.F9, function()
print("F9")
-- local weapons = FindAllOf("BP_OP_Gun_CIWSTypeZero_C")
-- local weapons = FindObjects(10, nil, "AmmoAttributeSet", nil,nil, false )
local weapons = FindAllOf("AmmoAttributeSet")
print('ammo')
if not weapons then
print("No instances of 'Actor' were found\n")
else
for i, w in pairs(weapons) do
w_fullname = w:GetFullName()
w_fname = w:GetFName()
-- target_name = "BP_OP_Gun_CIWSTypeZero_C"
target_name = "W_Turret_"
target_name2 = "BP_OP_"
if (string.find(w_fullname, target_name) or string.find(w_fullname, target_name2)) then
print("found!")
print(w_fullname)
-- print(tostring(w.CurAmmo.CurrentValue) )
-- print(tostring(w.MaxAmmo.CurrentValue) )
max_ammo = 999999.0
w.CurAmmo.BaseValue = max_ammo
w.CurAmmo.CurrentValue = max_ammo - 1
w.MaxAmmo.BaseValue = max_ammo
w.MaxAmmo.CurrentValue = max_ammo
-- print(tostring(w.MaxAmmo.CurrentValue) )
end
-- print(string.format("[%d] %s \n %s \n", i, w_fullname, w_fname))
-- print(w.bBlockInput)
-- local w2= w.AmmoAttributeSet.CurAmmo.BaseValue
-- local success, result = pcall(function()
-- print(w2)
-- end)
-- local w3 = w2["CurAmmo"]["BaseValue"]['dasdasd']
-- if not success then
-- print('Failed')
-- handleException(result)
-- end
end
end
end)
-- AmmoAttributeSet /Game/Outpost/Maps/Logic/AreaMap/Explore/World02/OP_Map_E_World02_Start.OP_Map_E_World02_Start:PersistentLevel.BP_OP_Gun_CIWSTypeZero_C_2147445877.AmmoAttributeSet_2147445854
-- BP_OP_Gun_CIWSTypeZero_C_2147454603.AmmoAttributeSet
RegisterHook("/Script/Engine.PlayerController:ClientRestart", execute)
-- RegisterHook("/Script/Outpost.AmmoAttributeSet:OnRep_MaxAmmo", handle_reload)
-- RegisterHook("/Script/Outpost.AmmoAttributeSet:OnRep_CurAmmo", handle_reload)
-- RegisterHook("/Game/Outpost/Blueprints/GameModule/Cheat/BP_OP_PlayerCheatComponent:AddWareItem", HandleAdd)
-- RegisterHook("/Script/Engine.DataTableFunctionLibrary:EvaluateCurveTableRow", execute)
It needs the Mod Unlocker installed to make it work. Took me 2 monitors to figure that one out!