Closed d0ob closed 2 years ago
I have downloaded and read through the source code of the updated Useful Equipment mod, it appears that Craft Assistant
item in question increases the player.character_crafting_speed_modifier
by 0.5
.
However the mod already takes this value into account, as well as player.force.manual_crafting_speed_modifier
.
It is possible that using both of these values together is what is what's causing it (if somehow player.force.manual_crafting_speed_modifier is negative).
On the other hand for some other players with a different configuration of mods, it didn't calculate correctly unless both values were used.
Another possibility is that the craft time remaining calculated is correct, but instead that somehow your crafting speed modifier is being changed after you add an item to the queue (crafting time is only recalculated when you manually add/remove an item to/from the queue).
Unfortunately I do not currently have the time to hunt down the cause of the issue, but I may return to this issue should time permit.
Thanks.
Also explaining why it doesn't always overlap ! Which is what intrigued me the most. Some intermediate having too small craft time for the game to round it correctly, or comes as negatives, as you say !
One thing's for sure, some mod can sometimes give strange mix and interactions indeed ^^
No problem ! Thanks already for taking the time to look ! I continue to play so if anything jump to my eyes I'll tell.
And like I said anyway, it's a little gap, that's not more than a display latency lol, The purpose of your mod is still as worthy. Thanks for your answer !
Thank you greatly for your great input and for actually using GitHub. :)
That does help as since I played mostly vanilla games I never really experienced this myself nor do I have the patience to setup a world of my own to playtest it. A good alternative if you are able would be to upload your current world, and state exactly what to craft to repeat the effect you are describing. Should I get time anytime soon (and of course haven't forgotten) I may be able to to look into this more deeply.
I can post my save yes, that would be a big mod list to download thought ^^ I also made personal tweaks I'm not sure at what extent it would make strange results. So I could also reload that save without some mods that aren't related to gameplay, or are not used in that world, which would make a good clean already ^^
Also, since last time I realized that I probably talked too fast : When having more of those modules, it starts to seem obvious that it's not random in fact, but a stable gap. I think I was just biased by smaller crafts where it isn't as noticeable...
In any case, I made tests ! I narrowed the gap to the mix of two crafting speed mods together : Useful equipment AND quality of like research ! (Alongside the timer, ofc) (https://mods.factorio.com/mod/qol_research)
I didn't think of that second mod because there is no gap with it alone, so I had none before installing useful equipment ; And strangely enough, there is no gap either without quality of like research ! So it's only the mix of the two, I'd say.
I upload a save to easly reenact the thing : TEST.zip
Well that's my pleasure ^^ I like conversing with modders, it's fascinating to me I wish I had the motivation to learn more about it. Again, look if you feel like it, it's not an issue for say, totally forgettable. ( I'm curious to know the "why" thought ^^ )
So did some fairly detailed testing and unfortunately haven't found much that would give a clue as to the cause of the problem. I only really have one theory. There are two crafting modifiers used in the game, one for the player 'force' (which affects every player on the map), and another separate one which is stored on a per player basis.
These values are both multipliers, meaning that these values are combined with your default crafting speed of one to get your actual effective crafting speed. I should note that (to my knowledge), technology upgrades the player force's crafting speed, whilst your armor equipment increases your own player's crafting speed.
By default - at the start of a game, the 'force' and 'per player' crafting speed modifiers are both 0
. However the default crafting speed is 1
. My assumption is then that '1 + force's crafting speed + player's crafting speed) should give us the correct total crafting speed value. My belief after going through every line of source code for both mods in great detail is that unless there is some very core bug within Factorio, my assumption regarding how to actually calculate the crafting speed modifier is incorrect.
I have tried many alternatives and have not found any that worked more reasonably. I'm guessing that you are the only player to have experienced (or atleast raised) this issue most likely because you're the only one using fairly large modifiers, (50 + 2 for example) and therefore the only one to have been able to notice a significant gap. I have also attempted many futile searches to discover what Factorio does, I believe my next step will be to simply post a question in the modding support section in the Factorio forums.
I like conversing with modders, it's fascinating to me I wish I had the motivation to learn more about it. Again, look if you feel like it, it's not an issue for say, totally forgettable. ( I'm curious to know the "why" thought ^^ )
By 'curious to know the why' you mean - finding out the cause of the bug - or the reason I'm working on this mod, I will however answer both.
I believe I know the cause of the bug, but will most likely have to ask for input from the Factorio devs, or other modders more experienced in the under-documented Factorio modding API.
Why did I make this mod? To fulfill a mod request. :)
lol yes, no, what I meant is that I'm curious about the cause for the bug ! I know how you came to create the mod, and even, in any case anyway, you do as you feel about it's development ! It's certainly not that I would question ^^
And about that, I wasn't disappointed, it is fascinating ! If it's not too complicated to explain to the layman that I am, (which it is most probably the case, so I'll understand if you fly over it ^^ or even just don't feel like it) how come the game goes through these two distinct ways of calculating crafting speed, one in relation to the player and the other globally? That's hard to make sense of it from my player perspective, seems overcomplicated !
Yes it's true that with so many modules it ends up creating crazy speeds lol At what time is it more of a cheat mod than a gameplay mod x) But once you use it you end up really enjoying the speed ! ^^
And If you indeed end up asking about it, could you share to me the feedback ? Or directly the link of the thread even ? To me now it's suspense at this point ! ^^
Thanks for your time and answer again !
lol yes, no, what I meant is that I'm curious about the cause for the bug ! I know how you came to create the mod, and even, in any case anyway, you do as you feel about it's development ! It's certainly not that I would question ^^
I think you may have misinterpreted what I stated to be quite negative and there is no need to excuse yourself - all is fine.
I see that I did not infact link the request thread on the mod page, in can be found here.
Whilst using the two different values combined together may sound strange, it does (in my opinion) make sense. Think about it this way, when you wear armor equipment pieces that give you a crafting bonus, the game knows exactly who this bonus is to be applied to - namely you. Research on the other hand is performed by machines, which are owned by a 'faction' so to speak, which in Factorio are called 'forces' - though I think you already know this. (the biters are in their own faction, infact most PVP playthroughs will just have different players on different forces). Now when the research lab finishes some particular research, player crafting speed for example it will instead apply this bonus to the machine's owning player's force (your team).
Now to my knowledge the game does store which player placed down a machine and will actually determine which force to apply bonuses to based on which force the owning player is in - but I feel the force method is best as the bonuses can be applied to your entire 'team' - which by default are all other players iirc, or otherwise are all players in your force with you.
Now the only issue with this system is purely that the Factorio API documentation does not state exactly how these two values are combined for the player, which is something I may have to ask the devs - thankfully they also happen to be the best game devs ever given to mankind.
Yes indeed it makes more sense now, I was seeing the craft calculation from the little player/handcrafting perspective only, and also totally forgot that some bonuses are applied to the world, indeed ! ( Thanks for the explications, the extent of your answer, it's truly appreciated !)
Waw, I wouldn't have thought you had to "retro engineer" how the game makes its calculations ^^ If devs do answer about it please tell me back ! Indeed it's known that they are very friendly to modding, both from consideration and work to make their game moddable, the very best kind of devs ! Seems like cool devs from everything I read, anyway =)
Yes I've read the reddit, you didn't mentionned it for nothing on the mod portal /readme ^^ I liked the "I know handcrafting is bad" precaution taken by the author, just to receive a "handcrafting is bad" answer just after lol
Hi there !
Seems like the timer doesn't take into account improved crafting speed : Most of the time the timer goes on longer than the craft itself. For me it's provided by the "Craft assistent" module from the "useful equipment" mod
It's not a big deal, the estimation is already enough by itself, but I figured it's worth mentioning ! Also, since the equipment mod version used is a quick update from another modder than the original author, maybe it's the cause. And maybe that isn't even the cause at all in fact ^^ But I'm pretty sure it is.
Original mod : https://mods.factorio.com/mod/useful_equipment “Unofficial” update : https://mods.factorio.com/mod/useful_equipment_bump