I'm Working on a Rimworld Mod

Hello, I’m working on a weight gain mod for Rimworld. This is my first mod for Rimworld so I’m trying things out and learning as I go, but I think I’ve got something workable at the moment. I intend on working on it more, but I’m not sure for how long or how much.

So far all I’ve got is the basic weight gain functionality (including some visual changes) and a few items, and I’m working on tweaking values so that the weight gain progresses at a reasonable pace.



I’ve never posted a mod before so feedback is more then welcome. :blush:

I made it for Rimworld 1.3, and it should be work fine with the Royalty and Ideology DLC’s (not sure about other mods).

Mod Link (Latest 0.3.0.0): File on MEGA

Stuff in the mod so far:

  • weight gain (10 weight levels, 3 visual levels[default thin, average and fat sprites]).
  • diet bar: whenever you eat food, you’ll gain diet points that will slowly convert into fat as you digest the food.
  • snack foods: unhealthy foods that are treated as a drugs by the game (so you can use the drug policy menu to make pawns eat snacks on a schedule). Only chips and soda right now, they can be made with a food processor
  • diet pills: pills to help fat colonists lose weight. Beware, abusing diet pills can lead to heart attacks and addiction, and once a pawn is addicted to diet pills they’ll actually gain more weight once in withdrawal.
  • junkfood trader: a tradeship that will buy and sell stuff relating to this mod
  • feedee trait: feedee’s get a mood boost for being fat
  • bloatberries: bloatberries have a chance to cause “bloatberry expansion”; a dangerous affliction that turns the victim’s skin blue and inflates their body with delicious bloatberry juice. If a pawn is expanding from bloatberries, a doctor can try and drain the juice from them every 6 hours (better medical skill yields better results). This gives you bloatberry juice and prevents disaster; if a pawn is not drained fast enough they’ll eventually burst from the pressure. Bloatberry expansion will eventually wear off over time.

In progress:

  • more visual weight levels
  • more snacks (possibly more interesting snacks?)
  • more traits
  • possibly weaponized bloatberries?
28 Likes

I will follow your progress with great enthusiasm and interest.

huh, @Niwatori401 was also working on a rimworld weight gain mod, perhaps you could combine forces or something?

1 Like

Howdy! I’ve been working on a similar project. We’ve been discussing it here:

There’s nothing wrong with making two mods, and depending on your design scope of this project it may be what some people prefer. There were those who wanted a more concise system than what I was proposing.

What do you think?

4 Likes

Wow, I feel like a grade schooler who just walked into a university lecture :sweat_smile: You’re project looks way more sophisticated than anything I had in mind, and it looks like you’re more familiar with how Rimworld works under the hood (I’ve been too scared to even look at the JobDriver methods yet :joy:). I literally just started working on this last month, and my plan has just been “look at the source code and then jam in some weight gain content without everything breaking”.

Looking at the discussion, you’re concept seems fine, and actually similar to what I had in my head at the start of this endeavor. However, I know most people on these forums (rather ironically) bite off more than they can chew and end up abandoning projects because they’re so ambitious, and I quickly realized that would be me if I didn’t scale down my vision simply because this is my first mod and I don’t know what I’m doing.

All I intend to do is add weight gain to Rimworld while adding as little code as I can. I’ve iterated through a few systems before posting my mod, but I think I like the path that I’m on now. Basically I’ve just added a “Diet” need (I’m not fully satisfied with the name) that works in tandem with the “Food” need. So now food items can have both a nutrition value and what I’m calling a diet point value. The nutrition still functions exactly as it would in vanilla Rimworld, and the weight gain stuff works off of the diet point system.

Basically, I’ve got it so all humanoids generate with a Diet need, then anything with a Diet need will gain a Body Fat hediff that tracks the pawns weight. The severity of the hediff determines the weight of the pawn, and can be anywhere from 0.001 to 10 (each whole number value is a stage of weight gain, so 0-1 is thin, 1-2 is average, 2-3 is thick, etc.). A pawns body fat decreases naturally overtime, but whenever a pawn eats something with diet points their diet need will go up, and as long as they have diet points they’ll slowly be converted into weight making them fatter. If you fill your diet bar, that translates to 1 unit gained level of weight (at least once it’s “digested”).

I’ve also made it so that the amount of diet points you gain eating food is divided by the severity of the body fat hediff, so if you consume something worth 0.6 diet points, and your weight level is 3, you’ll only actually gain 0.2 diet points. This means that the fatter you are, the harder it is the gain weight, and also the easier it is to lose weight, so each food item should have an equilibrium point where getting enough daily nutrition keeps you at a certain weight.

For example, pawns need 1.6 nutrition per day, and most meals provide 0.8 nutrition so pawns should eat about twice a day. Let’s say body fat decreases at a rate of 0.2 per day, if nutrient paste is worth 0.1 diet points, a pawn eating only nutrient paste will hit their equilibrium at weight level 1, since 2 nutrient paste meals at 0.1 diet points each is equal to the 0.2 loss each day. Meanwhile if a pawn eats lavish meals worth 1 diet points each, they’ll hit equilibrium at weight level 10 (2 diet points per day divided by weight level 10 equals the 0.2 weight level loss each day).

