Sigma88

[1.3.1][Plugin] Sigma Binary

Recommended Posts

KSP 1.3.1 GitHub Releases Follow @Sigma88Mods On Twitter Discord Invite

 

Sigma Binary v1.6.8

 

This mod will let you turn custom and/or stock bodies into binary systems,

without the need to do all the calculations yourself.

This also will allow any user to decide between playing with or without binary systems.

 


6r0ejKf.png
                                                                                                                                                            Double Duna image for illustrative purposes only.

 

 

Required Mods

Supported Mods

Supported by

Links

Latest Release
Download
 
Follow on Twitter
Follow
Discord Invite
Discuss
GBPEURUSD
Donate

 

 

Changelog

v1.6.8

- Updated to Sigma LoadingScreens v0.3.1


v1.6.7

- Updated to KSP 1.3.1 and Kopernicus 1.3.1-2
- Moved LoadingScreens textures to reduce RAM usage
- Added support for localization


v1.6.6

- Updated to Kopernicus 1.3.0-7
- Added Sigma88LoadingScreens plugin
- Fixed science archives
- Improved internal code


v1.6.5

- Fixed log spam on binary system flybys
- Blocked generation of undesired contracts


v1.6.4

- Updated to Kopernicus 1.3.0-4


v1.6.3

- Updated to KSP 1.3.0 and Kopernicus 1.3.0-1


v1.6.2

- Updated to KSP 1.2.2 and Kopernicus 1.2.2-1


v1.6.1

- Fixed Kopernicus compatibility (again)
- Fixed KSP-AVC compatibility


v1.6.0

- Updated to KSP 1.2.1 and Kopernicus 1.2.1-1
- Fixed tracking station bug that made planets go off their orbits
- Fixed science archives so that barycenter bodies are not shown
- Removed compatibility with parameter 'selectable' for barycenters
- Added automatic Kerbin reparenting when needed
- Added compatibility with Kopernicus new feature 'PostSpawnOrbit'
- Added compatibility with parameter 'iconColor' for barycenters
- Added time dependent easter eggs
- Added option to disable easter eggs (only for who hates fun)


v1.5.5

- Updated to KSP 1.1.3 and Kopernicus 1.1.2
- Fixed custom orbit color loading for barycenters


v1.5.4

- Minor bug fix


v1.5.3

- Added some fail-safe measures to the code


v1.5.2

- Fixed science archives


v1.5.1

- Updated to KSP 1.1.2 and Kopernicus 1.0.3
- Fixed a bug with binary systems outside the orbit of Jool


v1.5.0

- Updated to KSP 1.1 and Kopernicus 1.0
- Fixed a bug that sometimes occurred while exiting the Primary SoI


v1.4.9.2

- Fixed an issue with bodies using cbNameLater


v1.4.9.1

- Fixed removal of bodies from the science archives
- Changed mass displayed for the barycenter
- Fixed a bug that prevented some of the options to load correctly


v1.4.9

- Reworked all cfg files
- Removed the need of template.cfg files
- Moved the majority of features into SigmaBinary.dll
- Barycenters now do not show up into the science archives
- Added the option to choose the name of the barycenter
- Added the option to choose the description of the barycenter
- Added the option to choose the orbit color of the barycenter
- Added the option to tidally lock the primary to the secondary
- Added the option to disable the redrawn orbits for secondary bodies


v1.4.0

- Barycenter name now accounts for cbNameLater
- Secondary orbit line is now drawn relative to the barycenter
- template.cfg now deactivates if there are missing bodies
- Fixed calculation of minimum SphereOfInfluence
- Fixed calculations when finalizeOrbit is used
- Moved clean-up of temp values from :FINAL to :FOR[SigmaCleanUp]
- Fixed names of config files to account for linux case sensitivity


v1.3.3

- Added conversion of meanAnomalyAtEpochD (deg) to meanAnomalyAtEpoch (rad)


v1.3.2

- Fixed mass calculation from gravParameter
- Barycenters doesn't generate cache files
- Fix for stars used as Primary bodies


v1.3.1

- Added compatibility with templateless planets
- Added code to remove duplicate values


v1.3.0

- Now Requires KSP 1.0.5
- Now Requires Kopernicus Beta 0.5
- Template.cfg and DunaIke.cfg are now in separate downloads
- Folder structure changed
- Overhauled the code to reflect Kopernicus changes


v1.2.1

- Bug Hotfix


v1.2.0

