RimWorld
214 valoraciones
[D] Interests Framework
   
Premiar
Favoritos
Favorito
Quitar
Mod, 1.1, 1.2
Tamaño
Publicado el
Actualizado el
409.864 KB
8 MAY 2020 a las 18:29
22 AGO 2020 a las 7:53
14 notas sobre cambios ( ver )

Suscríbete para descargar
[D] Interests Framework

Descripción
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://steamproxy.net/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.
Discusiones populares Ver todo (1)
1
30 MAY 2020 a las 12:38
Can't Use Debug + This (unless have edb preparecarefully)
LukanGamer
33 comentarios
Mlie 16 SEP 2021 a las 13:53 
Made an update of this:
https://steamproxy.net/sharedfiles/filedetails/?id=2603675659
Hope it helps anyone!
DerKreepero 2 SEP 2021 a las 2:12 
Well damn I hope someone has the time and energy to convert this to 1.3. It's a fantastic mod.
why are we here? just to suffer? 10 AGO 2021 a las 8:15 
1.3??
Varjonyymi 3 AGO 2021 a las 5:30 
Oh yeah, same problem as in 1.2 before the compatibility patch. Personally I don't mind, RimHUD showing the needs etc. is handy, so just turning skill view off from hud and checking them from pawn bio. So at least I'd appreciate the updated Interests if you upload it :)
Mlie 3 AGO 2021 a las 3:41 
@Varjonyymi The RimHud sill display a bunch of stars for the skills that have interrests connected to them. So where it shows 1 or 2 stars based on passion it will show about 10 stars.
Varjonyymi 3 AGO 2021 a las 3:04 
Or not incompatibility but rather integration problem
Varjonyymi 3 AGO 2021 a las 3:02 
@Mlie: how bad the incompatibility with Rimhud is? If it's just the cosmetic thing of not showing Interests on the hud but pawn bio menu working correctly, it doesn't sound like a big deal
Mlie 3 AGO 2021 a las 1:39 
I have tried updating it and have a working version. However the integrations in other mods (Himhud for example) is not working. So i could release it as it is now without integrations, but unsure if it would be worth it
Varjonyymi 2 AGO 2021 a las 5:48 
@Timou: Mlie has marked it on his update list
Timou 2 AGO 2021 a las 4:17 
Update please 1.3