Skip to content

Commit d02ca2e

Browse files
committed
replaced autocheat.txt with autocheat.lua
1 parent f7a2a41 commit d02ca2e

File tree

7 files changed

+867
-923
lines changed

7 files changed

+867
-923
lines changed

Source/Docs/commands.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,8 @@ cheat_add_item
88
cheat_add_money
99
cheat_add_perk
1010
cheat_add_stat_xp
11-
cheat_auto_exec
1211
cheat_damage_all_items
1312
cheat_eval
14-
cheat_exec_delay
15-
cheat_exec_file
1613
cheat_find_buffs
1714
cheat_find_horses
1815
cheat_find_items

Source/Docs/help.txt

Lines changed: 12 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,9 @@ Finds all of the items that match the given token.
185185
Adds an item to the player's inventory.
186186

187187
[b]Arguments:[/b]
188-
amount: (optional number) The number of items to add. Default 1.
189188
id: (required) The item ID or all or part of a the item's name. Uses last match from cheat_find_items.
190189
health: (optional number) The condition of the item added. Default 100.
190+
amount: (optional number) The number of items to add. Default 1.
191191

192192
[b]Examples:[/b]
193193
Adds the last item with 'bow' in its name:
@@ -214,8 +214,8 @@ Adds all items the player's inventory. This is probably a bad idea...
214214
Removes an item to the player's inventory.
215215

216216
[b]Arguments:[/b]
217-
id: (required) The item ID or all or part of a the item's name. Uses last match from cheat_find_items.
218217
amount: (optional number) The number of items to remove. Default 1.
218+
id: (required) The item ID or all or part of a the item's name. Uses last match from cheat_find_items.
219219

220220
[b]Examples:[/b]
221221
Removes the last item with 'bow' in its name:
@@ -498,8 +498,8 @@ Sets one of the player's states to the given value.
498498
Adds XP to one of the player's stats.
499499

500500
[b]Arguments:[/b]
501-
xp: (required number) The desired XP to add.
502501
stat: (required) One of: str, agi, vit, or spc.
502+
xp: (required number) The desired XP to add.
503503

504504
[b]Examples:[/b]
505505
Add 100 XP to player's strength stat:
@@ -511,8 +511,8 @@ Adds XP to one of the player's stats.
511511
Sets one of the player's stats to the given level.
512512

513513
[b]Arguments:[/b]
514-
level: (required number) The desired level for the given stat (max 20). Level cannot lowered.
515514
stat: (required) One of: str, agi, vit, or spc.
515+
level: (required number) The desired level for the given stat (max 20). Level cannot lowered.
516516

517517
[b]Examples:[/b]
518518
Set player's strength to level 20:
@@ -715,12 +715,12 @@ This only works if the NPC has been loaded into the world.
715715
Teleports one or more NPCs to the given coordinates. Use cheat_loc to get locations.
716716

717717
[b]Arguments:[/b]
718-
max: (optional number) The maximum NPCs to teleport. Default 10.
719-
radius: (optional number) The teleport radius around the x,y,z target. Default 5.
720-
y: (required number) Y coordinate.
721-
token: (required) All or part of a the NPC's name.
722718
z: (required number) Z coordinate.
719+
y: (required number) Y coordinate.
723720
x: (required number) X coordinate.
721+
radius: (optional number) The teleport radius around the x,y,z target. Default 5.
722+
max: (optional number) The maximum NPCs to teleport. Default 10.
723+
token: (required) All or part of a the NPC's name.
724724

725725
[b]Examples:[/b]
726726
Teleport Father Godwin to somewhere...:
@@ -732,8 +732,8 @@ Teleports one or more NPCs to the given coordinates. Use cheat_loc to get locati
732732
Teleports one or more NPCs to the player's location.
733733

734734
[b]Arguments:[/b]
735-
max: (optional number) The maximum NPCs to teleport. Default 10.
736735
radius: (optional number) The teleport radius around the player. Default 5.
736+
max: (optional number) The maximum NPCs to teleport. Default 10.
737737
token: (required) All or part of a the NPC's name.
738738

739739
[b]Examples:[/b]
@@ -758,9 +758,9 @@ For some reason most of the animals and some bandits/cuman just stand around. No
758758
The spawned entities are not managed so you should kill them off or load a clean save.
759759

760760
[b]Arguments:[/b]
761-
class: (required) bandit|cuman|hare|horse|boar|sheep|pig|cow|buck|doe|reddeer
762-
count: (optional number) Number of things to spawn. Default 1.
763761
radius: (optional number) The spawn radius around the player. Default 5.
762+
count: (optional number) Number of things to spawn. Default 1.
763+
class: (required) bandit|cuman|hare|horse|boar|sheep|pig|cow|buck|doe|reddeer
764764

