Page 1 of 1

[Resolved]Sprite not being loaded in tech tree

Posted: Mon Apr 11, 2016 7:24 pm
by simwir
So I'm creating a mod where i want to add a research to the tech tree, but when i do the box where the sprite is supposed to be just remains empty. I've tried both the resolution that the normal games sprites are in and the one the tutorial on the wiki is in, but neither work.

In game it looks like this:
Image

The code in the prototype file like this:

Code: Select all

data:extend({
    {
        type = "technology",
        name = "shuttleTrain_tech",
        icon = "__ShuttleTrain__/graphics/icon_shuttleTrain_tech.png",
        effects = 
        {
            {
                type = "unlock-recipe",
                recipe = "shuttleTrain"
            }
        },    
        prerequisites = {"automated-rail-transportation"},
        unit =
        {
          count = 70,
          ingredients =
          {
            {"science-pack-1", 2},
            {"science-pack-2", 1},
          },
          time = 20
        }
    },
})
If you need more information the repository for the mod is here or you can just ask :)
Hope any of you can help me with this seemingly easy problem.

Re: Sprite not being loaded in tech tree

Posted: Mon Apr 11, 2016 9:48 pm
by Adil
Have you tried 32x32 icons?
Unless specified otherwise game draws those pixels. All vanilla techs now have

Code: Select all

icon_size = 128,
to declare their hi-res quality.

Re: Sprite not being loaded in tech tree

Posted: Tue Apr 12, 2016 3:40 pm
by simwir
Thank you so much that was what was needed. I knew the answer would be simple :D