If you're asking how to have a different graphic depending on the tileset, you'll need to edit the building's iscript. "playframfile" is the opcode you should be using.(This is with IceCC)
For example, a buildings initial code uses "playfram":
CODE
AcademyInit:
playfram 0
imgul09 265 0 0 # AcademyShad (terran\tacShad.grp)
goto AcademyLiftOff
Change it to "playframfile".
CODE
AcademyInit:
playframfile 0
imgul09 265 0 0 # AcademyShad (terran\tacShad.grp)
goto AcademyLiftOff
Say if you used playframfile 0 on a building, the next 7 frames will be used depending on the tileset. The opcode seems to just read the offsets in order from the frame designated by the command.
Tileset offsets are:
00 = badlands
01 = space
02 = installation
03 = ash
04 = jungle
05 = desert
06 = ice
07 = twilight
If you're graphic has more then one frame (e.g. minerals). So if you wanted to play the first fframe you would use playframfile 0 and each frame after that will be used depending on the tileset. The second frame (the minerals are mined a bit and the graphic changes) you would use is playframfile 8. The third and fourth form would be 16 and 24 since you have 8 tilesets and each one of the 8 is used on different tilesets. The whole thing would have a total of 32 graphics. Here's an example if you used playframfile 0:
frame 00 (badlands)
frame 01 (space)
frame 02 (installation)
frame 03 (ash)
frame 04 (jungle)
frame 05 (desert)
frame 06 (ice)
frame 07 (twilight)
(Then the next form would start at 8)
frame 08 (badlands)
frame 09 (space)
frame 10 (installation)
etc.
So the "second frame" of a building would be "playframfile 8".
Also, the command doesn't work seem to work on units that can turn. It only works on building type graphics.
I do hope that made some sense. This is just a copy and paste from what I wrote two years ago. My mod in my signature uses this to have different colored minerals depending on tileset. If you don't understand what I said, I'll try to describe it a bit more or someone else might be able to.