765765
[b]Examples:[/b]
766766
Spawn 10 bandits:
@@ -802,41 +802,10 @@ Sets the weather to the given weather ID.
802802
7 = dream
803803

804804
[b]Arguments:[/b]
805-
id: (required number) The weather type ID.
806805
delay: (optional number) The number of hours to delay the transition. Default 0.
806+
id: (required number) The weather type ID.
807807

808808
[b]Examples:[/b]
809809
Set weather to foggy storm:
810810
cheat_set_weather id:6
811811

812-
813-
814-
[size=4][b]cheat_exec_delay[/b][/size]
815-
Sets the number of milliseconds to delay execution of the next command.
816-
817-
[b]Arguments:[/b]
818-
ms: (required number) The number of milliseconds to delay the next command.
819-
820-
[b]Examples:[/b]
821-
1 second delay:
822-
cheat_exec_delay ms:1000
823-
824-
825-
826-
[size=4][b]cheat_exec_file[/b][/size]
827-
Executes a file of console commands. Use an absolute path or
828-
path relative to SteamLibrary\steamapps\common\KingdomComeDeliverance.
829-
830-
[b]Arguments:[/b]
831-
file: (required) The file to execute.
832-
833-
[b]Examples:[/b]
834-
Manually run autocheat.txt:
835-
cheat_exec_file file:Data\autocheat.txt
836-
837-
838-
839-
[size=4][b]cheat_auto_exec[/b][/size]
840-
This command does nothing and is here for documentation only.
841-
You can run cheat commands automatically when a level loads by placing them in file Datautocheat.txt.
842-
This is useful for commands that are not permanent.

Source/Docs/mod_page.txt

Lines changed: 28 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,29 @@ steamapps\common\KingdomComeDeliverance\Mods\Cheat\Data\data.pak
3131
[/list]
3232

