aritchie05 / EcoCraftingTool

Crafting calculator for Eco.
https://eco-calc.com
MIT License
23 stars 12 forks source link

Combustion Engine resulting to zero value #121

Closed lifezoned4 closed 5 months ago

lifezoned4 commented 5 months ago

I can not find the configuration bug with producing combustion engines? Any clue with this? Is this really a bug?

image

{"expensiveEndgameCost":false,"whiteTigerRecipes":false,"resourceCostMultiplier":1,"laborCost":1,"profitPercent":25,"skills":[{"id":"LoggingSkill","lvl":7,"lav":false},{"id":"CarpentrySkill","lvl":5,"lav":false},{"id":"ShipwrightSkill","lvl":5,"lav":false},{"id":"SelfImprovementSkill","lvl":4,"lav":false},{"id":"MechanicsSkill","lvl":4,"lav":false}],"tables":[{"id":"CarpentryTableObject","up":"BasicUpgrade3"},{"id":"KilnObject","up":"NoUpgradeAdvanced"},{"id":"ResearchTableObject","up":"NoUpgradeNone"},{"id":"SawmillObject","up":"AdvancedUpgrade1"},{"id":"WorkbenchObject","up":"NoUpgradeNone"},{"id":"LaboratoryObject","up":"NoUpgradeModern"},{"id":"MediumShipyardObject","up":"NoUpgradeAdvanced"},{"id":"SmallShipyardObject","up":"BasicUpgrade3"},{"id":"ElectricMachinistTableObject","up":"NoUpgradeModern"},{"id":"MachinistTableObject","up":"NoUpgradeAdvanced"},{"id":"LatheObject","up":"AdvancedUpgrade1"},{"id":"ScrewPressObject","up":"AdvancedUpgrade1"},{"id":"AssemblyLineObject","up":"AdvancedUpgrade1"}],"ingredients":[{"id":"BasicCircuitItem","pr":0},{"id":"BrickItem","pr":0},{"id":"CanvasItem","pr":10},{"id":"CelluloseFiberItem","pr":0},{"id":"CementItem","pr":0},{"id":"CopperBarItem","pr":3},{"id":"CopperPipeItem","pr":3},{"id":"CopperPlateItem","pr":0},{"id":"CopperWiringItem","pr":0},{"id":"CottonFabricItem","pr":1.7},{"id":"DirtItem","pr":0.5},{"id":"Fabric","pr":0},{"id":"FiberglassItem","pr":0},{"id":"FlaxseedOilItem","pr":1.3},{"id":"GearboxItem","pr":0},{"id":"GlassItem","pr":2.2},{"id":"GlassLensItem","pr":0},{"id":"GoldBarItem","pr":0},{"id":"HeatSinkItem","pr":0},{"id":"HempMooringRopeItem","pr":3},{"id":"IronAnchorItem","pr":0},{"id":"IronBarItem","pr":2},{"id":"IronGearItem","pr":0},{"id":"IronOreItem","pr":0.35},{"id":"IronPipeItem","pr":3},{"id":"IronWheelItem","pr":0},{"id":"LeatherHideItem","pr":0},{"id":"LightBulbItem","pr":0},{"id":"LinenFabricItem","pr":1.3},{"id":"LinenYarnItem","pr":0.35},{"id":"NailItem","pr":0.15},{"id":"NylonMooringRopeItem","pr":0},{"id":"PaperItem","pr":0},{"id":"PlantFibersItem","pr":0.1},{"id":"PlasticItem","pr":0},{"id":"PortableSteamEngineItem","pr":0},{"id":"ReinforcedConcreteItem","pr":0},{"id":"RivetItem","pr":0.5},{"id":"SteelAxleItem","pr":0},{"id":"SteelBarItem","pr":6},{"id":"SteelGearboxItem","pr":0},{"id":"SteelPipeItem","pr":0},{"id":"SteelPlateItem","pr":0},{"id":"Wood","pr":0.22},{"id":"WoodenWheelItem","pr":0.5}],"outputs":[{"id":"AssemblyLine","bp":"0.00","pr":"0.00"},{"id":"Board","bp":"0.14","pr":"0.18"},{"id":"Boiler","bp":"32.24","pr":"40.30"},{"id":"Bookshelf","bp":"19.22","pr":"24.02"},{"id":"ButcheryTable","bp":"3.40","pr":"4.25"},{"id":"CameraFilm","bp":"0.00","pr":"0.00"},{"id":"Charcoal","bp":"0.78","pr":"0.97"},{"id":"CopperWiring","bp":"6.02","pr":"7.52"},{"id":"CourtChair","bp":"8.71","pr":"10.88"},{"id":"DecorativeHangingBuoy","bp":"0.07","pr":"0.09"},{"id":"DecorativeLifePreserver","bp":"0.07","pr":"0.09"},{"id":"DecorativeShipWheel","bp":"5.06","pr":"6.32"},{"id":"DendrologyResearchPaperAdvanced","bp":"5.50","pr":"6.88"},{"id":"DendrologyResearchPaperBasic","bp":"4.42","pr":"5.52"},{"id":"DendrologyResearchPaperModern","bp":"41.31","pr":"51.64"},{"id":"DistributionStation","bp":"2.50","pr":"3.13"},{"id":"Easel","bp":"43.29","pr":"54.11"},{"id":"ElectricWaterPump","bp":"52.08","pr":"65.10"},{"id":"ElevatorCallPost","bp":"10.63","pr":"13.29"},{"id":"EngineeringResearchPaperModern","bp":"0.00","pr":"0.00"},{"id":"FarmersTable","bp":"13.35","pr":"16.69"},{"id":"FiberScutchingStation","bp":"3.40","pr":"4.25"},{"id":"GoldWiring","bp":"0.04","pr":"0.05"},{"id":"HewnBench","bp":"3.45","pr":"4.31"},{"id":"HewnChair","bp":"3.68","pr":"4.60"},{"id":"HewnDoor","bp":"0.57","pr":"0.72"},{"id":"HewnDresser","bp":"3.45","pr":"4.31"},{"id":"HewnLogs","bp":"0.27","pr":"0.34"},{"id":"HewnNightstand","bp":"2.96","pr":"3.70"},{"id":"HewnTable","bp":"2.96","pr":"3.70"},{"id":"HugeBannerSign","bp":"16.09","pr":"20.12"},{"id":"HugeWoodenBannerSign","bp":"17.43","pr":"21.78"},{"id":"Icebox","bp":"2.64","pr":"3.30"},{"id":"IndustrialBarge","bp":"101.04","pr":"126.31"},{"id":"IronHullSheet","bp":"5.53","pr":"6.91"},{"id":"Kitchen","bp":"32.92","pr":"41.15"},{"id":"Laboratory","bp":"84.00","pr":"105.00"},{"id":"LargeCanoe","bp":"6.62","pr":"8.28"},{"id":"LargeHangingLumberSign","bp":"11.12","pr":"13.90"},{"id":"LargeHangingWoodSign","bp":"2.41","pr":"3.02"},{"id":"LargeLumberDoor","bp":"31.40","pr":"39.25"},{"id":"LargeLumberStockpile","bp":"27.12","pr":"33.90"},{"id":"LargeMetalShipFrame","bp":"0.00","pr":"0.00"},{"id":"LargeStandingLumberSign","bp":"11.12","pr":"13.90"},{"id":"LargeStandingWoodSign","bp":"2.41","pr":"3.02"},{"id":"LargeWindowedLumberDoor","bp":"34.33","pr":"42.91"},{"id":"LargeWoodenShipFrame","bp":"7.72","pr":"9.65"},{"id":"Lathe","bp":"22.17","pr":"27.71"},{"id":"Loom","bp":"6.18","pr":"7.73"},{"id":"Lumber","bp":"1.36","pr":"1.71"},{"id":"LumberBench","bp":"10.74","pr":"13.43"},{"id":"LumberChair","bp":"8.49","pr":"10.61"},{"id":"LumberDoor","bp":"3.31","pr":"4.13"},{"id":"LumberDresser","bp":"9.53","pr":"11.92"},{"id":"LumberStockpile","bp":"20.01","pr":"25.01"},{"id":"LumberTable","bp":"23.23","pr":"29.04"},{"id":"MachinistTable","bp":"37.98","pr":"47.48"},{"id":"MediumFishingTrawler","bp":"75.36","pr":"94.20"},{"id":"MediumMetalShipFrame","bp":"0.00","pr":"0.00"},{"id":"MediumShipyard","bp":"27.44","pr":"34.30"},{"id":"MediumWoodenShipFrame","bp":"3.76","pr":"4.71"},{"id":"MetalRudder","bp":"0.00","pr":"0.00"},{"id":"OrnateWoodenFrameWide","bp":"1.73","pr":"2.17"},{"id":"OutpostNetting","bp":"12.21","pr":"15.26"},{"id":"ParticleBoards","bp":"0.16","pr":"0.20"},{"id":"PortableSteamEngine","bp":"0.00","pr":"0.00"},{"id":"PrintingPress","bp":"0.00","pr":"0.00"},{"id":"RealEstateDesk","bp":"12.65","pr":"15.81"},{"id":"RecycleHewnLog","bp":"0.03","pr":"0.04"},{"id":"Registrar","bp":"7.69","pr":"9.62"},{"id":"SawBoards","bp":"0.14","pr":"0.17"},{"id":"ScreeningMachine","bp":"0.00","pr":"0.00"},{"id":"ScrewPress","bp":"50.20","pr":"62.74"},{"id":"Servo","bp":"0.04","pr":"0.05"},{"id":"Shaper","bp":"174.24","pr":"217.80"},{"id":"ShelfCabinet","bp":"19.18","pr":"23.98"},{"id":"SmallCanoe","bp":"4.83","pr":"6.04"},{"id":"SmallHangingLumberSign","bp":"5.68","pr":"7.10"},{"id":"SmallHangingWoodSign","bp":"1.49","pr":"1.86"},{"id":"SmallPaperMachine","bp":"0.00","pr":"0.00"},{"id":"SmallShipyard","bp":"2.46","pr":"3.07"},{"id":"SmallStandingLumberSign","bp":"5.68","pr":"7.10"},{"id":"SmallStandingWoodSign","bp":"1.49","pr":"1.86"},{"id":"SmallWoodCart","bp":"4.77","pr":"5.96"},{"id":"SmallWoodenBoat","bp":"0.00","pr":"0.00"},{"id":"SmallWoodenShipFrame","bp":"2.43","pr":"3.03"},{"id":"StampMill","bp":"0.00","pr":"0.00"},{"id":"SteamEngine","bp":"84.29","pr":"105.37"},{"id":"SteelBuoy","bp":"24.16","pr":"30.20"},{"id":"SteelMooragePost","bp":"76.14","pr":"95.18"},{"id":"StorageSilo","bp":"55.53","pr":"69.41"},{"id":"Stove","bp":"6.58","pr":"8.23"},{"id":"TailoringTable","bp":"4.84","pr":"6.05"},{"id":"TowelRack","bp":"44.93","pr":"56.16"},{"id":"TransmissionPole","bp":"29.96","pr":"37.45"},{"id":"TripodCamera","bp":"34.33","pr":"42.91"},{"id":"Valve","bp":"0.04","pr":"0.05"},{"id":"WainwrightTable","bp":"3.35","pr":"4.18"},{"id":"Wheelbarrow","bp":"1.63","pr":"2.04"},{"id":"WoodenBarge","bp":"0.00","pr":"0.00"},{"id":"WoodenCeilingLight","bp":"7.93","pr":"9.91"},{"id":"WoodenFabricBed","bp":"13.74","pr":"17.18"},{"id":"WoodenFloorLamp","bp":"11.12","pr":"13.90"},{"id":"WoodenFrameWide","bp":"0.42","pr":"0.53"},{"id":"WoodenHullPlanks","bp":"0.69","pr":"0.86"},{"id":"WoodenKeel","bp":"1.09","pr":"1.36"},{"id":"WoodenKitchenLamp","bp":"11.24","pr":"14.05"},{"id":"WoodenLatrine","bp":"2.47","pr":"3.09"},{"id":"WoodenMold","bp":"0.22","pr":"0.28"},{"id":"WoodenMooragePost","bp":"9.55","pr":"11.94"},{"id":"WoodenOar","bp":"0.68","pr":"0.85"},{"id":"WoodenRudder","bp":"0.00","pr":"0.00"},{"id":"WoodenStrawBed","bp":"6.10","pr":"7.62"},{"id":"WoodenTableLamp","bp":"12.84","pr":"16.06"},{"id":"WoodenTransportShip","bp":"44.35","pr":"55.43"},{"id":"IronAxle","bp":"3.65","pr":"4.56"},{"id":"Screws","bp":"0.45","pr":"0.57"},{"id":"IronPlate","bp":"1.84","pr":"2.30"},{"id":"Piston","bp":"9.04","pr":"11.30"},{"id":"BlastFurnace","bp":"46.76","pr":"58.44"},{"id":"CementKiln","bp":"0.00","pr":"0.00"},{"id":"CombustionEngine","bp":"0.00","pr":"0.00"},{"id":"CombustionGenerator","bp":"54.53","pr":"68.16"},{"id":"Crane","bp":"0.00","pr":"0.00"},{"id":"OilRefinery","bp":"0.00","pr":"0.00"},{"id":"PumpJack","bp":"0.00","pr":"0.00"},{"id":"RollingMill","bp":"0.00","pr":"0.00"},{"id":"Sink","bp":"56.51","pr":"70.64"},{"id":"SteamTractor","bp":"96.07","pr":"120.09"},{"id":"SteamTractorHarvester","bp":"46.44","pr":"58.05"},{"id":"SteamTractorPlow","bp":"20.67","pr":"25.84"},{"id":"SteamTractorSower","bp":"42.27","pr":"52.84"},{"id":"SteamTruck","bp":"96.07","pr":"120.09"},{"id":"WasteFilter","bp":"0.00","pr":"0.00"},{"id":"WoodenElevator","bp":"0.00","pr":"0.00"}]}

