Search found 253 matches

by PFQNiet
Sat Jan 22, 2022 7:59 am
Forum: Modding discussion
Topic: Replacing Beacons with Overclocking Stations - possible?
Replies: 13
Views: 487

Re: Replacing Beacons with Overclocking Stations - possible?

- You can just set localised_name=something on the helper entities, setting them all to the same single name for all of them. - I personally wouldn't use objects as table keys like that. Use the unit number instead, yes. - Power area is handled by the collision box, not the selection box. You can ma...
by PFQNiet
Wed Jan 19, 2022 10:54 am
Forum: Modding discussion
Topic: Replacing Beacons with Overclocking Stations - possible?
Replies: 13
Views: 487

Re: Replacing Beacons with Overclocking Stations - possible?

In vanilla Factorio a single 3x3 entity would be enough to cover basically any machine, with only the refinery needing a 5x5 and the silo needing a 9x9. That's three entities for every size building in the game, unless I'm forgetting something. So you won't need too many EEI entities even with modde...
by PFQNiet
Tue Jan 18, 2022 8:15 am
Forum: Modding discussion
Topic: Replacing Beacons with Overclocking Stations - possible?
Replies: 13
Views: 487

Re: Replacing Beacons with Overclocking Stations - possible?

selectable_in_game=false If you want dynamic power management, then you will indeed need to spawn an Electric Energy Interface in addition to your Beacon. I would suggest having the beacon draw some small fixed amount of power so that it is affected by low-power situations, then have the dynamic por...
by PFQNiet
Wed Jan 12, 2022 8:28 am
Forum: Modding discussion
Topic: Replacing Beacons with Overclocking Stations - possible?
Replies: 13
Views: 487

Re: Replacing Beacons with Overclocking Stations - possible?

Energy usage must be strictly positive, but that energy can come from a void energy source.
by PFQNiet
Mon Jan 10, 2022 6:31 pm
Forum: Modding discussion
Topic: Replacing Beacons with Overclocking Stations - possible?
Replies: 13
Views: 487

Re: Replacing Beacons with Overclocking Stations - possible?

It sounds like it could work. It might be tricky but nothing you've described sounds outside the capabilities of the engine. For detecting the transfer of items into or out of a beacon, you will need the fast-transfer events (if the destination is a beacon) as well as player-inventory-changed and cu...
by PFQNiet
Wed Dec 29, 2021 6:33 am
Forum: Modding help
Topic: Finding entities in a save that have been removed
Replies: 4
Views: 255

Re: Finding entities in a save that have been removed

I'm not sure that's a problem, given that you only spawn these infinite resources when the original resource is depleted. Surely adding that resource to the exclusion list means that deletion is what you want to happen anyway?
by PFQNiet
Fri Dec 17, 2021 7:36 am
Forum: Modding interface requests
Topic: Linked pipes
Replies: 6
Views: 782

Re: Linked pipes

I'd like to +1 this request. My use case will be threefold: 1. De-cheese the flow of fluids through underground pipes by linking it to another surface where the appropriate number of normal pipes are lined up for the fluid to flow through. 2. Allow underground pipes of arbitrary length. 3. Allow wea...
by PFQNiet
Wed Dec 08, 2021 8:36 am
Forum: Modding help
Topic: [Scripting Assistance] Help identifying mining drill functions
Replies: 10
Views: 641

Re: [Scripting Assistance] Help identifying mining drill functions

This function gives you "local drill = event.entity", which is the mining drill that was depleted. You will have to check here that it's indeed a mining drill though, and not a pumpjack for example. You could do this by simply "if event.entity.type ~= "mining-drill" then re...
by PFQNiet
Thu Dec 02, 2021 7:06 pm
Forum: Modding help
Topic: Lua command to place ghost landfill?
Replies: 3
Views: 162

Re: Lua command to place ghost landfill?

