Menu

LEX File Exchange
EA Support Files
SC4 Wikipedia
Network Addon Mod
Dependencies
Chat
Welcome, Guest. Please login or register.
Did you miss your activation email?

December 04, 2021, 04:01:46 PM

Login with username, password and session length

Author Topic: Explanation of the Texture IID numbers  (Read 11697 times)

0 Members and 1 Guest are viewing this topic.

Offline geoffhaw

Explanation of the Texture IID numbers
« on: May 31, 2008, 04:41:39 PM »
By request, I am copying here the text of the first post in the BSC Texture Index thread from the Simtropolis site. 

Four years on, some other folk have produced more detailed explanations of the finer technicalities of what each digit does in the game, but I haven't been able to find them quickly.  That said, the following is enough to let 99% of users create their own textures without any problems. 

If you want to request a texture range for yourself, please post a request in

http://sc4devotion.com/forums/index.php?topic=2101.0



With the help from the following fine folk: cerulean, SimGoober, Vlakhaas, Caliban, GrampaAl, BigRedFish, pmiller19574, Pegasus and BarbyW, I think we have finally worked out how the base and overlay textures work with respect to the Instance Numbers and Wealth level settings.

I'll try to explain the theory as I see it, but I'm more than open to having any errors/omissions pointed out.

All texture files have a TGI of 7ab50e44 0986135e xxxxxxxx, where the xxxxxxxx represents the individual Instance number of the texture. The instance number is a hex number 8 digits long. For example, 25a71002.  Furthermore, each individual texture is not just one Bitmap picture sized 128x128 pixels, but a series of five pictures, decreasing in size from 128x128 to 64x64 to 32x32 to 16x16 and finally 8x8. 

We now know the following:

The first four digits 25a7 identifies the 'family' to which the texture belongs.

The fifth digit 1 is a marker which refers to the wealth level of the lot in which the texture is used.  (More on this later.)

The sixth and seventh digits 00 at present do not seem to have any significance that we have discovered yet.  Further testing may find out more about these digits.

The eighth digit 2 represents the zoom level at which the texture is viewed in the game.



Now, going into more detail about the above points:


Eighth digit - zoom level

On all the Maxis textures, a '0' in the eighth position represents the view of the texture in the game from the farthest distance away. (The 8x8 picture.)  1, 2, 3 and 4 progressively represent closer views, with 4 (the 128x128 picture) being the most detailed close-up.

Some textures produced by Lot Builders have used the other available numbers (5 to f) here.  This does not seem to have had any detrimental effects in the game that we have noticed.  However, in every circumstance that I have seen, the range of numbers used have been sequential - i.e. 0 to 4, 5-9, a-e etc.

So it seems that as long as the eighth digit for a texture has a sequential range of numbers, with the smallest representing the smallest Bitmap picture etc., the game works OK.  (More testing can and will be done on this, but it appears to be true.)


Sixth and Seventh digits

No info at present - see above.


First, Second, Third and Fourth digits - Family marker (out of order, but for good reason)

This groups textures into 'Families'.  These families are used by the Wealth marker below.


Fifth digit - wealth marker

This is the one that caused us a lot of pain!  Each Lot in the game has a Wealth level assigned to it.  There are four to choose from: None, §, §§ and §§§.  These are represented by the numerical values 0, 1, 2 and 3 respectively.  (I believe that if a lot has no particular Wealth Level specified in any exemplar, the game assumes it is level 0.)  Now, the part that took a while to work out...

Say we have a range of textures with the following Instance numbers:

25a70000  (including the corresponding zoom levels 25a70001 etc.)
25a71000
25a72000
25a73000
25a74000
Note: These are all in the same Family group 25a7.

In this case, a Wealth Level 2 Lot, using texture 25a74000 will never show texture 25a74000 in the game.  This is because the game will see the Wealth Level 2, and display the texture with a fifth digit which is also 2 from the 25a7 Family.  If texture 25a72000 did not exist, 25a74000 would show up properly.


