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

sparr
Smart Inserter
Smart Inserter
Posts: 1327
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

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

Post by sparr »

Requests for LuaEntity properties needed for cloning via LuaSurface::create_entity:

flying-text
text :: string: The string to show.
color :: Color: Color of the displayed text.

entity-ghost
expires :: boolean (optional): If false the ghost entity will not expire. Default is true.

particle
movement :: Vector
height :: float
vertical_speed :: float
frame_speed :: float

projectile
speed :: double

User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2124
Joined: Thu Jun 12, 2014 3:05 am
Contact:

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

Post by Ranakastrasz »

equipment.burner.fuel_category.
Would like to be able to identify what kind of fuel a burner takes in general as well.

So, burner.prototype.fuel_category.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16

Helfima
Fast Inserter
Fast Inserter
Posts: 199
Joined: Tue Jun 28, 2016 11:40 am
Contact:

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

Post by Helfima »

luaEntityPrototype.distribution_effectivity - Beacon distribution effectivity

luaEntityPrototype.energy_source.buffer_capacity - Accumulator buffer capacity
luaEntityPrototype.energy_source.input_flow_limit - Accumulator input flow limit
luaEntityPrototype.energy_source.output_flow_limit - Accumulator output flow limit
luaEntityPrototype.energy_source.effectivity - Generator or boiler effectivity
luaEntityPrototype.maximum_temperature - Generator maximum temperature
luaEntityPrototype.fluid_usage_per_tick - Generator fluid usage per tick
luaEntityPrototype.consumption - Boiler energy consumption
luaEntityPrototype.target_temperature - Boiler target temperature
luaEntityPrototype.production - Solar production

User avatar
mickael9
Fast Inserter
Fast Inserter
Posts: 112
Joined: Mon Mar 14, 2016 4:04 am
Contact:

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

Post by mickael9 »

item-request-proxy
proxy_target :: LuaEntity

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 »

luaFluidPrototype.type -- This would of course just return "fluid"

Use case
I have a combined list of item and fluid prototypes and want to iterate the list and make a sprite button depending on what the prototype is, currently this results in an error trying to access type on fluid prototypes

Additionaly the remaning lua***Prototypes should have this as well

BurnerPrototype
DamagePrototype
DecorativePrototype
EquipmentGridPrototype
RecipePrototype
TechnologyPrototype
TilePrototype

Thanks!

sparr
Smart Inserter
Smart Inserter
Posts: 1327
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

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

Post by sparr »

read/write access to LuaEntity.production for solar panels (docs say power_production is just for electricenergyinterface)

use case: lower power production based on pollution

Rseding91
Factorio Staff
Factorio Staff
Posts: 13175
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 »

sparr wrote:read/write access to LuaEntity.production for solar panels (docs say power_production is just for electricenergyinterface)

use case: lower power production based on pollution
This isn't possible. Solar panels produced based off the prototype values multiplied by the current brightness * solar panel count in the network.
If you want to get ahold of me I'm almost always on Discord.

User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1190
Joined: Wed May 18, 2016 4:55 pm
Contact:

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

Post by Mooncat »

Not sure if it is the right place to ask:

- Read whether time is frozen on a surface. (Change LuaSurface.freeze_daytime to a read-write property?)
We can write LuaSurface.freeze_daytime, but no way to read its state currently. (The request)


- LuaTechnology.research_progress
We can set LuaTechnology.researched to false to reset the technology. But if the technology was researched for awhile and the player changed the research, its research progress was saved, setting researched=false won't reset its progress.


Edit: btw, setting LuaTechnology.researched to true won't reset the saved progress either. Is it a bug?
Steps to reproduce: research a technology for awhile but don't complete it -> set its LuaTechnology.researched to true -> open technology UI and observe

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 »

luaFluidPrototype.gas_temperature

MightyMooquack
Burner Inserter
Burner Inserter
Posts: 8
Joined: Mon Apr 24, 2017 1:33 am
Contact:

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

Post by MightyMooquack »

