| Back to Index | Page generated: Nov 24, 2025, 1:21:31 AM |
| from Expansion Manager's OXP list | from Expansion Manifest | |
|---|---|---|
| Description | Distant Stars tweaks the appearance of every star individually. Every star has its colour set. | Distant Stars tweaks the appearance of every star individually. Every star has its colour set. |
| Identifier | oolite.oxp.Rustem.DistantStar | oolite.oxp.Rustem.DistantStar |
| Title | Distant Stars | Distant Stars |
| Category | Ambience | Ambience |
| Author | Rustem | Rustem |
| Version | 0.0.7 | 0.0.7 |
| Tags | ||
| Required Oolite Version | ||
| Maximum Oolite Version | ||
| Required Expansions | ||
| Optional Expansions | ||
| Conflict Expansions |
|
|
| Information URL | http://bb.aegidian.org/viewtopic.php?f=4&t=17702 | n/a |
| Download URL | https://wiki.alioth.net/img_auth.php/9/94/Distant_Stars.oxz | http://wiki.alioth.net/img_auth.php/9/94/Distant_Stars.oxz |
| License | CC-BY-NC-SA 4.0 | CC-BY-NC-SA 4.0 |
| File Size | n/a | |
| Upload date | 1610873375 |
Also read http://wiki.alioth.net/index.php/Distant%20Stars
Distant Stars
Based on Wildeblood OXP Distant Suns and Stranger's World.
Based on System Features Sunspots OXP(cim).
Overview - DS
==============
The color of the stars depends on sun radius and the planet radius. Agricultural shifted to K-type star, Industrial closer to A-type stars. A-type star are located far away.
The radius of the sun used by default. The corona shim and hues did change.
Recommended use with OXP - System Features Sunspots 1.5.
License
========
This work is licensed under the Creative Commons Attribution-Noncommercial-Share Alike 4.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/4.0/
Version History
================
Version 0.0.1
- Test release.
Version 0.0.2
- Adjusted the corona flare and correct other parameters. Human inhabitant is not factor now. Correct distance to HZ range. Add sun name.
Version 0.0.3
- Adjusted the color of white stars. Correct distribution, fixed bug calculation. Add corona hues and corona shimmer.
Version 0.0.4
- Aggregateted to one file - planetinfo.plist.
- Added script that did variable corona flare (frequent, dreadful, unpredictable) based on the system description.
Version 0.0.5
- Compatible with The Collector OXP.
Version 0.0.6
- Fixed populator script for the sun features in the oolite v1.84.
Version 0.0.7
- Increased a little more corona flare in the K-type stars.
- Corrected corona flare in the F-type stars from low limit value to more value.
- Reduced distance sun-planet in the K8 stars.
- Fixed sun features script to avoid addition on the saved flare in startup.
- Added small random value to corona flare for all type of stars.
Future version
- Adjusted the color in the F-type stars.
- Turned off debug messages.
Info
=====
Wiki:
* http://wiki.alioth.net/index.php?title=Distant_Stars_OXP
Feedback:
* http://bb.aegidian.org/viewtopic.php?f=4&t=17702
Database
=========
{ //The HZ range for stars calculated from formula: sqrt[L]
case "K8": colour = "class K8 star"; break; //redColor/magentaColor // HZ ~ 0.35 AU // 0.24 - 0.50
case "K2": colour = "class K2 star"; break; //orangeColor // HZ ~ 0.55 AU // 0.37 - 0.77
case "G2": colour = "class G2 star"; break; //yellowColor // HZ ~ 1.10 AU // 0.72 - 1.52
case "F2": colour = "class F2 star"; break; //whiteColor // HZ ~ 2.70 AU // 1.73 - 3.64
case "A7": colour = "class A7 star"; break; //cyanColor // HZ ~ 3.50 AU // 2.29 - 4.81
case "A2": colour = "class A2 star"; break; //blueColor // HZ ~ 4.90 AU // 3.40 - 7.10
}
Link
=====
* http://www.atnf.csiro.au/outreach//education/senior/astrophysics/photometry_colour.html
* http://www.daviddarling.info/encyclopedia/H/habzone.html
* https://en.wikipedia.org/wiki/Circumstellar_habitable_zone
* https://en.wikipedia.org/wiki/Planetary_habitability
* https://en.wikipedia.org/wiki/Stellar_classification
| Path | |
|---|---|
| Scripts/ds_spectroscope.js | "use strict";
this.name = "Spectroscope";
this.author = "Wildeblood & rustem (edit)";
this.copyright = "March 2016";
this.licence = "CC-BY-SA 4.0";
this.version = "0.0.2";
this.description = "Converts values set in planetinfo.plist into descriptive text strings";
/* ====================================================================================
SPECTROSCOPE
Converts values set in planetinfo.plist and found in system.info.sun_color
into descriptive text strings. These are not computed values, so...
Setting sun_color = "1.0 0.0 0.0" in planetinfo.plist returns null, even though
it creates the same colour star in the game as setting sun_color = "redColor".
======================================================================================= */
this.$spectroscope = function(colour)
{
if (!colour) colour = system.info.sun_color;
if (!colour) return false;
switch (colour)
{ //The HZ range for stars calculated from formula: sqrt[L]
case "M0": //colour = "class M0 star"; break; //magentaColor ~ 0.6*Sun // HZ ~ 0.30 AU // 0.19 - 0.40
case "K8": colour = "class K8 star"; break; //redColor // HZ ~ 0.35 AU // 0.24 - 0.50
case "K2": colour = "class K2 star"; break; //orangeColor // HZ ~ 0.55 AU // 0.37 - 0.77
case "G2": colour = "class G2 star"; break; //yellowColor ~ 1.0*Sun // HZ ~ 1.10 AU // 0.72 - 1.52
case "F2": colour = "class F2 star"; break; //whiteColor // HZ ~ 2.70 AU // 1.73 - 3.64
case "A7": colour = "class A7 star"; break; //cyanColor // HZ ~ 3.50 AU // 2.29 - 4.81
case "A2": colour = "class A2 star"; break; //blueColor ~ 1.9*Sun // HZ ~ 4.90 AU // 3.40 - 7.10
default: colour = "";
}
return colour;
}
/* ====================================================================================
EXAMPLE USE - ADD LINE TO SYSTEM DATA SCREEN
======================================================================================= */
this.guiScreenChanged = function()
{
if (guiScreen === "GUI_SCREEN_SYSTEM_DATA")
{
var info = System.infoForSystem(galaxyNumber, player.ship.targetSystem);
if (info.sun_gone_nova) return;
var name = info.name;
var sunName = info.sun_name;
var colour = info.sun_color;
if (colour) var colourText = this.$spectroscope(colour);
if (colourText && sunName) mission.addMessageText("The planet " + name + " orbits the " + colourText + " " + sunName + ".");
else if (colourText) mission.addMessageText("The planet " + name + " orbits a " + colourText + ".");
else if (sunName) mission.addMessageText("The planet " + name + " orbits the " + sunName + ".");
}
}
/* ====================================================================================
THE END
======================================================================================= */
|
| Scripts/systemfeatures-sun.js | this.name = "System Features: DS Corona";
this.author = "rustem";
this.copyright = "March 2016";
this.licence = "CC-BY-SA 4.0";
this.version = "0.4";
this.description = "Populator script for the sun features";
"use strict";
//Based on System_Features_Sunspots
//develop -cim-, edit -rustem-
this.startUp = function() {
this.$overrides = [[],[],[],[],[],[],[],[]];
delete this.startUp;
this.logging = true; // Must be false for release
if(this.logging) log(this.name,'startUp - System Features for DistantStars');
//if did not saved in the system with solar activity and need jump(timer) for reset and recalculate.
this.$overrides[galaxyNumber] = system.ID.toString();
if(this.logging && system.info.description.indexOf("solar activity") > -1) {
if(this.logging) log(this.name,'The startup system with solar activity and need jump for recalculate');
}
}
this._clearFeatures = function() {
//for clearing overrides
//this.setFeatures = false;
this.$overrides = [[],[],[],[],[],[],[],[]]; // not timer memory of the unpredictable solar activity, may be add TODO list.
System.infoForSystem(galaxyNumber, system.ID).corona_flare = null; // for oolite v1.84
//System.infoForSystem(galaxyNumber, system.ID).corona_flare = 0; // for oolite v1.80
if(this.logging) log(this.name,'Reset solar activity');
return;
}
this.systemWillPopulate = function() {
system.setPopulator("system_features_sun",
{
callback: this._addFeatures.bind(this),
priority: 1000
});
}
this._addFeatures = function() {
if (this.$overrides[galaxyNumber].indexOf(system.ID) > -1) {
this.setFeatures = true;
if(this.logging) log(this.name,'The overrides corona flare is: '+system.info.corona_flare); // Not setup of sun features
return;
}
if (!system.sun) {
return;
}
// make the solar flare
this.setFeatures = false;
var addflare = 0;
var rndflare = Math.random()*10;
var muxflare = Math.random()*1;
var corflare = system.info.corona_flare;
if(this.logging) log(this.name,'Default corona flare is: '+corflare); //.toFixed(3)
// for oolite v1.84 - Added small random value to corona flare for all type of stars - 0.5%.
corflare += Math.random()*0.005;
if (system.info.description.indexOf("solar activity") > -1) {
if (system.info.sun_name.indexOf("Star") > -1 ) { // checking a type of star
if (system.info.sun_name.indexOf("A2") > -1 ) {
corflare += Math.random()*0.040;
if(this.logging) log(this.name,'Set A2 corona flare is : '+corflare);
}
if (system.info.sun_name.indexOf("A7") > -1 ) {
corflare += Math.random()*0.025;
if(this.logging) log(this.name,'Set A7 corona flare is : '+corflare);
}
if (system.info.sun_name.indexOf("F2") > -1 ) {
corflare += Math.random()*0.017;
if(this.logging) log(this.name,'Set F2 corona flare is : '+corflare);
}
if (system.info.sun_name.indexOf("G2") > -1 ) {
corflare += Math.random()*0.013;
if(this.logging) log(this.name,'Set G2 corona flare is : '+corflare);
}
if (system.info.sun_name.indexOf("K2") > -1 ) {
corflare += Math.random()*0.011;
if(this.logging) log(this.name,'Set K2 corona flare is : '+corflare);
}
if (system.info.sun_name.indexOf("K8") > -1 ) {
corflare += Math.random()*0.010;
if(this.logging) log(this.name,'Set K8 corona flare is : '+corflare);
}
} else log(this.name,'Error: No correct star name!');
addflare += corflare*0.5;
rndflare *= 1.5;
if (system.info.description.indexOf("frequent solar activity") > -1) { // checking a type of activity
//rndflare += 3;
addflare += 0.025;
if(this.logging) log(this.name,'Add frequent value : '+addflare);
} else if (system.info.description.indexOf("dreadful solar activity") > -1 || system.info.description.indexOf("deadly solar activity") > -1) {
//rndflare *= 1.5;
addflare += 0.15;
if(this.logging) log(this.name,'Add dreadful(ly) value : '+addflare);
} else if (system.info.description.indexOf("unpredictable solar activity") > -1 ) {
//rndflare += 1.5;
rndflare = Math.floor(rndflare-4.5);
if (rndflare < 1) rndflare = 0;
rndflare *= muxflare*0.015;
addflare += rndflare;
if(this.logging) log(this.name,'Add unpredictable value: '+addflare);
}
corflare += addflare;
}
this.setFeatures = true;
System.infoForSystem(galaxyNumber, system.ID).corona_flare = corflare;
if(this.logging) log(this.name,'Finally corona flare is: '+corflare); //.toFixed(3)
/*
//Set to distant star value for oolite v1.80
if (corflare === 0) {
if (system.info.sun_name.indexOf("Star") > -1 ) {
if (system.info.sun_name.indexOf("A2") > -1 ) {
corflare = 0.24 + Math.random()*0.08;
if(this.logging) log(this.name,'Set A2 corona flare is:'+corflare);
}
if (system.info.sun_name.indexOf("A7") > -1 ) {
corflare = 0.12 + Math.random()*0.06;
if(this.logging) log(this.name,'Set A7 corona flare is:'+corflare);
}
if (system.info.sun_name.indexOf("F2") > -1 ) {
corflare = 0.08 + Math.random()*0.06;
if(this.logging) log(this.name,'Set F2 corona flare is:'+corflare);
}
if (system.info.sun_name.indexOf("G2") > -1 ) {
corflare = 0.06 + Math.random()*0.04;
if(this.logging) log(this.name,'Set G2 corona flare is:'+corflare);
}
if (system.info.sun_name.indexOf("K2") > -1 ) {
corflare = 0.05 + Math.random()*0.03;
if(this.logging) log(this.name,'Set K2 corona flare is:'+corflare);
}
if (system.info.sun_name.indexOf("K8") > -1 ) {
corflare = 0.03 + Math.random()*0.03;
if(this.logging) log(this.name,'Set K8 corona flare is:'+corflare);
}
} else if(this.logging) log(this.name,'No star name!');
System.infoForSystem(galaxyNumber, system.ID).corona_flare = corflare;
if(this.logging) log(this.name,'Set to distant star value. Final corona flare is:'+corflare);
}
*/
}
this.shipWillEnterWitchspace = function(cause)
{
this._resetFeatures();
}
this._resetFeatures = function()
{
if (this.setFeatures) this._clearFeatures();
return;
}
|