边缘世界 RimWorld

边缘世界 RimWorld

36 个评价
Non-humanlike Pawn Control
   
奖励
收藏
已收藏
取消收藏
Mod, 1.5, 1.6
文件大小
发表于
更新日期
1.886 MB
4 月 18 日 上午 12:44
10 月 31 日 上午 8:19
9 项改动说明 ( 查看 )

订阅以下载
Non-humanlike Pawn Control

在 emitbreaker 的 2 个合集中
MIM WH40k Mod Collection
50 件物品
MIM WH40k Mod Collection 1.6 Migration Completed
47 件物品
描述
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.




🔧 How to Use (Players)

1. Click the new Pawn Control 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




⚙️ For Modders

This mod provides a modular framework for defining pawn work capability, skill simulation, draftability, and AI behavior via XML extensions.

---

1. Define a Mod Extension

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>




2. Work Tags

Supported tags follow a naming pattern. Examples:

  • AllowWork_Construction\
    – enables construction jobs
  • AllowWork_Hunting\
    – enables hunting
  • BlockWork_Research\
    – disables all research-related jobgivers
  • AllowAllWork
    – enable every supported WorkType




3. Runtime APIs

This mod injects:

  • Draft controller via Pawn.drafter
  • Equipment / Apparel / Inventory trackers if missing
  • Pawn\_SkillTracker if work is allowed
  • Work tab visibility, WorkSettings, and ThinkTree assignments
  • Optional override for RaceProperties.Animal or IsMechanoid classification

You can control ThinkTree injection using:

<mainWorkThinkTreeDefName>PawnControl_ForceAnimalToHumanlike</mainWorkThinkTreeDefName>




4. Example Usage

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.




🔗 Compatibility

Compatible with:

  • Combat Extended
  • Vanilla Expanded Framework
  • Vehicle Framework
  • Humanoid Alien Races (HAR)
  • Work Tab, Numbers, Drafting Mods
  • Multi-pawn think trees

No core files overwritten. Supports safe hot-load if extension is defined before first spawn.




🧪 Debugging Tools

Enable developer mode for:

  • Log: cache resets, pawn injection
  • Validation for ThinkTree, Skills, Tags
  • Status panel in PresetManager




📁 Preset Manager (Advanced)

The in-game Preset Manager tool supports:

  • Injecting presets without XML edits
  • Saving runtime changes
  • Reverting presets per race
  • Dynamic preview of injected tags

Everything is handled through runtime-safe XML-compatible mod extensions. No patching required.




📜 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.

Buy me a coffee if you wish[buymeacoffee.com]
26 条留言
Vexacuz 15 小时以前 
This is a great Mod.

While i have no problem questing for the sentience serum or whatever, i think custom animals like anime girls, super advanced robots or cartoon characters should just be sentient and playable out of the box already.

Its very usefull to keep your ultra-rare pet out of harms way.
matsgudmunds 10 月 21 日 上午 7:34 
okay thanks
emitbreaker  [作者] 10 月 21 日 上午 7:32 
@matsgudmunds Yes, but removing it will mess up your save ;(
matsgudmunds 10 月 21 日 上午 7:25 
can i add mid save
Furious 10 月 16 日 下午 4:54 
trader: "hi puppy!"
bob the last son of god and anime: "ill like 5 herbal meds and ill like to sell you 15 tainted shirts"
trader: "what?"
emitbreaker  [作者] 7 月 13 日 上午 3:19 
@Cotton I'm currently refactoring entire code to align with 1.6. Will check and fix it for 1.5 as well.
Cotton 7 月 13 日 上午 12:18 
I should also add that I'm using 1.5
Cotton 7 月 13 日 上午 12:18 
My mechanoids wouldn't auto attack while drafted, it doesn't produce any errors either. But when I removed the mod they worked again. Any idea what i can do to fix it?
emitbreaker  [作者] 6 月 6 日 上午 4:01 
@Dinomyte Sorry for my belated response - would you please give me a little context?
Dinomyte 5 月 28 日 下午 11:50 
mine arent showing up in the work tab :c