[Question] Is it possible to know how much RF/t a machine requires?
MuteTiefling opened this issue ยท 9 comments
Simply put, I'm having trouble setting up Modifiers on my machines. Despite what I think are exact calculations, the machine keeps telling me there's not enough power.
What I'm trying to do is match the RF/t very closely to the output of certain generators in my pack. These generators are part of the structure itself, so the RF/t is meant to go up to match whichever is installed.
I'm not getting anywhere near close to exact, however. My very first modifier should bump the power usage from the base 40 to 82 (operation 0, muliplier 42). The generator is outputting 108 rf/t, yet the machine is displaying that it's not got enough power.
I need to know what it thinks it needs, however, to really adjust it, because clearly the math isn't what I think it should be.
Would be better handled on discord than here, where there are far more eyes to view. Would need a pastebin of your machine and recipes, though, and example screenshots.
Alright. Since it appears that there's no way to get the information I need from Modular Machinery, I've set up a test with Thermal so I can at least see how much RF is flowing. I've got a creative power source running through a cyro-flux duct into the power input for my 'machine'. This should mean the only bottleneck is the modular machine's ability to draw power. I can then monitor the flow over the last 5 seconds with the multimeter.
Here are my JSON configs:
https://gist.github.com/MuteTiefling/6bcd8e6b97da46eccaaf4dc5976b3017
https://gist.github.com/MuteTiefling/be714c4a073ef02945ce6f5da930aea2
Base power use is 40rf/t
Power modifier from the machine structure is +85
Duration modifier from the machine structure is *0.7
Now, I would expect the power draw to go up to 125 rf/t (85+40). This assumption would be wrong, however.
Instead, it goes up to 179 rf/t.
So, how does this math work?
Defines the type of operation that should be applied. Possible operations: 0 = Addition, 1 = Multiplication. All "addition" modifiers will get added up before being applied to the actual value; All "multiplication" modifiers will be multiplied with each other before being applied to the actual value.
Based on the wiki it would seem that 'like' operations are being combined before being applied to the base. Fair, but I've got a multiplication and an addition modifier at play here so one would think they shouldn't interact based on the wording from the wiki. They're also meant to be applying to very different targets... so one would logically assume they shouldn't mingle. But, indeed, if I remove the duration modifier completely, the issue goes away and I get exactly my expected power draw.
So they are mixing in some way. But how is very much not clear. If we do the math...
40 + (85*0.7) = 99.5
Which is still nowhere near my current power draw.
Even if I assume something really off, like the modified value being applied twice, I still only get 159 rf/t. I cannot, figure out how 179 rf/t is being calculated, let alone why.
(40+85)/0.7 = 161.42857142857
I'm getting 179.
OK, nvm. Calculator ignored order of operations.
Still, this sort of interplay really makes it hard to do anything with multiple modifiers. I still don't understand why there's interplay at all.
Because you're controlling the entire recipe via the modifiers, not individual aspects that are unrelated.
If you want a variant of a recipe that takes the same amount of power-over-time, that would need to be a recipe variation instead. Either as a new machine differentiated by inclusion of that block and copying the recipes down, or as a new variation of the recipe with a higher priority.
That's really messy though, from a user's perspective, as that leads to many entries in JEI that are only slightly different. I'm trying to keep JEI as neat as possible to keep things as clear as possible.
I wasn't even really looking for a recipe with the same power-over-time here, either. I wanted to scale duration down at a different rate than power use. To match the scaling power of the dynamo in these recipes, I need to multiply power use by approximately 1.63 with each upgrade. I also want to scale the processing time so it's getting relatively faster with each upgrade.
So, based on the formula you provided (really ought to called out in the quoted wiki section, by the way), I've given the machine a duration multiplier of ~0.61 for each upgrade. This means the power use scales exactly the way I need it to, but the time scales in a way that's rather backwards.
Upgrades | Max RF/t | RF/t target | Multiplier | Time | Seconds |
---|---|---|---|---|---|
1 | 66 | 66 | 400 | 20 | |
2 | 108 | 108 | 0.611111111 | 244.4444 | 12.22222 |
3 | 179 | 179 | 0.368715084 | 147.486 | 7.374302 |
4 | 296 | 296 | 0.222972973 | 89.18919 | 4.459459 |
5 | 489 | 489 | 0.134969325 | 53.98773 | 2.699387 |
6 | 807 | 807 | 0.081784387 | 32.71375 | 1.635688 |
7 | 1331 | 1331 | 0.049586777 | 19.83471 | 0.991736 |
8 | 2197 | 2197 | 0.030040965 | 12.01639 | 0.600819 |
9 | 3625 | 3625 | 0.018206897 | 7.282759 | 0.364138 |
10 | 5982 | 5982 | 0.011033099 | 4.41324 | 0.220662 |
You can see in the table above how this ends up working out. I go from a base processing time of 400 ticks, and cuts 156 ticks off just by adding one more upgrade. But those first few upgrades are really easy to provide in this case. It's upgrades 7-10 that require massive effort (cooling the dynamo becomes very costly at those speeds), so I'd rather make the biggest speed gains there. Right now, the player would have to put in absolutely monumental effort for 8 ticks of processing reduction. If it were possible to control power and duration independently, this would become a lot more straightforward to manage.
Yes. Welcome to using a generalized and modular system in a way it wasn't scoped for.
You can hide items in JEI.
Scale time first so it matches, then adjust cost further from there using additional modifiers.
Well, I personally feel it would be much more modular with some minor tweaks to those calculations, but that's on you guys.
In the meantime, knowing what the energy calculations are have allowed me to create some formulas of my own to get the scaling I want without needing multiple recipes. So the final outcome is cleaner for the player.
I would appreciate if those calculations would be added to the cited wiki entry as that's where it would be most pertinent to know it. Had I known three days ago how the calculations were done and the way they interplay, you would have saved yourself some annoying questions and I would have had this task done that much sooner.
Adding some in game feedback would also go along rather well with the whole modifier system. The machine ought to tell you how much RF/t it expects, rather than a generic 'not enough energy' message since that information is otherwise not available to the player.