Simple property requests (something that exists but has no way to read/write it)
Re: Simple property requests (something that exists but has no way to read/write it)
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.
- IngoKnieto
- 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)
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.
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.
Re: Simple property requests (something that exists but has no way to read/write it)
"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.
Re: Simple property requests (something that exists but has no way to read/write it)
luaentityprototype.speed will return the max speed for rolling stock prototypesReika 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.
http://lua-api.factorio.com/latest/LuaE ... type.speed
Re: Simple property requests (something that exists but has no way to read/write it)
They use graphics_variation which is already read/write.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.
If you want to get ahold of me I'm almost always on Discord.
Re: Simple property requests (something that exists but has no way to read/write it)
LuaEntity.electric_input_flow_limit write access for EEI entity please.
Re: Simple property requests (something that exists but has no way to read/write it)
Due to the electric network update optimization that's not possible anymore and isn't likely to ever change.Mylon wrote:LuaEntity.electric_input_flow_limit write access for EEI entity please.
If you want to get ahold of me I'm almost always on Discord.
Re: Simple property requests (something that exists but has no way to read/write it)
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.
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.
Re: Simple property requests (something that exists but has no way to read/write it)
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.
Re: Simple property requests (something that exists but has no way to read/write it)
There is a placeable_by straight rails for curved rails.
Can we get a LuaEntity.consists_of or something to detect this?
Can we get a LuaEntity.consists_of or something to detect this?
Re: Simple property requests (something that exists but has no way to read/write it)
You mean http://lua-api.factorio.com/latest/LuaE ... place_thissteinio wrote:There is a placeable_by straight rails for curved rails.
Can we get a LuaEntity.consists_of or something to detect this?
If you want to get ahold of me I'm almost always on Discord.
Re: Simple property requests (something that exists but has no way to read/write it)
Nice. Thanks for implementing so fast :pRseding91 wrote:You mean http://lua-api.factorio.com/latest/LuaE ... place_thissteinio wrote:There is a placeable_by straight rails for curved rails.
Can we get a LuaEntity.consists_of or something to detect this?
Re: Simple property requests (something that exists but has no way to read/write it)
Hi Rseding91,
Can you add LuaEntityPrototye.energy_per_hit_point read access for car entities please.
Thanks.
Can you add LuaEntityPrototye.energy_per_hit_point read access for car entities please.
Thanks.
Re: Simple property requests (something that exists but has no way to read/write it)
.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)...
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)...
Re: Simple property requests (something that exists but has no way to read/write it)
Having read access to the icon data provides nothing useful runtime. You can't do anything with that data.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)...
If you want to get ahold of me I'm almost always on Discord.
Re: Simple property requests (something that exists but has no way to read/write it)
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)...Rseding91 wrote:Having read access to the icon data provides nothing useful runtime. You can't do anything with that data.
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.
- eradicator
- Smart Inserter
- Posts: 5207
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Simple property requests (something that exists but has no way to read/write it)
If you just want to export the icon paths once why don't you do it at the end of the data stage?Aprillion wrote: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)...Rseding91 wrote:Having read access to the icon data provides nothing useful runtime. You can't do anything with that data.
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.
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.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Re: Simple property requests (something that exists but has no way to read/write it)
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.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?
Re: Simple property requests (something that exists but has no way to read/write it)
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 ?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).
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.
Re: Simple property requests (something that exists but has no way to read/write it)
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.VortiK wrote: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 ?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).
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.
If you want to get ahold of me I'm almost always on Discord.