Jump to content

[0.23] Alternis Kerbol - Release thread - [v0.1, Jan. 3] (development halted)


NovaSilisko

Recommended Posts

I have almost completed a version of the science logs for Alternis, throwing in Planetfactory logs as an optional bonus. I will upload it as soon as I have the chance.

Link to comment
Share on other sites

  • 2 weeks later...

Long time no news huh? Just curious whether these types of addons will be compatible with the new ARM patch...

that actually depends on how the asteroids are generated....I guess it should work as they are "randomised"...

Link to comment
Share on other sites

Hey Nova, just wanted to say that you did a great Job with this mod.

But actually I dont feel like I am already done with the Vanilla System but I do like the new, more yellow-orange-ish, lighting effect.

Is it possible to seperate this from the rest of the mod?

Sorry if this has already been asked before. :)

Link to comment
Share on other sites

Hey Nova, just wanted to say that you did a great Job with this mod.

But actually I dont feel like I am already done with the Vanilla System but I do like the new, more yellow-orange-ish, lighting effect.

Is it possible to seperate this from the rest of the mod?

Sorry if this has already been asked before. :)

Here's a plugin I wrote when Nova was developing the mod:

https://dl.dropboxusercontent.com/u/56154768/Mods/SunChangeThing.zip?dl=1

Source:

(ignore the extra stuff I was too lazy to remove)

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Xml.Serialization;
using UnityEngine;
using System.Reflection;
using Object = UnityEngine.Object;

namespace UniverseBreaker
{

[KSPAddonFixed(KSPAddon.Startup.MainMenu, true, typeof(UniverseBreaker))]
public class UniverseBreaker : MonoBehaviour
{
//public Texture2D newminmusColor;
//public Texture2D newminmusHeight;
// string path = "/UniverseBreaker/Tetxures/";

/* void Awake()
{
if (HighLogic.LoadedScene == GameScenes.MAINMENU)
{
newminmusHeight = GameDatabase.Instance.GetTexture(path + "newminmusHeight", false);
if (newminmusHeight != null)
print("texture loaded");

newminmusColor = GameDatabase.Instance.GetTexture(path + "newminmusCol", false);
if (newminmusColor != null)
print("texture loaded");
}
}*/

/* double GetNewPeriod(CelestialBody body)
{
return 2 * Math.PI * Math.Sqrt(Math.Pow(body.orbit.semiMajorAxis, 2) / 6.674E-11 * body.orbit.semiMajorAxis / (body.Mass + body.referenceBody.Mass));
}

double GetNewSOI(CelestialBody body)
{
return body.orbit.semiMajorAxis * Math.Pow(body.Mass / body.orbit.referenceBody.Mass, 0.4);
}

double GetNewHillSphere(CelestialBody body)
{
return body.orbit.semiMajorAxis * (1.0 - body.orbit.eccentricity) * Math.Pow(body.Mass / body.orbit.referenceBody.Mass, 1 / 3);
}*/

void Start()
{
ConfigNode UBSettings = null;
foreach (ConfigNode node in GameDatabase.Instance.GetConfigNodes("UBSETTINGS"))
UBSettings = node;

if (UBSettings == null)
throw new UnityException("*UB* UBSETTINGS node not found!");

//print("DumpingInfo");
//foreach (CelestialBody c in Resources.FindObjectsOfTypeAll(typeof(CelestialBody)))
// Utils.DumpBody(c);

print("*UB*Loading Config");

foreach (ConfigNode node in UBSettings.nodes)
{
foreach (DynamicAmbientLight light in Resources.FindObjectsOfTypeAll(typeof(DynamicAmbientLight)))
{
if (light.name.Equals(node.name))
{
if (node.HasValue("defaultAmbientColor"))
{
Vector4 col = KSPUtil.ParseVector4(node.GetValue("defaultAmbientColor"));
light.defaultAmbientColor = new Color(col.x, col.y, col.z, col.w);
}

if (node.HasValue("vacuumAmbientColor"))
{
Vector3 col = KSPUtil.ParseVector3(node.GetValue("vacuumAmbientColor"));
light.vacuumAmbientColor = new Color(col.x, col.y, col.z);
}
}
}
foreach (Sun sun in Resources.FindObjectsOfTypeAll(typeof(Sun)))
{
if (sun.name.Equals(node.name))
{
if (node.HasValue("lightColor"))
{
Vector3 col = KSPUtil.ParseVector3(node.GetValue("lightColor"));
sun.light.color = new Color(col.x, col.y, col.z);
}

if (node.HasValue("flarecolor"))
{
Vector3 col = KSPUtil.ParseVector3(node.GetValue("flarecolor"));
sun.sunFlare.color = new Color(col.x, col.y, col.z);
}
}
}
print("*UB*Done Loading. HOLD ON TO YOUR ASSES!");
}

/* foreach (CelestialBody body in FlightGlobals.fetch.bodies)
{
if (body.bodyName.Equals("Minmus"))
{
body.Radius = 8300;
body.orbit.semiMajorAxis = 33400000;
body.orbit.inclination = 0.02;
body.orbitDriver.orbitColor = XKCDColors.CloudyBlue;
body.pqsController.radius = body.Radius;
var localGameObject = body.transform;

var vhm = localGameObject.GetComponentInChildren<PQSMod_VertexHeightMap>();

if (vhm != null)
{
if (newminmusHeight != null)
{
vhm.heightMap.CreateMap(MapSO.MapDepth.Greyscale, newminmusHeight);
vhm.heightMapDeformity = 2700;
vhm.sphere.RebuildSphere();
vhm.RebuildSphere();
}

}

var vcm = localGameObject.GetComponentInChildren<PQSMod_VertexColorMap>();

if (vcm != null)
{
if (newminmusColor != null)
{
print("Is this working?");
vcm.vertexColorMap.CreateMap(MapSO.MapDepth.RGB, newminmusColor);
vcm.sphere.RebuildSphere();
vcm.RebuildSphere();
}
}
//Line for cleanliness
}
body.CBUpdate();
}*/
}
}
}


