RimWorld

RimWorld

73 ratings
[D] Interests Framework (Continued)
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.1, 1.2, 1.3
File Size
Posted
328.928 KB
Sep 16, 2021 @ 1:46pm
1 Change Note ( view )

Subscribe to download
[D] Interests Framework (Continued)

In 1 collection by Mlie
Mlie's resurrected mods
960 items
Description

Update of Dametris mod
https://steamcommunity.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://steamcommunity.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 Comments
Michiko May 7, 2024 @ 8:47am 
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 Apr 29, 2024 @ 10:37am 
Thanks for your work Mlie. You're a pillar of the community.
FungalFish Apr 13, 2024 @ 6:51pm 
Unfortunate but hey, you tried!
Mlie  [author] Apr 11, 2024 @ 2:07am 
Never got this to work fully and the code is too complex for my skill. This mod will not be further updated, sorry!
Mlie  [author] Jan 7, 2024 @ 9:12am 
@Milts Not sure
Milterator Jan 7, 2024 @ 7:24am 
Will this get updated to 1.4?
Dungeon Explorer Levender May 30, 2023 @ 4:13pm 
Waiting for an 1.4 update ;-;
The Blind One Apr 22, 2023 @ 4:59pm 
I hope this gets updated again someday.
Mlie  [author] Oct 14, 2022 @ 12:59am 
@Elijuuhie I will update all published mods, progress shown on the Discord server
Snumbino Oct 14, 2022 @ 12:32am 
PLEASE MAKE IT FORT 1.4