[B18] Plant Cutting is for Growers! (22nd Jan 2018)

Started by XeoNovaDan, January 01, 2017, 08:02:41 PM

Previous topic - Next topic

XeoNovaDan



Compatibility
This mod will mess up work priorities on existing savegames as it does still make a change in the work tab, regardless of how small it is. Advised to screenshot your colony work priorities before applying this mod. It won't break existing saves though.

This mod will work fine with Fluffy's Work Tab.

This mod shouldn't conflict with any other mod ever, as it uses XML patching.

Download
GitHub
Steam

Like this mod? Check out my other mods here!


Overview
This mod is no more than a couple of XML patches that makes it so that 'Growing' shows as the relevant skill for the job 'Plant Cutting' in the work tab.

What does this mean? No more designating your every-withdrawal-under-the-sun, bad back, frail, level 0 growers who will take 10 years to cut down a Poplar tree, unless you really want them to die of Malnutrition when they're 50% done. It also generally makes the Work tab feel more complete as Growing does technically bear relevance to plant cutting in terms of speed, and success chance in the case of harvesting things like berries, or designated crops.

License
As is standard with my mods: you may include this mod in a mod pack, and you may derive from this, but please inform me if you're doing so either through here or Ludeon Forums, and give credit where credit's due.

NixxNikoli

Looks cool. Does this also mean cutting down trees etc will give Growing XP?

XeoNovaDan

Plant cutting already gives experience. This mod literally makes one small change to the Work Tab

joaonunes

will this also prevent the stupid occurrence where some pawns are able to grow but can't cut because of traits/backstory? You know, similar to the mod "Haul It"?
Do you want your colonists to look manlier?
Get a free mustache sample here!

XeoNovaDan

Alas, no. Maybe I should think of a better title, as this actually is quite misleading come to think of it :/

Thanks for pointing it out

Love

Quote from: joaonunes on January 01, 2017, 08:38:26 PM
will this also prevent the stupid occurrence where some pawns are able to grow but can't cut because of traits/backstory? You know, similar to the mod "Haul It"?
Yeah that would be a really useful fix.

joaonunes

#6
Quote from: Love on January 01, 2017, 09:17:43 PM
Quote from: joaonunes on January 01, 2017, 08:38:26 PM
will this also prevent the stupid occurrence where some pawns are able to grow but can't cut because of traits/backstory? You know, similar to the mod "Haul It"?
Yeah that would be a really useful fix.

It shouldn't be hard to make a mod for that effect though... just a quick look at the "Haul It"'s code and just recreate it for the plant cutting.

I can do it myself in 8 hours, I just arrived to school so I'll have no time for a while :P

EDIT:
Actually I just looked at the code and what you need to do is to remove everything inside the <workTags> tag and plant cutting will no longer be stopped by traits or anything similar


<WorkTypeDefs>

  <WorkTypeDef>
    <defName>PlantCutting</defName>
    <labelShort>Plant cut</labelShort>
    <pawnLabel>Plant cutter</pawnLabel>
    <gerundLabel>Plant cutting</gerundLabel>
    <description>Cut or harvest plants as designated.</description>
    <verb>Cut</verb>
    <naturalPriority>500</naturalPriority>
    <requireCapableColonist>true</requireCapableColonist>
    <relevantSkills>
  <li>Growing</li>
    </relevantSkills>
    <workTags>
  <!--<li>ManualDumb</li>
      <li>PlantWork</li>-->
    </workTags>
  </WorkTypeDef>

</WorkTypeDefs>
Do you want your colonists to look manlier?
Get a free mustache sample here!

XeoNovaDan

I may or may not do that, but it'll be a module if I do. Not all people might want it so that those incapable dumb labour will still plant cut.

joaonunes

Quote from: XeoNovaDan on January 02, 2017, 06:05:51 AM
I may or may not do that, but it'll be a module if I do. Not all people might want it so that those incapable dumb labour will still plant cut.

Yeah, add two versions, one without the dumb labor fix and one with it. A module system would overwrite the original mod anyways, might as well make it a separate mod/version.
Do you want your colonists to look manlier?
Get a free mustache sample here!

Tanelorn

I love this mod but I have a major issue with it as well. It seems that it shuffled some of the priorities in the work tab, and now I have characters who can't perform a type of work still trying to. I've got people with "will not cook" cooking, but the work tab is blank so I can't click on it to turn it off.

Can you point me to where in my save file I might find a way to correct this? I'm sure it's in the internal work tab assignments I just don't know where specifically to look.

XeoNovaDan

That's most likely because it alters the work tab. Sorry if it's jeopardised your work priorities, there's not a lot I can do about that :(

I still need to make that a disclaimer, thanks for reminding. As for correction, it can only be done manually AFAIK. If you have a previous save (depending on permadeath or not), perhaps screenshot it and copy the priorities from there.

Der Failer

This always bothered me, but i never really look in to it. So thanks for this fix. :)


Quote from: Tanelorn on January 23, 2017, 06:25:44 AM
Can you point me to where in my save file I might find a way to correct this? I'm sure it's in the internal work tab assignments I just don't know where specifically to look.

Remember to backup your saves before editing them!

Open your save file with Editor (or an other Program with similar functionality). Using the search function find the colonist by his/her name. It should look like this:
<thing Class="Pawn">
<def>Human</def>
<id>Human469</id>
<map>0</map>
<pos>(132, 0, 123)</pos>
<rot>2</rot>
<faction>Faction_9</faction>
<kindDef>Colonist</kindDef>
<gender>Female</gender>
<name Class="NameTriple">
<first>Christoph</first>
<nick>Ricky</nick>
<last>Torrence</last>
</name>

If it doesn't your probeply some were in the "taleManager" part of the save so keep going (for older save it might be beneficial to start the search form the end of the file).
From here scroll a bit down to find the <workSettings> looking like this:
<workSettings>
<priorities>
<vals>
<li>1</li>
<li>1</li>
<li>0</li>
<li>1</li>
<li>1</li>
<li>0</li>
<li>0</li>
<li>0</li>
<li>0</li>
<li>0</li>
<li>1</li>
<li>0</li>
<li>0</li>
<li>1</li>
<li>1</li>
<li>1</li>
<li>1</li>
<li>3</li>
<li>3</li>
<li>3</li>
</vals>
</priorities>
</workSettings>

The order should be the same as ingame, if you don't feel like counting just set all to 0 and reactivate as needed ingame.

henk

I'm still on A17, there's just too many mods still not updated to 18. How can I rollback this mod back to A17?

XeoNovaDan

Quote from: henk on November 18, 2017, 01:04:42 PM
I'm still on A17, there's just too many mods still not updated to 18. How can I rollback this mod back to A17?

Attaching an old version to this post from Dropbox. I've dropped support for A17 altogether at this point, since I've been with B18 for a fair while.

The old versions of all of my mods will be removed from Dropbox in 7 days, since I've migrated my supported projects to GitHub.

[attachment deleted by admin: too old]

henk

Thanks. You could just create 2 versions of mod on steam workshop, like other modders do.