public class Utils : MonoBehaviour
{
public static void DumpSunInfo(Sun DSO)
{
print("SunStuff:" + DSO.light);
print("SunStuff:" + DSO.sunFlare);
print("SunStuff:" + DSO.AU);
print("SunStuff:" + DSO.gameObject);
}
public static void DumpDAL(DynamicAmbientLight dal)
{
print("DAL Body:" + dal.gameObject);
print("DALcolor:" + dal.defaultAmbientColor);
print("DALenabled:" + dal.disableDynamicAmbient);
print("DALVacuum:" + dal.vacuumAmbientColor);
print("DALlight:" + dal.name);
}
public static void DumpSSF(ScaledSpaceFader ssf)
{
print("SSF BODY NAME: " + ssf.celestialBody.name);
print("floatName = " + ssf.floatName);
print("fadeStart = " + ssf.fadeStart);
print("fadeEnd = " + ssf.fadeEnd);
}
public static void DumpBody(CelestialBody body)
{
print("BODY NAME: " + body.name);
print("altitudeMultiplier = " + body.altitudeMultiplier);
print("altitudeOffset = " + body.altitudeOffset);
print("angularV = " + body.angularV);
print("angularVelocity = " + body.angularVelocity);
print("atmoshpereTemperatureMultiplier = " + body.atmoshpereTemperatureMultiplier);
print("atmosphere = " + body.atmosphere);
print("atmosphereContainsOxygen = " + body.atmosphereContainsOxygen);
print("atmosphereMultiplier = " + body.atmosphereMultiplier);
print("atmosphereScaleHeight = " + body.atmosphereScaleHeight);
print("*Pressure curve:");
dumpKeys(body.pressureCurve);
print("*Temperature curve:");
dumpKeys(body.temperatureCurve);

print("bodyDescription = " + body.bodyDescription);
print("bodyName = " + body.bodyName);

print("directRotAngle = " + body.directRotAngle);
print("GeeASL = " + body.GeeASL);
print("gMagnitudeAtCenter = " + body.gMagnitudeAtCenter);
print("gravParameter = " + body.gravParameter);
print("hillSphere = " + body.hillSphere);
print("initialRotation = " + body.initialRotation);
print("inverseRotation = " + body.inverseRotation);
print("inverseRotThresholdAltitude = " + body.inverseRotThresholdAltitude);
print("Mass = " + body.Mass);
print("maxAtmosphereAltitude = " + body.maxAtmosphereAltitude);
print("ocean = " + body.ocean);




print("pressureMultiplier = " + body.pressureMultiplier);
print("Radius = " + body.Radius);
print("rotates = " + body.rotates);
print("rotation = " + body.rotation);
print("rotationAngle = " + body.rotationAngle);
print("rotationPeriod = " + body.rotationPeriod);

print("sphereOfInfluence = " + body.sphereOfInfluence);
print("staticPressureASL = " + body.staticPressureASL);


print("tidallyLocked = " + body.tidallyLocked);

print("use_The_InName = " + body.use_The_InName);
print("useLegacyAtmosphere = " + body.useLegacyAtmosphere);
print("zUpAngularVelocity = " + body.zUpAngularVelocity);
print("pqsController = " + body.pqsController);
print("terrainController = " + body.terrainController);
/*if (body.terrainController != null)
{
print("PQSController: ");
print("circ = " + body.terrainController.circ);
print("horizonAngle = " + body.terrainController.horizonAngle);
print("horizonDistance = " + body.terrainController.horizonDistance);
print("parameterScaleFactor = " + body.terrainController.parameterScaleFactor);
print("quadSize = " + body.terrainController.quadSize);
print("radius = " + body.terrainController.radius);
print("sphereColliderRadiusOffset = " + body.terrainController.sphereColliderRadiusOffset);
print("visibleRadius = " + body.terrainController.visibleRadius);
print("waterLevel = " + body.terrainController.waterLevel);
print("waterThreshold = " + body.terrainController.waterThreshold);
}*/
/*if (body.pqsController != null)
{
DumpPQS(body.pqsController);
}*/
}
public static void DumpPQS(PQS pqs)
{
// bool
print("PQS " + pqs.name);
print("buildTangents = " + pqs.buildTangents);
print("isActive = " + pqs.isActive);
print("isAlive = " + pqs.isAlive);
print("isBuildingMaps = " + pqs.isBuildingMaps);
print("isDisabled = " + pqs.isDisabled);
print("isStarted = " + pqs.isStarted);
print("isSubdivisionEnabled = " + pqs.isSubdivisionEnabled);
print("isThinking = " + pqs.isThinking);
print("quadAllowBuild = " + pqs.quadAllowBuild);
print("surfaceRelativeQuads = " + pqs.surfaceRelativeQuads);
print("useSharedMaterial = " + pqs.useSharedMaterial);
print("circumference = " + pqs.circumference);
// double
print("collapseAltitudeMax = " + pqs.collapseAltitudeMax);
print("collapseAltitudeValue = " + pqs.collapseAltitudeValue);
print("collapseDelta = " + pqs.collapseDelta);
print("collapseSeaLevelValue = " + pqs.collapseSeaLevelValue);
print("collapseThreshold = " + pqs.collapseThreshold);
print("detailAltitudeMax = " + pqs.detailAltitudeMax);
print("detailAltitudeQuads = " + pqs.detailAltitudeQuads);
print("detailDelta = " + pqs.detailDelta);
print("detailRad = " + pqs.detailRad);
print("detailSeaLevelQuads = " + pqs.detailSeaLevelQuads);
print("horizonAngle = " + pqs.horizonAngle);
print("horizonDistance = " + pqs.horizonDistance);
print("mapMaxHeight = " + pqs.mapMaxHeight);
print("mapOceanHeight = " + pqs.mapOceanHeight);
print("maxDetailDistance = " + pqs.maxDetailDistance);
print("minDetailDistance = " + pqs.minDetailDistance);
print("radius = " + pqs.radius);
print("radiusDelta = " + pqs.radiusDelta);
print("radiusMax = " + pqs.radiusMax);
print("radiusMin = " + pqs.radiusMin);
print("radiusSquared = " + pqs.radiusSquared);
print("subdivisionThreshold = " + pqs.subdivisionThreshold);
print("sx = " + pqs.sx);
print("sy = " + pqs.sy);
print("targetHeight = " + pqs.targetHeight);
print("targetSpeed = " + pqs.targetSpeed);
print("visibleAltitude = " + pqs.visibleAltitude);
print("visibleRadius = " + pqs.visibleRadius);
print("visRad = " + pqs.visRad);
print("visRadAltitudeMax = " + pqs.visRadAltitudeMax);
print("visRadAltitudeValue = " + pqs.visRadAltitudeValue);
print("visRadDelta = " + pqs.visRadDelta);
print("visRadSeaLevelValue = " + pqs.visRadSeaLevelValue);
print("parentSphere = " + pqs.parentSphere);
print("****************************************");
}

public static void DumpCBT(PQSMod_CelestialBodyTransform c)
{
print("PQSM_CBT " + c.name + "(" + c.body.name + ")");
print("deactivateAltitude = " + c.deactivateAltitude);
print("planetFade.fadeStart = " + c.planetFade.fadeStart);
print("planetFade.fadeEnd = " + c.planetFade.fadeEnd);
print("planetFade.valueStart = " + c.planetFade.valueStart);
print("planetFade.valueEnd = " + c.planetFade.valueEnd);
int i = 0;
if (c.secondaryFades != null)
{
foreach (PQSMod_CelestialBodyTransform.AltitudeFade af in c.secondaryFades)
{
print("Secondary" + i + ".fadeStart = " + af.fadeStart);
print("Secondary" + i + ".fadeEnd = " + af.fadeEnd);
i++;
}
}
}



public static void DumpSST(Transform t)
{
print("Transform = " + t.name);
print("Scale = " + t.localScale.x + ", " + t.localScale.y + ", " + t.localScale.z);
print("Pos = " + t.position + "; lPos = " + t.localPosition);
}

public static void dumpKeys(AnimationCurve c)
{
if (c == null)
print("NULL");
else if (c.keys.Length == 0)
print("NO KEYS");
else
for (int i = 0; i < c.keys.Length; i++)
print("key," + i + " = " + c.keys[i].time + " " + c.keys[i].value + " " + c.keys[i].inTangent + " " + c.keys[i].outTangent);

}
}

