Welcome to the RaGEZONE - MMORPG development forums.

Advanced Custom Room Layout Editting

This is a discussion on Advanced Custom Room Layout Editting within the Habbo Tutorials forums, part of the Habbo Hotel category; Darkoro's Advanced Custom Room Model Tutorial Stages: Figuring out the total size Seperating off different areas Changing area heights Adding ...

LyncusMU
Results 1 to 14 of 14
  1. #1
    Average Member
    Rank
    Newbie
    Join Date
    Nov 2011
    Location
    Scotland
    Posts
    65
    Liked
    8

    Advanced Custom Room Layout Editting

    Tabo Hotel
    Darkoro's Advanced Custom Room Model Tutorial

    Stages:
    Figuring out the total size
    Seperating off different areas
    Changing area heights
    Adding stairs
    Adding the door
    Inserting into the database

    Pre-note: I added the door in at each stage so that the room would work on my hotel. Only add the door once the room layout is complete.

    The following spoiler shows how to update rooms on phoenix 3.6.4 without restarting the emulator. It no longer works on 3.7.
    Spoiler:

    You can now update your rooms with their new models on PhoenixEMU! The following shows how to do it.

    1. Create the room that you want to customise
    2. Follow this tutorial to make your custom room model
    3. Add it into the database, and go into your rooms table
    4. Change the room_model field of the room to your new room model name
    5. Make sure you save changes and then go back to your hotel window
    6. Use the :update_navigator command
    7. Use the :unload command
    8. Return to your room and the room_model should update!

    This will prevent you from having to restart your emu multiple times just to have a custom room layout!


    Figuring out the total size

    To begin, open notepad, or a similar program. You need to figure out the total size of the room, width and lengthwise. So if you are having, say, 4 sections in a square, each section 4x4, you would be looking at a 9x9 square (4+4+the gap inbetween each way). You then need to add 1 to this number. So for the above example it would be 10x10.
    (The formula for this is (n * m) + m, where n is the width of each section, and m is the number of sections, assuming each section is the same width).

    Im going to stick with this example throughout.

    So in notepad, you need to start with 10 x's on the first line of notepad. and then a following 9 lines of 1x. Like so:
    Code:
    xxxxxxxxxx
    x
    x
    x
    x
    x
    x
    x
    x
    x
    Next, we fill in the rest of the space with the number 0 for now.
    Code:
    xxxxxxxxxx
    x000000000
    x000000000
    x000000000
    x000000000
    x000000000
    x000000000
    x000000000
    x000000000
    x000000000
    This is how your room will look.



    Seperating off different areas

    Now to seperate off my 4 different sections from each other, i must replace any of the 0s with the letter x, as this in a height map means "no_tile". My plan was to make 4 4x4 sections, and here's how it turned out:
    Code:
    xxxxxxxxxx
    x0000x0000
    x0000x0000
    x0000x0000
    x0000x0000
    xxxxxxxxxx
    x0000x0000
    x0000x0000
    x0000x0000
    x0000x0000
    Now my room is seperated into the 4 sections i desired. I do not need to set a space for the door, because it does that automatically. It should look like this:


    PLEASE NOTE: if you do put a space for your door on the edge with a 0, then put the door on there, you will be able to put furni in your door. Whether that is desirable or not is personal preference.

    Changing area heights

    Now lets say i want to have the 4x4 square that will be at the top of the room to be above all the other 3, and the left and right squares to be above the bottom one but below the top one. This means I need 3 levels, numbered 0, 1, and 2. This is how it would be done:
    Code:
    xxxxxxxxxxx
    x2222x1111x
    x2222x1111x
    x2222x1111x
    x2222x1111x
    xxxxxxxxxxx
    x1111x0000x
    x1111x0000x
    x1111x0000x
    x1111x0000x
    And this is how it looks:


    When making your own room, please note that the maximum hieght on a hieght map is 9, and the minimum is 0. If you try putting 10, it will register it as a tile 1 z-level high next to a tile 0 z-levels high, and make stairs between them.

    Adding stairs

    Ok, so now i have 4 sections, with different heights. But now i want to link some of them with stairs. How do i do this? Some of you will be thinking "replace x's with 1.5 and 0.5". Wrong. You DO have to replace x's inbetween. But not with 1.5 and 0.5. Instead with either 2 and 1 or 1 and 0. They will both give different effects, and the 1 and 0 option is the effect I desire for this one. (I tested the 2-1 option, it mucked up on the bottom section).

    Code:
    xxxxxxxxxxx
    x222221111x
    x222221111x
    x222221111x
    x222221111x
    x2222x1111x
    x111110000x
    x111110000x
    x111110000x
    x111110000x
    Now I have stairs where the gaps were before.



    Adding the door

    Finally comes the door. DO NOT DO WHAT I DO IN THIS NEXT EXAMPLE! IT IS ONLY A POINTER AS TO DOOR POSITION!

    Ok, so this next example shows where I WANT to put the door. It will not be included in the actual height map. The position I plan to put the door in is marked by the V.
    Code:
    xxxxxxxxxxx
    x222221111x
    V222221111x
    x222221111x
    x222221111x
    x2222x1111x
    x111110000x
    x111110000x
    x111110000x
    x111110000x
    The position of the door in this height map is x0, y2, z2. The rotation value is 2. If you wish to find out what your co-ordinates are, this is how i found mine:
    Code:
     0123456789 -> x
    0xxxxxxxxxxx
    1x222221111x
    2V222221111x
    3x222221111x
    4x222221111x
    5x2222x1111x
    6x111110000x
    7x111110000x
    8x111110000x
    9x111110000x
    |
    V
    y
    Inserting into the database

    Now go into your room layouts table, and insert the x, y, z, and rotation values above. Then go into notepad, and copy the entire height map. Then go into the table again, and paste it into the height maps field. Finally, give your room layout a name, starting with "model_". Save changes and close the table.

    Now go to your rooms table and pick a room (:userinfo is handy for finding room ids"). Go to the room_model field, and change it to your new room model id (the "model_" part). Save changes and close the table.

    Now in order for the changes to take effect, you must restart your emulator (unless you have an emulator with an update_rooms command of some sort. Update_navigator will not do what is required).

    Once restarted, go back to the room that you changed and it should be sorted!

    Possible issues

    o Door in an invalid location
    o Room size too big (I advise 30x30 max size)
    o public_items field not set to '' (to fix this, create a new query and type
    Code:
    UPDATE room_models SET public_items = '' WHERE id = 'model_yourmodelname';
    and run it)

    A lot of this was found out through trial and error and a few database backups had to be used in the process. Be prepared, (use a condo-) back up your database in case of failure.

    Let me know if anyone comes across any problems.

    Like if you found helpful, and dont be afraid to point out any mistakes i made!
    Last edited by DarkoroDragon; 21-01-12 at 05:44 PM. Reason: Added the update part

  2. HostKey.com: Unmetered Dedicated servers in the Netherlands
  3. #2
    SQL Master. :)
    Rank
    Subscriber
    Join Date
    Apr 2011
    Location
    Matrix World.
    Posts
    987
    Liked
    170

    Re: Advanced Custom Room Layout Editting

    Would a screeenie of your Room that how its done would be Good idea -

    Plus - Thanks for taking over my thread on ragezone idea was a this tut

    Hopefully this Tut goes to Quilty Section

    (MOD - Dont u dare make your post be first! x) )

  4. #3
    Average Member
    Rank
    Newbie
    Join Date
    Nov 2011
    Location
    Scotland
    Posts
    65
    Liked
    8

    Re: Advanced Custom Room Layout Editting

    Quote Originally Posted by </Matrix> View Post
    Would a screeenie of your Room that how its done would be Good idea -

    Plus - Thanks for taking over my thread on ragezone idea was a this tut

    Hopefully this Tut goes to Quilty Section

    (MOD - Dont u dare make your post be first! x) )
    As i mentioned in the OP, i dont have access to a database any more so therefore cannot show a finished result. If someone does manage to follow this tutorial correctly, then feel free to post the finished result as a screenshot and link me so i can add it in to the OP.

    As for the whole Plus part, im not sure i understood that... If you're saying that i took your idea and reposted it, im sorry, i only saw a tutorial with the hieght map editor program that doesnt allow for stairs etc. If not, then please reiterate what you meant because i didnt quite understand.

    And thanks for the quality tut comment :3

  5. #4
    Hello Der.
    Rank
    Member +
    Join Date
    Nov 2011
    Location
    RaGEZONE
    Posts
    310
    Liked
    57

    Re: Advanced Custom Room Layout Editting

    Good descriptive tutorial, nice work.

  6. #5
    Newbie
    Rank
    Newbie
    Join Date
    Nov 2011
    Posts
    15
    Liked
    1

    Re: Advanced Custom Room Layout Editting

    Nice thread

  7. #6
    Average Member
    Rank
    Newbie
    Join Date
    Nov 2011
    Location
    Scotland
    Posts
    65
    Liked
    8

    Re: Advanced Custom Room Layout Editting

    Thanks guys. :3

  8. #7
    Average Member
    Rank
    Newbie
    Join Date
    Mar 2010
    Location
    The Netherlands
    Posts
    66
    Liked
    7

    Re: Advanced Custom Room Layout Editting

    Great Work

  9. #8
    Average Member
    Rank
    Newbie
    Join Date
    Nov 2011
    Location
    Scotland
    Posts
    65
    Liked
    8

    Re: Advanced Custom Room Layout Editting

    Updated to include images and better styles. Also reformed the code to work properly, removed any "could be's/should be's", and listed some possible issues with rooms that didnt work.

    To all those that take the time to read and use this tutorial, I thank you for your time. If you found it helpful please hit the like button. If you have an issue dont be afraid to post it and i'll see what i can do to help.

  10. #9
    Habbo Section <3
    Rank
    Subscriber
    Join Date
    Jun 2009
    Location
    Niagara Falls,
    Posts
    1,158
    Liked
    85

    Re: Advanced Custom Room Layout Editting

    Love it, Thank's for this

  11. #10
    Red like a Tomato!
    Rank
    Member +
    Join Date
    Nov 2007
    Location
    Netherlands
    Posts
    309
    Liked
    15

    Re: Advanced Custom Room Layout Editting

    I need a room, 30x30. Can someone make a SQL for me please?

  12. #11
    Average Member
    Rank
    Newbie
    Join Date
    Nov 2011
    Location
    Scotland
    Posts
    65
    Liked
    8

    Re: Advanced Custom Room Layout Editting

    UPDATE
    My co-owner, the guy that does most of my coding and i'd probably be nothing without, found a way to update the room models without restarting the emulator on Phoenix! Follow the update above and you'll be able to do the same.

    @tomad: There are two steps to thismm because im unsure how to add in line breaks in sql code. So first of all, run the below query in your phoenix db. If its not phoenix you may have to edit some of the fields/values.

    Code:
    INSERT INTO `room_models` (`id`, `door_x`, `door_y`, `door_z`, `door_dir`, `heightmap`, `public_items`, `club_only`) 
    VALUES ('model_30x30', 0, 29, 0, 2, 'replaceme', '', '0');
    Next, copy the following heightmap:

    Code:
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    x000000000000000000000000000000
    x000000000000000000000000000000
    x000000000000000000000000000000
    x000000000000000000000000000000
    x000000000000000000000000000000
    x000000000000000000000000000000
    x000000000000000000000000000000
    x000000000000000000000000000000
    x000000000000000000000000000000
    x000000000000000000000000000000
    x000000000000000000000000000000
    x000000000000000000000000000000
    x000000000000000000000000000000
    x000000000000000000000000000000
    x000000000000000000000000000000
    x000000000000000000000000000000
    x000000000000000000000000000000
    x000000000000000000000000000000
    x000000000000000000000000000000
    x000000000000000000000000000000
    x000000000000000000000000000000
    x000000000000000000000000000000
    x000000000000000000000000000000
    x000000000000000000000000000000
    x000000000000000000000000000000
    x000000000000000000000000000000
    x000000000000000000000000000000
    x000000000000000000000000000000
    x000000000000000000000000000000
    x000000000000000000000000000000
    And paste it in the heightmap field of the new record. The current value should be 'replaceme'. Once you've done that, save the changes and follow the update on the OP to add it into your hotel.

  13. #12
    Azure subscription
    Rank
    Subscriber
    Join Date
    Dec 2011
    Location
    єαятн
    Posts
    1,704
    Liked
    255

    Re: Advanced Custom Room Layout Editting

    This is probably one of the best tutorials! It's so descriptive and cool! 10/10

  14. #13
    Account Upgraded | Title Enabled!
    Rank
    Member +
    Join Date
    Jan 2012
    Location
    C:\inetpub\
    Posts
    212
    Liked
    26

    Re: Advanced Custom Room Layout Editting

    Should be moved to Quality tutorials! Thanks for this!

  15. #14
    Average Member
    Rank
    Newbie
    Join Date
    Nov 2011
    Location
    Scotland
    Posts
    65
    Liked
    8

    Re: Advanced Custom Room Layout Editting

    No problem. Im simply glad to help the community out, rather than be a stingy ass who doesn't share his hints and secrets ^.^

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •