[Solved] Support for tier 4 module graphics in beacons

Things that already exist in the current mod API
thesixthroc
Fast Inserter
Fast Inserter
Posts: 125
Joined: Wed Apr 29, 2020 9:53 pm
Contact:

[Solved] Support for tier 4 module graphics in beacons

Post by thesixthroc »

Tserup and I wish to add graphical visualizations for tier 4 modules in the vanilla beacon, for the benefit of the Cerys and Frozeta mods. I tried using the following code, but it seems to have no effect. Could support for this be added?

Code: Select all

data.raw.beacon.beacon.graphics_set.module_visualisations[1].slots[1][1].pictures.filename =
	"__PlanetsLib__/graphics/entity/beacon/beacon-module-slot-1.png"
data.raw.beacon.beacon.graphics_set.module_visualisations[1].slots[1][1].pictures.line_length = 5
data.raw.beacon.beacon.graphics_set.module_visualisations[1].slots[1][1].pictures.variation_count = 5

data.raw.beacon.beacon.graphics_set.module_visualisations[1].slots[2][1].pictures.filename =
	"__PlanetsLib__/graphics/entity/beacon/beacon-module-slot-2.png"
data.raw.beacon.beacon.graphics_set.module_visualisations[1].slots[2][1].pictures.line_length = 5
data.raw.beacon.beacon.graphics_set.module_visualisations[1].slots[2][1].pictures.variation_count = 5
Attachments
beacon-module-slot-2.png
beacon-module-slot-2.png (11.21 KiB) Viewed 184 times
beacon-module-slot-1.png
beacon-module-slot-1.png (18.17 KiB) Viewed 184 times
Last edited by thesixthroc on Mon Nov 03, 2025 5:29 pm, edited 1 time in total.
Bilka
Factorio Staff
Factorio Staff
Posts: 3672
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Support for tier 4 module graphics in beacons

Post by Bilka »

From what I can see in the code this should already work. The variation of the sprite is picked based on the tier of the module. Are you sure that the tier is set correctly on the module prototype?
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
thesixthroc
Fast Inserter
Fast Inserter
Posts: 125
Joined: Wed Apr 29, 2020 9:53 pm
Contact:

Re: Support for tier 4 module graphics in beacons

Post by thesixthroc »

In the prototype explorer I verified that the module in the beacon has category=speed and tier=4, and that there is no other code affecting beacons.

To accompany this report I am attaching a draft version of PlanetsLib with the relevant code included in `data-updates.lua`, which reproduces this issue when loaded alongside Cerys in the attached save.
Attachments
beacon-tier-4-test.zip
(1.28 MiB) Downloaded 4 times
PlanetsLib_1.14.2.zip
(7.45 MiB) Downloaded 5 times
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 4276
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: Support for tier 4 module graphics in beacons

Post by boskid »

Everything on the engine side works correctly. There are additional sprites rendering on top from `beacon-module-mask-box-1.png` (slots[1][2]), `beacon-module-mask-lights-1.png` (slots[1][3]) and `beacon-module-lights-1.png` (slots[1][4]). If you temporarily comment those out you will see your tier-4 module sprites are rendered where they should be.
Post Reply

Return to “Already exists”