[RW] Assembler crafting speed

Things that we aren't going to implement
Post Reply
User avatar
Reika
Filter Inserter
Filter Inserter
Posts: 582
Joined: Tue May 19, 2015 1:56 am
Contact:

[RW] Assembler crafting speed

Post by Reika »

A way to change the crafting speed of an assembling-machine-type entity dynamically (for example, as in my case, a borehole driller that takes longer the deeper the hole) without hacks like on_tick setting the crafting progress (which cannot easily achieve the effect of an overall multiplier).

Given that brownouts slow assemblers, I imagine this to be possible without significant rewrite.
Image

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: [RW] Assembler crafting speed

Post by darkfrei »

All assemblers can be slowed with low power, why not with property too?
real_speed = base_speed * power[0…1 (from 0 - no power, to 1 - full powered)] * custom_speed_property_1[0…1].

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [RW] Assembler crafting speed

Post by Rseding91 »

darkfrei wrote:All assemblers can be slowed with low power, why not with property too?
real_speed = base_speed * power[0…1 (from 0 - no power, to 1 - full powered)] * custom_speed_property_1[0…1].
As it is now the speed is a calculated property based off the prototype, the amount of power the machine has, and any speed module effects being applied.

If something can be changed runtime through a property then it needs to be included in the class file as a property (using up slightly more RAM) and included in the save file (using up more disk space).
If you want to get ahold of me I'm almost always on Discord.

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: [RW] Assembler crafting speed

Post by orzelek »

Rseding91 wrote:
darkfrei wrote:All assemblers can be slowed with low power, why not with property too?
real_speed = base_speed * power[0…1 (from 0 - no power, to 1 - full powered)] * custom_speed_property_1[0…1].
As it is now the speed is a calculated property based off the prototype, the amount of power the machine has, and any speed module effects being applied.

If something can be changed runtime through a property then it needs to be included in the class file as a property (using up slightly more RAM) and included in the save file (using up more disk space).
Not sure how much one float would add to assembling machine compared to current size.. would it matter with even 10k of these?

Is it a lot of work to make some variant of assembling machine for modders with new property thats based on base one and has only spped calculation modified?

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: [RW] Assembler crafting speed

Post by darkfrei »

Rseding91 wrote:As it is now the speed is a calculated property based off the prototype, the amount of power the machine has, and any speed module effects being applied.

If something can be changed runtime through a property then it needs to be included in the class file as a property (using up slightly more RAM) and included in the save file (using up more disk space).
It means, this property needs much more recources then speed modues or electric power? Is it possible to set 0.1 or 0.2 module to the machine by ste script?

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [RW] Assembler crafting speed

Post by Rseding91 »

orzelek wrote:Not sure how much one float would add to assembling machine compared to current size.. would it matter with even 10k of these?

Is it a lot of work to make some variant of assembling machine for modders with new property thats based on base one and has only spped calculation modified?
No one property ever ads a ton on its own. It's all of them across the entire save that makes the save file what it is. Knowing when it makes sense to add more vs. when it doesn't is what it comes down to. In this case the utility of adding it in is minimal and the negatives to adding it aren't.

Also it's not a float, it's a double (8 bytes). Every additional property on an entity increases cache misses reducing performance of that entity, increases the amount of RAM used (because memory is not allocated in exact byte amounts but rounded up) and increases the amount of data that has to end up in the save file even when there are no mods that use the property.
If you want to get ahold of me I'm almost always on Discord.

BenSeidel
Filter Inserter
Filter Inserter
Posts: 584
Joined: Tue Jun 28, 2016 1:44 am
Contact:

Re: [RW] Assembler crafting speed

Post by BenSeidel »

Why not spawn an invisible beacon under the drill and slowly place in a custom module that slows down the entity update speed (a -ve speed module)?
If you make the beacon module slot count sufficiently large (and also have multiple tiers of modules) you can cause the drill to slow down in whatever increments you require.

Post Reply

Return to “Won't implement”