[A17] Jamestec's Mods (export bills/stockpiles, replace walls, make bionics)

Started by Jamestec, September 17, 2016, 11:52:18 PM

Previous topic - Next topic

Jamestec

Alpha 17 conversion progress: JTBetterCrashedShips, JTBetterhauling, JTDrill5Eva, JTExport, JTHomemadeBionics, JTMoreAreas, JTMoreHydroponicOptions, JTSavagePrisoners, JTWeRAnimals, JTZoneButtons.
Alpha 16 conversion progress: JTExport, JTReplaceWalls, JTZoneButtons.

JTBetterHauling
Prioritises hauling degradable items then undegradable. You can create areas (humanlike or animal, doesn't matter) with the word "haul" in it to prioritise items in the area, multiple "haul" areas are sorted alphabetical; aHaul will be hauled before dHaul. Then items in the Home area are hauled before items in no areas. Comes with source.

JTBetterHaulingAnimalsJoke
This is meant to be a joke mod. Makes all the animals on the map instantly haul for you. Accidently made this when redoing JTBetterhauling and thought it was pretty funny seeing a bunch of different animals compete to haul all the items for you. Comes with sauce.

JTMoreAreas
Removes area limit and modifies AreaManager GUI to handle more than 5.  Implements an Area Manager/Hub where you can easily edit areas. Comes with source.

JTCopyBills
Copy production table bills and surgery bills. You can mix copy and pasting with similar tables (e.g. electric and fueled smithies). Copy values last until you close the game (i.e. even after loading another save). Supports Crafting Hysteresis. Comes with source.

JTExport
Export and import worktable bills and stockpile settings. Supports Crafting Hysteresis and Enhanced Crafting. Comes with source.

JTReplaceWalls
Replace wall type and doors on the fly. No need to deconstruct and then build another. Features smart building where it won't try to replace walls that are already that type. You can replace mineable things with walls and doors; it will set the mineable to be mined and your constructors will prioritise mining anything in the way of blueprints, then construct. Comes with source.
Mod makers can look into the Vaccine class comments to see how to make new walls/doors/conduits replaceable without this mod updating to support them.

JTZoneButtons
Adds buttons for creating/expanding and deleting/shrinking stockpiles and growing zones when selecting a stockpile or growing zone. Comes with source.

JTHomemadeBionics
Make prosthetics and bionics at the machining table. Requires you to research Simple Prosthetics and then Bionics. Tried to balance the material cost and work needed against vanilla weapons. Yes the unfinished items look like guns, I'm lazy. I will probably expand to include stupid stuff like peg arms when I have time.

JTMedicinePlus
Make MedicinePlus which is normal medicine with a homemade copy of "Doctoring for Dummies"; it has a potency of 1.25. You can make and deconstruct MedicinePlus at workbenches that doesn't require electricity or fuel.
Making MedicinePlus gives XP to medicine. Requires medicine production research and a colonist with medicine level 12 and crafting level 3.
Another feature in this mod is when you use MedicinePlus or Glitterworld medicine to tend/heal someone, the XP gained is 2x the potency; more info here: https://www.reddit.com/r/RimWorld/comments/54lcx4/til_medicine_type_affects_medicine_xp_from/
Note: Unintentially changes all pawns that start with Glitterworld preference (humanlike) to MedicinePlus. When removing this mod, please restart Rimworld and if any pawns have Glitterworld preference, you will need to reselect a treatment level or they will not get treated and the doctor trying to treat will be idle.

JTSavagePrisoners
Lowers mood impact to -3 on selling/harvesting/accidentally killing prisoners and limits stacking to 1 (aka no mood debuff stacks). They tried to kill us, no mercy. Ok just a little mercy, they're human as well after all.
If you use the Psychology mod, use JTSavagePrisonersCompatPsychology instead (more info in Conflicts down bellow). No longer needed in A17.

JTMeleeXP
Allows gaining melee XP from attacking inanimate things (like sleeping spots) at half the normal rate. You might have to do a new save; the mod doesn't seem to work with my current save, but would with a save that was near the beginning of the same game. Comes with source.
Correction: requires you to make/obtain a new weapon for changes to take place. The save file actually saves the verb class the item is associated with at the time of creation.
CORRECTION: newest version (one with assemblies folder) uses some code from CCL to magically replace the vanilla method with mine; this means new save/new item is no longer required for JTMeleeXP to take effect. You can use the newest JTMeleeXP with a save that used the old JTMeleeXP with no problem, just don't try to run both at the same time somehow.

JTCampfireCremate
Cremate bodies at a campfire, takes more work than electric crematorium, scaled according to burning apparel (1.75x more work).

JTMoreHydroponicOptions
Grow more vanilla stuff in hydroponics (corn, haygrass, devil strand). Hydroponics default is now rice (corn is better if you don't need food right now). Keep in mind devil strand takes a long ass time to grow and solar flares/power failures will kill devil strand growing in hydroponics.

JTExtendedPowerArmor
Powered power armor removes penalties; requires additional research and reactor ship research. Powered power armor helmet has no move penalty and psychic sensitivity reduction similar to foil hat.
Super armor gives bonus opposite to power armor penalties; requires Powered power armor and ship engine research. Super armor helmet is like powered power armor helmet, but also has a light for when you're under a mountain or mining and not drafted.

JTDrill5Eva
Drill spots don't run out. Uninstalling feature removed, get Miniaturisation Overloaded by notfood instead. Comes with sauce.

JTWeRAnimals
Lowers mood impact (-3) and length (6 days) on killing bonded animals and no debuff stacking.

JTBetterCrashedShips
Crashed ship incidents when destroyed all give AI cores (poison did not, now does), plasteel (psychic 210, poison 172) and components (psychic 20, poison 18) (still gives vanilla steel and silver). Ship chunks also give plasteel (30) when deconstructed. Roughly balanced against buildable ship buildings.

JTBetterShipReactor
Ship reactor outputs 10,000 power because it's awesome and endgame.

JTEfficientBatteries
Batteries more efficient (0.75).

JTOrbital
Orbital trade beacon power consumption lowered to 5. I CBF making rules to put things I want to trade around the beacon, so usually I make beacons everywhere, but that's a lot of power.

JTSarcophagus
Sarcophagus mood benefit increased to 6 days (matches neutral colonist death), stack multiplier decreased to match colonist death multiplier.

Download
https://onedrive.live.com/?authkey=%21AOJkr-l_lBwwAJw&id=D3374FA891C72E6%212308&cid=0D3374FA891C72E6
After opening that link:
To download a mod, RIGHTclick on the folder and press download.

All the mods should also be on steam workshop.
Alpha 17:
https://steamcommunity.com/workshop/filedetails/?id=939624099
Alpha 16:
https://steamcommunity.com/sharedfiles/filedetails/?id=818135819
Alpha 15:
https://steamcommunity.com/sharedfiles/filedetails/?id=765623484

Install
For steam RimWorld, extract zip folder contents to "C:\Program Files (x86)\Steam\steamapps\common\RimWorld\Mods"
For non-steam Rimworld, no idea, good luck.

Uninstalling
Mods that add new items will not load if you don't remove the new items from the map before saving.
My mods that add new items are: JTExtendedPowerArmor, JTMedicinePlus.

Mods that use a MapComponent class will throw an error on load, but will be fine and will stop throwing that error after another save-load cycle. Alternatively, you can edit out the MapComponent in the save file by deleting the LineToRemove listed bellow: incorrectly editing the save file can break the save, back up the file first.
My mods that use a MapComponent class are: (modName: LineToRemove)
JTMoreAreas: <li Class="JTMoreAreas.MapComponent_AreaUpdate" />

Source
I think most/all of my mods that have Assemblies folder have source included. I sometimes forget to update source before uploading to steam workshop, so the Onedrive download would have the most recent stuff.

Conflicts
Psychology with JTSavagePrisoners: use JTSavagePrisonersCompatPsychology and put it under/after Psychology. Not applicable for A17.
What my shit overrides:
JTBetterHauling: JobGiver_Work.TryGiveJob() and JobGiver_Haul.TryGiveJob().
JTBetterHaulingAnimalsJoke: JobGiver_Haul.TryGiveJob().
JTMoreAreas: AreaManager.CanMakeNewAllowed() and Dialog_ManageAreas.DoWindowContents().
JTCopyBills: Building.GetGizmos() and Pawn_DraftController.GetGizmos().
JTExport: Building.GetGizmos() and Zone_Stockpile.GetGizmos().
JTReplaceWalls: Designator_Build.CanDesignateCell(), GenConstruct.PlaceBlueprintForBuild() and GenConstruct.BlocksFramePlacement().
JTZoneButtons: Zone_Stockpile.getGizmos() and Zone_Growing.getGizmos().
JTHomemadeBionics: (A15) Bionics.
JTMedicinePlus: MedicalCareUtility methods with JTMedicinePlus methods, Toils_Tend.FinalizeTend().
JTSavagePrisoners: (A15) Thoughtdefs for KnowGuestExecuted, KnowPrisonerDiedInnocent, KnowPrisonerSold, KnowGuestOrganHarvested.
JTMeleeXP: Verb_MeleeAttack.TryCastShot().
JTCampfireCremate: Nothing.
JTMoreHydroponicOptions: (A15) Thingdef for HydroponicsBasin, PlantCorn, PlantHaygrass, PlantDevilstrand.
JTExtendedPowerArmor: Nothing.
JTDrill5Eva: CompDeepDrill.ProduceLump().
JTWeRAnimals: Thoughtdefs for BondedAnimalDied.
JTBetterCrashedShips: (A15) Thingdef for Buildings_Exotic.
JTBetterShipReactor: Thingdef for Ship_Reactor.
JTEfficientBatteries: Thingdef for Battery.
JTOrbital: Thingdef for OrbitalTradeBeacon
JTSarcophagus: Thoughtdef for KnowBuriedInSarcophagus.

License
You can do whatever. Though if you use/improve my code, please link me so I can have a look and learn.

Changedog
http://pastebin.com/81YyB9MS

Acknowledgements:
Onedrive download improvements: Adventurer

Adventurer


Jamestec

Quote from: Adventurer on September 18, 2016, 12:25:52 AM
Could you create a JTSavagePrisoners patch for the Psychology mod?

Yep, it'll be called JTSavagePrisonersCompatPsychology on the download page, make sure to put that after/under the Psychology mod.
JTSavagePrisonersCompatPsychology is the same as JTSavagePrisoners, but adds Psychology's BleedingHeart trait to nullifyingTraits.

Adventurer

Thank you! Most appreciated.

I have one suggestion, it would be good if you could put your mods into folders within the zip archive.

ngcq1811

Quote from: Adventurer on September 18, 2016, 06:23:58 AM
Thank you! Most appreciated.

I have one suggestion, it would be good if you could put your mods into folders within the zip archive.
You can download the entire thing in one archive if thats what youre referring to

Adventurer

Quote from: ngcq1811 on September 18, 2016, 08:19:22 AM
Quote from: Adventurer on September 18, 2016, 06:23:58 AM
Thank you! Most appreciated.

I have one suggestion, it would be good if you could put your mods into folders within the zip archive.
You can download the entire thing in one archive if thats what youre referring to

That is not what I'm referring to.

ExiledAlchemist

Could you make a mod that applies the same concept of Savage Prisoners to pets? I've seen it where the pet population can get out of hand to the point that you can't get rid of them without ticking the entire colony off.
Excuse the gloom, but non may know of this meeting.

Jamestec

Quote from: Adventurer on September 18, 2016, 06:23:58 AM
I have one suggestion, it would be good if you could put your mods into folders within the zip archive.

I don't really understand what you mean by that.

Quote from: ExiledAlchemist on September 18, 2016, 07:28:16 PM
Could you make a mod that applies the same concept of Savage Prisoners to pets? I've seen it where the pet population can get out of hand to the point that you can't get rid of them without ticking the entire colony off.
I think that would involve coding, that's not something I'm interested in doing atm.
Edit: Nvm, I'm silly, you want to kill your bonded animals and colonist not get mood debuff. Working on it now. Finished, name is JTWeRAnimals.


Also, new mod to create vanilla prosthetics JTHomemadeBionics.

Adventurer

Quote from: Jamestec on September 19, 2016, 09:30:27 AMI have one suggestion, it would be good if you could put your mods into folders within the zip archive.

So, an example. Instead of

JTSarcophagus.zip\About

It would be

JTSarcophagus.zip\JTSarcophagus\About

Jamestec

Alright, thanks for the example.
I've pre-zipped the folders so it shouldn't be a problem anymore.

New mod; JTMeleeXP, allows you to gain XP attacking inanimate things like sleeping spots at half the normal rate.

New Mod; JTDrill5Eva, drill spots don't run out and drills can be uninstalled/reinstalled.

New Mod; JTMedicinePlus, adds medicine between normal medicine and glitterworld medicine. Tending/healing (not surgery) gives more XP when you use MedicinePlus or Glitterworld medicine. Read https://www.reddit.com/r/RimWorld/comments/54lcx4/til_medicine_type_affects_medicine_xp_from/ for more info.

taigenraine

One issue I am having with JTDrill5Eva is I can't make new drills.  My pawn drags over all the materials, construction completes... and nothing is there.  Materials are lost.  It could be a mod conflict, but uninstalling the JTDrill5Eva mod I can make drills again.

Jamestec

Quote from: taigenraine on September 28, 2016, 04:32:19 AM
One issue I am having with JTDrill5Eva is I can't make new drills.  My pawn drags over all the materials, construction completes... and nothing is there.  Materials are lost.  It could be a mod conflict, but uninstalling the JTDrill5Eva mod I can make drills again.
I am leaning towards mod conflict, you can help me find out by enabling my mod then restarting RimWorld, load a save then build another drill, after the drill completes/disappears, quit RimWorld then go to your RimWorld installation location:
Steam: C:\Program Files (x86)\Steam\steamapps\common\RimWorld
Non-steam: idk
Then go into the "RimWorldWin_Data" folder and then open the file "output_log.txt" and PM me the file contents.
That file will tell me what mods you have and if any errors occurred during your last play.

RazorHed

Yes Do Peg Arms so I dont have to bother updating Morbid Surgeries :) woohoo

taigenraine

Quote from: Jamestec on September 28, 2016, 08:43:37 PM
Quote from: taigenraine on September 28, 2016, 04:32:19 AM
One issue I am having with JTDrill5Eva is I can't make new drills.  My pawn drags over all the materials, construction completes... and nothing is there.  Materials are lost.  It could be a mod conflict, but uninstalling the JTDrill5Eva mod I can make drills again.
I am leaning towards mod conflict, you can help me find out by enabling my mod then restarting RimWorld, load a save then build another drill, after the drill completes/disappears, quit RimWorld then go to your RimWorld installation location:
Steam: C:\Program Files (x86)\Steam\steamapps\common\RimWorld
Non-steam: idk
Then go into the "RimWorldWin_Data" folder and then open the file "output_log.txt" and PM me the file contents.
That file will tell me what mods you have and if any errors occurred during your last play.

I re-enabled the mod and the problem just went away on it's own.  I think the mod is in a different load order now, so that is probably it.  I am just going to leave it how it is now since everything is working.  Thank you for your quick reply though.

Jamestec

New mod JTBetterCrashedShips to satisfy your early plasteel need.
Why does it take plasteel to make advanced futuristic ships, but crashed parts yield none. Plasteel is suppose to be stronger than steel and components.