Sim City 4 Devotion Forums

SimCity 4 General Discussion and Tutorials => Tips, Tricks and Tutorials => Questions About Custom Content Creation => Topic started by: woodb3kmaster on July 24, 2016, 12:19:03 AM

Title: [Solved] Lots cause SC4 to hang - why?
Post by: woodb3kmaster on July 24, 2016, 12:19:03 AM
A few months ago, I made some 30 exit taxiway lots, using the original RMIP2 lots as a starting point. When I try to select them from the airports menu, SC4 hangs and my CPU shoots up to 100% usage; I have to force-quit the game from Task Manager just to regain control of my computer.

This problem doesn't exist when I select these lots from the LotPlop list of lots, so I'd expect the cause of this annoying behavior to involve something the game only accesses when it displays a lot in a menu. Another possibility is my use of one of the RMIP custom cohorts; I didn't mod my lots extensively, so they just have the same parent cohort as the original RMIP lots. I'd appreciate any advice anyone has on how to fix this issue.
Title: Re: Lots cause SC4 to hang - why?
Post by: mgb204 on July 24, 2016, 12:55:18 AM
Often this could be related to corrupted files, which could be the icons themselves, the DIR index or something else entirely. If you are able to open the files with Reader, try copying all the entries within to a new open instance of Reader, then saving it as a new file. Don't copy any DIR files, allow the new file to make a new one for you if required.

Otherwise it's probably a modding error somewhere within them. It's probably quicker if I could have a peek at the files to track down the problem.
Title: Re: Lots cause SC4 to hang - why?
Post by: twalsh102 on July 24, 2016, 09:17:08 AM
Almost every time I have run into this, it has been the icon files.  Open the lot in Reader and check the PNG subfiles.  If they appear to be blank, or as I have often seen it, as a bunch of gibberish text, the PNG files are corrupt.  As you created the lot, that may mean you need to recreate the icon PNGs if you don't have another saved copy that you can just copy into the SC4lot file. If this is indeed the problem, it most often manifests itself by an actual missing icon in the menu, and all the other lots in the current menu view shifting descriptions.

Pretty much every other time I've run into corrupt PNGs, it's been after I have made a change to the lot file in Reader, and then re-saved the file.

The only other times I've run into this has been (as near as I can tell) when any or all of the following properties (Lot Exemplar Name, Building Exemplar Name, Building Item Name, Building Item Description) include foreign language characters (for me other than standard English language characters, but could possibly be any character that is not standard for the version of SC4 installed) in the data for the property.  I've resolved the problem (i.e. the lot would now plop from the menu) after I've removed (or Anglicized) the property data.
Title: Re: Lots cause SC4 to hang - why?
Post by: woodb3kmaster on July 24, 2016, 11:49:43 PM
I already shared my solution to this problem with Robin via PM, but for everyone else's benefit, here it is:

The icon for one lot was, in fact, corrupted - a consequence of my adding it with a newer version of Reader. Using Reader 0.9.3 to add custom lot icons produced no corruption at all. Oddly enough, though, the icon wasn't the real issue. It turns out that my use of the degree symbol () in the item names is what caused SC4 to hang; removing it from all their names got rid of the problem. It wasn't until I remembered someone having a similar problem due to their use of the symbol in item descriptions that I got the idea of all non-ASCII characters posing a problem for English-language versions of SC4 (as was pointed out in that person's thread, the font used in SC4 actually puts that symbol in the dollar sign's usual codepoint).
Title: Re: [Solved] Lots cause SC4 to hang - why?
Post by: mgb204 on July 25, 2016, 12:22:48 AM
Re: the corrupted Icon, might be an idea to post a bug for that here (, that way it can hopefully be fixed.

Whilst the latest reader version still has some issues, they are slowly being resolved, but we'll never get there if such bugs are not reported.
Title: Re: [Solved] Lots cause SC4 to hang - why?
Post by: APSMS on July 25, 2016, 01:10:54 AM
This is interesting. I have some Japanese BATs in my plugins that cause this too, whenever I hover over them (however breifly) in the parks menu. Obviously this makes them difficult to pinpoint, since the game doesn't properly display Japanese BAT descriptions until plopped (I do have the requisite DLL, but it only works on queries).

But if such a fix exists, it will be worth sorting through the chaff to find the offender.
Title: Re: [Solved] Lots cause SC4 to hang - why?
Post by: Andreas on July 25, 2016, 04:47:35 AM
The game will freeze whenever a non-US character is used indeed, I found that out many years ago when using German umlauts. There are two ways around it: Use an unicode "conversion" (I think the Maxis PIM actually does that when you enter a foreign character as building name, for instance), or use LTEXT files for any text that shows up in the game (menu description, hover query etc.) instead of Item Name and Item Description properties.

The LTEXT files were designed specifically for supporting foreign characters in plain text as well (and you can add multiple translations with the same set of properties). You can convert Item Name and Item Description easily with PIM-X and pick the desired language(s) via right-click; PIM-X will create LTEXT files and change the other properties to User Visible Name Key and Item Description Key.