[MOD 0.9.x +] Zlowdown v1.6

Topics and discussion about specific mods
Post Reply
Holy-Fire
Fast Inserter
Fast Inserter
Posts: 169
Joined: Sun Apr 14, 2013 9:15 am
Contact:

[MOD 0.9.x +] Zlowdown v1.6

Post by Holy-Fire »

tl;dr: This mod slows down most automated processes in your factory. Manual actions remain unchanged.

Motivation:
I like to play Factorio in an economics-minded way, maximizing my ROI and growing as fast as possible; if not to keep up with the ever-evolving biters, then as a speed-run. However, I think the game is too fast-paced; The factory is churning out items at great speeds, and you don't have time to plan carefully. I often find myself pausing most of the time while I'm thinking, to avoid wasting very precious seconds.

I want to increase the focus on design and optimizations. With this mod, things won't happen quickly on their own, so to grow quickly you'll need to design the factory at every step to utilize its resources effectively - and you'll have the time to do so.

Description:
The mod starts by defining a slowdown parameter (2.5 by default), and slows down most aspects of the game by this factor. The game simulation speed (ticks per real second) doesn't change (slowing that down makes the interface feel sluggish and unresponsive). Running, combat, manual crafting and manual mining are not affected, so you still have the same power to affect the world around you. However, the automated parts of your factory will take longer to accomplish things.

The slowdown parameter can be changed by editing data.lua for the mod. 2.5 was chosen partly because most speeds in the game are a multiple of 0.05, so this makes round numbers. You can also make it lower than 1 to speed up the game instead.

Detailed effects:

Drill - All Mining Drills have their mining_speed reduced. (This includes pumpjacks)

Furnace - All furnaces have their smelting_speed reduced.

Inserter - All inserters have their extension_speed and rotation_speed reduced. Their energy_per_movement and energy_per_rotation is increased to maintain the same power consumption.

Belt - All transport belts, belts to ground, and splitters have their speed reduced.

Assembling - All Assembling Machines have their crafting_speed reduced. (This includes refineries and chemical plants)

Fuel - Slowing down means each fuel unit should last longer. Hence the fuel_value of all items that have it is increased.

Robot - The speed of all logistic robots is reduced. However, the speed of construction robots is unchanged (so you can build with blueprints with the same speed).

Lab - I could find no "correct" way to reduce research labs speed. The main options are increasing technologies' research time, or decreasing the lab's power consumption. I've chosen the latter method. For all labs, the power consumption is reduced (which does lead to slower research), and the animation speed is increased to compensate. This affects the balance of the game, however, the power consumption of labs is not very significant anyway, so this makes a minor difference.

Biters - The pollution to join attack for all units that have this field (biters) is increased. So the ratio of biter attacks to items produced is maintained (assuming this does what I think it does).

Evolution - The time factor and pollution factor for enemy evolution is reduced.

Trains - The weight of all locomotives and cargo wagons is increased. This slows down their acceleration and the maximal speed that air resistance will allow. The max speed attribute is not affected, which is meaningful mostly with a lone locomotive; leaving it unchanged allows it to still be an effective mode of personal transportation.

Other mods:
The mod should affect new prototypes added by other mods, though I haven't tested this. Any type referred to with "all" above is applicable.

Name:
The mod was originally supposed to be named "Slowdown", but I've been told mods are loaded in alphabetical order, so to increase the chance this mod will be loaded after others and apply to them, I started the name with the letter "Z". And "Z" sounds a little like "S", so...

Comments:
This is my first public mod. I started with a mod for my personal use with this and other balance tweaks. But I figured this might be useful for others so I split it out to its own feature mod which I'm now publishing. Feedback welcome.

The first thing you'll notice is probably that inserters and belts run veeeery slooowly. You'll get used to it.

Mod in text format:
info.json
data.lua
Attachments
Zlowdown 1.6.zip
(1.19 KiB) Downloaded 125 times
Zlowdown 1.5.zip
(2.23 KiB) Downloaded 140 times
Last edited by Holy-Fire on Tue Aug 19, 2014 4:39 pm, edited 6 times in total.

perkel
Burner Inserter
Burner Inserter
Posts: 8
Joined: Fri Jun 20, 2014 8:09 pm
Contact:

Re: [MOD 0.9.x +] Zlowdown v1.0

Post by perkel »

I hear you. IT is same for me.

I think ton of fun from factorio comes from crating big factory.

Most of things in game don't require you to actually build much. Essentially you need two big fields of iron and copper and you are set for game (+ oil).

With slowing down game a little creating bigger factory would be more important than reaching as fast as you can some point of R&D.

