Ради вашего удобства наш сайт использует cookies! Узнать больше! Мы используем cookies

Non-humanlike Pawn Control

Simple Pawn Control Framework Custom control system for non-humanlike pawns. This mod enables drafting, equipping, and work tab logic for any animal, mechanoid, mutant, or custom-defined race. [hr] 🔧 How to Use (Players) 1. Click the new [b]Pawn Control[/b] button in main tab. 2. Select a race type (e.g. Animal, Mechanoid, ToolUser). 3. Pick a race from the dropdown (e.g. muffalo, dryad, etc.). 4. Apply one of the preset tags from the right panel. 5. Done - now save game and reload and your selected pawns now show up in Work tab, can be drafted, and follow custom job trees. ✅ Draft controller included ✅ Compatible with gear / weapon pickup ✅ Fully XML-based preset system ✅ Dynamic injection; no patch clutter [hr] ⚙️ For Modders This mod provides a modular framework for defining pawn work capability, skill simulation, draftability, and AI behavior via XML extensions. --- [b][u]1. Define a Mod Extension[/u][/b] Attach this extension to any `ThingDef` with a `race` element: <modExtensions> <li Class="emitbreaker.PawnControl.NonHumanlikePawnControlExtension"> <!-- Enable work --> <tags> <li>AllowWork_Construction</li> <li>AllowWork_Hauling</li> <li>BlockWork_Research</li> </tags> ``` <!-- Skill Simulation --> <baseSkillLevelOverride>5</baseSkillLevelOverride> <skillLevelAnimalAdvanced>8</skillLevelAnimalAdvanced> <injectedSkills> <li><skill>Plants</skill><level>10</level></li> </injectedSkills> <injectedPassions> <li><skill>Plants</skill><passion>Major</passion></li> </injectedPassions> <!-- Enable combat & gear --> <forceDraftable>true</forceDraftable> <forceEquipWeapon>true</forceEquipWeapon> <!-- Optional ThinkTree override --> <mainWorkThinkTreeDefName>PawnControl_ForceAnimalToHumanlike</mainWorkThinkTreeDefName> ``` </li> </modExtensions> [hr] [b][u]2. Work Tags[/u][/b] Supported tags follow a naming pattern. Examples: [list] [*] AllowWork_Construction\ – enables construction jobs [*] AllowWork_Hunting\ – enables hunting [*] BlockWork_Research\ – disables all research-related jobgivers [*] AllowAllWork – enable every supported WorkType [/list] [hr] [b][u]3. Runtime APIs[/u][/b] This mod injects: [list] [*] Draft controller via [i]Pawn.drafter[/i] [*] Equipment / Apparel / Inventory trackers if missing [*] Pawn\_SkillTracker if work is allowed [*] Work tab visibility, WorkSettings, and ThinkTree assignments [*] Optional override for [i]RaceProperties.Animal[/i] or [i]IsMechanoid[/i] classification [/list] You can control ThinkTree injection using: <mainWorkThinkTreeDefName>PawnControl_ForceAnimalToHumanlike</mainWorkThinkTreeDefName> [hr] [b][u]4. Example Usage[/u][/b] Want your dryad to haul, fight, and wear armor? Just define: <forceDraftable>true</forceDraftable> <forceEquipWeapon>true</forceEquipWeapon> <forceWearApparel>true</forceWearApparel> <tags> <li>AllowWork_Hauling</li> <li>AllowWork_Cleaning</li> <li>AllowWork_Firefight</li> </tags> And it will behave like a pawn with those capabilities — showing up in WorkTab and accepting player orders. [hr] 🔗 Compatibility Compatible with: [list] [*] Combat Extended [*] Vanilla Expanded Framework [*] Vehicle Framework [*] Humanoid Alien Races (HAR) [*] Work Tab, Numbers, Drafting Mods [*] Multi-pawn think trees [/list] No core files overwritten. Supports safe hot-load if extension is defined before first spawn. [hr] 🧪 Debugging Tools Enable developer mode for: [list] [*] Log: cache resets, pawn injection [*] Validation for ThinkTree, Skills, Tags [*] Status panel in PresetManager [/list] [hr] 📁 Preset Manager (Advanced) The in-game [b]Preset Manager[/b] tool supports: [list] [*] Injecting presets without XML edits [*] Saving runtime changes [*] Reverting presets per race [*] Dynamic preview of injected tags [/list] Everything is handled through runtime-safe XML-compatible mod extensions. No patching required. [hr] 📜 License & Usage MIT License. Feel free to bundle, fork, or adapt for your faction mod, as long as credit is given. 📜 Contribution Myself: Architecture design, base code development, code review and validation ChatGPT: Framing and translation. Simplifying codes. Adding summary for other modders to understand how do codes work. Image generation (for thumbnail of this mod) Claude 3.7 (GitHub Copilot): On IDE code development and refactoring. Debugging. [url=https://steamcommunity.com/linkfilter/?u=https%3A%2F%2Fbuymeacoffee.com%2Femitbreaker]Buy me a coffee if you wish[/url][buymeacoffee.com]