/// <summary>
/// KSPAddon with equality checking using an additional type parameter. Fixes the issue where AddonLoader prevents multiple start-once addons with the same start scene.
/// By Majiir
/// </summary>
public class KSPAddonFixed : KSPAddon, IEquatable<KSPAddonFixed>
{
private readonly Type type;

public KSPAddonFixed(KSPAddon.Startup startup, bool once, Type type)
: base(startup, once)
{
this.type = type;
}

public override bool Equals(object obj)
{
if (obj.GetType() != this.GetType()) { return false; }
return Equals((KSPAddonFixed)obj);
}

public bool Equals(KSPAddonFixed other)
{
if (this.once != other.once) { return false; }
if (this.startup != other.startup) { return false; }
if (this.type != other.type) { return false; }
return true;
}

public override int GetHashCode()
{
return this.startup.GetHashCode() ^ this.once.GetHashCode() ^ this.type.GetHashCode();
}
}

screenshot204.png

I used NathanKell's RSS source for reference so license is CC-BY-SA. I haven't run the plugin on 0.23.5 so let me know how it works.

Link to comment
Share on other sites

Long time no news huh? Just curious whether these types of addons will be compatible with the new ARM patch...

that actually depends on how the asteroids are generated....I guess it should work as they are "randomised"...

