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!
Retired Duck
retired moderator
Original Poster
#1 Old 29th Oct 2006 at 6:57 AM Last edited by Echo : 29th Oct 2006 at 9:32 AM. Reason: Bad typing
Default Creating new pet pattern alphas
Hi all,

I know this is technically a "texturing" discussion, but it's fairly technical so I think here is probably a better place than the object or bodyshop discussions.

I've successfully gotten a couple of new pet alpha mask layers into the game without them obviously overriding any of the existing patterns. However, there are a few things I haven't been able to track down yet and I'm about to run out of weekend (there's very little chance I'll get any spare time this week to keep working on it), so I figured throw it open to see if anyone else is able to take it to the next level.

Also, many thanks to HystericalParoxysm for all her hunting around in bodyshop files finding patterns for me. Now I know why I prefer BHAVs to bodyshop!

Now, here are a few notes that I've managed to pull together:
- The texture overlay 3DIR and XML files are in catalog/skins/skins.package. Files for the same skin share common instance numbers, but all of the files share the same group.
- The 3DIR files that are related to the UI (amongst other things) and the BINX files are in catalog/bins/globalcatbin.bundle.package. Again, files for the same skin share common instance numbers, but they are not the same as the instance numbers listed in the previous dot point. These 3DIRs reference the above XML files by TGI inside themselves.
- The TXTR files are in 3D/Sims07.package, but they reference LIFOs in Sims08 through to Sims13. Pinhead's original recolouring tutorial describes how to combine them into a single TXTR for those who weren't around back then.
- The TXMT files are in 3D/Sims02.package. They need to have hashes generated for "family", because if they are set to 0 it will override the default "no colour" in pattern for the layer.

I have attached two files. The first, (the zebra looking one) has all the UI files, where the second (the one with test written on it) does not.

The problems I am having are as follows:
- I cannot change the group numbers in these files to any of the generally used ranges. I'm not *strictly* sure this is a problem, although it could potentially cause conflicts with Maxis items in the future. I'm hoping one of the extremely clever people who worked out the way to get recolours to use these groups might have some insight into this one.
- I cannot get the description text to show the correct value. In the one with the UI files, the description is blank. In the one without the UI files, the description comes up with "Tabby Stripes 1", which makes me think that I may have a partial conflict with another texture, causing the two packages to share a common description text. I cannot find where the description text is stored in the game files, so the STR# in the current file is really nothing more than a guess... I'm hoping someone might have stumbled across the source for these descriptions in the game files who could shed some light on this.

Please remember that this is not intended for general use as a custom content download. That would be a Bad Idea(TM). They're here for people trying to solve the problem to use as input. So please don't nitpick the texture! I was trying to make it work, not trying to make it pretty! )
Screenshots
Attached files:
File Type: zip  petmask tests.zip (76.9 KB, 105 downloads)
1 users say thanks for this. (Who?)
Advertisement
world renowned whogivesafuckologist
retired moderator
#2 Old 30th Oct 2006 at 10:25 AM
Quote: Originally posted by Echo
The TXTR files are in 3D/Sims07.package, but they reference LIFOs in Sims08 through to Sims13. Pinhead's original recolouring tutorial describes how to combine them into a single TXTR for those who weren't around back then.


