[A9] [MODLIST] UMK's Hardcoded stuff, FixScar(2.3.2) - Bionic-Frigging-Torso

Started by UMK, March 07, 2015, 05:06:14 AM

Previous topic - Next topic

UMK

Hello, fellow colonists!
Started my personal modlist full of semi-insane ideas.

FixScar
This simple little mod allows you to patch scars on colonists' heads, necks and torso (other body parts can be replaced with prothesics or harvested limbs) using surgery and some human meat and leather (hummmy!).
And also now 'Bad Back' effect is applied to spine, rather than to torso. For characters who already has that effect before mod installation exists diagnose operation, which will relocate it (spess magic) to spine (or remove if spine was replaced).
But it's not all. Mod present rejuvenators (glitterworld medicine for now), which when injected can cure Frail, and starts de-aging process. But all comes at cost, after rapid rejuvenation period colonist will start suffer from accelerated aging. (This shit is so unbalanced... And I like it)
And this list is not over yet. You can make your own bionic torso at machining table and install it without removal of already installed bionics or restoration of missing organs!
Proof:


Download

Compatibility with 'Expanded Prosthetics and Organ Engineering' checked. Could be compatible with everything else.
Used FixBone as inspiration.
Version history:
2.0, removed unused xmls. Could still be working.
2.1, source attached. Added way to treat 'Bad Back'
2.2, added rejuvenators.
2.2.1 - applied rejuvenators to whole body, not brain.
2.2.2 - fixed insane pain factors, added 'hidden' pawn activity - aging, rebalanced aging rates.
2.3.0 - Added bionic torso.
2.3.1 - Made bionic torso 'mod-friendly' so it won't replace Hediff_InjuryLocal derived classes.
2.3.2 - Fixed some bugs


Never Stop Looking
In short, with this prothesics mod you can make your own Adam 'Bossfight' Jensen (who never asked for this).
Details:

       
  • New trait 'Inquisitive'. But it's not just renamed 'Prosthophobe'
  • New type of prothesics - augmentations. They do not replace body parts, instead they are just added to them as additional hediffs (if you know what does it mean). But also they add negative effect - ever-increasing phantom pain (reaches maximum at day 12 without injection). Only way to reduce it - neuroposine injections
  • Two new types of surgeries - augmentation and neuroposine injection (requires only one medicine of any type at the moment). Augmentations are appliable only to organic parts (for the sake of balance). They do not cause negative prosthophobe and positive prosthophile thoughts also.
  • Augmentations implemented - GlassShield, CASIE and Rhino (non-craftable and probably due to high price(12000) even unbuyable at the moment)
  • Guys with 'Inquisitive' trait are immune to phantom pain
Download from dropbox
Screenies: http://imgur.com/a/sCiDR

This mod is far from being finished, better to say it's just a tool, I hope you'll figure out how use it and improve. I have not much experience to implement all planned features.
For example you can turn those 'augmentations' into genetical enhancements, nerfing pain effect (giving it treatability and renaming as 'adaptaion').

Update 0.1.1: included source code.
Update 0.2.0: Added Rhino dermal armor. Now mod is confilicting with everything what modifies vanilla damage types.
Update 0.3.0: Added Glass Shield cloaking system. It is less impressive than it could be. All it does is just reducing chance to be shot by 50%. I'm working on effects, if you have any idea how to apply alpha channel to pawn, tell me, please.


Recoil Compensation stat
Added new pawn stat - recoil compensation, which greatly reduces (best reduction I've achieved was 57%) cooldown between attacks (the very time your pawn spend after shooting stupidly standing still). This stat is affected with manipulation and consciousness activities, as well as shooting skill, 'Trigger-happy' trait increases compensation even further. Soft-capped at 70% adn 60%, hard-capped at 50% (you won't reach it anyway).

Download

Go and fire with this 'Grendel' now. Haven't noticed any issues, but utilized dirty hacks you can see in attached source code leave no doubt - they must exist. Tynan, don't open it. Please.