- Improved definition of template parameters
- Improved calculation of mass for planets
- Improved compatibility with GalacticNeighborhood


v1.1.1

- Improved compatibility with planet packs


v1.1.0

- Now Requires Kopernicus 0.4
- Refined RSS compatibility
- Added compatibility with finalizeOrbits
- Removed useless code from StockFix.cfg
- Fixed tidal lock issue in StockFix.cfg
- Increased barycenters radius to 61m to solve a Tracking Station Bug
- Renamed the folder from "BinaryExpansion" to "Binary"


v1.0.2

- Hotfix updating .version file for KSP-AVC compatibility


v1.0.1

- Hotfix for RSS compatibility


v1.0.0

- First Release (non beta)
- Added compatibility with RSS and other Rescale Mods not 100% compatible yet
- Added an exception for ISRU contracts on barycenters
- Other minor changes to the code


v0.2.4

- removed kopernicus cache file generation for barycenters


v0.2.3

- changed the calculation of sphereOfInfluence for every body in the binary system
- added a check to make sure the SoI of the secondary body never reaches the primary's surface


v0.2.2

- added code to calculate mass from gravParameter if both mass and geeASL are not set
- changed the value of G (universal gravitational constant) from 6.67384e-11 to 6.674e-11


v0.2.1

- Fixed mass calculation from geeASL+radius (for reals this time)


v0.2.0

- Fixed mass calculation from geeASL+radius
- Fixed a bug which didn't allow for the use of more than one template.cfg file
- Added an example for the Kopernicus feature "baryCenter"
- template.cfg was changed, old versions won't work with this release
- removed "baryCenter = true" parameter from barycenters


v0.1.0

- Fixed the calculation of:
    Sphere Of Influence
    Planet rotationPeriod
    Orbital Parameters
- Added "baryCenter = true" parameter to barycenters
- Removed calculation of "flightGlobalIndex" since it's useless


v0.0.4

- First Beta Release

 

 

Info and FAQs

Config Structure

Spoiler

@Kopernicus:BEFORE[SigmaBinary]
{
	@Body[Ike]
	{
		SigmaBinary
		{
			debug = false
			name = x
			primaryLocked = true
			redrawOrbit = true
			Properties
			{
				description = x
			}
			Orbit
			{
				mode = x
				icon = x
				color = r,g,b,a
				iconColor = r,g,b,a
			}
		}
	}
}

 

You only need to add the SigmaBinary {} node to the Secondary Body of your system. All the other settings are optional.

How to install this mod

  1. Download the mod (link found in the "Downloads" section)
  2. If you have an old installation delete the folder "Binary" found in GameData\Sigma\
  3. Install the mod by merging the GameData folder from the archive with the one in your KSP install.

If you want to add this to your mod

  1. Add the node "SigmaBinary" to the secondary body of your binary system.
  2. Put a link to this mod into your thread so people may choose to download this mod if they want binary systems.

 

Other Questions

- Can I move the Sun?
No.

- Will this mod mess up Stock Planets?
No. This mod doesn't add any binary system at all.

- Can I bundle SigmaBinary into my mod?
You are free to (= I encourage you to) make your mod compatible with SigmaBinary, however I would rather if you didn't redistribute my work.

- Is it possible to create ternary systems?
You can create some multiple systems but it's a little harder to set up, feel free to ask for more info in the thread. 

- Is this mod compatible with RSS?
Yes, RSS has had built in SigmaBinary support for a while.


I'll put in here any frequent question I receive.
If you have any question about the mod feel free to post down here or PM me.

 

 

Credits

  • @sarbian for ModuleManager
  • @Thomas P. for Kopernicus
  • @NathanKell for his help with my many questions regarding planets and stuff
  • @cybutek for KSP-AVC
  • @KillAshley for answering questions I had while developing the mod
  • @Thomas P. (again) for taking the time of replying to my questions regarding Kopernicus and C#
  • @nightingale for adding SigmaBinary compatibility to Contract Configurator
  • @Pkmniako for designing the new download button and signature banner
  • @Olympic1 for various contributions
  • @Eleusis La Arwall for providing the assets used in one of the easter eggs

 

 

License

All Rights Reserved

 

Includes the plugin Sigma88LoadingScreens
Source: GitHub
License: All Rights Reserved

Edited by Sigma88
Update to 1.6.8

Share this post


Link to post
Share on other sites

This is exciting. I hope it will include a default config for Duna and Ike?

