Jump to content
Cyclone Boom

guide Tutorial: Changing IIDs for BAT Models Using Reader

5 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

A method to make unique instances for BAT models - 

This is a tutorial explaining a way to set a new IID instance range using Reader for a given BAT model. I've written this in response to the request @Urban Abstraction made here in the BAT FAQ thread, and posted in case it'll help anyone else looking to do this also. *;)

For the purpose of this explanation, I'll be using the excellent commercial store BAT which Urban created.

(Which is now available to download on the STEX from this file.)


Prerequisites

  • Reader 0.9.3 installed.  (Other versions of Reader likely will work too for this method, but I'm using 0.9.3 since it's the most stable and familiar for me.)
  • Basic familiarity of Reader is recommended (as this guide explains), but isn't required as I'll be covering each of the steps to do this.
  • Create a backup of the model file (.SC4Model) to be edited with a new IID allocation. Copy this to some safe place.

 

Step 01

Firstly open the model you'd like to edit:

Tutorial_Changing-IIDs-for-BAT-Models-Using-Reader_01.png

 

Initially the file entry list will look like this:

Tutorial_Changing-IIDs-for-BAT-Models-Using-Reader_02.png

 

Step 02

Next we'll sort the Instance column so the ordering is sequential in digit order.

Double click this column heading (at the top as I've annotated in orange).

As follows:

Tutorial_Changing-IIDs-for-BAT-Models-Using-Reader_03.png

 

Step 03

Now with the list sorted, it appears logical for what we're going to do next. This step is to generate a random Group and Instance which can be used for setting the unique TGI for the entries. For the Type column and these will be kept as they are which is necessary for certain file entry types.

Note: If you have a textures IID range, skip this step and go to Step 04 to set from your allocated range instead.  *:read:


Go to the Tools menu in Reader and click the TGI Generator option.

It'll open up a dialog window:

Tutorial_Changing-IIDs-for-BAT-Models-Using-Reader_04.png

 

Click the Generate button in the middle, and it'll generate the Group and Instance randomly.

Each of these are 8 digit hex values (ranging from 0-9 and A-F).

If you're a little fussed about these things like me, then there's no harm in keep clicking the button until there are digits you're happy with using! *:blush:


Copy both of these to an empty document. I just used regular Windows Notepad for this, but you can use anything of your preference. They'll be needed for the remaining part of the process to make sure the IIDs are set correctly.

Note: For the IID and we only need the first 4 digits, so you can just copy these to your document (e.g. a1fd as I did here) and ignore the other 4 at the end. This is important because of what fits into the following step for preserving the trailing digits. Those are what determine the zooms and rotations, and what the game does is pieces these all together so it knows which texture to display onto the model from different perspectives.

 

Step 04

With this done, go to the Tools menu again in Reader and click the TGI Editor option.

This window will open up:

Tutorial_Changing-IIDs-for-BAT-Models-Using-Reader_05.png

 

In here, for the Group box and I've pasted in the IID which I generated in the prior step. Do this with yours also, and then it gets onto the Instance box as well. Each of the # are placeholder masks, which preserve the values at that particular digit place.

By entering in: a1fd####

As this pic highlights with the selection:

Tutorial_Changing-IIDs-for-BAT-Models-Using-Reader_08.png

 

What this means is to set a1fd for each of the entries. However, to still keep the last 4 digits as they already are.

It might even be possible to do this for randomising the initial 5 places in the generation (like a1fde### for example), but I played it safe here and just did it for preserving the final 4 digits at the end. The key thing is how they'll be unique enough as they are.

 

Step 05

The next step is to set apply the Group and Instance to the entries. Reader makes this super easy too.

Click the 1st entry listed, then hold down the Shift key and then scroll down to click the bottom one.

Then click the Tutorial_Changing-IIDs-for-BAT-Models-Using-Reader_14.png button to confirm this.

Like so:

Tutorial_Changing-IIDs-for-BAT-Models-Using-Reader_07.png

 

If not selecting anything, then this error will popup to make it known:

Tutorial_Changing-IIDs-for-BAT-Models-Using-Reader_06.png

 

Then after closing the TGI Editor (click the X in the corner), the entry list will be updated.

Here's how I see it after doing the above:

Tutorial_Changing-IIDs-for-BAT-Models-Using-Reader_09.png


But, there is one more key part of the process...

 

Step 06

Click the Entry column heading twice as we need to group the S3D files:

Tutorial_Changing-IIDs-for-BAT-Models-Using-Reader_10.png

 

This makes the next part easier as they're now all listed together.


You'll notice how if clicking one of the S3D file entries, the preview of the model will appear completely white with no texture.

Like so:

Tutorial_Changing-IIDs-for-BAT-Models-Using-Reader_11.png

 

Oh dear. But, don't panic!

What the following steps involve is to edit the IIDs so the textures are associated with each of the S3D files. *;)

 

Step 07

With the first S3D file selected, over on the right hand panel are the controls for editing the data.

Click the Mats (materials) tab. Then right click the entry and choose the Change Instance/Name option from the context menu.

As follows:

Tutorial_Changing-IIDs-for-BAT-Models-Using-Reader_12.png

 

Step 08

For this part, it only needs the 4 digits from the Instance ID which we've now set using the TGI Editor for the file entries. What this involves here is applying this to the internal reference IID for the S3D files for each sub-instance.

The next thing to do is replace the first 4 digits with those as allocated for the main entries.

For this I'm using a1fd because it's what came from the random generation:

Tutorial_Changing-IIDs-for-BAT-Models-Using-Reader_13.png


Doing this for the Name isn't necessary, but I figured it might as well be updated too.

Click OK to confirm the change, and then back on the main panel, click the Tutorial_Changing-IIDs-for-BAT-Models-Using-Reader_14.png button to save.


This is an essential step, and Reader will throw a warning otherwise:

Tutorial_Changing-IIDs-for-BAT-Models-Using-Reader_15.png

 

There might be some S3D entries which have more than one. Continue through each of these and update the IDs accordingly the same way.

Like so:

Tutorial_Changing-IIDs-for-BAT-Models-Using-Reader_16.png

 

Step 09

Rinse and repeat the process for all other S3D entries. This took me a few minutes, and it's easy enough to do once getting into the flow of it. When adding each new ID and for these multi-part files you'll see the preview updating with each new piece of the puzzle.

Then it's a good idea to go through and do a visual double check that they're each set correctly.


All being well you'll see them all showing up.

For example:

Tutorial_Changing-IIDs-for-BAT-Models-Using-Reader_17.png

(Previewing the superb BAT which @Urban Abstraction created. *:8) )

 