Conclusion:

This rule applies for all Wealth Levels for both base and overlay textures.  The only way to avoid this happening is to not mix Wealth Level markers 0-3 with 4-f in the same family groups.  (An examination of the Texture Index shows that the standard Maxis textures follow this rule.)

« Last Edit: May 31, 2008, 05:11:56 PM by geoffhaw »

Offline cogeo

  • NAM Team
  • Forums Parliamentarian
  • *
  • Posts: 1160
  • Total likes: 38
  • Reputation: 18
  • CL:
    SC4 Station Master
Re: Explanation of the Texture IID numbers
« Reply #1 on: September 21, 2008, 04:16:02 AM »
The sixth digit appears to be a "dilapidated" flag. If you check the textures in the SC4 lots you will notice that some textures have a dilapidated version. The difference is a bias of 0x00000100. This appears to be automatic. I haven't checked if this happens only for values 0 and 1, or instead can occur with other hex numbers too, eg A and B.

Offline ldvger

  • 3RR Team
  • Forums Governor
  • *
  • Posts: 376
  • Total likes: 5
  • Reputation: 3
  • We're all bozos on this bus
Re: Explanation of the Texture IID numbers
« Reply #2 on: October 04, 2009, 12:08:17 AM »
Quote
In this case, a Wealth Level 2 Lot, using texture 25a74000 will never show texture 25a74000 in the game.  This is because the game will see the Wealth Level 2, and display the texture with a fifth digit which is also 2 from the 25a7 Family.  If texture 25a72000 did not exist, 25a74000 would show up properly.

As an extreme newbie who has yet to attempt her first texture, this is a little confusing to me.  I read it through a couple of times and I *think* what you are saying is that the wealth level of the texture needs to match with the wealth level of the lot in which the texture is used.  Example:  If an am in the Lot Editior and creating a level 2 wealth lot, I can't use a texture with a level 3 wealth hex indicator, but must use a texture with a level 2 wealth indicator.  Is this correct?

Also, in your list of file number examples, you include at the end of the list the file with the number 4 in the wealth indicator slot.  If the known welth indicator numbers are 1-3, why would anyone use the number 4?  Does the number 4 have a value in this slot of the file number that is known but not explained here?  If so, where would it be explained?

You go on to explain:

Quote
The only way to avoid this happening is to not mix Wealth Level markers 0-3 with 4-f in the same family groups.
 

I am not understanding the reference to the range 4-f.  Does this mean numbers 4-9 and letters a-f?  Again, why would anyone use numbers not associated with a wealth level (0-3) here and why would anyone use a letter at all? 

If this is explained elswhere, could you provide a link to that place? 

Thanks so much!

Lora/LD

Offline RippleJet

Re: Explanation of the Texture IID numbers
« Reply #3 on: October 04, 2009, 04:52:08 AM »
As an extreme newbie who has yet to attempt her first texture, this is a little confusing to me.  I read it through a couple of times and I *think* what you are saying is that the wealth level of the texture needs to match with the wealth level of the lot in which the texture is used.  Example:  If an am in the Lot Editior and creating a level 2 wealth lot, I can't use a texture with a level 3 wealth hex indicator, but must use a texture with a level 2 wealth indicator.  Is this correct?

You can use any texture on e.g. a wealth 2 lot.
However, in every such case, the game always first looks for a texture having the wealth digit set to 2.
If such a texture is found, then that's the one that will be shown.


Also, in your list of file number examples, you include at the end of the list the file with the number 4 in the wealth indicator slot.  If the known welth indicator numbers are 1-3, why would anyone use the number 4?  Does the number 4 have a value in this slot of the file number that is known but not explained here?  If so, where would it be explained?

When you create a texture you cannot predict which wealth level the lot using it will be.
Who knows, someone else might use your textures on their own lots too... :)

Thus, if you create wealth dependent textures,
then you should create all four versions of them, having 0, 1, 2 and 3 in the fifth digit.

