Page 1 of 1

[15.35] auto-cropping of beam sprites makes them misalign

Posted: Thu Oct 05, 2017 5:22 pm
by Meppi
As discussed in this thread, the automatic cropping of beam sprites causes head, body and tail to misalign, due to changing the rotation center.

Re: [15.35] auto-cropping of beam sprites makes them misalign

Posted: Thu Oct 05, 2017 6:11 pm
by posila
Thanks for the report.
Use

Code: Select all

flags = { "no-crop" }
in the sprite/animation definition. See for example "defender-capsule"

Re: [15.35] auto-cropping of beam sprites makes them misalign

Posted: Thu Oct 05, 2017 6:45 pm
by Meppi
Ah thanks, the distractor-robots lightning beam uses the same workaround though. :)

Re: [15.35] auto-cropping of beam sprites makes them misalign

Posted: Fri Oct 06, 2017 6:58 am
by eradicator
It would be pretty awesome is this kind of barely-known flag and some off the other oddities of prototype definitions were as well documented as the rest of the http://lua-api.factorio.com/ . Google finds only one thread (another bug report) that even mentiones "no-crop" at all. :?

Re: [15.35] auto-cropping of beam sprites makes them misalign

Posted: Fri Oct 06, 2017 9:19 am
by Bilka
eradicator wrote:It would be pretty awesome is this kind of barely-known flag and some off the other oddities of prototype definitions were as well documented as the rest of the http://lua-api.factorio.com/ . Google finds only one thread (another bug report) that even mentiones "no-crop" at all. :?
That documentation is about the control stage, not the data stage, sadly. For a barebones documentation of the data stage (prototypes etc) see the wiki: https://wiki.factorio.com/Prototype_definitions . That's also where I'll add the flag. The prototpyes currently cannot be automatically documented from the game code, which is why there is no good documentation. I already annoyed Rseding by asking for it over and over :lol: