Page 1 of 1

How is the Robot Energy Multiplier set?

Posted: Sun Sep 14, 2025 9:22 pm
by Quorken
I have looked through the data- and control-stage docs, and I can't find any kind of surface-property or SpaceLocation member that determines the multiplier for robot energy usage. I even looked through the data.raw, and didn't find anything like this in Aquilo's defintion

I searched for things like "robot", "flying", etc.

Re: How is the Robot Energy Multiplier set?

Posted: Sun Sep 14, 2025 11:38 pm
by eugenekay
This may be hardcoded and/or calculated somewhere weird?

The closest I could find is the localization strings in data/core/locale/en/core.cfg:

Code: Select all

[gui-space-locations]
overview=Overview
title=Space map
view=View
planet-surface-not-generated=Planet surface not generated
contains=Contains
connections=Connections
evolution-factor=Evolution factor
robot-energy-usage=Robot energy usage
All of these appear to be "built-in" pieces of the UI used for space-location display in Factoriopedia. There is no corresponding surface-property in data/base/prototypes/planet/surface-property.lua. Creating a "named property" does not work right:

Code: Select all

    {
      ["day-night-cycle"] = 20 * minute,
      ["magnetic-field"] = 10,
      pressure = 300,
      ["solar-power"] = 1,
      gravity = 15,
      {"robot-energy-usage"] = 2
    },
09-14-2025, 19-16-07.png
09-14-2025, 19-16-07.png (7.82 KiB) Viewed 172 times
Or, specifying it "unquoted" causes a syntax error!? I suspect the Parser is doing some voodoo around this Property.

Code: Select all

    {
      ["day-night-cycle"] = 20 * minute,
      ["magnetic-field"] = 10,
      pressure = 300,
      ["solar-power"] = 1,
      gravity = 15,
      robot-energy-usage = 2
    },
09-14-2025, 19-23-35.png
09-14-2025, 19-23-35.png (29.66 KiB) Viewed 172 times
Next step would probably be a Modding Interface Request. Good Luck!

Re: How is the Robot Energy Multiplier set?

Posted: Mon Sep 15, 2025 12:36 am
by Quorken
The syntax error is because it's not a valid lua identifier, so it has to be used as a string, like ["robot-energy-multiplier"] = 2.
Doing

Code: Select all

{
	key = value
}
is the same as doing

Code: Select all

{
	["key"] = value
}
But the former is only valid if "key" is a valid variable name.

Re: How is the Robot Energy Multiplier set?

Posted: Mon Sep 15, 2025 12:45 am
by Quorken
I thought there were some modded planets that had custom multipliers, so I thought I was just missing the way to set it. Ideally, it's something you could set at runtime, so you could have a dynamic energy multiplier for certain planets.

Re: How is the Robot Energy Multiplier set?

Posted: Mon Sep 15, 2025 6:19 am
by Osmo
There is no stat for robot energy usage, it's (gravity/pressure) * 100