Step 10

Finally this isn't necessary in Reader 0.9.3 as it does the re-indexing automatically (other than LotConfig entries, but that's a different thing). But what I did was delete the DIR file and then right click and choose Rebuild Directory File from the context menu. Then click ReIndex too.

The DIR file is what contains an index of all compressed entries, and somehow I find this logical to appear at the bottom of the list.


Another little thing I'll mention is how the XML file contains the old Group and Instance still. I went ahead and updated this also, but according to DataNode (which @rivit created as a highly useful tool for diagnosing SC4 file relation conflicts), the XML is ignored and not read by the game.

 

The final (final) step is to Save the file. Yes, it would be completely silly to lose all this work now, wouldn't it? :whatevs:

So, click the Tutorial_Changing-IIDs-for-BAT-Models-Using-Reader_18.png button and it'll all be done.

*:thumb:


(As ever, a special thanks to Cori for helping me with the proofreading.)

  • Like 4
  • Thanks 3

Quick Links

“SimCity 4 is not just a game, but a tool driven by our own imagination and creativity.”

Buy me a coffee

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

in step 06 the first image is the model i made in BAT the second image is not white like in your tutorial what is going on?

Screenshot (392).png

Screenshot (391).png

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

It only happens when you change the IID of the model’s FSH files, because then Reader won’t be able to find the actual textures to apply on the S3Ds.

Frankly, changing the IIDs is completely unhelpful, it just adds needless steps. So unless you really need to do that for some reason, just change the GID instead. For most users, it’s quicker to just re-render your BAT in a new file so a new ID is generated for you. Mucking around with IDs manually is best left alone unless you fully understand what you are doing.

  • Like 1

Head over to my Lot and Mod Shack to keep abreast of my latest developments.

Do you like custom textures, but don't like all the work involved creating them?, take a look at the Texture Automation options here. Change the look and feel of your transit networks, with the minimum of effort, for example customised versions of my Sidewalk NAM (SWN) and Terrain Grass NAM (TGN) mods, and much more besides.

New to the NAM? Check out my tutorials on YouTube. Latest upload: How to: RHW - MHO Roundabout Interchanges. (Nov 25).

p.s. - I'm MGB over on SC4D and a member of the NAM team.

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
Currently: Viewing Forums Index
 
6 hours ago, rsc204 said:

Frankly, changing the IIDs is completely unhelpful, it just adds needless steps.

While in general this is true for a single conversion, the tutorial is written specifically in reply to this post in which that member had a need for four separate sets of FSH. *;)

For context:

On 9/29/2020 at 8:13 AM, Urban Abstraction said:

I read somewhere that it's the IID name that needs to be changed and can be done in reader. Although I do have reader, I don't know how to use it.

 

  • Yes 1

Chance favors the prepared mind. ― Louis Pasteur  
Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

Are you new here? Check out the Introduction and Guide to Simtropolis.

Share this post


Link to post
Share on other sites

Sign In or register to comment...

To comment in reply, you must be a community member

Sign In  

Already have an account? Sign in here.

Sign In Now

Create an Account  

Sign up to join our friendly community. It's easy!  

Register a New Account


×

Thank You for the Continued Support!

Simtropolis depends on donations to fund site maintenance costs.
Without your support, we just would not be in our 24th year online!  You really help make this a great community. *:thumb:

But we still need your support to stay online. If you're able to, please consider a donation to help us stay up and running. This helps sustain a platform where we can share our community creations for years to come.

Make a Donation, Get a Gift!

Expand your city with the best from the Simtropolis Exchange.
Make a Donation and get one or all three discs today!

STEX Collections

By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

Each donation helps keep Simtropolis online, open and free!

Thank you for reading and enjoy the site!

More About STEX Collections