Share this post


Link to post
Share on other sites

Wow, looks awesome. Can't wait to see where the barycentre for Eve-Gilly is.:sticktongue:

Share this post


Link to post
Share on other sites

WHOO! Binaries!

So, will the template include just the actual template and the insert planet name here or what?

Love the idea for such an amazing mod (this will make binaries so much easier)!

This kinda gives me a question though, how will SOIs work after the installation of this mod?

Share this post


Link to post
Share on other sites
This is exciting. I hope it will include a default config for Duna and Ike?

well of course it does :)

Wow, looks awesome. Can't wait to see where the barycentre for Eve-Gilly is.:sticktongue:

This I haven't tried. Let me know how it turns out :)

WHOO! Binaries!

So, will the template include just the actual template and the insert planet name here or what?

More or less yes, feel free to read through the cfg if you are interested

Love the idea for such an amazing mod (this will make binaries so much easier)!

This kinda gives me a question though, how will SOIs work after the installation of this mod?

SOIs will be calculated by KSP as it always does. this means that stuff orbiting the barycenter (before entering the bodies SOIs) will have slower orbits than what you would expect. Sadly this is a limitation I wans't able to overcome.

I have to say tho that it doesn't ruin the experience at all.

this issue was solved :D

Edited by Sigma88

Share this post


Link to post
Share on other sites

I have a question, are the stock binary orbits required, or can you delete them without harm?

(I don't really need the Stock planets to be under the binary influence, just some of the planets that I create)

Share this post


Link to post
Share on other sites
I have a question, are the stock binary orbits required, or can you delete them without harm?

(I don't really need the Stock planets to be under the binary influence, just some of the planets that I create)

The stock fix doesn't add barycenters to stock planets.

it's there because in a normal kopernicus install the values of mass and orbit are not loaded into @kopernicus

But my mod needs that information to work with stock planets.

bottom line, you can delete the file. But you shouldn't need to :)

Share this post


Link to post
Share on other sites

Where do I place the templates?

- - - Updated - - -

Edit: never mind, I found where it's supposed to go (read the configs again).

Share this post


Link to post
Share on other sites

Be careful that the EXAMPLE_DunaIke.cfg will turn Duna and Ike into a binary system.

If you just want to add the binary feature to your system, use the file template.cfg (that's all you need)

and you can put it anywhere inside GameData. I guess you have a personal folder in there. That will be ok.

Share this post


Link to post
Share on other sites

Yeah, there are issues with the Duna-Ike barycenter.

I get ejected from the system when I reach 1500km above Duna and I can't even reach Ike.

Share this post


Link to post
Share on other sites
Yeah, there are issues with the Duna-Ike barycenter.

I get ejected from the system when I reach 1500km above Duna and I can't even reach Ike.

I'll take a look, there may be still some issue to iron out :)

Share this post


Link to post
Share on other sites

I think I've found the problem, should be fixed in the next release

Share this post


Link to post
Share on other sites

yup, already tried :)

the mun is too light

you can set an higher mass for the mun tho ;)


@Kopernicus:AFTER[Kopernicus]
{
@Body[Mun]
{
@Properties
{
mass = something_appropriate
}
}
}

PS: KSP-AVC compatibility added to the mod

Edited by Sigma88

Share this post


Link to post
Share on other sites

A little Update on things:

I've managed to solve 2 problems with one simple change:

Yeah, there are issues with the Duna-Ike barycenter.

I get ejected from the system when I reach 1500km above Duna and I can't even reach Ike.

In the next release crafts should cross SoI safely

stuff orbiting the barycenter (before entering the bodies SOIs) will have slower orbits than what you would expect. Sadly this is a limitation I wans't able to overcome.

I've managed to find a solution to this problem as well. If everything works as I intend it to.

Your craft should skip the barycenter SoI and enter directly into the Primary body's SoI.

This way all orbits will be in perfect KSP Style.

Sadly, this is still a theory since I need a feature which is not implemented yet in kopernicus.

As soon as kopernicus adds this feature I'll test my theory and release the result.

Share this post


Link to post
Share on other sites

Good News

You can set the SOI with sphereOfInfluence = value in the Properties { } node. However, the setting is not persistent at the moment. It will come with 0.2.

List of Fixes coming in the next release of SigmaBinary:


- No more MM errors (currently the calculation of flightglobalindex for barycenters sometimes gives MM error)
- Better calculation of SoIs
- Probes will cross directly from the external SoI to the planet's SoI, never entering the Barycenter SoI
- Probes will be able to cross SoIs without problems
- put a limit on how big the moon's SoI can get
(will not reach the surface of the planet by default, users will be able to change that tho)
- Orbit calculation fix: if the chosen moon is on an inclined orbit, the final system will be on that same plane
- coding fix: fixed some errors in the code (missing @s, #s and stuff like that)
- fixed the calculations for the rotationPeriod in case the original planet was tidally locked

Bugs to iron out:

- rotation of planets rotating around a barycenter gets messed up (even tho the rotationPeriod is set correctly)

Edited by Sigma88

Share this post


Link to post
Share on other sites

I got a ModuleManager error related to the template. Everything looked fine when I loaded a game, so no worries. Also, the barycenter for the Duna-Ike template is near where the Kerbin-Mun one would be. One last thing, I'm pretty sure making Duna and Ike tidally locked to each other kills the libration, but that's what I expected. Anyway, great mod!

Share this post


Link to post
Share on other sites
I got a ModuleManager error related to the template. Everything looked fine when I loaded a game, so no worries.

You are right, I forgot to mention that.

It's because there's a line of code that tries to set the flightglobalindex of the barycenter to equal "flightglobalidex of the planet minus 1" but since stock bodies don't have a flightglobalindex value, MM will give an error. this is solved as well in the next release (I've added this to my previous post)

Also, the barycenter for the Duna-Ike template is near where the Kerbin-Mun one would be.

the position of the barycenter is calculated using the masses of the two bodies and their distance, I too was surprised to see that the barycenter is inside duna. But I checked and re-checked the math, and everything turns out to be correct.

One last thing, I'm pretty sure making Duna and Ike tidally locked to each other kills the libration, but that's what I expected. Anyway, great mod!

yes, that will avoid the problem. But I want to find a solution that preserves the original rotation period of the planet.

happy to hear you like the mod. It's still very buggy right now, but the next release will be a great improvement.

I hope we don't have to wait too much for kopernicus 0.2, since every fix will work only in that version

Share this post


Link to post
Share on other sites
You don't need to set a flightGlobalsIndex anymore. Kopernicus creates / overwrites them after the PSystemManager spawned the edited prefab, so it's nonsensical to define them. ;) This has been implemented in 0.0.6, if I remember correctly

