Page 1 of 1
[0.16.51] Some vanilla sprite images are 'Unknown'
Posted: Wed Sep 26, 2018 9:59 pm
by mophydeen
You can call this:
Code: Select all
player.gui.top["auto-trash-toggle-button"].sprite = "utility/trash_bin"
player.gui.top["auto-trash-toggle-button"].sprite = "technology/rocket-silo"
But not this:
Code: Select all
player.gui.top["auto-trash-toggle-button"].sprite = "technology/character-auto-logistic-trash-slots"
Error while running event level::on_player_joined_game (ID 43)
Unknown sprite "technology/character-logistic-trash-slots"
Re: [0.16.51] Some vanilla sprite images are 'Unknown'
Posted: Wed Sep 26, 2018 10:10 pm
by Bilka
Moved to modding help. Please stop (ab)using the bug report subforum to get modding help.
Re: [0.16.51] Some vanilla sprite images are 'Unknown'
Posted: Wed Sep 26, 2018 10:15 pm
by mophydeen
Bilka wrote: Wed Sep 26, 2018 10:10 pm
Moved to modding help. Please stop abusing the bug report subforum to get fast modding help. Moved to modding help.
It's a bug because it won't call it.
There
I've tested 20+ images, with - and _ from achievements , technology etc. They work.
character-logistic-slots, character-auto-logistic-trash-slots and character-logistic-trash-slots don't.
Re: [0.16.51] Some vanilla sprite images are 'Unknown'
Posted: Wed Sep 26, 2018 10:21 pm
by Bilka
mophydeen wrote: Wed Sep 26, 2018 10:15 pm
character-logistic-slots, character-auto-logistic-trash-slots and character-logistic-trash-slots don't.
Nothing of the behavior that you describe is a bug in the game: None of those 3 strings are names of vanilla technologies, so it's correct that it throws an error.
In general, when something does not work in scripting, assume that it's your fault (post in modding help) before assuming it's the game's fault (posting in bug reports).
Re: [0.16.51] Some vanilla sprite images are 'Unknown'
Posted: Wed Sep 26, 2018 10:25 pm
by mophydeen
It's in the same location as files that are called with technology/
Factorio/data/base/graphics/technology/
as such on can expect it works the same.
Re: [0.16.51] Some vanilla sprite images are 'Unknown'
Posted: Wed Sep 26, 2018 10:27 pm
by mophydeen
Maybe I'm just putting too much of my time debugging your code, reporting bugs and making suggestions.
Re: [0.16.51] Some vanilla sprite images are 'Unknown'
Posted: Wed Sep 26, 2018 10:31 pm
by Bilka
You are certainly putting too much time into expecting things to work a certain way instead of reading the documentation that states how it works:
https://lua-api.factorio.com/latest/Con ... SpritePath
Re: [0.16.51] Some vanilla sprite images are 'Unknown'
Posted: Thu Sep 27, 2018 8:42 am
by bobingabout
mophydeen wrote: Wed Sep 26, 2018 9:59 pm
But not this:
Code: Select all
player.gui.top["auto-trash-toggle-button"].sprite = "technology/character-auto-logistic-trash-slots"
are you sure it's not supposed to be this?
Code: Select all
player.gui.top["auto-trash-toggle-button"].sprite = "technology/character-auto-logistic-trash-slots-1"
if I'm right(I might not be, I didn't even look at the game's code), then Bilka is right, and you need modding help, and it's not a game bug.
Re: [0.16.51] Some vanilla sprite images are 'Unknown'
Posted: Thu Sep 27, 2018 10:56 am
by eradicator
Let's look at the prototypes:
Code: Select all
type = "technology",
name = "auto-character-logistic-trash-slots",
icon_size = 128,
icon = "__base__/graphics/technology/character-auto-logistic-trash-slots.png",
The file name is "character-auto", but the technology is "auto-character". GUI sprite paths are determined by the name of the prototype, they are not affected by file names.
Re: [0.16.51] Some vanilla sprite images are 'Unknown'
Posted: Fri Sep 28, 2018 8:03 am
by bobingabout
bobingabout wrote: Thu Sep 27, 2018 8:42 am
if I'm right(I might not be, I didn't even look at the game's code), then Bilka is right, and you need modding help, and it's not a game bug.
eradicator wrote: Thu Sep 27, 2018 10:56 am
Let's look at the prototypes:
Code: Select all
type = "technology",
name = "auto-character-logistic-trash-slots",
icon_size = 128,
icon = "__base__/graphics/technology/character-auto-logistic-trash-slots.png",
The file name is "character-auto", but the technology is "auto-character". GUI sprite paths are determined by the name of the prototype, they are not affected by file names.
I'm wrong and right at the same time, Bilka is right.
should be:
Code: Select all
player.gui.top["auto-trash-toggle-button"].sprite = "technology/auto-character-logistic-trash-slots"