It creates situation where you will want to expand base to other posts, creating connected railway system and even creating self contained bases for production of certain item which later will be transported to other base for use.

So keep on going dude. You are doing fine job !

Holy-Fire
Fast Inserter
Fast Inserter
Posts: 169
Joined: Sun Apr 14, 2013 9:15 am
Contact:

Re: [MOD 0.9.x +] Zlowdown v1.0

Post by Holy-Fire »

perkel wrote:So keep on going dude. You are doing fine job !
Thanks :)

Rensiur
Long Handed Inserter
Long Handed Inserter
Posts: 56
Joined: Sat May 17, 2014 2:41 pm
Contact:

Re: [MOD 0.9.x +] Zlowdown v1.0

Post by Rensiur »

I haven't had the chance to try it out and am a bit concerned how nice it plays with a ton of other mods enabled.

For example I usually run my Factorio with at least Treefarm, Yukoki, DyTech (now modular), Bobplates, Ores etc.

Does it generally slow down the game progress even for mods?

If yes that would be a level of very wesome. :P

Rahjital
Filter Inserter
Filter Inserter
Posts: 435
Joined: Thu May 29, 2014 10:44 am
Contact:

Re: [MOD 0.9.x +] Zlowdown v1.0

Post by Rahjital »

The mod is named Zlowdown to make it load after all other mods, so yes, it should work for most mods that rely on standard game mechanics. Larger mods like DyTech or F-mod may pose some problems because of their scripting. New labs and fuel types also won't work as they are hardcoded, but thaat can be fixed with a bit of effort.

It's a really cool mod, simple but cleverly done. I can see myself using it with a slow down factor of 1.5.

Holy-Fire
Fast Inserter
Fast Inserter
Posts: 169
Joined: Sun Apr 14, 2013 9:15 am
Contact:

Re: [MOD 0.9.x +] Zlowdown v1.0

Post by Holy-Fire »

Rensiur wrote:I haven't had the chance to try it out and am a bit concerned how nice it plays with a ton of other mods enabled.

For example I usually run my Factorio with at least Treefarm, Yukoki, DyTech (now modular), Bobplates, Ores etc.

Does it generally slow down the game progress even for mods?

If yes that would be a level of very wesome. :P
The short answer is that I have no idea, but would love reports from the field.

The longer answer, as described in the OP and Rahjital's comment, is that it should apply to most types, assuming it does indeed get loaded in the end. The modifications that currently don't generalize are:

1. Fuel - It would take me some research to figure out how to parse the base fuel values (given as strings), I'll figure it out eventually unless someone gives me a pointer first.

2. Labs - I could iterate over all prototypes of type "lab" and do what I did for the normal lab, but at this point I didn't want to commit to this generalization with such a hackish approach. Can do it if there's demand though.

3. Biters - I can iterate over all of "unit" type, but I'd like some way to detect which of those are relevant. (Maybe just testing for a value of pollution_to_join_attack would suffice?)
Rahjital wrote:It's a really cool mod, simple but cleverly done. I can see myself using it with a slow down factor of 1.5.
I'd recommend 50/33, you'll get round numbers for mining/smelting/crafting speeds. Eventually I'll modify it to round to 3 sf automatically so you won't get messy numbers regardless of the ratio.

User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: [MOD 0.9.x +] Zlowdown v1.0

Post by FreeER »

Holy-Fire wrote:1. Fuel - It would take me some research to figure out how to parse the base fuel values (given as strings), I'll figure it out eventually unless someone gives me a pointer first.
pointer: string.sub(string, first index[, last index]) or (variable) str:sub(first index[, last index]), the last index character is included in the returned string and they can be negative. so fuel = "5kw", fuel:sub(-2) will return the string "kw" and string.sub(fuel, 1, -3) will return the string "5" (use tonumber(string) to attempt to convert a string to a number, it will return nil if it can not. Of course lua will auto-convert if it can but I prefer tonumber since I can check safely) :)

Holy-Fire
Fast Inserter
Fast Inserter
Posts: 169
Joined: Sun Apr 14, 2013 9:15 am
Contact:

Re: [MOD 0.9.x +] Zlowdown v1.0

Post by Holy-Fire »

FreeER wrote:
Holy-Fire wrote:1. Fuel - It would take me some research to figure out how to parse the base fuel values (given as strings), I'll figure it out eventually unless someone gives me a pointer first.
pointer: string.sub(string, first index[, last index]) or (variable) str:sub(first index[, last index]), the last index character is included in the returned string and they can be negative. so fuel = "5kw", fuel:sub(-2) will return the string "kw" and string.sub(fuel, 1, -3) will return the string "5" (use tonumber(string) to attempt to convert a string to a number, it will return nil if it can not. Of course lua will auto-convert if it can but I prefer tonumber since I can check safely) :)
Thanks :)

