• Welcome to SC4 Devotion Forum Archives.

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.

Pat

David have you ever heard the noise of daaaaaaar garrh arrrre eeeuuh come from me? Its not pretty at all lol, and exspecially coughing my full head off too don't help the matters any... 

Anywho math? Yea sure my teachers told me that I would use math in RL but who dunk it? Not me gaaah was I an idiot, first the BAT and now Plopperizer... OK so not much with the Plopperizer but a math leasson on Sunday morning before work gaah....  BAT that is another evil for another day hehehehe...  And no not our friend Bat...

My point in this here David I wish I had you as a math teacher cause I actually understood what you was talking about in the Hex...  Ohhh yea btw I think you should still keep track of Pg View counts cause you could amaze yourself one day with over 120 per hour maybe? ohh you know why you gotten over 60 per hour this last 24? Its because everyone wants to learn the knowladge that you pass on sir!!!! Now off to work I go to watch there again today lol....

and with that,

132762

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

Toichus Maximus

I've not run away yet! I'm ready to learn this!

dedgren

#4862
Turning a prop into a plop - A tutorial (Part Five)

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

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

Fig. 12 (again)


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 properties of the exemplar file at TGI number "6534284a  e83e0437  de522800" are displayed.

Fig. 25


Here's the file edit pane for that exemplar.

Fig. 26


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

Fig. 27


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

Fig. 28


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

So, enough preaching... I hope it was to the choir.

On the menu bar, left-mouse click "File" and select "Save as..." from the drop down menu by left-clicking on it.

Fig. 29


Type 3RR_TS_Phone_Pole_1bar_orth_Ploppable into the "File name" entry field of the Save As dialog box and left-click on the "Save" button to create the new .dat file.

Fig. 30


We're on our way!

I hear the lunch whistle, so we'll break here.  Meet you back in Part Six of the tutorial, which is here [linkie].


David

132983



EDIT 2009/01/19:
Fixed the link to part 6 (it was pointing at part 3)
Tage
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

Simpson

Wow great tutorial, thanks for it
Your région is always so beautiful my friend &apls
My new city is now here
The région of Kaikoura

Teaser of Lopsas[+ How did I do it?]:Lopsas

Sheep49

Thanks for the tutorial once again! You showed us the great way to customize the game! :thumbsup:
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

JoeST

#4865
your goint go fast ;D... /me cant keep up

Edit: Well I have caught up (without wikifying pictures and actually rewriting it to be less posty :o and it is found here
Copperminds and Cuddleswarms

threestooges

You know that basic tutorial for the Reader you were wondering about? I think you've almost finished making it. Great work.
-Matt

metarvo

#4867
All right, David! :)  When RL settles down a little, I will definitely look into this tutorial.

EDIT: So, you just had to make us do the work this time?  Now, even ordinary SC4Devotees like me can become a part of 3RR.  This is great! :)
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.

dedgren

#4868
Turning a prop into a plop - A tutorial (Part Six)

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

Having saved our new ploppable telephone pole .dat file

Fig. 31


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.

Fig. 32


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.

Fig. 33


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

Fig. 34


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.

Fig. 35


In the "Instance" text field, (1) type de531000 and (2) left click on the "OK" button to input the change.

Fig. 36


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.

Fig. 37


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

Fig. 38


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.

Fig. 39


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.

Fig. 40


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.

Fig. 41


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.

Fig. 42


When you get to this point, you've edited in all the new file instance numbers in the directory list pane.  That's a good point to take a break. so we'll see you back in Part Seven of the tutorial, which is here [linkie].


David

133243
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

Ennedi

#4869
David... I'm sitting here, reading your tutorial and trying to imagine all possibilities  &idea

Why I must go to work tomorrow?!!!

Maybe there is not the right moment to ask, but I have two questions:

1. As I understand all this ploppable stuff will be placed in the Flora menu. If somebody will create many ploppable items, it will cause a really great chaos in the menu. So, if we are just editing something, maybe it would be good to establish the system of placing particular items in the menu according to our needs? I don't remember which property decides about it, but I guess it would be easy. Am I right?

2. As you said we can make ploppable everything having a model file. So I can make ploppable not only road sign or telephone pole, but I will be able to plop a nice small house too?  ;) But what with it's foundation if I will do it on an uneven terrain? I think it will be important for everything having a base larger than the telephone pole. Again, am I right?

Adam

