Modding Help Making a very special vehicle, gonna need a lot of help...

Discussion in 'Starbound Modding' started by MetaFace, Feb 28, 2017.

?

Why even?

  1. Of course!

    1 vote(s)
    50.0%
  2. I don't like cheese...

    1 vote(s)
    50.0%
  1. MetaFace

    MetaFace Guest

    So this is the continuation of my current work, but now I'm advancing due to the fact that one cannot tell the game what player animation to use (I've tested), so my thought was, what CAN be told which frames to use? A vehicle of course, more specifically the mechs. This is where the smarter people come in, I've never touched vehicles and this one is going to be weird.

    So the idea is very similar to a mech, but also more so to the game Fallout 4's power armor, in the sense this vehicle will be able to do everything that you could do normally (such as open and use doors, hold weapons including melee, but not sleep or sit), however...

    First things first, I need the basics of making a vehicle, something I can sit in (probably using shift-E instead of E so you can use normal objects without leaving the seat everytime). Anyone that can explain how this will work?
     
  2. bk3k

    bk3k Oxygen Tank

    I've had the idea for a powerArmor. Maybe Fallout, maybe Iron Man. But I don't feel like actually attempting a vehicle at this time.

    I'm not sure off the top of my head about using EVERY object. But objects that are scripted I can help with. You'd want a scripted entity call. Actually you probably want.

    Code:
    local aim = vehicle.aimPosition()
      --I think that's the mouse?  Vehicles I haven't messed with yet.
    world.objectQuery(aim, aim, {
      boundMode = "position",
      callScript = "onInteraction",
      callScriptArgs = mcontroller.position()
    })
    
    You might notice I'm throwing away the result of the objectQuery. I'm actually just abusing it to find nearby objects with the onInteraction function and call it while sending the vehicle position as an argument(so the object knows what direction you are relative to it). It should effectively be just as good as using it outside of a vehicle.

    I don't think you'll be lying in beds, sitting in chairs, etc.
    There are others functions you could call if you only wanted to use doors, but onInteraction covers doors like anything else. It is clearly the better way.

    Of course if you use the Automatic Doors mod... by default doors will open for vehicles anyhow - as long as they aren't being controlled by the first input node, otherwise locked, etc.

    edit : addition
    Using weapons... that might be complicated. Probably not impossible and probably involving some illusions, but I think possible.

    I think the mannequin would be a good reference where appearance of weapons is concerned. Also the mod code in xs mechs(which use your energy to do things). And you'd probably want to look at that for other obvious reasons.

    You'd need to do something about weapon abilities. That would be difficult. Pre-release turrets at a point could have guns equipped. But the weapon system itself changed and that went out the window. Still might be a good reference. I have them in case you don't have older builds.

    edit2:
    Depending on what you're actually trying to do, maybe a tech would be better?
    FYI the earliest "vehicles" where actually techs. Then we got proper vehicles.
     
    Last edited: Mar 1, 2017
  3. MetaFace

    MetaFace Guest

    Well this is what I'm looking for, the use of weapons seems the hardest to do, I didn't want to be able to use items like chairs or beds (much like Fallout 4 armor), or even things like crafting stations, and I feel like that'll be as simple as determining what you're looking at and telling the game "nope, I don't want that!" I'd like to hear a little more about these 'tech vehicles' and how they worked.

    First things first, I need to make something the character can sit in as well as do basic movement.

    As I didn't work on that last night, instead I added a new gun.
     
  4. bk3k

    bk3k Oxygen Tank

    For the tech vehicles, I think you can look at XS mechs and his bulldozer vehicle too. I think those once where techs, and I think he links to the old tech versions(originally by someone else IIRC). They're obviously outdated mod, but if the download links are there, then you could look.

    Also I just remembered that I have the Enraged Koala assets with something like that.
    I just attached the tech folder from that build.

    They obviously won't work on current builds, but could give you an idea of how that worked.
     

    Attached Files:

    • tech.7z
      File size:
      93.9 KB
      Views:
      5
  5. MetaFace

    MetaFace Guest

    Alright, I'm going to take a look at this, lately I've been working on just new weapons (as an attempt to force unique weapons that'll need special lua scripts so I get practice). So this is coming up real fast once I get a clue, which means I should use a xs/zz mech as a base (probably zz since it already has a small mech for going through doors).
     
  6. MetaFace

    MetaFace Guest

    small semi related question (related to my mod, not so much as this armor/vehicle thing), is there... a way to scale sprites without physically changing them on my hard drive? like some json/lua code that'll make the game just make the image seem small (to keep detail while losing minimal complexity)?
     
  7. bk3k

    bk3k Oxygen Tank

    I think scaling falls under "transformations" but I don't have detailed information about that. I've never done it.

    In the event you haven't noticed, check your \starbound\doc\lua\ folder
    I'd read up on the animator documentation, and check(string search over the assets) for code using it. stuff like animator.scaleTransformationGroup
     
  8. MetaFace

    MetaFace Guest

    alrighty then...
     

Share This Page