Jump to content

Planets and ScaledSpace.


Recommended Posts

Hum, Mr Shifty brings a good point. Maybe what we need then is... FTL? I mean, Kagrathea, if you could code in new planets in the game, you sure can code some sort of basic FTL drive, like an Alcubierre drive maybe.

Because I can indeed see it becoming an issue, and to not rely on Hyperedit to get there, it might be useful to add something like this.

Oh, totally, but I'm not a fan of letting my pc roll for 5h30 to get to my intercept. The warp drive could be simply a GUI interface where you enter your target and set a speed (let's say multiples of c between 0.5 and 5) and then it would set the maneuver node for and then you could boot the FTL drive at the right moment and then warp to the target. Idk, I don't think it would be TOO hard to create. It will be very cheaty, but it gives a fun and accessible tool to get there.

Or modding higher warp values could work, but it's a lot less fun.

Silly Kerbals. Always trying to find the most complicated solution. For a small additional cost we will supply you with two, that's TWO(!) new warp levels*. (time dilation effects sold separately).

*Warning use as directed. May cause nausea, sneezing, seizures and/or random bits of your ship exploding.

Erm, guys, all this talk about FTL drives is a bit silly. We already have a mod in-game that makes getting to Jool in five minutes or less a reality.

Link to comment
Share on other sites

Naughty Kerbals. You have hijacked our hijacked thread with mundane details. Lets get back to the central issue. What do you want, where do you want it, and (of course) how much of what you want can you actually finance...er afford? I meant afford of course.

Again I present our menu. I should get marketing to gloss it up a bit...Well.. it will do...

-Minmus class. Your basic bargain planet. We can give you these in bulk discounts. Cheap enough to do your own asteroid belt! I am afraid the base model only comes in grey/greygreen (as you have noticed). But we do offer a custom paint job as an extra. See Joker for a more... shall we say.. extreme example.

-Gas Giants. High mass make these a pricey item. But a recent find has made gas cheap! 2 for one on sale now.

-Tylo class. Vacuum moon. This is what you really want to put your base on! Isn't it? We have very affordable models ready to orbit your star!

-Duna class. A real planet! Now you have arrived! Imagine custom terrain and a plush arid atmosphere to make aero braking and parachute descents a breeze. Named best in class by McPlanet.

-Lathe class. Above + Oceans. Coming soon! (Once we sop up the ocean from our last go).

Premium Extras:

Suns. Not as pricey as you might think!

-Single (any size!)

-Simple Binary (bargain at half the price!)

-Binary with Manilo center. (Mmmm)

Edited by Kragrathea
Link to comment
Share on other sites

Naughty Kerbals. You have hijacked our hijacked thread with mundane details. Lets get back to the central issue. What do you want, where do you want it, and (of course) how much of what you want can you actually finance...er afford? I meant afford of course.

Again I present our menu. I should get marketing to gloss it up a bit...Well.. it will do...

What I do not understand is why don't you just tell us what components are needed, you will have to release the source code anyway sooner or later if you decide to release a plugin.

From my own investigations:

The planet is a GameObject with several components added to it.

- CelestialBody

- OrbitDriver

- OrbitRenderer

- PQSCache

- PQS

- PQSMOD_VertexPlanet

- PQSMod_CelestialBodyTransform

After adding all those components and filling almost every field of each class, all I get is a pink square spawned on the launchpad and 3-4 NullReferenceException errors that I narrowed down to the following lines (they are not in order):


PQS sphere = myPlanet.AddComponent<PQS>();

orbitDriver.UpdateOrbit();

sphere.ActivateSphere();

I'm reflecting the Assembly-CSharp.dll file to find the field names, methods and what those do but this is not rocket science nor EULA breaking, it's what visual studio does to provide you InteliSense for the classes of KSP.

I would really appreciate any light you can throw on this as, if you plan to release this, it's just matter of time until I figure out how to do it and if I figure it out sooner, I can help you with the mod should you want to.

PS: This is something I discovered before this thread was created but when I saw it I finally saw light at the end of the tunnel that is my problem.

Unfortunately, astronutkhillips refused to help me repeatly arguing that it might break the EULA (which is pretty just absurd since they put no effort to prevent you from reading their code, the classes are not even obfuscated).

Cleaned code that I'm executing once the flight scene is loaded (I've omited all the field definitions so it fits in a single post but you get the idea):

                

GameObject reference = GameObject.Find("localSpace");

print("AAAAAAAAAAAAAAAAAAAAAAA");

GameObject myPlanet = new GameObject();
myPlanet.name = "Test";

print("AAAAAAAAAAAAAAAAAAAAAAA");

myPlanet.transform.parent = reference.transform;

print("AAAAAAAAAAAAAAAAAAAAAAA");

CelestialBody celestialBody = myPlanet.AddComponent<CelestialBody>();
OrbitDriver orbitDriver = myPlanet.AddComponent<OrbitDriver>();
OrbitRenderer orbitRenderer = myPlanet.AddComponent<OrbitRenderer>();
print("BBBBBBBBBBBBBBBBBBBBBBBB");
PQSCache cache = myPlanet.AddComponent<PQSCache>();
PQS sphere = myPlanet.AddComponent<PQS>();

