SC4 Devotion Forum Archives

SimCity 4 General Discussion and Tutorials => Tips, Tricks and Tutorials => Topic started by: ebina on November 27, 2009, 05:37:34 AM

Title: Assigning Your Favorite Lots to Keyboard Shortcuts
Post by: ebina on November 27, 2009, 05:37:34 AM
You may have thought how convenient is it if custom lots can be selected by pressing keys like the Maxis lots. This is a tutorial for people who want to assign your favorite lots to keyboard shortcuts.


1. Run the Lot Editor and find lots you want to assign to keys, then write down the instance IDs of lots shown in the left side of the dialog.
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg522.imageshack.us%2Fimg522%2F1628%2Fkeycfglotinstance.gif&hash=028bb80f25031aaf4c64d720cbfb539a95575e2b)
After collecting the instance IDs, quit the LE.

2. Run the Reader, and open the simcity_1.dat.

3. Open the Filters dialog from Tools menu, or one on the tool bar. Click "Uncheck all" button, recheck only "KeyCfg", and click "Refresh" button. Close the Filters dialog. Now only KEYCFG files should be listed.
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg130.imageshack.us%2Fimg130%2F1455%2Fkeycfgfilters.gif&hash=23bef7d9cd08898cb01bafd33ca8afefa82743c7)

4. Right click on a KEYCFG file of Instance 6a9362ef, click "Save decoded file" and save it as txt file. You need to manually enter extension.
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg522.imageshack.us%2Fimg522%2F3482%2Fkeycfgappendtoenddialog.gif&hash=3803f49eae4b55130c697ac07e18a2f8a4276f85)
After saving a file you will get a file of TGI extension. It is better to keep TGI file as it makes reimporting easier.

5. Open the txt file in the text editor. There's a line which can be used as template so let's search for this line.
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg340.imageshack.us%2Fimg340%2F6573%2Fkeycfgtemplate.gif&hash=867319a08eb248ee24389b71b2b52dd517430be9)
if the image cannot be loaded...
Control M               = 0xec3e82f8   0x8bd88057 "Build Passenger Ferry Terminal"

0x8bd88057 is only one string that matches IID in the simcity_1.dat. By adding lines like this you can assign any lots to keys.
KeyCombination = 0xec3e82f8 0xNNNNNNNN
(NNNNNNNN = IID of lot)

Make sure key combinations you will assign are not used by anything. You can disable existing key combinations which you rarely use. If a line starts with semicolon it will be handled as comment, will not function.

6. Save the txt file after editing.
Maybe editing KEYCFG file in the Reader directly would be possible as it is still short. If you will edit the file in the Reader, you need to click "Edit" button to start to edit. Do not forget to click "Apply" button after editing. Also if you edited in the Reader, you do not need to take the following steps 7 and 8.

7. In the Reader create a blank file by selecting File > New from menu.

8. Right click on the left pane and select "Insert & compress file". Select the txt file you modified.
A dialog will appear, answer "Yes" to it.
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg260.imageshack.us%2Fimg260%2F3482%2Fkeycfgappendtoenddialog.gif&hash=b81d43c0a9ce66a8d8b1b8646b5d4eafa0b1ca3a)
If you deleted TGI file this step will be different.

9. Save the dat, copy it to the Plugins folder and test in the game.

If your new key combinations do not function you may have entered invalid strings. If you have problems with your key combinations please post it here.


Important :
Attached file is experimental version, based on my personal key combinations. Please open a txt file included in the attachment before trying it in game.


Edit :
11/29/2009 - Corrected a spelling miss.
Title: Re: Assigning Your Favorite Lots to Keyboard Shortcuts
Post by: xxdita on November 27, 2009, 05:44:23 AM
Wow. I'm gonna hace to play around with this over the weekend. Great tutorial ebina.
Title: Re: Assigning Your Favorite Lots to Keyboard Shortcuts
Post by: RippleJet on November 27, 2009, 05:54:59 AM
It's amazing that Maxis left that single Ctrl-M definition that way, with the reference to the lot's IID... ::)
Excellent tutorial, ebina! :)
Title: Re: Assigning Your Favorite Lots to Keyboard Shortcuts
Post by: Bobbi on November 27, 2009, 05:55:43 AM
Many thanks to ebina and your great tutorial. ()flower()

On June 6th[link] (http://sc4devotion.com/forums/index.php?topic=8049.0), I tried assigning the shortcut. But I didn't found there is a different key which is Ctrl+M that day, so I give it up.

And now, I know how to do. :D
Title: Re: Assigning Your Favorite Lots to Keyboard Shortcuts
Post by: Travis on November 27, 2009, 05:59:51 AM
excellent tutorial indeed, I'll put this method to good use. ;) thanks for sharing it. :)
Title: Re: Assigning Your Favorite Lots to Keyboard Shortcuts
Post by: TheTeaCat on November 27, 2009, 10:13:17 AM
OOOh  very clever indeed &apls

Excellent explanation also.
I'll have to give this a try :thumbsup:

Thanks for sharing

Derry
Title: Re: Assigning Your Favorite Lots to Keyboard Shortcuts
Post by: DAB_City on July 27, 2011, 09:11:43 AM
Does anyone know how to do this for transport networks? I could really use a one-way road or ground highway key combo... Thanks for this anyway, I'll find it very useful!  ;D
Title: Re: Assigning Your Favorite Lots to Keyboard Shortcuts
Post by: xtsigs on September 22, 2013, 09:45:20 PM
Click, click, scroll, & select lot. Point and click again to plop. My index finger was dying a death of 10,000 clicks. You saved its life. Thanks muchly.