RimWorld

RimWorld

Math! [Old]
CrunchyDuck  [developer] 21 Oct, 2022 @ 12:51pm
Suggestions
obsidian29 had their heartfelt comment REMOVED by steam for being too big for the comments sections.
This is their sanctuary. And yours. Put ideas in here, please.
< >
Showing 1-15 of 45 comments
obsidian29 21 Oct, 2022 @ 1:20pm 
XD

So, what I have so far:

Food-related:
- Number of animals on the map which are capable of eating hay.
- Number of animals on the map which are capable of eating kibble.
- Number of animals on the map which are capable of eating raw meat.
- Number of animals on the map which are capable of eating raw corpses.
- Intake versions of all of the above.
#Pre-breakfast brain isn't sure how, but I feel like we could use these variables to then ferret out specifics from these variables - for instance, (anim - anim_hay) to determine how many are incapable of eating hay.
- Total nutrition available in the colony, separate from specific item or resource types.
- Perhaps total nutrition available of each type - Simple, Fine, Lavish and perhaps Gourmet if VCE is installed - in case, for instance, prisoners are restricted to Simple meals only, one could do an if statement which produces more simple meals only if Simple nutrition is below X, and a separate one for fine meals and colonists.

Environment-related:
- Current season, either in the form of an index (0 for Spring, for instance) or a set of booleans (is_spring = 1 or 0), for changing bill behavior based on the season.
- Perhaps the same as above for quadrums, but I don't see how that could be as useful, given climates change around the world.
- Current outdoor temperate, average daily outdoor temperature, expected low outdoor temperature today. When the temperature starts dropping/raising, bill behavior can respond accordingly.
#For instance, we can have a bill for parkas that attempts to make sure there's one parka for every colonist, but is only active when the temperature is below X, so that the parkas aren't made year-round but instead prepped when it starts to get cold.
- Event status. Is there a toxic fallout? is there a solar flare? Might use this to have a backup workstation, like a crafting spot or something that doesn't require electricity, whose bills only activate when there is a solar flare. Additionally, I sometimes switch over to, for instance, simple meals instead of fine in leaner times, and automatically switching the bill to simple meals when we hit toxic fallout would be a nice touch of automation.

Mood-related:
- Average mood in the colony among humanlikes.
- Average mood in the colony among colonists.
- Average mood in the colony among prisoners.
- Number of each (humanlikes, colonists, prisoners) with mood below a certain threshhold, perhaps that being their mental break threshhold. How many are on the edge?
#This would allow situationally crafting joy thingies or upgrading to a higher tier of meal when mood was low among a specific population.

The following are a bit more circumstantial and maybe a bit redundant, but I thought I'd include them anyway.
- Number of colonists on the map without a weapon.
- Number of colonists on the map who are armed.
- Number of colonists on the map without a weapon who are suited for melee
- Number of colonists on the map without a weapon who are suited for ranged
#The above two would take into account the brawler trait, careful shooter and trigger finger, and skill. Might also add vision impairment into the mix, or look at stats instead of directly at skills, but this would allow us to make a set of bills which crafted melee weapons for the melee fighters who were unarmed and ranged for the shooters. Sometimes it gets tedious setting up the weaponry of new arrivals, this would supply fields to situationally create weapons. More useful in early game I'd say, when apart from stolen pirate weapons you're probably giving everyone shortbows.

This is all I've thought of so far, I might think of more when I play with the mod. I really look forward to this, it's going to be a very powerful tool, especially for those of us who think of math as recreation. :D
CrunchyDuck  [developer] 21 Oct, 2022 @ 1:33pm 
Oh my, this is a *lot*, and quite some good ideas here too.
I very much appreciate this and the time you spent to write it! I'll get to working on these after the next couple updates :)
daz_ian 21 Oct, 2022 @ 5:06pm 
Better Workbench Management https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=935982361 lets you choose what other items get counted when calculating if a bill is satisfied. I usually use it to make sure the right number of meals get made, even when they have to be a non-preferred type, e.g. my stoves might have:

  1. Cook fine meal, do until 10, additionally count lavish and simple meals and all the meals in Vanilla Cooking Expanded
  2. Cook simple meal, do until 10, additionally count lavish and fine meals and all the meals in VCE

