Ludeon Forums

Ludeon Forums

  • September 18, 2019, 02:57:53 AM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: [B19] HarvestYieldPatch - now it does what you always thought it does  (Read 3100 times)

Syrchalis

  • Colonist
  • ***
  • Posts: 427
  • Refugee
    • View Profile

Introducing the Harvest Yield Patch.



You think you know what the stat "Plant Harvest Yield" does? Well, let me surprise you - it does NOT increase the amount you get when you harvest plants, like "Mining Yield" does for ores.

It merely gives you a chance to fail below 100%, above 100% you do not gain anything.

This changes now! This small C# patch changes the method when harvesting plants so that below 100% nothing changes (you still have a chance to fail, but get 100% of the amount IF you succeed) - but above 100% you get more from the plant. If you have 177% plant harvest yield and the plant usually gives 10 berries, then you now get 17 or 18 (random).

Important: This mod removes the max values from all "yield" stats. This includes: MiningYield, AnimalGatherYield, PlantHarvestYield, ButcheryFleshEfficiency and ButcheryMechanoidEfficiency. Meaning those stats can now be more than 100%. If you don't wish this for any of these stats, go into HarvestYieldPatch/Patches/HarvestYieldXMLPatch.xml and remove the defNames of the stats you don't want edited.

Steam
Github

Thanks to Mehni and spd, potatoclip for help with C#, because I'm a total noob.
« Last Edit: August 28, 2018, 02:26:12 AM by Syrchalis »
Logged
Ever wondered what's inside that box? An arm? A leg? A heart? Wonder no more! Prosthetic icons

Valor

  • Drifter
  • **
  • Posts: 84
  • Refugee
    • View Profile
Re: [1.0] HarvestYieldPatch - now it does what you always thought it does
« Reply #1 on: August 01, 2018, 04:39:37 PM »

Hello, any chance for B18 variant? Or is it compatible with B18?
Logged

Syrchalis

  • Colonist
  • ***
  • Posts: 427
  • Refugee
    • View Profile
Re: [1.0] HarvestYieldPatch - now it does what you always thought it does
« Reply #2 on: August 01, 2018, 04:42:30 PM »

You can try it out. It depends whether the code of the plant was changed from B18 to 1.0. It's very likely it doesn't work, but there is definitely a chance that it does.

However I won't make a B18 version, because 1.0 is rather far by now and I'm not willing to go through the trouble for a soon-to-be-outdated version. The transpiler code in there is pretty complex and I didn't write it myself, so it would be a huge effort.
Logged
Ever wondered what's inside that box? An arm? A leg? A heart? Wonder no more! Prosthetic icons

Zxypher

  • Drifter
  • **
  • Posts: 50
  • Refugee
    • View Profile
Re: [1.0] HarvestYieldPatch - now it does what you always thought it does
« Reply #3 on: August 02, 2018, 05:23:29 PM »

I added this to my B18 and it doesn't seem to have thrown any errors yet. Still have to test functionality though. Thanks for this mod I never tested to see if Harvest Yield actually worked before.

EDIT: Sadly it does not appear to actually change the harvest yield. Guess I'll have to wait till 1.0.

EDIT2: I checked more carefully and actually did find an error in the log for B18 if anyone cares to try to fix/patch it.

Code: [Select]
Could not execute post-long-event action. Exception: System.TypeInitializationException: An exception was thrown by the type initializer for HarvestYieldPatch.HarmonyPatches ---> System.MissingMethodException: Method not found: 'Verse.Log.Message'.
  --- End of inner exception stack trace ---
  at (wrapper managed-to-native) System.Runtime.CompilerServices.RuntimeHelpers:RunClassConstructor (intptr)
  at System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor (RuntimeTypeHandle type) [0x00000] in <filename unknown>:0
  at Verse.StaticConstructorOnStartupUtility.CallAll () [0x00000] in <filename unknown>:0
  at Verse.PlayDataLoader.<DoPlayLoad>m__2 () [0x00000] in <filename unknown>:0
  at Verse.LongEventHandler.ExecuteToExecuteWhenFinished () [0x00000] in <filename unknown>:0
Verse.Log:Error(String)
Verse.LongEventHandler:ExecuteToExecuteWhenFinished()
Verse.LongEventHandler:UpdateCurrentAsynchronousEvent()
Verse.LongEventHandler:LongEventsUpdate(Boolean&)
Verse.Root:Update_Patch1(Object)
Verse.Root_Entry:Update()
« Last Edit: August 02, 2018, 07:43:35 PM by Zxypher »
Logged

Canute

  • Transcendent
  • *****
  • Posts: 7637
  • Refugee
    • View Profile
Re: [1.0] HarvestYieldPatch - now it does what you always thought it does
« Reply #4 on: August 03, 2018, 03:06:46 AM »

Zxypher,
sorry but you will need a neurochiruge to fix/patch the issue.
Basicly you can't use a 1.0 version mod on a B18 gameplay. Yes you have to wait/use for the 1.0 version.
And i don't think anyone will made a similar mod for older releases.
Logged

Zxypher

  • Drifter
  • **
  • Posts: 50
  • Refugee
    • View Profile
Re: [1.0] HarvestYieldPatch - now it does what you always thought it does
« Reply #5 on: August 04, 2018, 01:33:36 PM »

So I loaded up the source and just re-built it with the B18 dll's and it's working fine for me so far. Use at your own risk I guess. If you want me to remove the links let me know.
Logged

Canute

  • Transcendent
  • *****
  • Posts: 7637
  • Refugee
    • View Profile
Re: [1.0] HarvestYieldPatch - now it does what you always thought it does
« Reply #6 on: August 05, 2018, 03:39:24 AM »

Hey, glad to hear you master the neurochiruge err modding ! :-)
Logged

christianmc1101

  • Drifter
  • **
  • Posts: 54
  • Streber
    • View Profile
Re: [1.0] HarvestYieldPatch - now it does what you always thought it does
« Reply #7 on: August 05, 2018, 05:27:19 AM »

Canute: Thats nearly impossible!
Zxypher: Hold my beer.
Logged
Mein Lieblingswort: My favorite word:
Bundespräsidentenstichwahlwiederholungsverschiebung