Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Tutorials
How to Code Customs
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="T3ch" data-source="post: 249255" data-attributes="member: 33114"><p><strong>Introduction:</strong></p><p>Everyone has a time when you want to create your own furniture. Many people still dont know how to do this properly. In these tutorial series I'll teach you the basics and the advanced stuff. Every part of coding customs is detailed explained, some parts get pictures to support this tutorial. If you're reading this you're probably attracted to customs and want to know how to code your own stuff. Here is a short list what you need for the basics.</p><p></p><p><strong>Basics List</strong></p><p>- Hex Editor: <a href="http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm" target="_blank">Download</a></p><p>- SWF Decompiler: <a href="http://www.flash-decompiler.com/" target="_blank">Download</a> For this one you need a license. PM me for a crack <img src="/styles/default/xenforo/smilies/emojione/smile.png" class="smilie" loading="lazy" alt=":)" title="Smile :)" data-shortname=":)" /></p><p>- SWF Tools: <a href="http://tdid.nl/mirrors/SWF%20Tools.zip" target="_blank">Download</a></p><p>- Notepad / Notepad++: <a href="http://notepad-plus-plus.org/" target="_blank">Download</a></p><p>- A working computer <a href="http://whoops%21%20no%20download%20available/" target="_blank">Download</a></p><p>- it takes some time <img src="/styles/default/xenforo/smilies/emojione/tongue.png" class="smilie" loading="lazy" alt=":p" title="Stick Out Tongue :p" data-shortname=":p" /></p><p><strong>Part 1 - The beginning!</strong></p><p><strong>- <strong>Introduction</strong></strong></p><p><strong>So you want to code a custom, here is something you should know what coding customs actually is. Making customs is creating your own furniture.swf. All furniture is working from SWF Files. You can modify any SWF file with a flash decompiler. So we want to code our own customs which means we have to edit a existing furniture file. With a flashdecompiler you can edit those SWF files. So lets do that. I'm going to modify my typewriter and create a new one. I'll make a blue one.</strong></p><p><strong></strong></p><p><strong>- <strong>Lets get started!</strong></strong></p><p><strong>Launch your SWF Decompiler and drag and drop the typingmachine.swf in it.</strong></p><p><strong></strong></p><p><strong>You'll get something like this:</strong></p><p><strong></strong></p><p><strong><img src="http://i.imgur.com/OOTXCCO.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></strong></p><p><strong></strong></p><p><strong>Click on edit at the top:</strong></p><p><strong></strong></p><p><strong><img src="http://i.imgur.com/BR2NEfH.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></strong></p><p><strong></strong></p><p><strong>And then click on images.</strong></p><p><strong></strong></p><p><strong><img src="http://i.imgur.com/ou04NHh.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></strong></p><p><strong></strong></p><p><strong>You'll see this SWF has 5 images: 1 typemachine for zoomed in, one for zoomed out and a catalogue icon. There is also a zoomed in shadow and a zoomed out shadow image file. Most of the time you dont need to edit those. I'll get to that later on.</strong></p><p><strong>So we now want to edit the files. Click on extract at the top:</strong></p><p><strong></strong></p><p><strong><img src="http://i.imgur.com/aF76hhT.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></strong></p><p><strong></strong></p><p><strong>And then select the images folder at the right:</strong></p><p><strong></strong></p><p><strong><img src="http://i.imgur.com/jWbo3s4.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></strong></p><p><strong></strong></p><p><strong>Click export parth and select a nice place to extract them.</strong></p><p><strong>Click on "Extract SWF Objects" to save them.</strong></p><p><strong></strong></p><p><strong><img src="http://i.imgur.com/ZP84tBe.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></strong></p><p><strong></strong></p><p><strong>Open up your image editor and modify them to your liking.</strong></p><p><strong>I made a blue typewriter.</strong></p><p><strong></strong></p><p><strong><img src="http://i.imgur.com/LXALHYl.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></strong></p><p><strong></strong></p><p><strong>If you do recolors, dont remove the shading. It is the most important thing in custom making.</strong></p><p><strong></strong></p><p><strong>So go back to your SWF Decompiler and hit edit, click on images and replace them:</strong></p><p><strong></strong></p><p><strong><img src="http://i.imgur.com/8FRASj1.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></strong></p><p><strong></strong></p><p><strong>When done click on save as.. at the top and navigate to the folder where you saved the images. Save the SWF under a new name. </strong></p><p><strong></strong></p><p><strong>There is one rule for the new name: The name must be the same length as the old SWF (without .SWF!). In my case the old SWF used to be: typingmachine(.swf) 13 chars.</strong></p><p><strong>I'm making a blue one so I call it: bluetdidtypoo(.swf) 13 chars.</strong></p><p><strong></strong></p><p><strong>Recheck the length and save it.</strong></p><p><strong></strong></p><p><strong>Download yourself the SWF Tools if you havent already. Unzip them and place them in the same folder you put the SWF in.</strong></p><p><strong></strong></p><p><strong><img src="http://i.imgur.com/8FRASj1.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></strong></p><p><strong></strong></p><p><strong>Drag and drop the SWF on decompiler.exe The file size should increase.</strong></p><p><strong></strong></p><p><strong><img src="http://i.imgur.com/ZDGiEyW.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></strong></p><p><strong></strong></p><p><strong>Okay so install Hex Editor if you havent already and launch it.</strong></p><p><strong>Drag and drop the SWF in it and hit CTRL + R.</strong></p><p><strong></strong></p><p><strong>At the top put in the old SWF name and at the bottom the new SWF name and hit replace all.</strong></p><p><strong></strong></p><p><strong><img src="http://i.imgur.com/0yZycRl.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></strong></p><p><strong></strong></p><p><strong>Save it and close Hex Editor.</strong></p><p><strong>You can use NotePad ++ instead. Then use CTRL + H. I just prefer Hex Editor</strong></p><p><strong></strong></p><p><strong>Drag and drop the SWF onto compiler.exe and you're done! Congratulations you made your own custom furniture. Now get yourself some SQLs for your database and you're done!</strong></p><p><strong></strong></p><p><strong>in part 2 i will teach you how to fix the common bug <img src="/styles/default/xenforo/smilies/emojione/tongue.png" class="smilie" loading="lazy" alt=":p" title="Stick Out Tongue :p" data-shortname=":p" /></strong></p><p><strong></strong></p><p><strong><strong>Part 2 - Fixing Offset Bug!</strong></strong></p><p><strong><strong><strong>Introduction</strong></strong></strong></p><p><strong><strong>Sooner or later you'll run into bugs. Today I'm going to tell you the most common bug and how to fix it. For part two you need some additional software.</strong></strong></p><p><strong><strong>Go to: <a href="http://www.mediafire.com/?5scx7qnv5hclx5b" target="_blank">here</a> download and extract it.</strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong><strong>What's this furni editor?</strong></strong></strong></p><p><strong><strong>With this tool you're able to edit some of the code from the SWF. This way we can modify code so you can get stuff right. This tool is coded by our God <strong>Leenster</strong></strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong>- <strong>Lets get started!</strong></strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong>The most common bug is offset. Loading another sized image in a SWF file. Today I'm editing the dino egg (spyro.swf)</strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong>Okay so I create my SWF:</strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong>Put images in:</strong></strong></p><p><strong><strong><img src="http://i.imgur.com/MiXlmmT.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong>I save it as fawke.swf</strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong>So lets decompe and rename.</strong></strong></p><p><strong><strong><img src="http://i.imgur.com/bALsLyd.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong>Now I compile it and upload it to my hotel.</strong></strong></p><p><strong><strong>Now this is what you get if you put too large images in:</strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong><img src="http://i.imgur.com/vv6QsBw.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong>So lets fix that. Download and extract the FurniEditor made by Leenster.</strong></strong></p><p><strong><strong>Navigate to the SWF file and open it.</strong></strong></p><p><strong><strong>You get something like this:</strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong><img src="http://i.imgur.com/NPfsfaq.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong>There are usually 5 or 6 .bin files in there. It depends on how advanced the furniture is. Now you need to find the .bin file that looks like this:</strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong><img src="http://i.imgur.com/yTFcrP6.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong>You see the <asset> tags. Now we need to know what <asset> we have to edit. This is fairly easy:</strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong>_icon = catalog icon.</strong></strong></p><p><strong><strong>_32 = Zoom out in room.</strong></strong></p><p><strong><strong>_64 = Normal room view.</strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong>Lets start with the "normal" view so we have to edit fawke_64. Now we need to edit the x and y coords of the image so it fits perfect on one tile.</strong></strong></p><p><strong><strong>This is the part where you need some time. You can count how many pixels you have to move the image or just guess. I prefer the first method it can save a lot of time.</strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong><img src="http://i.imgur.com/qWeGiEY.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong>So </strong></strong></p><p><strong><strong><asset name="fawke_64_a_0_0" x="25" y="42"/></strong></strong></p><p><strong><strong>becomes</strong></strong></p><p><strong><strong><asset name="fawke_64_a_0_0" x="10" y="92"/></strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong>X and Y axis work like this:</strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong><img src="http://i.imgur.com/UixYiFS.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong>So 15 to the right you need to take 15 from the X so it becomes "10".</strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong>Hit save.</strong></strong></p><p><strong><strong>Hit replace original.</strong></strong></p><p><strong><strong>Put the furni in your hof_furni folder and empty your cache and reload the client.</strong></strong></p><p><strong><strong>I count roughly 50 pixels up and 15 to the right.</strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong>It fits perfectly now repeat this step for the zoom out version _32.</strong></strong></p><p><strong><strong><img src="http://i.imgur.com/2VyuR0r.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong>Congratulations you now know how to fix this most common bug!</strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong>In part 3 I'll be talking about layers and directions!</strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong><strong>Part 3 - Layers and Directions</strong></strong></strong></p><p><strong><strong><strong><strong>Introduction</strong></strong></strong></strong></p><p><strong><strong><strong>Today we're going to talk about Layers and Directions. But what are these two things? I'm going to learn you what they exactly they do and what they're used for.</strong></strong></strong></p><p><strong><strong><strong></strong></strong></strong></p><p><strong><strong><strong><strong>Layers</strong></strong></strong></strong></p><p><strong><strong><strong>So the layers are like layers in photoshop. Each layer contains a bunch of images. You can move layers within the SWF. If you have to move one image you have to edit the <assets> part so dont start adding x/y/z for no reason.</strong></strong></strong></p><p><strong><strong><strong></strong></strong></strong></p><p><strong><strong><strong><strong>Example</strong></strong></strong></strong></p><p><strong><strong><strong>Lets take a throne and we're going to look at the layers.</strong></strong></strong></p><p><strong><strong><strong>Open it with Furni Editor and find 9.bin.</strong></strong></strong></p><p><strong><strong><strong></strong></strong></strong></p><p><strong><strong>Code:</strong></strong></p><p><strong><strong><visualization size="64" layerCount="2" angle="45"></strong></strong></p><p><strong><strong>This shows the furniture. size="64" means we're in a normal room and not zooming out.</strong></strong></p><p><strong><strong>Layercount means how many layers are there. Here there are two layers (0 and 1).</strong></strong></p><p><strong><strong>Angle means when does it start.</strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong>Under there you see <layers></strong></strong></p><p><strong><strong>and within this section you see one layer. This is the part of the throne. The z="30" means this layer is above anything else. Now lets add: x="-30"</strong></strong></p><p><strong><strong></strong></strong></p><p>[CODE] <directions></p><p> <direction id="0"/></p><p> <direction id="2"/></p><p> <direction id="4"/></p><p> <direction id="6"/></p><p> </directions>[/CODE]</p><p><strong><strong>Before:</strong></strong></p><p><strong><strong><img src="http://i.imgur.com/BcPFQyK.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></strong></strong></p><p><strong><strong>After:</strong></strong></p><p><strong><strong><img src="http://i.imgur.com/Czwl38p.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong>So this means our layer with id="1" is the side bar. Reason why this is in another layer is the fact that it has to be infront of your avatar to make it stand out.</strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong><strong>Conclusion</strong></strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong>Layers contain a bunch of images. You are not able to move a image inside a layer by editing the <layer> tag.</strong></strong></p><p><strong><strong>When coding customs you dont have to edit these there are some exceptions. One I tell you in part 5!</strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong><strong>Directions</strong></strong></strong></p><p><strong><strong>Directions are not hard to understand. They tell in which directions the furniture is allowed.</strong></strong></p><p><strong><strong>For a throne there are 4 directions in the room because you can rotate it in 4 different ways.</strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong><img src="http://i.imgur.com/siJBUAh.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong>There is a bin that tells what direction is allowed:</strong></strong></p><p><strong><strong>Code:</strong></strong></p><p><strong><strong>[CODE]<objectData type="testen"></strong></strong></p><p><strong><strong><model></strong></strong></p><p><strong><strong><dimensions x="1" y="1" z="1.0"/></strong></strong></p><p><strong><strong><directions></strong></strong></p><p><strong><strong><direction id="0"/></strong></strong></p><p><strong><strong><direction id="90"/></strong></strong></p><p><strong><strong><direction id="180"/></strong></strong></p><p><strong><strong><direction id="270"/></strong></strong></p><p><strong><strong></directions></strong></strong></p><p><strong><strong></model></strong></strong></p><p><strong><strong></objectData>[/CODE]</strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong>I dont think our emulators use this but I think sulake coded their emulator so it reads this XML and then creates the furniture. You can see the z is also given so I think this is the way Habbo is doing it.</strong></strong></p><p><strong><strong>Dimensions mean what is the size of it and it even tells the height.</strong></strong></p><p><strong><strong>The direction are in degrees.</strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong>In visualization you see:</strong></strong></p><p><strong><strong>[CODE]Code:</strong></strong></p><p><strong><strong><directions></strong></strong></p><p><strong><strong><direction id="0"/></strong></strong></p><p><strong><strong><direction id="2"/></strong></strong></p><p><strong><strong><direction id="4"/></strong></strong></p><p><strong><strong><direction id="6"/></strong></strong></p><p><strong><strong></directions>[/CODE]</strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong>Those are the same directions you see when you say :coords in the hotel.</strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong>For the icon there is only one direction because you dont have to turn it.</strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong><strong>Thats it for now. In part 4 I'll explain animations. Till then happy coding!</strong></strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong><strong>You are now able to:</strong></strong></strong></p><p><strong><strong>create your own custom furniture.</strong></strong></p><p><strong><strong>fix image bugs like offset.</strong></strong></p><p><strong><strong>add directions and/or remove them.</strong></strong></p><p><strong><strong>You know what layers are and what they're used for.</strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong><strong>Part 4 - Fixing New Furniture!</strong></strong></strong></p><p><strong><strong>This is a small guide on how to fix the new furniture that bugs when you load it in your client.</strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong><strong>Lets start:</strong></strong></strong></p><p><strong><strong>1) Download the SWF you want to fix.</strong></strong></p><p><strong><strong>2) Open it with leensters furniture tool.</strong></strong></p><p><strong><strong>3) Search in the .bin files for <graphics> Once found remove it!</strong></strong></p><p><strong><strong>4) As we know every opening tag has a closing tag so search for </graphics> in the same binfile you found <graphics> in and remove it.</strong></strong></p><p><strong><strong>5) Save the swf and you're done!</strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong>You now know how to fix up new furniture!</strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong><strong>Part 5 - Colorizing Furniture!</strong>Today I'll tell you how you can colorize furniture. For example the dragonlamps (rare_dragonlamp.swf) has 10 color options:</strong></strong></p><p><strong><strong>*0 till *9. With the color option you can colorize a image. If you open up the swf you see that there is only a silver version of the dragonlamp. Pic: <a href="http://i.imgur.com/DVIvFpN.png" target="_blank">http://i.imgur.com/DVIvFpN.png</a></strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong>If you open the swf in the furni editor and find the visualization file you notice that for every view (32 / 64 / icon) there are colors added between the <colors> </colors> tags. Every color has its own unique id and start with the <color> tag. For the color with id = 0 we see: </strong></strong></p><p><strong><strong>Code:</strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong>[CODE] <color id="0"></strong></strong></p><p><strong><strong> <colorLayer id="1" color="FA2D00"/></strong></strong></p><p><strong><strong> <colorLayer id="2" color="FA2D00"/></strong></strong></p><p><strong><strong> </color>[/CODE]</strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong>This is the red dragon. If you go to your furnidata you can see rare_dragonlamp*0 -> Red Dragon.</strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong>Between the color tag we can specify on what layer the color should apply. In this case we apply it on layer 1 and 2 which are the head and the body of the dragon. The color is specified with a hexadecimal number. To find out the color belonging to the number you can use <a href="http://colorpicker.com/" target="_blank">http://colorpicker.com</a></strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong>Well now you know about the colorizing feature but wait there is more!</strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong>There are no limitations to the number of colors you want to have. This means you can go past number 9 and thus being able to create a custom color for example <color id="10"></strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong>If you do that do not forget to add it also to the zoomed out view and the icon. Add to your furnidata rare_dragonlamp*10 and add it to your database just how you would normally add furniture.</strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong>If you did everything right you would now have your own colored dragon!</strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong>This is all about the color option. It is not complicated and it is easy to use.</strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong>Credits - HarryHils 70%</strong></strong></p><p><strong><strong>Credits - Me for releasing 30%</strong></strong></p></blockquote><p></p>
[QUOTE="T3ch, post: 249255, member: 33114"] [B]Introduction:[/B] Everyone has a time when you want to create your own furniture. Many people still dont know how to do this properly. In these tutorial series I'll teach you the basics and the advanced stuff. Every part of coding customs is detailed explained, some parts get pictures to support this tutorial. If you're reading this you're probably attracted to customs and want to know how to code your own stuff. Here is a short list what you need for the basics. [B]Basics List[/B] - Hex Editor: [URL='http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm']Download[/URL] - SWF Decompiler: [URL='http://www.flash-decompiler.com/']Download[/URL] For this one you need a license. PM me for a crack :) - SWF Tools: [URL='http://tdid.nl/mirrors/SWF%20Tools.zip']Download[/URL] - Notepad / Notepad++: [URL='http://notepad-plus-plus.org/']Download[/URL] - A working computer [URL='http://whoops%21%20no%20download%20available/']Download[/URL] - it takes some time :p [B]Part 1 - The beginning! - [B]Introduction[/B] So you want to code a custom, here is something you should know what coding customs actually is. Making customs is creating your own furniture.swf. All furniture is working from SWF Files. You can modify any SWF file with a flash decompiler. So we want to code our own customs which means we have to edit a existing furniture file. With a flashdecompiler you can edit those SWF files. So lets do that. I'm going to modify my typewriter and create a new one. I'll make a blue one. - [B]Lets get started![/B] Launch your SWF Decompiler and drag and drop the typingmachine.swf in it. You'll get something like this: [IMG]http://i.imgur.com/OOTXCCO.png[/IMG] Click on edit at the top: [IMG]http://i.imgur.com/BR2NEfH.png[/IMG] And then click on images. [IMG]http://i.imgur.com/ou04NHh.png[/IMG] You'll see this SWF has 5 images: 1 typemachine for zoomed in, one for zoomed out and a catalogue icon. There is also a zoomed in shadow and a zoomed out shadow image file. Most of the time you dont need to edit those. I'll get to that later on. So we now want to edit the files. Click on extract at the top: [IMG]http://i.imgur.com/aF76hhT.png[/IMG] And then select the images folder at the right: [IMG]http://i.imgur.com/jWbo3s4.png[/IMG] Click export parth and select a nice place to extract them. Click on "Extract SWF Objects" to save them. [IMG]http://i.imgur.com/ZP84tBe.png[/IMG] Open up your image editor and modify them to your liking. I made a blue typewriter. [IMG]http://i.imgur.com/LXALHYl.png[/IMG] If you do recolors, dont remove the shading. It is the most important thing in custom making. So go back to your SWF Decompiler and hit edit, click on images and replace them: [IMG]http://i.imgur.com/8FRASj1.png[/IMG] When done click on save as.. at the top and navigate to the folder where you saved the images. Save the SWF under a new name. There is one rule for the new name: The name must be the same length as the old SWF (without .SWF!). In my case the old SWF used to be: typingmachine(.swf) 13 chars. I'm making a blue one so I call it: bluetdidtypoo(.swf) 13 chars. Recheck the length and save it. Download yourself the SWF Tools if you havent already. Unzip them and place them in the same folder you put the SWF in. [IMG]http://i.imgur.com/8FRASj1.png[/IMG] Drag and drop the SWF on decompiler.exe The file size should increase. [IMG]http://i.imgur.com/ZDGiEyW.png[/IMG] Okay so install Hex Editor if you havent already and launch it. Drag and drop the SWF in it and hit CTRL + R. At the top put in the old SWF name and at the bottom the new SWF name and hit replace all. [IMG]http://i.imgur.com/0yZycRl.png[/IMG] Save it and close Hex Editor. You can use NotePad ++ instead. Then use CTRL + H. I just prefer Hex Editor Drag and drop the SWF onto compiler.exe and you're done! Congratulations you made your own custom furniture. Now get yourself some SQLs for your database and you're done! in part 2 i will teach you how to fix the common bug :p [B]Part 2 - Fixing Offset Bug! [B]Introduction[/B] Sooner or later you'll run into bugs. Today I'm going to tell you the most common bug and how to fix it. For part two you need some additional software. Go to: [URL='http://www.mediafire.com/?5scx7qnv5hclx5b']here[/URL] download and extract it. [B]What's this furni editor?[/B] With this tool you're able to edit some of the code from the SWF. This way we can modify code so you can get stuff right. This tool is coded by our God [B]Leenster[/B] - [B]Lets get started![/B] The most common bug is offset. Loading another sized image in a SWF file. Today I'm editing the dino egg (spyro.swf) Okay so I create my SWF: Put images in: [IMG]http://i.imgur.com/MiXlmmT.png[/IMG] I save it as fawke.swf So lets decompe and rename. [IMG]http://i.imgur.com/bALsLyd.png[/IMG] Now I compile it and upload it to my hotel. Now this is what you get if you put too large images in: [IMG]http://i.imgur.com/vv6QsBw.png[/IMG] So lets fix that. Download and extract the FurniEditor made by Leenster. Navigate to the SWF file and open it. You get something like this: [IMG]http://i.imgur.com/NPfsfaq.png[/IMG] There are usually 5 or 6 .bin files in there. It depends on how advanced the furniture is. Now you need to find the .bin file that looks like this: [IMG]http://i.imgur.com/yTFcrP6.png[/IMG] You see the <asset> tags. Now we need to know what <asset> we have to edit. This is fairly easy: _icon = catalog icon. _32 = Zoom out in room. _64 = Normal room view. Lets start with the "normal" view so we have to edit fawke_64. Now we need to edit the x and y coords of the image so it fits perfect on one tile. This is the part where you need some time. You can count how many pixels you have to move the image or just guess. I prefer the first method it can save a lot of time. [IMG]http://i.imgur.com/qWeGiEY.png[/IMG] So <asset name="fawke_64_a_0_0" x="25" y="42"/> becomes <asset name="fawke_64_a_0_0" x="10" y="92"/> X and Y axis work like this: [IMG]http://i.imgur.com/UixYiFS.png[/IMG] So 15 to the right you need to take 15 from the X so it becomes "10". Hit save. Hit replace original. Put the furni in your hof_furni folder and empty your cache and reload the client. I count roughly 50 pixels up and 15 to the right. It fits perfectly now repeat this step for the zoom out version _32. [IMG]http://i.imgur.com/2VyuR0r.png[/IMG] Congratulations you now know how to fix this most common bug! In part 3 I'll be talking about layers and directions! [B]Part 3 - Layers and Directions [B]Introduction[/B] Today we're going to talk about Layers and Directions. But what are these two things? I'm going to learn you what they exactly they do and what they're used for. [B]Layers[/B] So the layers are like layers in photoshop. Each layer contains a bunch of images. You can move layers within the SWF. If you have to move one image you have to edit the <assets> part so dont start adding x/y/z for no reason. [B]Example[/B] Lets take a throne and we're going to look at the layers. Open it with Furni Editor and find 9.bin. [/B] Code: <visualization size="64" layerCount="2" angle="45"> This shows the furniture. size="64" means we're in a normal room and not zooming out. Layercount means how many layers are there. Here there are two layers (0 and 1). Angle means when does it start. Under there you see <layers> and within this section you see one layer. This is the part of the throne. The z="30" means this layer is above anything else. Now lets add: x="-30" [/B][/B] [CODE] <directions> <direction id="0"/> <direction id="2"/> <direction id="4"/> <direction id="6"/> </directions>[/CODE] [B][B]Before: [IMG]http://i.imgur.com/BcPFQyK.png[/IMG] After: [IMG]http://i.imgur.com/Czwl38p.png[/IMG] So this means our layer with id="1" is the side bar. Reason why this is in another layer is the fact that it has to be infront of your avatar to make it stand out. [B]Conclusion[/B] Layers contain a bunch of images. You are not able to move a image inside a layer by editing the <layer> tag. When coding customs you dont have to edit these there are some exceptions. One I tell you in part 5! [B]Directions[/B] Directions are not hard to understand. They tell in which directions the furniture is allowed. For a throne there are 4 directions in the room because you can rotate it in 4 different ways. [IMG]http://i.imgur.com/siJBUAh.png[/IMG] There is a bin that tells what direction is allowed: Code: [CODE]<objectData type="testen"> <model> <dimensions x="1" y="1" z="1.0"/> <directions> <direction id="0"/> <direction id="90"/> <direction id="180"/> <direction id="270"/> </directions> </model> </objectData>[/CODE] I dont think our emulators use this but I think sulake coded their emulator so it reads this XML and then creates the furniture. You can see the z is also given so I think this is the way Habbo is doing it. Dimensions mean what is the size of it and it even tells the height. The direction are in degrees. In visualization you see: [CODE]Code: <directions> <direction id="0"/> <direction id="2"/> <direction id="4"/> <direction id="6"/> </directions>[/CODE] Those are the same directions you see when you say :coords in the hotel. For the icon there is only one direction because you dont have to turn it. [B]Thats it for now. In part 4 I'll explain animations. Till then happy coding![/B] [B]You are now able to:[/B] create your own custom furniture. fix image bugs like offset. add directions and/or remove them. You know what layers are and what they're used for. [B]Part 4 - Fixing New Furniture![/B] This is a small guide on how to fix the new furniture that bugs when you load it in your client. [B]Lets start:[/B] 1) Download the SWF you want to fix. 2) Open it with leensters furniture tool. 3) Search in the .bin files for <graphics> Once found remove it! 4) As we know every opening tag has a closing tag so search for </graphics> in the same binfile you found <graphics> in and remove it. 5) Save the swf and you're done! You now know how to fix up new furniture! [B]Part 5 - Colorizing Furniture![/B]Today I'll tell you how you can colorize furniture. For example the dragonlamps (rare_dragonlamp.swf) has 10 color options: *0 till *9. With the color option you can colorize a image. If you open up the swf you see that there is only a silver version of the dragonlamp. Pic: [URL]http://i.imgur.com/DVIvFpN.png[/URL] If you open the swf in the furni editor and find the visualization file you notice that for every view (32 / 64 / icon) there are colors added between the <colors> </colors> tags. Every color has its own unique id and start with the <color> tag. For the color with id = 0 we see: Code: [CODE] <color id="0"> <colorLayer id="1" color="FA2D00"/> <colorLayer id="2" color="FA2D00"/> </color>[/CODE] This is the red dragon. If you go to your furnidata you can see rare_dragonlamp*0 -> Red Dragon. Between the color tag we can specify on what layer the color should apply. In this case we apply it on layer 1 and 2 which are the head and the body of the dragon. The color is specified with a hexadecimal number. To find out the color belonging to the number you can use [URL='http://colorpicker.com/']http://colorpicker.com[/URL] Well now you know about the colorizing feature but wait there is more! There are no limitations to the number of colors you want to have. This means you can go past number 9 and thus being able to create a custom color for example <color id="10"> If you do that do not forget to add it also to the zoomed out view and the icon. Add to your furnidata rare_dragonlamp*10 and add it to your database just how you would normally add furniture. If you did everything right you would now have your own colored dragon! This is all about the color option. It is not complicated and it is easy to use. Credits - HarryHils 70% Credits - Me for releasing 30%[/B][/B] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Tutorials
How to Code Customs
Top