print("AAAAAAAAAAAAAAAAAAAAAAA");

orbitDriver.referenceBody = reference.transform.GetChild(17).gameObject.GetComponent<CelestialBody>();

celestialBody.bodyName = "Test";
celestialBody.sphereOfInfluence = 1000;

orbitDriver.celestialBody = celestialBody;
orbitDriver.Renderer = orbitRenderer;
orbitDriver.pos = new Vector3d(0, 0, 0);
orbitDriver.drawOrbit = true;

orbitDriver.orbit = new Orbit(0, 10, 10, 10, 10, 10, 10, celestialBody);

orbitRenderer.orbitColor = new Color(255, 0, 0);
orbitRenderer.DrawOrbit(OrbitRenderer.DrawMode.REDRAW_AND_RECALCULATE);

celestialBody.orbitDriver = orbitDriver;
celestialBody.rotates = false;

print("AAAAAAAAAAAAAAAAAAAAAAA");
print("BBBBBBBBBBBBBBBBBBBBBBBB");
celestialBody.pqsController = sphere;
print("BBBBBBBBBBBBBBBBBBBBBBBB");
PQSMod_VertexPlanet vertexP = myPlanet.AddComponent<PQSMod_VertexPlanet>();
print("BBBBBBBBBBBBBBBBBBBBBBBB");

print("AAAAAAAAAAAAAAAAAAAAAAA");

PQSMod_CelestialBodyTransform celTrans = myPlanet.AddComponent<PQSMod_CelestialBodyTransform>();
celTrans.body = celestialBody;

print("AAAAAAAAAAAAAAAAAAAAAAA");

PQSMod_VertexPlanet.SimplexWrapper wrapper = new PQSMod_VertexPlanet.SimplexWrapper(10, 20, 30, 40);

vertexP.continental = wrapper;
vertexP.seed = 279422345;
vertexP.sphere = sphere;
vertexP.terrainType = wrapper;

sphere.transform.parent = myPlanet.transform;
vertexP.transform.parent = sphere.transform;
print("DDDDDDDDDDDDDDDDDDDDDDD");
sphere.ActivateSphere();

print("AAAAAAAAAAAAAAAAAAAAAAA");

myPlanet.SetActive(true);
orbitDriver.UpdateOrbit();
print("AAAAAAAAAAAAAAAAAAAAAAA");

GameObject myPlanetMini = (GameObject)GameObject.Instantiate(myPlanet);
GameObject reference2 = GameObject.Find("scaledspace");
myPlanetMini.transform.parent = reference2.transform;

Edited by aftokinito
Link to comment
Share on other sites

I want some sort of stand alone utility that lets us place our own planets and make heightmaps and textures. But I know that would never happen.

All I actually want is a Rocheworld, but I guess that offends you :P

Link to comment
Share on other sites

Oh, no, a Rocheworld does not offend! Quite the opposite. I love when the ocean sloshes about. hmmm. soothing...

But its clear you meant no offense by your outlandish suggestion. So all is smooth Kerbal. :)

Link to comment
Share on other sites

Labour? Ha! We use vast machines to assemble planets. No unions its true, but even so... every once in a while... one of them goes off on a "bender" as we say. Usually its a management shuttle. But they don't make much of a mess and leave the shuttle largely intact so...

Link to comment
Share on other sites

Naughty Kerbals. You have hijacked our hijacked thread with mundane details. Lets get back to the central issue. What do you want, where do you want it, and (of course) how much of what you want can you actually finance...er afford? I meant afford of course.

Again I present our menu. I should get marketing to gloss it up a bit...Well.. it will do...

I'll take the whole lot. Care to meet at the Restaurant at the End of the Universe? I'm sure I can meet your terms there...

Link to comment
Share on other sites

Ah! Mr. Shifty. Finally someone steps forth to discuss terms! Most excellent! Do you speak for your species? Because you (delightful!) Kerbals will only get one (thats right ONE!) system from Kragrathea. We have projected that is all your species can afford at this point in your evolution. But even so, I think you will find we can put together an affordable system that will please almost everyone (except the rif raf of course. there is no pleasing that lot....)

Lets do lunch?

Link to comment
Share on other sites

He can probably use "public class ProceduralAsteroid : MonoBehaviour"

It does not look like a stub class.

Dammit Jim, I'm a rocket scientist, not a programmer!

Link to comment
Share on other sites

Dammit Jim, I'm a rocket scientist, not a programmer!

It's a class to procedurally generate a bunch of asteroid.

The class itself is not usable without some magic because all the methods are set as private (I suppose that's because the class might no be finished and squad does not want us to use it).

You can however, do a bit of magic and get it working.

@ Kragrathea: Shoot me a PM if you want me to show you the magic of that class

Link to comment
Share on other sites

Now, a Jinx world would be interesting (and I imagine quite doable).. basically the planet is an extreme egg-shape, so long that it's 'poles' lie outside of the planets thick atmosphere, in hard vacuum. Wikipedia link

Launch from the poles, land in the atmosphere! Best of both worlds!

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...