Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Source/Docs/commands.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ cheat_add_buff_invisible
cheat_add_item
cheat_add_money
cheat_add_perk
cheat_add_potion_buff
cheat_add_stat_xp
cheat_charm
cheat_damage_all_items
cheat_eval
cheat_find_buffs
Expand Down Expand Up @@ -60,5 +62,6 @@ cheat_teleport_horse
cheat_teleport_npc_to_loc
cheat_teleport_npc_to_player
cheat_teleport_to
cheat_tp_to_npc
cheat_unlock_recipes
cheat_wash_dirt_and_blood
9 changes: 9 additions & 0 deletions Source/Libs/Tables/rpg/buff__JoewAlabel_Cheat.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<database name="hammerheart">
<table name="buff" version="1">
<rows>
<!-- Invisibility -->
<!-- Vanilla params="vib=-10,con=-10" -->
<row buff_ai_tag_id="" buff_class_id="1" buff_desc="" buff_exclusivity_id="1" buff_id="cf787871-d151-43b7-a7c9-39acac116f0f" buff_lifetime_id="0" buff_name="invisibility" buff_ui_name="" buff_ui_order="" buff_ui_type_id="" buff_ui_visibility_id="" duration="-1" icon_id="0" implementation="Cpp:Constant" is_persistent="True" params="evi-300,lpv-300,con-300,noi-300" slot_buff_ui_name="" slot_icon_id="" visual_effect="" />
</rows>
</table>
</database>
38 changes: 34 additions & 4 deletions Source/Scripts/cheat_core_buffs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,38 @@ function cheat:cheat_add_buff(line)
return false
end

-- ============================================================================
-- cheat_add_potion_buff
-- ============================================================================
System.AddCCommand('cheat_add_potion_buff', 'cheat:add_potion_buff(%line)', "Usage: cheat_add_potion_buff id:number\n$8Adds a potion buff to the player. Supported buffs:\n$8 1. Nighthawk\n$8 2. Aqua Vitalis\n$8 3. Buck's Blood\n$8 4. Marigold potion\n$8 5. Lazarus potion\n$8 6. Hair o' the Dog potion")
function cheat:add_potion_buff(line)
local args = string.gsub(tostring(line), "id:", "")
local checkteste = "error"

local ids = {}
ids["1"] = "id:fa2ad41e-5701-4fe7-8630-5cee49eb304f"
ids["2"] = "id:27c2fd6a-9b87-4d1f-b434-44f5ec3fa426"
ids["3"] = "id:122c0e62-747e-4bb3-9650-1a14d0420b08"
ids["4"] = "id:8503216a-a34c-49f0-aefa-54d4502046f9"
ids["5"] = "id:7690a860-a843-4609-8a67-9868b87b32b5"
ids["6"] = "id:3f915710-1ccf-41a0-bc7f-67c8cc1a8e7b"

if ids[args] ~= nil then
cheat:cheat_add_buff(ids[args])
else
for k,v in pairs(ids) do
if string.find(k, args) then
checkteste = v
end
end
if checkteste ~= "error" then
cheat:cheat_add_buff(checkteste)
else
cheat:logError("Invalid Buff - See list of supported potion buffs: 'cheat_add_potion_buff ?'")
end
end
end