If you want to create textures, which look the same regardless of the lot's wealth,
then you should use choose the fifth digit to be outside of the 0...3 range.
Just be sure not to use any of the digits 0...3 if you have used a digit in the range 4...F.


I am not understanding the reference to the range 4-f.  Does this mean numbers 4-9 and letters a-f?  Again, why would anyone use numbers not associated with a wealth level (0-3) here and why would anyone use a letter at all? 

Letters A, B, C, D, E, F are not letters, they are hexadecimal numbers... ::)

Computers only consider binary numbers, having a base of 2 (where digits can take two values, 0 and 1).
For representing that, our normal decimal number system, having a base of 10, is rather poor.
Hexadecimal numbers, having a base of 16, are a lot easier to use when dealing with large binary numbers...

Binary
   Decimal
   Hexadecimal
0
0
0
1
1
1
10
2
2
11
3
3
100
4
4
101
5
5
110
6
6
111
7
7
1000
8
8
1001
9
9
1010
10
A
1011
11
B
1100
12
C
1101
13
D
1110
14
E
1111
15
F
10000
16
10
10001
17
11
10010
18
12
10011
19
13
10100
20
14
10101
21
15
10110
22
16
10111
23
17
11000
24
18
11001
25
19
11010
26
1A
11011
27
1B
11100
28
1C
11101
29
1D
11110
30
1E
11111
31
1F
100000
32
20

Offline ldvger

  • 3RR Team
  • Forums Governor
  • *
  • Posts: 376
  • Total likes: 5
  • Reputation: 3
  • We're all bozos on this bus
Re: Explanation of the Texture IID numbers
« Reply #4 on: October 11, 2009, 05:10:33 PM »
RippleJet-

Thank you for your explanation, especially for showing the list of conversion numbers, that cleared up one major question for me.  I have a couple more I am hoping you will be patient enough to answer for me...this is all sinking in a little slowly for me, sorry.

Quote
You can use any texture on e.g. a wealth 2 lot.  However, in every such case, the game always first looks for a texture having the wealth digit set to 2.  If such a texture is found, then that's the one that will be shown.

So, if I want my texture to be wealth dependent and want it to match the wealth of the lot I am using it in, then the wealth value digits of the texture AND the lot need to match, is this correct?  If I don't care about the texture being wealth dependent, then the texture's wealth value and the lot's wealth value don't need to match, right?  So, if I install a texture with a wealth value of 3 ($$$) in a lot with a wealth value of 1 ($), so long as there is not a texture with the wealth value 1, the texture with the wealth value 3 will display.  Am I getting it yet? 

Quote
When you create a texture you cannot predict which wealth level the lot using it will be.

Well, if I am creating a texture for a specific lot, I'd know the wealth level of the lot, wouldn't I?  If not, why not?

Quote
Who knows, someone else might use your textures on their own lots too...

Well, only if I released the textures I created into a public site, right?  Not that I wouldn't if folks liked them!  But, if I made them wealth specific, then isn't that caveat something I would include in the readme file?  And, if whoever downloaded a wealth specific texture knew more about hex values than I do, couldn't they rename the texture's hex values to a) fall within thier own texture IID range and/or b) edit the fifth hex digit so that it removes the wealth dependecy? 

Quote
Thus, if you create wealth dependent textures, then you should create all four versions of them, having 0, 1, 2 and 3 in the fifth digit.

I am pretty sure I get what you are saying here.  I can think of two scenarios.  1) in some instances the texture would only appear at certain lot wealth levels.  For example, let's say I create a texture for weeds in the back yard of a level 1 residential lot.  When the lot upgrades itself to a level 2 lot, the weeds would go away.  2) perhaps to be replaced by a different texture (like a well-groomed lawn) I make for the lot OR, if I don't specify any level 2 texture at all, it would revert to Maxis default for that lot wealth level (or would it?).

Quote
If you want to create textures, which look the same regardless of the lot's wealth,
then you should use choose the fifth digit to be outside of the 0...3 range.  Just be sure not to use any of the digits 0...3 if you have used a digit in the range 4...F.