EDITAdam, when I find you and Chris (Chrisadams3997) commenting here at 3RR on the same day, I figure we must be doing something right.  Thanks so much for the kind words.  As for the questions, I see the same issue, menu-wise, down the road.  There may be a need for both outside structure (ala Geoff's (geoffhaw) management of texture ranges) and innovative menu improvements like Daeley's custom submenu project).  As to the second question, as quick as I'm done with this tutorial, I'm going to see what happens with a large ploppable item- I'll be letting you know. -DE
New Horizons Productions
Berethor - beskhu3epnm - blade2k5 - dmscopio - dedgren - Emilin - Ennedi
jplumbley - moganite - M4346 - nichter85 - papab2000 - Shadow Assassin - Tarkus - wouanagaine

dedgren

#4870
Turning a prop into a plop - A tutorial (Part Seven)

This is the seventh part of the 3RR Plopperizer™ tutorial.

Previous parts can be found as follows:

  Part One [linkie]
  Part Two [linkie]
  Part Three [linkie]
  Part Four [linkie]
  Part Five [linkie]
  Part Six [linkie]

So, let's jump back into this.

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.

Fig. 43


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

Fig. 44


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

Fig. 45


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

Fig. 46


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.

Fig. 47


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

Fig. 48


to bring up the edit subwindow.

Fig. 49


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

Fig. 50


...and left click the "Apply" buttons per Figure 47.

The next property in the exemplar that we'll edit is "Resource Key Type 1".  Double click on it to open it.

Fig. 51


This brings up an edit subwindow much like the one we just saw for the "Exemplar ID" property.  This time, though, it gives us the ability to input three comma separated eight character hexadecimal numbers, each preceded by "0x".

Fig. 52


These numbers, though, are entirely different from any we've seen before, right?  Nope.  You have seen this sort of sequence before, right here back in Figure 7.

Fig. 7 (one last time)


Hah!  It's a TGI sequence in a .SC4Model file.  The one in the edit subwindow, of course, are for the RR crossing sign our example started with.  What we want to do is to enter Matt's TGI numbers for the phone pole, which he has so kindly included as part of his file name.

...but, whoa, you say.  The last "0x" number in Matt's file name only has five characters: "30000".  Shouldn't it be "00030000".  The answer is- it is "00030000"- Matt just simply adopts a convention common to .SC4Model file naming.  He drops the leading zeroes of the instance number- sort of like an abbreviation.  Matt, if you can tell us why this is done (or if any other BATter would know), it'd be great if you'd pass that info along...

Once again, if you are creating a new ploppable here, don't use the phone pole TGI- use the one from your BAT object.  This edit is the one that links the .dat file you are creating to the object's .SC4Model.

So, type in the numbers from the filename: 0x5ad0e817,0x95a502b7,0x00030000 remembering to add in the zeroes to the instance number and to replace the underscores ("_") with commas.  No spaces, either.  And clean your plate.  Did you wash your hands?  Oh, and click the two "Apply" buttons while you're at it.

Fig. 53


Wheesh, this is a long part to this tutorial- and we still have quite a ways to go.  So, stand up.  Take a break.  Stretch your legs.  We'll get back together in Part Eight here [linkie].


David

133499
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

MassHelper

#4871
First of all, I would like to say (I hope I am not too late  :-[):

HAPPY BIRTHDAY, DAVE!

Second, your work is excellent and the single switch would be (and should be) the first great milestone for RAM!!!

:) Mass

EDITMass, hey!  YAGF3RRP! (yet another great first 3RR post!)  Welcome, my railfan friend.  We're gonna get everyone in here sooner or later. -DE
SC4 Modders' Assistant and Adviser

Chrisadams3997

#4872
Adam, the first works identical to item ordering with lots, through the 'item order' property.  Then, any items having the same 'item order' property are order by first the plop cost, then where plop cost is the same, the order they are loaded in (or at least I've always assumed that, never had a reason to properly test it).  Most of my flora uses an item order of 62, which is just above what c.p. uses (which I seem to recall is 64).  Of course if you use one of these two numbers, the ploppables will get mingled in with one of those flora sets, unless you give it an arbitrary low plop cost (e.i. 1 or 2 simoleons) to force them to order afterwards.

EDITChris, thanks for the info!  My take on menu item order comes up in Part Eight of the tutorial here [linkie]  I do things a bit differently, but in a way I think is completely compatible with your method. -DE

EDIT: Hey David, I've got a guess, but I'll keep my mouth shut, that way I can't be wrong and we can all just assume I was right, lol.  I actually know what'll happen with larger models already, maybe tonight I'll get to a quick post on that for you and Adam. -CA

JoeST

#4873
Right, so thats atleast another 2 posts for me to create XD, could you possibly send me the pictures? :) Naw you dont need to, I have an idea (:o) :D

