westamastaflash Posted October 11, 2015 Share Posted October 11, 2015 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 More sharing options...
hab136 Posted October 11, 2015 Share Posted October 11, 2015 You've defined both "Efficiency" and "EfficiencyBonus".. have you tried just defining "EfficiencyBonus"? Link to comment Share on other sites More sharing options...
westamastaflash Posted October 11, 2015 Author Share Posted October 11, 2015 (edited) 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 October 21, 2015 by westamastaflash Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now