#Nonstandard Beacons - Factorio Mods

1 messages · Page 1 of 1 (latest)

fossil mural
#

Haha, funni beacons :3

cold igloo
#

:)

#

it really isn't a complicated mod, it just gets laggy at some point

fossil mural
#

Also, I'm guessing the beacons can use any fluid, not just steam?

cold igloo
#

steam is the example, it's just an energy_source prototype

#

you can technically run it on plasma if your heart desires

fossil mural
#

Speaking of which, could you also make it allow fluid beacons to output fluids too?

#

Like inputting plasma and outputting hot fluoroketone?

cold igloo
#

¯_(ツ)_/¯

#

probably

#

the 'energy source' is actually just a crafting machine

#

so probably

#

actually yea, i can just have it override the internal empty recipe with a custom fluid swapping recipe

#

i think i can just have an optional 'recipe_definitions' value that, if set, overrides the hidden one and can also define fluidboxes and the like

#

@weary mortar i dont have a puppy so have a box qat

jagged pulsar
#

awwwww

worn pasture
#

wait, why did the devs say they wouldn't implement this?

jagged pulsar
#

optimisation reasons

cold igloo
#

i mean yeah sure theyre gonna be intense but... it makes more sense to let modders decide if they use the UPS intensive stuff or just go with basic beacons

#

cause if they really want burner beacons they'll do burner beacons. see exhibit A above

wide scaffold
#

something tells me you could do it without any scripting

#

is there any way to turn heat directly into electricity

cold igloo
#

you need scripting

#

there's no way to make sure that an entity only connects to a specific power network

#

UPDATE got the update time down to ~1.6ms with 400 beacons

wide scaffold
#

hm

#

irritating

#

you could turn down the check frequency a lot though

#

dont know how you've done it internally but you could set it up in such a way that you only check once every few seconds

cold igloo
#

probably but id rather focus on trying to get the update time down instead of just 'have it do things less often'

weary mortar
#

what exactly does it currently do when it checks a beacon?

cold igloo
#

er wait not that one

#

iterates over every entity. if the beacon is on and the assembler is off, then change the beacon to off. if the beacon is off and the assembler is on, switch it to on

wide scaffold
#

i would do it where you have an assembling machine producing some hidden fluid

cold igloo
#

you can't have the beacon run on fluid. hence this mod.

jagged pulsar
#

they are locked to electricity and void

wide scaffold
#

you know how much fluid it should be producing per time period

jagged pulsar
#

same with roboports

weary mortar
#

try saving which status you've last set on the entity object, writing 2 things to the factorio api has overheid

wide scaffold
#

if the output fluidbox has enough fluid for a time period, remove that much fluid and turn the beacon on

#

if it doesn't, don't remove any fluid and turn the beacon off

cold igloo
jagged pulsar
#

check frequency is a setting, right?

cold igloo
weary mortar
wide scaffold
cold igloo
cold igloo
#

math is not accurate at those scales

jagged pulsar
cold igloo
#

and that doesn't work for heat or burner powered items

wide scaffold
#

but if you want your beacon to consume (say) 1MW of heat, then it will consume 1MJ of heat for every second it operates

wide scaffold
#

you can have heat and burner powered assemblers

cold igloo
#

no? you can't do burner that way

jagged pulsar
#

burner would still just have to check if the assembler is on or off

cold igloo
#

yup

#

my original solution was to have an infinity pipe/heat interface but the 'power draw' simulation was too innacurate to be reliable

wide scaffold
#

you have a beacon

#

which draws 0W of electrical energy

#

you have an assembling machine

#

which draws 1MW of [whatever] energy and is set to produce 1 beacon juice per second

cold igloo
weary mortar
#

they are

jagged pulsar
#

but that requires more entities?

wide scaffold
#

if there's more than 1, remove 1 and turn the beacon on

#

if there isn't, don't remove anything and turn the beacon off

jagged pulsar
#