I'm poking around with this now to see if there's any more I can get on it (my god you've got it well documented) but I wanted to point out that you don't need to take out the LIFO references via that method - if you use Build DXT with the correct settings for the full-size to import your textures, it'll overwrite/override/erase in some technicalmumbojumbo way the LIFO references. Confused me at first when I was doing default replacements as I was trying to replace the original LIFOs too, but Build DXT just gets rid of all that for you at once.

my simblr (sometimes nsfw)

“Dude, suckin’ at something is the first step to being sorta good at something.”
Panquecas, panquecas e mais panquecas.
Instructor
#3 Old 30th Oct 2006 at 10:49 AM
Quote: Originally posted by HystericalParoxysm
Build DXT just gets rid of all that for you at once.
That's a useful hint, also for other purposes, thank you!

No, I don't want to be involved in this discussion (just following) so I didn't DL

Yes, I am serious though I'm not serious at all. I'm serious about this!
Even the joker can be deadly serious...
Wichtig ist, was hinten raus kommt!
Entscheidend daran ist, wie?
Test Subject
#4 Old 3rd Nov 2006 at 4:14 PM Last edited by Theo : 3rd Nov 2006 at 4:23 PM. Reason: typo
I think you'll have to change the stringsetidx property in the BINX resource, setting the value to the correct index in the 3IDR.

So, if the 3IDR is laid out as follows:

0: UI Data
1: Collection ...
2: Texture Overlay XML ...
3: Text Lists

Then the corresponding BINX should have:

...
stringsetidx = 3
...

This is taken from the normal sim skin files, but will probably apply to the pet coats too.
Test Subject
#5 Old 27th Nov 2006 at 5:24 AM
Any news on this?

Also sorta off topic but is anyone working on custom fur accessories like ears and tails?

I don't know why but it seems Pets modding has come to a stand still.
world renowned whogivesafuckologist
retired moderator
#6 Old 27th Nov 2006 at 9:10 AM Last edited by HystericalParoxysm : 27th Nov 2006 at 9:59 AM.
Custom fur accessories like that are probably going to be the very last thing we figure out, if we do. I took a look at pet body meshes and they've got sooooo many different parts - and I don't think we have any sort of plugins that will handle pet skeletons correctly to make them anyway.

As to why Pets modding has come to a standstill, I think it's due to a lot of the people who had any knowledge of Body Shop-type meshes deciding they dislike expansion and uninstalling it or just doing other stuff, not really caring too much about it... as I have been.

Those six or so interactions that pets have really aren't worth all the trouble the darn thing causes with the rest of the game, especially for creators. There are some still plugging away at it I'm sure, but I think the continuing struggle to fix the problems that the expansion has caused with different items has lowered morale and motivation on it.

my simblr (sometimes nsfw)

“Dude, suckin’ at something is the first step to being sorta good at something.”
Panquecas, panquecas e mais panquecas.
Test Subject
#7 Old 28th Nov 2006 at 6:20 AM
So is Pets going to be another Unleashed as far as modding is concerned? Are we really going to be stuck with the limits of Create-A-Pet? Or do you simply mean there are problems that are of more priority that need to be fixed first before anything "extra" can be done?
Retired Duck
retired moderator
Original Poster
#8 Old 28th Nov 2006 at 10:02 AM
I don't think that Pets will be completely dismissed by the modding community, but I think it won't be a quick fix either. It's not a matter of adding a few new features, there are significant changes to data, some of which is not compatible with existing data. Modders have to figure out how to approach these issues before trying to crack all these new features. Remember too that our current state of modding only came about a long time after the Sims 2 was originally released.

I did try Theo's suggestion, but it didn't resolve the problem. As I have a few other projects going at the moment I haven't done much more with this yet, although as I stated above anyone is welcome to play around with the files (including you if you'd like) and see what they can find.
Lab Assistant
#9 Old 1st Dec 2006 at 4:37 AM
Well you figured out more than I could Echo..been sitting here playing with it for a while and had only just managed to find the files and spend the next two hours staring at them wondering how to make them do what I want...I'll play around with it some and see what I can do, have a whole month of nothing but time until I start college, hopefully that will be long enough LOL

[COLOR=DarkSlateBlue]There are those that do, those that teach and those that merely dream.[/COLOR]
Lab Assistant
#10 Old 1st Dec 2006 at 8:26 AM
Dur.... okay I'm still working on this but found out you can make your own locked fur markings while playing with this, at least that's what I believe I did, it was showing up fine and dandy with everything I did until I extracted the STR list from the capcollections file, added 0x0037 Zebra Coat Markings for Cats and overwrote the STR file that was in with the original pkg file for the custom coat... going to play with it a bit more and see if it will unlock for me or not and then show the name possibly.

One thing that I did notice is that the custom coat marking is not showing up as a custom item in my game at least which leads me to wonder about the probability of actually creating and sharing custom skins for pets will be, I mean if one person makes one and places it in the collection and they're not showing up as custom wouldn't it mean that if I downloaded #37 from one person and another #37 from someone else one would overwrite the other?

ugh...my brain hurts now...

