I've just been editing my planetinfo.plist file give a system that is scourged by dreadful solar flares more nebulae, and then I went to the wiki to look up how the corona parameters work and it occurred to me "Why bother, the sun is usually small because of Farsun, it's only big and obvious tonight because I've taken all my OXPs out while I do this?" And then I thought, "I want the sun to stay big and obvious in this system after I put Farsun back."
So I looked into Farsun for a list of excepted systems I could add one more to, but it contains no such list. The only exception it makes is for the Nova mission. What should I do? I don't want all systems to have giant suns, I don't want all systems to have far suns, I want variety.
this.name = "farsun";
this.author = "Kaks";
this.copyright = "Creative Commons: attribution, non-commercial, sharealike.";
this.description = "micro OXP to increase the distance between suns & planets";
this.version = "1.05";
this.multiple=3;
this.moveSun = function(){
var s=system.sun;
if(!system.isInterstellarSpace && !s.hasGoneNova){
var p=system.mainPlanet;
// Only move the sun if we do have a main planet!
if(p) s.position=s.position.add(s.position.subtract(p.position)).multiply(this.multiple);
}
this.systemDone=true;
}
this.startUp = this.reset = function(){
this.systemDone=false;
}
this.shipWillLaunchFromStation = function(){
if(!this.systemDone) this.moveSun();
}
this.shipWillExitWitchspace = function(){
// Keep the sun close by for the oolite-nova mission.
if(galaxyNumber == 3 && !missionVariables.nova && player.hasEquipment("EQ_GAL_DRIVE") && missionVariables.novacount && missionVariables.novacount > 2) return;
this.moveSun();
}
I would say if you are not happy with farsun, uninstall it
Where did I say, or imply, I was unhappy with it? I consider it absolutely necessary, a "must have" OXP. I am asking the best way to over-ride it for specific, exceptional systems that are plagued by solar flares.
Addendum: Changing it so it took that 3 and used it as the centre of a range 2.5-3.5 might be an improvement. (I don't know how much variability the game ordinarily has anyway.) But that is not what I am asking about.
How do other OXPs that interact with Farsun, e.g. Illegal Goods Tweak, deal with it, if at all?
Last edited by Wildeblood on Thu Jul 07, 2011 7:29 pm, edited 1 time in total.
I am asking the best way to over-ride it for specific, exceptional systems that are plagued by solar flares.
It is obvious in the exception for the nova system. So you can add more systems by JS, that you don't want to be changed by Far sun.
Edit: Sorry, I have seen the edit later than I posted, well at the moment there is not a standard way for the OXP's to avoid OXP clashes. Using a timer may be an idea.
Haven't tested this, wrote it in 2 minutes while at work while futzing with an SSH server that is giving me trouble, but it should work. If not, someone here can tell you where I messed up.
this.multiple=3;
this.excludedSystems = [[],[],[],[],[],[],[],[]];
this.excludedSystems[0] =[Insert G1 systems to be excluded here - i.e 1,5,24,29];
this.excludedSystems[1] =[Insert G2 systems to be excluded here];
this.excludedSystems[2] =[Insert G3 systems to be excluded here];
this.excludedSystems[3] =[Insert G4 systems to be excluded here];
this.excludedSystems[4] =[Insert G5 systems to be excluded here];
this.excludedSystems[5] =[Insert G6 systems to be excluded here];
this.excludedSystems[6] =[Insert G7 systems to be excluded here];
this.excludedSystems[7] =[Insert G8 systems to be excluded here];
this.moveSun = function(){
var s=system.sun;
if(!system.isInterstellarSpace && !s.hasGoneNova && !this.excludedSystems(galaxyNumber).indexOf(system.ID) ==-1{
var p=system.mainPlanet;
// Only move the sun if we do have a main planet!
if(p) s.position=s.position.add(s.position.subtract(p.position)).multiply(this.multiple);
}
this.systemDone=true;
}
How do other OXPs that interact with Farsun, e.g. Illegal Goods Tweak, deal with it, if at all?
I am not aware of other OXPs interacting with Farsun in any way. It is clear, however, that Farsun can and will break OXPs which expect the sun to be positioned in its default position. It's simply one of the few OXPs which potentially can seriously clash with the rest of the bunch. Use at your own risk (which of course applies to all OXPs, just that the risk is a little bigger in the case of Farsun).
How do other OXPs that interact with Farsun, e.g. Illegal Goods Tweak, deal with it, if at all?
As far as Illegal Goods Tweak goes the handlers that spawn the entity close by the sun in one of the special missions fire after the handlers that move the sun in Farsun. And it uses the legacy co-ord system. So admittedly more by accident than design it should work fine.
And it uses the legacy co-ord system. So admittedly more by accident than design it should work fine.
Not by accident, but by intention. There are two handlers: shipWillExitWitchspace and shipExitedWitchspace. Populating a system should be done during the second one. FarSun intentionally uses the first one, so the position is already changed before any of the populating starts.
Populating a system should be done during the second one.
Not as a general rule, because there is another, conflicting rule: Objects that are supposed to already be in the system when the player arrives should be spawned on shipWillExitWitchspace, and objects that "jump in" together with the player should be spawned on shipExitedWitchspace. This is more an issue for objects close to the witchpoint, though (you don't want to see hyperspace exit rings on a constore, or an an assassin that has supposedly been there waiting for you), and not so much for objects orbiting the sun.
Although I have to admit that I prefer shipWillExitWitchspace also for spawning large groups of objects, which would produce a considerable lag if spawned when the player is already spawned as well.