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

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

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

Post by Reika » Mon Jan 01, 2018 2:26 am

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.

User avatar
IngoKnieto
Long Handed Inserter
Long Handed Inserter
Posts: 83
Joined: Mon Oct 03, 2016 9:29 am

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

Post by IngoKnieto » Wed Jan 03, 2018 9:48 pm

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: 309
Joined: Tue May 19, 2015 1:56 am

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

Post by Reika » Fri Jan 12, 2018 9:16 pm

"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.

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

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

Post by Nexela » Mon Jan 15, 2018 2:06 am

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: 7870
Joined: Wed Jun 11, 2014 5:23 am

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

Post by Rseding91 » Mon Jan 15, 2018 4:14 am

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 IRC and Discord.

Mylon
Filter Inserter
Filter Inserter
Posts: 355
Joined: Sun Oct 23, 2016 11:42 pm

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

Post by Mylon » Fri Jan 19, 2018 3:11 pm

LuaEntity.electric_input_flow_limit write access for EEI entity please.

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

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

Post by Rseding91 » Fri Jan 19, 2018 6:39 pm

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 IRC and Discord.

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

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

Post by VortiK » Tue Jan 23, 2018 10:26 pm

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: 7870
Joined: Wed Jun 11, 2014 5:23 am

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

Post by Rseding91 » Tue Jan 23, 2018 11:38 pm

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 IRC and Discord.

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

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

Post by steinio » Wed Jan 24, 2018 11:31 pm

There is a placeable_by straight rails for curved rails.

Can we get a LuaEntity.consists_of or something to detect this?
Image[url=steam://friends/add/'.76561198315557255.']Image[/url]
Transport Belt Repair Man
My little mods: Link | My favourite mods: Bob's Mods | Angel's Mods | Yuoki Railway Core | EvoGUI | Logistic Train Network
Factorio Cheat Sheet by Denis Zholob

View unread Posts

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

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

Post by Rseding91 » Wed Jan 24, 2018 11:56 pm

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 IRC and Discord.

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

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

Post by steinio » Thu Jan 25, 2018 6:04 am

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[url=steam://friends/add/'.76561198315557255.']Image[/url]
Transport Belt Repair Man
My little mods: Link | My favourite mods: Bob's Mods | Angel's Mods | Yuoki Railway Core | EvoGUI | Logistic Train Network
Factorio Cheat Sheet by Denis Zholob

View unread Posts

User avatar
Earendel
Filter Inserter
Filter Inserter
Posts: 543
Joined: Sun Nov 23, 2014 11:57 am

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

Post by Earendel » Thu Jan 25, 2018 5:31 pm

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

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

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

Post by Aprillion » Thu Jan 25, 2018 7:01 pm

.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: 7870
Joined: Wed Jun 11, 2014 5:23 am

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

Post by Rseding91 » Thu Jan 25, 2018 10:38 pm

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 IRC and Discord.

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

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

Post by Aprillion » Fri Jan 26, 2018 4:47 pm

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: 2302
Joined: Tue Jul 12, 2016 9:03 am

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

Post by eradicator » Fri Jan 26, 2018 9:00 pm

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?

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

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

Post by Aprillion » Sat Jan 27, 2018 12:04 pm

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: 9
Joined: Wed Jan 17, 2018 8:22 pm

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

Post by VortiK » Mon Jan 29, 2018 9:09 pm

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: 7870
Joined: Wed Jun 11, 2014 5:23 am

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

Post by Rseding91 » Mon Jan 29, 2018 9:15 pm

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 IRC and Discord.

Post Reply

Return to “Implemented mod requests”