• Welcome to SC4 Devotion Forum Archives.

SC4Tool W7 Compatibility Patch

Started by DCMetro2834, August 02, 2011, 09:02:33 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DCMetro2834

Okay, so I making some new base textures. I had a PNG and I was creating a new texture in SC4 Tool. I load it and the 128 pixel version looks great. Then I click the button to duplicate it to the lower zooms, and I get my error:




I did download and replace the "FSHlib.dll" file found HERE, even though I'm not sure it does any good for my situation.

I've tried different things, like reinstalling the program, changing the format of the picture, and creating a whole new file altogether. But it's something wrong with the program in general.

EDIT: I am also running SC4 Tool in Windows XP SP3 Compatibility Mode since I have Windows 7 Home Premium, 

Does anyone know?

Thanks,

DC

null45

The function SC4Tool uses to scale the images (GetThumbnailImage) does not work correctly on Windows 7, it may be possible to force SC4Tool to use GDI+ 1.0 from Windows Vista and earlier (which should work correctly) although it would require patching SC4Tool's executable.  &mmm


DCMetro2834

I do appreciate your reply, and thanks for explaining it. :)

To clarify, you're saying that for it to work on Win 7 the exe would need to be rewritten or for it to work on any OS? Also, is there any other way I can do this?


Thanks again!

DC

djp

Have you tried running "Virtual XP" on WIN7?

I've not used it for this program, but other older programs that wont work on WIN7 run perfectly with it.

http://www.microsoft.com/windows/virtual-pc/

null45

#4
The GDI+ 1.1 update in Win7 changed the way GetThumbnailImage works, it should still let SC4Tool use 1.0 if Win7 is told it requires it in the application manifest (this is also the method used to require administrator privileges under Vista and later).

Also Virtual XP mode only exists on Windows 7 Business or higher.

You could use something like my Batch Png to Fsh tool to convert the textures as it uses a different scaling method, it will overwrite the dat if it already exists.

What is the instance id of a file that this problem appears on?

DCMetro2834

There isn't an IID, since I never saved it. I don't have Win 7 Business, also; I think I have Home Premium.

So, Bath Png to Fsh will do what I need SC4 Tool to do, minus the IID? (if I understand correctly)


Thanks again guys! :)

DC

null45

Quote from: DCMetro2834 on November 14, 2011, 05:48:31 PM
There isn't an IID, since I never saved it. I don't have Win 7 Business, also; I think I have Home Premium.

So, Bath Png to Fsh will do what I need SC4 Tool to do, minus the IID? (if I understand correctly)

I was asking if you could tell me the TGI of a texture (or upload one) that shows the SC4Tool scaling bug so I can test my theory on how to patch it on Win 7 (I could also force it to always launch with administrator permissions, although it is probably best for the user to set that with the compatibility settings).  :)

The Batch Png to Fsh tool can convert and save multiple textures into a new dat, it is unable to modify an existing dat (the Multi Fsh tool can but it is more complex to use).

There is a tutorial explaining how to use it here, and additional documentation in the readme.

I hope it helps.  ;)

DCMetro2834

Oh, okay. I can see if I can find a saved version of the TGI for that tram texture if you want? :)

And, yes, that tutorial is perfect!! Thanks so much! ;D

null45

Quote from: DCMetro2834 on November 15, 2011, 05:07:55 PM
Oh, okay. I can see if I can find a saved version of the TGI for that tram texture if you want? :)

And, yes, that tutorial is perfect!! Thanks so much! ;D

Any texture that causes that problem in SC4Tool will work, if it is a Maxis texture you can post the TGI id or just attach / upload it. :)


DCMetro2834

Well, here is the Tram in Road with Zebra Crossing base textures; the one shown above. The IID should be 0xC0FFF035. I've also attached the DAT to this post.

null45

Patching SC4Tool's application manifest seems to have fixed this issue, to my surprise the scaling looks to be as good as the Paint.NET code that I use in Png to Fsh Batch.   :thumbsup:

The code for the GDI+ 1.0 dependency come from the answer to this MSDN post, no other changes were needed.

SC4ToolPatch.zip

To install overwrite the old SC4Tool executable with this one.  ;)

DCMetro2834

Wow, thanks so much; it's magnificent!!  &apls

Everything worked out fine... really can't thank you enough!  ;D

Have you considered making this fix more public, as I know other people have also had this issue. :)


-DC

null45

#12
Ideally it would replace the SC4Tool executable in the main download, other than that perhaps this thread could be pinned.  :)

MOD Comment: Have pinned the topic and changed the name to "SC4Tool W7 Compatibility Patch"

Gondracorn

How do I install this? I use Windows 7 and I'm confused. I have Paint.net. I just downloaded SC4Tool.

StormVibrations

Gondracorn:

I don't know if I did it correctly, but the tool seems to work (though it's quite slow) and since nobody else has responded to you, I will.  And if I'm wrong maybe they will correct me which would be good for both of us.

1. download tool, MS net framework, and patch.

2. Install MS net framework.  It gave me some kind of compatibility warning, but I googled that and it doesn't seem to be a big deal.  Anyway, at your own risk.

3. Replaced exe in the SC tool folder with the patched one.

4. Right click on the exe and make sure it's set to run in XP service pack 3 compatibility mode.

5. Run as administrator

6. Go into the options and set your paths for you SimCity game folder (program files), and also for your plugins folder in documents.  I don't really know if this had to be done or if it was done because the text menu in this section is solid black, but it seemed like something I should do so I tried to do it.

7. Profit.