Holy-Fire
Fast Inserter
Fast Inserter
Posts: 169
Joined: Sun Apr 14, 2013 9:15 am
Contact:

Re: [MOD 0.9.x +] Zlowdown v1.5

Post by Holy-Fire »

Version v1.5 released.

Changelog:
  • Fuel value increase now applies to all items with a fuel_value. Base fuel value of solid fuel is now 25 as in the original prototype.
  • Power consumption / speed reduction now applies to all labs.
  • Pollution to join attack increase now applies to all units which have this field (usually biters).
  • Mining, smelting and crafting speed is now rounded to 3 significant figures, to result in clean-looking values for arbitrary slowdown factors.
Known issues:
  • Modification of fuel values and lab power consumption will not behave correctly if the unit specification in the original prototype is not the last two letters of the string.
Last edited by Holy-Fire on Fri Jun 27, 2014 8:39 am, edited 1 time in total.

hoho
Filter Inserter
Filter Inserter
Posts: 675
Joined: Sat Jan 18, 2014 11:23 am
Contact:

Re: [MOD 0.9.x +] Zlowdown v1.0

Post by hoho »

Holy-Fire wrote:Known issues:
  • Modification of fuel values and lab power consumption will not behave correctly if the unit specification in the original prototype is not the last two letters of the string.
Could you not just check per each character if it's a letter or number?

http://rosettacode.org/wiki/Determine_i ... umeric#Lua

Holy-Fire
Fast Inserter
Fast Inserter
Posts: 169
Joined: Sun Apr 14, 2013 9:15 am
Contact:

Re: [MOD 0.9.x +] Zlowdown v1.0

Post by Holy-Fire »

hoho wrote:
Holy-Fire wrote:Known issues:
  • Modification of fuel values and lab power consumption will not behave correctly if the unit specification in the original prototype is not the last two letters of the string.
Could you not just check per each character if it's a letter or number?

http://rosettacode.org/wiki/Determine_i ... umeric#Lua
I could. But it seems to me to be such an edge case that it's not worth the extra work and complexity at this point. Will be happy to be proven wrong.

hoho
Filter Inserter
Filter Inserter
Posts: 675
Joined: Sat Jan 18, 2014 11:23 am
Contact:

Re: [MOD 0.9.x +] Zlowdown v1.0

Post by hoho »

It seems like a simple loop over the fuel-value string to determine the lenght of unit of measure. Shouldnt' take more than 3-5 lines of code.

Though, yeah, I'm not sure if it is worth it. Are there any items with fuel value/power consumption != 2 letters?

Holy-Fire
Fast Inserter
Fast Inserter
Posts: 169
Joined: Sun Apr 14, 2013 9:15 am
Contact:

Re: [MOD 0.9.x +] Zlowdown v1.0

Post by Holy-Fire »

