Is there a simple way of creating new fermenting barrels?(SOLVED)

Started by Project 06, October 14, 2016, 02:26:02 AM

Previous topic - Next topic

Project 06

I've been trying to create a new object based off of the Fermenting Barrel, but i've been having problem after problem trying to create "jobdriver" classes or at least trying to get them to work. Im not even sure if i have to create new ones. Im at a dead end and im just curious if im doing way more work than i need to for this.


Project 06

Well in my attempts to make this new fermenting barrel, i managed to get no errors on startup, but upon loading the new fermenting barrel(Fermenting Vat) i get this new error, ill attach a screenshot of it below. The yellow error does appear in the main menu but i've been ignoring it since it seems to not be critical.

[attachment deleted by admin - too old]

Project 06

Another snippet i forgot to include in the error mentioned above, it seems that the jobDriver its still trying to use is the old one. I think this has something to do with the [DebuggerHidden] segment of the original jobDriver class, but there are always errors in this section that i cannot resolve so i remove the section, I tried looking at how the <MakeNewToils> part is written but its locked in ILSpy and cannot be viewed as far as i know.

[attachment deleted by admin - too old]

sulusdacor

hey not sure if it helps, but i basicly tried to use some fermenting barrel like building in my luciferium production (https://ludeon.com/forums/index.php?topic=26276.msg266819#msg266819). wanted to make a distillery of the vanilla barrel. worked fine, has other time and own input/output products. dont have any programming knowledge really and was only copy pasting and replacing stuff to use for my own mod. maybe it helps with your problem.

Project 06

Well you made me realize i made a stupid mistake and forgot to link my JobDriver classes to my jobdefs. However, im getting a new error now and ill attach it below.

[attachment deleted by admin - too old]

Project 06

Quote from: sulusdacor on October 17, 2016, 08:22:10 PM
hey not sure if it helps, but i basicly tried to use some fermenting barrel like building in my luciferium production (https://ludeon.com/forums/index.php?topic=26276.msg266819#msg266819). wanted to make a distillery of the vanilla barrel. worked fine, has other time and own input/output products. dont have any programming knowledge really and was only copy pasting and replacing stuff to use for my own mod. maybe it helps with your problem.

What did you do to prevent/correct the errors in the [DebuggerHidden] section?

skullywag

If you want to see that code use zhentars version of ilspy, it allows you to see that stuff mostly.
https://ludeon.com/forums/index.php?topic=16599.msg265091#msg265091
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

sulusdacor

as skully wrote the ispy version helps alot and this thread helped me for the rest: https://ludeon.com/forums/index.php?topic=25561.0, the last part with:
QuoteThe only thing left to manually change is stuff like:
this.<>f__this.holdFire = !this.<>f__this.holdFire;
to
this.holdFire = !this.holdFire;

Project 06

Yea i use that version of ILSpy but i still get get errors, even after putting an exclamation in areas you say to do so. The issue is with certain parts "not existing in current context", so i guess i need to add a variable for them?

Project 06

Sulusdacor thanks alot for offering your mod as a resource, I was using IlSpy Mono for decompiling but i actually needed to use the original version to get the code i was looking for. However i am not having trouble setting how long it takes for fermentation to complete. No matter how many ticks i set "BaseFermentationDuration" to it always says 10 days in-game.

sulusdacor

the code from my mod is basicly the same like the normal one. i just changed the input/output product, names for things, etc. some minor values like less things to put in and come out and time. but other then these its really the same.

for the fermenting time i cheated a bit,since i just added the * 2f for the two times faster at the end. during my testing i had this at a really high value so the process was done in some seconds and i could test if all stuff works accordingly (taking out the product and such).

private float ProgressPerTickAtCurrentTemp
{
get
{
return 1.66666666E-06f * this.CurrentTempProgressSpeedFactor * 2f;
}
}


the 5 days resulting from this seemed okay for luciferium stuff. you should be able to get any time you want with that, by using other values.

for the erros, your game generates an output log. you might want to post that if you are looking for help with an error. or if the warning pop's up in game you have an extended description on your error. it usally pointed me in the direction to look for what i missed.

Project 06

Alright Sulusdacor thanks a ton for that! I assumed changing BaseFermentationDuration would work so when it didn't I was just stuck.