Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Sir Not Appearing In This Film
Original Poster
#1 Old 12th Jun 2009 at 7:25 PM
Default Editing CAS part data embeded XML?
Is there a way to edit the embeded XML in a CAS Part Data file (0x034AEECB)? Most of the file is legible in notepad, but making changes and saving into a new package usually results in crashing the game. I'm assuming It's because the parts that aren't legible can't be handled by a simple xml/text editor, and don't get saved correctly. What program could I use (if any) to edit the XML part of these files?
Advertisement
Warrior Gryphon
site owner
#2 Old 12th Jun 2009 at 8:50 PM
I was looking at these files myself yesterday, but to be honest, the top and bottom extra data would need decoding before editing of the XML could happen properly. You can't just do that in notepad - you have to use a proper hex editor.

What you can try doing is figuring out the length of the XML (both 8bit and 16bit) and seeing if that matches any of the other values.

If you get stuck, come on the IRC chat and I can explain more.

Story books are full of fairy tales, of Kings and Queens, and the bluest skies.
Sir Not Appearing In This Film
Original Poster
#3 Old 12th Jun 2009 at 10:30 PM
Well, at least I got it to where my game doesn't crash, but this ISN'T what I had in mind, LOL:



What I did was to open the cmTopShirtTee CAS data file in a hex editor, change the encoding to Unicode (UTF-16), and display as decimal. I saw that the 2nd column had a value almost the size of the number of bytes between the first <preset> tag and the last </preset> tag, so I changed one value in the last preset from true to false (making the file 2 bytes larger) and then increase that value in the 2nd column by 2 bytes to match. And this time my game didn't crash, but it still didn't work. I'm gonna keep poking around with this for awhile...
Screenshots
Warrior Gryphon
site owner
#4 Old 12th Jun 2009 at 11:18 PM
lol invisible man :D

Story books are full of fairy tales, of Kings and Queens, and the bluest skies.
Sir Not Appearing In This Film
Original Poster
#5 Old 12th Jun 2009 at 11:26 PM
I'm definately getting close now, this time I edited the last preset to point to my kenny stencil instead of the bulldozer one by changing the instance it refrences without changing the filesize. Then I made a new package file, imported the new CAS data file with an instance of aaaaaaaaaaaaaaaa, and imported my kenny stencil with an instance of 1111111111111111 (which is where i pointed it to in the data file), saved and tested, it works!




Now, to find out how to be able to change the filesize without killing it, so I can get rid of the extra shirts in the row...
Screenshots
Warrior Gryphon
site owner
#6 Old 12th Jun 2009 at 11:44 PM
The problem I found with adding *new* stencils/recolours is that you have to modify that CAS parts file, so you can't just add new stencils via external package files. Which sucks.

I'll probably work on a more complete CAS part data editor for qadpe at some point tommorow.

Story books are full of fairy tales, of Kings and Queens, and the bluest skies.
Sir Not Appearing In This Film
Original Poster
#7 Old 13th Jun 2009 at 2:50 AM
Almost done... I've figured out how to change the filesize without it breaking, so I could remove the extra shirts from the row, there's just one problem now, the old stencil is showing on the thumbnail, but when you click on it, the new stencil shows up. I can't, for the life of me, figure out how to make the thumbnail represent the new stencil, on the previous one, it did automatically, but this time not.



See? It's my design on the shirt, but the thumbnail still shows monkey, any ideas?
Screenshots
Retired Duck
retired moderator
#8 Old 13th Jun 2009 at 3:45 AM
Try deleting the cache files?
Sir Not Appearing In This Film
Original Poster
#9 Old 13th Jun 2009 at 5:29 AM
Quote: Originally posted by Echo
Try deleting the cache files?


ROFL, never even crossed my mind *OOF* It worked, just deleted everything in the C:\Documents and Settings\Snaitf\My Documents\Electronic Arts\The Sims 3\Thumbnails folder, and it shows up fine!



Now to do the same with the other South Park kids, tweak the colors, and file names, then I will upload final results...
Screenshots
Tentacle Of Righteousness
#10 Old 13th Jun 2009 at 7:38 AM
Very cool. Hopefully soon someone will make a tool to do all this auto, hopefully with some function to import a pic and have it do all this for us :D

I know, wishful thinking

Alt 255
The sky above the port was the color of television, tuned
to a dead channel.
Sir Not Appearing In This Film
Original Poster
#11 Old 13th Jun 2009 at 8:05 AM Last edited by Snaitf : 13th Jun 2009 at 9:13 AM.
Well, I'm finally done, it was NOT an easy task, but I think the results were worth it. I'd like to thank Delphy for keeping me pointed in the right direction, Echo for pointing out an easy solution to a small problem, and everyone involved in the S3PI project, screen shots and package file attached. The Sims 3 upload sections don't include a clothing category, which section should I submit this to?
Screenshots
Attached files:
File Type: rar  TS3 Clothing - cmTopShirtTee - South Park - Snaitf.rar (150.5 KB, 55 downloads) - View custom content
Tentacle Of Righteousness
#12 Old 13th Jun 2009 at 9:53 AM
Very nice Snaitf, congrats!

Alt 255
The sky above the port was the color of television, tuned
to a dead channel.
Warrior Gryphon
site owner
#13 Old 13th Jun 2009 at 2:41 PM
Snaitf, am I correct in thinking that you added new stencils rather than overriding the existing ones?

If so, I see a HUGE problem (and this is something inherant in the game itself) - that is, nobody else can *also* add new patterns to that particular mesh without overriding your extra stencils.

