Menu

LEX File Exchange EA Support Files
SC4 Wikipedia Network Addon Mod
Dependencies Chat

Author Topic: SC4Tool W7 Compatibility Patch  (Read 13875 times)

0 Members and 1 Guest are viewing this topic.

Offline DCMetro2834

  • RTMT Team
  • Forums Governor
  • *
  • Posts: 305
  • Reputation: 0
SC4Tool W7 Compatibility Patch
« on: August 02, 2011, 11:02:33 PM »
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
« Last Edit: November 17, 2011, 01:40:40 PM by catty »

Offline null45

  • Lex Certified
  • Forums Mayor
  • *
  • Posts: 221
  • Reputation: 18
  • CL:
    All formats lead to FSH
Re: Textures Get Morphed In Lower Zooms
« Reply #1 on: November 13, 2011, 01:48:08 AM »
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


Offline DCMetro2834

  • RTMT Team
  • Forums Governor
  • *
  • Posts: 305
  • Reputation: 0
Re: Textures Get Morphed In Lower Zooms
« Reply #2 on: November 13, 2011, 11:40:28 AM »
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

Offline djp

  • Forums Councilmember
  • *
  • Posts: 74
  • Reputation: 1
    • Premier Bites
Re: Textures Get Morphed In Lower Zooms
« Reply #3 on: November 13, 2011, 12:31:41 PM »
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/

Offline null45

  • Lex Certified
  • Forums Mayor
  • *
  • Posts: 221
  • Reputation: 18
  • CL:
    All formats lead to FSH
Re: Textures Get Morphed In Lower Zooms
« Reply #4 on: November 13, 2011, 05:03:48 PM »
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?
« Last Edit: November 13, 2011, 05:25:17 PM by null45 »

Offline DCMetro2834

  • RTMT Team
  • Forums Governor
  • *
  • Posts: 305
  • Reputation: 0
Re: Textures Get Morphed In Lower Zooms
« Reply #5 on: November 14, 2011, 07: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)


Thanks again guys! :)

DC

Offline null45

  • Lex Certified
  • Forums Mayor
  • *
  • Posts: 221
  • Reputation: 18
  • CL:
    All formats lead to FSH
Re: Textures Get Morphed In Lower Zooms
« Reply #6 on: November 14, 2011, 09:16:21 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.  ;)

Offline DCMetro2834

  • RTMT Team
  • Forums Governor
  • *
  • Posts: 305
  • Reputation: 0
Re: Textures Get Morphed In Lower Zooms
« Reply #7 on: November 15, 2011, 07: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

Offline null45

  • Lex Certified
  • Forums Mayor
  • *
  • Posts: 221
  • Reputation: 18
  • CL:
    All formats lead to FSH
Re: Textures Get Morphed In Lower Zooms
« Reply #8 on: November 15, 2011, 08:53:01 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. :)


Offline DCMetro2834

  • RTMT Team
  • Forums Governor
  • *
  • Posts: 305
  • Reputation: 0
Re: Textures Get Morphed In Lower Zooms
« Reply #9 on: November 15, 2011, 09:55:26 PM »
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.

Offline null45

  • Lex Certified
  • Forums Mayor
  • *
  • Posts: 221
  • Reputation: 18
  • CL:
    All formats lead to FSH
Re: Textures Get Morphed In Lower Zooms
« Reply #10 on: November 15, 2011, 11:47:59 PM »
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.  ;)

Offline DCMetro2834

  • RTMT Team
  • Forums Governor
  • *
  • Posts: 305
  • Reputation: 0
Re: Textures Get Morphed In Lower Zooms
« Reply #11 on: November 16, 2011, 03:48:26 PM »
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

Offline null45

  • Lex Certified
  • Forums Mayor
  • *
  • Posts: 221
  • Reputation: 18
  • CL:
    All formats lead to FSH
Re: SC4Tool W7 Compatibility Patch
« Reply #12 on: November 16, 2011, 05:54:00 PM »
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"
« Last Edit: November 17, 2011, 01:45:20 PM by catty »

Offline Gondracorn

  • Forums Inhabitant
  • *
  • Posts: 11
  • Reputation: 0
  • Your slogan here
Re: SC4Tool W7 Compatibility Patch
« Reply #13 on: March 17, 2012, 01:01:52 PM »
How do I install this? I use Windows 7 and I'm confused. I have Paint.net. I just downloaded SC4Tool.

Offline StormVibrations

  • Forums Inhabitant
  • *
  • Posts: 15
  • Reputation: 0
  • Your slogan here
Re: SC4Tool W7 Compatibility Patch
« Reply #14 on: March 20, 2013, 08:00:08 PM »
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.