This mod has now been completed and can be found on...
Ludeon: https://ludeon.com/forums/index.php?topic=29503.msg445544#msg445544
Steam: https://steamcommunity.com/sharedfiles/filedetails/?id=1566269698
Thanks to everybody for playtesting and providing feedback and bug reports!
Hey, so this has been a mod I've been working on-and-off with for the past few weeks but found the motivation to put a playable version together. While I've enjoyed the concept of a tool mod, there isn't a single tool mod out there that cuts it for my taste so I've decided to take things into my own hands and get something going. I'm no stranger to the modding scene, but this is my first time actually taking the public test approach, so this is something new for me.
I have somewhat white box tested this so there shouldn't be any major bugs as it stands. That being said, this has only been tested with Pick Up & Haul; the game was otherwise completely vanilla while whiteboxing. There shouldn't be any incompatibilities though. This should work with existing saves, but I'd highly recommend this with a new save.
LinksGitHub Releases Page (https://github.com/XeoNovaDan/SurvivalTools/releases) (downloads)
Source Code (https://github.com/XeoNovaDan/SurvivalTools)I highly recommend using tammybee's
Cut Plants Before Building (Dropbox (https://www.dropbox.com/sh/z3czwl5d7l0cqcd/AADpUgIRopahoG8WgCOY_Pb2a) / Steam (https://steamcommunity.com/sharedfiles/filedetails/?id=1232208162)) because that auto-designates certain plants and trees to be cut by plant cutters, which helps when you have constructors without axes who'd otherwise take a long time to chop down trees that are in the way of their blueprints.
Screenshots (RC1):(https://i.imgur.com/uAOlPFO.png)
(https://i.imgur.com/7jBxbiL.png)
(https://i.imgur.com/BYh4z29.png)
(https://i.imgur.com/BsfsVf9.png)
Features:Splits the following vanilla work stats
- Mining Speed -> Mining Speed (vanilla def) and Digging Speed
- Mining Yield -> Mining Yield (other) (vanilla def) and Mining Yield (digging)
- Plant Work Speed -> Plant Sowing Speed (vanilla def), Plant Harvesting Speed and Tree Felling Speed
Adds 5 tools to the game
- Axe - affects tree felling speed
- Pickaxe - affects digging speed and mining yield (digging)
- Hammer - affects construction speed
- Sickle - affects plant harvesting speed
- Glitterworld Multitool - affects all of the above, doesn't have quality levels
Tools are acquirable through various different ways
- At the beginning of a new game (varies by scenario; no tools for naked brutality)
- Production at crafting spots or smithies (all except multitool)
- Ancient ruined buildings (40% chance per building, all except multitool, typically low quality and in poor condition)
- Tribal/outlander bulk goods traders and settlements (all except multitool)
- Outlander/orbital exotic goods traders (only multitool)
- Ancient dangers (60% chance per danger, only multitool)
Colonists can use tools from their inventories (added functionality to allow for picking up items anywhere) as well as what they have equipped
- If a colonist has multiple tools that affect the same task, they use the fastest tool of the lot. If there's still a tie, they use what's most immediately available out of the tied lot
- Colonists are limited to 3 tools in their inventory other than when caravanning - this can be toggled via mod settings
- Since this uses the inventory system, even non-violents can use tools
- If a colonist somehow gets a tool that's worse than working toolless, they will continue working toolless
Colonists get work speed penalties if they don't have tools for tasks that need them
- Animals aren't affected by this
- For now, AI humanlikes also aren't affected by this due to design implications. I hope to solve this at some point
- Construction speed - x30% speed if working toolless (x0% with hardcore mode enabled)
- Digging speed - x30% speed if working toolless (x0% with hardcore mode enabled)
- Mining yield (digging) - x50% if working toolless (x0% with hardcore mode enabled)
- Tree felling speed - x30% speed if working toolless (x0% with hardcore mode enabled)
- Plant harvesting speed - x50% speed if working toolless (x50% with hardcore mode enabled)
Different materials affect a tool's effectiveness in different ways
- You can view each material's effect on certain aspects of tools by viewing their info cards
- Tool lifespan is generally directly proportional to their max HP modifiers
Tools will actually degrade over use
- 1 HP lost per 0.75 ingame hours of use (0.5 with hardcore mode)
- Also significantly influenced by the quality of the tool
Design purposes of this mod:
- Removing much of the Minecraft logic that RimWorld ends up having (e.g. punching trees)
- Add tools that fulfil core niches - not going into nitty-gritty territory (e.g. knives for cooking, scalpels for surgery etc.)
- Not aiming for hyper realism; tools are still slightly abstracted in terms of gameplay
To-do:
Auto-optimiser for colonist tool selection, or at least a sidebar alert - alert implemented in v0.3. Auto-optimiser probably won't happen- Allow AI to be utilise tools - On hold
- Pawns to auto-equip tools that they're using instead of an 'In-use' tag (very low priority, may not make it to v1.0 for this mod)
The oft-mentioned hardcore mode of this mod can be seamlessly toggled via mod settings. As this mod is somewhat of a WIP (though most stuff at this point is concrete), feedback and any suggestions that fit within this mod's design purposes would be much-appreciated.
Credits so farBrrainz - Harmony
Mehni - Allowing me to directly use code from Pick Up And Haul (namely the 'Pick Up' part)
Why_is_that - SettingsHelper (not actually utilised yet)
Shotgunfrenzy - Artwork
erdelf - erdelf
will mods that rely on the plant work speed stat, just use the plant sowing speed stat instead, and have (hopefully) minimal compatability issues? same with mining speed?
Why limit it as "three tools in the inventory"? It's weird.
A human should be able to carry as many tools as he can, normally.
And, what if a pawn is just needed to carry many tools, eg, many tools founded somewhere or bought from trade.
@123nick - Yeah, they will.
@temple_wing - Good catch actually. It's mainly just a balance thing so that colonists can't just use stupid amounts of tools, but I'll add a mod setting to disable the limit altogether.
Yes, it's inefficient, but it's less micro management.
If you can program it to choose automatically( pick up necessary tool from stockpile just like doc pick up med before tending ), will be perfect.
Alright, pushed v0.2 with a bunch of minor changes:
* Split mining yield into mining yield (digging) and mining yield (other) - affected by pickaxe and multitool
* 3-tool carry limit now only applies to hardcore mode
* Bugfix regarding the tool carry limit when caravanning
* Added new sprite for glitterworld multitool by Shotgunfrenzy
I also tried and failed to add a QoL feature that shows which tools a colonist's actually using in their inventory. The commented-out code is still present in the source code in SurvivalTool.cs and SurvivalToolUtility.cs
@temple_wing - Hmm, tool optimisation will be a tricky one to do, but I may give it a shot. Since there can be specific use-cases and that's something I've never done before, there's no guarantees I'll actually get an auto-optimiser in. However, something like an alert (similar to 'Low food' or 'Hunter lacks ranged weapon') will probably be much more doable and non-intrusive to player optimisation. Liking the feedback by the way!
Do you have a GitHub with the 0.1 version with 3-max tools?
EDIT: Nevermind
Alright, pushed v0.3 which mostly improves on the QoL side of things but does tweak a few things too. Copypasted changelog from GitHub:
NOTE: Although this release is for unstable 1.0, it has been quickly tested and shown to work fine with B19
General Changes
- 3-tool limit is now an independent toggle in mod settings
- Renamed Estimated lifespan to Estimated tool lifespan
- Tools generated in ruined buildings are now only made from cheap materials (max material market value of 3, cheaper materials are more common)
- It's now easier to see which tools a colonist's using
- Added alert for colonists that are missing tools
- Added learning helper entry regarding the use of tools
Bugfixes
- Roof removal, blueprint clearing and growing zone sowing will now correctly use the tree felling job when appropriate
Does not compatible with SimpleSideArm.
@temple_wing - How bad is the conflict? Any error logs?
Exception filling window for RimWorld.Dialog_Trade: System.NullReferenceException: Object reference not set to an instance of an object
at SurvivalTools.SurvivalToolUtility.GetBestSurvivalTool (Verse.Pawn pawn, RimWorld.StatDef stat) [0x00000] in <filename unknown>:0
at SurvivalTools.SurvivalToolUtility+<BestSurvivalToolsFor>d__11.MoveNext () [0x00000] in <filename unknown>:0
at System.Linq.Enumerable.Contains[SurvivalTool] (IEnumerable`1 source, SurvivalTools.SurvivalTool value, IEqualityComparer`1 comparer) [0x00000] in <filename unknown>:0
at System.Linq.Enumerable.Contains[SurvivalTool] (IEnumerable`1 source, SurvivalTools.SurvivalTool value) [0x00000] in <filename unknown>:0
at SurvivalTools.SurvivalTool.get_InUse () [0x00000] in <filename unknown>:0
at SurvivalTools.SurvivalTool.get_LabelNoCount () [0x00000] in <filename unknown>:0
at RimWorld.Tradeable.get_Label () [0x00000] in <filename unknown>:0
at RimWorld.Transferable.get_LabelCap () [0x00000] in <filename unknown>:0
at RimWorld.TransferableUIUtility.DrawTransferableInfo (RimWorld.Transferable trad, Rect idRect, Color labelColor) [0x00000] in <filename unknown>:0
at RimWorld.TradeUI.DrawTradeableRow (Rect rect, RimWorld.Tradeable trad, Int32 index) [0x00000] in <filename unknown>:0
at RimWorld.Dialog_Trade.FillMainRect (Rect mainRect) [0x00000] in <filename unknown>:0
at RimWorld.Dialog_Trade.DoWindowContents (Rect inRect) [0x00000] in <filename unknown>:0
at Verse.Window+<WindowOnGUI>c__AnonStorey0.<>m__0 (Int32 x) [0x00000] in <filename unknown>:0
Verse.Log:Error(String, Boolean)
Verse.<WindowOnGUI>c__AnonStorey0:<>m__0(Int32)
UnityEngine.GUI:CallWindowDelegate(WindowFunction, Int32, Int32, GUISkin, Int32, Single, Single, GUIStyle)
b19, possibly related to simple sidearms? Possibly related to a lot of mods I have enabled? It looks like whenever a axe showed up in a trader's inventory, it screws up the entire window. I could create them myself and they worked fine for me, but trader generated ones seem to cause issues. If I look in a caravan's inventory, it shows the axe icon, and then the rest is blank until the info button on the right. The info button brings up a transparent grey box where the info screen should be, but there is no info. This makes trading impossible.
Its unfortunate, I really like the concept. The integration with inventories is nice and otherwise worked fine with simple sidearms? Colonists seemed to swap to melee tools as appropriate for being in melee range with a gun.
I will mention one thing I find super annoying, but its a vanilla issue made worse by this mod - Builders/haulers to build run into an issue where they spend large amounts of time trying to fell trees in the way, since they have both low plants skill and now worse, no axe. I am not sure what an elegant solution to this is, or even if its within the scope of this mod. My only real suggestion is change the axe's bonus be harvest yield instead of speed, such that I dont need to micromanage cutting plants that are in the way of construction.
@Lancefighter - Thanks for the stacktrace; will look into it now. Looks like it gives enough info to pinpoint the cause.
Also yeah, the axe situation is a bit of a tough one. Harvest yield won't work because the harvest yield stat actually only affects the chance of successfully harvesting resources from plants in general, and it's literally impossible to fail harvesting trees for their wood - it'll only cause more problems. I guess one fix could be to add 'Tree Felling Speed' as a relevant stat for the ConstructFrames and ConstructFloor workGivers, though I will probably need to change the way that the 'Colonist needs tools' alert works.
Edit: Though OTOH, I could also list 'Cut plants before building' as a recommended mod as well, which'll also mostly address the issue of axeless level 0 plantwork constructors spending an eternity cutting down trees that are in the way of blueprints since that autodesignates.
Alright, bug has been squashed. Will push v0.4 shortly.
Also, it wasn't an SS issue, just a matter of bad coding on my behalf :P
public static IEnumerable<SurvivalTool> BestSurvivalToolsFor(IThingHolder holder)
{
Pawn pawn = (holder is Pawn_EquipmentTracker eq) ? eq.pawn : ((holder is Pawn_InventoryTracker inv) ? inv.pawn : null);
// The following was the problematic code snippet:
// if (pawn == null)
if (pawn == null || !pawn.RaceProps.Humanlike || pawn.TraderKind != null)
yield break;
foreach (StatDef stat in SurvivalToolStats)
{
SurvivalTool tool = pawn.GetBestSurvivalTool(stat);
if (tool != null)
yield return tool;
}
}
Finally pushed v0.4 - I decided to change a couple of other things as well. This update's largely bugfixing, though some tweaking has been done too. No new features have been added. Just to re-iterate: v0.4 of Survival Tools is for 1.0.2045, but should also work fine with 0.19.2009 since there's very little in the way of code difference
Copypasted changelog from GitHub:
General Changes:
- The game will now check whether a pawn can actually use the stats that a tool affects when determining if it shows that the tool is 'in use'
- Lost Tribe now starts with slate sickles instead of wooden sickles since wooden sickles are barely better than working toolless
- Tools degrade over use 50% quicker (once per 45/30 mins average -> 30/20)
Bugfixes:
- Major: Attempting to trade with traders that carry tools will no longer completely break the trade UI
- Tool degrade chance per tick is now calculated correctly, with new chances being significantly lower
- Colonists will no longer drop in-use tools after a caravan journey
If all goes well, the next build will likely be the first release candidate since I plan to add AI tool use. Thanks for the testing and bug reports so far!
Ah, good call on the cut plants before building mod, I didnt know that one existed, Ill add that today... and then have to rebuild all my tools since I deleted them so I could trade. No big deal, they craft quickly enough.
If harvest yield wasnt limited by base game limitations (read: if youre modding base game limitations on harvest yield out), would you consider increased harvest yield to be within the scope of the tools?
It might be feasible to do something similar to what I did with mining yield where I could split it into 'General' and 'Trees' or something of the sort, where colonists will simply get less wood from barehanding trees or using bad tools. I don't want to replace the speed modifier though, just because people can't punch down trees as quickly as they can with a high-quality plasteel axe for example, which kind of goes against this mod's goal of eliminating that standout MC logic.
When use this mod together with SimpleSidearm, Pawn can not automatically choose tools to use.
PS: my version is v0.2.
Ah. Yeah, pawns don't actually equip their tools, but they get passively used instead. This was clarified in v0.3, but I wouldn't recommend using 0.3 since it had quite a few bugs. Probably a good time to check out 0.4 which should still work fine with B19 despite it being a 1.0 mod
I suggest make it actually equip it. It's more intuitive.
When working, switch to tools, when fighting, switch back.
Maybe put it to TODO list.
We'll see. While it is indeed more intuitive, there are some design implications (e.g. pawns that are incapable of violence, or the AI when I get to implementing AI tool use). I'd probably also have to redesign some elements of this mod's code since in its current code state, it probably won't be able to handle auto-equipping in some edge cases.
I'll to-do it anyway, but no guarantees for implementation and it's a low priority thing.
For now I think people can use a mod like weapon storage to do that
It's been a while but Release Candidate 1 has finally been pushed. No significant changes, but many minor changes have been made - mostly bugfixes and rebalances.
Copypasted change log from GitHub:
Note: The idea of having AI use tools has been put on hold again due to design difficulties
* Several minor bugfixes
* Tool degradation has been reworked
* Tweaked tool stat quality scaling
* New alert for when colonists have tools with only 12 hours of use or less
* New option to toggle tool degradation
* Rebalanced several materials' effects on tool stats
* Smelter bills now allow tools by default (except glitterworld multitool)
I assume that stability and balancing with this mod have both been good considering this hasn't exploded with bug reports or balance complaints, so a release in a couple of weeks is on the horizon - enough time for the dust to settle with 1.0 hopefully. Just need to get a preview, and then a slightly modified RC1 (mainly learning helper entries) will be pushed as initial release.
Release Candidate 2 has now been pushed.
Changelog:
* Split the Using Tools learning helper entry into Equipping Tools and Using Tools
* Added new learning helper entry for Tool Degradation
* Now adds standalone functionality to pick up items (thanks Mehni!)
but but i need my Butcher cleaver to cook like a man ! :)
Ive seen a couple of tools mods around but ive installed a few of your mods already, i like the content so Im choosing this. Ill be waiting for this one to release fully to add it to my game.
tools are neither simple weapon nor complex weapon, and once degraded cannot be mended. Is this bug or intended?
there is an option that they don't degrade when in use so why would u want to repair them ?
i personally prefer to have them degrade and then spend a few cloth+steel to repair them (managing), than to have them not degrade. Every weapon or apparel does.
@Ruisuki - Much appreciated!
@ultra4 - Good catch. Will work on compatibility with Mending now.
Okay, Release Candidate 3 is now out. More minor bugfixy stuff.
Changes:
* Subdivided the 'Tools' ThingCategory
* Now compatible with mending
* Outlander settlements and exotic goods traders now correctly have a chance of having multitools
* Stockpile zones now allow tools by default
Hi, I'm new to RimWorld modding. Is the glitterworld multitool readily removable? Although it's rare/elusive it still feels a little implausible.
Will more tools be added in the future? Such as powertools and the like. Maybe a drill for construction that needs a nearby conduit, or a chemfuel-powered chainsaw. Would this ever be possible to implement? Or just too convoluted to be worth the effort?
@中村ジロ - Should be quite easily doable just by removing it from Defs/ThingDefs. Regarding future tools, I do have plans but for a separate mod (probably going to be called Extra Survival Tools); I've already somewhat laid out the framework which'd make this very much possible.
Wow, awesome! Looking forward to it. Keep up the great work! Do you have a Patreon account or something? I'd like to show my support some time in the future.
@中村ジロ - I don't. Still, very much-appreciated! :)
Ah, too bad.
Hey, I almost forgot: what about putting out fires? Seems a little awkward for pawns to be able to stamp out blazing vertical walls in vanilla. Maybe extinguishers and fire blankets? Maybe even a water bucket if No Water No Life is in use. Something like that. What do you think? Maybe the other way around too: needing electric lighters, gasoline lighters, matches, or even pieces of flint to start fires.
Oh! What about the tools doubling as weapons if you're in a pinch?
This mod's now officially been released! Thanks to those who have playtested and provided valuable feedback.
Ludeon: https://ludeon.com/forums/index.php?topic=29503.msg445544#msg445544
Steam: https://steamcommunity.com/sharedfiles/filedetails/?id=1566269698
@中村ジロ - Sorry for the late response, but yeah, totally a possibility! Not for the first release version though, unfortunately. Tools can also be used as weapons, though less effective than clubs.
First, super-congrats on the release!
Secondly, I found this amusing:
[Finished] [1.0] Survival Tools New « 1 2 3 » in Unfinished
Quote from: XeoNovaDan on November 16, 2018, 01:40:01 PM
This mod's now officially been released! Thanks to those who have playtested and provided valuable feedback.
Ludeon: https://ludeon.com/forums/index.php?topic=29503.msg445544#msg445544
Steam: https://steamcommunity.com/sharedfiles/filedetails/?id=1566269698
@中村ジロ - Sorry for the late response, but yeah, totally a possibility! Not for the first release version though, unfortunately. Tools can also be used as weapons, though less effective than clubs.
At last! This is so cool. I can't wait to see what's in store for the future of this mod.