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!
Lab Assistant
Original Poster
#1 Old 27th Nov 2007 at 6:30 AM
Default Couple of hopefully easy questions.
I'm getting ready to start working on different skintone textures. First question, how do you handle textures that are located in a seperate file? Does the game automatically load everything up? Also I assume the textures/materials need to have the same group ID?.

Second question, does material (TXMT) reference the texture (TXTR)? I've noticed in crammy's user_texture file the materials are orphined from the texture.
Advertisement
Alchemist
#2 Old 27th Nov 2007 at 7:09 PM
Textures located in a different file? Not an issue if properly linked.

The TXMT points to the TXTR file, by name. The name is used to calculate the Instance and Instance Hi values, you usually provide a user group using a forced relocation as ##0x1c050000! prefixed on the front. This is not needed for a non-recolorable local group (0xFFFFFFFF).

Textures and materials need not be in the same group, you can package a material that references a stock game texture, merely by leaving the forced relocation prefix off. This allows you to do such effects as tinting the texture (for example, red like a devil) in the TXMT without actually having to edit and include it, making smaller packages.

<* Wes *>

If you like to say what you think, be sure you know which to do first.
Lab Assistant
Original Poster
#3 Old 30th Nov 2007 at 1:13 AM
Alright some more questions and a battle plan.... oh Echo :-)

First I know it's possible to get data from another package, by using it's guid. (ChristianLuvs custom skintone springs to mind).

Is it possible to read a bcon, a texture and a text resource from another package? What I'm trying to aim at is:
have a bcon with an required instance id - this gives the type of skintone (light, dark, tan, alien...etc)
the actual texture at a required instance id
the text list at a given instance id - the first entry is used as the name of the skintone.

Have the skintone have a unique GUID.

Then if the user wanted to add a new skintone, all he/she would need to add is a couple lines of code to my package (include the unique GUID). The package will read the bcon, txtr & str# from that package. Look at the bcon and place the str# into the correct popup menu entry. (That way all the light skintones go in one group, all the alien in another...etc)

Is this doable in Sims or is there an easier way?

btw skintone i mean flesh colored recolors, not genetic skintones.
Lab Assistant
Original Poster
#4 Old 2nd Dec 2007 at 7:59 AM
Having slight issues with recoloring, mainly I'm getting that wonderful character map on a white background, instead of the texture.

The Txtr entry i've renamed to minigilesstylr_light_txtr. (the texture's creator)
In the TXMT entry I've renamed it to minigilesstylr_light_txmt.

I've modified the cMaterialDefinition to minigilesstylr_light
In Properties renamed stdMatBaseTextureName to: ##0x1C050000!minigilesstylr_light
File list i've replaced it with ##01xc050000!minigilesstylr_light
Categorized prop i've replaced stdMatBaseTextureName to ##0x1c05000!minigilesstylr_light

In All references, both TXTR and stdMatBaseTextureName txtr points to ##0x1c050000!minigilesstylr_light_txtr

Any suggestion on what I'm doing wrong?
Alchemist
#5 Old 2nd Dec 2007 at 8:55 PM
If you mean the character map that is made from instances of the text:
##0x1c050000!minigilesstylr_light_txtr
It signifies that while you linking was correct, the TXTR that is there is unusable for some reason. Flashing blue objects is when the linkage is wrong.

Wrong format, corrupt, not a power of two, etc. are the reasons for that. I am not sure if there are any TXMT options that might be out-of-sync for the TXTR type provided. You can verify this by replacing the texture with a known working one from another package.

<* Wes *>

If you like to say what you think, be sure you know which to do first.
Lab Assistant
Original Poster
#6 Old 2nd Dec 2007 at 11:29 PM
I can't read what the chars say because the objects too small.

I extracted another recolor of it and replaced the one I was working on, and it still gives me that error texture. BTW the sceneographer reports the txmt as orphan, just like the rest of the recolors.

I did rename the texture and txmt names from ****crammyboy to minigilesstylr, but according to you the linkage is correct. And I know the code for using the recolors works, because it works for the other old textures. Is there anything special I have to do since this texture is located in a different file from the code?
Alchemist
#7 Old 3rd Dec 2007 at 12:18 AM
If it is a recolor, then there is more than the links I cited to the base texture for the object.

The are nodes in the GMND that contain the recolor names. You would need to change those to get the recolor textures to show.

<* Wes *>

If you like to say what you think, be sure you know which to do first.
Lab Assistant
Original Poster
#8 Old 3rd Dec 2007 at 2:10 AM
Sorry I couldn't find anything about textures in the GMND. Wheres it suppose to be located? Also I don't know if this matters or not, but recoloring isn't done with the recoloring tool, rather it's done with a popup menu entries.
Retired Duck
retired moderator
#9 Old 3rd Dec 2007 at 9:34 AM
I don't think you can read the BCONs directly, but you can get around that easily enough by having an init function which copies them all into the object's attributes, since you can read attributes very easily. ("Stack Object's Attribute x")

For textures, you can set the source and target objects independently inside the "Change Material" primitive. I believe will let you use a material from a different object's TXMT/MMAT combinations on your own object. I haven't ever tried it though, so I can't say for certain.

When you renamed the textures, did you do it by hand? That's extremely error prone, and not something I'd recommend doing given that we have nice automatic tools these days.