Having exhausted most of the original Kerbol, this mod looks very cool and exciting. I am curious to know how if it works, as well as what other mods might be affected.

Link to comment
Share on other sites

Here's a plugin I wrote when Nova was developing the mod:

I used NathanKell's RSS source for reference so license is CC-BY-SA. I haven't run the plugin on 0.23.5 so let me know how it works.

It went as expected... Swimmingly, that is.

Link to comment
Share on other sites

[...] I am curious to know how if it works, as well as what other mods might be affected.

I can confirm that it does work. Pretty well actually. And they spawn around the jool(ean?) system pretty well...interact with other planets and stuff :D

Link to comment
Share on other sites

I can confirm that it does work. Pretty well actually. And they spawn around the jool(ean?) system pretty well...interact with other planets and stuff :D

Cool. Will this work with mods that add science parts? Will the science amounts scale?

Link to comment
Share on other sites

Cool. Will this work with mods that add science parts? Will the science amounts scale?

No clue. Only tested sandbox so far...

Just try it.

BTW: Just captured an asteroid and brought it back to Kerbin orbit at 250.000m altitude :D

Link to comment
Share on other sites

Guys, there's this thing going on where when I get an encounter with Laythe, everything goes good until I enter Laythe's SOI then the game glitches to the point that the current speed on the navball gets frozen and trying to land just crashes the game. Help?

Link to comment
Share on other sites

Guys, there's this thing going on where when I get an encounter with Laythe, everything goes good until I enter Laythe's SOI then the game glitches to the point that the current speed on the navball gets frozen and trying to land just crashes the game. Help?

I see this too. It may be a more general bug; see this thread, which has pictures of returning to Kerbin that look much like I see in landing on Laythe with Alternis.

