From e2ab8e54cf0080163c4c80a61a0e1768db16fd18 Mon Sep 17 00:00:00 2001
From: lL1l1 <82986251+lL1l1@users.noreply.github.com>
Date: Sat, 25 Jan 2025 11:51:10 -0800
Subject: [PATCH] Add new unit-related development tips (#6616)
---
docs/development/developmentEnviroment.md | 14 ++++++++++----
setup/setup-english.md | 16 +++++++++++-----
2 files changed, 21 insertions(+), 9 deletions(-)
diff --git a/docs/development/developmentEnviroment.md b/docs/development/developmentEnviroment.md
index 6804826dfc..62d3e0ae66 100644
--- a/docs/development/developmentEnviroment.md
+++ b/docs/development/developmentEnviroment.md
@@ -193,11 +193,17 @@ Where the addition operator should be interpreted as appending one text (source)
Helpful hotkeys and resource you can use in game
-- Alt + F2 to invoke the unit spawning page, great for making units for free or taking control of an AI.
+- Alt + F2 to show the unit creation dialog, great for cheating in units or taking control of an AI.
- F9 to open the log window if you close it or it's not open for whatever reason.
-- ~ to Open the Console
-- In the Console run `ren_ShowNetworkStats` for the sim rate / package drops, on the top right
-- In the Console run `ShowStats` for engine stats, on the left
+- ~ to Open the Console.
+- In the Console run `ren_ShowNetworkStats` for the sim rate / package drops, on the top right.
+- In the Console run `ShowStats` for engine stats, on the left.
+- Use Ctrl + Shift + C to copy selected units to the clipboard, so that you can spawn them again ("paste" them) with Ctrl + Shift + V.
+ - In general, Ctrl + Shift + V runs Lua UI code from your clipboard.
+- In the Console run `SimLua` with Lua code to test Sim code, and `UI_Lua` to test UI code.
+- The Sim-side global function `SelectUnit()` gives the sim-side of the currently selected unit; useful for testing scripts or logging information.
+- In the Console run `ui_SelectAnything` to be able to select enemy units; useful for copying test scenarios or debugging selected units.
+- In the Console run `ui_DebugAltClick` to be able to quickly switch armies by Alt + left-clicking a unit in the army you want to switch to.
## Frequently asked Questions (FAQ)
diff --git a/setup/setup-english.md b/setup/setup-english.md
index 6110f2b8ea..909841b6bf 100644
--- a/setup/setup-english.md
+++ b/setup/setup-english.md
@@ -182,11 +182,17 @@ Tips
Helpful hotkeys and resource you can use in game
-* Alt + F2 to invoke the unit spawning page, great for making units for free or taking control of an AI.
-* F9 to open the log window if you close it or it's not open for whatever reason.
-* ~ to Open the Console
-* In the Console run `ren_ShowNetworkStats` for the sim rate / package drops, on the top right
-* In the Console run `ShowStats` for engine stats, on the left
+- Alt + F2 to show the unit creation dialog, great for cheating in units or taking control of an AI.
+- F9 to open the log window if you close it or it's not open for whatever reason.
+- ~ to Open the Console.
+- In the Console run `ren_ShowNetworkStats` for the sim rate / package drops, on the top right.
+- In the Console run `ShowStats` for engine stats, on the left.
+- Use Ctrl + Shift + C to copy selected units to the clipboard, so that you can spawn them again ("paste" them) with Ctrl + Shift + V.
+ - In general, Ctrl + Shift + V runs Lua UI code from your clipboard.
+- In the Console run `SimLua` with Lua code to test Sim code, and `UI_Lua` to test UI code.
+- The Sim-side global function `SelectUnit()` gives the sim-side of the currently selected unit; useful for testing scripts or logging information.
+- In the Console run `ui_SelectAnything` to be able to select enemy units; useful for copying test scenarios or debugging selected units.
+- In the Console run `ui_DebugAltClick` to be able to quickly switch armies by Alt + left-clicking a unit in the army you want to switch to.
Frequently asked Questions (FAQ)
--------------------------------