-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prototype Throttle #1636
base: master
Are you sure you want to change the base?
Prototype Throttle #1636
Conversation
the throttle is a complex behavior giving it a default way of doing things for single block machine can be a good idea but not for multiblock as each of them as custom behavior that may interfere with the default throttle. A default behavior for something this complex might just ending up making things harder to get them clean when implementing it. |
by doing things this way I don't think the calculateXXMultiplier was need. One the new questions to debate is how to integrate the throttle policy if you do it this way all multiblock using the FueledMultiblockController will have a throttle even if it makes no sense for the machine. I think that throttle should be added individually on each multiblock. to avoid code duplication a method can exist to add the throttle text to the TextList allowing for easier disabling of the throttle in case you extend a throttlable multiblock. |
"if you do it this way all multiblock using the FueledMultiblockController will have a throttle even if it makes no sense" These are not intended to be the final implementations. They are quick and dirty implementations so we can tease out what the problems are with adding a throttle to each generator. This should better inform how the real implementation should be done. |
okay still I'm pointing out problems I see to avoid them later |
Yes, I was also trying to see how to implement a generic throttle if those methods don't exist as requested by @Archengius. |
I have done this in a first tick handler for the cover. This at least means you no longer have to break and replace the cover on reload. But this is not a real fix because the FuelRecipeLogic (a MTETrait) will tick before the covers. |
My conclusion is that a cover is not that good of a fit for a throttle. The pluses for a cover are:
The issues with doing it this way are:
If the single block generators are to have a throttle, I would suggest doing it inside the block. |
in fact single block generator stop using fuel when they are not producing therefore I don't see any reason why you would be using a throttle with single block generator |
The reason would be to reduce fuel consumption when you don't need the generator running at full power. |
if the generator doesn't need to run full power it will full his internal buffer then stop reproducing a throttle behavior without a throttle. |
The idea is to let people that want to, play a game where they can monitor their batteries and turn the generators up or down to balance their energy output, gaining better fuel consumption as the reward. |
better fuel consumption ? were ? inside the throttle efficiency ? so far it's always below or equal to 100% |
100% is just the prototype value. I see it as feature for those players that like to micro-manage and optimise. It gives them one more knob to turn. :-) |
this might just ending up in people making more machines reducing their throttle to have better efficiency and keep them running knowing they will stop when not needed |
If they want to invest the materials then fair enough. |
use battery buffer they will easily accept the two generator at half power and return a constant 1A without any loss if you do things in a smart way |
You should test this, I think you may be surprised :) Its a separate issue I’ve been looking into for some time. |
I see what you mean. The cable burning only checks the current energy transfer request's amperage. |
Exactly. We don't want to develop one of those RPGs where you have 4 dialogue options but they all have the same outcome. |
what I am fearing with this is people using more and more machine leading to more and more tilentities leading to lag I don't think it is a good things to do to give bonus to use more machines to do the same things. |
What:
Hopefully this prototype will make the discussions on #1632 and #1604 more concrete?
It at least gives something to test with to understand the consequences of the throttle in different generators.
It uses a cover for single blocks.
For multiblocks it just adds some generic code to FueledMultiblockController
There is one major bug which is due the way I am injecting the throttle into a single block generator.
On a reload of the generator/cover there is no natural hook to reinject the throttle into the generator.
So reloading the world means you have to disconnect and reconnect the cover for it to work.
The other major limitiation of this prototype is that the throttle is "trivial".
So it has pretty much no affect on the overall fuel consumption. e.g. 50% throttle means both the recipe and duration are halved.
It does change the minimum fuel required for a recipe to run and the power output in line with the throttle.
Finally I have made no attempt to reintegrate the LargeTurbine into FuelRecipeLogic with the canProduceEnergy(), etc.
So I think the throttle will have no effect since the LargeTurbine overrides the voltage calculation and that is the only thing really changed in this prototype.
Some things I found while trying to implement this:
And now you can rip on my implementation. :-) The main reason I wrote it (besides giving something to experiment with) is so we can pin down where the multipliers need to fit into the api.