Link to comment
Share on other sites

  • 2 weeks later...

The last few bug reports seem to actually be a problem with the terrain changes to Laythe. The console gets spammed about NullReferenceExceptions about its PQS from the second you enter its SOI.

Output logs:

Mods: lots, including FAR

It would be nice if someone with a bit of coding experience could try to fix this, as I lack the skills to do it.

Edited by Fuminor
Log deleted long ago, probably not even useful anymore
Link to comment
Share on other sites

Good luck with this! I tried myself at trying to find what was wrong, but didn't find anything. Simply recompiling the mod didn't change anything. The way the terrain is changed by itself must be broken.

Alternis works to an extent, but has many bugs that were there prviosly and new ones galore.

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...

@Korb Biakustra I am still working on it at a slow pace because of IRL, but now with summer here I should be able to get some work done. I am still debating on something important in the code.

@Nicholander It still works in 0.23.5, but has some bugs. It is still playable, if you don't mind the occasional buggines.

Link to comment
Share on other sites

Alright so I'm posting with good and bad news. The good news is that I did some work on the code and fixed quite a few issues.

The bad news is that a lot of the bigger issues are still prevalent and I honestly have no idea how to fix them.

Some of the updates:

Had to take away Laythe's new terrain, reverted it to stock and it works fine now

Found out how to minimize the Spawn in Space bug (go down to see an explanation)

Fixed Vall, but also had to revert it to its stock proportions due to a major terrain issue that would freeze ships

Tried and failed at fixing Bop moonlet far terrain bug

Tried and failed at fixing comet tails

Found a new bug where Tylo, Gilly and Ike all orbit Kerbol WAY to fast (pending a fix, will update soon)

Ike is using the stock terrain bug so therefore from a far orbit and from the map it will appear as stock Ike but in reality it's a spiky hell hole

Duna, Dres, and Tylo all seem to have a bugged to hell sphere of influence (tried and failed at fixing) that sends (hypereddited at least) probes on an interstellar adventure, same bug also seemed to occur with Vall's bugged sphere of influence but the fix with vall doesn't work with Duna, Dres, and Tylo.

Probably many more issues.

Honestly at this point a complete rewrite is looking 10x more appetizing. I would suggest trying it with Planet Factory seeing as how the existing code is a mess and Nova (he even comments it himself) didn't know what any of it did.

Oh and the Spawn in Space bug is caused more than half the time by the Mechjeb AR202 case part, no idea why. If you need to use Mechjeb go to the Kerbin Shuttle Orbiter page and download theirs as it works fine (from my testing anyway)

Also here's the updated source, though I still highly advise rewriting the code in a more stable way.

http://www./download/k6fv2rgy515g46j/AlternisSomeWhatFixedBuildsWithSource.7z

All credit goes to Nova except for my fixes. No original Alternis assets are packaged (height maps, color maps, etc) all that comes with that is my Visual Studio source (which is a mess) and the updated builds each named in accordance with what they did.

"ClassLibrary3" is the latest with all the working fixes. I'll keep trying to get more done but I figured I would post this here in hopes that the community could be of some help.

If I need a license I'm using the GNU

Source is (as stated) included in the download.

EDIT:

At the time of posting this I have found more issues and have also fixed a couple

I fixed Tylo's gravity BUT

Duna and Dres now have seemingly non-existant sphere of influences and despite my using the same method to fix tylo I can't find anyway to fix Duna and Dres.

More updates: Tylo's atmosphere does not appear BUT it DOES function properly. Tylo also has an issue where the real, modified, version of Tylo fades into existance. This makes me worried that Duna may be behaving the same way.

Vall (even after trying my fix) does not want to revert to stock heightmaps quality. [FIXED]

Jool has magically turned green again. [FIXED] (sort of)

I beg that someone who knows more about this than I do takes this off my hands, all I'm doing here is copy and pasting code from other parts of the mod that may be able to fix it. yes, it has worked so far but it's only a matter of time before I do something or a huge bug comes up that I won't be able to fix.

Download link with release has stayed the same.

I also cleaned up my coding

EDIT 2: Somehow I magically managed to fix all of the issues I was having. Duna, Dres, and Tylo all work fine. All that needs work now is to adjust the orbital period of each of the sun orbiting bodies then all known bugs (be me anyway) will have been fixed. Which is scary.

Edited by StormWolf
updated info
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...