Thargoids and Interstellar Space...too common?

General discussion for players of Oolite.

Moderators: winston, another_commander

User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: Thargoids and Interstellar Space...too common?

Post by Commander McLane »

Switeck wrote:
I'm not worried that OXPs "muck things up" by adding more Thargoids. I will be hacking OXPs to my liking, once I figure out some solid code for detecting if the arrival in interstellar space came from a deliberate misjump FROM interstellar space.
That's fairly easy.

Code: Select all

this.shipWillEnterWitchspace = function()
{
    if(system.isInterstellarSpace)
        this.comingFromInterstellarSpace = true;
}

this.shipWillExitWitchspace = function()
{
    if(system.isInterstellarSpace && this.comingFromInterstellarSpace)
    {
        your code
    }
    delete this.comingFromInterstellarSpace;
}
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Re: Thargoids and Interstellar Space...too common?

Post by Switeck »

Commander McLane,
That would probably work for most cases, but I'm not sure it'd handle scripted misjumps from interstellar space (which I'd still want to work as originally designed)...which no doubt some OXP out there uses. :lol:

Maybe this would catch a (from OXP?) scripted misjump?:

Code: Select all

this.shipWillEnterWitchspace = function()
{
    if(system.isInterstellarSpace && player.ship.scriptedMisjump)
        this.comingFromInterstellarSpace = true;
}

this.shipWillExitWitchspace = function()
{
    if(system.isInterstellarSpace && this.comingFromInterstellarSpace)
    {
        // your code (probably to remove or not add additional ships)
    }
    delete this.comingFromInterstellarSpace;
}
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: Thargoids and Interstellar Space...too common?

Post by Thargoid »

It will catch any repeat misjump, whether induced or random.

But the chances of a random one happening twice in a row are rather small I would say, and so can probably be neglected.
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Re: Thargoids and Interstellar Space...too common?

Post by Switeck »

I'm pretty sure you won't ever have a random misjump hyperspacing out of interstellar space.
However OXP missions might trigger a misjump even from interstellar space and any that do are probably important enough to NOT abort them. (For all I know, this may be purely hypothetical...but it seems little extra effort to be prepared for an OXP that might want to do that.)
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Re: Thargoids and Interstellar Space...too common?

Post by JensAyton »

Switeck wrote:
I'm pretty sure you won't ever have a random misjump hyperspacing out of interstellar space.
As far as I can see, the chance is the same as usual (one in 200).

However, your modification using player.ship.scriptedMisjump would almost work… or rather, would exactly not work. You want !player.ship.scriptedMisjump.
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Re: Thargoids and Interstellar Space...too common?

Post by Kaks »

Like it or not, Commander McLane's version does work for both scripted & unscripted misjumps already! :)

And is shorter! :D
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Re: Thargoids and Interstellar Space...too common?

Post by JensAyton »

Kaks wrote:
Like it or not, Commander McLane's version does work for both scripted & unscripted misjumps already! :)
yes, but the request was for a version that doesn’t work for scripted misjumps.
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Re: Thargoids and Interstellar Space...too common?

Post by Kaks »

Meh, still need to wake up, clearly.

Hmm, where's that black burny liquid thing? I had it here somewhere... :mrgreen:
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Re: Thargoids and Interstellar Space...too common?

Post by Switeck »

Ahruman wrote:
Switeck wrote:
I'm pretty sure you won't ever have a random misjump hyperspacing out of interstellar space.
As far as I can see, the chance is the same as usual (one in 200).

However, your modification using player.ship.scriptedMisjump would almost work… or rather, would exactly not work. You want !player.ship.scriptedMisjump.
Is the chance for random misjumps exposed to possible changes (via an OXP) as a .js file?

Seems the check for player.ship.scriptedMisjump = true should probably be a separate condition, since whether or not to spawn extra (OXP-added) Thargoids or even normally added (by plain Oolite) Thargoids may depend on the particular mission/OXP.
If it's a scripted misjump to join a spacebattle already-in-progress between Galactic Navy and Thargoids at a particularly obscure interstellar space location...triggering the remove-all-Thargoids script probably would be unwanted.
But another scripted misjump from interstellar space to another place in interstellar space may be for the placement of a "hidden base" that even the Thargoids are unaware of...
However if there was no scripted misjump (meaning player deliberate or random misjump) at all, probably avoid adding OXP ships and do the remove-all-Thargoids script.
Post Reply