[XP] Change "Save files" icon?

Started by Wecoc, July 17, 2014, 01:12:28 am

Previous topic - Next topic

Wecoc

Hi all, I want to request a probably impossible script but you guys are geniuses so I have to try.

Someone asked me if there was any way, using API, dll, executables or whatever, to change the icon of the Save files for an specific XP game.

I think it's impossible because ResHacker allows to change those Save files icon from the program executor, and it's obviously not included in the game folder.
I'm almost sure the program executor is the only responsible for that icons because those who play RPG maker games without the program can't see the icon.

But I want to be sure.

Blizzard

No, you're right, it can't be done by normal means. As far as I know you can only change the icon for executables, because they have them embedded as resources. Simply files don't work like that.
The only way this could really be done is by messing with the registry and changing the associated icon there for a certain extension. But this might not be the best idea, because that affects all files, not just your save files.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

PhoenixFire

~thinks about this~

Blizz, is there a way to change the file extension used for the save files, to something unique, and upon loading the game, have the main read all of the files name *.randomextension and change them all to *.properextension? Then, you could create a reg entry that changes the icon for that random data "type". Obviously, you would need to change that extension back to the .randomextension after the files where saved, right before exiting the game, but for some reason, I feel like this is something that a .dll could do. I'm not familiar enough to really know for certain if that's possible, but I think F0 and his newfound .dll abilities might be a good resource here?
Quote from: Subsonic_Noise on July 01, 2011, 02:42:19 amNext off, how to create a first person shooter using microsoft excel.

Quote from: Zeriab on September 09, 2011, 02:58:58 pm<Remember when computers had turbo buttons?

ForeverZer0

I don't understand this exactly. Why all the changing extensions back and forth?
You can save/load the data with any extension you wish, just edit the script, but no matter how you cut it, the icon used to display the file is going to be what the host operating system tells it to, which is set stored in the registry.

There might possibly be a way to edit the memory, or intercept the call looking for the icon, but that's only going to work when the game is actually running.

Simplest way, use an installer for your final game and have it set the file associations and icons during install.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

PhoenixFire

Quote from: ForeverZer0 on July 24, 2014, 06:54:48 pm
Why all the changing extensions back and forth?


Well, because I wasn't certain if you could do this:

Quote from: ForeverZer0 on July 24, 2014, 06:54:48 pm
You can save/load the data with any extension you wish



So I would say just make your game load and save a file with an extension different from the norm, and use an installer as F0 said, to make the computer associate that file type with a particular icon, and, your game as the program that opens it..
Quote from: Subsonic_Noise on July 01, 2011, 02:42:19 amNext off, how to create a first person shooter using microsoft excel.

Quote from: Zeriab on September 09, 2011, 02:58:58 pm<Remember when computers had turbo buttons?

Blizzard

This is all so unncessary. There is a million ways somebody can break this. Just leave it.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.