Add Any Lot Size (edited 01/16/2014)

Picked Upload! This is a picked upload! It showcases some of the best talent and creativity available on MTS and in the community.

01/16/2014: still works with 1.66
10/18/2013: still works with 1.63
09/04/2013: still works with 1.57
07/07/2013: added v1.0.3 in the uploads for those that aren't fully patched. If you have patch 1.50 or earlier download that version.
06/19/2013: v1.0.4 updated mod to fix code changes in patch 1.55. The patch added the ability to set the lot type and sub lot type for each preset and set a product version, though this function doesn't seemed to be used at the moment. For now the mod adds all new lot sizes as normal residential lots. Is there interest for (optionally) configuring the lot type when adding new lot sizes?

Note 02/20/2013: still works with 1.50
Note 01/22/2013: still works with 1.48
Note 01/09/2013: still works with 1.47
Note 10/31/2012: still works with 1.42
Note 09/27/2012: still works with 1.39
Note 09/11/2012: still works with 1.38
Updated 03/17/2012: v1.0.3 updated mod to allow optional removal of default EA lot sizes
Updated 03/12/2012 (again) : v1.0.2 fixes issue with loading/starting a world after switching back to main menu. I'm very sorry for the inconvenience. Many thanks to anie_1981 for the report!
Updated 03/12/2012: updated the mod to allow adding your own icons for the default sizes

EA adds new community and/or residential lots in every expansion. Unfortunately the sizes of those lots can be completely random. Or even if they're not random, they could be 40x30, which is not available in the World Editor.

This script mod will allow you to add any size (from 1x1 to 64x64) to the World Editor from the cheat console:

Usage
Press Ctrl + Shift + C to bring up the cheat console. Then type "AddLotSize [width] [height]", e.g. "AddLotSize 32 29" without quotation marks. When you now switch into the World Editor, you should see the new lot size with a lot symbol with a question mark. Hover over the symbol to see the size in a tooltip popup.

The additions to the World Editor are not persistent between game sessions. However, pre-configured lot sizes will be added every time the mod is loaded. By default these are the lot sizes 40x30 and 50x40.

Tuning Options

If you want to change the default sizes that should always be added and you know how to modify .xml resources, you can change the VelocitygrassAddAnyLotSizeTuning.xml (Instance: 0xE5953153E5365909) in the package.

You'll find the following line in the .xml which you can adapt to your needs:

Code:

<kVelocitygrassLotSizesForEditWorld value="40x30, 50x40" />

Note: Buzzler has short instructions for making such changes here in the description. If you need support for this, please check the tutorial on XML Tuning Mods and post in the thread that is linked at the end.

You can also add your own icons for the default sizes:

Create a .png image of size 44x44 pixel for each of your default lot sizes

Open the package in S3PE and add each of the lot images you created:
To import your .png images in S3PE, click Resource -> Import -> From file...
Then select your file and fill in the following dialog. You should select the proper type, copy the icon name into the Name field and then click the FNV64 button, which will generate the correct Instance for you. Please make sure that these are unique names. Best include your username and the lot size in the name of your icons.

Edit the .xml with your default lot sizes and the names of your lot images

where "myname_lotsize_40x30" is the icon name of the icon for the size 40x30.

Note: You can still add lot sizes via the cheat console, but they will always have the lot size icon with the question mark.

To remove the default EA lot sizes set the following to true:

Code:

<kVelocitygrassClearExistingLotSizesForEditWorld value="false" />

Additional information

This is a scripting mod. It should not conflict with any other mods and should be safe to remove at any time.

This script was built for patch level 1.33, but a first version of it was done for patch 1.22, so it could also work in earlier versions, though I can make no guarantees.

Additional Credits:
Thanks to Peter and Inge Jones for S3PE, Inge Jones for the tuning mod to change lot sizes, armiel for Builder's Island - DIY, Buzzler for his mini-tutorial, which I shamelessly linked to, and the creators and maintainers of the XML Tuning mod tutorial.

@TickleOnTheTum: I had already implemented this for myself before I even heard that Awesomemod has this feature (I don't use Awesomemod myself). But thanks for pointing it out to others. As for adding unique images: This is technically no problem if you don't want to add sizes dynamically (because the image resource needs to be in the package file). If you (or others) want it, I could modify the mod so that it allows you to add default images along with the default sizes. You'd have to edit the .xml and add the image resources to the package yourself, though.

@yannickvanloon: TickleOnTheTum was trying to be helpful and expressing a wish, both of which is perfectly fine and does not warrant a "Shut up". You're welcome for the mod.