I’m still working on the number values for everything, but basically I want to have it so that each pawn will hold their weight at a constant value based on their diets; if they eat well they’ll stay thin, but if they eat in excess they’ll be much larger.

Now obviously the whole point is to make pawns get larger, so I’m adding in fatty food as drugs so that you can set a schedule and purposely make pawns overeat and get fat by setting them to eat 10 donuts per day on top of they’re nutritional needs. And as a side benefit, piggybacking off of the drug system means that if pawns are sad they might have a drug binge mental break and ruin their diets even if you’re trying to keep them thin, or you can set drug policies so that your pawns will eat comfort foods whenever they feel down, so if you’re colonists get upset being cooped up indoors during a toxic fallout they’ll gain weight

3 Likes

food binge is already a thing in the basegame and apparently gourmands always override their mental breaks to being a food binge

also the drug system would make teetotalers unhappy and trivialize the needs of chemical fans

what you could do instead is a drug that increases a pawn’s hunger rate instead

1 Like

I could help make a couple sizes, the sprites look pretty easy to make.

2 Likes

Yes, I’m aware food binging is already in the game, and if a colonist goes on a regular food binge it will also make them gain weight. And yeah, I just learned that gourmands always binge eat yesterday when I was poking around in the traits code. It’s a cool aspect of the trait and I’m thinking of adding a slightly less potent version of gourmand just so the distribution of traits is more weighted in favor of weight gain stuff.

I’m also aware that making snack foods drugs will make teetotalers unhappy if they eat them (colonists with the Body Purist meme in ideology will also be upset), however I don’t consider this a very big deal and it kind of makes sense that someone who feels strongly about what they put in their body will object to eating unhealthy processed foods.

Trivializing chemical fascination is something I didn’t think of though, but personally I don’t find it very impactful in the first place so it doesn’t really concern me too much. I’ll just try and add new challenges to overcome instead.

I could add a drug that increases a pawn’s hunger rate :thinking: Right now I’m playing around with a weight loss drug, but I didn’t even think of directly increasing or decreasing appetite until you mentioned that, lol

2 Likes

@failmuseum Well right now I have coldsteelj drawing some sprites for me, but thank you so much for offering! :blush: I felt bad asking people to do artwork for free, but it’s nice to know people are interested in helping out

3 Likes

You should try and have walkspeed determined by weight level, I don’t know how easy that is to do since i’ve never toyed around with rimworld modding. But it may be worth looking into

It’s super easy actually, I’m using the hediff system to implement the weight gain mechanics so basically any affect that can be caused by a disease, drug or bionic in the vanilla game is pretty simple to add.

So yeah, that’s already in the mod. Hunger also goes up with weight level, and if you get to higher weight levels manipulation starts being affected as well.

I am very glad there is an actual mod now for this, I will repeat here what I said in that thread, If the mod fairy gave me my perfect wg mod, it would be one where you can have pawns grow to immobility and care for/use them/whatever and have the colony revolve around such activities. Such as a feeder meme, which gives mood boosts to other pawns for the amount of immobile blob pawns in the colony (I could imagine it like the Slaver meme with the Honorable Slavery precept), feast rituals around the fattening of the feedee pawns (Which, hat’s off for adding a feedee trait already) and the ability to use prisoners as those blobs (So you can get the mood boost from both useless pawns and prisoners if you don’t want to do that to your own pawns). I also think that at higher levels it would be fun if the blobs could be the same as a luxury bed to give them some other use(And Feeder pawns get a mood boost from sleeping on blobs)similar to sleep accelerators with transhumanists, . While i would love some integration with mods like Misc Robots (Feeder bots to keep the blobs fed while colonists do other tasks) and RJW(Fatty sex ftw), i understand that can be complicated, so this is my general wants for such a mod

Tl;Dr Fatty harems are best harems and glad to see Rimworld get a wg mod

P.S A mod that works well with this is the Precept Trait Enforcer Steam Workshop::Precept Trait Enforcer Improved especially if you don’t want to gamble with getting colonists with the trait (For future and current players)

4 Likes

@Altair123 I definitely would love to add in a lot of the stuff you’ve mentioned, but we’ll see how things go. I’ve played around with Harmony a little so I could do mod integrations, but I’ve found it a little tricky to use, and it can really screw up the game if you don’t know what you’re doing.

I like the blob colonist bed idea, but unfortunately I suspect it’s a little outside of the scope of my abilities. I’ll put it on the back burner for now in case I stumble onto some code that makes it easy to add (you can do a ridiculous amount of stuff by just tweaking .xml files in rimworld), but I wouldn’t get my hopes up.

