Request: FlyingRobot.max_speed

Post Reply
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2528
Joined: Fri Nov 06, 2015 7:41 pm

Request: FlyingRobot.max_speed

Post by Deadlock989 »

Hi,

Unlike ammo rate-of-fire/damage research which can be targeted at specific prototypes, robot speed research affects all robots of either construction or logistics type (and possibly combat bots too, not sure), regardless of their prototype. This is fair enough for the vanilla use case, where there are only two kinds of logistics-enabled bot.

But modders can create separate tiers of bot. It is quite difficult to hobble the lower tiers when their speed ends up being greatly multiplied by later research. At the moment, the base speed of a robot can be set, and it's true that if you make a bot which is slower than the vanilla bots, it will always be slower, regardless of the research multiplier. However the difference between 5x a slow bot and 5x a fast bot looks and feels like much less of a difference than the difference between 1x a slow bot and 1x a fast bot.

It would be nice to be able to set a cap on that speed, so that despite research, the player is incentivised to use proper bots for proper work. Robots would take their speed from whichever is the lower out of (speed * research) or (max_speed if it is not nil).

[ An alternative would be to have the robot speed tech unlock effect target specific prototypes of bot, like ammo damage does, but I imagine that would be much more work and break a lot more things, compared to including the cap in the bot prototype, which should be fully backwards-compatible (the max level is ignored if not specified/nil). ]

Example use case 1: a low tier bot which isn't affected by speed research, but vanilla bots are unchanged

Code: Select all

data:extend({
	{
		name = "clanky-junkbot",
		type = "construction-robot",
		speed = 0.03,
		max_speed = 0.03,
		...
	}
})
-- no change to vanilla bot
Example use case 2: vanilla bots benefit from some research, but only high-tier bots get the full benefit:

Code: Select all

 -- default value is 0.06, so let them go up to 2x speed
data.raw["construction-robot"]["construction-robot"].max_speed = 0.12

data:extend({
	{
		name = "mega-diamond-bot-9000",
		type = "construction-robot",
		speed = 0.24,
		max_speed = nil,
		...
	}
})
Image

Bilka
Factorio Staff
Factorio Staff
Posts: 3132
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Request: FlyingRobot.max_speed

Post by Bilka »

Okay, added in the next version.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

BHakluyt
Fast Inserter
Fast Inserter
Posts: 241
Joined: Sat Oct 08, 2016 12:43 pm
Contact:

Re: Request: FlyingRobot.max_speed

Post by BHakluyt »

You just had to go and wake up sleeping dogs? Not cool! I was using my steampunk bots well into the late game. Lol

User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2528
Joined: Fri Nov 06, 2015 7:41 pm

Re: Request: FlyingRobot.max_speed

Post by Deadlock989 »

Nice one. Thanks Bilka.
Image

Post Reply

Return to “Implemented mod requests”