Simple property requests (something that exists but has no way to read/write it)

User avatar
Reika
Filter Inserter
Filter Inserter
Posts: 582
Joined: Tue May 19, 2015 1:56 am
Contact:

Re: Simple property requests (something that exists but has no way to read/write it)

Post by Reika »

Rock (the simple-entity type used for decorations) variant, akin to tree_color_index. Both setter and getter. That way moving them can preserve the shape.
Image

User avatar
IngoKnieto
Fast Inserter
Fast Inserter
Posts: 106
Joined: Mon Oct 03, 2016 9:29 am
Contact:

Re: Simple property requests (something that exists but has no way to read/write it)

Post by IngoKnieto »

entity.neighbour_bonus
and maybe
entity.heat_buffer

I would love to be able to control the performance of a nuclear reactor by accessing and modifying it's produced heat, and I suppose these properties would allow to do that...

EDIT: After taking a closer look, I think entity.consumption and entity.burner.effectivity is what I would need to accomplish this.
Last edited by IngoKnieto on Sun Jan 14, 2018 11:12 am, edited 1 time in total.

User avatar
Reika
Filter Inserter
Filter Inserter
Posts: 582
Joined: Tue May 19, 2015 1:56 am
Contact:

Re: Simple property requests (something that exists but has no way to read/write it)

Post by Reika »

"Max speed" of cargo wagon, locomotive (and maybe car if applicable/inherited)" on the LuaEntityPrototype, in my case for distinguishing "technical" trains (ie ones only used because the entity needs to be of train type) and "real" ones; max speed for the former is likely to be zero.
Image

Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: Simple property requests (something that exists but has no way to read/write it)

Post by Nexela »

Reika wrote:"Max speed" of cargo wagon, locomotive (and maybe car if applicable/inherited)" on the LuaEntityPrototype, in my case for distinguishing "technical" trains (ie ones only used because the entity needs to be of train type) and "real" ones; max speed for the former is likely to be zero.
luaentityprototype.speed will return the max speed for rolling stock prototypes
http://lua-api.factorio.com/latest/LuaE ... type.speed

Rseding91
Factorio Staff
Factorio Staff
Posts: 13198
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Simple property requests (something that exists but has no way to read/write it)

Post by Rseding91 »

Reika wrote:Rock (the simple-entity type used for decorations) variant, akin to tree_color_index. Both setter and getter. That way moving them can preserve the shape.
They use graphics_variation which is already read/write.
If you want to get ahold of me I'm almost always on Discord.

User avatar
Mylon
Filter Inserter
Filter Inserter
Posts: 513
Joined: Sun Oct 23, 2016 11:42 pm
Contact:

Re: Simple property requests (something that exists but has no way to read/write it)

Post by Mylon »

LuaEntity.electric_input_flow_limit write access for EEI entity please.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13198
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Simple property requests (something that exists but has no way to read/write it)

Post by Rseding91 »

Mylon wrote:LuaEntity.electric_input_flow_limit write access for EEI entity please.
Due to the electric network update optimization that's not possible anymore and isn't likely to ever change.
If you want to get ahold of me I'm almost always on Discord.

VortiK
Burner Inserter
Burner Inserter
Posts: 11
Joined: Wed Jan 17, 2018 8:22 pm
Contact:

Re: Simple property requests (something that exists but has no way to read/write it)

Post by VortiK »

Hello,