I am trying to make a Chubby Chaser type trait though, so some colonists will be attracted to bigger pawns. I just need to finish some other stuff and then I’ll see if I can figure out how to mod opinion stuff for colonists. If I can pull it off it will be neat because then you’ll have pawns pulled together socially because they have a feeder/feedee relationship; just like how sometimes pawns become rivals because of clashes between chemical interest/teetotaler traits.

3 Likes

I’ve reworked the weight gain system a little, so now I can have multiple hediffs that have different effects. Should be ready sometime within the next few days.

Boom

3 Likes

Alright, so I’ve done enough that I think it’s worth putting out an update.

I’ve bumped up weight loss speed a little and changed the diet values of basically everything. I’ve added in a workbench (the food processor) and some recipes that use it so you don’t need to dev mode things in, and I’ve made some internal code changes that nobody cares about.

The most exciting feature (at least in my opinion), is bloatberries!

Basically eating bloatberries has a chance to trigger a bloatberry expansion effect, which must be carefully managed; otherwise the pawn will burst in a violent, juicy explosion. I’ve done this by copying some of the boomalope code, so the explosions work in a similar way; as long as a pawn is afflicted with bloatberry expansion, if they die (from anything) they’ll explode. I know it’s a bit weird that someone could make such a large splash at lower stages of inflation, but for now it’s fine, I’ll probably get around to fixing it later.

Now, I do want this to be at least a semi-useful mod and not just fetish fuel so I’ve tried to make bloatberries useful. In order to stop a pawn from bursting, you need to juice them regularly, and they produce a lot of juice (I think enough for ~3 simple meals every 6 hours?) so you could potentially have a set of bloatberried prisoners producing food for the colony. You can also feed bloatberries to animals if you’d prefer, but where’s the fun in that? Also, the bloatberry explosion does put out fires, so you could try having a living fire-retardant system by sacrificing bloatberried pawns to the flames (finally, pyromaniacs can fight fires!).

If you encounter any bugs, let me know.

Also, @failmuseum, if you’re still interested in making some sprites, coldsteelj suggested having multiple sets of weight gain sprites made by different people so that people can choose whatever version they like. So if you want to make a set of weight gain sprites let me know.

11 Likes

it a good mod it just in mod settings so we can make it easy or hard to play with your mod

so the diet bar increase on consumption of food depends on the current weight stage, yes?

understandably so, however I would also love if it depended on the ingridients used and on the meal type (I am torn on lavish meals though, they are to represent the high cuisine but at the same time they use more nutrition per meal)

it would be nice to know if you can do things to pawns depending on ingridients. as far as I saw, any mod that added a food-thing with drawbacks had those drawbacks disappear when introduced to a meal

one last thing is, as mentioned by the person above, would be neat to make the diet bar empty faster, slower or transfer to the body in higher or lower quantities via scenario settings or mod settings with the only reasons why I would want it in the scenario settings is because of randomized scenarios and of course the storyteller “Oskar Obnoxious”

1 Like

About time someone made a mod like this, only addition I’d love to see is more sprites but I fear it won’t be compatible with other mods, primarily vanilla expanded

More sprites are in the works actually! I could add them in now but I’m holding off until I have time to finish implementing some other stuff I’m working on.

But mod compatibility will definitely be a concern. I’m trying to make my mod disrupt the base game code as little as possible so other mods work because I’m aware that many rimworld players play with huge mod lists, but sometimes it can’t be helped. I already broke compatibility with Multiplayer because bloatberries apply their effect randomly, and once I add new body sprites any mods that add clothing will break the pawn textures unless they are actively supported. Food mods will also not work correctly (maybe not game breaking, but they won’t interact with the weight gain mechanics.)

But like I said I do care about compatibility, so if I can do a small adjustment to make another mod work with mine I’ll probably do it. If someone has a clothing mod they really like I’m also willing to add support for it into my mod if they draw the textures (but the body textures are still in development so clothes will have to come later). But my time is limited and I may not be able to keep everything compatible; so sorry in advance.

1 Like

@Pingwin the diet bar increase is based on both the meal eaten and the current weight stage. Raw ingredients don’t affect your weight though, because I don’t think it’s worth the effort to add in diet values for each raw food ingredient in the game (if you’ve been reduced to eating raw potatoes, presumably your colony is on the verge of starvation).

I am looking into making meal ingredients alter the properties of meals, but I’ve also noticed no other mods do it, so it’s looking a little grim on that front. But there’s a first time for everything, and pawns can notice when human meat is in a meal, so I should be able to detect meal ingredients for other things. I don’t know yet though, I’ll see what I can do.

Mod settings is also in the to-do list, but a little ways down for two reasons;

  1. Right now I want to focus on fleshing out my mod so there’s a little more substance to it.
  2. Making menu UI’s is fiddly, annoying and I’m procrastinating on that as long as possible :laughing: To my understanding Hugslib makes it easier to add mod settings, but I’ve never used it before so it will take me time to learn before I can use it in my mod.

Also, who is Oskar Obnoxious? I’m not familiar with them, are they a Vanilla Expanded storyteller?