Ok, here's a stupid question.  How is using the range 4-f any different than using 0?  Wouldn't they basically have the same effect as to how they display in the game?  Couldn't it be said that textures that are non-wealth dependent can use the hex values 0 and 4-f?  Or, conversely, that the hex values 1-3 should be used only when the texture is intended to be wealth dependent?

Again using the example I used previously, if I wanted weeds in the backyard only while the residential lot was at level 1, then a nicely groomed lawn to display for the other two wealth levels of the lot, I could assign the groomed lawn texture EITHER the hex 0 value OR any of the remaining 4-f values.  Or maybe not.  If I give the lawn texture the 0 value and the lot has a level 2 value, will the texture fail to display at all?  Hmmm. 

Do all lots in SC4 have an assigned "wealth value"?  Or, do only "built" lots have wealth values?  If I create a new texture plop I want to use to gussy up my unbuilt landscape, would it have a value of "none"/0?  Or, would it fall into the 4-f range? 

Last question:

If our IID's are 8 digits and we are limited to 0-9, a-f, why do we need to know what combination of hex values represent in our decimal system (like 1A=26)...or do we (for creating custom content in the game, anyway)?   

Lora/LD, still scratching her head






Offline RippleJet

Re: Explanation of the Texture IID numbers
« Reply #5 on: October 13, 2009, 01:55:01 PM »
So, if I want my texture to be wealth dependent and want it to match the wealth of the lot I am using it in, then the wealth value digits of the texture AND the lot need to match, is this correct?

Yes!


If I don't care about the texture being wealth dependent, then the texture's wealth value and the lot's wealth value don't need to match, right?

Right!


So, if I install a texture with a wealth value of 3 ($$$) in a lot with a wealth value of 1 ($), so long as there is not a texture with the wealth value 1, the texture with the wealth value 3 will display.  Am I getting it yet? 

Yes!


Well, if I am creating a texture for a specific lot, I'd know the wealth level of the lot, wouldn't I?  If not, why not?

Yes, you would. ;)


Well, only if I released the textures I created into a public site, right?  Not that I wouldn't if folks liked them!  But, if I made them wealth specific, then isn't that caveat something I would include in the readme file?

Yes, of course!
If you create wealth dependent textures, then include all four versions of the same texture (for wealths none, low, medium and high).
That is the most complete way of doing textures and is in fact how Maxis made most of their textures. ;)


And, if whoever downloaded a wealth specific texture knew more about hex values than I do, couldn't they rename the texture's hex values to a) fall within thier own texture IID range and/or b) edit the fifth hex digit so that it removes the wealth dependecy? 

Nobody would change the IID's of any downloaded textures.
Instead, they would use them as such in LE.


I am pretty sure I get what you are saying here.  I can think of two scenarios.  1) in some instances the texture would only appear at certain lot wealth levels.  For example, let's say I create a texture for weeds in the back yard of a level 1 residential lot.  When the lot upgrades itself to a level 2 lot, the weeds would go away.  2) perhaps to be replaced by a different texture (like a well-groomed lawn) I make for the lot OR, if I don't specify any level 2 texture at all, it would revert to Maxis default for that lot wealth level (or would it?).

It all depends on what textures were used on the lot that it is upgrading to.


Ok, here's a stupid question.  How is using the range 4-f any different than using 0?  Wouldn't they basically have the same effect as to how they display in the game?  Couldn't it be said that textures that are non-wealth dependent can use the hex values 0 and 4-f?  Or, conversely, that the hex values 1-3 should be used only when the texture is intended to be wealth dependent?

Consider that you create two separate textures that you do not want to be wealth dependent. Both textures would otherwise be given the same digits, except that one of them would have a wealth digit of 0 and the other one would have a wealth digit of 4. If the texture with the wealth digit 4 would be used on a lot having its wealth set to none, that texture would in the game be replaced by the texture having the wealth digit set to 0.

