- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Modding Discussion >
- TUTORIAL: Custom Paintings
- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Modding Discussion >
- TUTORIAL: Custom Paintings
Posts: 62
Thanks: 408 in 1 Posts
Posts: 2,713
Thanks: 1911 in 12 Posts
I was reversing with your FNV generator, which is how I reverse for the 'replacing the hex values' step, without issue. I only employed the same method here. -shrug- I can't copy/paste the reversed hashes from the stbl into my object file, so I need to just refer to the reversed code and type it in manually. I can't imagine that I typed it in wrong every single time I tried it. (I tried it a lot of times, with brain-aching concentration. hehe)
Posts: 2,713
Thanks: 1911 in 12 Posts
I open Postal. I go to Plugins, and Open Console. File, open, new stbl. I copy
stbl.strings.put(new Long(Checksum.fnv64("[STRING KEY]")), "[STRING VALUE]") |
In STRING VALUE I type the title of the painting, say, "Windmill Jess".
In the next STRING KEY I type coltraz0917091:50
In the VALUE, I type: "For best results, hang wall-hanging on wall".
So I have this:
import com.lepidllama.packageeditor.dbpf.*
import com.lepidllama.packageeditor.resources.*
import com.lepidllama.packageeditor.fileio.*
import com.lepidllama.packageeditor.utility.Checksum
import com.lepidllama.packagegui.Main
Stbl stbl = new Stbl();
stbl.version = 2;
stbl.blank2 = new byte[6];
stbl.strings = new HashMap<Long,String>();
stbl.strings.put(new Long(Checksum.fnv64("coltraz0917091:49")), "Windmill Jess")
stbl.strings.put(new Long(Checksum.fnv64("coltraz0917091:50")), "For best results, hang wall-hanging on wall.")
Tgi64 tgi = new Tgi64(0x220557da,0x00000000,0x000f16b0,0x0ba8342e);
Header header = Header2.defaultHeader();
IndexBlock ib = new IndexBlock2();
ib.setTgih(tgi);
ResourceLookupPack rlp = new ResourceLookupPack(new ByteArrayDataReader(), header, ib);
rlp.buildAndSetBufferedStream(stbl);
Main.getAppWindow().loadResourceList([rlp]);
All good?
Now I click Script/Run. I close without saving & am back in Postal with a String Table staring back at me. I double click this. A catalogue entry shows below that says,
0x09a604fc80db25bc For best results, hang wall-hanging on wall.
&
0x09a605fc80db2706 Windmill Jess
I go to Hex View and export it to the folder with my object file and .dds file that I'm working on.
Now, I open WinHex. I go File/Open, and open the object file I want to alter. I scroll down to the C in catalogue. I click the C. It turns blue. I click my left arrow 18 times. I click on the character that is now highlighted on the wider pane to the left of the narrower pane where the C in catalogue is. I refer to Postal to get the title's code.
CTRL+COPY. I paste it into Snaitf's FNV Generator's box on the lower left with the "Reverse" button next to it. I get rid of the text and the 0x so that I am left with 09a605fc80db2706.
I click "Reverse". I end up with: 0627db80fc05a609.
I go to WinHex and begin typing the reversed value in. It goes in. I check for errors.There are none.
I repeat process with the description value from Postal. From 09a604fc80db25bc I get bc25db80fc04a609. So now I manually type this value in, in WinHex, right where I left off. I check for errors. There are no errors.
I click Save.
In my work folder I rename the STBL with two 00's in the final set of numbers. I fire up Sim3PE. File/new/import. I select all three files from my work folder and import them. I save as a .package. I save as "coltest."
I drag this into my Packages folder. I clear my caches for good measure. I start Sims 3. I go into an empty lot and build a wall. I go into buy mode. There is my picture. I click it with bated breath and...
Title and Description are nothing but numbers.
Where in this process have I screwed up?
Sorry I'm being such a pain in the ass but honestly I am stumped.
(Attached the file below...)
ETA: This may all be irrelevant, because I just noticed that even snaitf's fixed file is showing up as numbers in my game. When I got rid of most all my package files aside from the fixed version and coltest, the fixed version showed up fine, coltest was still numbers. When I replaced all my packages Snaitf's fixed version went back to being numbers.
Total insanity.
colttest.zip (31.4 KB, 14 downloads) - View custom content | ||||||||||
72032 07-17-09 02:13 colttest.package -------- ------- 72032 1 file |
Posts: 6,105
Thanks: 12809 in 71 Posts
Oh... quick note for tutorial text. When I did the HEX replacements for the texture file for Lips there were only 4 replacements, not 7, so it might be worth mentioning that this varies depending on which painting you mod. |
OK thanks for that was 7 on the couple that I tested, so I guess I overgeneralized.
I just noticed that even snaitf's fixed file is showing up as numbers in my game. When I got rid of most all my package files aside from the fixed version and coltest, the fixed version showed up fine, coltest was still numbers. When I replaced all my packages Snaitf's fixed version went back to being numbers. Total insanity. |
Lol, you said it Hopefully somebody other than me would have a clue about that.
Posts: 62
Thanks: 408 in 1 Posts
I noticed that the stbl file exported from Postal always has the same name. The tutorial only mentions changing the language code not giving it a whole new ID. Testing it... If there are multiple packages with same STBL file name, 1 displays correctly and the rest show up as the weird numbers. Changing the STBLs to unique IDs for each package... everything done with the HEX will then display correctly in game.
Posts: 49
Thanks: 1165 in 16 Posts
Okay, having made a little batch tonight after putting bub to bed, I believe I have the answer for you Coltraz.... I noticed that the stbl file exported from Postal always has the same name. The tutorial only mentions changing the language code not giving it a whole new ID. Testing it... If there are multiple packages with same STBL file name, 1 displays correctly and the rest show up as the weird numbers. Changing the STBLs to unique IDs for each package... everything done with the HEX will then display correctly in game. |
I'm having the exact same problem as coltraz. So are you telling us that we need to generate a new hash number for the stbl and change that number as we do with the img and obj files? Just trying to be clear here. Nothing I tried worked to solve the problem last night.
Errg. No you weren't because I just tried it and it doesn't work. Doing that still shows up numbers.
Posts: 487
Thanks: 28992 in 78 Posts
In the tutorial, in the last section, #1 should should tell you to generate a new FNV64 hash and rename the STBL with that, THEN change the first two characters to "00".
If you have two objects with a STBL of the exact same instance, you will get a conflict.
Posts: 49
Thanks: 1165 in 16 Posts
I'm wondering if you have to make all 16 language changes for that to show up correctly. I know it may not make sense, but not changing the the first two hex numbers to 00 results in numbers.
Nope, I just checked it and it still works out that I have a name but the description is still numbers.
Posts: 2,713
Thanks: 1911 in 12 Posts
Posts: 6,105
Thanks: 12809 in 71 Posts
Posts: 2,713
Thanks: 1911 in 12 Posts
Ahhh ok -- my error, thanks for working that out >< And I'm sorry about the confusion! Apparently I did it right but wrote it down wrong Fixed now. |
Psh! Don't feel bad! It's not like we're paying you for results. Your tutorial is still the awesome, and thank you for writing it. This was and is one of the most important things I wanted for modding TS3.
Posts: 62
Thanks: 408 in 1 Posts
Posts: 49
Thanks: 1165 in 16 Posts
Posts: 2,713
Thanks: 1911 in 12 Posts
Posts: 6,105
Thanks: 12809 in 71 Posts
Posts: 49
Thanks: 1165 in 16 Posts
I've recolored the car painting and it was fine. When I've come across a painting that replaces 0 instances, it's because I've mixed up a byte in either the original painting's hex number or the second hex number that is going to do the replacing. Recheck your hex numbers when that happens.
Posts: 32
Thanks: 247 in 2 Posts
That being said, here are the few places I got hung up and had to use trial and error. Thought you might like to know where a complete N00b got lost.
Place #1
Find and extract the .dds file for the picture you want to clone, and modify it
9. Flatten the file, and save it. We used DXT5 compression, but DXT1 gives a smaller filesize and is probably fine for most images.
When I click save, a box called NVIDIA dds Format v8.23 comes up and there are 2 DXT1 formats available to chose:
1. DXT1 RGB 4bpp no alpha
2. DXT1 ARGB 4 bpp 1 bit alpha
I guessed and chose #1 and since my painting now shows up perfectly in-game I'm assuming I chose correctly?
Place #2
Find and modify the corresponding object file to point to your image
7. "In Windows, I rename the .object file I just hex edited, replacing the old id part of the filename with the one I just generated."
S3_319E4F1D_00000000_00000000000006E7_PaintingAnimalGiraffe%%+OBJD.object is the full file name for my .object file I hex edited in steps 1-6. I guessed that I was supposed to replace the "00000000000006E7" part..
Later in the tutorial ("Make your object file point to the new STBL, and set a price" section) you have a screen shot of the "renamed Object file" that has been opened with the hex editor, but even there I couldn't see how you inserted this new ID. The file name that appears to be open in the
screenie is exactly the same as the one I have above. (Pre-replacement, just the vanilla .object filename after hex editing.)
Again, since it's working in my game i'm assuming what i did was correct?
~E
Sooperacorn_Weeping_Woman_Picasso.rar (41.8 KB, 12 downloads) - View custom content | ||||||||||
Size Packed Ratio Date Time Attr CRC Meth Ver ------------------------------------------------------------------------------- Sooperacorn_Weeping_Woman_Picasso.package 98120 42650 43% 26-07-09 14:14 .....A. 1B3E05F1 m3b 2.9 ------------------------------------------------------------------------------- 1 98120 42650 43% |
Posts: 6,105
Thanks: 12809 in 71 Posts
Again, since it's working in my game i'm assuming what i did was correct? |
I guess so, lol.
Thanks, I'll look at the tut and see if I can sort out the issue with the number... I may have just taken the screen at a different point in the process than where I pasted it.
As for the compression type in the DDS dialog -- basically, in general, you want the highest compression that supports the image you're doing, to save texture memory in-game. What that is depends on the image. The DXT1 no-alpha version is going to generally be fine for pictures, because they don't have transparency, but somebody else reported they had to go up to DXT5 (which includes alpha) to get their image to work... not sure why But it seems there's no one-size-fits-all answer.
Posts: 1,867
Posts: 6,105
Thanks: 12809 in 71 Posts
It's probably close to feature-complete though, so I'll have a go in the next few days. In the meantime, though, this thread lays out the process: http://www.modthesims.info/showthread.php?t=356694
Posts: 1,387
Thanks: 10365 in 50 Posts
Everything works fine for me except the price. I have gone thru the Tut step x step twice and both times it came up as $0.
I moved 1 byte to the right, changed the 8 digit code, and $0 both times?
Posts: 159
Thanks: 555 in 1 Posts
Link to Snaitf's tool still not working for me but I found a hash generator online that did FNV64 and... Success! I now have a custom painting in game. (The frame is white because I just jammed something in and didn't bother with editing properly.) The only hiccup I had following your tutorial was with Postal, because I had an older version. Updating to the current one fixed that. And the price came up as $0 so I must just have put that in the wrong place because the catalog title and descriptiuon were fine. Thanks again. Just wanted to let you know the tutorial was very effective, even for someone like me to whom hexes and hashes etc are gobbledygook. |
Could you possibly put that painting up for download? I'm really bad at makeing objects, clothes or hair....i even sucked at doing things in the sims 2...Its really cool! Thanks
Posts: 6,105
Thanks: 12809 in 71 Posts
Just make sure you get the latest version of the Object Cloner and keep it up to date. Keep an eye out for new features too, it has a lot more functionality than just making paintings.
Everything works fine for me except the price. I have gone thru the Tut step x step twice and both times it came up as $0. I moved 1 byte to the right, changed the 8 digit code, and $0 both times? |
It sounds like you're doing the steps correctly, so perhaps you are inputting the wrong value? What price did you want, and what hexadecimal conversion did you get for it?
Posts: 1,387
Thanks: 10365 in 50 Posts
I entered it as 00 00 8C 24.
Appreciate your help Srikandi, and the tutorial, thank you!
Posts: 68
Thanks: 19377 in 17 Posts
I wanted $100 and the conversion came up as 42C80000. I entered it as 00 00 8C 24. |
You have to type 00 00 C8 42.
Locked thread | Locked by: HugeLunatic Reason: Outdated ... Please see wiki for more up-to-date tutorial | |
Who Posted
|