边缘世界 RimWorld

边缘世界 RimWorld

73 个评价
[D] Interests Framework (Continued)
   
奖励
收藏
已收藏
取消收藏
Mod, 1.1, 1.2, 1.3
文件大小
发表于
328.928 KB
2021 年 9 月 16 日 下午 1:46
1 项改动说明 ( 查看 )

订阅以下载
[D] Interests Framework (Continued)

在 Mlie 的 1 个合集中
Mlie's resurrected mods
973 件物品
描述

Update of Dametris mod
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2089927321

Never got this to work fully and the code is too complex for my skill. This mod will not be further updated, sorry!

The addon-patches were to complex to update but I will try again at a later date. The mod were released anyway due to requests.



[dsc.gg]
[github.com]



Adds tools to create skill-linked "interests" in place of and in addition to the basic major and minor passion.

This mod does not significantly change the game on its own. Instead, it enables modders to create their own interests more easily than would otherwise be possible, as passions are hard-coded into the game.

Check out my Interests mod, which utilizes this framework to add 11 new interests to the game: https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2089938084

Requires Harmony.


------------------------------------------------------------------------------------------------------

How it works:
Passions are set and read according to an enum. Enums are compiled directly to ints, which means they can't be overridden with Harmony or any other means. However, this also means any int can be cast to a Passion unchecked, and stored in a field meant for a Passion.

The result is compatibility with most mods.

The other major obstacle is the fact that passion evaluation is hardcoded based on the enum. So, we use Harmony patches, including some transpilers, to call our own code on these evaluations. However, this has to be done for *any* evaluation of passions, which means mods that use their own code to evaluate passions won't natively take our new interests into account. So, the framework patches some of those too.
Let me know if you think of mods that could use increased integration with interests.


------------------------------------------------------------------------------------------------------

Load order:

Harmony
Core
Royalty
...
Interests Framework

------------------------------------------------------------------------------------------------------

Compatible with:
- EdB Prepare Carefully (patch included)
- RimHUD (patch included)
- Character Editor (patch included)
- Children, school and learning
- Work Tab
- Mad Skills (though this may change functionality of some learn rates, obviously)

Conflicts:
- Static Quality Plus. This mod overrides nearly everything about pawn skills, and it'd be a significant project with constant maintenance to ensure compatibility, so I don't.
- Generally, mods that display skill/passion information in an exclusionary way. I don't know any in particular other than the ones I've explicitly patched, but they're bound to be out there. Let me know if you find one.
- Custom races may or may not take advantage of expanded passions automatically.

------------------------------------------------------------------------------------------------------

Details:
- Source code is included, so feel free to look and modify anything you want.

- DInterest.InterestDef: new type of def for interests. Define one in XML using the preset fields, or subclass it and use the hooks from InterestBase.
- Defined interests are automatically added to the pool with the given properties. These include the ability to modify:
- Learn rate
- Forget rate
- Texture
- Chance to appear (through a weight system)
- Chance for the associated skill to be chosen for inspiration
- Chance for inspiration to occur
- Skills ineligible for the interest

- Additionally, you can subclass InterestDef and override any of the methods. This allows you to define behavior to occur on every tick for every pawn with the given interest, or create interests that affect all the pawns on the map when they use the given skill (among other things).

------------------------------------------------------------------------------------------------------

Please let me know if you run into any issues, compatibility or otherwise.



  • See if the the error persists if you just have this mod and its requirements active.
  • If not, try adding your other mods until it happens again.
  • Post your error-log using HugsLib and command Ctrl+F12
  • For best support, please use the Discord-channel for error-reporting.
  • Do not report errors by making a discussion-thread, I get no notification of that.
  • If you have the solution for a problem, please post it to the GitHub repository.

23 条留言
Michiko 2024 年 5 月 7 日 上午 8:47 
Too bad. I hope somebody who understands the black magic of its code could someday pick it up and get it to work. I've been missing this mod since 1.2.
Captain Kalenekov 2024 年 4 月 29 日 上午 10:37 
Thanks for your work Mlie. You're a pillar of the community.
FungalFish 2024 年 4 月 13 日 下午 6:51 
Unfortunate but hey, you tried!
Mlie  [作者] 2024 年 4 月 11 日 上午 2:07 
Never got this to work fully and the code is too complex for my skill. This mod will not be further updated, sorry!
Mlie  [作者] 2024 年 1 月 7 日 上午 9:12 
@Milts Not sure
Milterator 2024 年 1 月 7 日 上午 7:24 
Will this get updated to 1.4?
Dungeon Explorer Levender 2023 年 5 月 30 日 下午 4:13 
Waiting for an 1.4 update ;-;
The Blind One 2023 年 4 月 22 日 下午 4:59 
I hope this gets updated again someday.
Mlie  [作者] 2022 年 10 月 14 日 上午 12:59 
@Elijuuhie I will update all published mods, progress shown on the Discord server
Snumbino 2022 年 10 月 14 日 上午 12:32 
PLEASE MAKE IT FORT 1.4