Page 1 of 1

How do you replace sprites with ones of higher resolution?

Posted: Tue Mar 29, 2016 2:48 pm
by CitizenJoe
For example: if i were to try and replace the spritesheet for the logistics robot with a completely different one that was double the resolution, how would I go about doing that?

Re: How do you replace sprites with ones of higher resolution?

Posted: Fri Apr 01, 2016 2:31 pm
by adaroe
the Waitex mod has the best example of how to override sprites, and would be a good place to start. Its a mod that adds hd textures to all the vaniila items/ entities in game.

Re: How do you replace sprites with ones of higher resolution?

Posted: Fri Apr 01, 2016 2:49 pm
by Arch666Angel
Crude method would be something like that:

Code: Select all

data.raw["entity"]["entityname"].animation={
filename = "__yourmod__/graphics/entity/entity/new-sprite.png",
priority = "extra-high",
width = 256,
height = 256,
scale = 0.5,
frame_count = 1,
},
You need to figure out what scale factor you need if you use higher res sprites.

Re: How do you replace sprites with ones of higher resolution?

Posted: Fri Apr 01, 2016 2:53 pm
by Klonan
Yep using scale on the sprite definition is the best way,
At scale = 1 (aka default if you dont define it) than each pixel is a single pixel at zoom level 1 (press f9)
At scale 0.5, its essentially double the resolution

Re: How do you replace sprites with ones of higher resolution?

Posted: Fri Apr 01, 2016 5:31 pm
by orzelek
Klonan wrote:Yep using scale on the sprite definition is the best way,
At scale = 1 (aka default if you dont define it) than each pixel is a single pixel at zoom level 1 (press f9)
At scale 0.5, its essentially double the resolution
Could you investigate if it's possible that scale is used on one axis not on the other?

I tried to fix inserters in WaiTex at some point and it seemed that scaling was off on arm of inserter. It looked to stretched in one axis or disconnected on other depending on scale factor used.