SC4 Devotion Forum Archives

Sim City 4 Devotion Tools => Tools - General Discussion => Topic started by: simmaster07 on December 27, 2015, 11:59:39 AM

Title: SC4Fix - DLL to fix the puzzle piece x TE lot crash
Post by: simmaster07 on December 27, 2015, 11:59:39 AM
I posted this over on ST but wanted to make sure SC4D got in on this as well. Hopefully I'm doing this whole posting thing right, it's been a while since I've been here.

What does this do

Requirements
This fix is made for versions 640 and 641 of SimCity 4 on Windows. Version 640 is a fully-patched SC4 retail copy, and version 641 is a fully-patched digital distribution version (i.e. Steam, Origin, GOG). v641 was tested by myself on Steam, and other users have reported success with GOG.

If your version of SC4 is unsupported, an error message will appear with update instructions, and no changes will be made to your game.

Installation
Download from the STEX (http://community.simtropolis.com/files/file/30883-sc4fix-third-party-patches-for-sc4/) or GitHub (https://github.com/nsgomez/sc4fix/releases) and simply unzip the DLL to your My Documents\SimCity 4\Plugins folder.

To see if SC4Fix is working properly, check the title of your game window. If you are playing in fullscreen mode, alt-tab out and hover over the SimCity taskbar icon. The titlebar will show "SC4Fix (version #)" if loaded properly.

Demonstration
Click here (https://www.youtube.com/watch?v=kQlDrivazfo) for a video showing the ability to hover puzzle pieces over transit-enabled lots with this DLL.

Resources
Development Thread on ST (http://community.simtropolis.com/forums/topic/69566-sc4fix-third-party-patches-for-sc4/?do=findComment&comment=1603647)
Source Code (https://github.com/nsgomez/sc4fix)
Title: Re: SC4Fix - DLL to fix the puzzle piece x TE lot crash
Post by: compdude787 on December 27, 2015, 12:41:35 PM
I've said it before, but I'll say it again: This is an awesome new fix to a bug that has annoyed probably every single SC4 player and caused lots of work to be lost. It's truly revolutionary!
Title: Re: SC4Fix - DLL to fix the puzzle piece x TE lot crash
Post by: Andreas on December 27, 2015, 01:02:22 PM
Wow, this is awesome alright! I did a very quick testing on my German SC4+Rush Hour+Patch 6.40 version, and it seems to work as advertised. I put the DLL into C:\Program Files(x86)\Maxis\SimCity 4\Plugins (same position where I moved the ExtraCheats.dll), and apparently, it gets picked up, as the window title says "pre3". This is a fantastic Christmas present, and takes one big worry off of our shoulders when dealing with complicated network setups. Amazing work, thanks for looking into this! :)
Title: Re: SC4Fix - DLL to fix the puzzle piece x TE lot crash
Post by: Themistokles on December 27, 2015, 01:09:50 PM
Yes, I've also been running this for the last half hour or so, and it's truly stunning. It has already solved one big STR worry for me :bnn:
Title: Re: SC4Fix - DLL to fix the puzzle piece x TE lot crash
Post by: Fasan on December 27, 2015, 01:41:54 PM
Delightfully! &apls
A fantastic and wonderful work that a large
Prevents problems. Thank-you!  :thumbsup:
Title: Re: SC4Fix - DLL to fix the puzzle piece x TE lot crash
Post by: Mikey Knox on December 28, 2015, 11:51:10 AM
Genius  :thumbsup:
Title: Re: SC4Fix - DLL to fix the puzzle piece x TE lot crash
Post by: mgb204 on December 28, 2015, 12:07:04 PM
I've been busy testing a lot of puzzle pieces and NAM stuff today. Every time I select one I can't help but see if I can get a CTD to happen. So I go nuts putting the cursor in all those places you shouldn't. Nothing happens, suddenly I realise how amazing this is. For my entire time with SC4 and mods, I've learned to be super-delicate with PPs. It's so freeing to just stop thinking about it.
Title: Re: SC4Fix - DLL to fix the puzzle piece x TE lot crash
Post by: FrankU on December 28, 2015, 01:26:37 PM
Did anyone say SC4 is dying?  :bomb:
This seems to be a revolutionary development.... Can someone give this guy a karma point?

And now that there is a way of loading DLL's..... does this open new perspectives for other options? I remember there was a discussion about the possibilities if could be DLL's loaded a long time ago.
Title: Re: SC4Fix - DLL to fix the puzzle piece x TE lot crash
Post by: InvisiChem on December 28, 2015, 01:54:55 PM
This is an amazing bug fix!!! Already installed, although I can't test it out quite yet. Working on a big project. This fix is cannot even have a value placed on it. Keep up the awesome work, I will be following along as well. I can imagine a lot of possibilities with this. Keep up the great work.
Title: Re: SC4Fix - DLL to fix the puzzle piece x TE lot crash
Post by: dyoungyn on December 28, 2015, 03:14:14 PM
Unfortunately,

I am not able to use this as the error says my version of SC4 Deluxe at which I use a CD to start up is not capable.  I bought the game back in 2003/4 and still working great.  The website the error suggest does not link to the fix and only the SC4 Devotion site with the BAT Architect and other misc texture fixes but no game update or capability fix.

dyoungyn
Title: Re: SC4Fix - DLL to fix the puzzle piece x TE lot crash
Post by: simmaster07 on December 28, 2015, 04:27:59 PM
Quote from: dyoungyn on December 28, 2015, 03:14:14 PM
Unfortunately,

I am not able to use this as the error says my version of SC4 Deluxe at which I use a CD to start up is not capable.  I bought the game back in 2003/4 and still working great.  The website the error suggest does not link to the fix and only the SC4 Devotion site with the BAT Architect and other misc texture fixes but no game update or capability fix.

dyoungyn

The patch will be labeled "Sim City 4 Buildings Update"; here's a direct link:

http://www.sc4devotion.com/maxis/SC4Update4BAT.zip

By downloading it, you're agreeing to the Maxis/EA EULA:

http://sc4devotion.com/forums/index.php?page=6

Quote from: FrankU on December 28, 2015, 01:26:37 PM
And now that there is a way of loading DLL's..... does this open new perspectives for other options? I remember there was a discussion about the possibilities if could be DLL's loaded a long time ago.

Well at the least this opens up the door for some more advanced mod management options. With a DLL loaded into memory, you can detect not only when the game starts, but also when it's shutting down, so it would make any post-shutdown cleanup of changes easier.

From there you could probably hook into some game functions to notify you when something is happening like a building plop or a game save, but this would require where in the game's memory these functions actually are. At the higher end of the spectrum you'd have the ability to modify hardcoded things like traffic networks and the user interface, but this would require at least a few more years of research and reverse engineering IMO.

Like I said in the ST thread, it wouldn't be impossible, and it wouldn't be the first time such a project was done. OpenTTD started in 2003 some nine years after Transport Tycoon Deluxe's release. OpenRCT2 started in 2014, 12 years after the release of RCT2. I think it'd be pretty neat to have a project like that for SC4, but we are also dealing with a far more complex game than either of those.
Title: Re: SC4Fix - DLL to fix the puzzle piece x TE lot crash
Post by: Tropod on December 28, 2015, 08:39:20 PM
I'll repeat my sentiments here also......

Quite impressive, both the fix itself & source code. :thumbsup:.
Title: Re: SC4Fix - DLL to fix the puzzle piece x TE lot crash
Post by: dragonshardz on December 29, 2015, 12:51:21 AM
Whoa, a fix to the age-old PP/TE crash and a way to hook DLLs into the game at will?

Nice!

E: Can someone pin this?
Title: Re: SC4Fix - DLL to fix the puzzle piece x TE lot crash
Post by: fefenc on December 29, 2015, 11:21:58 AM
Congratulations sir, the game will crash less often thanks to your work  &apls
Title: Re: SC4Fix - DLL to fix the puzzle piece x TE lot crash
Post by: dyoungyn on December 29, 2015, 12:06:32 PM
Quote from: simmaster07 on December 28, 2015, 04:27:59 PM
Quote from: dyoungyn on December 28, 2015, 03:14:14 PM
Unfortunately,

I am not able to use this as the error says my version of SC4 Deluxe at which I use a CD to start up is not capable.  I bought the game back in 2003/4 and still working great.  The website the error suggest does not link to the fix and only the SC4 Devotion site with the BAT Architect and other misc texture fixes but no game update or capability fix.

dyoungyn

The patch will be labeled "Sim City 4 Buildings Update"; here's a direct link:

http://www.sc4devotion.com/maxis/SC4Update4BAT.zip

By downloading it, you're agreeing to the Maxis/EA EULA:

http://sc4devotion.com/forums/index.php?page=6

Quote from: FrankU on December 28, 2015, 01:26:37 PM
And now that there is a way of loading DLL's..... does this open new perspectives for other options? I remember there was a discussion about the possibilities if could be DLL's loaded a long time ago.

Well at the least this opens up the door for some more advanced mod management options. With a DLL loaded into memory, you can detect not only when the game starts, but also when it's shutting down, so it would make any post-shutdown cleanup of changes easier.

From there you could probably hook into some game functions to notify you when something is happening like a building plop or a game save, but this would require where in the game's memory these functions actually are. At the higher end of the spectrum you'd have the ability to modify hardcoded things like traffic networks and the user interface, but this would require at least a few more years of research and reverse engineering IMO.

Like I said in the ST thread, it wouldn't be impossible, and it wouldn't be the first time such a project was done. OpenTTD started in 2003 some nine years after Transport Tycoon Deluxe's release. OpenRCT2 started in 2014, 12 years after the release of RCT2. I think it'd be pretty neat to have a project like that for SC4, but we are also dealing with a far more complex game than either of those.

Unfortunately,  I still can't get this to work and keep getting errors saying my version of SC4 Deluxe is not compatible.  Again, I am using the CD set from 2003.  No matter how many times I download both patches from Maxis, I still cannot get the fix to work. When it came to transit enable lots, I have learned to be VERY CAREFUL and SAVE frequently.

dyoungyn
Title: Re: SC4Fix - DLL to fix the puzzle piece x TE lot crash
Post by: Tropod on December 30, 2015, 04:16:05 PM
Quote

....No matter how many times I download both patches from Maxis, I still cannot get the fix to work....

dyoungyn

I also still have original disks from way back when.

Not sure about now days but when SC4/Deluxe first came out the patches were specific to regions (ie much like CD/DVD movies) & required players to use the right patch/update for their region of the game in order to update properly. I remember having the same problem but after having a play around with the updates, all worked ok.
Title: Re: SC4Fix - DLL to fix the puzzle piece x TE lot crash
Post by: matias93 on December 30, 2015, 06:54:01 PM
Has anyone tried to save a city using Ctrl + Alt + S with the new DLL installed? I've just done that and get a CTD, but I'm not sure the DLL is the cause. I'll keep trying some variations and posting in a few hours, but it would be useful to know if anyone else get the same results.
Title: Re: SC4Fix - DLL to fix the puzzle piece x TE lot crash
Post by: mgb204 on December 31, 2015, 02:01:18 AM
Quote from: matias93 on December 30, 2015, 06:54:01 PM
Has anyone tried to save a city using Ctrl + Alt + S with the new DLL installed? I've just done that and get a CTD, but I'm not sure the DLL is the cause. I'll keep trying some variations and posting in a few hours, but it would be useful to know if anyone else get the same results.

To begin with, you only need to use CTRL + S, the Alt key is unnecessary here.
Title: Re: SC4Fix - DLL to fix the puzzle piece x TE lot crash
Post by: catty on December 31, 2015, 02:12:46 AM
Quote from: Tropod on December 30, 2015, 04:16:05 PM
...Not sure about now days but when SC4/Deluxe first came out the patches were specific to regions (ie much like CD/DVD movies) & required players to use the right patch/update for their region of the game in order to update properly....

There are a total of 10 patches, 5 specific for the SC4 Vanilla and then another 5 for rushhour

SC4 Readme - https://city-builders.info/cbex/download?path=SC4%2Band%2BSC4D%2BDownloads%252Fupdate-sku1-to-p2.zip

SC4D Readme - https://city-builders.info/cbex/download?path=SC4%2Band%2BSC4D%2BDownloads%252Fupdate_sku1_to_p1_b638.zip

I've no idea how places like Steam work out what version you get, in my case I ended up with a right-hand version of the game, which is a real pain when you drive on the left in RL had to change the SC4 Language in Steam before it would drive on the left, but the NAM still thinks I've got a RH drive game so have to manually change it when I doing a NAM install.
Title: Re: SC4Fix - DLL to fix the puzzle piece x TE lot crash
Post by: Andreas on December 31, 2015, 02:18:28 AM
There is a little difference between CTRL + S and CTRL + ALT + S. The latter will skip updating the region view graphics, so it works a bit faster than simply saving the city. I didn't check if the DLL affects this feature somehow, but one thing that I got used to is pausing the game before saving it. I had some random crashes and lock-ups in the past when I didn't do that, but it seems to work fine that way. Also, I rarely do a "save and exit", but save first, and then exit to region view or quit the game without saving again.
Title: Re: SC4Fix - DLL to fix the puzzle piece x TE lot crash
Post by: mgb204 on December 31, 2015, 02:42:24 AM
Quote from: catty on December 31, 2015, 02:12:46 AM
I've no idea how places like Steam work out what version you get, in my case I ended up with a right-hand version of the game, which is a real pain when you drive on the left in RL had to change the SC4 Language in Steam before it would drive on the left, but the NAM still thinks I've got a RH drive game so have to manually change it when I doing a NAM install.

The original game simply based the driving side on the locale installed, hence UK English is LHD. The locale is also stored in the registry, which the NAM installer uses to determine the driving side to default to. I managed to get my GoG digital version working in this regard, but I think Steam and Origin users may have more trouble. I couldn't be certain, but I think Steam have modified how such things work. However, if the value the NAM installer is searching for doesn't exist, you could just add it manually to the registry. The location is HKEY_LOCAL_MACHINE > SOFTWARE > Maxis > SimCity 4 > 1.0. Then you need a key "Language value" set to 13 (for LHD/UK English) in the Value Data field.

Quote from: Andreas on December 31, 2015, 02:18:28 AM
The latter will skip updating the region view graphics, so it works a bit faster than simply saving the city...
...Also, I rarely do a "save and exit", but save first, and then exit to region view or quit the game without saving again.

Just when you think you know all the shortcuts!

I have two cities that cause a CTD when exiting them. Thankfully I can open them and save changes within the city. I know switching focus can cause problems whilst saving, honestly that's probably how I messed up the first one. But I researched this problem and it can happen when using "Save and Exit" or "Save and Quit" too. I learnt to be real particular about not using those two after the second city suffered the same fate. Since then I have seen no further problems.
Title: Re: SC4Fix - DLL to fix the puzzle piece x TE lot crash
Post by: vortext on December 31, 2015, 05:46:22 AM
Such a relief no longer having to worry about accidentally touching a TE lot with the SAM starters!  &apls &apls

Also, I use quick save all the time and haven't got any CTDs with the fix installed. 
Title: Re: SC4Fix - DLL to fix the puzzle piece x TE lot crash
Post by: CasperVg on December 31, 2015, 06:12:06 AM
Thanks a lot for your work, simmaster! Hopefully it will lead to more amazing things :)

Quote from: vortext on December 31, 2015, 05:46:22 AM
Also, I use quick save all the time and haven't got any CTDs with the fix installed. 
Can confirm, have been using the fix for some time now, and have not noticed any (increase in) CTDs related to the quick save functionality (nor normal save)
Title: Re: SC4Fix - DLL to fix the puzzle piece x TE lot crash
Post by: Alan_Waters on December 31, 2015, 08:02:11 AM
I install the patch:

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fsavepic.ru%2F8138336.png&hash=12d4b9db54799923193c3af4ef66582db2af953a)

Starting the game:

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fsavepic.ru%2F8142432.png&hash=aa31d2ee02d537dacfa3d676ca5424bdc16eedb1)