Textures with a wealth digit of 4-F can always be used and always appear the way they were designed, regardless of the wealth of the lot using them... but only as long as no corresponding textures with a wealth digit of 0-3 also exist. That allows you to create as many as 12 independent textures, otherwise having the same digits, except for the wealth digit, being 4, 5, 6, 7, 8, 9, A, B, C, D, E or F. They would still appear as separate textures and would not interfere with each other in the game.

However, if you'd also create 4 textures in that range with the wealth digit being 0, 1, 2 or 3, any one of the above textures used on a lot would in the game be replaced with the corresponding wealth dependent texture in the game.

Thus, if you plan on making wealth dependent textures, be sure not to use any of the digits 4-F if the other digits are the same.
And, if you do not want your texture to look different on lots of different wealth, then feel free to use all digits 4-F, but none of the digits 0-3.


Again using the example I used previously, if I wanted weeds in the backyard only while the residential lot was at level 1, then a nicely groomed lawn to display for the other two wealth levels of the lot, I could assign the groomed lawn texture EITHER the hex 0 value OR any of the remaining 4-f values.  Or maybe not.  If I give the lawn texture the 0 value and the lot has a level 2 value, will the texture fail to display at all?  Hmmm. 

The texture that was used in LE would display, as long as there isn't a corresponding texture available with the wealth digit set to 2.


Do all lots in SC4 have an assigned "wealth value"?  Or, do only "built" lots have wealth values?

Yes, all lots do have a wealth level. RCI (growable) lots can only have three levels, $, $$ or $$$.
Ploppable lots can also have the wealth set to none.
There are however only a few reward lots made by Maxis that are set to no wealth:

  • Army Base
  • Cruise Ship Port
  • Federal Prison
  • Lighthouse
  • Marina
  • Space Port
  • Toxic Waste Dump


If I create a new texture plop I want to use to gussy up my unbuilt landscape, would it have a value of "none"/0?  Or, would it fall into the 4-f range? 

You cannot plop a texture alone in the game... A texture always appears on a lot.
Thus, it's the lot's wealth that determines which texture to display (if there are different wealths available of the texture).


If our IID's are 8 digits and we are limited to 0-9, a-f, why do we need to know what combination of hex values represent in our decimal system (like 1A=26)...or do we (for creating custom content in the game, anyway)?  

No, you never need to know the decimal value of your texture IID's. ;)

Offline ldvger

  • 3RR Team
  • Forums Governor
  • *
  • Posts: 376
  • Total likes: 5
  • Reputation: 3
  • We're all bozos on this bus
Re: Explanation of the Texture IID numbers
« Reply #6 on: October 13, 2009, 11:51:03 PM »
Yay!  I am starting to get it, I think!

RippleJet, thanks you so very, very much for taking the time to answer my newbie questions, I really, really appreciate it.  I am scared to death to venture into the realm of texture creation until I feel confident that I have a firm grasp on how what I create operates in the game.  I'm a bit of a cautious person by nature.  I think there are two kinds of people in the world...those that jump right in and those that gets thier two wets first, then thier feet, then thier ankles, etc.  I'm of the latter group. 

You have answered most of my questions about the wealth dependency issue(s), but in your answers you inadvertently brought up new questions.

1.)  If all plops are lots, how is it that some plops act like paintable tools across the game landscape?  I am thinking of plop water and some of the plop paths and flora I have found.  jeronij has a .5 cell TPW plop that plops not only over other .5 TPW plops but also across cell boundries.  PEG has a similar PW, a .25 cell plop that acts the same way.  Are these plops not considered to be textures?

2.)  If all plops are lots, how do folks create terrain mods? 

I ask these questions because one of my primary inspirations for wetting my toes in the world of custom content is a burning desire to a) try my hand at creating a TPW of my own and b) try my hand at creating a terrain mod.  Both appear to me to be heavily dependent on custom textures, which is why I wanted to start with texture creation AND why I wanted the issue of wealth dependency clarified. 

