Jump to content

Does the "Specialist" actually improve efficiency of ModuleResourceConverter


Recommended Posts

I cannot get the stock ModuleResourceConverter module to improve efficiency with a specialist. After turning on debug, "CrewBon" is empty and remains so, even though I defined a crew bonus. I put bill into the unit and he is 3 stars, but the efficiency remains at 100%.

How do I get this to actually work so that an engineer makes this converter work better?


MODULE
{
name = ModuleResourceConverter
ConverterName = Soylent Oxidation Unit
StartActionName = Start Burning Waste
StopActionName = Stop Burning Waste
AutoShutdown = true
GeneratesHeat = true
Efficiency = 1
EfficiencyBonus = 1
UseSpecialistBonus = true
SpecialistEfficiencyFactor = 0.2
SpecialistBonusBase = 0.05
Specialty = Engineer
SpecialistHeatFactor = 0

INPUT_RESOURCE
{
ResourceName = ElectricCharge
Ratio = 12
}
INPUT_RESOURCE
{
ResourceName = WasteWater
Ratio = 0.00011398148148
}
INPUT_RESOURCE
{
ResourceName = Waste
Ratio = 0.000012314814816
}
OUTPUT_RESOURCE
{
ResourceName = SterileOrganicSlurry
Ratio = 0.00012629629632
DumpExcess = false
}
}

Link to comment
Share on other sites

You've defined both "Efficiency" and "EfficiencyBonus".. have you tried just defining "EfficiencyBonus"?

Those values appear to be related to the efficiency of the part itself, at least when I look at the IL/C# decompile in MonoDevelop.

The GetCrewBonus code in the BaseConverter class:


protected float GetCrewBonus ()
{
// removed some IL code that always returns true
// ...
//
float result = 1;
if (this.UseSpecialistBonus) {
result = this.SpecialistBonusBase + (1 + (float)this.HasSpecialist (this.Specialty)) * this.SpecialistEfficiencyFactor;
}
this.debugCrewBon = result.ToString ();
return result;
}

So in my example, result should be = 0.05 + (1 + result of has HasSpecialist) * 0.2.

But it appears that in the OnFixedUpdate of the BaseConverter class, the specialist is never taken into account.

Snippet...


conversionRecipe.FillAmount = this.FillAmount;
conversionRecipe.TakeAmount = this.TakeAmount;
double deltaHeatThrottle = this.GetDeltaHeatThrottle (deltaTime);
[B]double num = (double)this.EfficiencyBonus * deltaHeatThrottle;[/B]
this.debugFinBon = num.ToString ();
ConverterResults result = this.ResConverter.ProcessRecipe (deltaTime, conversionRecipe, base.part, (float)num);
this.PostProcess (result, deltaTime);

On top of this, I'm not seeing anywhere that the actual module "Efficiency" is taken into account.

Testing seems to confirm this - I created the module with Efficiency = "0.5", but when I start up the generator, it comes on at 100% efficiency.

It looks like the only two numbers it takes into account is the EfficiencyBonus, and the throttling based on Heat.

And it doesn't look like GetCrewBonus() is actually ever being called, hence why the debug string never shows a crew bonus in the right click menu.

So the only way to actually modify the efficiency of the converter with a specialist is to do something like MKS and use a DLL to hook into the moduleresourceconverter, modifing the EfficiencyBonus on the fly....

EDIT: I've filed a bug #5532.

Edited by westamastaflash
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...