Jump to content

[Plugin] [0.22] [WIP] Foundations - UPDATE: ALPHA RELEASE 0.2


Sparkle

Recommended Posts

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.

{download link removed for security reasons}

(MIT licensed)

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!

Edited by Gargamel
Removed download link
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

I would post an update... if I could get it to reattach at the right time after saving. Does anyone know which event would be the best place to add a joint before the physics kicks in? OnPartUnpack seems to be just a little to late and is allowing the structure to slip an bit each time I save/load.

Link to comment
Share on other sites

Great idea, as a player who is really into the industrial aspects of KSP I tent to have large facilitys on a majority of the bodys, so something like this really appeals to me.

Couple things I am curious about though...

How does this differ (if at all) from adding the KAS grab/attach module to a steel panel and attaching it to ground?

How does actually deploying something like a crane playout?

In your previous post you mention making foundations that look like the pad an actual building sits on...a WORD of WARNING about that.... Terrain colliders in KSP are fickle at best..you want to avoid 'forcing' any type of part collider more than a meter or so into the terrain collider..if ya do the Kraken will eat your cookies! I have even encountered this issue using KerbTown placed static object (placed same way the VAB and such are), and statics dont pay attention to most of the game physics. Basic colliders on parts (from what I can tell) work best in contact with terrain colliders.

Link to comment
Share on other sites

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?).

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Well I just recently had a small base float away on Eve.

I think I was close to the game's memory limit, due to too many mods, and the physic engine I believe couldn't keep up.

Maybe this could help as I have had this happen more than once?

Link to comment
Share on other sites

Well I just recently had a small base float away on Eve.

I think I was close to the game's memory limit, due to too many mods, and the physic engine I believe couldn't keep up.

Maybe this could help as I have had this happen more than once?

wait what the o.O

Link to comment
Share on other sites

If you could extrude a concrete base into the terrain, somewhat like a launch clamp, it would give you a properly level foundation.

A version that hooked into IR and allowed you to hinge and had a telescoping piston would be extremely handy.

Link to comment
Share on other sites

A version that hooked into IR and allowed you to hinge and had a telescoping piston would be extremely handy.

This sounds interesting but I'm not really sure what you're getting at. Is this something that could be done simply by building on top of a foundation piece with those parts? If not could you please explain in a bit more detail what you might want to do?

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...