SC2Mapster Forums

Resources > Tutorials

[Texture] How to change resource icon

    #1 Nov 17, 2010 at 01:23 UTC - 1 like

    Information: First of all, I have to admit that my English is not the best so hope you guys are blind enough to miss the mistakes.
    The reason why I'm writing this tutorial is rather simple: I nearly killed myself, trying to change the resource icon since nearly no one knows how to change them. Even in the German forums nobody knew it, but we have to admit that blizzard failed at forgetting the implementation in the data editor.

    How do we change the Icon?-
    Since the Data-Editor doesn't have to feature to change the resource icons, we have to use workarounds (what this tutorial is about).

    There are two ways to change the resource icon:-
    1. We change the file-paths our game searches for.
    2. We import our new icons and replace the old ones by using the same file-path.

    Lets forget the second way since it doesn't work probably.

    How to change the file-paths our game searches for?-
    We have to create a new text-file with the name "Assets"
    What is this text-file about?
    It saves the file-paths our game searches for, when creating the UI-icons in the game.

    Small list of known UI-Textures:-
    UI/ResourceIconEnergy=Assets\Textures\icon-energy-terran.dds
    UI/ResourceIconEnergy_Prot=Assets\Textures\icon-energy-protoss.dds
    UI/ResourceIconEnergy_Terr=Assets\Textures\icon-energy-terran.dds
    UI/ResourceIconEnergy_Zerg=Assets\Textures\icon-energy-zerg.dds
    UI/ResourceIconLife=Assets\Textures\icon-health-terran.dds
    UI/ResourceIconLife_Prot=Assets\Textures\icon-health-protoss.dds
    UI/ResourceIconLife_Terr=Assets\Textures\icon-health-terran.dds
    UI/ResourceIconLife_Zerg=Assets\Textures\icon-health-zerg.dds
    UI/ResourceIconShields=Assets\Textures\icon-shields.dds
    UI/ResourceIconSupply=Assets\Textures\icon-supply-terran.dds
    UI/ResourceIconSupply_Prot=Assets\Textures\icon-supply-protoss.dds
    UI/ResourceIconSupply_Terr=Assets\Textures\icon-supply-terran.dds
    UI/ResourceIconSupply_Zerg=Assets\Textures\icon-supply-zerg.dds
    UI/ResourceIconTime=Assets\Textures\icon-time-terran.dds
    UI/ResourceIconTime_Terr=Assets\Textures\icon-time-terran.dds
    UI/ResourceIconTime_Prot=Assets\Textures\icon-time-protoss.dds
    UI/ResourceIconTime_Zerg=Assets\Textures\icon-time-zerg.dds
    UI/ResourceIcon0=Assets\Textures\icon-mineral-terran.dds
    UI/ResourceIcon0_Prot=Assets\Textures\icon-mineral-protoss.dds
    UI/ResourceIcon0_Terr=Assets\Textures\icon-mineral-terran.dds
    UI/ResourceIcon0_Zerg=Assets\Textures\icon-mineral-zerg.dds
    UI/ResourceIcon1=Assets\Textures\icon-gas-terran.dds
    UI/ResourceIcon1_Prot=Assets\Textures\icon-gas-protoss.dds
    UI/ResourceIcon1_Terr=Assets\Textures\icon-gas-terran.dds
    UI/ResourceIcon1_Zerg=Assets\Textures\icon-gas-zerg.dds
    UI/ResourceIcon2=Assets\Textures\icon-energy-terran.dds
    UI/ResourceIcon2_Prot=Assets\Textures\icon-energy-protoss.dds
    UI/ResourceIcon2_Terr=Assets\Textures\icon-energy-terran.dds
    UI/ResourceIcon2_Zerg=Assets\Textures\icon-energy-zerg.dds
    UI/ResourceIcon3=Assets\Textures\icon-health-terran.dds
    UI/ResourceIcon3_Prot=Assets\Textures\icon-health-protoss.dds
    UI/ResourceIcon3_Terr=Assets\Textures\icon-health-terran.dds
    UI/ResourceIcon3_Zerg=Assets\Textures\icon-health-zerg.dds

    Default Starcraft2 "Assets.txt" can be found in "patch.sc2archive/mods/liberty.sc2mod/base.sc2data/GameData/Assets.txt"
    You can open .sc2archive files using any MPQ editor.

    But since I don't want to change all of these textures I picked three of them (Mineral, Gas, Supply): UI/ResourceIconSupply_Prot=Assets\Textures\icon-supply-protoss.dds
    UI/ResourceIconSupply_Terr=Assets\Textures\icon-supply-terran.dds
    UI/ResourceIconSupply_Zerg=Assets\Textures\icon-supply-zerg.dds
    UI/ResourceIcon0_Prot=Assets\Textures\icon-mineral-protoss.dds
    UI/ResourceIcon0_Terr=Assets\Textures\icon-mineral-terran.dds
    UI/ResourceIcon0_Zerg=Assets\Textures\icon-mineral-zerg.dds
    UI/ResourceIcon1_Prot=Assets\Textures\icon-gas-protoss.dds
    UI/ResourceIcon1_Terr=Assets\Textures\icon-gas-terran.dds
    UI/ResourceIcon1_Zerg=Assets\Textures\icon-gas-zerg.dds

    As you can see, we have three paths for Minerals, three paths for Gas and three paths for supply.
    Three for each race.

    Now that we chose our 9 paths (3 resources), we have to modify the path so that we can use custom textures (icons) on them:
    For example (mineral):

    Original file-path:-
    UI/ResourceIcon0_Prot=Assets\Textures\icon-mineral-protoss.dds
    UI/ResourceIcon0_Terr=Assets\Textures\icon-mineral-terran.dds
    UI/ResourceIcon0_Zerg=Assets\Textures\icon-mineral-zerg.dds

    Our file-path (custom):-
    UI/ResourceIcon0_Prot=Assets\Textures\icon-custommineralicon-protoss.dds
    UI/ResourceIcon0_Terr=Assets\Textures\icon-custommineralicon-terran.dds
    UI/ResourceIcon0_Zerg=Assets\Textures\icon-custommineralicon-zerg.dds

    As you can see, we add a "custom" in front of the word "mineralicon".
    We do the same with all other texture-paths we want to change.
    Now we add these four lines that we just created to our "Assets.txt".

    Basically it should look like this: http://img530.imageshack.us/img530/2038/1assets.jpg

    When you are finished with creating a list of file-paths you want to change, than just save and close it.

    Our next step is to import our "Assets.txt".
    For that, we use our import manager and import the file with the file-path:
    "Base.SC2Data\GameData\" as I marked with the red frame.
    http://img190.imageshack.us/img190/4263/2assetsimport.jpg

    Now that we changed the paths our game searches for, we have to chose which icon we want to use.
    I chose a lumber-icon for my new mineral symbol (left).
    We have to dublicate this icon now three times and rename it matching for the three races (right).
    http://img441.imageshack.us/img441/4503/3icons.jpg

    After we finished creating our three icons, we have to import them with the right paths.
    The paths we chose to import our icons is:
    "Base.SC2Data\Assets\Textures\" as I marked with the red frame.

    Imported it should look like this: http://img295.imageshack.us/img295/6245/4iconsimport.jpg

    So what we basically did was to say our game via Asset.txt that the mineral icon is not on place a but instead it is at place b.
    Hope the tutorial was clear enough for you.
    And yeah its so fucking complicated just to change the resource icons.
    Special thanks to Blizzard at this point.

    It looks ingame like this: http://img264.imageshack.us/img264/9998/5ingame.jpg

    The big thanks goes to A1win, Helral and some other guys who published this workaround and helped me with it.

    -h34dl4g

    Last edited Nov 18, 2010 by h34dl4g
    Name Description Size MD5
    Tutorial.SC2Map Tutorial Map 215.7 KiB a5012dae038c...
    #2 Nov 17, 2010 at 02:05 UTC - 0 likes

    Thanks for writing the tutorials. Just want to add in the possibility of replacing any of the game's texture by this same method.

    #3 Dec 01, 2010 at 09:03 UTC - 0 likes

    I ask the author of this tutorial how to change the tooltip too. this is his answer:

    Quote from h34dl4g: Go

    Yeah, I found a way but it wasn't that easy

    Let me explain it as easy as I can:

    1. Click on the top frame at "Module" 2. Click at the Module section at "Text" (Or just press F8) 3. Select at Data-Source at "all" 4. Now you look "only" for the ID in the list. The ID for the resources is: UI/Resource.... (Bottom of the list) First there will be the resource names after that there will be the tool-tips listed, you can change them on the right side.

    #4 Dec 06, 2010 at 02:21 UTC - 0 likes

    Thanks, I just wanted to add this but you did it for me days ago :p

    -h34dl4g

    #5 Jan 06, 2011 at 17:47 UTC - 0 likes

    @h34dl4g: Go

    Is it possible to create another mineral type to have its own icon in top left like that? To rearrange the position of mins/gas/supply and add one more mineral type?...

    Maybe this question shouldn't be in texture category, since this topic is about an icon replacement, but I thought I might still ask.

    Last edited Jan 06, 2011 by Argutaris
    #6 Jan 06, 2011 at 18:08 UTC - 0 likes

    @Argutaris:

    2 more resources types arent used in the game like Custom Resource and Terrazine. You can change name, tooltip for them and it would be like other minerals.


    Assets.txt (What is written in the file):
    UI/ResourceIconSupply_Prot=Assets\Textures\icon-customsupplyicon-protoss.dds
    UI/ResourceIconSupply_Terr=Assets\Textures\icon-customsupplyicon-terran.dds
    UI/ResourceIconSupply_Zerg=Assets\Textures\icon-customsupplyicon-zerg.dds
    UI/ResourceIcon0_Prot=Assets\Textures\icon-custommineralicon-protoss.dds
    UI/ResourceIcon0_Terr=Assets\Textures\icon-custommineralicon-terran.dds
    UI/ResourceIcon0_Zerg=Assets\Textures\icon-custommineralicon-zerg.dds
    UI/ResourceIcon1_Prot=Assets\Textures\icon-customgasicon-protoss.dds
    UI/ResourceIcon1_Terr=Assets\Textures\icon-customgasicon-terran.dds
    UI/ResourceIcon1_Zerg=Assets\Textures\icon-customgasicon-zerg.dds
    UI/ResourceIcon2_Prot=Assets\Textures\icon-customterrazineicon-protoss.dds
    UI/ResourceIcon2_Terr=Assets\Textures\icon-customterrazineicon-terran.dds
    UI/ResourceIcon2_Zerg=Assets\Textures\icon-customterrazineicon-zerg.dds

    For 5. Resource (Custom Resource):


    UI/ResourceIcon3_Prot=Assets\Textures\icon-customresourceicon-protoss.dds
    UI/ResourceIcon3_Terr=Assets\Textures\icon-customresourceicon-terran.dds
    UI/ResourceIcon3_Zerg=Assets\Textures\icon-customresourceicon-zerg.dds


    Icon Names (All 5 resources):
    http://img1.kilu.de/ImgServer3.0/upl/Nuke3.0_81f7ffe259454aa57c546e91e.jpg

    Last edited Jan 06, 2011 by TwoDie

    http://img27.imageshack.us/img27/8882/abasizedr.jpg

    #7 Jan 06, 2011 at 18:20 UTC - 0 likes

    @TwoDie: Go

    Yes I understand that, but I wonder if it is possible to create a completely new custom resource, by not touching those two.

    #8 Jan 06, 2011 at 18:37 UTC - 0 likes

    @Argutaris: Go

    As I read before about it, you cant add more. 4 resources limit.
    You can creat other resources by triggers, dialogs. etc.

    #9 Jan 06, 2011 at 21:39 UTC - 0 likes

    Finally made it.

    You write about four line and forgot to write that Fourth line!
    Should be:

    UI/ResourceIcon0=Assets\Textures\icon-custommineralicon-terran.dds
    UI/ResourceIcon0_Prot=Assets\Textures\icon-custommineralicon-protoss.dds
    UI/ResourceIcon0_Terr=Assets\Textures\icon-custommineralicon-terran.dds
    UI/ResourceIcon0_Zerg=Assets\Textures\icon-custommineralicon-zerg.dds

    attached picture of four custom picture resources.

    Thanks for this tutorial :)

    • Assets.PNG
      all 4 resources
    #10 Jan 25, 2011 at 16:24 UTC - 0 likes

    I can't get this to work. I followed the tutorial line for line and did everything exactly the same but the icon isn't changing.

    This is the assets file I made:

    UI/ResourceIcon3=Assets\Textures\icon-customresourceicon-terran.dds UI/ResourceIcon3_Prot=Assets\Textures\icon-customresourceicon-protoss.dds UI/ResourceIcon3_Terr=Assets\Textures\icon-customresourceicon-terran.dds UI/ResourceIcon3_Zerg=Assets\Textures\icon-customresourceicon-zerg.dds

    I just want to change the custom resource.

    Here is what my import manager looks like:

    I don't get why it isn't working.

    #11 Jan 25, 2011 at 16:36 UTC - 0 likes

    @Zero0018: Go

    you spelled "Assets.txt" wrong ^-^

    #12 Jan 25, 2011 at 18:22 UTC - 0 likes
    Quote from Ousnius: Go

    @Zero0018: Go

    you spelled "Assets.txt" wrong ^-^

    OMG!!!!!!!! How retarded!! LOL thanks dude now it works... Man I feel retarded. Note to self, don't work on maps still awake from previous day :p

    #13 Jan 26, 2011 at 07:32 UTC - 0 likes

    Woot awesome tutorial... I needed this as I was using your poor 2nd method (and it was broken a lot). Man can't we just get some fields in the data editor to avoid this whole thing...

    SC2 video tutorials: http://www.youtube.com/onetwosc

    #14 Feb 15, 2011 at 23:51 UTC - 0 likes

    how do you create a new resorce? cause im making a map that needs a Terrazine (I think thats how its spelled) resorce.

    One often meets his destiny on the road he takes to avoid it.

    #15 Mar 30, 2011 at 09:47 UTC - 0 likes

    hmm my icons isnt showing up since 1.3

    Homepage: www.sc2goa.com

    #16 Mar 30, 2011 at 12:25 UTC - 0 likes

    @Hookah604: Go

    And in Left 2 Die map made by Blizzard dont Works new Icon resource for Biomass!

    #17 Apr 01, 2011 at 09:23 UTC - 0 likes

    Ok so found how to fix it.

    You need use This same tutorial just adding few more lines. For minerals it would be:

    UI/ResourceIcon0=Assets\Textures\icon-custommineralicon-terran.dds
    UI/ResourceIcon0_Prot=Assets\Textures\icon-custommineralicon-protoss.dds
    UI/ResourceIcon0_Terr=Assets\Textures\icon-custommineralicon-terran.dds
    UI/ResourceIcon0_Zerg=Assets\Textures\icon-custommineralicon-zerg.dds
    UI/ResourceIconNoBackgound0=Assets\Textures\icon-custommineralicon-nobg.dds
    UI/ResourceIconNoBackgound0_Prot=Assets\Textures\icon-custommineralicon-nobg.dds
    UI/ResourceIconNoBackgound0_Terr=Assets\Textures\icon-custommineralicon-nobg.dds
    UI/ResourceIconNoBackgound0_Zerg=Assets\Textures\icon-custommineralicon-nobg.dds

    and adding new img file called: icon-custommineralicon-nobg.dds

    Here is all text for changing all resources icons (except Supply icon), images below how it looks:

    UI/ResourceIcon0=Assets\Textures\icon-custommineralicon-terran.dds
    UI/ResourceIcon0_Prot=Assets\Textures\icon-custommineralicon-protoss.dds
    UI/ResourceIcon0_Terr=Assets\Textures\icon-custommineralicon-terran.dds
    UI/ResourceIcon0_Zerg=Assets\Textures\icon-custommineralicon-zerg.dds
    UI/ResourceIconNoBackgound0=Assets\Textures\icon-custommineralicon-nobg.dds
    UI/ResourceIconNoBackgound0_Prot=Assets\Textures\icon-custommineralicon-nobg.dds
    UI/ResourceIconNoBackgound0_Terr=Assets\Textures\icon-custommineralicon-nobg.dds
    UI/ResourceIconNoBackgound0_Zerg=Assets\Textures\icon-custommineralicon-nobg.dds
    UI/ResourceIcon1=Assets\Textures\icon-customgasicon-terran.dds
    UI/ResourceIcon1_Prot=Assets\Textures\icon-customgasicon-protoss.dds
    UI/ResourceIcon1_Terr=Assets\Textures\icon-customgasicon-terran.dds
    UI/ResourceIcon1_Zerg=Assets\Textures\icon-customgasicon-zerg.dds
    UI/ResourceIconNoBackgound1=Assets\Textures\icon-customgasicon-nobg.dds
    UI/ResourceIconNoBackgound1_Prot=Assets\Textures\icon-customgasicon-nobg.dds
    UI/ResourceIconNoBackgound1_Terr=Assets\Textures\icon-customgasicon-nobg.dds
    UI/ResourceIconNoBackgound1_Zerg=Assets\Textures\icon-customgasicon-nobg.dds
    UI/ResourceIcon2=Assets\Textures\icon-customterrazineicon-terran.dds
    UI/ResourceIcon2_Prot=Assets\Textures\icon-customterrazineicon-protoss.dds
    UI/ResourceIcon2_Terr=Assets\Textures\icon-customterrazineicon-terran.dds
    UI/ResourceIcon2_Zerg=Assets\Textures\icon-customterrazineicon-zerg.dds
    UI/ResourceIconNoBackgound2=Assets\Textures\icon-customterrazineicon-nobg.dds
    UI/ResourceIconNoBackgound2_Prot=Assets\Textures\icon-customterrazineicon-nobg.dds
    UI/ResourceIconNoBackgound2_Terr=Assets\Textures\icon-customterrazineicon-nobg.dds
    UI/ResourceIconNoBackgound2_Zerg=Assets\Textures\icon-customterrazineicon-nobg.dds
    UI/ResourceIcon3=Assets\Textures\icon-customresourceicon-terran.dds
    UI/ResourceIcon3_Prot=Assets\Textures\icon-customresourceicon-protoss.dds
    UI/ResourceIcon3_Terr=Assets\Textures\icon-customresourceicon-terran.dds
    UI/ResourceIcon3_Zerg=Assets\Textures\icon-customresourceicon-zerg.dds
    UI/ResourceIconNoBackgound3=Assets\Textures\icon-customresourceicon-nobg.dds
    UI/ResourceIconNoBackgound3_Prot=Assets\Textures\icon-customresourceicon-nobg.dds
    UI/ResourceIconNoBackgound3_Terr=Assets\Textures\icon-customresourceicon-nobg.dds
    UI/ResourceIconNoBackgound3_Zerg=Assets\Textures\icon-customresourceicon-nobg.dds

    Last edited Apr 01, 2011 by TwoDie
    • All_files_in_Import_Editor.PNG
    • In_txt_file_all_text.PNG
    #18 Apr 01, 2011 at 10:00 UTC - 0 likes

    The nobg image - does it actually have to be a separate image? Do you know what it is used for?

    I'm going to have another poke into the problems with hero icons and see if it has a similar sort of cause...

    Thankyou muchly, by the way ;)

    Edit: That has fixed it - I just used the same image for the NoBackground. Also seems to have fixed my intermittent hero icon problems.

    Last edited Apr 01, 2011 by AgoutiByte
    #19 Apr 18, 2011 at 18:17 UTC - 0 likes

    I can't get my custom supply icon to work. It always display the default supply icon.

    This is how my assets.txt file looks like:
    UI/ResourceIconSupply=Assets\Textures\icon-time-zerg.dds
    UI/ResourceIconSupply_Prot=Assets\Textures\icon-time-zerg.dds
    UI/ResourceIconSupply_Terr=Assets\Textures\icon-time-zerg.dds
    UI/ResourceIconSupply_Zerg=Assets\Textures\icon-time-zerg.dds

    I have opened Left to Die map in the editor, which is supposed to have custom items. But it doesn't display its custom items either. Is there something bugged since patch 1.3??


    Play CoreFight - Play CoreFight - Play CoreFight - Play CoreFight - Play CoreFight

    #20 May 24, 2011 at 01:56 UTC - 0 likes

    I'm just starting to look into resource icon changing but my guess is that it still is working because mineralz still has 4 working minerals.

    Marine Protocol
    Post a comment in the Marine Protocol Forum

You must login to post a comment. Don't have an account? Register to get one!