If your texture is coming up as an orphan then you've definitely got something disconnected in the scenegraph. TXMTs are normally children to the SHPE and MMATs. Since you're doing BHAV-based texture swapping then non-default textures should just be linked to the MMATs and not the SHPE. Find the MMAT it's supposed to be linked to, and double check that the "name" field is correct.
Lab Assistant
Original Poster
#10 Old 3rd Dec 2007 at 11:17 AM
Quote: Originally posted by Echo
When you renamed the textures, did you do it by hand? That's extremely error prone, and not something I'd recommend doing given that we have nice automatic tools these days.


How do I go about this? I'll start the rename textures over, since I haven't gotten very far.
Retired Duck
retired moderator
#11 Old 3rd Dec 2007 at 11:34 AM
That's what "Fix Integrity" does
Lab Assistant
Original Poster
#12 Old 3rd Dec 2007 at 11:50 AM Last edited by ScoobyDoo : 3rd Dec 2007 at 12:18 PM.
Ah ok... well hopefully it works better on this sub-package. If you remember, last time I tried that with the main package it caused Sims to crash to desktop.


Edit: Ya! got it, for a moment it looked like i had problems, but it was recolor was too white.

Basically I renamed the texture and the txmt names, updated the cMaterialDefinition, the stdMatBaseTextureName, and file list. Updated the changes then did a fix intergity. Now hopefully I won't have to pesker this forum for a while
Lab Assistant
Original Poster
#13 Old 4th Dec 2007 at 5:44 AM
Ok spoke too soon, but this should an easier one to answer. Whats the easiest way to determine if a sim is a teen or older? from what i've seen adults are 2 and children are 3
Admin of Randomness
retired moderator
#14 Old 4th Dec 2007 at 7:24 AM
Not sure what number you're pulling from where, but the numbers info is here:

http://www.modthesims2.com/showthread.php?t=122944

It focuses on the ya/adult/elder issue as those are the ages that can exchange clothing, but I assume the game would use the same coding for other sim related items - and certainly if you recolor an article of clothing using bodyshop, you can get the other numbers for sure

"Undertake something that is difficult; it will do you good. Unless you try to do something beyond what you have already mastered, you will never grow." - Ronald E. Osborn

Please do NOT PM me with requests, creation questions, or game help questions. Click for help:
Game Help | Create | Content List | Where Can I Find?
Lab Assistant
Original Poster
#15 Old 4th Dec 2007 at 9:41 AM
Strange, when I do a debug dump, the attribute Age of sim, which is assigned: Expression (My attribute := Stack Object's Person Age), for an adult it dumps it as 2, for a kid it's 3.
Retired Duck
retired moderator
#16 Old 4th Dec 2007 at 10:23 AM
Not sure how you got 2 for adult, although 3 is certainly child. The list according to my list is:
[BCON ref, literal value, age group]
0x0110:5, 0x1, Baby
0x0110:0, 0x2, Toddler
0x0110:1, 0x3, Child
0x0110:2, 0x10, Teen
0x0110:3, 0x13, Adult
0x0110:4, 0x33, Elder
Lab Assistant
Original Poster
#17 Old 4th Dec 2007 at 11:05 PM
Not sure where that 2 came from now either, it disappeared and showing 19 (13h). Everythings working good now.

One small question, does the texture text list have to be one list or can it be split up into two lists?
Retired Duck
retired moderator
#18 Old 5th Dec 2007 at 12:36 AM
Pretty sure it has to have that specific instance, which would mean only one list. Never tested that though.
Lab Assistant
Original Poster
#19 Old 5th Dec 2007 at 5:11 AM Last edited by ScoobyDoo : 5th Dec 2007 at 6:06 AM.
Total re-editted.

It seems that my token isn't being correctly saved in the file during a save. The token does exist, when you show/hide/show it remembers, but if you save, then reload the lot its not remembered.

Is there a command I'm missing?
Retired Duck
retired moderator
#20 Old 5th Dec 2007 at 6:38 AM
Wait, the token isn't being saved? That doesn't sound right... Or is it that the state of the objects which are dependent on the token aren't being saved?
Lab Assistant
Original Poster
#21 Old 5th Dec 2007 at 7:05 AM
The tokens themselves aren't being saved.

Another test:
made it visible and made some changes causing it to save to the token list-> forced reset on user = token is shown in list

made it invisible (i believe the controller deletes the accessory) -> forced reset on user = token is still on list

saved the game and reloaded the lot (paused mode) -> forced reset = token is no longer there (kinda hard to miss with many 0's)
Retired Duck
retired moderator
#22 Old 5th Dec 2007 at 9:18 AM
Well that's extremely odd, since tokens are designed to keep a sim's state across loads... Not sure what I can suggest...
Lab Assistant
Original Poster
#23 Old 5th Dec 2007 at 12:09 PM
Adding to the confusion.....

If I save the sim -> reload lot the token is lost

if I quick save (using then return to neighborhood button "do you want to save?" yes) then reload guess what! it works..... WTF
Lab Assistant
Original Poster
#24 Old 5th Dec 2007 at 11:31 PM
More updates: I created a manual force token save, i.e. popup menu that calls the save token function. Same results, the token does appear in the user's list, but not after a save and reload.

Since the controller destroys the accessory, could that be removing the token during save? But it works within a lot session. ???
Lab Assistant
Original Poster
#25 Old 6th Dec 2007 at 7:26 AM
WEEEEEE I solved it!!!

To keep my token list from getting messed up with crammy's I had re-guid my token. It appears the game will not save orphaned tokens. I.e. your token guid has to match your object guid.
Page 1 of 2
Back to top