What is it like?
Title: Re: SC4Fix - DLL to fix the puzzle piece x TE lot crash
Post by: mgb204 on December 31, 2015, 09:52:53 AM
The first message is misleading, it simply means that the patch program has finished. Check the patchlog file, generated in the folder you ran the .640 update from. Does the information within confirm your game files were successfully patched. My guess would be a number failed. If you are using either a non-genuine copy of SC4 or a NoCD patch that will cause the update to fail. Similarly, having modified any of the SC file, including adding the I-HT fix will cause it to fail. In which case you should restore the original files (either from backups or a reinstall), then patch the game before you do anything else.
Title: Re: SC4Fix - DLL to fix the puzzle piece x TE lot crash
Post by: simmaster07 on December 31, 2015, 02:36:57 PM
Go into the Apps folder where you installed SC4 (typically C:\Program Files (x86)\Maxis\SimCity 4\Apps) and check the properties for SimCity 4.exe.

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FzZw9onn.png&hash=28beb8894e82d44d4256c4605d466d62fc79fac7)

Click on the Details tab and make sure that the version shows 1.1.640.0.

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fi.imgur.com%2F9EK4bPP.png&hash=7592a6d15f77d6746ec200b3ee5ae592a7abc592)
Title: Re: SC4Fix - DLL to fix the puzzle piece x TE lot crash
Post by: Alan_Waters on December 31, 2015, 02:51:45 PM
Yes, 1.1.638.0. Strange. The patch is installed without problems.  &mmm
Title: Re: SC4Fix - DLL to fix the puzzle piece x TE lot crash
Post by: mgb204 on December 31, 2015, 02:57:29 PM
Then who or what make the backup of the .exe file?