when making the barycenter for my pluron-khato binary I noticed that the hyperedit "button" for selecting the barycenter was listed just after Jool

since I use Jool as a template I assumed that there was something telling KSP the barycenter should be listed after jool

I tried adding a flightglobalindex to the barycenter and that solved the "problem"

I'll send you some pics as soon as I get my hands on my ksp pc

Share this post


Link to post
Share on other sites

This is so ....in' awesome Sigma! Will use it in my future KerbalLightVisuakEnhancements, which will add clouds, a few new planets, hight-res textures for all of the stock planets, new textures for stock parts, new parts, telescopes, making Kerbol's color white from orbit, Planet Shyne and Distant Object Enhancement, all using a single plugin: Kopernicus. Cheers! So far I only have completed stock clouds, a dwarf planet near Dres, and hight res textures for stock planets. With SigmaBarycenters I will also be able to make the solar system a little more realistic. Cheers!

Oh, and one question: would it be possible to aply barycenters for planets with more then one moons?

Share this post


Link to post
Share on other sites
Oh, and one question: would it be possible to aply barycenters for planets with more then one moons?

Glad you like it!

For the barycenters on planets with multiple moons, It depends on what you have in mind.

If we are talking Pluto and it's 5 moons (or something similar) I think it should work more than fine.

Oh, and btw....


Sigma Binary[v0.1] is now available

Download

[Dropbox] (Kerbal Stuff link coming soon)

ChangeLog

[TABLE=width: 700]

[TR]

[TD]


[B]v0.1.0[/B]
- Fixed the calculation of:
Sphere Of Influence
Planet rotationPeriod
Orbital Parameters
- Added "[I]baryCenter = true[/I]" parameter to barycenters
- Removed calculation of "[I]flightGlobalIndex[/I]" since it's useless

[/TD]

[/TR]

[/TABLE]

Share this post


Link to post
Share on other sites
Is the Duna-Ike example supposed to be a cfg file? For me it's a text document since 0.1.0.

whoops, pardon.

Fixed it

(anyway the example is not really necessary. It's just there to make it clear how the template.cfg should be used)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now