How is the Robot Energy Multiplier set?

Place to get help with not working mods / modding interface.
Quorken
Inserter
Inserter
Posts: 20
Joined: Mon Aug 18, 2025 3:53 pm
Contact:

How is the Robot Energy Multiplier set?

Post 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.
eugenekay
Filter Inserter
Filter Inserter
Posts: 696
Joined: Tue May 15, 2018 2:14 am
Contact:

Re: How is the Robot Energy Multiplier set?

Post 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 166 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 166 times
Next step would probably be a Modding Interface Request. Good Luck!
Quorken
Inserter
Inserter
Posts: 20
Joined: Mon Aug 18, 2025 3:53 pm
Contact:

Re: How is the Robot Energy Multiplier set?

Post 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.
Quorken
Inserter
Inserter
Posts: 20
Joined: Mon Aug 18, 2025 3:53 pm
Contact:

Re: How is the Robot Energy Multiplier set?

Post 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.
User avatar
Osmo
Fast Inserter
Fast Inserter
Posts: 144
Joined: Wed Oct 23, 2024 12:08 pm
Contact:

Re: How is the Robot Energy Multiplier set?

Post by Osmo »

There is no stat for robot energy usage, it's (gravity/pressure) * 100
Post Reply

Return to “Modding help”