LuaEntityPrototype.resource_categories -- The list of resource categories that can be mined by a mining entity (burner miner, electric miner, pumpjack).
LuaEntityPrototype.fluid -- Only appears to be used by the offshore-pump. The fluid that the entity produces.
LuaEntityPrototype.pumping_speed -- Used by offshore-pump and pump. Fluid pumped per tick.

Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

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

Post by Choumiko »

Unless i'm missing something:

LuaEntityPrototype.speed : According to the docs it's for robots only, should work for Locomotives, cars, tanks too (maybe even cargo wagons as in max speed they can tolerate)

Rseding91
Factorio Staff
Factorio Staff
Posts: 13175
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 »

Choumiko wrote:Unless i'm missing something:

LuaEntityPrototype.speed : According to the docs it's for robots only, should work for Locomotives, cars, tanks too (maybe even cargo wagons as in max speed they can tolerate)
Cars and tanks have no speed value - they're only limited by the energy they can transfer into motion each tick. Locomotives/cargo wagons I can add.
If you want to get ahold of me I'm almost always on Discord.

kikker450
Inserter
Inserter
Posts: 30
Joined: Fri May 05, 2017 9:07 am
Contact:

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

Post by kikker450 »

MightyMooquack wrote:LuaEntityPrototype.resource_categories
Is this added for the next patch? (you're usually so quick :( ) I kinda of want this for finding and calculating miners and pumpjacks in RatioTree

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 »

Combat robot time to live: viewtopic.php?f=28&t=48878

Helfima
Fast Inserter
Fast Inserter
Posts: 199
Joined: Tue Jun 28, 2016 11:40 am
Contact:

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

Post by Helfima »

Helfima wrote:....
luaEntityPrototype.production - Solar production
I don't see solar production, it's missing?
See my screen with properties of solar prototype
solar.entity_prototype.electric_energy_source_prototype

sparr
Smart Inserter
Smart Inserter
Posts: 1327
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

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

Post by sparr »

Helfima wrote:
Helfima wrote:See my screen with properties of solar prototype
solar.entity_prototype.electric_energy_source_prototype
Is that property exploring mod published?

Helfima
Fast Inserter
Fast Inserter
Posts: 199
Joined: Tue Jun 28, 2016 11:40 am
Contact:

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

Post by Helfima »

sparr wrote:Is that property exploring mod published?
yes it's a hidden tab by default in my mod Helmod :D
GAME_OPTION
sample

User avatar
mickael9
Fast Inserter
Fast Inserter
Posts: 112
Joined: Mon Mar 14, 2016 4:04 am
Contact:

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

Post by mickael9 »

For curved rails:

LuaEntity::secondary_bounding_box
LuaEntityPrototype::secondary_collision_box

I'm also wondering why there is no secondary_selection_box in the curved rail's prototype since one can be seen with the debug view when "show-selection-rectangles" is checked
Last edited by mickael9 on Wed Jun 14, 2017 6:50 pm, edited 1 time in total.

User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2124
Joined: Thu Jun 12, 2014 3:05 am
Contact:

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

Post by Ranakastrasz »

LuaEntityPrototype.ticks_to_stay_in_combat (R)
-----

LuaEntity.inCombat (Boolean) (R)

OR

LuaEntity.lastCombatTick (R/W)(int)


InCombat would let you know if the entity is regenerating or not.
lastCombatTick read/write would, with ticks_to_stay_in_combat would allow for you to both detect regeneration state, AND manipulate it.

Additionally, even if ticks_to_stay_in_combat is zero/undefined, setting lastCombatTick to CurrentTime+60 would delay regeneration for a full second, allowing regeneration suppressing.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16

evildogbot100
Fast Inserter
Fast Inserter
Posts: 152
Joined: Sun Dec 18, 2016 3:02 pm
Contact:

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

Post by evildogbot100 »

LuaSurface::createEntity

orientation :: float : only for car, tank, locomotive, and wagons.

Locked

Return to “Implemented mod requests”