[Resolved]Sprite not being loaded in tech tree

Place to get help with not working mods / modding interface.
Post Reply
simwir
Inserter
Inserter
Posts: 23
Joined: Wed Mar 16, 2016 7:24 pm
Contact:

[Resolved]Sprite not being loaded in tech tree

Post 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.
Last edited by simwir on Tue Apr 12, 2016 3:40 pm, edited 1 time in total.

User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

Re: Sprite not being loaded in tech tree

Post 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.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.

simwir
Inserter
Inserter
Posts: 23
Joined: Wed Mar 16, 2016 7:24 pm
Contact:

Re: Sprite not being loaded in tech tree

Post by simwir »

Thank you so much that was what was needed. I knew the answer would be simple :D

Post Reply

Return to “Modding help”