Home | Download | Discussion | Help | Site Map | New Posts | Sign in

Latest Site News

MTS Movie Night #2 - posted on 10th Aug 2017 at 2:58 PM
Locked thread | Replies: 49 (Who?), Viewed: 35586 times. | Locked by: Numenor Reason: New tutorial: [url]http://www.modthesims2.com/showthread.php?t=103082[/url]
Page 1 of 2
Administrator of Loverat's Tea and Underpants
Original Poster
#1 Old 25th May 2005 at 9:56 AM Last edited by Numenor : 21st Feb 2006 at 8:12 AM.
Default *OUTDATED* (Was: Roof Recolors Tutorial - updated 30 May 2005)
EDIT BY NUMENOR:

An updated version of this tutorial can be found HERE.
Please post in the new thread all your questions and reports.

A special 'thank you' goes to RGiles for having created this tutorial, and for having revealed the secrets of the roofs


(Thread Closed)
---------------------------------------------------------------------

Important Update (30 May 2005): If you downloaded the template package and followed the tutorial before this date, you will need to download again and update your roof recolor packages. There was a bug in the “Assign Hash” feature of SimPE which would cause these files to conflict with each other, so I’ve changed the process to avoid this conflict. Thank you to Bluegenie2 for pointing out this problem, and my apologies for not noticing it sooner.

A lot of people have been asking recently for a tutorial on roof recolors. I promised to do this ages ago, but I’ve been putting it off. Honestly I dread it. But 3 requests in 2 days is just a bit too much to keep ignoring. Oh well, poor me, right?

I would consider this an “intermediate” tutorial, not a “beginner” tutorial. It’s not very complicated, but it assumes that you are fairly comfortable using SimPE. You should know how to do object recolors. I am not going to describe how to import a recolored texture image. If you need help with that, please follow this tutorial first.

