Search found 8 matches
- Thu Oct 02, 2025 7:50 pm
- Forum: Modding help
- Topic: how to use technology nothing modifier
- Replies: 3
- Views: 213
- Thu Oct 02, 2025 6:36 pm
- Forum: Modding help
- Topic: how to use technology nothing modifier
- Replies: 3
- Views: 213
how to use technology nothing modifier
Is it like the research trigger where you have force.script_trigger_research to track it, or do you need to manually track on_research_finished & on_research_reversed events?
- Thu Aug 07, 2025 5:51 pm
- Forum: Modding help
- Topic: remove_fluid not working with modded fluid
- Replies: 1
- Views: 263
Re: remove_fluid not working with modded fluid
Found a solution. By deepcopying the water prototype I got what ever it was I was missing from the original prototype.
local oxygenfluid = table.deepcopy(data.raw["fluid"]["water"])
oxygenfluid.name = "oxygen"
oxygenfluid.base_color={0,0.95,1,0.8}
oxygenfluid.flow_color={0,0.95,1,0.8}
oxygenfluid ...
local oxygenfluid = table.deepcopy(data.raw["fluid"]["water"])
oxygenfluid.name = "oxygen"
oxygenfluid.base_color={0,0.95,1,0.8}
oxygenfluid.flow_color={0,0.95,1,0.8}
oxygenfluid ...
- Wed Aug 06, 2025 9:55 pm
- Forum: Modding help
- Topic: remove_fluid not working with modded fluid
- Replies: 1
- Views: 263
remove_fluid not working with modded fluid
I have a pipe entity I'm using to add a fluid_box to entities without one, and then using remove_fluid for the consumption. The pipe for water works just fine, but the one for my modded fluid(oxygen) has nothing removed from it.
if storage.hab_index[i][3].get_fluid_count () >= 1 then
storage ...
if storage.hab_index[i][3].get_fluid_count () >= 1 then
storage ...
- Mon Aug 04, 2025 1:41 am
- Forum: Modding help
- Topic: entity not destroyed by entity.destroy
- Replies: 1
- Views: 285
Re: entity not destroyed by entity.destroy
Found the problem, it was how I was creating the entity.
Original code,
function register_hab (event)
table.insert(storage.hab_index,event.entity.unit_number)
game.surfaces[1].create_entity{name="hab_electrical", position=event.entity.position}
local entity_energy_cotrol=game.surfaces[1 ...
Original code,
function register_hab (event)
table.insert(storage.hab_index,event.entity.unit_number)
game.surfaces[1].create_entity{name="hab_electrical", position=event.entity.position}
local entity_energy_cotrol=game.surfaces[1 ...
- Sun Aug 03, 2025 11:57 pm
- Forum: Modding help
- Topic: entity not destroyed by entity.destroy
- Replies: 1
- Views: 285
entity not destroyed by entity.destroy
I have an entity which is placed by lua script when placing a different entity, both of which are recorded in a table by unit number. When the first is mined by the player destroy is called on the second, but the entity isn't removed.
Called from the on_player_mined_entity event,
function ...
Called from the on_player_mined_entity event,
function ...
- Tue Jul 29, 2025 6:26 am
- Forum: Modding help
- Topic: How does autoplace work?
- Replies: 1
- Views: 479
Re: How does autoplace work?
Found the answer in viewtopic.php?t=130078
- Sun Jul 27, 2025 9:26 pm
- Forum: Modding help
- Topic: How does autoplace work?
- Replies: 1
- Views: 479
How does autoplace work?
I having trouble understanding how to use autoplace, particularly the probability_expression variable. I've been stealing noise expressions from base since that goes way over my head.
I'm trying to use autoplace to add an entity scattered around the map, this is the code I have,
local ...
I'm trying to use autoplace to add an entity scattered around the map, this is the code I have,
local ...