Jump to content

Sparkle

Members
  • Posts

    15
  • Joined

  • Last visited

Posts posted by Sparkle

  1. To answer my own earlier question about the slippage, it looks like I have cleared this up. From what I understand this was happening:

    • I create the joint fixed to wherever the foundation is when activated.
    • Physics applies some stress to the joint, flexing it.
    • Saving the game saves the position at its flexed limit.
    • Loading the game recreates the joint at what was the flexed limit.
    • Physics flexes the joint more....

    The fix was simply to save the original position and rotation of the joint so it could be restored exactly rather than trying to take the foundations current position on load. Note I was creating intentionally unbalanced structures, sane things wont move much.

  2. In implementation it works very much like a simple version of the KAS grappling hook. In fact that was what I was originally using to hold things down in my base. This is intended to be a less fiddly to set up and more permanent, at least in spirit. It may end up mostly differing in the parts used and the interface to it.

    Deploying something is left as an exercise for the reader since it will depend a lot on your environment. I'm working on Gilly mostly so I have little docking drones that can pick things up and move them about using RCS. Once in place you just activate the foundation and it stays there (in theory). In higher gravity you might end up having to use some kind of lifting rover, KAS winches, rockets or something else... ask Jeb, I'm sure he'll have some crazy ideas!

    Thanks for the warning! I'm so new to KSP modding and learning along via 'experience'. I'll think about using some other technique to get poles in the ground (trigger areas?).

  3. Nice! I really like the concept. Does it simply lock the gameobject transform in place?

    Awesome, thanks for the encouragement all. Currently the attachment is done using a joint so it's part of the physics system. This means that in theory you can break the joint if you hit it hard enough... but I've set the break force to be high enough that you should break the rest of it first. Large loads (like the orange tank) will start to twist the foundation a little.

    I am going to try making a plate that has parts extending down into the ground so it actually looks like a deep foundation when it's placed on uneven ground. I also need to improve the way it detects the ground as it tends to float away on save/reload.

  4. Foundations

    Foundations is a mod which lets you anchor structures to the ground, just like a real building. It's goal is to help you set up more permanent buildings at your mun bases, around Kerbin or anywhere else that has land.

    0.2 Alpha Release

    This is the very first release and is intended to show the general concept and get people testing and providing feedback. As this is a first alpha release is has little testing, is generally incomplete and may well destroy your life. Back up you save games before using and be aware that I do not guarantee to maintain compatibility with it in future versions.

    Special thanks to every other mod author for making my game awesome and having source code I can learn from!

    How do I use it?

    The mod currently adds two new parts to the structural tab. These parts are based on the stock structural panels and are intended to be the foundation of any structures you want to build. Right clicking on them while they are touching the ground will give you the option to attach them, fixing them in place.

    M-1x1 Structural Foundation:

    lMLVaRul.jpg

    M-2x2 Structural Foundation:

    0OmnLkql.jpg

    Attach/Detach action:

    Rq5NUC1.jpg

    Why do I want this?

    Jeb wants this because he's clumsy with his EVA suit and every time he bumps the fuel depot on Gilly it flies away...

    K0TT8YKl.jpg

    Bill wants this because his new crane slides around when he tries to pick up that 30 ton fuel tank...

    RffdKGwl.jpg

    Bob wants this because he's designed his ultimate kethane refinery for the Mun base and he needs it to stay put when Jeb tries to refuel his Mundozer...

    7VHElUYl.jpg

    Frequently Asked Questions

    How solid are the foundations?

    The foundations are implemented using a physics joint and are intended to behave somewhat like real foundations. That means for reasonable loads they will be very solid but for larger loads, particularly unbalanced ones, you're going to need to think just a little more. I put together some examples here. One of my main concerns was making sure they save and reload without any movement or slippage.

    Will the foundations break?

    The joint holding them in place does have break forces set on it so yes. They are set high enough that you should be doing something quite unreasonable before this happens, and will probably break something else first. The larger foundation has relatively larger break forces as well.

    How do I get my structure to the right place?

    Currently that is entirely up to you. At my Gilly base gravity is so low I use RCS to fly them into place Starcraft 2 style. On planets with more gravity you could use a large rover, or rockets, or winch it there with KAS or... be creative! If you have any ideas about such functionality that would work well in the mod do leave a suggestion.

    Can I make my own foundation parts?

    If you're familiar with part config files this is very easy. Note that any parts you make are your responsibility and I wont be officially supporting them. Look in GameData/Foundations/Parts/Foundations.cfg to see how the parts are put together, all that makes it a foundation part is the MODULE block at the end. Try something crazy like adding the module to landing legs... actually that sounds awesome, be right back...

    What are your future plans?

    I would like to create some more visually effective parts, particularly ones that deal nicely with building on sloped surfaces. Other than that I'm open to suggestions... where do you want this to go?

    Known Issues

    None...

    Change Log

    0.2 Alpha

    Small bug fix release, should be 100% backwards compatible.

    • Attaching two of the larger foundation pieces together at the edges now works without clipping as expected.
    • Approaching structures from a distance no longer causes their foundation to be 'loose' and slide around. This was due to saving attachPosition in "world space", which changes frequently in KSP. Now changed to store an offset from the part position.

    0.1 Alpha

    Initial release for feedback.

    How can I help?

    Right now I need your feedback to help me decide on future direction for the mod. What can you build with it? What do you want to build that you can't? What parts should I provide and what features should they have? I would love to see some screenshots of your creations and hear your ideas.

    Bonus points if you build me a Mundozer!

  5. Thanks for this. As an experienced programmer but total newbie to KSP modding it's nice to see how people set things up. I particularly like that you included the build events to show how you might actually do it in anger.

    Personally I'd like to see more examples of how to interact with the Kerbal world via API. That's kind of vague, but some starters for things like handling collisions, spawning new objects etc would be nice.

×
×
  • Create New...