Updated to 0.0.2a now this stat will work with all verbs which inherit from Verb_LaunchProjectile, and even if some do not it will not break everything into jerky animation at least.

Meal dispenser
Now NPD can dispense meals (simple and fine). Added 2 more research projects to improve NPD. Apperance was replaced with Kirid's small side dispenser (which one I favor), if you want good old look - replace mod files with ones from Vanilla-like (or activate Vanilla-like as mod after MealDispensers).
Will affect only newly built NPDs.

Download

NotOnlyBeer
Not only beer, that it is! Now pawns will consume all drugs and beverages automatically. It is temporary solution before Tynan's fix. Less deeper and thoughtful code, but it works at least.
Download
Updated to 0.2 - limited search distance to 30 tiles. Due to game implementation this distance ignores walls and barely passable and hazardous locations. I have alternative version, but it might cause pathing issues (game reinitiates all paths). But it's still much better than pawns walking to other side of map for booze.


Note for modders. If you think that you can use or improve stuff posted here - you are free to do it. Most mods have (unreadable) sources.


Latta

I never thought of fixing scar with assembly :o This way patching neck won't get rid of my expensive brain implant etc, right?
Hey, but can you delete...what should I call it, dummy files? From my FixBone? I think you forgot to delete those lol.

UMK

Quote from: Latta on March 07, 2015, 05:30:43 AM
I never thought of fixing scar with assembly :o This way patching neck won't get rid of my expensive brain implant etc, right?
Hey, but can you delete...what should I call it, dummy files? From my FixBone? I think you forgot to delete those lol.
Thanks for your FixBone, Latta! I thought it is possible to fix scars in the same way, but it caused effect mentioned by you: all implants have been removed too. So I've created my own surgery recipe class. Code just looks for InjuryLocal hediffs for operated part, checks that it isOld and heals it. Actually it is possible to expand list of healable limbs with simple xml editing of appliedTo section.

Boboid

Huh.. Awesome!

Glad someone found a decent way to repair scars. Always bothered me when playing heavily modded that I'd have a colonist that was about 85% bionic(Limbs, organs... ears..) with a damaged torso.
A prison yard is certainly a slightly more elegant solution to Cabin Fever than mine...

I just chop their legs off... legless prisoners don't suffer cabin fever

UMK

Updated ScarPatching (won't affect gameplay, just looks better from internal side) and added new mod.

Ykara

This gets better and better, I wish I could be so good at dll modding like you are!

UMK



artyb

Unfortunately, Recoil compensation have a conflict with mods like RimEffect and others that adds some guns. They just don't wanna shoot at all.

UMK

Quote from: artyb on March 09, 2015, 10:36:40 AM
Unfortunately, Recoil compensation have a conflict with mods like RimEffect and others that adds some guns. They just don't wanna shoot at all.
Thanks for feedback! For this time it was possible and fairly easy to fix this issue. It was stupid of me, having entire arsenal of masterwork and legendary RimEffect guns to not test them.

Ykara

I have found a problem in the code, when I try to compile it Visual Studio tells me that it "can't explicitly call operator or accessor"
get_Part causes the problems, do you know a way to fix this?

UMK

Not a single idea. Could be missing references to RimWorld assemblies, or wrong target .NET version or platform. C# is so C# and MS is so MS.Their compliers are known to tell something gibberish or facts exact opposite to truth.

artyb

Quote from: UMK on March 09, 2015, 11:15:10 AM
Quote from: artyb on March 09, 2015, 10:36:40 AM
Unfortunately, Recoil compensation have a conflict with mods like RimEffect and others that adds some guns. They just don't wanna shoot at all.
Thanks for feedback! For this time it was possible and fairly easy to fix this issue. It was stupid of me, having entire arsenal of masterwork and legendary RimEffect guns to not test them.

Ill be waiting. Thats what must be in full game release.

UMK

I've updated it to 0.0.2a. Vanilla, Rimfire and Rimsenal tested to work.