Custom icon not working in AGS 3.1

Started by Akril15, Sat 04/06/2011 03:41:06

Previous topic - Next topic

Akril15

I've made a custom icon for my game before (in AGS 2.72), so I'd think it would be easy to do it again in AGS 3.1. For some reason, however, it's proving to be nigh impossible.

When I follow the manual's instructions and 1), save a proper icon named user.ico into my game's main folder (not Compiled); 2), open my game in AGS and 3) save the game, the game's exe icon doesn't change. I've tried every variant of these steps I can think of (compiling the game before and after, naming the icon both USER.ICO and user.ico, saving the icon in 4-bit color), but nothing seems to work.

For some strange reason, when I'm compiling the game, the game's exe file does change to my custom icon, but shortly before compilation is complete, it changes back to the blank default icon. I've searched the forums, but couldn't find any problems similar to this one. I don't know what's going on, and I hope I can get this problem solved soon.

barefoot


QuoteIf you wish, you can use your own custom icon when you build a Windows EXE file. To do this, simply place your icon in your game's folder, and name it USER.ICO. Then, load the editor and save the game.
AGS is only able to build your custom icon if you are running the editor on Windows 2000, XP or Vista. If you're using Windows 98 then your game will be built with the standard AGS icon.

NOTE: The icon must be a proper Windows .ICO file, not just a renamed BMP file. Icon editors, such as AX-Icons from http://www.axialis.com, will convert it for you.

You can also have a custom icon for the Setup program generated. To do so, create your icon as above but name it setup.ico in the game folder.


I May Not Be Perfect but I Have A Big Heart ..

Khris

Wow, that's really helpful, considering that Akril mentioned following the manual's instructions.

I tested this with 3.2.1 and 3.1b3 on XP and it worked fine.

I guess to narrow down where the problem lies, why don't you try if it works with a new default game and upload the icon so we can try?

Icey

#3
What is the icon size?

use 16x16 or 32x32

Another tip is change the icon name to Setup. compile it and see if the game setup icon has change to the custom icon. If so the icon must work.

also don't name it USER.ico jut name it USER.

Akril15

#4
Khris: I tried creating a new default game, and the game's icon changed to my custom icon without a hitch.