[COLOR=DarkSlateBlue]There are those that do, those that teach and those that merely dream.[/COLOR]
Retired Duck
retired moderator
Original Poster
#11 Old 1st Dec 2006 at 12:21 PM Last edited by Echo : 1st Dec 2006 at 12:38 PM.
The ones attached may not show the "custom" icon, but as far as I could tell it was not overriding any of the skins in game. That is, I counted the number of patterns before, and again after the files were added, and the ones I added did not override any of the earlier ones. I think the files use the same TGI system as meshes, where the instance is based on a hash of the filename (http://www.sims2wiki.info/TGI). If that's the case, then the custom clashes aren't quite as much as a problem so long as creators use a sensible filenaming structure, although yes it still could potentially be problematic...

Also, thanks for having a go with it. I felt bad starting something then just leaving it to languish here unattended.
Lab Assistant
#12 Old 1st Dec 2006 at 8:40 PM
hehe... can I say I solved the naming problem, by just deleting all the names LOL? .... I think however that I have found the STR file for the coats, I guess so since I managed to delete all the names, coats still show up and work just fine there's just nothing to go by other than color when you're looking at the different layers. So hopefully there's a way for me to figure out what the heck I did so I can undo it and then do it correctly.. Anyways the file is globalcatbin pkg towards the bottom, I added a string to the bottom named zebra 1, extracted the file, saved it to the zebracat pkg, deleted everything other than the zebra 1 and POOOF no names for things So it stands to reason that if I go back and just add it back to the pkg file without deleting anything that it should work right? Or should I change the STR file to say zebra 1 and simply add that into the globalcatbin? sorry rambling now, but might have found something to work with at least

[COLOR=DarkSlateBlue]There are those that do, those that teach and those that merely dream.[/COLOR]
Lab Assistant
#13 Old 1st Dec 2006 at 10:37 PM
Okay this one has kicked my butt, I admit defeat, I'm completely out of ideas at this point, I can delete coat marking names all day long and add them back so long as they're maxis originals but I just can not get it to pop up the name of the zebra coat markings. I know there's got to be a step someplace that I'm just missing but I can't seem to find it... I've also opened pretty much every file that can be opened with SimPE and all I could find was the globalcatbin with the coat textures, no other file seems to have it. Maxis just seems to have it in for the pets and creators. Other than the name issue however it seems to work just fine, it fades correctly, colors correctly, takes on the right textures, you can play it in the game without issues or at least on my computer. It acts perfectly normal but doesn't have a name in the catalog. I'm going to try and create another texture and see if it overwrites or not, hate to say it but not having a name just might have to do in this case.

[COLOR=DarkSlateBlue]There are those that do, those that teach and those that merely dream.[/COLOR]
Retired Duck
retired moderator
Original Poster
#14 Old 1st Dec 2006 at 11:08 PM
Cool! Well found! Although it could also be a bit irritating. Is the group/instance for the new strings file referenced by any files as far as you can tell, or is it actually a generic global strings file? If it's referenced by TGI, then we should be able to change the reference to a new file without having to override all the others. If it actually requires a change to a global file though, then that does not bode well for people trying to create and share coats.
Lab Assistant
#15 Old 2nd Dec 2006 at 12:43 AM
It appears to be generic as far as I can tell...which isn't very far LOL But I've gone ahead and included screen shots as well, maybe you'll have some more insight or somebody will I hope.
Screenshots

[COLOR=DarkSlateBlue]There are those that do, those that teach and those that merely dream.[/COLOR]
Alchemist
#16 Old 2nd Dec 2006 at 4:25 AM
While I have attained an insight into Pets objects, with the help of Paleoanth and this post from Echo, I am struggling with the execution, meaning I have not yet managed to build any non-replacement package of a skin or a collar.

With the exception of the fact that the XML file type is different (XTOL,XMOL) the general construction of the collar, the alpha layers and breeds appears to be the same. I think that unlike objects that go in the catalog, the name in a STR# is not how the object is located, but rather a 3-part indexing mechanism based on TGI.

Using the terminology that you get in CAS debug mode (Shift-N), there is:

FragKey -> BinKey -> ObjKey -> object

The FragKey is a BINX-3IDR pair, PAIR meaning both share the same TGI. These are found in the GlobalCatbin.Bundle package.
This first 3IDR points to the BinKey and the ObjKey by TGI.

The BinKey is a COLL-3IDR pair, also from GlobalCatBin.Bundle.package. The TGI for the COLL was pointed to by the 3IDR of the FragKey. The 3IDR for the BinKey points to a TextList by TGI, and the BINX in the FragKey seems to have the string number (non-zero based) as the stringindex= parameter. Thus I think is why the attempt by mynxie to add the name and get a result from deleting names did not work, as it is not a key to locating anything.

The 3IDR in the FragKey also points to the appropriate XML file for the type. This file (XMOL,XTOL) pairs with a 3IDR to make the ObjKey (found in the skins.package file).

This ObjKey points to the CRES,SHPE and TXMT files by TGI via the 3IDR.
The XMOL file has the name (for the first collar it is ducollarsmooth_bonesblack) and a numoverrides= parameter.
For the collar, numoverrides=2.
override0resourcekeyidx=5 is the locating element for the first texture override, and this is the 6th line in the ObjKey 3IDR file (element 5 starting at 0).
override1resourcekeyidx=4 is the locating element for the second texture override, and is the fifth line in the ObjKey 3IDR file (element 4 zero-based).

Of course, the CRES and SHPE pointed at in the ObjKey the have the references that point to the GMDC, plus all the other sub-elements that make up a scenegraph file

I know this is quite complicated and requires a lot of modding experience to understand, which is why I shifted from posting in Object Creation and Texturing to Modding Discussion/Research and Development. I would appreciate anyone else that can help putting in their two simoleans worth (or someone that can show me I'm off track before I go over the edge).

<* Wes *>

I may try to build a pictorial diagram of this, although my past efforts at posting diagrams have not turned as well as I hoped because of clarity/filesize tradeoffs.

If you like to say what you think, be sure you know which to do first.
Lab Assistant
#17 Old 2nd Dec 2006 at 8:14 AM
You know Wes that actually makes a lot of sense... I will play around with it some more tomorrow, I knew there was something not quite right in what I was doing and as far as I could tell I did just about everything that could be done to a STR file short of just deleting it LOL.

[COLOR=DarkSlateBlue]There are those that do, those that teach and those that merely dream.[/COLOR]
Alchemist
#18 Old 2nd Dec 2006 at 9:05 AM
I hope you do work on it, and show me up.
I have made a collar recolor here that at present doesn't recolor.
But I did get the name (as seen in the debug data) to change by taking a copy of the whole TextList, changing the TGI and editing just the one line numbered 0x000C (which does correspond to the stringindex=0x0D parameter in the BINX). This is a copy I renumbered to group 0xFFFFFFFF instance 0x00000001.

If I can't find a non-replacement way to add custom things, then I haven't really done anything.

I used group 0xFFFFFFFF for the copies of all the BINX/COLL/STR#/3IDR sets. I hashed the filename to come up with the instance for the first pair, and then added one for each new pair.

The game took the 0xFFFFFFFF group and changed it to 0x6F000209 when it loaded it.

It's late here. I will try to work on this some more, and possibly upload it, broken and all, for someone else to play with.

<* Wes *>

If you like to say what you think, be sure you know which to do first.
Instructor
#19 Old 2nd Dec 2006 at 5:18 PM
Well, now I don't feel so bad that I couldn't figure it out myself. This is obviously way above my limited modding skills. I will be happy to test and provide any information I can. I took notes when I was working on it, if anyone wants them. They are posted in the other thread we were discussing it on.

Cogito ergo nupta non sum.
Alchemist
#20 Old 2nd Dec 2006 at 9:21 PM Last edited by wes_h : 4th Dec 2006 at 4:48 AM.
OK, now I'm going to share my 'progress'.
I am close, but I am right now stumped by the hashing methodology used for the XMOL family value.
I am attaching a package that puts a new collar entity (not overwriting a slot) into the Create-a-Pet program. The collar that shows up is the heartsred one.
That is a testing artifact. I have a scenegraph for a recolor (started by Paleoanth) in the package. But I have found that the "family' (guid) value in the XMOL section is the key to linking the scenegraph to the collar entity.
And I am unable to figure out how to get my scenegraph properly hashed to create the right value.
If you get the family value from a different collar XML and place it in the XMOL in this package, that is the collar you will get.
So it appears that some part of the scenegraph name/id values is hashed and that is the 'handle' the game uses to find it.

I hope someone that better understands the hashing can help me. Also, please remember that the textures/names are here for testing, not for release. I's not a polished work, but a proof-of-concept.

<* Wes *>

Edit: It now appears to me that the Hash Generator includes a random component in the calculation.
Edit2: Now I have found XMOLs that share these family= values have the same sets of material description references, but not necessarily the same CRES or SHPE.
Edit3: The use of the family= guid from a different recolor working is because the item has tsDesignModeEnabled in the GMND, but not the new name for my texture.The game appears to step back to a known GUID when it is having trouble location the rest of the pieces.
Attached files:
File Type: zip  CollarTesterWesOne.zip (6.7 KB, 23 downloads) - View custom content

If you like to say what you think, be sure you know which to do first.
Lab Assistant
#21 Old 3rd Dec 2006 at 5:55 AM
okay good news for ya Echo... err, sort of, I kind of lost the texture now and it's the wrong name but I think I can fix it now to where it will show the proper name. The error seems to have laid within the BINX. I went through the binx files in the globalcatbin and discovered that there were a few discrepencies in the way the BINX in the zebracat file and the other BINX's were written so I change them follow what I took a shot in the dark to believe was the proper one...well apparently it wasn't as you can see from the screen shot below, however I think I maybe able to find the correct one now to where it will show properly in the game. It does appear as though Wes was correct that it is not STR based within the pkg file, but I do believe that it still has to be corrected in the globalcatbin.bundle textlist for the petcoattextures to properly show the name in the game. Again this is not a 100% thought, I'm still confused as heck on this thing, and I'm hoping I can finish this up tonight because I'm just that excited about it, however if not then there's always tomorrow.

I also know that it was showing as Tabby stripe 1 in your game but for mine it has been nothing but blank, so this is a good thing...If I can restore the texture and obtain the proper name, but at least it appears to have been narrowed down to a single file.
Screenshots

[COLOR=DarkSlateBlue]There are those that do, those that teach and those that merely dream.[/COLOR]
Lab Assistant
#22 Old 3rd Dec 2006 at 7:16 PM
okay I have the texture working again... in the binaryindex file
iconidx shoud end in 4 not 0 and the stringsetidx should end in 3 I believe, now the only problem is that if you change the stringsetidx you do get a name however I am only getting silver as the name inside the game, I have tried changing it to various other numbers and even letter with the same result, so I may have hit another dead end here but there's still a few more things to try out, at least now it says something.

[COLOR=DarkSlateBlue]There are those that do, those that teach and those that merely dream.[/COLOR]
Lab Assistant
#23 Old 4th Dec 2006 at 1:39 AM
Righty-o now I'm trully confused... if you correct the binary index and delete the STR file from the pkg you get the name silver no matter what, if you add the STR file and change the binary index you get a big ol' blank spot. So now I have no clue if the answer lies in the binary index file or not, it seems deleting the STR file is the only true way to get a name inside the game to appear, but it also appears that no matter what you reference to in the binary index will allow for you to obtain the name. I've changed to just about every number and letter combo I can think of, and even played with anything that would allow me to play with it short of the texture itself, I don't think I would feel as frustrated with this right now if I could at least get a different name to appear now then it would just be a matter of determining how exactly it references the names in the list to that particular file. At any rate this is my last post on the subject until I either get it working or someone else does ...it seems I'm just cluttering the board with failures.

[COLOR=DarkSlateBlue]There are those that do, those that teach and those that merely dream.[/COLOR]
Alchemist
#24 Old 12th Dec 2006 at 4:58 AM
Well, I have answers to some of the questions, and a slightly broken demo.
I got the idea that the way I added a dog collar was essentially the way to add a new Coat Color template file to CAS. I was right there.

If you haven't looked already, I explained adding a dog collar here: http://www.modthesims2.com/showthread.php?t=208775
In the tutorial file in this download is an explanation of the linking files. However, for the Coat Color you use an XTOL (texture overlay) instead of an XMOL (mesh overlay).

There are a lot less items needed in the Coat Color template. There are 6 files used for linking, a text file, and then a jpg icon swatch (16x16), a TXMT and the TXTR itself.

I am attaching my first coat color, for large dogs only (there would need to be "lu" and "fu" versions made for the small dogs and cats). It is not perfect. The color intensity in the rendered dog is quite a bit more washed out than it looked when I made it, although that could be an artifact of some other rendering interaction I missed. The head also generally misses being colored, depending on body template selected, remaining generally the previous color.

Since this is a body, I likely needed to make another package for a head, which I didn't make yet. There may be other items that need made to make this work reliably. But I have attached a snapshot of the new coat color item in CAS.

Anyone interested may use this file as they like to experiment with, my only restriction is that I don't want to see it just copied anywhere else. Fix it, rename it, use any parts you want, whatever, but don't distribute it as-is.

<* Wes *>
Screenshots
Attached files:
File Type: zip  CoatColorTestWH01.zip (117.2 KB, 45 downloads) - View custom content

If you like to say what you think, be sure you know which to do first.
Instructor
#25 Old 12th Dec 2006 at 5:59 AM
Wes, why do you excuse all the time? :D
Hey, it's great! It's a start! You're a pioneer exploring unknown area - where no modder has been before (can't quote Star Trek correctly in English I guess) so it's great as is and the texture and else will be fixed. Nevertheless phantastic job!
Thank you!

Yes, I am serious though I'm not serious at all. I'm serious about this!
Even the joker can be deadly serious...
Wichtig ist, was hinten raus kommt!
Entscheidend daran ist, wie?
Page 1 of 2
Back to top