RimWorld

RimWorld

37 ratings
Mutated Pawn
2
2
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.4, 1.5, 1.6
File Size
Posted
Updated
1.695 MB
26 Jul, 2023 @ 7:01pm
16 Jul @ 5:51pm
18 Change Notes ( view )
You need DLC to use this item.

Subscribe to download
Mutated Pawn

Description
Allow any pawn a chance to have random genes with the following configurations:
  • 3 different chances to have mutations, each with its own max mutation number and chance.
  • Chance to develop a random mutation for a pawn with a growing carcinoma. Check every 5000 ticks (a day has 60k ticks). Set to 0% to disable this. Thanks Jdalt40 for the suggestion.
  • Chance to develop a random mutation for a pawn with moderate (or worse) toxic buildup. Check every 5000 ticks (a day has 60k ticks). Set to 0% to disable this. Thanks CrackaJack for the suggestion.
  • From 1.6, white list and black list mechanism can be used to control the list of available genes for mutation. I have troubles create a good UX for these options. I have to resort to text field input. Sorry guys! You can find the name for the genes if you use the included options to print them all to dev console log.
  • For white and black listing, wildcard can be used. For example, "hair" means any gene that contains "hair" in its defName or LabelShortAdj. White list overides black list.
  • Mutated genes can be endogene or xenogene.
  • Allow archite genes.
  • The minimum metabolic efficiency allowed, used ONLY by this mod, when deciding a mutation can happen or not. Thank 沙坡村大师 for the suggestion.

Mutated genes have yellow border. Thanks to erdelf for suggestions about using ThingComp.

It can be safely added mid-game and should not conflict with any mods. If added mid-game, it does not affected existing pawns.

I used HugsLib to handle settings windows. Many thanks to UnlimitedHugs (RimworldHugsLib), Jaxe (Interaction Bubble) and cbrintnall (EzOutfit) and for their codes and hard works!

If you like this mod, maybe check out my other one:
Permanent Injury Letter https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=2592535960
More Biotech Letters https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=2889303626
Billed Deep Drill https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=2593197871

It would be great to receive feedback, suggestions or pointers on how to improve. Hope these mods help!

Github: https://github.com/WarBuggy/RimworldMod.MutatedPawn.git

Cheers!

Version history
v0.10
  • Add compatibility for 1.6.
  • Remove HugsLib dependency. All previous mod settings are lost. Please visit the new settings.
  • Black/white listing entries are treated as wildcard. "hair" will include any gene that has "hair" (case-insensitive) in defName or LabelShortAdj.
  • White list will override black list. For example, you can black list anything with "hair", then white list "Hair_InkBlack".
  • Add custom tick time for both growing carcinoma and toxic build up mutation. Default is still 5k. Thanks Arthur GC for the suggestion.
v0.9
  • Add compatibility for 1.5. Happy horror hunting!
  • Add github link.
v0.81
  • Handle null comp properly. Many thanks to Taemaly_UA!
v0.8
  • Do not check for toxic buildup or carcinoma mutation if a pawn is in crytosleep. Thanks fruitcake662!
v0.7
  • Slightly improve the process of choosing random genes.
v0.6
  • Allow mutation for a pawn with moderate (or worse) toxic buildup.
  • Allow white list and black list mechanism.
  • Move carcinoma mutation to the mod comp class.
  • Depends on HugsLib for setting windows.
v0.5
  • Draw yellow border around mutated genes.
  • Fix a bug where the same gene are chosen multiple times for mutation, which leads to fail pawn generation.
v0.4
  • Allow mutation for a pawn with a growing carcinoma.
v0.3
  • Break mutation process into 3 different groups, each with its own max mutation and chance.
v0.2
  • Expand the option to allow flexible minimum allowed metabolic efficiency.
v0.1
  • Initial release.
