RimWorld

RimWorld

64 ratings
Math! (Forked)
2
3
2
2
3
2
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.4, 1.5
File Size
Posted
Updated
4.672 MB
12 Apr, 2023 @ 4:06pm
19 Sep, 2024 @ 2:48pm
13 Change Notes ( view )

Subscribe to download
Math! (Forked)

Description
Announcement: 1.6 and the future of my projects
As y'all know, I haven't had a ton of time or motivation to work on my mods. Math is a mess of my fixes on top of Duck's old code, RSU:R has always been pretty janky, and No Caves... well NC is fine, actually. No real complaints there.

My mods are not longer receiving active support.

This is mostly a time thing; life is busy around here, and while I'm at least able to hop on my PC and play games semi-regularly, I just don't have the gusto to dig in to buggy messes like I used to haha.

I give full permission to anyone brave enough to pick up where I left off to do so - in fact, if you need me to explain anything in the code, just poke me on Discord and I'll do my best.

Maybe one day in the future I'll completely rewrite Math from the ground up, but RSU:R is a nightmare to work on, having now gone through four maintainers, by my count. No Caves, at least, should work in any version, regardless of base-game changes, unless Ludeon decide to completely refactor map generation.

Thanks for using my jank all this time, y'all! I appreciate your endless patience with me, and I apologize for not paying it back in the end <3
-Kd


What does this mod do?
  • Ability to perform Math! with a huge range of variables, from "how many pawns have the fast walker trait", to "how much food do our colonists need to eat per day"
  • Create your own variables to cut down on the amount of Math! you need to do
  • New field to calculate how much of an item exists - Want you simple meal production to count all meals, not just simple? Use "categories.meals"!
  • Larger bill details
  • Robust in-game info button with examples, variables and explanations for using Math!
Many features from the mod Better Workbench Management have been added, such as:
  • Dragging bills to rearrange
  • Linking any bills together to match their settings, as well as options to choose what settings are matched.
  • A button to easily switch between "take to stockpile" and "drop on floor"
  • Renaming bills!

Languages
Math! will allow you to use variables in your native language.
However, right now none of my tutorials/explanations are in other languages. I have everything set up to support other languages, but none made yet.
If you are multilingual and wish to contribute, I'd be happy to discuss it on Discord.

Known Issues and Workarounds
  • The skill limit bar isn't interactable. I'm looking into this, but for now simply limiting the bill to a specific bill using the dropdown menu is the best workaround.

If you find a severe bug that (for example) breaks saves, or you have to send me a mod list / save file, you can contact me fastest on Discord: @kd8lvt
You'll have to send a friend request initially, as I get random spam rather often.

Compatibility
  • Any mods that add new things (food, weapons, really anything) will be compatible and usable as variables.
  • Compatible with new saves. Removing from a save will produce a one-time error.
  • Compatible with Project Rimfactory (Thanks to ruifung on GitHub)
  • Supports using loadout tags from Compositable Loadouts (ruifung again)

  • Incompatible with Better Workbench Management. Most of its functionality has been integrated into this mod anyway.
  • Also incompatible with Take it to Storage for the same reason as Better Workbench Managment. That feature is planned for a future update.
  • Incompatible with just about anything that patches the bill configuration menu. Hence the two incompatibilities above. If you're getting red errors when working with bills, that's probably why.

Planned Features
  • Better ingame documentation. I don't dislike to current system, but working with it on the backend is a pain, and the mod is obtuse for new users. Hopefully re-writing it will solve both of those issues.
  • Reimplement the bill menu changes as a series of patches instead of recreating the whole menu from scratch. This is a long-term goal due to limitations on RimWorld's end, and requires a hell of a rewrite in certain sections of Math. However, doing this should solve most if not all the BillMenu compatibility issues, so this is a high priority.

Credits
falconne, who made Better Workbench Management and its assets.
Revolus, who made What's Missing? and its assets.
ruifung over on GitHub, who has done multiple compatibility patches.
CrunchyDuck, without whom this mod wouldn't have existed for me to fork in the first place.
NCalc, the math parsing library Math uses: https://github.com/ncalc/ncalc