Joe
Copperminds and Cuddleswarms

thundercrack83

Just wanted to stop by and say that you're doing excellent work here with the tutorial, David! A little over my head from what I've glanced at thus far, but excellent work, nonetheless! Perhaps I'll delve into and play around.

Take care, my friend! Hope you're doing well!

Dustin

ejc

single side-spur railtracks  &hlp

TheTeaCat

 A quick flying visit  to say hello and what do I find?
Lots of new amazing stuff, Think I'll have to save this latest tutorial for offline viewing.
Loads of info to absorb but I do believe I understood it all on the first read. :o
Just gotta try it when I get the chance ::)

Wonderful work on the single rail track too.  &apls &apls

So glad I popped in

regards
Derry

Kettle's on. Milk? Sugars?    ps I don't like Earl Grey  $%Grinno$%
Reduce, Reuse, Recycle - If you're not part of the solution , you're part of the problem!
"Never knock on Death's door: Ring the bell and run away! Death really hates that!"
Tales at TeaTime      Now A proper NUT      TTC plays GRV II

Glazert

I go away for the weekend, and what do I find? Some great work on single-track rail, but also fully seven parts of a meticulously detailed tutorial which is not only incredibly useful, but has an injection of your humour. Maybe I should go away next weekend as well . . .

bat

Wonderful work on these three new parts of your useful tutorial!

134014 views

dedgren

#4879
Turning a prop into a plop - A tutorial (Part Eight)

This is the eighth part of the 3RR Plopperizer™ tutorial.

Previous parts can be found as follows:

  Part One [linkie]
  Part Two [linkie]
  Part Three [linkie]
  Part Four [linkie]
  Part Five [linkie]
  Part Six [linkie]
  Part Seven [linkie]

Here we go again.  I have a medical procedure this morning, so depending on how I feel this afternoon, we may be able to wrap this up today.

Let's do a check on learning here.  Right now, if you are creating our one bar orthogonal phone pole prop, your file edit pane should look exactly like this

Fig. 54


and you will have just changed the three highlighted entries in the "Values" column.

Good to go?

OK, so let's move on to the next edit.

* * *

Back from the Roto-Rooter™ colonoscopy procedure I had done this morning.  We'll just let that one go.

The next property we'll edit will be "Flora: Cluster Type".

Fig. 55


Before we double left click on it, though, let's talk about what we're doing by editing this property.  Remember back shortly after we started this tutorial, I indicated that Chris (Chrisadams3997) had let me know about a technique that gives you multiple chances at getting your ploppable in the correct orientation when you place it.  This matters for things like road signs and phone poles, which might otherwise wind up sideways or backwards, and in particular if the BATted object is offset from where you click to plop it.  Chris's technique gives you up to eight plops to get it right, and I'm here to tell you that it works like a charm.

But what about stuff that we don't care about the orientation of, or where random placement along one of four cardinal orientations is even a good thing?  I'm thinking in particular about trees being made ploppable.  I'll just note here, and will return to the subject in the near future, that eliminating these three "Flora:..." properties

Fig. 56


and all but the topmost exemplar in the directory list pane

Fig. 57


and completing the rest of the edits I'll be describing in the remainder of this tutorial will leave you with a completely functional single click ploppable.  As I said, more on this later.

So, we double left click on the "Flora: Cluster Type" property we noted in Figure 55 and yet another edit subwindow comes up.

Fig. 58


This is a single 0x-eight character hexadecimal number like we saw back in Figure 49.  In fact, the hex part is the base instance number for our RR crossing exemplar "de522800" with a single exception.  The final (rightmost ) character is "1" instead of "0".  This is exactly the template we will use in replacing it.  We'll type in to the "Values as Text" text entry field "0x" plus our new phone pole base instance hexadecimal number incremented by "1", hence 0xde531001.

Fig. 59


If you are creating your own ploppable BAT object, you will of course increment the base instance number you created by "1".

Now, let's look at what you just referred to in making that edit.

Fig. 60


Well, well.  It's the instance number of the next exemplar in sequence in our directory list pane.  So what are we doing here?  I'll cut to the chase- the "Flora: Cluster Type: property refers from the exemplar where it is found to the next exemplar in the list- it, in effect, calls that exemplar when there's another mouse-click attempt to place the plop.  As you can see from Figure 57, you'll get seven more chances after the first one.

Fig. 57 (again)


Pretty neat, eh?

The next file edit pane property that we'll edit is the "Item Icon" value.