that seems like way more then just doing "is this thing on? sure, turn x on"

wide scaffold
#

you can change the power draw of the beacon using consumption_modifier

cold igloo
#

edge case, the beacon 'lost power' partway through and only produced half a juice. but it was on for half the time

wide scaffold
#

there's no edge cases where the beacon runs when it shouldnt or doesnt run when it should

cold igloo
#

okay then when you underclock the beaocn it'll flicker on for one whole second every 20 or something

wide scaffold
#

or rather, there's no edge cases where you get more or less beacon uptime than you paid for

cold igloo
#

instead of flicking on and off more rapidly like it should especially considering it's power draw is doing that

jagged pulsar
#

i just dont see how that'd be simpler then whats currently been implemented

wide scaffold
#

it wouldn't be simpler

#

it would be more correct

jagged pulsar
#

i'd rather something run fast then run correct

cold igloo
#

how is it more correct?

wide scaffold
#

this would also (theoretically) be faster

cold igloo
#

its even less accurate

wide scaffold
#

because you can turn the check frequency down arbitrarily low

wide scaffold
#

in the 1MW case, each second of beacon uptime costs 1MJ of energy

cold igloo
#

maybe 'accurate' but there's a clock_length delay between what it 'detects' and the actual result

fossil mural
#

I'm just wondering, how do the beacons work at different temperatures?

wide scaffold
#

same way any other heat energy source works i expect

jagged pulsar
#

unless its a multi-second delay in turning on/off, i dont think people would care

wide scaffold
#

ie. it works above minimum temperature

#

and doesn't work below minimum temperature

cold igloo
#

yup. nothing fancy

jagged pulsar
#

yeah, i imagine it doesnt take temp into account apart from a base requirement

wide scaffold
#

changing power draw with temperature would be. uh.

jagged pulsar
#

hell

wide scaffold
#

detrimental to performance, let's say

jagged pulsar
#

slightly not opotmised, to put it lightly

cold igloo
cold igloo
#

quezler do you know of any? or is it more that API calls have some generic latency from being API calls and not about what they do

weary mortar
#

depending on your answer i have tricks

cold igloo
#

it's always 100% or 0%, there's no 'low power' state since there's no buffer for any of the energy sources i use

#

so just 100%

weary mortar
#

allright that makes it super easy then

cold igloo
#

figured out how to save the current state in storage, i'll see how performant that change is

weary mortar
#

connect a wire by script, set the working signal to W, have a hidden surface with an inserter that checks for W = 0, have an item on the ground and register that with script.register_on_object_destroyed, and when it triggers you'll know the assembling machine had an interuption

#

I've been pioneering this kind of circuit lua event tech

cold igloo
#

ohhhh 40% improvement in UPS

wide scaffold
#

this would all be so much simpler if we could connect electric networks with scripts

jagged pulsar
cold igloo
#

is the inserter jankery the best option for API calls based on signals?

weary mortar
weary mortar
cold igloo
#

i still set status and custom status every time

#

er well every 'change' from on to off or off to on

weary mortar
#

hmm

cold igloo
weary mortar
#

might i suggest instead of numbers to just

local BEACON = 1
local ASSEMBLER = 2
local LAST_STATUS = 3

cold igloo
#

that works too

weary mortar
#

makes it was easier to read along

worn pasture
cold igloo
#

wait... when i do that... i can have an update time of 0

#

i can just add them to a queue to enable/disable and just iterate over those queues

cold igloo
weary mortar
#

might have misunderstood

cold igloo
#

👍

#

which one of your mods did the inserter tricks?

weary mortar
fossil mural
#

well I don't think that should be there

weary mortar
#

ah yes the classic hide_from_player_crafting

#

i forget that one a lot myself as well

#

especially when using custom crafting categories the character doesn't jave

cold igloo
#

it shouldnt have an icon...

#

no matter, nothing you can do with that recipe

weary mortar
#

well it doesn't have an icon