Tutorial:Turning Props Into Plops

From SC4 Encyclopaedia

Jump to: navigation, search

This is the first part of the long-awaited (mainly because I've been so slow) tutorial where we reveal the innermost secrets of the 3RR Plopperizerâ„¢.

First, some background. My chosen title is actually a bit misleading - what we're actually turning into plops are what are called in the game ".SC4Model" files, which are the end result of the BATting process. I'll use as a starting example of a .SC4Model file what Matt (threestooges) sends me as his output when he sends me his work.

Fig. 1
Fig. 1

These are Matt's now infamous phone poles - the ones that have sparked what seems to be a flood of interest (and skilled BATters, such as our good friend metarvo) in the topic. Now, you'll notice that (imho) Matt names his files very carefully. He starts with his custom content creator code "TS",

Fig. 2
Fig. 2

followed by the generic name of his BAT, in this case "phone pole".

Fig. 3
Fig. 3

He then follows with the type, in the first case "3bar".

Fig. 4
Fig. 4

He then adds the orientation - for ortho poles, none, but for other orientations the amount of the angle: "18.4" for FAR/FARR angle 1, "45" for diagonals, and "30" and "60" for in-between orientations.

Fig. 5
Fig. 5

n.b.: If I were naming these BAT files, the only thing I would change would be to expressly name the orientation "orth", "diag", "FA18", "FA71" and then "30", "60" and other lesser used angles.

Now, by this point you're probably saying to yourself, "Heck, I don't make the .SC4Model files- I just want to make them into plops!" Well, OK, but, #1) I'd really like to see everyone be as meticulous as Matt has been about naming them, and #2) As you know from earlier tutorials, I just don't assume folks start with any more knowledge than I had when I puzzled my way through this. So, if you see something you think you already know, feel free to skip ahead. We'll catch up with you somewhere.

The remainder of the file name consists of a string of numbers that, at first glance can look like gobbledegook to the uninitiated, but are very useful to have in an .SC4Model file name if you are going to use it as a basis for creating further custom content. Why? Well, the game allows you to create .SC4Model files named anything, so Matt could have named his first four phone pole files "John," "Paul," "George," and "Ringo" if he'd wanted to and they would have worked just fine. That would have left us, though, having to go into the iLives Reader,

...which, if you are going to follow along and don't have, can be downloaded from the LEX.

in order to get this information, which we will need in order to create the plop. These numbers,

Fig. 6
Fig. 6

are actually three discreet numbers starting with the alphanumeric "0x". Without a great deal of further discussion here (we'll get into that later in the tutorial), these numbers represent the "type," "group," and "instance" of the BATted object contained in the .SC4Model file. Taken together, these type, group and instance numbers are called "TGI" numbers. While the scope of explaining the TGI numbering system even at the most basic level is far beyond the scope of this tutorial, they act sort of like a street address so that the game can find a BATted object (among other things - TGIs are used for many purposes) when it goes looking for it. Just note here for future reference that Matt's phone pole .SC4Model files all have the same type and instance numbers, but different group numbers.

So, we'll select a particular phone pole BAT to make ploppable- let's use the basic one crossbar ortho pole - this one.

Fig. 7
Fig. 7

Now, we're actually at another point of departure here, one I'll just mention. If the .SC4Model file was all you had, and you didn't care about making the BATted object ploppable, could you use it in the game at this point as a prop? The answer to that is no. You would need to create a second file to go with it - a .SC4Desc file. We won't do that here, as it is a good subject for a future tutorial. It's good to know, though, that the purpose of a .SC4Desc file is to make a BATted object into a prop usable in the Lot Editor - nothing more. I know - it seems odd, we've talked about ploppable props for years - actually what we're creating are ploppable BATs. So that's why, as I noted at the start of this post, the title of this tutorial is misleading. You can certainly make an existing prop (to wit: a BATted object contained in a .SC4Model file with an accompanying .SC4Desc file) ploppable, but you can also make any BAT that is in a .SC4Model file ploppable. Remember that for later.

What we want to do with this puppy is to make it into our plop, so we can do this.


Now, just to make absolutely sure everyone understands completely, there are no lots involved here. Point the cursor anywhere (almost, more about that later, too) on your game terrain,


and plop away. This is why I became interested in plops in the first place. I do a lot of roadway right-of-way stuff - the lot-based approach (for road signs, for example) creates a whole bunch of issues, the main one being the inescapability (on the game streets and roads, at least) of those darn sidewalks. Ploppable stuff also means you can put several unrelated plops in the same gridsquare, such as is the case with the stop sign and phone pole in the lower right corner of this intersection.


I used to think that a huge drawback to making ploppable stuff was that you would have no control over which of the two perpendicular to each other axes (0-180 and 90-270 for ortho stuff, for instance) that a plop click would result in. At first, I dealt with this simply by plopping and bulldozing the plop until the orientation came out right, and it was a bit of a pain. The along came our Resident Rural Mad Genius Chris (Chrisadams3997) and passed along the multi-click technique that I am about, in turn, pass along to you in this tutorial. Plopping, as far as I'm concerned, is now perfected*. So, lets get started.

What we are going to create to accompany Matt's .SC4Model file is a .dat file that contains, as it were, the various exemplar, LTEXT and .png subfiles necessary to tell the game that our BATted object is ploppable. We do that, as mentioned, with the Ilive Reader.

Now, here's where we do the first of several cheats you'll find in this tutorial. I wrote my first .dat Plopperizer^(TM) file from scratch, with a ton of trial and error. You don't have to, because I'm attaching the one we'll work from to the bottom of this post. I'm sure in a perfect world it would be far more character-building for you to have had to go through all the pound-your-head-on-the-desk and "what the h...?" moments I did, but hey - this is 3RR, and you're all Regulars - now how could I do that?

OK, the file (actually files - I threw in Matt's current RR crossing BATted road sign as a twofer - enjoy!) we're dealing with here is this one:


Unzip it into a subfolder named "Ploppable Stuff" in your "My Documents" SC4 "Plugins" folder.


Now drag'n drop the file onto the Reader icon on your desktop (or fire up the Reader and open the file in the usual manner - however you do it is fine with me).

n.b.: I'm going to assume a basic familiarity with the Ilive Reader for the purpose of the rest of this tutorial. I'm not aware of a good basic Reader tutorial (or have forgotten about it - just as likely) that's out there. If anyone knows of one, note that in a post, and I'll be sure to come back here and edit in your recommendation. I'll be detailed enough, I think, to the point where even if you've never used the Reader before, you should be able to hang in there - you can always PM me if you get unalterably stuck.

You'll see the "Fill the list" button. Left-mouse click it, and you'll see this.


...OK, OK - first time Reader users - you all back up off the floor yet? Hey... hey... where'r you going? Come back- it won't be that bad... I promise...

The Reader can be pretty daunting. I know that I've just scratched the surface as to taking advantage of what it is capable of doing, and I've been pretty good with it (at least with the things I do) for about three years now. What we need to do, though, is a basic orientation, so that I can refer to several things down the way a bit without sounding opaque.


No. 1 is the program's menu bar. No. 2 I will refer to as the program's "task bar." No. 3 is the "loaded file pane." No. 4 is the "directory list pane." No. 5 is the "file edit pane."

Now, I don't know if these are the official names for these things, and Ilive hasn't been around in a long time to ask. So, they're what we'll go by.

Let's end this part of the tutorial by focusing for a bit on the directory list pane.


I've expanded the column headings all the way out here so that you can see what they are. We'll be dealing with the "Entry", "Num", and the familiarly named "Type", "Group" and "Instance" columns. Those last ring a bell? Well, these are a whole new set of TGI numbers and have nothing to to with the one we discussed earlier in connection with the .SC4Model file name. But it will all make sense in a bit - promise.


As noted, we'll be editing all of these files: the exemplar, LTEXT and PNG files directly, and the DIR file indirectly just before we finish up. Exemplar files are a purpose-determined collection of fixed game parameters into which we will be entering specific values. I've taken care of identifying which exemplars you will need for a ploppable and what parameters are required in each. Your job will be to enter the unique values necessary to set up the ploppable. By the time you complete the tutorial, you'll know how. LTEXT files are what generate the menu flyout information,


and PNG files are what create the ploppable item icon in the menu. The DIR file is...well, again, we'll get to that later.

We'll skip over the headings to "Type", "Group" and "Instance", as we won't be editing any of the "Compressed", "Location", "Filesize", or "Num" entries (at least not directly, anyway) in the process of making a ploppable.


These three columns consist of sets of three eight alphanumeric character hexadecimal numbers: i.e: "6534284a e83e0437 de522800".


See The 3RR HEX Tutorial for a tutorial.

So, now that we know that the full set of TGI numbers gives us about 80 bazillion address possibilities, are we going to worry about anything over four billion by monkeying around with "type" and "group" numbers in creating our ploppable?


I thought not. Actually, there are other good reasons not too that are beyond the scope of this tutorial. Let it suffice here to agree that you, in creating ploppable objects, will not be editing either the type or group numbers; only the instance numbers.


Now, before we jump in and start doing that, here's where you, the dear reader, will need to stop and devote a bit of thought to something. While part of my purpose in doing this tutorial is to arm folks like Marisa (girlfromverona) and Pat (my Rhinelanderian friend) with the knowledge needed in order to help me do the ploppable road sign set, my presumption is that many of you will want to start creating your own plops out of whatever stuff you feel like. So, while we will be assigning Marisa and Pat the instance numbers that they will be using, you will have to come up with yours on your own. And, depending on how much of this you intend to be doing, you will need a plan, or in short order you will have a bona fide mess on your hands.

Why a mess? Well, one of the well-known issues (well-known at least to me) with eight character hexadecimal numbers is that you can't keep them in your head for more than about three seconds. For each plop, as you can see from Figure 22 above, you'll be using a sequence of eight of them (ignore the DIR file instance, which we won't be monkeying with). In our example file, we have used de522800 through de522807.

Since our method uses eight sequential instance numbers, the methodology I employ in choosing the first one for each ploppable is to start with the last character (reading from the left) being "0". This has the effect of, in a series of ploppables, spacing them 16 hexadecimal numbers apart- plenty of room for our eight. Thus, "de522800", "de522810", "de522820", and so on. If that's coming across as gibberish, this should help.


What I've done is create an Excel list of the various road signs so I can keep everything straight. This is the "Warning Signs" subset. As Matt has only created one of these signs so far, I've used placeholders for the others. As you can see, each sign by orientation (orth, diag, FA18, FA71) is 16 hexadecimal numbers apart. Something else I've done is to use the fifth hex character (reading again from the left) as a way to differentiate between each orientation, hence de522800 for the orthogonal RR crossing sign, de523800 for the diagonal, de524800 for the FA18, and de525800 for the FA71. Our example sign is here.


So, you can do your TGI numbers however you want, but if you are making a bunch of ploppable stuff, and certainly if you are making a bunch of related ploppable stuff, you will want a system sooner or later. I'm just trying to encourage you to start one sooner. One last thing, I use (one last time reading from the left) four arbitrary characters to start my hex instance number... well, they're not that arbitrary. "de" are my first and last initial. "52" is the year (to wit, 1952) I was born. So the road sign set plops will all have instance numbers that start with "de52". The phone pole set will start with "de53", in honor of when I was one, I guess. You'll have to come up with your own first four instance hex characters- in any event I'd recommend you leave the first two alone after you choose them and use the second two as a sequence number (as I intend to do) as necessary.

So, here we are. We're about to start off on what you've been waiting for - taking our example file (the RR Crossing sign .dat attached to the bottom of Part Two of the update here) and modifying it into a .dat file that will make Matt's orthogonal single crossbar telephone pole ploppable. I've attached, to that end, the .SC4Model file for the pole at the bottom of this post. DL it into your plugins folder, and we'll pick back up with Part Five of the tutorial here.

We'll start with a little bit about the way the Reader works. Here's our example file loaded up.


By default, the Reader opens the first file in the "Entry" column of the directory list pane into the file edit pane. In this pane all of the components of the exemplar file at TGI number "6534284a e83e0437 de522800" are displayed.


Here's the file edit pane for that exemplar.


Double-clicking on any other file in the "Entry" column of the directory list pane brings up the components for that file in the file edit pane. Here, we do that with the LTEXT file at TGI number "2926960b 4a5e093c de522800".


And here's the result in the file edit pane.


So, now that you have a sense of how that works, let's go through the steps we'll follow to create our new .dat file.

  1. Save the file under the new file name;
  2. Edit the instance numbers of the exemplar and LTEXT files in the directory list pane;
  3. Edit the components of each newly named exemplar in the file edit pane;
  4. Edit the text of the LTEXT files in the file edit pane;
  5. Add a new PNG file and assign it TGI numbers in the directory list pane, and remove the old PNG file from there;
  6. Reindex and rebuild the DIR file in the directory list pane'
  7. Save the file again.

At that point, we'll be done!

Let's get started.

1. Save the file under a new file name. In my opinion, if you are going to work off of an example file, this is the most important step. Why, because if you don't do it until you are part way (or even all the way) through and you klutz up and do a "save" instead of a "save as", you stand not only to lose the work you have done if you've made a mistake, but you will also overwrite your example file. This is especially bad when, like me, you tend to edit off the last similar file you created, which invariably are among the game files themselves. That raises another good point- keep or make a copy of your example file somewhere other than in the directory you are working out of.

Having saved our new ploppable telephone pole .dat file


we move on to the next step.

2. Edit the instance numbers of the exemplar and LTEXT files in the directory list pane. Now we start getting down to it. We're going to edit the following instance numbers.


The DIR file does not change. We'll be deleting the PNG file and replacing it with a new one, so we don't need to bother with it.

We'll start by (1) left-clicking on the topmost exemplar file in the directory list pane to highlight it, then (2) left click on the task bar's "File Info" button.


This brings up the "File Info" dialog window, where you'll left-mouse click on the big "Edit" button.


This in turn brings up the "Header - Edit" dialog window. You'll want to (1) make sure the "Address (mem)" radio button is selected, then you'll (2) select and edit the "Instance" text entry field.


In the "Instance" text field, (1) type [font=Courier New]de531000[/font] and (2) left click on the "OK" button to input the change.


Now- important aside- why did you just type in "de531000"? Oh, sure, because I told you to, but stop and think about it a minute. This number will be the base hexadecimal address (the instance part, but the type and group numbers stayed the same, remember?) for our new ploppable telephone pole .dat file. Now, do you want to use that same base number if you later on do a ploppable BAT object of your own? Of course not. This is where you start with your own brand new one-in-four-billion hexadecimal instance number. OK? I'm glad we've had this chat...

So, now you're about to discover an irritating quirk of the Reader. When you clicked "OK" a few seconds ago, the "File Info" dialog box returns, ready for another go round. When you look at the directory list pane though, it still has the old instance number: "de522800". It should update, but it doesn't.


Well, some things you just have to do manually. Click on the file, and there it is: "de531000".


Now we get to the place where I have to trust you've been paying attention (which, of course, I know you have). We need to change the two LTEXT file instance numbers and change them to "de531000" as well.


If we take this step-by-step, we will never get to the end of this already very long tutorial. What I'd like you to do is head back up this post to Figure 34 and, highlighting each LTEXT file in turn, go through the steps to change each of their instance numbers to "de531000". When you're done, your directory list pane will look like this.


Having passed that hurdle, we now are confronted with a similar situation with regard to the remainder of the exemplar files. We'll be changing the instance numbers for each of them.


You can see an important difference, though. Each of these seven exemplar file instance numbers increment by 1 the base instance number; thus "de522801" changes to "de531001", "de522802" to"de531002", "de522803" to "de531003", "de522804" to "de531004", "de522805" to "de531005", "de522806" to "de531006", and "de522807" to "de531007". No matter what instance number you would choose for your own plop creations, these exemplars must end in 1 through 7 in sequence. So, head back to Figure 34 again, and change each of the instance numbers as described. Here's how your directory list pane will wind up.


3. Edit the properties of each newly named exemplar in the file edit pane. This may well be the most daunting part of using the Plopperizerâ„¢ technique. One thing missed and your ploppable just won't work...

...that's the voice of experience talking...

The way to approach this part of the task is methodically. Don't get in a hurry. Don't vary your routine (once you get into one). I'm at the point where I can do one of these in about 15 minutes, but it took a while to get there. Be patient.

Starting from the directory list pane, select the topmost exemplar file, the one ending in instance number de531000, by left clicking on it.


Now you will be looking at this exemplar's properties in the file edit pane. We will be editing the highlighted properties.


The first property we'll edit is the "Exemplar Name". Double left click on it


and the "Property :" edit dialog subwindow comes up.


In the "Values as Text" text input field at the bottom of the subwindow, (1) enter 3RR_TS_Phone_Pole_1bar_orth_Ploppable as the new "Exemplar Name" property. This, changes, obviously, if you are making your own ploppable BAT- enter whatever you named your .dat file. Next, (2) left click the rightmost "Apply" button, then (3) left click the bottom "Apply" button.


Why did ILive name these buttons identically? Dunno.

Next, we'll edit the "Exemplar ID" property. The drill is the same- double left click the property,


to bring up the edit subwindow.


Here's where we first encounter in the Reader something we've seen before- the "0x" prefix in front of our eight alphanumeric character hexadecimal instance number. You just need to watch for this- it was a very common error for me for a while to forget to include this prefix. Enter 0xde531000 which, as you'll note, is the 0x prefix followed immediately by our new base instance number.


  • Of course, we intend to take the next step (beyond perfection, that is) with ploppable seasonal stuff - a topic to which 3RR will return in the weeks ahead.
Personal tools