Fig. 61


This is done in exactly the same way you edited the "Exemplar ID" property using Figures 49 and 50.  Simply double left mouse click on the property, then type 0xde531000 in the "Values as Text" field, click on the "Apply" buttons and you're done.

Next (there's only a few more), we'll edit the "Item Order" property.

Fig. 62


Our great friend Chris (Chrisadams3997) posted a bit ago giving us his take on ordering the icons in the "Flora" mayor mode menu [linkie].  His method strikes me as elegant- mine as subtle as a sledgehammer.  The choice, of course, is yours.

Remember this?

Fig. 24 (again)


The last column is headed "Menu #" and that's exactly what it sounds like.  What I've done is, as nobody appears to be currently occupying anything that far down the list of "ItemOrder" values (i.e.: Menu #s) taken, simply decided that 3RR, for all of its ploppables, will use the 1,000 possible slots between (decimal) 11,000 and (decimal) 11,999.  Each ploppable, in fact each orientation (orth, diag, FA18, FA71)of the ploppable, will be assigned its own ItemOrder value.

But wait a minute, you say!  Won't we run out of available menu number slots on the mayor mode "Flora" menu?  Well, not likely, and other practical realities will almost certainly limit us, absent a breakthrough in menu modification technology, before we do.  You see, "ItemOrder" values have an upwards limit, per the Reader, of (decimal) 10,000,000.

Fig. 63


So, presuming the Reader is correct (and I've heard somewhere that there might be issues with the use of extremely high values for menu numbers), even if you leave out everything up to 10,000 as taken (and I can assure you that it's not) and 3RR occupies from 11,000 to 11,999, there are are many thousands of other slots available.  And, the game (for once) is also forgiving here.  If you assign an "ItemOrder" value that is already taken, the icon for your ploppable will simply either show up immediately above or below the icon for the identically numbered item that is already there.

The practical limitation, of course, is that even many tens of items on any mayor mode menu are enough to drive you crazy. For now, we'll punt that issue down the road.

Ahhh, but there's another issue, you say.  I promised you wouldn't have to do any decimal to hexadecimal conversions, and here the "ItemOrder" under the "Value"column of Figure 63 above: "0x00002E18", is clearly a hex number.  Well, stop worrying.  The Reader does this job for you.  Double left click on the ItemOrder property and you'll bring up a very familiar-looking edit subwindow.

Fig. 64


You can see that the "Values as Text" entry field has, as usual, the current property value appearing in it, and that value is in our old familiar "0x" plus eight character hexadecimal number format.  So, what gives?  How do you get from our decimal menu number to its equivalent in hexadecimal?

Well, start (1) by typing in this decimal number: 11900.  This is the menu number that we will start our ploppable phone pole set off with.  Now, another check on learning...

...where will the phone poles appear in the mayor mode "Flora" menu with respect to the 3RR ploppable signs?... 

If you thought "before," go back and take another look at Figure 63 above.  There's, I'll note, no shame in that- this is probably about the most complicated "general audience" tutorial that's ever shown up- I apologize for that, but the results I think will be well worth it.

Next, (2) left click on the the right-side "Apply" button.

Fig. 65


Well, isn't that something...

Your "11900" was (1) instantly converted in the "Values as Text" field to its "0x" plus eight character hexadecimal equivalent: "0x00002E7C".  All you have to do is (2) left click on the lowermost "Apply" button and this property is set.

Fig. 66


Now, I'm going to presume once again here, in the interest of time.  You have the values of three more properties to edit: the "Item Button ID", "User Visible Name Key", and "Item Description Key".  In each, you'll be editing the value "0xde522800" to read "0xde531000" (or, if you are creating a different ploppable BAT object, you'll edit in "0x" plus the eight character hexadecimal base instance number you've selected).

Fig. 67


These are the same sorts of edits you've been doing all along, just double-left click the property, enter the new value into the proper place in the "Values as Text" entry field, left click the "Apply" buttons and you should wind up, if you are doing the phone poles, with a file edit pane that looks just like this one.

Fig. 68


For the nervous, here's the only values you should have edited.

Fig. 69


Now, there's nowhere to save the changes you make to the properties in the file edit pane- they simply take as you go along.  I do recommend, though, if you are confident in your work to this point, that you left click on the "Save" button on the task bar.

Fig. 70


This wraps up editing the topmost (the "base instance") exemplar in the directory list pane and is a good place to conclude this very long Part Eight of the tutorial.  Part Nine is here [linkie], and we'll see you there in a bit.


David

134463
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