You'd need to create a "tile-ghost" entity for each tile.
by PFQNiet
Fri Nov 26, 2021 8:26 am
Forum: Modding help
Topic: Can't access spidertron equipment grid with console?
Replies: 2
Views: 181

Re: Can't access spidertron equipment grid with console?

entity.grid gives you the equipment grid that you can then manipulate.
by PFQNiet
Fri Nov 26, 2021 8:21 am
Forum: Modding help
Topic: Teach compilatron to avoid fires
Replies: 3
Views: 251

Re: Teach compilatron to avoid fires

If all else fails, take the lazy option and give the entity 100% fire resistance ;)
by PFQNiet
Sun Nov 07, 2021 2:12 am
Forum: Modding help
Topic: Make machine only work during day time
Replies: 8
Views: 419

Re: Make machine only work during day time

Can you name a time when "hours >= 4 or hours <= 22" won't be true?

Just replace that entire second "if" line with the single word "else".
by PFQNiet
Sat Nov 06, 2021 2:21 pm
Forum: Implemented mod requests
Topic: LuaPlayer.map_visibility :: boolean
Replies: 7
Views: 593

Re: LuaPlayer.map_visibility :: boolean

Can't you use defines.controllers.spectator?
by PFQNiet
Thu Oct 21, 2021 1:17 pm
Forum: Modding help
Topic: Possible to Create TrainStop-type Name Input for Linked-Containers?
Replies: 10
Views: 456

Re: Possible to Create TrainStop-type Name Input for Linked-Containers?

As for "using that name to set the link ID", you could make use of a hashing function. For example, CRC32 would give you a 32-bit number for any given string. The downside is that collisions may occur if two different names happen to yield the same hash.
by PFQNiet
Sat Oct 16, 2021 12:04 pm
Forum: Won't implement
Topic: add train_stop_id argument to LuaTrain::go_to_station()
Replies: 16
Views: 1035

Re: add train_stop_id argument to LuaTrain::go_to_station()

Having only ever built one-way rail systems, I didn't realise that temporary stops could be two-directional. The fix by boskid does indeed resolve the issues with the solution I put forward.
by PFQNiet
Thu Oct 14, 2021 3:18 pm
Forum: Won't implement
Topic: add train_stop_id argument to LuaTrain::go_to_station()
Replies: 16
Views: 1035

Re: add train_stop_id argument to LuaTrain::go_to_station()

LTN achieves this by creating a temporary stop in the train schedule, right on top of the desired real train stop. The train paths to the temporary stop, then looks for a station with the given name and finds "oh hey I'm already there, what a coincidence!"
by PFQNiet
Tue Oct 12, 2021 1:52 am
Forum: Resolved Problems and Bugs
Topic: [1.1.42] Selecting a wall ghost draws a solid interior
Replies: 2
Views: 838

[1.1.42] Selecting a wall ghost draws a solid interior

Steps to reproduce:
- Place four wall ghosts in a square
- Move (empty) mouse cursor over the ghost walls

Observed behaviour: three out of the four walls, when hovered, will make the interior "filling" of the wall be drawn solid, not ghosty.
by PFQNiet
Fri Sep 24, 2021 10:54 pm
Forum: Modding interface requests
Topic: Don't let robots take only-in-cursor items
Replies: 1
Views: 304

Don't let robots take only-in-cursor items

This is very much a "me" problem but I have an issue and this is a solution I have come up with that doesn't involve tons of Lua. My mod includes a "build gun" feature, where instead of crafting buildings you can just place them and the necessary materials are taken directly from...
by PFQNiet
Mon Sep 13, 2021 4:01 pm
Forum: Modding interface requests
Topic: spill_item_stack() causes heavy lag
Replies: 4
Views: 314

Re: spill_item_stack() causes heavy lag

A `spill_inventory()` function would be nice. Among other uses, it could take the temporary LuaInventory buffer from a `player_mined_entity` event and spill that.

Go to advanced search