-- ============================================================================
-- cheat_remove_buff
-- ============================================================================
Expand Down Expand Up @@ -197,11 +229,10 @@ end
-- cheat_add_buff_invisible
-- ============================================================================
cheat:createCommand("cheat_add_buff_invisible", "cheat:cheat_add_buff_invisible()", nil,
"Adds invisible buff to player. For now this just sets conspicuousness to zero.\n$8Use cheat_remove_buff_invisible to remove this.",
"Adds invisible buff to player. Should set visibility, conspicuousness and noise to zero.\n$8Use cheat_remove_buff_invisible to remove this.",
"Add invisible buff to player", "cheat_add_buff_invisible")
function cheat:cheat_add_buff_invisible()
cheat:cheat_add_buff("id:cf787871-d151-43b7-a7c9-39acac116f0f") -- vib=-10,con=-10
cheat:cheat_add_buff("id:07db9dfd-0e0c-4cbe-bf8a-10aaa1add262") -- ors=-1
cheat:cheat_add_buff("id:cf787871-d151-43b7-a7c9-39acac116f0f") -- tweaked using patched table files
cheat:logInfo("Invisibility buff added.")
return true
end
Expand All @@ -214,7 +245,6 @@ cheat:createCommand("cheat_remove_buff_invisible", "cheat:cheat_remove_buff_invi
"Remove invisible buff from player", "cheat_remove_buff_invisible")
function cheat:cheat_remove_buff_invisible()
cheat:cheat_remove_buff("id:cf787871-d151-43b7-a7c9-39acac116f0f")
cheat:cheat_remove_buff("id:07db9dfd-0e0c-4cbe-bf8a-10aaa1add262")
cheat:logInfo("Invisibility buff removed.")
return true
end
Expand Down
48 changes: 48 additions & 0 deletions Source/Scripts/cheat_core_player.lua
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,41 @@ function cheat:teleport_to(line)
end
end

-- ============================================================================
-- cheat_tp_to_npc
-- ============================================================================
cheat.cheat_tp_to_npc_args = {
id=function(args,name,showHelp) return cheat:argsGetRequired(args, name, showHelp, "All or part of the NPC's name.") end,
num=function(args,name,showHelp) return cheat:argsGetOptionalNumber(args, name, 0, showHelp, "Optional: The NPC's number in the list if there's more than one.\n$8Keep it greater than 0.") end
}
cheat:createCommand("cheat_tp_to_npc", "cheat:cheat_tp_to_npc(%line)", cheat.cheat_tp_to_npc_args,
"Finds an NPC or list of NPCs and teleports to any of them.\n$8This only works if the NPC has been loaded into the world.\n$8Defaults to last NPC in the list if no num argument received.",
"Teleport to Father Godwin", "cheat_tp_to_npc id:godwin")
function cheat:cheat_tp_to_npc(line)
local args = cheat:argsProcess(line, cheat.cheat_tp_to_npc_args)
local id, idErr = cheat:argsGet(args, 'id', nil)
local num, numErr = cheat:argsGet(args, 'num', 0)
if not idErr and not numErr then
cheat:cheat_find_npc("token:" .. id)
local npcs = cheat:find_npc(id)
if num == nil or num <= 0 then
num = #npcs
end
if num > #npcs then
cheat:logError("Sorry, this number is greater than the amount of found NPCS.")
return
end
if npcs and #npcs > 0 then
local nx = npcs[num]:GetWorldPos().x
local ny = npcs[num]:GetWorldPos().y
local nz = npcs[num]:GetWorldPos().z
cheat:teleport("x:" .. nx .. " y:" .. ny .. " z:" .. nz)
else
cheat:logError("NPC [%s] not found.", id)
end
end
end

-- ============================================================================
-- cheat_set_state
-- ============================================================================
Expand Down Expand Up @@ -273,6 +308,19 @@ function cheat:cheat_wash_dirt_and_blood()
cheat:logInfo("All Clean!")
end

-- ============================================================================
-- cheat_charm
-- ============================================================================
cheat:createCommand("cheat_charm", "cheat:cheat_charm()", nil,
"Automates your morning routine of bath-haircut-sex for maximum Charisma bonus.\n$8Washes all dirt and blood and applies Fresh Cut and Smitten buffs.",
"Wash yourself and add Charisma buffs", "cheat_charm")
function cheat:cheat_charm()
cheat:cheat_wash_dirt_and_blood()
cheat:cheat_add_buff("id:fresh_cut")
cheat:cheat_add_buff("id:alpha_male_in_love")
cheat:logInfo("All Clean and dandy!")
end

-- cheat_unlock_recipes
-- ============================================================================
cheat:createCommand("cheat_unlock_recipes", "cheat:cheat_unlock_recipes()", nil,
Expand Down