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 17th Feb 2015 at 10:12 PM Last edited by lolalule : 27th Mar 2015 at 5:33 PM.
Default [solved] recolor problem - how to make trees non default replacement
Hello,
I searched a lot about how to recolor objects for caw and I searched exactly for this kind of problem but didnt find anything. I clone the object with S3OC like in all the tutorials, then open the file with s3pe, but i just cant find the _IMG. I also tried it with texture tweaker, but there was an error.
What am I doing wrong? I found recolors of trees here, so it shouldnt be impossible?!


(and sorry for my english ...)

Thank you

Edit:
So Ive found the _IMG with S3PE in the FullBuild2 Package. But what can I do if I dont want default replacements when S3OC dont export the _IMG files?


Edit 2: My research got me here
But how do I open the hex editor? When I try to open the _SPT its greyed.

Edit 3: Ok, got this one - I have to install a hex editor and get it to work with s3pe...

And.. what does it mean to hash ? ("Then you make a hash of the name without the .tga(i.e. plantDaisyWhite_composite_d) and change the instance number of your image to the number you hashed.")

Edit 4 : Wuhuu Ive done it. I just used TSR Workshop and clicked "clone the base item and add diagonal reference" and then load my texture files in the mesh window tab.
I didnt tried it in game, but in caw its fine, except that it replaced the default. Have to figure out how to make it an additional tree...And there were 4 new entries that also included the new tree.

Edit 5: I accidentally did this with the false tree... the tree im trying to edit is the tall fir tree from Late Night (in edit 4 I used fir tree, which is another tree). The method somehow doesnt function with the tall fir tree... meh


Edit 6: So I tried the s3oc/s3pe method with hexcode editing like in the link. Look what Ive done xD
So i have to figure out which are the right textures because the filenames are somehow too long and so i have to guess which one is the _d and _n .... Great that this already works

But its again a default replacement. So how do I make this a standalone object ?

Mmmrh I decided to let them be default replacements for my planned world. But then I use this method with the tree textures - works fine.

But if someone has a clue for the non default replacement, that would be nice.
Screenshots

Im not a native speaker
Advertisement
Inventor
#2 Old 20th Feb 2015 at 4:52 PM
Hello ^^
I'll use the term tree to make clear we're not talking about harvestable plants.

CLONING THE TREE

