Jump to content

Has anyone found a way to add celestial bodys to the map with a plugin?


I got BCed

Recommended Posts

Yes, the person who "created" it has a bad reputation around here, he is known to steal models and claim they are his own, he says some very farfetched stuff

He never release any videos of this moon of his, and I think it's safe to say he just photoshopped it into a picture of KSP.

Or, made it a model and then just hyperedited it into orbit, although there is no reason to be impressed by this, It would have no gravity and the collision box would be very sketchy.

Link to comment
Share on other sites

Has anyone found a way to add celestial bodys to the map with a plugin?

At the risk of stating the obvious the easiest way is to simply duplicate an existing celestial body:

GameObject minmus = GameObject.Find("Minmus");

GameObject.Instantiate(minmus, minmus.transform.position + Vector3.right * 200000, minmus.transform.rotation);

qrPWIBgl.png

(orbit altered with Hyperedit)

If you're talking about custom planets then my current best guess is that PQS handles creating the sphere and the PQSMod-derived classes shape the terrain. For example the list of PQSMod objects for tylo is:

Tylo/Tylo/QuadMeshColliders (PQSMod_QuadMeshColliders)

Tylo/Tylo/Scatter (PQSLandControl)

Tylo/Tylo/_CelestialBody (PQSMod_CelestialBodyTransform)

Tylo/Tylo/_Color (PQSMod_HeightColorMap)

Tylo/Tylo/_Color (PQSMod_VertexColorMap)

Tylo/Tylo/_Color (PQSMod_VertexColorSolid)

Tylo/Tylo/_Height (PQSMod_FlattenOcean)

Tylo/Tylo/_Height (PQSMod_VertexHeightMap)

Tylo/Tylo/_Height (PQSMod_VertexSimplexHeight)

Tylo/Tylo/_Height (PQSMod_VertexSimplexHeightAbsolute)

Tylo/Tylo/_Material_ModProjection (PQSMod_AltitudeAlpha)

Tylo/Tylo/_SurfaceQuadUVs (PQSMod_UVPlanetRelativePosition)

I don't know if the object names are significant, or if they're hooked into the system some other way.

Edited by EndlessWaves
Link to comment
Share on other sites

Ahh Yes... I forgot bodies where quandtrees rather than mesh objects.

Well what I want to do is put a few asteroids in orbit of something, so i guess I could clone Gilly.

Having minute experience with KSP code injection, and as I already have the tread open; can I call:

GameObject minmus = GameObject.Find("Minmus");

GameObject.Instantiate(minmus, minmus.transform.position + Vector3.right * 200000, minmus.transform.rotation);

any time I want a new minus to appear?

Link to comment
Share on other sites

You only need the instantiate line to duplicate an object (and an extra line or two to set it's name and orbit, see hyperedit source). The first line to get a reference to the object would typically only be one run and then the reference kept for the rest of the game:

GameObject minmus;

AMethodThatRunsOnce()

{

minmus = GameObject.Find("Minmus");

}

MethodYouRunToSpawnAnotherObject()

{

GameObject newObject = GameObject.Instantiate(minmus);

//change name

//set orbit

}

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