As I said, check the Patchlog text file, possibly better if you'd copy/paste that information so we can all see it. Perhaps start a new thread though, since this problem is not directly related to the fix?
Title: Re: SC4Fix - DLL to fix the puzzle piece x TE lot crash
Post by: Alan_Waters on December 31, 2015, 03:17:21 PM
It (http://rghost.ru/private/78wrDMy7k/9d07f51f4cae4e041a3a96324841d3c9)?
Title: Re: SC4Fix - DLL to fix the puzzle piece x TE lot crash
Post by: mgb204 on December 31, 2015, 03:38:59 PM
Quote from: mgb204 on December 31, 2015, 02:57:29 PM
check the Patchlog text file
Quote
Check the patchlog file, generated in the folder you ran the .640 update from. Does the information within confirm your game files were successfully patched

This should be a text file, called Patchlog.txt if I remember correctly.
Title: Re: SC4Fix - DLL to fix the puzzle piece x TE lot crash
Post by: simmaster07 on December 31, 2015, 04:59:11 PM
Quote from: Alan_Waters on December 31, 2015, 03:17:21 PM
It (http://rghost.ru/private/78wrDMy7k/9d07f51f4cae4e041a3a96324841d3c9)?

Looks like SimCity 4.exe is being marked as invalid by the patcher. Typically DELUXE.exe/RUSHHOUR.exe would have "Writing New File" and "Verifying" messages as well. Also because those two files are under the number of files marked "Old Files Invalid."


-------------------------------------------------------------------------------
   PATCH  Version 6.50 - RTPatch(R) Professional - Software Update System
                    DOS/16-bit Windows/32-bit Windows Edition
       (C) Copyright Pocket Soft, Inc., 1991-2002.  All Rights Reserved.
-------------------------------------------------------------------------------

----- Processing Patch File -----
Applying MODIFY File Patch for 'DELUXE.exe'
Applying MODIFY File Patch for 'RUSHHOUR.exe'
Applying MODIFY File Patch for 'SimCity_1.dat'
    Writing New File
    Verifying - Passed!
    Deleting Old File
----- Patch File Processing Complete -----

-----------------------------------------------------
-        Results of Application of Patch File       -
-----------------------------------------------------
File Patches Applied ......................... (   1)
   Files Modified .................. (   1)
   Files Renamed. .................. (   0)
   Files Added ..................... (   0)
   Files Deleted ................... (   0)
   Temporary Files Processed........ (   0)

File Patches Skipped: New Files Up-To-Date.... (   0)
File Patches Ignored: Old Files Missing....... (   0)
                      Old Files Invalid....... (   2)

-----------------------------------------------------
Total File Patches Processed ................. (   3)
-----------------------------------------------------


This typically happens when SC4.exe is cracked.

Might be worth splitting this into a different thread.
Title: Re: SC4Fix - DLL to fix the puzzle piece x TE lot crash
Post by: Alan_Waters on December 31, 2015, 08:52:27 PM
After installing the patch appeared artifacts illuminated at night. We'll have to fall back to 638. :crytissue:
Title: Re: SC4Fix - DLL to fix the puzzle piece x TE lot crash
Post by: Girafe on January 02, 2016, 01:36:37 PM
If you want to look at that, infinite MMP (=cycle MMP) leads to CTD