lifezoned4 commented 5 months ago

Steps to reproduce:

  1. Add Mechanics
  2. Set Iron bar 10
  3. Remove shaper
  4. Calculate Prices => Combustion Engine 0
  5. Add Shaper => Calculate Prices => Combustion Eninge is 480 again

Note Gearbox etc. not appear in ingredients.

Hope that helps.

aritchie05 commented 5 months ago

I'm surprised it's been this long and this is the first time someone has reported this. Removing a table was removing corresponding outputs but not putting the ingredients that are still needed into the ingredients section (e.g. gearbox).

lifezoned4 commented 5 months ago

I'm surprised it's been this long and this is the first time someone has reported this. Removing a table was removing corresponding outputs but not putting the ingredients that are still needed into the ingredients section (e.g. gearbox).

Thx for this fast response https://github.com/aritchie05/EcoCraftingTool/commit/debcd6dca05cff3b357038d3b7bd5d413222775b LGTM. Although the code structure is little hard to read IMHO. Tried to fix the bug yesterday for a hour and could not understand how the interface for dealing with the the model worked. Overall code an project awesomely good. Thx all contributors for having this.

lifezoned4 commented 5 months ago

btw. thx to https://github.com/kingmalphas and https://github.com/vdbongard to dig into the code yesterday. Silent Heros need some mentioning.