Modding Help Chair sitting positions (Solved?)

Discussion in 'Starbound Modding' started by owlsniper, Aug 10, 2016.

Tags:
  1. owlsniper

    owlsniper Void-Bound Voyager

    Edit: Solved for the top chair! I didn't take the image size and debug boxes into account when making the chairs- I ran into a similar problem when I was working on a table. I made the table too tall, so it was half way through a debug box, making it so anytime I'd stand on it or place an object on top of it, you and the object would hover above it, not rest on the top of it.

    [​IMG]
    Each box is 8x8 pixels, and if you look above the chair, you'll see an open space. That's what happened with the table, but now that it's fixed and fits two of the boxes, it's no longer a magical table that'll make anything on top of it float, but a functional and plain one. Boring, but what you're probably going for.

    As for the chair, I was wrong when it came to the actual image size and position. I cropped the image down around the chair, but what you really want to do is make it 16x24, like this:
    [​IMG]
    Setting the sit position in the code to (2, 22) should make it perfect.

    Here's even some more templates using the 8x8 boxes!

    [​IMG]
    [​IMG]
    Chair: try to put the seat along/above the red line (you don't have to follow it exactly)
    Table: have the surface of the table right on the top line

    Doing so will get you something like this!
    [​IMG] [​IMG]
    (type /admin, then /debug, then /boxes in the chat to turn on boxes to check your own)

    I'll test out the chair template in a bit too, just to make sure it works alright. I really hope this'll help some people! I'm horrible at explaining things.


    -
    -
    -


    Hey there! I'm very new to modding and coding, so I haven't got a damn clue what I'm doing.

    Everything's been going pretty smoothly for me jumping into this without any prior knowledge or even how TO mod Starbound, but I'm having a lot of troubles with getting the sitting positions for chairs right.

    [​IMG] [​IMG]
    [​IMG] [​IMG]
    As you can see, my poor bird-brain can't understand why my chairs are getting so messed up.

    The chair on the top looks perfect while facing the left, but once you flip it to the right, you're sitting on the edge of the seat.
    Same for the second chair, only in reverse. Bad on the left, good on the right.

    Anybody know how I could fix this? For the top I even worked on an in-game chair and copied the code and only changed the file names, so I'm not sure why this is happening.

    Here's my code:
    Please help if you can! It'd be much appreciated.

    (Everything pictured here will be released eventually, by the way- in case you're wanting these chairs.)
     
    Last edited: Aug 10, 2016
    boo buu likes this.
  2. Naddox

    Naddox Cosmic Narwhal

    I actually just semi-covered chairs in my tutorial series.

    Try changing your sit position from [-1, 22] to [2, 22].

    Not sure why you have it set to -1. The sit position is the x, y of the chair and where the player or npc will appear on it when sitting. -1 is going to be off the image itself. Basically you're going to just need to mess around with the sit position until it looks right.

    Also, since you're a new modded, maybe check out my tutorial series, might find it handy. You can find a link in my signature.
     
  3. owlsniper

    owlsniper Void-Bound Voyager

    I actually copied the coding from a chair that's in the game files, so I'm not sure why it's set to that either.. and I've already messed around with the positions a lot already, everything I've tried just isn't centered.
    Thank you so much though! I'll go look at your videos, hopefully I'll be able to figure it out.
     
  4. Tentacle_Sashimi

    Tentacle_Sashimi Scruffy Nerf-Herder

    I know this may be slightly off topic. but since you've got experience modding chairs:

    I've changed the color of a couch using starcheat, but some furniture use a separate "sitCoverImage" file while your character is sitting. This separate image file changes a portion of the couch back to it's default color scheme. The code for the couch only has <color> for the main piece of furniture but not for the sitCoverImage so I cannot alter the color in the same way I did for the rest of the couch. Is there a way around this? I've included a picture.
     

    Attached Files:

  5. PrinceTBug

    PrinceTBug Scruffy Nerf-Herder

    The pathe that sitCoverImage uses is specified in the couch's object file. You can change it to another path if you were to make a new object in a mod. The way that the couch changes color is by using a list of frames based on that image. The sitCoverImage was likely added after colorable furniture was scrapped, so the file doesn't contain image frames for the other colors. You could modify the games files or create a mod to add those alternate color frames though
     
    Tentacle_Sashimi likes this.

Share This Page