PDA

View Full Version : So, this is cool - Custom icons and tool-tips for CAS thumbnails.


Snaitf
15th Sep 2014, 12:30 PM
First, take a look at the attached screenshot, and be impressed. :P

Ok, so here's a "brief" :rolleyes: explanation of how I did it.

First, I noticed that the animal hats from the Deluxe edition (the ones with the icon over the thumbnail in CAS with a tool-tip) had a unique RK in their TGI list. The Type ID (0x0x6017E896) however was nowhere to be found. I looked in every .package file that came with the game, and nothing.

So, I looked for the Instance ID instead. And I found both a data file and an image file. Then, to test, I cloned an item, changed the first RK in the TGI list (the one that's all zero's), to the same Type and Group IDs as the animal hat, giving it a unique Instance ID.

I then exported the image and data file from the animal hat. Then I edited the data file and changed the references of icon and icon_highlight to the same unique Instance ID I created above. Then I imported both the data file and the image into my cloned item, giving them that same Instance ID as well. Tested it in the game, and sure enough, there was the icon on my cloned item's thumbnail, with the accompanying tool-tip.

Next, I opened the image in photo shop, and for some reason it just showed up as a small black square. I've noticed this happens with a lot of the small images I export from the .package files. Anyhow, I took the image I wanted to use, shrunk it to the same size as the 'black square' and copied it over it. Saved as a DDS, and re-imported. Then tested in game, and it worked. The icon now had the my image.

Now, in the data file, there were two references to keys in the STBL file. One was the buff_name (the top line of the tool-tip), and one was the buff_description (the bottom line). So, I gave each reference a unique key, and then created a STBL file with my 2 strings using those keys. (I made a new STBL with the same Type and Instance IDs as the original, but with a unique Group ID, so I didn't have to include the entire original STBL that might cause conflicts with other CC.)

And finally, I thought that my item might give the sad buff when worn because of the data file I had used, but for some reason it didn't, which was a good thing. But just to make certain, I edited the data file again and changed the refrences to audio_string_on_add, audio_string_on_remove, and mood_type to all zero's. I wanted to make sure I could use these files on any of my creations without them changing my sims moods.

Phew, that's a lot of work for a little icon, but if you decide to give it a go, I wish you luck and happy simming.

EDIT: Attached example, and could someone without the version with the animal hats please let me know if this works for them, thanks.

EDIT: Attached example updated to work in all languages (hopefully). Can someone confirm? Thanks...

EDIT: Ok, it seems that using the first RK in the TGI list (the one that's all zeros) can cause some items to crash, so, unfortunately, to do this properly, you need to insert a new RK into the TGI list, and then edit the mBuffResKey BYTE to point to your new RK. Currently, this requires hex editing your CASP file. The attached example has been updated.

trap lorde
15th Sep 2014, 7:06 PM
I am impressed uhhh thx for sharing man, I rly appreciate it :)

MaclimesZero
15th Sep 2014, 7:36 PM
Brilliant! I will be giving this a try tonight!

CmarNYC
15th Sep 2014, 7:55 PM
Very nice discovery! A lot of creators will appreciate being able to personalize like this. I don't suppose you could upload the package as an example? Have you tested in a non-deluxe installation?

xdarkshadowx
15th Sep 2014, 8:36 PM
Genius!!! , Thanks for sharing this :up:

Snaitf
15th Sep 2014, 8:58 PM
Very nice discovery! A lot of creators will appreciate being able to personalize like this. I don't suppose you could upload the package as an example? Have you tested in a non-deluxe installation?

Example attached to first post, and no, I haven't tested with non-deluxe yet, hopefully someone without the animal hats will try this and let me know if it works for them.

Anubis360
16th Sep 2014, 3:29 AM
I would love to customize this for my CC! I hope modders can add such option on their tools soon :D

CmarNYC
16th Sep 2014, 7:39 AM
I can confirm it works in limited edition. :)

xdarkshadowx
16th Sep 2014, 9:06 AM
I have a trouble here.
my game is in Spanish and the file doesn't work correctly
I changed settings in windows registry to put my game in english and the file works fine.
http://imagizer.imageshack.us/v2/555x240q90/538/uTE20S.jpg
I think the STBL file needs multi language support

Snaitf
16th Sep 2014, 1:36 PM
I have a trouble here.
my game is in Spanish and the file doesn't work correctly
I changed settings in windows registry to put my game in english and the file works fine.
http://imagizer.imageshack.us/v2/555x240q90/538/uTE20S.jpg
I think the STBL file needs multi language support

Hmm, thanks for letting me know, something I'll have to look into.

Snaitf
16th Sep 2014, 1:36 PM
I can confirm it works in limited edition. :)

Awesome, thanks...

Snaitf
16th Sep 2014, 2:24 PM
@xdarkshadowx - Can you test the new one, see if it works now?

xdarkshadowx
16th Sep 2014, 3:31 PM
Everything works fine now :up:

Snaitf
16th Sep 2014, 3:37 PM
Everything works fine now :up:

Excellent! TYVM

KitOnlyHuman
21st Sep 2014, 12:47 AM
I've been trying for hours to figure this out but it seems that I can't even find the Type ID that you're saying was unique. So I looked for the unique instance ID and went through all the files and nothing even came up.

I'm so lost. =S

plasticbox
12th Nov 2014, 1:23 AM
Woops, I think this was posted before the Tutorials forum existed? Moving to Tutorials.

Dadadam
20th Nov 2014, 5:29 PM
Somebody here who can help me? A tutorial with pictures would help. I'm German and I didn't understand ANYTHING altough my English is very good.

plasticbox
20th Nov 2014, 5:51 PM
I can translate if you tell me exactly which parts of the text you don't understand.

Snaitf
20th Nov 2014, 7:44 PM
The easiest way to do this, now, is to use S4CASTools