• Welcome to SC4 Devotion Forum Archives.

Converting a Ploppable into a Growable lot

Started by Andreas, October 01, 2007, 07:33:56 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andreas

Ever so often, I encounter a nice download that doesn't come as a growable, but only a ploppable, for whatever reasons. A frequent question is how to convert such a file, and since I didn't find a tutorial about this subject at SC4D, I made my own tutorial, based on a ploppable lot that I wanted to convert into a growable. This tutorial can also be used for the other way round, with a few alterations, but for the sake of simplicity, I won't show them here.

Anyway, let's start with the tutorial. Among my downloaded files, I found a nice little Budweiser beer stand that was created by jestarr a long time ago, and since the download only included a ploppable lot, I thought it would make an excellent example. But first, here are some basics that you should take care of when working with SC4 files:

Clean out your plugins folder from all unnecessary files, that means leave only the model, lot and descriptor file from your lot in there, along with the necessary dependencies. You don't have to move your files manually, because the SimCity 4 Startup Manager (SUM) provides some excellent tools to take care of that. Start up the SUM and click on "Configuration" to enable the development profiles.



This will enable an additional button on the left. Don't close the window yet, but click on "Edit development profiles..." to create a special profile for editing SC4 files.



As you can see, I moved all props and textures to a special folder, but it doesn't really matter where they are located. All you need to do is to select the (sub-)folders that contain the dependencies that are needed, and deselect everything else. This will prevent "false dependencies", and it also speeds up the loading time of the modding tools (and SC4, when you test your new lot). Once you selected everything as desired, close the window and click on the blue "Develoment Profiles" button at the left. Your new profile will show up in the list. Click on it to start the SUM.



Oops, what's that? A tiny window that says "running", but you can't see anything?! Don't worry, that's exactly how it should look like. This window is the "File System Control Manager" (FSCM) that hides all deselected folders from any applications, even Windows itself. If you take a look at the plugins folder with the Windows Explorer, you can see that most of the folders have a red arrow. In the FSCM window, there are two buttons at the bottom, but the interesting one is the icon in the middle. If you click on that icon, a small list will pop up and show a selection of programs. You can edit this list by creating shortcuts to your favorite modding programs in the folder "\Program Files\SimCity4 StartupManager\Shortcuts" (or whereever you have the SUM installed).



What we need now is the SC4 Plugin Manager (PIM), in order to create a new SC4Desc file. The shortcut to the PIM should be there by default, if not, add it manually by creating a new shortcut in the "Shortcuts" folder and run the SUM again. The SC4Model of the beer stand should have been placed in the root of your plugins folder, then it should show up in the PIM. The ploppable beer stand was CS-$, so drag the model to that entry on the list on the left.



A new window will pop up where you can edit the suggested values. For a very small model, you can take those values, but unfortunately, Maxis screwed up the templates, so the larger the model gets, the more skewed are the stats. When I tried to create a new growable with jestarr's Redwing Mill, the PIM suggested 13,800 jobs and garbage values that went in the hundreds! Such a lot will never grow in the game. But where can we get proper stats?

 

Luckily, the stats of the ploppable beer stand are listed in the readme file, and if your file doesn't list them, you can use the Building Database that comes with SC4Tool as a reference. Just pick a similar building and look up the values. For the beer stand, I selected "Cecilia's Greasy Taco Stand" as a reference. Since jestarr provided some balanced stats, I just used those - and 5 jobs seem to be a bit more appropriate for such a small building than the 18 that the PIM suggested.



After the SC4Desc file is created, close the PIM and start up the Lot Editor (LE). Pick a suitable lot from the list, in this case a commercial service lot, low wealth, stage 1, lot 2x1. The "CS$1_2x1" tells us that this is a proper lot for this. It doesn't really matter which lot you select, but it should be as close as possible to the lot you want to create - the closer it is, the less you have to edit afterwards.



We don't need to do any editing right now, just save the lot under a new file name ("Save as..."). I used the name that the PIM showed in the "Exemplar Name" property. This will give us a properly named lot file that contains the same information that I explained above. When you're done, close the LE.



Now comes the part that is a bit more complicated, but with this tutorial, you shouldn't run into too many problems. Open the old ploppable lot file with ilive's Reader and click "Fill the list". Pick the Exemplar file in the list on the left. The "Exemplar Type" entry on the right should tell you that this is a lot exemplar file. Further down, there are a large number of "LotConfigPropertyLotObject" properties. This is the actual lot layout which we're going to copy to the new lot, rather than creating one from scratch. Entries starting with "0x00000001" (red) are props, "0x00000002" (green) are textures and "0x00000000" (blue) is the reference to the building model. Select all "LotConfigPropertyLotObject" entries, right-click and select "Copy properties" from the popup window.