What you will need: SimPE (the latest is always available at http://sims.ambertation.de)
A graphics program like Photoshop or PaintShop Pro
This file which you’ll use as a base: RoofTemplate.package

Unzip the template package but don’t put it in your Downloads. It is not a working package. It’s just a base to create new roof recolors from. What I’ve done is extract all of the needed files into one package for you so you don’t have to chase them down.

Make a copy of this package file and give it a new name. The name you choose for your package must be unique. We are going to generate some numbers based on the name you choose, so you don’t want to pick a name that anyone else would use. DO NOT call it roof1.package or something like that, or Loverat will come to your house and chew through your leg.

Open the package in SimPE. You will always be using Plugin view in SimPE except where I say otherwise. If you don’t know how to select files in SimPE, stop now and follow the object recolor tutorial. :D

You will find 4 Texture Image files. They are:

roof-manor_txtr: the main part of the roof, shown in yellow in the image below. Please note that the texture applied when I took this screenshot was very bright yellow. The game makes it dull and dark. Make your texture lighter than you want it to appear in the game, because this can’t be avoided. Snow-covered rooftops will not work for this reason.
roof-manor-edges_txtr: blue in the image below
roof-manor-trim_txtr: green in the image below
roof-manor-under_txtr: red in the image below



You may want to replace all of these, or maybe you only want to change some parts. If there are some parts that you don’t want to recolor, remove those textures from the package now. You don’t need them.

For each Texture Image that you decided you want to recolor, change the “roof-manor” part of the Texture Image name to the same as your package. Leave the rest of the file name alone. For example:
roof-manor = rgiles-roof-redcedar_txtr
roof-manor-edges_txtr = rgiles-roof-redcedar-edges_txtr
roof-manor-trim_txtr = rgiles-roof-redcedar-trim_txtr
roof-manor-under_txtr = rgiles-roof-redcedar-under_txtr

Be sure you click “Commit” when you rename these textures, or the new name won’t be saved.

When you are done renaming each texture that you want to change, save the package. Under the “Tools” menu, click “Global fix TGI” and then save the package again.

You can now extract each image that you want to recolor and modify those images in your graphics program. I can’t tell you how to do this, but I can give you a couple important tips. In the main roof texture, the big texture, the pattern tiles at 102x102 pixels. If your pattern does not tile at 102x102 pixels, it will look very sloppy on the roof. Also if your image has only a vertical pattern and not a horizontal one (for example my corrugated tin roof) it will only look right on the Gabled roof style (the inverted triangle one), not the Hipped roof style. It just won’t seem to line up right. Nothing you can do about that. However a horizontal pattern only looks just fine.

After you are done editing the images, you can import the new versions into the SimPE package. You know how to do this, right? Don’t forget to commit and save the package.

Select the Roof XML file and go back to Plugin view. Ugly, isn’t it? We need to change a few numbers in this file as well as some of the text. I will go line by line.

<AnyUint32 key="cost" type="0xeb61e4f7">0</AnyUint32>
Do not change.

<AnyUint32 key="deprecated" type="0xeb61e4f7">0</AnyUint32>
Do not change.

<AnyString key="description" type="0x0b8bea18">Like an overcast day covers the horizon, this tile will cover your roof.</AnyString>
You can change this text to any text that you want, but you don’t need to. It’s just a description of your roof, but the game doesn’t appear to use it at all.

<AnyUint32 key="guid" type="0xeb61e4f7">11111111</AnyUint32>
This is the GUID for your roof, and every roof must have a different one. You do not need to register this GUID like you would for an object because it does not use the same “bank” of numbers that objects use, so please don’t register it.

To get a GUID, open the Hash Generator in SimPE (it’s under the Plugins menu). You’ll see your package file name in the top box of that window. It’s going to use that text to generate the GUID, so again this is why your package needs a unique name. At the end of your package file name, type the letters “guid”. Yes, yes I am making this up. But it creates a unique number since we need to use the Hash Generator twice. Select the “CRC 32” option.

Copy the Hash Value that appears… the very last item in that window. Then you can close the Hash Generator. You need to convert this number into Decimal format, so open the Hex <-> Dec Converter in SimPE. (It is under the Tools menu.) Paste the new GUID into the top box, and then copy the number that appears in the lower box. This is the Decimal.

Now you can paste this decimal into the Roof XML file. Replace the number 11111111 only, not the parts that are enclosed in the brackets.

<AnyUint32 key="mayusebump" type="0xeb61e4f7">0</AnyUint32>
Do not change. Sadly bump maps do not work for roof textures. They make it all black and ugly.

<AnyString key="name" type="0x0b8bea18">Stormy Slate</AnyString>
This is a name for your roof. The game doesn’t seem to use it, so ignore it.

<AnyUint32 key="resourcegroupid" type="0xeb61e4f7">470089728</AnyUint32>
Do not change this line.

<AnyUint32 key="resourceid" type="0xeb61e4f7">22222222</AnyUint32>
Click Commit in the Roof XML so you don’t lose what you’ve done because you are going to leave this file for a moment in this step.

Go back to the Hash generator. This time you do not need to change the string in the top box. Select “CRC 32” and copy the Hash Value generated. You need to use this same number in 4 places.

First switch to Packed File view. Paste the new hash into the Instance box and then click Commit.

Still in Packed File view, select the Text Lists file and paste this hash into the Group box here. Click Commit.

Now go back to the Roof XML file and switch back to Plugin view. Convert the same hash number into Decimal and then use the decimal to replace 22222222 in this line.

<AnyUint32 key="resourcerestypeid" type="0xeb61e4f7">2896751110</AnyUint32>
Do not change this line.

<AnyUint32 key="stringsetgroupid" type="0xeb61e4f7">22222222</AnyUint32>
Replace 22222222 in this line with the exact same number you replaced it with in the “resourceid” line above.

<AnyUint32 key="stringsetid" type="0xeb61e4f7">123</AnyUint32>
Do not change this line.

<AnyUint32 key="stringsetrestypeid" type="0xeb61e4f7">1398034979</AnyUint32>
Do not change this line.

<AnyString key="textureedges" type="0x0b8bea18">##0x1C050000!roof-manor-edges</AnyString>
Now we have to change the names to link to the correct textures. If you recolored the “edges” texture, you need to change this line. (If you did not recolor the edges image you should have deleted that texture from your package already, so leave this line alone.)

Replace “roof-manor-edges” with the name of your edges texture. Include the entire file name for the Texture Image, but leave of the _txtr at the end. That is a file extension. Don’t use it here. So for my example I would end up with it with:
##0x1C050000!rgiles-roof-redcedar-edges

Make sure you don’t remove the ##0x1C050000! part that’s already in this line.

<AnyString key="texturetop" type="0x0b8bea18">##0x1C050000!roof-manor</AnyString>
Replace “roof-manor” with the name of your main roof Texture Image. As above, don’t remove ##0x1C050000! , and do not include the _txtr at the end of the texture name.

<AnyString key="texturetopbump" type="0x0b8bea18"></AnyString>
Do not change this line. I wish bump maps worked.

<AnyString key="texturetrim" type="0x0b8bea18">##0x1C050000!roof-manor-trim</AnyString>
If you recolored the "trim" image, change “roof-manor-trim” to the name of your new trim image. Don’t remove ##0x1C050000! , and do not include the _txtr at the end of the texture name.

<AnyString key="textureunder" type="0x0b8bea18">##0x1C050000!roof-manor-under</AnyString>
If you recolored the "under" image, change “roof-manor-under” to the name of your new under image. Don’t remove ##0x1C050000! , and do not include the _txtr at the end of the texture name.

<AnyString key="type" type="0x0b8bea18">roof</AnyString>
Do not change this line.

<AnyUint32 key="version" type="0xeb61e4f7">1</AnyUint32>
Do not change this line.

Commit and save. You are done with the XML file and have only one more simple thing to do.

Select the Text Lists file. There are 2 entries, one for the name of your roof and one for a description. These will show up in the catalog.

Click the first line on the left. Replace the text in the top box with the name you want your roof to have. On the bottom right of the window, click “Change in All”. This makes sure that the text is changed in every language.

Click the second line on the left. Replace the text in the top box with a description. You might want to put your name in here too so people know who made the file. Again click “Change in All”.

Click the Commit button and save the package. You are done. Oh, that third line in the Text Lists… I’m not certain but I’d bet that 0 is the price. Normally roof colors don’t cost anything.

Good luck.

You can't use a bulldozer to study orchids.
8 users say thanks for this. (Who?)
Advertisement
The ModFather
staff: retired moderator
#2 Old 25th May 2005 at 11:32 AM
A clear and detailed explanation, as usual, thanks!

I haven't much experience about roofs, but it seems to me that there are different shapes for them, i.e. simple ones, like this one, and more complex ones, with special interconnections between the various roof planes. The texture should be much more complex... Have you - by chance - created a coloured template for such textures?

I know, it's awful to reply to such a detailed tutorial with a request for something more
I'm sure you'll forgive me (after having banned me for a couple of years! )

I've finally started my Journal. Information only, no questions.

My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)