Story books are full of fairy tales, of Kings and Queens, and the bluest skies.
Sir Not Appearing In This Film
Original Poster
#14 Old 13th Jun 2009 at 4:30 PM
Quote: Originally posted by Delphy
Snaitf, am I correct in thinking that you added new stencils rather than overriding the existing ones?

If so, I see a HUGE problem (and this is something inherant in the game itself) - that is, nobody else can *also* add new patterns to that particular mesh without overriding your extra stencils.


No, not true, if you look at my last screen shot, both the first and second row of shirts are the same mesh. If you export the CAS part data file, and make a new package for it, giving it a new instance number, another row of shirts will appear using the same mesh. And if you use new instance numbers for your stencils, nothing will conflict. All my resources use an instance number of 0x536e61697466xxxx (536e61697466 is Snaitf converted to hex). Then simply point the CAS part data file to the instances of the new stencils. What we need, is a way creators can sign up to get unique instance numbers, so we are not accidently conflicting with eachother. For example, if I made these shirts using instace 0x1111111111111111, and someone else made an object/clothing/mod using the same instance, then they would conflict.

If I misunderstood you, I'm sorry...
Warrior Gryphon
site owner
#15 Old 13th Jun 2009 at 5:34 PM
Okay I gotcha - if so thats interesting. I'm guessing that your CAS part data contains information only about your particular stencils and not the originals. Nice find

Also, with regards to instance IDs - thats easy. Try something like Snaitf_KennyTshirts_20090613183300 then FNV64 it. (FNV64 is used to convert the filenames of the textures/etc to instance IDs in game). That way nothing will ever conflict.

Story books are full of fairy tales, of Kings and Queens, and the bluest skies.
Sir Not Appearing In This Film
Original Poster
#16 Old 13th Jun 2009 at 5:43 PM
Quote: Originally posted by Delphy
Okay I gotcha - if so thats interesting. I'm guessing that your CAS part data contains information only about your particular stencils and not the originals. Nice find

Also, with regards to instance IDs - thats easy. Try something like Snaitf_KennyTshirts_20090613183300 then FNV64 it. (FNV64 is used to convert the filenames of the textures/etc to instance IDs in game). That way nothing will ever conflict.


Yes, my new CAS part data file only references my new stencils, it doesn't even look at the old ones, I could do this again, and again using the refrences to the same meshes without any conflicts.

Could you give me a little more info on the FNV64 thing, I'm coming up empty on how to do this, if there's a little tool that does it, point me in the right direction please.

Also, I would like to submit these for upload, and I need a section to put them in, there is no clothing or logo/stencil categories for Sims 3 here. Should I submit them to MISC, or wait for an appropriate category to be added?
Warrior Gryphon
site owner
#17 Old 13th Jun 2009 at 6:18 PM
Wait a little while and I'll enable the categories for it.

To FNV64 something, you do:

Code:
        public static UInt64 FNV64(this string input)
        {
            string lower = input.ToLower();
            UInt64 rez = 0xCBF29CE484222325;

            for (int i = 0; i < lower.Length; i++)
            {
                rez *= 0x00000100000001B3;
                rez ^= (char)(lower[i]);
            }

            return rez;
        }


However, if you give me an hour or so, I'll update and release a limited run of QADPE which will let you edit the CAS part data files.

If you could come in chat just to chat so I know what you changed exactly (I can tell from looking at your packages but I'd just like to clarify anyway), that'd be great.

Story books are full of fairy tales, of Kings and Queens, and the bluest skies.
Field Researcher
#18 Old 13th Jun 2009 at 8:42 PM
Snaitf, so when's the tutorial coming out? The shirts look great. Look forawrd to more from you, though I am completely baffled by all the 1's and zeros and hex-yada-yadas.
Sir Not Appearing In This Film
Original Poster
#19 Old 13th Jun 2009 at 10:14 PM
Quote: Originally posted by Gillianivy
Snaitf, so when's the tutorial coming out? The shirts look great. Look forawrd to more from you, though I am completely baffled by all the 1's and zeros and hex-yada-yadas.


Thanks for the compliments.

From what I understand, Delphy's taking what I learned and using it to create a tool, so just be patient and soon this will all be MUCH easier...
Field Researcher
#20 Old 14th Jun 2009 at 12:29 AM
Wow, I wish I had more skillz than art and basic "follow a tutorial". XD Well, we're all learning this new game together. I'm a latecomer to Sims 2 (bought it in February) so not yet trained in the ways of the modding...
Tentacle Of Righteousness
#21 Old 14th Jun 2009 at 7:07 AM
Congrats on this Snaitf, you were the first one to do this! You will forever live in sims 3 modding history! Also Thank God for Delphy and his great tools, can't wait to see the new one for this.

Alt 255
The sky above the port was the color of television, tuned
to a dead channel.
Test Subject
#22 Old 14th Jun 2009 at 7:10 AM
Wow... I hope a tool comes out soon, because I'm obviously not as smart as you guys when it comes to this stuff. I'd love to make some graphic tees though! lol

Don't compare yourself to me... You'll make yourself feel bad...
Test Subject
#23 Old 14th Jun 2009 at 12:16 PM
yes lots of kuddos to Snaitf ^_^ It's all so very exciting!
Test Subject
#24 Old 14th Jun 2009 at 1:24 PM
Could this technique also be applied to facepaints? That would be amazing if it could, There would be tons of possibilities. Good work on this man I was hoping someone was close to cracking it.
Warrior Gryphon
site owner
#25 Old 14th Jun 2009 at 1:51 PM
Yes, from what I can tell it can. Some of the meshes dont have the requisite XML, though, and those will have to be disabled for now. The full list of meshes, though, including non-XML ones, consists of 1,561 items.

Story books are full of fairy tales, of Kings and Queens, and the bluest skies.
Page 1 of 3
Back to top