"Sprite too large"?
"Sprite too large"?
Some people - notably those playing on lower graphics settings - are getting this error with my mods. I can have low-resolution fallbacks as necessary, or an hr-version (though I do not think most entity types support that explicitly). However, how can I check that the sprite would be too large, or check the settings that determine that? Can I see a user's graphical settings during the data load phase?
Re: "Sprite too large"?
you can test the low resolution stuff by switching your graphics settings for Sprite resolution from high to low or if you have the Atlas size at 2048 or less.
I don't know how to check for graphics settings but I was able to solve it by defining an hr_version
I don't know how to check for graphics settings but I was able to solve it by defining an hr_version
Code: Select all
local radarOverlay = util.table.deepcopy(radar)
radarOverlay.name = "item-collector-base-overlay-rampant"
radarOverlay.pictures.filename = "__Rampant__/graphics/entities/chest/itemCollectorOverlay2.png"
radarOverlay.pictures.width = 2048
radarOverlay.pictures.height = 2048
radarOverlay.pictures.direction_count = 1
radarOverlay.pictures.line_length = 1
radarOverlay.pictures.shift[2] = 0.07
radarOverlay.pictures.hr_version = {
filename = "__Rampant__/graphics/entities/chest/itemCollectorOverlay2.5.png",
priority = "low",
width = 3200,
height = 3200,
apply_projection = false,
direction_count = 1,
line_length = 1,
shift = {0.1875, -0.24}
}
Re: "Sprite too large"?
Not all entities support hr versions.Veden wrote:you can test the low resolution stuff by switching your graphics settings for Sprite resolution from high to low or if you have the Atlas size at 2048 or less.
I don't know how to check for graphics settings but I was able to solve it by defining an hr_version
Code: Select all
local radarOverlay = util.table.deepcopy(radar) radarOverlay.name = "item-collector-base-overlay-rampant" radarOverlay.pictures.filename = "__Rampant__/graphics/entities/chest/itemCollectorOverlay2.png" radarOverlay.pictures.width = 2048 radarOverlay.pictures.height = 2048 radarOverlay.pictures.direction_count = 1 radarOverlay.pictures.line_length = 1 radarOverlay.pictures.shift[2] = 0.07 radarOverlay.pictures.hr_version = { filename = "__Rampant__/graphics/entities/chest/itemCollectorOverlay2.5.png", priority = "low", width = 3200, height = 3200, apply_projection = false, direction_count = 1, line_length = 1, shift = {0.1875, -0.24} }
Again, is it possible to fetch user graphics settings?
Re: "Sprite too large"?
Normal resolution supports images up to 2048 x 2048 px.
High resolution supports images up to 4096 x 4096 px.
It is not about users. It is Factorio's limit.
High resolution supports images up to 4096 x 4096 px.
It is not about users. It is Factorio's limit.
Re: "Sprite too large"?
Yes, but how can I know which the user has selected? I do not get the errors, and others have resolved them by simply raising their graphics settings.Mooncat wrote:Normal resolution supports images up to 2048 x 2048 px.
High resolution supports images up to 4096 x 4096 px.
It is not about users. It is Factorio's limit.
Re: "Sprite too large"?
Also, the error is being thrown for images much less than 2048 pixels on a side.
Re: "Sprite too large"?
Ah, I should correct the statements. The limits are applied on any side of the image.
"Normal resolution supports images up to 2048px on any side.
High resolution supports images up to 4096px on any side."
In the entities that support HR images, there should be something like
Outside hr_version, you should use normal resolution images. So, in this case, a.png is NR, b.png is HR.
Only a.png is loaded when the user uses "normal" or lower graphic quality, and only b.png is loaded when user uses "high" graphic quality.
"Normal resolution supports images up to 2048px on any side.
High resolution supports images up to 4096px on any side."
In the entities that support HR images, there should be something like
Code: Select all
filename = "__mod__/graphics/a.png",
hr_version =
{
filename = "__mod__/graphics/b.png",
...
}
Only a.png is loaded when the user uses "normal" or lower graphic quality, and only b.png is loaded when user uses "high" graphic quality.
Re: "Sprite too large"?
Again, the users are getting the error with images that are like 1600x700. And what do I do for entities that do not support hr, such as smoke - which as it happens, all my problem entities are?Mooncat wrote:Ah, I should correct the statements. The limits are applied on any side of the image.
"Normal resolution supports images up to 2048px on any side.
High resolution supports images up to 4096px on any side."
In the entities that support HR images, there should be something likeOutside hr_version, you should use normal resolution images. So, in this case, a.png is NR, b.png is HR.Code: Select all
filename = "__mod__/graphics/a.png", hr_version = { filename = "__mod__/graphics/b.png", ... }
Only a.png is loaded when the user uses "normal" or lower graphic quality, and only b.png is loaded when user uses "high" graphic quality.
Re: "Sprite too large"?
Have no idea what's going on there. Probably need to ask a dev. Log file will help.Reika wrote:Again, the users are getting the error with images that are like 1600x700.
Simply don't supply HR images. The hr_version attribute is an option for the users who can load HR images. But for those who can't, maybe due to graphic card limitation, the hr_version attribute will be ignored, and the image outside hr_version will be loaded instead. So you should only provide NR images there. If hr_version is not supported, treat it as "this object doesn't have HR images".Reika wrote:And what do I do for entities that do not support hr, such as smoke - which as it happens, all my problem entities are?
Re: "Sprite too large"?
I am not willing to have a sprite whose frames are like 100x200 when the object it is for is 40 tiles wide.Mooncat wrote:Reika wrote: Simply don't supply HR images. The hr_version attribute is an option for the users who can load HR images. But for those who can't, maybe due to graphic card limitation, the hr_version attribute will be ignored, and the image outside hr_version will be loaded instead. So you should only provide NR images there. If hr_version is not supported, treat it as "this object doesn't have HR images".
Re: "Sprite too large"?
There is no other way to overcome this limit AFAIK. You should make a request for supporting separated spritesheets.Reika wrote:I am not willing to have a sprite whose frames are like 100x200 when the object it is for is 40 tiles wide.Mooncat wrote:Reika wrote: Simply don't supply HR images. The hr_version attribute is an option for the users who can load HR images. But for those who can't, maybe due to graphic card limitation, the hr_version attribute will be ignored, and the image outside hr_version will be loaded instead. So you should only provide NR images there. If hr_version is not supported, treat it as "this object doesn't have HR images".
Currently, there is "stripes" for entities that have directions, e.g. robots, turrets, units, car, tank, and even spawners. But it didn't work on non-directional entities.
Good luck.