hoho wrote:It seems like a simple loop over the fuel-value string to determine the lenght of unit of measure. Shouldnt' take more than 3-5 lines of code.
Gotta leave something for future versions of the mod :)
hoho wrote:Though, yeah, I'm not sure if it is worth it. Are there any items with fuel value/power consumption != 2 letters?
In base, of course not (all fuels are measured in MJ and there's only one lab with 60kW). In mods - I don't know, but if I had to guess, I'd say no.

hoho
Filter Inserter
Filter Inserter
Posts: 675
Joined: Sat Jan 18, 2014 11:23 am
Contact:

Re: [MOD 0.9.x +] Zlowdown v1.5

Post by hoho »

I haven't had a chance to try your mod yet (waiting for 0.10.2) but does anything funny happen when fuel value/power use gets bigger than the original unit? E.g if something uses 100kW originally and I multiply it by 20 would it be 2000kW or 20MW? I mean can the game handle values like 2000kW or will it do something weird when things like that happen?

Holy-Fire
Fast Inserter
Fast Inserter
Posts: 169
Joined: Sun Apr 14, 2013 9:15 am
Contact:

Re: [MOD 0.9.x +] Zlowdown v1.5

Post by Holy-Fire »

hoho wrote:I haven't had a chance to try your mod yet (waiting for 0.10.2) but does anything funny happen when fuel value/power use gets bigger than the original unit? E.g if something uses 100kW originally and I multiply it by 20 would it be 2000kW or 20MW? I mean can the game handle values like 2000kW or will it do something weird when things like that happen?
There's no problem. The game is flexible with how prototypes with units are defined, so you could say "15000J", "15kJ" or "0.015MJ" and it will all mean the same. For display purposes, the game chooses whichever is best, so if you define a fuel value to be "0.015MJ", the game will display "15kJ" in the tooltip.

So if the original fuel value of coal is "8MJ" and you choose slowdown_factor = 1000, the mod will set the fuel value to "8000MJ", and the game will compute it correctly and display it as "8GJ".

TerraSleet
Burner Inserter
Burner Inserter
Posts: 6
Joined: Sun Jun 29, 2014 6:15 pm
Contact:

Re: [MOD 0.9.x +] Zlowdown v1.5

Post by TerraSleet »

Cool mod, I'll probably use it, but one minor gripe:
Why does fuel value scale with the time scale? Wouldn't it be better just to divide the energy consumption of all machines by the time scale? That would make more sense to me.

Edit: Another consideration would be to include all pollution calculations in the slowdown mod. For example: machines polluting at a slower rate, trees and spawners absorbing pollution at a slower rate, slowing the rate of pollution spread. I noticed currently that a stone furnace's pollution is reduced but a burner mining drill's is not, which creates a balance issue.

Holy-Fire
Fast Inserter
Fast Inserter
Posts: 169
Joined: Sun Apr 14, 2013 9:15 am
Contact:

Re: [MOD 0.9.x +] Zlowdown v1.5

Post by Holy-Fire »

TerraSleet wrote:Cool mod, I'll probably use it, but one minor gripe:
Why does fuel value scale with the time scale? Wouldn't it be better just to divide the energy consumption of all machines by the time scale? That would make more sense to me.
That's definitely an alternative method that I've considered. However, I wanted to create an experience which is as consistent as possible with vanilla. If I know that, say, Steam engines output 510kW, I don't want the mod to suddenly change that to 204kW. Changing the fuel values seemed to me less obtrusive than the power consumptions.

It's also a bit harder technically, as I would need to iterate over many different types to modify the power consumption of all.
TerraSleet wrote: Edit: Another consideration would be to include all pollution calculations in the slowdown mod. For example: machines polluting at a slower rate, trees and spawners absorbing pollution at a slower rate, slowing the rate of pollution spread.
I'm not an expert on pollution but I figured changing the biters' pollution_to_join_attack and evolution factors would give the desired result - you generate the same pollution but more pollution is required to affect them. Trying to reduce the pollution amounts might have unwanted consequences I'm not aware of, and requires more numerous and varied changes, with higher risk of error. E.g., AFAIK water absorbs pollution but I'm not sure how to change it.

Changing the pollution propagation though is certainly possible, I'll consider it - though it's not obvious to me that it's not in the category of things that shouldn't be slowed down.

In any case, I'm considering adding modules with different approaches to modifying some things, with flags you can edit to determine which one you want.
TerraSleet wrote:I noticed currently that a stone furnace's pollution is reduced but a burner mining drill's is not, which creates a balance issue.
Interesting, the furnace pollution shouldn't have been reduced, I'll try to figure out why that is.


By the way, I'll point out that there's something I've completely forgotten to address in this mod, since I don't use it much - trains. Hopefully that will be fixed soon.

Rahjital
Filter Inserter
Filter Inserter
Posts: 435
Joined: Thu May 29, 2014 10:44 am
Contact:

Re: [MOD 0.9.x +] Zlowdown v1.5

Post by Rahjital »

Holy-Fire wrote:Trying to reduce the pollution amounts might have unwanted consequences I'm not aware of, and requires more numerous and varied changes, with higher risk of error. E.g., AFAIK water absorbs pollution but I'm not sure how to change it.
I did some testing on pollution mechanics. All chunks absorb the same amount of pollution, regardless of the terrain they contain. In practice, water chunks tend to absorb less because they can't contain any trees.

By the way, there's a simple way of controlling the speed of laboratories without having to modify energy consumption of the labs or the length researches:

Code: Select all

game.player.force.laboratoryspeedmodifier = 1 / whateverSlowdownModifierYouWant
Putting this in the oninit event should be enough. I also can't test it at the moment, so unfortunately I can't tell if it's written right or not.

Holy-Fire
Fast Inserter
Fast Inserter
Posts: 169
Joined: Sun Apr 14, 2013 9:15 am
Contact:

Re: [MOD 0.9.x +] Zlowdown v1.6

Post by Holy-Fire »

Version 1.6 is released, with one small but important change:
  • Trains - The weight of all locomotives and cargo wagons is increased. This slows down their acceleration and the maximal speed that air resistance will allow. The max speed attribute is not affected, which is meaningful mostly with a lone locomotive; leaving it unchanged allows it to still be an effective mode of personal transportation.

Post Reply

Return to “Mods”