3333
[b][size=6]Autoexec Cheats[/size][/b]
34-
Since some cheats are temporary (they don't survive game restart) you can add cheats to a file named "autocheat.txt". Create steamapps\common\KingdomComeDeliverance\Data\autocheat.txt and place one console command per line in the file. This file is loaded and executed by Cheat mod when a level loads not when the game loads.
34+
Since some cheats are temporary (they don't survive game restart) you can add cheat commands to "Scripts\autocheat.lua" inside Mods\Cheat\Data\data.pak.
35+
This file is loaded and executed by Cheat mod when a level loads not when the game loads.
3536

36-
These are the 3 commands are have in my autocheat.txt for testing:
37-
cheat_eval cheat:logSetLevel(cheat.g_cheat_log_level_debug)
38-
cheat_set_bow_reticle enable:true
39-
cheat_set_regen enable:true state:stamina amount:10
37+
The data.pak file is a ZIP file so just edit the file from inside the zip.
38+
39+
These are the 3 commands are have in my autocheat.lua for testing:
40+
System.ExecuteCommand("cheat_eval cheat:logSetLevel(cheat.g_cheat_log_level_debug)")
41+
System.ExecuteCommand("cheat_set_bow_reticle enable:true")
42+
System.ExecuteCommand("cheat_set_regen enable:true state:stamina amount:10")
4043

4144
[b][size=6]Change Log[/size][/b]
4245

46+
[b]1.32[/b]
47+
[list]
48+
[*]Removed system for loading autocheat.txt since io.open no longer works
49+
[*]Merged new defaultProfile.xml
50+
[/list]
51+
52+
[b]1.32[/b]
53+
[list]
54+
[*]Removed use of io.getEnv so mod loads on 1.93
55+
[/list]
56+
4357
[b]1.31[/b]
4458
[list]
4559
[*]New command cheat_teleport_to from @pingpongmury
@@ -215,11 +229,8 @@ cheat_add_item
215229
cheat_add_money
216230
cheat_add_perk
217231
cheat_add_stat_xp
218-
cheat_auto_exec
219232
cheat_damage_all_items
220233
cheat_eval
221-
cheat_exec_delay
222-
cheat_exec_file
223234
cheat_find_buffs
224235
cheat_find_horses
225236
cheat_find_items
@@ -275,13 +286,11 @@ cheat_wash_dirt_and_blood
275286

276287

277288

278-
279289
[b][size=6]Command Documentation[/size][/b]
280290
[b]All of this information is available in game by running "command-name ?".[/b]
281291

282292

283293

284-
285294
[size=4][b]cheat_eval[/b][/size]
286295
Executes the given Lua code. This is not a cheat it is used for testing and debugging.
287296

@@ -468,8 +477,8 @@ Adds an item to the player's inventory.
468477

469478
[b]Arguments:[/b]
470479
id: (required) The item ID or all or part of a the item's name. Uses last match from cheat_find_items.
471-
health: (optional number) The condition of the item added. Default 100.
472480
amount: (optional number) The number of items to add. Default 1.
481+
health: (optional number) The condition of the item added. Default 100.
473482

474483
[b]Examples:[/b]
475484
Adds the last item with 'bow' in its name:
@@ -733,9 +742,9 @@ You can end up in the air or under the map.
733742
I suggest saving your game and turn on immortality first.
734743

735744
[b]Arguments:[/b]
745+
x: (required number) X coordinate
736746
z: (required number) Z coordinate
737747
y: (required number) Y coordinate
738-
x: (required number) X coordinate
739748

740749
[b]Examples:[/b]
741750
Example:
@@ -780,8 +789,8 @@ Sets one of the player's states to the given value.
780789
Adds XP to one of the player's stats.
781790

782791
[b]Arguments:[/b]
783-
xp: (required number) The desired XP to add.
784792
stat: (required) One of: str, agi, vit, or spc.
793+
xp: (required number) The desired XP to add.
785794

786795
[b]Examples:[/b]
787796
Add 100 XP to player's strength stat:
@@ -793,8 +802,8 @@ Adds XP to one of the player's stats.
793802
Sets one of the player's stats to the given level.
794803

795804
[b]Arguments:[/b]
796-
level: (required number) The desired level for the given stat (max 20). Level cannot lowered.
797805
stat: (required) One of: str, agi, vit, or spc.
806+
level: (required number) The desired level for the given stat (max 20). Level cannot lowered.
798807

799808
[b]Examples:[/b]
800809
Set player's strength to level 20:
@@ -874,9 +883,9 @@ Let me know.
874883
Regenerates the given player state over time; pulses once per second.
875884

876885
[b]Arguments:[/b]
886+
state: (required) The state to regen: all, health, stamina, or exhaust.
877887
amount: (optional number) The amount to regen every second.
878888
enable: (required boolean) true to enable state regen; false to disable
879-
state: (required) The state to regen: all, health, stamina, or exhaust.
880889

881890
[b]Examples:[/b]
882891
Adds 1 to all states every second.:
@@ -998,11 +1007,11 @@ Teleports one or more NPCs to the given coordinates. Use cheat_loc to get locati
9981007

9991008
[b]Arguments:[/b]
10001009
max: (optional number) The maximum NPCs to teleport. Default 10.
1001-
radius: (optional number) The teleport radius around the x,y,z target. Default 5.
10021010
z: (required number) Z coordinate.
1003-
y: (required number) Y coordinate.
1004-
x: (required number) X coordinate.
10051011
token: (required) All or part of a the NPC's name.
1012+
x: (required number) X coordinate.
1013+
radius: (optional number) The teleport radius around the x,y,z target. Default 5.
1014+
y: (required number) Y coordinate.
10061015

10071016
[b]Examples:[/b]
10081017
Teleport Father Godwin to somewhere...:
@@ -1040,8 +1049,8 @@ For some reason most of the animals and some bandits/cuman just stand around. No
10401049
The spawned entities are not managed so you should kill them off or load a clean save.
10411050

10421051
[b]Arguments:[/b]
1043-
radius: (optional number) The spawn radius around the player. Default 5.
10441052
class: (required) bandit|cuman|hare|horse|boar|sheep|pig|cow|buck|doe|reddeer
1053+
radius: (optional number) The spawn radius around the player. Default 5.
10451054
count: (optional number) Number of things to spawn. Default 1.
10461055

10471056
[b]Examples:[/b]
@@ -1090,35 +1099,3 @@ Sets the weather to the given weather ID.
10901099
[b]Examples:[/b]
10911100
Set weather to foggy storm:
10921101
cheat_set_weather id:6
1093-
1094-
1095-
1096-
[size=4][b]cheat_exec_delay[/b][/size]
1097-
Sets the number of milliseconds to delay execution of the next command.
1098-
1099-
[b]Arguments:[/b]
1100-
ms: (required number) The number of milliseconds to delay the next command.
1101-
1102-
[b]Examples:[/b]
1103-
1 second delay:
1104-
cheat_exec_delay ms:1000
1105-
1106-
1107-
1108-
[size=4][b]cheat_exec_file[/b][/size]
1109-
Executes a file of console commands. Use an absolute path or
1110-
path relative to SteamLibrary\steamapps\common\KingdomComeDeliverance.
1111-
1112-
[b]Arguments:[/b]
1113-
file: (required) The file to execute.
1114-
1115-
[b]Examples:[/b]
1116-
Manually run autocheat.txt:
1117-
cheat_exec_file file:Data\autocheat.txt
1118-
1119-
1120-
1121-
[size=4][b]cheat_auto_exec[/b][/size]
1122-
This command does nothing and is here for documentation only.
1123-
You can run cheat commands automatically when a level loads by placing them in file Datautocheat.txt.
1124-
This is useful for commands that are not permanent.

0 commit comments

Comments
 (0)