#Updated belts, they now work with

1 messages · Page 1 of 1 (latest)

earnest idol
#

What about performance? Usually belts that require electricity are bad for UPS.

gusty edge
#

they dont update every tick

#

u can visually see it too

#

but i do have an idea for preformance so

#

i think i can make it run smoothly

earnest idol
#

I guess you've made different prototypes for each possible speed value?

gusty edge
#

theres no real other way to do it from whta i can tell

earnest idol
#

That's like 107 prototype copies if you want scaling up to 200 i/s, it's far from limit

gusty edge
gusty edge
earnest idol
#

You can even add a research, that will increase max belt speed available

#

Like, you start with 30 i/s max and increase it with research

gusty edge
gusty edge
earnest idol
#

I have 7.5 i/s for first belt in my overhaul 🙂

rough lagoon
#

other powered blet mods, have high UPS usage, you dont need to check the belts every Nth tick?

gusty edge
#

I split up the usage of all the belts across multiple ticks

gusty edge
#

“0.001 items per second”

earnest idol
#

According to docs speed should be multiplier of 1.875 i/s. Otherwise I think it rounds?

gusty edge
#

Hmm interesting

earnest idol
#

So you probably should make speed scaling with this step

gusty edge
#

Yeah but like

#

Looks weird

gusty edge
earnest idol
#

You can get displayed speed that don't get divided by this number, but real speed will be wrong, compared to tooltip

earnest idol
#

Like user writes 8 i/s, you convert it to 7.5

gusty edge
#

😔

#

Ig yeah

earnest idol
#

Or round it up, I dunno

gusty edge
#

Still is sad but

#

What can u do lol

earnest idol
#

I guess your belts consume energy constantly? Do you spawn hidden entity under each belt for energy consumption or just calculate it runtime for EEI?

gusty edge
#

They have actual “motors”

earnest idol
#

What did you use as prototype for them? Lamps?

#

I guess lamp won't work

gusty edge
#

all i did was this and it worked

#
local belt_power = {
    type = "electric-energy-interface",
    name = "ddos-belt-power-interface",
    icon = "__base__/graphics/icons/accumulator.png",
    icon_size = 64,
    flags = {"not-on-map", "placeable-off-grid", "player-creation"},
    collision_box = nil,
    selection_box = nil,
    collision_mask = {layers={}},
    selectable_in_game = false,
    energy_source = {
        type = "electric",
        buffer_capacity = "1MJ",
        usage_priority = "secondary-input",
        input_flow_limit = "100MW",
        output_flow_limit = "0W"
    }
}
data:extend({belt_power})
#

just an interface

earnest idol
#

AFAIK EEI is bad for performance. I heard that constant combinators have almost zero cost

#

Hmm, it doesn't have energy source

#

51k EEI cost about 2.5ms for me
Lamps doesn't show up in entity time usage, but with 51k of them my total update time was 0.3ms

gusty edge
#

cc or lamps lol

#

make the belts glow 🙏

earnest idol
#

Try lamps with always_on, and disabled anything related to glow or light

gusty edge
#

oh dam thats peak

gusty edge
#

ok seems like idid