I *DON'T* accept requests, sorry.
Administrator of Loverat's Tea and Underpants
Original Poster
#3 Old 25th May 2005 at 11:51 AM
/me bans Numenor and hangs his portrait in the hall of shame :D

Actually, the main roof texture in this package applies to all roof shapes. It is a very strange texture with lines going every which way. It has 25 pieces. Each piece of it is a 102x102 square with a special type of edging. Different parts of the texture are applied depending on what shapes your roof uses. The simplest roof will only use 3 (I think) of the 25 squares. Other squares will only be used when 2 roofs join, and then which one depends on the type of join.

I tried once making all the different segments into different colors to figure out which pieces of the main texture go where, but I got too confused. :P

The other thing I'm stumped on is how to make the roof not look muddy. All roof colors use the same Material, and the game dynamically changes the texture links. But I can't figure out which one! I thought that it was the one called "placeholder_roof_material_txmt", but changing that has no effect. I don't know if it is hard-coded or if the roof Shader is being called directly from the Materials.package or what.
The ModFather
staff: retired moderator
#4 Old 25th May 2005 at 2:12 PM
Mmmhhh, you're right, I spoke too early (I was at work and I couldn't open the package to examine its contents).

I was referring exactly to the texture that is inside your tutorial package.

As for the "placeholder_roof_material_txmt", I guess that it's just that: a placeholder, and not the actual MATD. I'll try and discover what MATD is used, if any.
Administrator of Loverat's Tea and Underpants
Original Poster
#5 Old 25th May 2005 at 2:20 PM Last edited by RGiles : 25th May 2005 at 2:40 PM.
Here's an example of what happens when I try to figure out which parts of the roof are what.

