Page 4 of 4
Re: Stellar Serpents OXP
Posted: Sun Feb 05, 2012 9:07 pm
by SandJ
Eric Walch wrote:Thargoid programmed the appearance so that the serpents always appear in the same area were he was last spotted. On entering the galaxy, the system is chosen randomly, but after that it only moves slowly through the galaxy.
People just should read the readme:
readme wrote:The creatures wanders from system to system using wormholes from other ships transit to witchspace, causing a navigational hazard and generally making a nuisance of themselves......
So once it has been killed, either by me or reported as killed by someone else, the next one should re-appear in the same place as the dead one? That would explain it.
Re: Stellar Serpents OXP
Posted: Sun Feb 05, 2012 9:16 pm
by Eric Walch
SandJ wrote:So once it has been killed, either by me or reported as killed by someone else, the next one should re-appear in the same place as the dead one? That would explain it.
Once it is killed another one should appear at a fully random system. But you wrote:
On each occasion I have been half a galaxy away and the serpent has disappeared long before I could get there.
So you never killed it and it stayed wandering through that area of the galaxy
Re: Stellar Serpents OXP
Posted: Sun Feb 05, 2012 9:22 pm
by SandJ
Eric Walch wrote:But you wrote:
On each occasion I have been half a galaxy away and the serpent has disappeared long before I could get there.
So you never killed it and it stayed wandering through that area of the galaxy
They are being reported as killed by someone else. Then it is "There are no Stellar Serpents at this time" for a while, then "A Stellar Serpent has turned up in Ceuses".
I shall make my way back there and kill another one, and see how many times I can get this to happen...
Re: Stellar Serpents OXP
Posted: Mon Feb 06, 2012 11:39 pm
by SandJ
OK, I've jumped back and forth and kept watching. Eventually someone killed the serpent in Ceuses, then eventually a new one appeared in Quleraat. After my next jump it had moved to Ceuses despite them being about 38 light years apart.
I think what may be happening is the Serpent is indeed appearing in a random system, but when it jumps it always ends up in Ceuses. I just happen to hear about it being there when I dock, which I only do about once in every 6 witchspace jumps.
Keep jumping back and forth ... eventually the Serpent appeared in Ceorge, 10 LY away from Ceuses. 3 witchspace jumps later by me (and I check the Serpent's location ater each jump), "Stellar Serpent moved to the Ceuses system".
New theory, then. In Galaxy 5, when the Stellar Serpent moves, it always moves to Ceuses.
To save anyone else going looking, I suspect this is the relevant code from this.shipWillEnterWitchspace = function() in stellarSerpents_masterScript.js:
Code: Select all
if(this.actionChance < 0.9) // serpent moves system 45% of time
{
missionVariables.stellarSerpents_serpentLife += 1;
var currentSystem = System.infoForSystem(galaxyNumber, missionVariables.stellarSerpents_currentLocation);
this.systemArray = SystemInfo.filteredSystems(this, function(other)
{ return (other.systemID !== currentSystem.systemID) && (currentSystem.distanceToSystem(other) <= 7); } );
this.destinationSystem = Math.floor((Math.random() - 0.0001) * this.systemArray.length);
missionVariables.stellarSerpents_currentLocation = this.systemArray[this.destinationSystem][2];
missionVariables.stellarSerpents_locationName = System.infoForSystem(galaxyNumber, missionVariables.stellarSerpents_currentLocation).name;
mission.setInstructionsKey("stellarSerpents_shortMoved", "stellarSerpents_masterScript.js");
}
Re: Stellar Serpents OXP
Posted: Tue Feb 07, 2012 8:03 am
by cim
SandJ wrote:Code: Select all
missionVariables.stellarSerpents_currentLocation = this.systemArray[this.destinationSystem][2];
This is probably the problem - at least, all the other lines look fine. At a guess, index 2 of the SystemInfo object is the galaxyID, which is constantly 4 in Chart 5, which as Commander McLane noted, is also the system ID of Ceuses.
Try changing it to
Code: Select all
missionVariables.stellarSerpents_currentLocation = this.systemArray[this.destinationSystem].systemID;
and see if that fixes the problem.
Re: Stellar Serpents OXP
Posted: Tue Feb 07, 2012 8:05 am
by Eric Walch
SandJ wrote:I think what may be happening is the Serpent is indeed appearing in a random system, but when it jumps it always ends up in Ceuses. I just happen to hear about it being there when I dock, which I only do about once in every 6 witchspace jumps.
You could be right. At the moment, I don't understand what the line:
Code: Select all
missionVariables.stellarSerpents_currentLocation = this.systemArray[this.destinationSystem][2];
in your quoted code does. I think it should be:
Code: Select all
missionVariables.stellarSerpents_currentLocation = this.systemArray[this.destinationSystem]["systemID"];
It also does not help in understanding the code when 'currentSystem' is a systemInfo object and the similar looking 'this.destinationSystem' is just an integer.
EDIT: Just ninja-ed by cim
The code becomes better readable, I think, by using:
Code: Select all
if(this.actionChance < 0.9) // serpent moves system 45% of time
{
missionVariables.stellarSerpents_serpentLife += 1;
var currentSystem = System.infoForSystem(galaxyNumber, missionVariables.stellarSerpents_currentLocation);
var systemArray = currentSystem.systemsInRange(7);
var destinationSystem = systemArray[Math.floor((Math.random()) * systemArray.length)];
missionVariables.stellarSerpents_currentLocation = destinationSystem.systemID;
missionVariables.stellarSerpents_locationName = destinationSystem.name;
mission.setInstructionsKey("stellarSerpents_shortMoved");
}
Re: Stellar Serpents OXP
Posted: Sun Feb 19, 2012 3:09 pm
by Thargoid
I'll fix it and upload a new version later this week (just back from vacation, too many other things to do at the moment). But it does sound like there's a minor issue in the script there that the posted code would fix.
Editted to add - v1.21 now uploaded with the script tweak.