Studio3: The icon's size is 32x32. I tried changing the game icon's name to setup.ico (I've got my copy of WinXP set up so that file extensions are always displayed), and surprisingly, the game's setup icon DID change.

Just for kicks, I also tried using the icon from my first game, opening the game in the editor, compiling the game and closing it, and got the exact same result -- the game's setup icon temporarily changed to my old game's icon, then changed back to the default icon.

However, I just realized something that might be a key to this problem -- I'm pretty sure that I started this game in AGS 2.7, then imported it into AGS 3.1. While the new default game's default icon is a blue cup, the default icon for the game I'm working on is a blank window -- the icon WinXP assigns to exe files with no icon of their own.

EDIT: I actually started from a 2.72 template I made from my first game. I tried making a new 2.72 game from that template, then importing that template into 3.2, and encountered no problems with the icons. I tried making a template from my current game and creating a new game based on that template, but I still encountered the same problem -- the icon always remains as the default WinXP .exe icon.

I also tried upgrading the game to AGS 3.2 and compiling it with and without the icon -- in both cases, the game's executable icon remained the same WinXP executable icon.

monkey0506

Could you try creating a new project (in 3.0+) and use the same custom icon and see if it works?

If it doesn't, could you upload the icon so we could take a look at it?

Akril15

I did that, and the icon worked. Everything that I've done so far suggests that the problem is with my game, and not the icon.

monkey0506

It's possible that upgrading a game from 2.72 to 3.0+ breaks the custom icon support. I could take a look at it later, I think I have a copy of 2.72 around here somewhere.

Akril15

#8
I already tried upgrading a 2.72 game to 3.1, and didn't encounter any problems with the icon.

EDIT: Something strange I just noticed -- when my game is running, the custom icon shows up next to its name in the taskbar. :-\

Icey

So you can't see you icon in windows, however you can see it in the task bar. Hum....well we can see that it's might not be the game. try taking the compiled game folder a copying it in to another folder. and try playing the game and then close it after the game has loaded. Maybe that might work.


Akril15

I tried copying the compiled folder to another location, opening the copy of the game in that folder and then closing it. The icon didn't change.

Khris

#11
I also suspect the game starting out as 2.72 being the reason.
That version didn't support icons other than 32x32x16 with Windows 98/ME.

You mentioned the icon shows up in the taskbar; if you run the game windowed, does it show up in the window's upper left corner, too? I suppose it does, so the problem is apparently explorer related.

Akril15

You're right -- the icon does show up in the upper-left corner if I play the game in a windowed mode. Hmm...

monkey0506

I just wanted to point out that I realized that my post basically just reiterated Khris' questions and you had already answered the first question. Sorry. :P

In any case, I don't really see why an upgraded game would have this problem persistently after having been upgraded. But you said that you upgraded another game and didn't experience these problems?

It seems rather strange, but would definitely be worth looking into in case there is a bug somewhere, or it might just be somehow tied to the explorer not displaying the icon for some reason despite the icon existing (which it obviously and logically must if it's appearing as the icon in the taskbar and title bar).

Akril15

#14
Quote from: monkey_05_06 on Mon 06/06/2011 07:41:02
I just wanted to point out that I realized that my post basically just reiterated Khris' questions and you had already answered the first question. Sorry. :P
No problem -- that sort of thing happens to all of us.

Quote from: monkey_05_06 on Mon 06/06/2011 07:41:02In any case, I don't really see why an upgraded game would have this problem persistently after having been upgraded. But you said that you upgraded another game and didn't experience these problems?
Yes, I did. I'm wondering if something might have gone wrong when I compiled this game at some point in the past. Like I mentioned earlier, while the game is being compiled, the icon temporarily appears as the custom icon, then changes to the WinXP default (and not the typical blue cup icon). It's like AGS is trying to make the custom icon appear, but can't for some reason.

I think I'll try looking at the icon on another OS and see what it looks like there.

EDIT: Interesting -- the custom icon does show up in Windows 7. I may try compiling the game in 7 to see if it makes any difference.

EDIT 2: Darn -- it didn't. The custom icon appears in the game's Compiled folder in Windows 7, but when I transfer it back to WinXP, it shows up as the default .exe icon again.

monkey0506

This is starting to sound like a bug in the XP Explorer shell and not anything to do with AGS, but the inconsistency of your results between various projects does make it more difficult to diagnose. ..unfortunately with that I'm pretty much out of ideas for now as to what you could do to solve the issue short of perhaps rebuilding the entire game entirely in the 3.1 editor.

Actually, one thing you could try is to create a template file from your game and start a new 3.1 project using that template. Could be worth a shot at least.

Icey

#16
I just had a quick idea. so I skimped to the bottom. Any-who, Can you send one of us the compiled folder so we can see if the problem is just you computer? Because if that's the case then you really don't need to worry...much.

Akril15

Quote from: monkey_05_06 on Mon 06/06/2011 21:09:05Actually, one thing you could try is to create a template file from your game and start a new 3.1 project using that template. Could be worth a shot at least.
I actually already tried doing that (I mentioned it in my second post) and ran into the same problem.

Quote from: Studio E3 on Tue 07/06/2011 02:00:01
I just had a quick idea. so I skimped to the bottom. Any-who, Can you send one of us the compiled folder so we can see if the problem is just you computer? Because if that's the case then you really don't need to worry...much.
I tried viewing the contents of the folder on another computer running WinXP, and the icon showed up as the WinXP default .exe icon there too. I'm starting to think this might just be an unfortunate XP quirk.

Scorpio82

Found a solution to an old problem:

Split the game into resource files.

I run XP and had the same problem where the custom icon would toggle on and off during compilation. It would always permanently revert to the default EXE icon somewhere around the 600mb mark - so I'm guessing it's a game size issue. When I broke my game into 200mb chunks, the custom icon worked.

SMF spam blocked by CleanTalk