The simplest gabled roof:


The simplest hipped roof:


A blend of 2 gabled rooves:


A blend of a gabled and one hipped roof:


I don't know if anyone can find this useful to help understand how the parts of the roof texture go together. Just in case, here is the texture image I applied to get the screenies above:


Edit: Delphy does not approve of my template. He says it should use the alphabet, and that it should have each letter repeated in each of the corners of each square. I think he just doesn't understand my ART! :D
Delphinius The Great
site owner
#6 Old 25th May 2005 at 2:42 PM
Well at least *one* of us learnt from those damn coloured blocks.... now let me go put this round peg in this square hole... :smash:

Seriously though, good work
The ModFather
staff: retired moderator
#7 Old 25th May 2005 at 2:45 PM
LOL, I was trying the same experiment! But you are smarter then me, because your combination of colours and letters is much more useful than my 2-colour pattern.

I didn't think that when two roofs are joined together (as in pics 3/4) the game uses different parts of the texture.

So, if we use a simple texture (like the rusty tin roof you created for the trashed set), only the simplest roofs will be drawed correctly.

I hope that MTS2 artists will spend the necessary time on the custom textures, in order to create something that can be used for al the roof types. I'm definitely not inclined to do that, anyway
Administrator of Loverat's Tea and Underpants
Original Poster
#8 Old 25th May 2005 at 2:50 PM
It's very very hard.

A texture that tiles nicely at 102x102 pixels is the start... but if it does not have a horizontal pattern or proper edging, it looks terrible anyway. The edging like Maxis uses covers up some strange alignment.

This is going to take some very good texture artists. It's the reason I made so few of them.
Guest
#9 Old 25th May 2005 at 5:28 PM
Great Tutorial!!! Thank you very much for making it for us. I recolored a roof using it and it worked great. I only had one question though, the roof shows up fine in the game as I recolored it but the thumbnail that you see in the roof menu does not reflect the new color. It still shows the natural slate thumbnail with the name of my roof and description. Did I miss something? Thanks again.
Administrator of Loverat's Tea and Underpants
Original Poster
#10 Old 25th May 2005 at 5:33 PM
mike,
I have never had that happen with the thumbnails. Did you maybe load the file in the game to test whether it worked before you finished your textures for it? In that case, the thumbnail would be generated and stored.
Guest
#11 Old 25th May 2005 at 5:47 PM
Wow....I'm impressed....lol. You are exactly right, that's what I did. Guess I know not to do that again. Thanks again for your help.
Administrator of Loverat's Tea and Underpants
Original Poster
#12 Old 25th May 2005 at 8:09 PM
Mike, you can fix the thumbnails if you want to by deleting this file:
My Documents\EA Games\The Sims 2\Thumbnails\BuildModeThumbnails.package

Don't worry about deleting it... the game automatically recreates it the next time you open it. As you browse the Build Mode catalog the first time after deleting that file, there is a short pause when opening new categories while the game generates new thumbnails.
Guest
#13 Old 25th May 2005 at 9:57 PM
Thanks for the information RGiles, I already did so right after you told me what was wrong and the thumbnail shows up fine now.
Lab Assistant
#14 Old 25th May 2005 at 11:19 PM
Thank you very much for this tut. I have gotten very sick of the roofs in the game. I always wonderd why they didnt include the ablity to import roofs in HomeCrafter Plus, now I understand why.
Administrator of Loverat's Tea and Underpants
Original Poster
#15 Old 25th May 2005 at 11:22 PM
It appears they started to add it. Some code for it is there. I suspect the reason it wasn't finished was a deadline because they wanted to release HCP for Christmas. Or maybe it was because this texture itself is so complicated and hard to explain.
Scholar
#16 Old 27th May 2005 at 4:23 AM
hey thanks a bunch hopefully ill be able to do it lol id love to get some thatched roofs for my island theme home im working on =p wish me luck!
Lab Assistant
#17 Old 29th May 2005 at 11:43 AM Last edited by Bluegenie2 : 29th May 2005 at 11:54 AM.
Okay, now I have a slight problem and I have no idea how to fix it. My roofs are coming out fine, but all of them have the same name in the game as the first one I made. I cannot figure out why this is happening. Seems for everyone I have made, the group number is the same, no matter what the name of the roof is. I've tried uninstalling and reinstalling with the same result............the same number is always assigned to each roof for the group number. I thought maybe it was because I start everything with bg2_, but I changed one and it still came up with the same number........this is when I do the assign hash part. Anyone have any ideas here?
Lab Assistant
#18 Old 29th May 2005 at 6:11 PM
ok now I am little confused because I had previously found the bump map and the template lifos for the roofs in object package 9...(I had to reduce the size and left off the 512 part of the file names)

