Change belt speed in game

Place to get help with not working mods / modding interface.
Post Reply
User avatar
leahcim4686
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sat Oct 19, 2019 3:41 am
Contact:

Change belt speed in game

Post by leahcim4686 »

I want to make a mod that allows belts to be slowed much like inserts can override stack size. So far as I can tell, belt speed can only be changed during startup. Am I missing something that would allow this?

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2253
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: Change belt speed in game

Post by boskid »

belt speeds are defined on prototypes during data stage and so cannot be changed later.

Some mods would solve this issue in data stage by doing n deep copies of transport belt (lets keep n<10) with different speeds and then in game you could using lua, fast replace selected belts to different ones. This would look like "changing speed" because graphics would be same (i am not sure if animations would still align).

Performance may suffer after fast replacing belts and when there are many transitions between belts of different speeds (no transport line merge optimisation)

User avatar
leahcim4686
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sat Oct 19, 2019 3:41 am
Contact:

Re: Change belt speed in game

Post by leahcim4686 »

Perhaps an entity (e.g. Belt Buffer 0.17) that I could change output speed?

User avatar
leahcim4686
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sat Oct 19, 2019 3:41 am
Contact:

Re: Change belt speed in game

Post by leahcim4686 »

NM, I used two decider combinators and a constant combinator to enable the belt for a certain number of ticks. Thanks anyway!

Post Reply

Return to “Modding help”