UI Mod for Operations - Possible?

Started by Astral, April 13, 2020, 08:52:50 AM

Previous topic - Next topic

Astral

Hello,

I am looking into the basics of modding for Rimworld, but I've found most of what I want to do tends to have something already out there.

One area that is sorely lacking is the surgery UI for installing parts - after a certain point, it becomes a convoluted mess to work through due to the number of options present (especially when adding mods like EPOE and Genetic Rim). Dub's Mint Menus helps alleviate the problem somewhat from a searchability standpoint, but still isn't ideal.

This is all a long winded way of asking - is it possible to override the Operations UI (or append to it)? My initial vision of this mod would be somewhat similar to the RPG style inventory mod, where you are given a visual display on parts making up the pawn, and can click into each piece for options to replace it, or operations that can be performed (e.g. right click the leg, get a list of leg implants and ability to remove).

I'd just like to know if it's even feasible currently before investing too much time into trying to make it, as I don't think I've come across anything quite like it yet.

Canute

A Doctor Bibber minigame for each surgery.
Where you need to grab/move some things from the patient, and depend on the skill of the pawn your mouse randomly move around ? :-)

LWM

Hehehe, sound perfect.

Anyway, YES, given Harmony, just about ANYTHING can be done, and in this case, it would be fairly straightforward:

Add some start to your UI - perhaps an extra button on the Operations page/subtab (next to the old add operation) or maybe just hijack that button entirely.  (Harmony required to give you a button, and then the button will do Find.WindowStack.Add(new Dialog_Your_Operation_Dialog);)
Your UI window (it'll be some Dialog window of some sort, probably, and it's basic unity UI through the lens of RimWorld plus figuring out what operations are possible.
When you've selected your operation, you just apply the operation bill to the person the same way vanilla does.

So, yeah, not too bad, all things considered.

Good luck and have fun!  (And I'd probably use this)

Food for future thought: is there a way it could include alien races?

Astral

Thanks for confirming LWM - I think at least to start it would probably encompass just baseline humans and possibly androids, as those are the only mods I play with currently, and they have a pretty static part selection. As long as the hediff is identifiable I don't see any reason why it wouldn't work for other alien races, but that's well out of the way of my current scope for it.

As I envision it, it would have a split on the left hand side for skeletal structure and external parts (limbs, eyes, ears, spines) and a right hand side for internal parts (lungs, heart, ribs, brain, etc.) along with any conditions that might be caused by them (brain damage, frail, bad back). I think having it as a separate button would probably be better, so that it could be used alongside the normal operations tab.

I'm not much of a UI person, preferring to dig more into the guts/back end of things, but that this bothers me as a UI aspect is telling :)