so we are are not to make use of these?
Screenshots
Test Subject
#19 Old 29th May 2005 at 6:16 PM
Crikey! That sounds easy.....I hope you do the thatched roof dragon_tfm. I would LOVE one
Lab Assistant
#20 Old 29th May 2005 at 7:41 PM
Default Offering Recolors of Roof tile
Will the individuals downloading these roof tile recolors have to have to have any thing other then the packages we are creating? Please don't lock me down for asking, but I know a many people have been having problems with recolors for what ever reason.
Like what you have done with the Tutorial, I know I could not have created it. You had to have put a lot of work into it. Thanks for the numbers, and letters.
Administrator of Loverat's Tea and Underpants
Original Poster
#21 Old 29th May 2005 at 8:17 PM
Quote:
Originally Posted by Bluegenie2
Okay, now I have a slight problem and I have no idea how to fix it. My roofs are coming out fine, but all of them have the same name in the game as the first one I made. I cannot figure out why this is happening. Seems for everyone I have made, the group number is the same, no matter what the name of the roof is.
I am suddenly having a problem with Assign Hash in SimPE always giving me the same number: #0x7f050000!. This is with the latest version of SimPE. Do you get the same thing? This would make them all override each other and explains why they'd have the same name. I'll see if I can figure out why this is happening. If you can use an older oversion of SimPE in the meantime... I think it's a bug in the currect version, but it may be something I'm missing.

Quote:
Originally Posted by nectere
ok now I am little confused because I had previously found the bump map and the template lifos for the roofs in object package 9...(I had to reduce the size and left off the 512 part of the file names)
Yep, all the original Maxis roof colors have a bump map. But none of them is applied in the Maxis Roof XML files. They planned to use bump mapping on the rooftops, but it wasn't working correctly and they never fixed or finished it, so instead they simply removed all the references to the bump maps. You can try applying one if you want to see what I'm talking about. Some parts of the roof go black. The template you can use if it's helpful to you, of course.

Quote:
Originally Posted by ladydrb58
Will the individuals downloading these roof tile recolors have to have to have any thing other then the packages we are creating?
Nope. These don't require any other files. They can just be placed in Downloads.

You can't use a bulldozer to study orchids.
Administrator of Loverat's Tea and Underpants
Original Poster
#22 Old 29th May 2005 at 10:22 PM
Numenor confirms that the Assign Hash feature is not working. In fact it may not have been working when I wrote this tutorial and I just hadn't noticed. I'm going to need to re-work the tutorial and the template package to adjust for this.

So please hold off on any new packages. I'll post an update today.
Administrator of Loverat's Tea and Underpants
Original Poster
#23 Old 30th May 2005 at 12:34 AM
OK, sorry about this, but the tutorial and the template package are now updated to avoid the problem with "assign hash" not working right.

For those who may be interested, the format I'm using here is almost the same as normal "EP Ready" format for recolors and meshes, except that I could not put the XML file and the Tests Lists file into group 0xFFFFFFFF. That is because the XML file requires the group to be an "unsigned integer", and -1 is not an unsigned integer. So I had to improvise a bit.

RG
Lab Assistant
#24 Old 30th May 2005 at 6:09 AM
Thank you very much for your quick reply. I'm off to try again Can I post my roofs to this thread?
Lab Assistant
#25 Old 30th May 2005 at 7:47 AM
Okay, now the roofs are showing and they work fine but none of them have a name , even tho I gave each one a name and description. At least they don't all say 'Wooden Shingles', lol. Any clue as to why it isn't reading the name I gave them?
Closed Thread
Page 1 of 2
Back to top