I made the deep core mining mod (https://mods.factorio.com/mod/vtk-deep-core-mining) with high level miner and during balance and feedback from fellow engineers I figured beacon and effect can make things go over the top.

I checked to see how I could limit effects and module usage on my entities and found the allowed effets property : https://wiki.factorio.com/Prototype/Cra ... ed_effects

This works to limit the modules you can insert, but not the effets it can receive from beacon.

Would it be possible to have either :
- and "allowed_effets_transmission" property that would define what remote effect the entity can receive
- a way to turn off any beacon effets on an entity like "allow_transmission" as a boolean

I dunno how hard it would be from the factorio code, but it seems there is already something hardcoded to prevent some entities to get beacon effets applied on them (like beacon themselves).

Also the entity applied effets property is Read only (http://lua-api.factorio.com/latest/LuaE ... ty.effects), any reason for that ? Maybe we could hack into it to remove effets from beacons, but I dunno how they are applied and if it would be feasible / performant to change them by control.lua.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13198
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Simple property requests (something that exists but has no way to read/write it)

Post by Rseding91 »

The entire effect system is not adjustable runtime because it's not included in the save file. Every time the game is loaded all of the effects are re-calculated based off the beacons with modules and modules in a given machine. That means you can't change the effects runtime outside of adding/removing modules/beacons (which are in the save file).
If you want to get ahold of me I'm almost always on Discord.

User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2633
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: Simple property requests (something that exists but has no way to read/write it)

Post by steinio »

There is a placeable_by straight rails for curved rails.

Can we get a LuaEntity.consists_of or something to detect this?
Image

Transport Belt Repair Man

View unread Posts

Rseding91
Factorio Staff
Factorio Staff
Posts: 13198
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Simple property requests (something that exists but has no way to read/write it)

Post by Rseding91 »

steinio wrote:There is a placeable_by straight rails for curved rails.

Can we get a LuaEntity.consists_of or something to detect this?
You mean http://lua-api.factorio.com/latest/LuaE ... place_this
If you want to get ahold of me I'm almost always on Discord.

User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2633
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: Simple property requests (something that exists but has no way to read/write it)

Post by steinio »

Rseding91 wrote:
steinio wrote:There is a placeable_by straight rails for curved rails.

Can we get a LuaEntity.consists_of or something to detect this?
You mean http://lua-api.factorio.com/latest/LuaE ... place_this
Nice. Thanks for implementing so fast :p
Image

Transport Belt Repair Man

View unread Posts

User avatar
Earendel
Factorio Staff
Factorio Staff
Posts: 711
Joined: Sun Nov 23, 2014 11:57 am
Contact:

Re: Simple property requests (something that exists but has no way to read/write it)

Post by Earendel »

Hi Rseding91,
Can you add LuaEntityPrototye.energy_per_hit_point read access for car entities please.
Thanks.

User avatar
Aprillion
Inserter
Inserter
Posts: 34
Joined: Sun Apr 16, 2017 10:43 am
Contact:

Re: Simple property requests (something that exists but has no way to read/write it)

Post by Aprillion »

.icon is listed on 1st page of this thread, some problem implementing please?

I wanted to export icon path or at least filename for an external tool, e.g. when mods modify or add icons, but also in the base mod some icons do not match item name (acumulator.png vs name=accumulator)...

Rseding91
Factorio Staff
Factorio Staff
Posts: 13198
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Simple property requests (something that exists but has no way to read/write it)

Post by Rseding91 »

Aprillion wrote:.icon is listed on 1st page of this thread, some problem implementing please?

I wanted to export icon path or at least filename for an external tool, e.g. when mods modify or add icons, but also in the base mod some icons do not match item name (acumulator.png vs name=accumulator)...
Having read access to the icon data provides nothing useful runtime. You can't do anything with that data.
If you want to get ahold of me I'm almost always on Discord.

User avatar
Aprillion
Inserter
Inserter
Posts: 34
Joined: Sun Apr 16, 2017 10:43 am
Contact:

Re: Simple property requests (something that exists but has no way to read/write it)

Post by Aprillion »

Rseding91 wrote:Having read access to the icon data provides nothing useful runtime. You can't do anything with that data.
To export the correct value after the enabled mods are applied - like http://aprillion.github.io/recipe_explorer/#accumulator but html page inside scripts_output/ directory - which is currently not feasible without manual mapping (like accumulator => acumulator.png with single c), which is not possible for arbitrary mods and/or versions (when/if you fix typo) and/or installation folders (not relative to scripts_output)...

I wanted to check if there are complications, or if there are just a lot of higher priorities than my use case.

But the "data provides NOTHING useful" argument might be very rare when you have a million users with access to modding api :) perhaps it's only NOT ENOUGH useful.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Simple property requests (something that exists but has no way to read/write it)

Post by eradicator »

Aprillion wrote:
Rseding91 wrote:Having read access to the icon data provides nothing useful runtime. You can't do anything with that data.
To export the correct value after the enabled mods are applied - like http://aprillion.github.io/recipe_explorer/#accumulator but html page inside scripts_output/ directory - which is currently not feasible without manual mapping (like accumulator => acumulator.png with single c), which is not possible for arbitrary mods and/or versions (when/if you fix typo) and/or installation folders (not relative to scripts_output)...

I wanted to check if there are complications, or if there are just a lot of higher priorities than my use case.

But the "data provides NOTHING useful" argument might be very rare when you have a million users with access to modding api :) perhaps it's only NOT ENOUGH useful.
If you just want to export the icon paths once why don't you do it at the end of the data stage?
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

User avatar
Aprillion
Inserter
Inserter
Posts: 34
Joined: Sun Apr 16, 2017 10:43 am
Contact:

Re: Simple property requests (something that exists but has no way to read/write it)

Post by Aprillion »

eradicator wrote:If you just want to export the icon paths once why don't you do it at the end of the data stage?
I am also exporting the current state of technology research and I hoped to have it all in 1 place, but I guess I could combine exports from multiple stages, thanks for the reminder.

VortiK
Burner Inserter
Burner Inserter
Posts: 11
Joined: Wed Jan 17, 2018 8:22 pm
Contact:

Re: Simple property requests (something that exists but has no way to read/write it)

Post by VortiK »

Rseding91 wrote:The entire effect system is not adjustable runtime because it's not included in the save file. Every time the game is loaded all of the effects are re-calculated based off the beacons with modules and modules in a given machine. That means you can't change the effects runtime outside of adding/removing modules/beacons (which are in the save file).
Thanks for your reply. I understand if the effects system can't be interacted with. However would it be possible to have a flag to allow or prevent remote effects on an entity ?

It seems to be already the case on some entities. It seems to work on furnace entity type where you can set "allowed_effects= nil" and beacons won't work on it (exemple mod : https://mods.factorio.com/mod/DeadlockStacking). However when I set the same on a "mining-drill" entity, it will always get effects applied.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13198
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Simple property requests (something that exists but has no way to read/write it)

Post by Rseding91 »

VortiK wrote:
Rseding91 wrote:The entire effect system is not adjustable runtime because it's not included in the save file. Every time the game is loaded all of the effects are re-calculated based off the beacons with modules and modules in a given machine. That means you can't change the effects runtime outside of adding/removing modules/beacons (which are in the save file).
Thanks for your reply. I understand if the effects system can't be interacted with. However would it be possible to have a flag to allow or prevent remote effects on an entity ?

It seems to be already the case on some entities. It seems to work on furnace entity type where you can set "allowed_effects= nil" and beacons won't work on it (exemple mod : https://mods.factorio.com/mod/DeadlockStacking). However when I set the same on a "mining-drill" entity, it will always get effects applied.
Since 0.16.0 that should work for mining drills as well. If not, please make a bug report with an example mod showing it not working.
If you want to get ahold of me I'm almost always on Discord.

Locked

Return to “Implemented mod requests”