Old Habbo figure to new Habbo-Imager

Results 1 to 7 of 7
  1. #1
    Registered webbanditten is online now
    MemberRank
    Dec 2019 Join Date
    16Posts

    Old Habbo figure to new Habbo-Imager

    Old Habbo figure to new Habbo-Imager
    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:


    Figuredata:
    8311618501285023000680546


    Directly converted:

    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.


    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
    http://dcr.webbanditten.dk/habbo-ima...=4&gesture=sml


    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:
    https://github.com/Webbanditten/habb...gure-converter


    - Patrick
    Attached Thumbnails Attached Thumbnails avatarimage.png   avatarimage (1).png   Capture.PNG  
    Last edited by webbanditten; 16-04-20 at 04:46 PM. Reason: Spelling, added new figure string


  2. #2
    j’aime ma famille dominic is offline
    True MemberRank
    Aug 2012 Join Date
    ~/Location
    648Posts

    Re: Old Habbo figure to new Habbo-Imager

    dont copy others code, it doesnt get you anywhere.

  3. #3
    Registered webbanditten is online now
    MemberRank
    Dec 2019 Join Date
    16Posts

    Re: Old Habbo figure to new Habbo-Imager

    @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 by webbanditten; 24-04-20 at 08:27 AM.

  4. #4
    GPL License Advocate Moogly is offline
    Alpha MaleRank
    Feb 2008 Join Date
    Vault 101Location
    2,321Posts

    Re: Old Habbo figure to new Habbo-Imager

    Quote Originally Posted by dominic View Post
    dont copy others code, it doesnt get you anywhere.

    Are you claiming that absolutely nobody can figure this out and write code to convert figure data from one format to the next? Because if you are, you're a sad one.

  5. #5
    I'll sail away... Emily is offline
    Pink PantherRank
    Oct 2012 Join Date
    The NetherlandsLocation
    2,515Posts

    Re: Old Habbo figure to new Habbo-Imager

    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!
    Project Nordlys (Aurora before) reboot:

    http://forum.ragezone.com/f331/asp-n...1/#post8988631

  6. #6
    Account Upgraded | Title Enabled! m.tiago is offline
    True MemberRank
    Dec 2008 Join Date
    BrazilLocation
    319Posts

    Re: Old Habbo figure to new Habbo-Imager

    Buddy , great release , don't wate your time with haters :D
    RetroCMS Developer
    Development Thread | GitHub (Beta3 Branch) | GitHub Stable Branch (Soon)

  7. #7
    j’aime ma famille dominic is offline
    True MemberRank
    Aug 2012 Join Date
    ~/Location
    648Posts

    Re: Old Habbo figure to new Habbo-Imager

    Quote Originally Posted by Emily View Post
    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.



Advertisement