Open sparr opened 7 years ago
https://gist.github.com/sparr/c90a9a0af52176f3ec4835497cb440f6
Python script to read in the core and base mods and then iterate through data.raw to find all the entities.
Obviously needs restructuring to be part of a library. And a lot more logic to assemble a rendered screenshot.
Here's my initial research into where entity images are identified:
entity.pictures.filename
entity.pictures.hr_version.filename
entity.pictures[0|1].filename
entity.pictures[0|1].hr_version.filename
entity.pictures["up"].filename
entity.pictures["up"].hr_version.filename
entity.pictures["single"|"corner"|etc].layers[*].filename
entity.animations.filename
entity.animations.hr_version.filename
entity.animations[0|1|...].filename
entity.animations[0|1|...].idle|running|.filename
entity.animation.layers[*].filename
entity.animation.layers[*].hr_version.filename
entity.animation.layers[*].stripes[*].filename
entity.animation.layers[*].stripes[*].hr_version.filename
# vehicles
entity.turret_animation
# gates
entity.vertical_animation
entity.horiztontal_base
entity.horizontal_rail_animation_left
...
every .filename above has (or might have) a matching width, height, offset, scale, etc.
This issue is really a disguise for a much much bigger feature request.
On reddit we commented about this mod needing a new name because it only handles blueprints. Let's fix that, but not by changing the name.
What I want: render a blueprint as an image.
What it will take to accomplish that: ...
A library that can do those things would be worthy of being called "python-factorio".
Are you interested in pursuing parts of that?