Now open the new (growable) lot that we created and click on the lot exemplar file. Select all "LotConfigPropertyLotObject" properties, right-click and delete them. Right-click again and paste the properties that you just copied from the other lot. Depending on the size of the lot, this might take a few seconds. Now look for the entry that starts with "0x00000000". We will have to change this to the ID of the new SC4Desc file that we created before. Have a look at the filename, it should show three IDs that are separated with hyphens (" - "). We will need the last one, so copy this and double-click the "0x00000000" entry. Go to the "Values as text" box at the bottom, move the cursor to the far right, and replace the last value with the ID that you just copied from the filename (1.). Then click on the "Apply" button to the right (2.) and finally the other "Apply" button at the bottom (3.). It is important to reindex the LotConfig now, do another right-click on the properties list and select "Reindex Lot Config" from the popup menu. Don't forget to save the lot afterwards, then exit the Reader.



Your growable lot is basically ready now, let's try if it actually works in the game. A handy thing for testing lots is the BSC No Maxis Files mod that blocks all Maxis buildings. Put the files that block the Maxis commercials in your plugins folder and start SimCity 4. Since the beer stand is the only commercial that can grow now, it should do so easily if you zone a commercial lot in the appropriate lot size. If your lot doesn't show up, it's probably configured for medium- or high-density zones, only, based on the template lot that you chose in the Lot Editor. As you can see, it worked fine in my example, the lot grows and shows up properly, including the original lot design. :)



Let us query the lot now and see if the stats are ok. As you can see, it has the 5 jobs that we gave it before, but the lot name doesn't look very pretty. Don't worry, this will be changed later, as well as the zone density issue.



Exit the game and open the lot with the Reader again. Select the lot exemplar file and look for the "LotConfigPropertyZoneTypes" property. As you can see, it contains the values "0x05" and 0x06", this means medium and high density commercial zones. We want the lot growing on low-density commercial zones only, so we enter "0x04" in the "Values as text" field, followed by clicking the "Apply" buttons. Just as a reference, 0x01/0x02/0x03 would be low/medium/high density residential, and 0x07/0x08/0x09 would be farming/medium/high density industrial zones.

For safety reasons, you can delete the "LotConfigPropertyFamily" property. This is a reference to a Maxis lot family, but since you created an individual lot, you should prevent it from showing other buildings. Personally, I didn't encounter any problems when leaving this property intact, but the BSC recommends it as a measurement for preventing errors.



One thing that is useful to reduce clutter in your plugins folder is copying the building exemplar file that is located in the SC4Desc file and moving it to the SC4Lot file. So open the SC4Desc file, right-click on the exemplar file, select "Copy file(s)" from the popup menu, then switch to the SC4Lot file (you can easily keep it open in another Reader instance), right-click again and select "Paste file(s)".

If you want, you can also edit the tile sets in which the lot should show up. Select the building exemplar file, and then double-click the "OccupantGroups" property. "0x00002000" is the Chicago tileset, "0x000020001" New York, "0x00002002" Houston and "0x00002003" the Euro tileset. Let's assume you want to restrict the Budweiser stand to the American tilesets, so simply select the last ID from the list and click "Remove". Don't forget to press "Apply" again and save the lot file.



As mentioned before, we should give the lot a proper name. The best method of doing this is adding an LTEXT file, which can either be done manually, or we can use another modding tool for this step. I recommend using LEProp, since it's very easy to use. The good thing by copying the building exemplar file over to the lot is that you can edit it with LEProp now, although LEProp is mainly intended for ploppables. Open the lot file in LEProp (1.), enter an appropriate name in the "name" field (2.), click "Apply" (3.) and then "Save DAT" (4.). That's it. :)



Now let's do a final test in the game. Start SC4 again, zone a 2x1 commercial lot (this time a low-density one), and let the game run. If you still have the Maxis blocker in your plugins folder, your beer stand should grow immediately, if there's enough CS-$ demand. You should delete the obsolete SC4Desc files afterwards, since it's not longer necessary, and of course you can also remove the ploppable lot from your plugins folder now. Only the SC4Model file has to be kept.
Andreas

Pat


Andreas thank you so very much for taking the time to do this tutital on plop to grow lots....  This is easy to understand and following it aint that hard at all... 

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

Pat

QuoteDepending on the size of the lot, this might take a few seconds. Now look for the entry that starts with "0x00000000". We will have to change this to the ID of the new SC4Desc file that we created before. Have a look at the filename, it should show three IDs that are separated with hyphens (" - "). We will need the last one, so copy this and double-click the "0x00000000" entry. Go to the "Values as text" box at the bottom, move the cursor to the far right, and replace the last value with the ID that you just copied from the filename (1.). Then click on the "Apply" button to the right (2.) and finally the other "Apply" button at the bottom (3.). It is important to reindex the LotConfig now, do another right-click on the properties list and select "Reindex Lot Config" from the popup menu. Don't forget to save the lot afterwards, then exit the Reader.

Im having troubles with this section.....



where am i supposed to look for the info to copy from the new Desc File i created to put into the new lot file?

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

Andreas

You don't need to open the SC4Desc file for looking up the ID. All you need to do is having a look at the filename, it ends with the series of ID numbers (the inset with the red frame in the lower right corner of my screenshot). Copy the last of the three, and change the last REP of the "0x00000000,..." Lot Config property, as described in my tutorial. But since you have the SC4Desc file open anyway, take a look at the exemplar file's ID in the list on the left. The "Type", "Group" and "Instance" IDs should be the same as the ones indicated in the filename.
Andreas