Popular Discussions View All (2)
12
17 Jul @ 8:16am
HEX: Malinovsky error
wowhvb
2
14 Jul @ 5:58pm
Whitelist and blacklist
estrogenesys
131 Comments
wowhvb  [author] 13 Aug @ 12:47pm 
@cykonetic I posted an explanation a few pages down. I post it here again for the convenience "When I did the update, HugsLib, a dependency I used to help making the mod option interface, was not updated yet. Since a few people already told me I should stop using HugsLib, I took the opportunity to redo the mod setting GUI and remove HugsLib completely. However, I could not handle it gracefully enough and quite often, the old settings messed up and create errors as such. I am glad it works for you now."

The button will list all the genes my mod can find in the console log window (the place where you got all the error messages).

Cheers!
cykonetic 13 Aug @ 7:37am 
I did as you asked. I'm not sure why but that seemed to do the trick. Here is the log from that start.
https://gist.github.com/HugsLibRecordKeeper/faae30abb5dd9db599ced5dfd75794ec

Also, in the options there is a button to show all gene defs. How is that supposed to work? Clicking the button did not seem to do anything.
wowhvb  [author] 12 Aug @ 10:05pm 
@cykonetic Thanks for the feedback! I suggested you try this approach first, if haven't. "Could you try again, this time, before you start a new game, please go to the mod setting and adjust every value in the setting first? Every option, just put some value in there. You can type anything for black/white list, doesn't have to be proper name. After that, restart Rimworld and see if there is any error. Maybe try a new game also". Thanks!
cykonetic 12 Aug @ 9:50pm 
I dunno. I mucked around in the code for a bit but I couldn't find the issue. Here is the HugsLib log.
https://gist.github.com/HugsLibRecordKeeper/f3ccba0d54010af18009ae740674149e
cykonetic 12 Aug @ 9:51am 
Your mod seems to be breaking World Spawn; I haven't dug in to see why but for what ever reason it is preventing Factions from spawning.
wowhvb  [author] 10 Aug @ 10:18am 
Modding is a fun but tricky. I am glad you got it working and hoping it would remain consistent! Wish you a great time on the Rim!
Danna 10 Aug @ 7:44am 
I have no idea what I did, I removed half of the settings from the blacklist and now its seemingly working again. I must be doing something fundamentally wrong, but now it's working and I'm just not gonna touch anything in any setting until I'm done with this run.

Clearly the issue is on my side, so thank you for a great mod either way! I have it set up now so like 5% of everyone will have a single random gene and I think it will make things very interesting.
Danna 10 Aug @ 7:23am 
I've done a bit of testing and it's still quite borked even without your mod, so I'm beginning to think that something is fundamentally weird with my installation or something.

Because I can sort of force-reset Tweaks Galore settings to make it work, but otherwise that also won't really work initially no matter what I do, and now I'm unfortunately able to get your mod to give me any genes whatsoever despite it giving me all of them previously :/

And your mod *did* work first time I tried it, I just didn't manage to get the blacklist to work, but now it seems I've just borked everything somehow.
wowhvb  [author] 9 Aug @ 10:17pm 
If you tried the below and it doesn't work or only sometimes works, it is a problem with my mod. It might have a bug or it cannot play well with other mods. You can help me by keep trying and tell me what happened. However, I cannot guarantee I can solve the problem :(
wowhvb  [author] 9 Aug @ 10:16pm 
@Danna if black list/white list can do what you want (albeit more work), then it is not a weird request. It is what my mod tries to do.


For "MMHorns_DoubleCrown - double crown horns", MMHorns_DoubleCrown is the genedef and double crown horns is the LabelShortAdj. You are right.

For "CYB_ViolenceAverse - violence averse", CYB_ViolenceAverse is the genedef and violence averse is the LabelShortAdj. You are right again. The - separates them.

If you want to black list every thing with CYB, MM and Outland, you can type in "CYB,MM,Outland" (without the quotes). Or just CYB or MM or Outland if you want to black list just the genes from that mod. The same for white list, just opposite effect. You probably want either the full genedef name or the full LabelShortAdj name though. Separate them by commas also.