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
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,
...
}
})