Thex Furniture Selector and Changer

Discussion in 'RMVX Ace Tutorials' started by Titanhex, Jan 15, 2013.

  1. Titanhex

    Titanhex Do-It-All Veteran

    Likes Received:
    In my office.
    First Language:
    Primarily Uses:
    Part of:          Thex Tutorial & Demo Systems

    DEMO: Thex Furniture Selector

    What is this?

    Excerpt of the Intro Event's comments.

    "Welcome! As you can see by testing this is a very powerful and
    interesting system.

    Let me make this clear, this is an intermediat to advanced level
    evented system.

    It's important to note this, because beginners may not be able to
    understand anything that's going on in the events and may not be
    able to edit this system to work for them.

    It's lightweight for what it does, using only a few switches and
    variables. However to expand the system, we must create more.  
    Before we can do that we must understand what each one does.

    Control A, B, C, D, etc. are the switches that turn on for each piece
    of furniture in the room.
    They can be recycled, meaning that when we enter a new map we
    can reuse the same control switches.
    Make sure there's enough Control switches for each furniture spot.

    Then we need 1 variable for every piece of furniture. This cannot
    be recycled and must be unique for each piece of furniture in the
    This variable keeps track of what piece of furniture is currently in

    And these are the only switch and variable groups we need.

    In order to set up a room to have furniture selection, we must add
    the Q checker.
    This simply checks for the Q button press that toggles furniture
    mode on or off.

    Next we must set the desired furniture. Make sure you've also set
    up the items in your database. Furniture typically has a blank page,
    an F page, and then a page for each piece of furniture.

    The furniture pages have a conditional branch that checks if
    Furniture Mode is on. This allows us to do different things depending
    on if we're in or out of furniture mode. When we're in furniture
    mode, yeah, we want to change the furniture.
    But maybe we want to do something else when not in furnish mode.

    After we have our furniture, we need to decide how the furniture is
    changed. This is the complex part.  There's an event called Control
    Pages that is turned on by our Control switches. Each piece of
    furniture on the map gets it's own Control switch and autorun page
    in the Control Pages event.

    Each control contains a loop. The loop checks for button presses.  
    The 3 button presses are Left, Right and Enter.

    Left checks from the highest furniture number to the lowest.
    Right checks lowest to highest.

    We check the inventory when going left or right to see if the correct
    item is in the inventory. We also add or subtract items from our
    inventory to keep it up to date for what item we're on.

    It's a tricky process. Going to the right for example. We want to
    check our next item up in the list. If we don't have it, we want to
    move on to the next til we either do have an item or end up with no
    item in the spot."
    Ever wanted to place furniture in your house? So did I.  I set out to make a system that did it. Unfortunately that system was convoluted, used scripts, and lagged.

    Fortunately I tried again much later and came up with this. It's light-weight, doesn't lag and only consumes the variables and switches it needs. We're talking as low as only 2 switches and 1 variable if you want. (You'll want more tho!)

    How it works is rather simple. Hit Q in your house and furniture mode will activate. This displays F's where you can put furniture in your house. Go up to the F, hit enter, and hit left or right to change funiture. Hit enter again to confirm your selection or Esc to clear the spot. Hit and Q to close down furniture mode.  Best of all you can still interact with your furniture normally when furniture mode isn't on.

    It's not an easy system to use. Just because it's lightweight doesn't mean it's not complex.  You'll need to know loops, labels, variables, switches, conditional branches, and some base level system designing.

    The only thing I would have liked to add is an indicator to press left/right when changing furniture. But that can be left up to you! 

    Try to find the secret item in the game...


    Last edited by a moderator: Jan 16, 2013
    RocketKnight, pErijoy and Dark Lord like this.
  2. Cryro

    Cryro Warper Member

    Likes Received:
    First Language:
    Primarily Uses:
    Heyo, do you happen to still have the scripts or demo?
    I'd very much appreciate it, thank you!

Share This Page