Menu

LEX File Exchange
EA Support Files
SC4 Wikipedia
Network Addon Mod
Dependencies
Chat
Welcome to SimCity 4 Devotion. Please login or sign up.

August 13, 2022, 05:02:48 AM

Login with username, password and session length

Downloads

Three Rivers Region

Started by dedgren, December 20, 2006, 07:57:49 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

Jmouse

Anxiously awaiting the next step. The FAR/FARR methods and some of the other 3RR innovations are a bit over my head, but I can identify with BAT models!

Later...
Joan

art128

Nice work David :thumbsup: I can't wait the next part  &apls
I'll take a quiet life... A handshake of carbon monoxide.

Props & Texture Catalog

girlfromverona

Hope you're feeling ok after all that medical stuff, David! Sorry I haven't checked in much lately - work has been horrendously busy (and will be for the next few weeks). Looking forward to trying out that tutorial when things calm down a bit, though.  :thumbsup:

deathtopumpkins

Nice tutorial so far! I might just have to try plopperizingTM some stuff myself when it's done.
NAM Team Member | 3RR Collaborater | Virgin Shores

dedgren

#4844
Turning a prop into a plop - A tutorial (Part Two)

This is the second part of the 3RR Plopperizer™ tutorial.  Part One is here [linkie].

So, we were here.

Fig. 7 (again)


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

Fig. 8


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

Fig. 9


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.

Fig. 10


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™ 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: 

3RR_TS_Road_Sign_RR_Crossing_ortho_Ploppable.dat

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

Fig. 11


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.

Fig. 12


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

Fig. 13


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.

Fig. 14


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.

We're going to go ahead and break here for Part Three of the tutorial, which is here [linkie].


David

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

**  A 3RR Regular, as you know well by now, is anyone who has ever posted here or over at 3RR-ST at least once and, for the purposes of this tutorial, all you lurkers out there, too.

131152
D. Edgren

Please call me David...

Three Rivers Region- A collaborative development of the SC4 community
The 3RR Quick Finder [linkie]


I aten't dead.  —  R.I.P. Granny Weatherwax

Skype: davidredgren

JoeST

#4845
Hey David, thats a great tutorial, and I do agree with you about the nameing convention. you should maybe change the first link to the reader to the wiki article ;) ;D. and cant wait for more of the tut.

so, are we going to see a copy of this tutorial over at the wiki? if not by you do you give me and the wiki-team permition to copy and wikify your tutorials for use by the wiki?

Joe

EDITHey Joe (whoa, I hadn't thought of that song for years [linkie]- I like Patti Smith's [linkie] version the best) use away!  Anything you want to port from 3RR to the Wiki, or for that matter anything else I've posted at SC4D or at ST, be my guest! -DE

EDIT: thanks for the quick reply :) and I sure will start trawling for gems (ie everyone of your posts :D) and updating them for wiki usage.. also Hey Joe is a great song (I am a fan of Hendrix, he is a legend) and have it on my MP3 player :)
Copperminds and Cuddleswarms

threestooges

#4846
Part one was very well done. Very methodical yet with a touch of humor (a spoon full of sugar perhaps? link). I'll be looking forward to the next step of the process. Perhaps it will aid in my testing of models. Also if anyone is interested in the process of .desc creation and the lot editor, take a look at this tutorial.

Hope you're feeling a bit better now David. Take it easy and I'll be back to check on the tutorial's progrss.
-Matt

EDITMatt, I've edited Part One to point folks at your tutorial, which is comprehensive and extremely easy to follow.  I knew I'd seen it, but couldn't remember where.  Thanks for reminding me. -DE

metarvo

#4847
Quote from: dedgren on September 19, 2008, 11:50:41 PM
(and skilled BATters, such as our good friend metarvo)

Well, I don't know about that.  I'm just trying to get into BATting, but I appreciate the compliment, David.  You are too kind. :)

This is a handy tutorial, David.  I probably need to read it again to get familiar with it, but you have succeeded once again in making a mysterious concept seem easy.  Of course, I'm not sure what kind of effect the PlopperizerTM would have on the poles that I BAT, since they are quite large.

I am also impressed with the single track rail.  I knew that a quick trip to 3RR would revitalize it.  For a while there, it looked like it was the end of the (rail  :D) line for the single track rail.

Don't overwork yourself, David.  You need to recover properly.  Although, I'm sure it will be hard for you to resist being amazing.

EDITHeh, my friend- a very large BAT just makes...

...

...

...wait for it...

...


...

...a very large plop!  Thanks for the kind words- I do feel much better this morning
. -DE
Find my power line BAT thread here.
Check out the Noro Cooperative.  What are you waiting for?  It even has electricity.
Want more? Try here.  For even more electrical goodies, look here.
Here are some rural power lines.

Pat

David I am glad you are doing better today and hope you truly are feeling better...  I hate test and exspecially having to stay in the hospital over night for them... The single track is looking real good and I'm excited to see the posting of the plop tut!!!  Ahhhh those now famous words "posting as I go as of .........  AST (GMT-9) and also "check back later if you're seeing this message"  well i cant wait to see what part 2 holds for us.....





131304

Don't forget the SC4D Podcast is back and live on Saturdays @ 12 noon CST!! -- The Podcast soon to Return Here Linkie

dedgren

#4849
Turning a prop into a plop - A tutorial (Part Three)

This is the third part of the 3RR Plopperizer™ tutorial.  Part One is here [linkie] and Part Two is here [linkie].

When we last left off, we were looking at the Reader's directory list pane.  We'll start with column 1: "Entry".

Fig. 15


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

Fig. 16


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.

Fig. 17


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

Fig. 18


I feel obliged to give folks who haven't worked with hex numbers the briefest explanation of them...

...whoa, whoa!  You folks running away!  I promise I'll make this short and relatively painless.  It'll help to know this- promise...

...if you are a hexadecimal master, we'll see you in just a minute.

All hexadecimal (as we'll refer to it from this point) is is counting in a difference base system.  Remember "Base 2" from junior high and middle school...

...all I can remember is the end of recess and awkward dating...

...you know: 0=0, 1=1, 2=10, 3=11, 4=100, 5=101, and so on.  Foundation of the computer age and all that.  Lots of ones and zeroes.  Rings a bell, eh?

Well, hexadecimal is counting in Base 16.  Now, before you go crazy wondering how they do that (not to mention why, which we'll get to in a minute), I'll simply tell you.  Hexadecimal adds to the numerals 0-9 the alpha characters A-F to make up a number.  So

0=0, 1=1, 2=2, 3=3, 4=4, 5=5, 6=6, 7=7, 8=8, 9=9 (and here's where it gets interesting) 10=A, 11=B, 12=C, 13=D, 14=E, 15=F (and here's where it gets weird) 16=10, 17=11, 18=12, 19=13, 20=14, 21=15, 22=16, 23=17, 24=18, 25=19 (and here's where it gets positively scary) 26=1A, 27=1B, 28=1C, 29=1D, 30=1E, 31=1F, and...

...here's where Elvis leaves the building...

...well, if you figured out that 32=20, let's just say you now understand hexadecimal better than I did for many, many years.  Let me throw a few more at you.  100=64, 253=FD, 1067=42B.  And, just for grins, 3729926144=de522800, our "instance" hexadecimal number last noted above.

Now, are we going to expect you to do do hexadecimal calculation in order to create ploppables?  Absolutely not! There's just one thing you need to understand out of all this- only the digits 0-9 and alpha characters A-F can be used in hexadecimal to make up a number.  It would take Base 36 to have "PB11X36A" be a valid number, as "P" and "X" are not valid hexadecimal alpha characters.

n.b.: If you find yourself wanting to convert decimal numbers into hexadecimal, and vice versa, the Reader has a conversion function.  For simplicity's sake, though, just use the "Scientific" calculator that comes with Windows for occasional conversions.

Fig. 19


So, now that you can count up to F, why in God's green earth would anyone bother?

Have you ever wondered how it is possible that thousands (my guess) of folks have created custom content for the game over the past five years or so and you almost never hear of one creator's contribution conflicting with another's?  Let's make some educated guesses- I think the number of BATs created for the game out there probably number in the low 10,000s.  That's because the total number of uploads to the STEX, which is the largest exchange, is just over, as of about five minutes ago, 12,200.  The LEX accounts for another 1,800 or so.  Let's say, then, that the total number of BAT objects created out there is about 25,000.  Now, just for the sake of argument, let's say that each was ploppable, and you somehow had each one in your plugins folder.  Each one of these, then, would have (at least) one instance number associated with it.

Remember our "address" analogy we used back in Part Two?  One eight alphanumeric character hexadecimal instance number references 4,294,967,296 possible locations.  That's over four billion possibilities, for those of you who are, like me, prone to brain freeze when you see a number longer than seven figures.

Now, the way to sum this up is basically, out of four billion possibilities if you have 25,000 random choices, what are the chances that two of those choices will be the same?  Wikipedia calls this a a statistical "collision problem" [linkie] and sums up the math as follows. 

Fig. 20


Not that, as I've admitted, I'm a real math giant or anything but I know the answer to this one without even doing the calculation...

...real d-mn small.

Now,you've probably figured out that SC4 uses TGIs for lots of things in the game, so what effect might this have, however small?  The answer is that we just looked at the effect of changing the instance number.  There's also about four billion possible "group" numbers and another four billion "type" numbers.  That's, glossing over a lot of picky details, about four billion cubed, or 79,228,162,458,924,105,385,300,197,375 different discrete addresses.  Now, a few of you might have a really, really big plugins folder, but I still don't think you have anything to worry about.

So, hexadecimal is used for SC4 TGI numbers because, in just 24 alphanumeric characters, it creates an effectively infinite number of entirely separate ways to refer to things in the game.  Neat, huh?

I'm winding up Part Three here, because I know everyone wants to wrap a cold towel around the head after all that math.  You'll find Part Four here [linkie].


David

131555
D. Edgren

Please call me David...

Three Rivers Region- A collaborative development of the SC4 community
The 3RR Quick Finder [linkie]


I aten't dead.  —  R.I.P. Granny Weatherwax

Skype: davidredgren

JoeST

#4850
Let me say again Thankyou very much for allowing us to use your content on the Wiki. I have started copying over this tutorial (linky) but could do with some help getting the best tutorials of the past up. and also David: could you possibly upload your images direct to the wiki instead of to imageshack? just means I can be lazy and not have to upload all the images :)

Joe

EDITJoe- Referring to you and writing the word "lazy" in the same sentence would never occur to me- that is some major work you folks are putting in on the SC4 wiki [linkie].  We'll talk about the pics at some point, my friend. -DE
Copperminds and Cuddleswarms

threestooges

#4851
Looking good as it goes David. One thing I noticed in part 2 (correct me if I'm wrong) but the line of text just before fig 14 refers to the Loaded File Pane (#3 in fig. 13) but the image in fig. 14 appears to be the Directory List Pane (#4 from fig. 13). Just wanted to check in case there was a conflict. Great work on this, especially considering what you've been doing lately. Take it easy.
-Matt

EDITMatt, you're a 3RR Fact Checker from way back, so you know that the reward is simply more work in the salt mine.  Thanks, my friend- fixed! -DE

EDIT:  Oh good, now I can check that off my grocery list. I have to say, I think you've finally cleared up hex notation for me. I've read a few other descriptions of it, but this one made sense (then again, this one didn't deal much with calculations... though why you would need that for SC4 is beyond me). It may be my economics background, but I enjoyed update 3.
-Matt



un1

 :o :o &apls &apls

Absolutely amazing dedgren. I simply love the work you are doing.

-un1

dedgren

#4853
I'm going to pop in and note, that since my post made about this time last night [linkie], 3RR has had over 1,500 page views.  That's a few over 60 an hour, or ONE A MINUTE.  That's so far beyond the previous record that I don't know whether to keep track anymore.  It never can be trite to say it- you folks are truly amazing!

There's light at the end of the tunnel with the tutorial.  I'll be finishing up Part Three in a few, and will get Part Four, which reaches the good stuff, done before bed.

Thanks again, my friends.  Later.


David

132100


D. Edgren

Please call me David...

Three Rivers Region- A collaborative development of the SC4 community
The 3RR Quick Finder [linkie]


I aten't dead.  —  R.I.P. Granny Weatherwax

Skype: davidredgren

Grneyes

David,

It's great that stuff is being made ploppable. Always having to have a tile for something is a waste of space. I don't know why they made trees ploppable, but other stuff not.

MaryBeth

dedgren

#4855
Turning a prop into a plop - A tutorial (Part Four)

This is the fourth part of the 3RR Plopperizer™ tutorial.  Part One is here [linkie], Part Two is here [linkie], and Part Three is here [linkie].

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?

Fig. 21


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.

Fig. 22


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.

Fig. 23


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.

Fig. 24


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 [linkie]) 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 [linkie].


David

132363
D. Edgren

Please call me David...

Three Rivers Region- A collaborative development of the SC4 community
The 3RR Quick Finder [linkie]


I aten't dead.  —  R.I.P. Granny Weatherwax

Skype: davidredgren

Sheep49

David, That's a very useful tutorial, you know.

Thank to you, Reader will be some-what useful for me. ;)

Keep up the good work. I can't wait for the update!
Piotr
Polish support forum - Cafe Poland * SC4Wiki! * My BATting thread

I am he, as you are he, as you are me and we are all together... - I Am The Walrus, The Beatles

bat

Belated Happy Birthday from me here...

And it's a very good and useful tutorial there, also nice work! :thumbsup:

Pozzessed

#4858
I come in here on a quiet Sunday morning (birds singing, sun shining ....) to get my daily fix of 3RR and what do I get?? MATH! Sheesh, now my brain hurts  :D
     I am one of your many lurkers (admirers) but I guess it's time to come out of the closet. Although I rarely post anything, anywhere, I just have to tell you how wonderful this all is .. you're our 'Captain Kirk' taking us 'where no (wo)man has gone before'. Who needs simcity 5!
Now, I'm going to make coffee, take an aspirin, lurk for a little while longer and then warp into Spring Grove .. I'm playing along too  ()stsfd()

Oh, before I go .. please call me Roz ...

EDITRoz, I will do that.  Thanks for a great first-time 3RR comment! -DE
Please call me Roz.
Visit my BAT thread .. http://sc4devotion.com/forums/index.php?topic=11464.0
The Beginning of Knowledge, Is the Discovery of Something We Do Not Understand ...

I Refuse To Have A Battle Of Wits With An Unarmed Person.

art128

Amazing tutorial david  &apls fabolus work  :thumbsup:
I'll take a quiet life... A handshake of carbon monoxide.

Props & Texture Catalog