Alternative Alt Mode


Replaces the standard Alt-Mode by providing more information for more objects. This information is shown only for entities around the player cursor, so the graphics of other objects can be enjoyed without always having an information overlay on top of them.

Utilities
28 days ago
2.0
463

i Electric pole info

3 months ago

Is it possible to add a menu setting that will disable the display of electricity consumption on electric poles and substations? I assume it's called "draw_electric_pole_info". Or, instead of changing the mod, is it possible to locally specify what needs to be added to the code so I can do it only on my side? :)

3 months ago

I also didn't understand the power display mode - should it show the total power of the grid, or just how much power each pole gives to the entities connected to it? Right now it shows the total power of the grid (production).

3 months ago
(updated 3 months ago)

Thanks! I've added a setting for the next release.

Yes, it's the total power of the grid. I wanted to change the background colour as well so you can quickly see when you start running into power issues. Haven't gotten around making that calculation yet.
Just showing the power it gives to its surrounding entities is an interesting idea, but I'm guessing quite performance heavy as it has to search all those entities for each power pole. I also think it's hard to make sense of the information that gives.

is it possible to locally specify what needs to be added to the code so I can do it only on my side

There is a alt_functions_per_type in draw_entity_info.lua, you can manually remove/comment out the types you don't want. I'd prefer you to make a post like you did just now so I can make a setting for those entity types.

I could make a setting for each one, but that blows up the size of the settings page.

local alt_functions_per_type = {
  ["accumulator"]              = draw_accumulator_info,
  -- ["electric-pole"]            = draw_electric_pole_info,
  ["agricultural-tower"]       = draw_agricultural_tower_info,
...
3 months ago

Hmmm... What if you just add a blacklist? Then the user himself will specify which entities do not need to be displayed, and there will be no need to increase the number of settings and constantly change the code if you need to add some entity. I have seen such a setting in many mods, so it is definitely possible.

3 months ago

How does that work? As an input field where users have to type in all the entity types manually?

3 months ago

Yes, that's right, it's a simple field for entering an entity, and then the code picks up this entity and does something with it that is embedded in the code.
For example, here is a blacklist - https://mods.factorio.com/mod/productions-per-minute

3 months ago

Just showing the power it gives to its surrounding entities is an interesting idea, but I'm guessing quite performance heavy as it has to search all those entities for each power pole. I also think it's hard to make sense of the information that gives.

The game has these values:
energy_source = {
type = "electric",
buffer_capacity = "300MJ",
usage_priority = "tertiary",
input_flow_limit = "20MW",
output_flow_limit = "20MW"
},
what if we do something like this:
input_flow_limit -(minus) output_flow_limit == power consumer. Although most likely some other code is used to calculate this value.
I just expressed my thought...

3 months ago
(updated 3 months ago)

How does that work? As an input field where users have to type in all the entity types manually?

This is now added. To filter out power poles you add power-pole to that list

3 months ago

what if we do something like this:

That's not going to work.
Those are prototype properties, they don't change at runtime. For plenty of entities the difference is also 0.

The resulting numbers would just be confusing.

I'm keeping it as is.

New response