A couple of more questions, which I hope will be much easier for you to answer for me.

3.)  A "texture family" would be comprised of a group of textures that are all basically the same EXCEPT for a) any wealth dependency (if assigned) and b) zoom levels 0-4.  Is this correct?

4.)  There is a post above which postulates that the hex location just prior to the zoom hex location controls dilapidation in game, with 0 being the designator for no dilapidation and 1 being the designator for dilapidation.  Has anyone followed up on this to determine is it's true or not?  If true, I am assuming that a seperate texture would have to be created for dilapidation, but this, I think, would only apply to built objects like buildings.  If I wanted to create textures that did NOT dilapidate, then I could use ALL the hex numerals EXCEPT 1, is that correct?  This is kinda in the same vein as the welath dependency slot and how hex numerals in this location work in controlling the display of the texture in the game. 

I ask the last two questions because I am trying to determine ahead of time what hex combinations I can use within my assigned range.  Those "available" 6th and 7th hex slots could play a crucial role in the number of families I could create, I am thinking. 

But maybe I am thinking wrong.  If my assigned range is the first 4 numbers F5E0-F5E7, then I have 8 families I can create, right?  Is it possible to create sub-families within a family, using, for instance, the wealth slot (if the textures are not wealth dependent) as an 5th categorizing indicator?  And then again the 6th and 7th slots? 

Lots to learn and I apologize if my questions posted here are in the wrong place.  Perhaps yet another thread addressing these issues could be created. 

Lora/LD


Offline joelyboy911

  • SCAG Team
  • Forums Parliamentarian
  • *
  • Posts: 1459
  • Total likes: 9
  • Reputation: 4
Re: Explanation of the Texture IID numbers
« Reply #7 on: October 14, 2009, 12:33:40 AM »
Hey Lora, I can explain some of this stuff.

1) Those, are BAT models, rather than game textures. Because they are flat, they give the appearance of a texture. They aren't 'lots' but are more like BAT props, which can be placed directly onto the terrain. EDIT: Ripplejet has linked to an explanation of these.

2) Terrain mods aren't plops. Rather they change or override the game's default textures (there's that word again - it comes up everywhere, it is confusing) which are applied to the ground. I made my first texture editing attempt last week when I modded the Rail Viaducts. I would recommend if you want to make a terrain mod, start by opening an existing terrain mod in iLive's Reader. You can get an idea of exactly what textures need to be made, and what TGI (Type Group and Instance) IDs they should have.

The way I modded the rail textures was to check the IIDs of each texture in the original plugin, and in the texture creator set each piece at the proper Instance ID (the only one you control in texture creator). Then in Reader I set the textures to have the right Group ID (which you can do batchwise).

3) I don't think there is any such thing as a Texture Family, but I think yes you could use that system.

4) I don't know, you'll need one of the geniuses (genii?) for this one.

I hope these are correct, and helpful to you. Good luck.
« Last Edit: October 14, 2009, 02:35:03 AM by joelyboy911 »
SimCity Aviation Group
I miss you, Adrian

Offline RippleJet

Re: Explanation of the Texture IID numbers
« Reply #8 on: October 14, 2009, 02:24:30 AM »
Those flora, path, water, etc. items that you can plop without them being on a textured lot are Mayor Menu ploppable items.

I was hoping someone (Cogeo... ::)) could provide some more testing on 6th digit and dilapidation...

All ingame dilapidated textures do indeed have a "1" in the 6th digit... where the corresponding undilapidated texture has a "0".
For the time being, I would only use even numbers (0, 2, 4, 6, 8, A, C, E) in the 6th digit.

Offline joelyboy911

  • SCAG Team
  • Forums Parliamentarian
  • *
  • Posts: 1459
  • Total likes: 9
  • Reputation: 4
Re: Explanation of the Texture IID numbers
« Reply #9 on: October 14, 2009, 02:33:43 AM »
Durr, I posted without finishing the answer to the first question.  &hlp
SimCity Aviation Group
I miss you, Adrian