When you clone the tree with S3OC, make sure to tick - if they are enabled - the following checkboxes:
- "Deep Clone"
- "Find Missing Resources"
- "Renumber/Rename internally"
- Give a new name to the tree (so you don't confuse it with the original) and tick "Copy English to all languages"

The cloning process doesn't include the textures of the tree (_IMG resources),
so you have to retrieve them "manually".

RECOVERING THE _IMG RESOURCEs

If the tree is from the basegame, you'll presumably find the textures in FullBuild2.package.
Start S3PE, use as name filter the name of the tree, activate the filter, open FuillBuild2.package,
select the 2 (are they always 2?) resources, and from the menu select "Export"+"To Package"
and choose the newly created package (created by S3OC before) as target.

HEX-EDITING THE _SPT AND CHANGING THE INSTANCE ID OF THE TEXTURES

The tree is not a default replacement, but the textures are, so they will replace the ones of
the original tree (and our custom tree too will use them). To avoid that you have to do 2 things:
- change the references to the textures' names in the _SPT
- change the IID (Instance ID) of the textures accordingly

This is a delicate task, so be careful.

Start S3PE, deactivate the filter, open your custom tree package, right click on the _SPT
resource and select "Hex editor" (if you don't have already configured one, you can do
that from the menu Settings+External Programs).

From the hex editor, you have to search (case sentitive) and replace 2 occurrences for
each texture name (so, 4 substitution total)
Warning: the name of the _IMG may not be exactly the one you have to find.
Since this is delicate, I'll make a real example:
Name of the _IMG: plantMarigolds_comp_blahblahblah
Name you'll find in the _SPT: plantMarigolds_composite_d.tga

You have to change the string in the _SPT, using a unique name with exactly the same
number of characters
of the original name.

Example: plantArsilolds_composite_d.tga

I repeat, there are 2 occurrences to change for every texture (_IMG resource).
Save, commit changes and save the package.

Once you did that, it's time to change the IID of the _IMG resources.
Needless to say, we have to use the strings/names (without the suffix ".tga") we used in the _SPT as hashing key.

So, double click on the first _IMG resource (real example: plantMarigolds_comp_blahblahblah),
change the name using the string used in the _SPT (example: plantArsilolds_composite_d),
click on the FNV64 button and then on OK.
Do the same thing for the second _IMG (using its respective name, not the same used for the first _IMG,
example: plantArsilolds_selfshadow)

Save the package.

Note: in the tree I used as example, categorized as flower, the shadow texture was generic/void/empty,
so it didn't really need to be changed/renumbered (or even imported in our package in the first place),
but I can't say for sure if that is always the case for every kind of tree. Well, since we can only recolor
trees we don't need to change the shadow, but maybe more complex/big trees have more textures.

CHANGE THE TEXTURES WITH YOUR FAVOURITE GRAPHIC EDITOR

I'm giving for granted that you already know how to do that.
EDIT: taking for granted, damn it, I always miss this one.

TESTING

Try in game the new tree (and the original tree to see if we involuntarily screwed it up)
Lab Assistant
Original Poster
#3 Old 20th Feb 2015 at 5:23 PM Last edited by lolalule : 27th Mar 2015 at 5:33 PM.
Hey thanks for your answer. But Im sure I already did all of that (and Im really proud )
I changed just 1 letter, but its unique
That ends up in a default replacement - I also changed the group number (textures , _spt and spt2 ) and now I have 2 of the same trees. That might be good news - but they both have the same (new) textures. So I tested what happens when I remove the package and open a caw save with both objects - I get the normal looking tree and a random other tree for the "new object". So the failure has to do with this package. But I dont know what Im doing wrong. I also changed every group number where I found it with the grid tool. No effect.

Maybe I try it with another tree.
Oh and I also deleted the caches. Im testing it with caw, dont know if that has any effect.

Oh and here you can read the group thingie

Mysterious




Edit: Yeah I did it !

Quote:
For everyone who wants to make new trees : Do exactly whats in the post above.
And then - change the group number of the textures (for the fir there are 7 without the shadow and bw things), FTPT, OBJD, OBJK, _SPT and SPT2 to 0 - but held in mind the original number.
(I dont know why but that worked for me in the last case - tried 82100000 while original was 82000000 and that didnt worked)

And then open the data grid of OBJD, OBJK, FTPT and SPT2 and change every entry with your original group number with 0 (mostly under chunkentries)

Forget the quoted. I made it somehow harder than required.

I have no Idea what Ive done, but its working

Im not a native speaker
Inventor
#4 Old 20th Feb 2015 at 5:35 PM
Maybe when you cloned the object you didn't renumber its resources, that's why you get a default replacement (of the tree).

Are you cloning a non-basegame tree?
Lab Assistant
Original Poster
#5 Old 20th Feb 2015 at 5:40 PM Last edited by lolalule : 27th Mar 2015 at 5:33 PM.
Quote: Originally posted by Arsil
Maybe when you cloned the object you didn't renumber its resources, that's why you get a default replacement (of the tree).

Are you cloning a non-basegame tree?


I think the fir was form late night, so yes.

I cloned that thing with a ton of different options and names. So I might have done that.
However. Now I know how to clone trees by hand and thats nice


Oh and I have another tip when you struggle with too long texturenames (like in my first screenshot^^ )
You could change one directory in TSR Workshop to the folder where your newly created package (with the textures in it) is. There you could see under mesh the texture names with textures. Just to be sure you dont get little fir trees instead of needles
Screenshots

Im not a native speaker
Inventor
#6 Old 20th Feb 2015 at 6:28 PM
I see, a big tree is indeed more complex, it has more textures and the hex find/replace
is more challenging, but the same process I described above applies.

Don't know if this happens with all trees coming from an EP, but the texture names in the
_SPT contain a full path, you only have to change the file name of the texture (the last string,
the one followed by the extension .tga)

Here you go (I haven't recolored the textures, but they are custom ones, not replacements).

EDIT: No need to change the group id of resources.

EDIT2: I don't have Seasons, so I have no idea if/how that influences trees
(leaves change colors, don't they? So I'm not sure how much recoloring textures matters).
Attached files:
File Type: zip  Custom_treeFirTall.package.zip (349.5 KB, 25 downloads) - View custom content
Lab Assistant
Original Poster
#7 Old 20th Feb 2015 at 6:41 PM Last edited by lolalule : 27th Mar 2015 at 5:33 PM.
Quote: Originally posted by Arsil
I see, a big tree is indeed more complex, it has more textures and the hex find/replace
is more challenging, but the same process I described above applies.

Don't know if this happens with all trees coming from an EP, but the texture names in the
_SPT contain a full path, you only have to change the file name of the texture (the last string,
the one followed by the extension .tga)

Here you go (I haven't recolored the textures, but they are custom ones, not replacements).

EDIT: No need to change the group id of resources.


Hm ok, your tree is working too but has 2 entries in caw. And looks exactly like the original one. So how do you know that your "new" resources dont replace the originals?
How did you change the resource name (CLONED Very Tall Fir Tree)?

Im working with the same .package the whole process. So I didnt changed the Instance number and _SPT twice. Only my last step made both trees show up as they should.

Edit : Ok tested and your tree works.
Ok so how did you change this resource name - that must have been the problem. In S3OC I cant change the resource name.

Edit 2 : No, firs dont change colors, do they ?

Im not a native speaker
Inventor
#8 Old 20th Feb 2015 at 7:22 PM
ReRead my posts, all the answers are already there. Happy simming.
Lab Assistant
Original Poster
#9 Old 20th Feb 2015 at 8:14 PM Last edited by lolalule : 27th Mar 2015 at 5:33 PM.
Quote: Originally posted by Arsil
ReRead my posts, all the answers are already there. Happy simming.

Thank you.
I think you misunderstood me, but my method works too.

Im not a native speaker
Inventor
#10 Old 11th Mar 2015 at 11:29 AM Last edited by Arsil : 18th Mar 2015 at 10:57 AM.
If you are interested, I found this: http://nwn2.wikia.com/wiki/Speed_Tree_Format (not sure if it's exactly the same format used in TS3).

EDIT: yep, it's exactly the same format and SpeedTree version used in TS3, this probably means you can use trees from one game to the other.
And I mean PERSONAL use, since sharing them is piracy:

Quote: Originally posted by http://upload.modthesims.info/wiki.php?title=MTS2:Creator_Guidelines/Uploads_NOT_allowed_on_MTS
Converted game content: You can freely modify sims game meshes and textures for use in any sims game, and EA doesn't seem to mind conversions of sims game/store content. However, you may not use meshes and textures from any other game to make Sims content to upload without permission from the original creator - i.e. the company that made the game you're taking pieces from.


I tried to make a binary template to help in hex editing the file but failed miserably, anyway
I think with this info about the format (even if partial) a S3PE Helper could be made for _SPT
resources. I doubt someone is so interested in that to try it (I know I'm not), but who knows.
Inventor
#11 Old 19th Mar 2015 at 1:54 PM
Quote: Originally posted by Arsil
this probably means you can use trees from one game to the other.


This is a tree called "Agarwood" taken from Neverwinter Nights 2. It fades a bit earlier than a TS3 tree,
I guess the distance is configured somewhere in the SPT resource. The one from NWN2 is the shorter.
Screenshots
Field Researcher
#12 Old 23rd Dec 2015 at 4:08 PM
Hello Arsil,
I have discovered your tutorial and have been trying to create a wild rose with a brighter red rose since. However, when I test it in my game, my rose makes the game crash (I have tested it in Build mode, and this is when the crash happens). I have been working with the textures in GIMP, and compressing the DDS file with DXT5, and generating mipmaps with it. What do you do with compression and mipmaps when you recolor a plant as part of this tutorial? I would love to get my wild rose right so it does not crash my game.

magdalenepoet

P.S. My wild red rose is below this message as an attachment.
Attached files:
File Type: rar  magdalenepoet_PlantRoseRedWild.rar (45.6 KB, 11 downloads) - View custom content
Back to top