How to Change Resource Icon
Author: h34dl4g (sc2mapster.com)Tags: intermediate interface  
Source: http://forums.sc2mapster.com/resour...Added 13 years ago 

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.

Example map: (link)

How do we change the Icon?-
Since the data editor doesn't have a 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:



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.



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).



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.



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:



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






Star Depot
Contact      Login