and unless meals of other types had recently fallen from the sky, I'd end up with a total of 10 meals, with as many as possible being fine and the rest being simple.

Hopefully this mod is compatible with that mod (if it gets updated) and/or this is possible in this mod without writing a novel in the count field.
CrunchyDuck  [developer] 21 Oct, 2022 @ 5:47pm 
Well, after I get a little rest, tomorrow I'll be adding in categories of items. With that you can do what you describe pretty easily with an if statement:
if(meals < 10, 10, 0)
Of course you could replace 10 with something like pwn_in to make it adapt.
CrunchyDuck  [developer] 22 Oct, 2022 @ 3:08am 
So looking over Obsidian's suggestions again, I'm thinking I want to implement a "modifiers" system.
So, you have the core search system such and can search things like "pwn", "steel", etc. But then you can add certain modifiers to the end to specify a particular attribute about the things you're searching. For example, rice_in for the nutritional value of rice, pwn_in for the amount of nutrition a pawn eats each day, helmet_value for the price of a helmet...
Such a system will take a bit of time to implement and might be a little intimidating to people, but I think it would overall be a benefit to the mod.
Another thing I would love to see would be the ability to count things like ideoligion roles, so I could for example create a tuque for every colonist that isn't required to wear a headwrap. Or count nudists so I can skip crafting clothes for them, same goes for vegetarian pawns too.
obsidian29 22 Oct, 2022 @ 2:15pm 
I apologize if I added too many suggestions, Crunchy Duck. XD I didn't mean to flood you.

I really like the idea of an attribute system, it'd make it much more versatile. i was picturing things being like functions, essentially arguments to the variable calls, but thinking that wouldn't be possible with the current framework. That would be excellent, and people wouldn't have to use the attributes if they didn't want to or felt intimidated by the complexity.

I like @Check this out's suggestions, too. Automatically preventing it from having clothes crafted for nudists would be awesome.

On top of that, it'd be cool if one of the modifiers was something like tracking pawns with clothes, or specifically top/bottom, under a certain health threshhold, so we can automatically craft clothes for people wearing tattered apparel. Would the modifiers be able to stack?
CrunchyDuck  [developer] 22 Oct, 2022 @ 2:20pm 
Yeah, I would design them to stack.
As it is I'm trying to figure out how I can add a reference in-game for how to use the math commands. I'm thinking I want to add another column to the bill menu that has some variables/examples. After I've got a reference like that for players, I'll work on expanding the complexity more.
obsidian29 22 Oct, 2022 @ 2:25pm 
What about a little question mark or something button in the bills menu that opened up a window with a list of variables? It'd be out of the way but also very accessible.
CrunchyDuck  [developer] 22 Oct, 2022 @ 2:29pm 
Hmm, that's a good idea. It's clear UI work isn't my forte with how I missed such an obvious solution :P
I think that is what I'll go for, thanks for the suggestion.
obsidian29 22 Oct, 2022 @ 2:34pm 
No problem. I hope I'm being helpful. XD
CrunchyDuck  [developer] 24 Oct, 2022 @ 2:38am 
An update in regards to Obsidian's suggestions. I've got (I think) all the core functionality of the mod out of the way, so I think I'll start tackling some of the suggestions given here.
No idea how long that'll take!
DeadLeaves 24 Oct, 2022 @ 8:46am 
I have a suggestion (not that I can use the mod right now due to issues) but it would be really cool to have variables that give you the current time.
So you could do something like if( time > 8 & time < 16...
to make a recipe only available during certain times of the day.
CrunchyDuck  [developer] 24 Oct, 2022 @ 8:54am 
Ooh, that's a very good idea and wouldn't be too hard to implement.
I'll get right on that.
belnivek 27 Oct, 2022 @ 6:49am 
I would like to see Male/Female variables because Ideology clothing, also a variable for guests form quests or mods.
< >
Showing 1-15 of 45 comments
Per page: 1530 50