Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Old Habbo figure to new Habbo-Imager

Newbie Spellweaver
Joined
Dec 26, 2019
Messages
69
Reaction score
38
Hi

I recently started recreating the Danish Habbo Hotel as it was back in 2004-2008 the golden Shockwave ages, and I quickly found the need to display images of the Habbo´s on the website.

Now to do a little bit of background research; the old figuredata is based on 25 integers and the new one is very different, based on a string defining the different parts of the figure in a somewhat more human readable format.

Old figuredata
8311618501285023000680546

New figuredata
hr-831-16.hd-185-01.ch-805-46.lg-285-02.sh-300-06


Converting
Now just converting the old figuredata to the new is somewhat possible, however the colors is all mixed up.

Old figure rendered in the Shockwave client:

webbanditten - Old Habbo figure to new Habbo-Imager - RaGEZONE Forums

Figuredata:
8311618501285023000680546


Directly converted:
webbanditten - Old Habbo figure to new Habbo-Imager - RaGEZONE Forums

Figuredata:
hr-831-16.hd-185-01.ch-805-46.lg-285-02.sh-300-06


Now as you can see the colors are all mixed up, and even further investigating will reveal that hats are not rendered at all.

The new figuredata is roughly translated to something like this:
hr-{spriteid}-{color}.hd-{spriteid}-{color}.ch-{spriteid}-{color}.lg-{spriteid}-{color}.sh-{spriteid}-{color}.
So its clear theres a pattern here.

Therefore I looked into taking the colors from the old "figuredata.txt" and matching it with the new "figuredata.xml". Now this required converting of the old and new files to json and traversing the trees matching the colors and returning the new ids of those colors.

As it turns out the old figuredata relied on the index of the color, where as in the newer version they switched from index of the colors to ids.

For hats I had to do a switch on the sprite-id of the old figuredata and manually match it with the new one.

As a result I ended up with what I expected the correctly rendered figure/avatar.

webbanditten - Old Habbo figure to new Habbo-Imager - RaGEZONE Forums

Converted from the old figuredata to new:
hr-831-1041.hd-185-1026.ch-805-1134.lg-285-1200.sh-300-1195.ha-0-1041

Functional demo



The method simply converts the old figuredata correctly and and sends it to the Habbo API.
Therefore it supports all the bells and whistles of the current Habbo API.


You're free to download, fork and contribute to the project on Github:



- Patrick
 

Attachments

You must be registered for see attachments list
Last edited:
Newbie Spellweaver
Joined
Dec 26, 2019
Messages
69
Reaction score
38
@dominic I'm very sorry if I've infringed on yours or anybody else or missing credit where credit is due.
But I assure you this is a script by me, there's a couple of other figure parsers out there which doesn't take the color into account when converting.
I realize that the conversion is done the same way splitting the 25 int string.

If you would like me to take down my post or add credit please refer me to already existing posts on this subject that solves the issue.
 
Last edited:
Custom Title Activated
Loyal Member
Joined
Oct 26, 2012
Messages
2,357
Reaction score
1,086
Don't listen to haters, I'm glad you share it! It's sad that if something gets deleted some people just have to "question whether somebody truly made it" to say it lightly without calling out names. It's cool to see somebody doing something with the old shockwave ages - even if shockwave is old and deprecated!
 
Joined
Aug 24, 2012
Messages
603
Reaction score
300
Don't listen to haters, I'm glad you share it! It's sad that if something gets deleted some people just have to "question whether somebody truly made it" to say it lightly without calling out names. It's cool to see somebody doing something with the old shockwave ages - even if shockwave is old and deprecated!
I was actually referring to something Droppy and you made back in the days, which resembles this nearly 1:1, but yeah.
 
Back
Top