Links
Source Code: https://github.com/kd8lvt/Rimworld-Math
Permission to Fork and Reupload provided by CrunchyDuck via a pull-request comment, on his GitHub repository (CrunchyDuck/Math)

License
This mod is licensed under Creative Commons. To summarise - feel free to use the code as you see fit, so long as you don't claim it as your own.
Popular Discussions View All (2)
7
6 Feb @ 4:20pm
Bug when playing with Dub's Mint Menus
Famous5000
2
24 May @ 8:14am
C.meals bug cause (I think)
Imagine12
398 Comments
Nick Molliger 12 Jul @ 2:57am 
There actually is a nice alternative: "Everybody Gets One".
Despite the naming, you can manage the value of items per every search iteration.
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1687566130

In my opinion, it has its pros and cons, unlike "Math!". The downside is that "Everybody Gets One" has a different number selection structure. It works as a search engine, for which you can set up filters, it is much simpler than full-fledged formulas that you can build in "Math!", but the upside is that the filters can be anything. You can set up a search by basic parameters like age, gender, faction, type, etc., but in addition to this, you can count pawns that, say, have a missing leg. Or using simple logic and/or select only those pawns that have no leg and at the same time have a prosthesis when you place an order for prostheses. You can even delve into ThingDef and get any number from the game, like we did in the good old ArtMoney in the 2000s, but in a read-only format.
Lunertic 12 Jul @ 1:19am 
Well. Looks like it's finally time for me to get into rimworld modding. I appreciate all the work on the mod to keep it up to date and fixing bugs. Now it's time to see what I can do. In the meantime, take care. o7
BlazingImp77151 10 Jul @ 3:57pm 
if Math! isnt going to be maintained into the future, does anyone know a good alternative? This is a very useful mod, and its going to be very sad not having it around come the update.
Imagine12 24 May @ 8:09am 
For the c.meals bug, I think it's caused by pawns having meals in their inventory at any given time. Some mod (probably Common Sense) is having pawns keep one meal in inventory for easy meals on the go. This breaks math somehow so there's that
Nick Molliger 22 May @ 11:53pm 
F3iT same
F3iT 22 May @ 5:33pm 
Now my bills are disapering and i can't click the "add bill" button anymore....
F3iT 22 May @ 10:36am 
Also i noted that I usualy have some "Stockpiles" and "Groups" sublist in stockpile selection menu, they are not there anymore.
F3iT 22 May @ 10:34am 
Hello. I got a bug similar to 룰루랄라's but only hen i set a fixed target for outputs (ie. a stockpile). Then the UI get all empty and unusable, and I have to delete the bill. Couldn't get the initial error but then it's spamming

Exception filling window for CrunchyDuck.Math.Dialog_MathBillConfig: System.NullReferenceException: Object reference not set to an instance of an object

I know this might be a mod incompatibility but i can't seem to find any mod altering bills ui...
Any ideas ?
晓山alreShan 11 May @ 2:02pm 
@EgotisticalElf
I guess you have Ancient urban ruins or something similar?
EgotisticalElf 11 May @ 12:58pm 
I'm getting an error, but i'm not 100% sure what is going on. The call to InteractionCell ends up causing a search in Walkable for a null map. Does this mean I have an item that exists, but isn't spawned? or is the cache somehow invalid?

Object reference not set to an instance of an object
at Verse.GenGrid.Walkable (Verse.IntVec3 c, Verse.Map map)
at Verse.ThingUtility.InteractionCellWhenAt (Verse.ThingDef def, Verse.IntVec3 center, Verse.Rot4 rot, Verse.Map map)
at Verse.Thing.get_InteractionCell ()
- PREFIX Mlie.MoveInteractionCell: Void MoveInteractionCell.Thing_InteractionCell:Prefix(Thing __instance)
MonoMod.Utils.DynamicMethodDefinition.Glue:AbiFixup<Verse.IntVec3 Verse.Thing:get_InteractionCell(),Verse.IntVec3 Verse.Thing.get_InteractionCell_Patch1(Verse.Thing)>(Verse.Thing,Verse.IntVec3&)
at CrunchyDuck.Math.CachedMapData.GetThings (System.String thing_name, CrunchyDuck.Math.BillComponent bc)