A practical, battle-tested handbook for building Lua (and C++) mods for Subnautica 2 with UE4SS.
This guide is distilled from the UE4SS source and documentation in this repository and from reading ~30 real community mods (CheatToggles, KillableCreatures, AutoMiner, TitanTimers, SN2ModSettings, MultiplayerChat, PaintBrush, TadpoleHUD, DatabaseTerminal, SN2Waypoints, and more). Every pattern here is something a shipping SN2 mod actually does. Where a technique exists only because the game/engine misbehaves in a particular way, that is called out explicitly.
Discover gists
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <LiquidCrystal.h> //the liquid crystal library contains commands for printing to the display | |
| LiquidCrystal lcd(13, 12, 11, 10, 9, 8); // tell the RedBoard what pins are connected to the display | |
| int buttonPin = 2; //pin that the button is connected to | |
| int buzzerPin = 6; //pin for driving the buzzer | |
| int buttonPressTime = 0; //variable to show how much time the player has left to guess the word (and press the button) | |
| long timeLimit = 15000; //time limit for the player to guess each word | |
| long startTime = 0; //used to measure time that has passed for each word | |
| int roundNumber = 0; //keeps track of the roundNumber so that it can be displayed at the end of the game |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Log uploaded on Friday, May 29, 2026, 5:05:41 PM | |
| Loaded mods: | |
| Harmony(brrainz.harmony)[mv:2.4.2.0]: 0Harmony(2.4.1), HarmonyMod(2.4.2) | |
| Core(Ludeon.RimWorld): (no assemblies) | |
| Royalty(Ludeon.RimWorld.Royalty): (no assemblies) | |
| Ideology(Ludeon.RimWorld.Ideology): (no assemblies) | |
| Biotech(Ludeon.RimWorld.Biotech): (no assemblies) | |
| Adaptive Storage Framework(adaptive.storage.framework): 0MultiplayerAPI(av:0.5.0,fv:0.5.0), 1ITransformable(1.0.0), AdaptiveStorageFramework(1.2.4), CopyOperation(1.0.0), DefNameLink(1.0.0), GeneratorOperation(1.0.0), GeneratorOperationV2(1.0.0), PatchOperationSet(1.0.0), PatchOperationTryAdd(1.0.0), PostInheritanceOperation(1.0.0), SaveGameCompatibility(1.0.0) | |
| Vanilla Expanded Framework(OskarPotocki.VanillaFactionsExpanded.Core): 0ModSettingsFramework(1.0.0), 0PrepatcherAPI(1.2.0), KCSG(av:1.1.2,fv:26.3.20), MVCF(2.0.0.1), Outposts(av:3.0.0,fv:1.0.0), PipeSystem(av:1.0.1,fv:22.7.29), VEF(av:1.1.7,fv:1.1.9) | |
| Vanilla Psycasts Expanded(VanillaExpanded.VPsycastsE): VanillaPsycastsExpanded(1.1. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Log uploaded on Friday, May 29, 2026, 11:05:29 PM | |
| Loaded mods: | |
| Harmony(brrainz.harmony)[mv:2.4.2.0]: 0Harmony(2.4.1), HarmonyMod(2.4.2) | |
| Loading Progress(ilyvion.LoadingProgress): ilyvion.LoadingProgress(0.10.0) | |
| Visual Exceptions(brrainz.visualexceptions)[mv:1.4.0.0]: CrossPromotion(1.1.2), VisualExceptions(1.4.0) | |
| Core(Ludeon.RimWorld): (no assemblies) | |
| Royalty(Ludeon.RimWorld.Royalty): (no assemblies) | |
| Vanilla Backgrounds Expanded(vanillaexpanded.backgrounds): VBE(1.0.0) | |
| Ideology(Ludeon.RimWorld.Ideology): (no assemblies) | |
| Biotech(Ludeon.RimWorld.Biotech): (no assemblies) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "ivanov": { | |
| "name": "Иванов Петр Сергеевич", | |
| "dates": "12.04.1940 — 18.11.2021", | |
| "bio": "Петр Сергеевич родился в семье инженеров. Посвятил более 40 лет своей жизни развитию отечественной науки и проектированию сложнейших объектов. Был любящим отцом и верным наставником." | |
| }, | |
| "petrov": { | |
| "name": "Петров Алексей Михайлович", | |
| "dates": "05.08.1925 — 22.01.2010", | |
| "bio": "Ветеран труда, заслуженный строитель. Прошел долгий и славный жизненный путь, принимал участие в восстановлении города в послевоенные годы. Его стойкость — пример для всех нас." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| 抖音PC批量私信脚本 (在云桌面"零星"内部直接运行) | |
| 适用场景: 跨渠道(微信/公众号/表单留资)已有客户的抖音端跟进 | |
| 依赖: pip install pyautogui pyperclip pillow anthropic | |
| 用法: | |
| python douyin_dm.py contacts.csv # 人工 y/n 模式(默认) | |
| python douyin_dm.py --auto contacts.csv # 自动模式 (Vision OCR 校验主页) | |
| 前置: 抖音PC已打开、已登录、已最大化(1456x819或更高分辨率均可,按需调坐标) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl https://bo.dolarapi.com/v1/dolares/binancee |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <Arduino.h> | |
| // --- CẤU HÌNH HỆ THỐNG --- | |
| const int ledPins[] = {13, 12, 14, 27, 26, 25, 33, 32}; | |
| const int numLeds = 8; | |
| const int ONBOARD_LED = 2; | |
| #define RXD2 16 | |
| #define TXD2 17 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| namespace C_Junior_level | |
| { | |
| internal class Program | |
| { | |
| public static void Main(string[] args) | |
| { | |
| int totalPictures = 52; | |
| int picturesPerRow = 3; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Log uploaded on Friday, May 29, 2026, 12:04:00 PM | |
| Loaded mods: | |
| Prepatcher(zetrith.prepatcher): 0Harmony(2.4.2), 0PrepatcherAPI(1.2.0), 0PrepatcherDataAssembly(1.0.0), PrepatcherImpl(1.0.0), Prestarter(1.0.0) | |
| Harmony(brrainz.harmony)[mv:2.4.2.0]: 0Harmony(av:2.4.2,fv:2.4.1), HarmonyMod(2.4.2) | |
| Core(Ludeon.RimWorld): (no assemblies) | |
| Royalty(Ludeon.RimWorld.Royalty): (no assemblies) | |
| Ideology(Ludeon.RimWorld.Ideology): (no assemblies) | |
| Biotech(Ludeon.RimWorld.Biotech): (no assemblies) | |
| Anomaly(Ludeon.RimWorld.Anomaly): (no assemblies) | |
| Stoneborn - Cuisine(det.sbcuisine): GoToNearest(1.0.0) |