Unusual planet jump failure

For test results, bug reports, announcements of new builds etc.

Moderators: another_commander, winston, Getafix

Post Reply
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Re: Unusual planet jump failure

Post by Thargoid »

Rather than this.ship.energy = this.ship.maxEnergy; , personally I'd use this.ship.energy += amount; as that way it's making the thing immune to q/e bombs rather than having them fully recharge the ship. The latter action is a little odd, although still within the realms of handwavium.
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: Unusual planet jump failure

Post by Commander McLane »

Thargoid wrote:
Rather than this.ship.energy = this.ship.maxEnergy; , personally I'd use this.ship.energy += amount; as that way it's making the thing immune to q/e bombs rather than having them fully recharge the ship. The latter action is a little odd, although still within the realms of handwavium.
You're right, but I ran into a problem when I just tried it.

It works fine with an energy bomb. But with a q-bomb, which constantly subtracts amount, Oolite froze with the following error:

Code: Select all

10:51:43.765 [universe.addEntity.failed]: ***** Universe cannot addEntity:<OOQuiriumCascadeEntity 0x118bf0350>{0.000000 seconds passed of 20.000000} -- Universe is full (2047 entities out of 2048)
After that, latest.log contains 396MB(!) of entity dumps, until I finally killed the application. That must be my longest log ever! :shock:

This hasn't happened with my cruder solution.

EDIT: Now it always freezes with a q-bomb. The only difference to my previous test (where it didn't freeze) is that I installed the latest nightly (4514) this morning. Previously I tested with 4484, where no freezes happened with this.ship.energy = this.ship.maxEnergy;. What has changed in trunk that would cause this freeze?
Last edited by Commander McLane on Wed Apr 13, 2011 9:10 am, edited 1 time in total.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Re: Unusual planet jump failure

Post by Thargoid »

Fair enuff, although that latter one sounds like another aspect or offshoot of a bug in itself.

And I love the idea that the universe is full - we cannot squeeze anything else in so go away ;)
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: Unusual planet jump failure

Post by Kaks »

This all sounds pretty good, I'm very curious to see the results of all this thinking! :D


One thing puzzles me ever so slightly, though: I noticed no-one mentioned that in 1.75.x you can override the escape capsule behaviour:

Code: Select all

this.shipLaunchedEscapePod = function()
{
     player.setEscapePodDestination("NEARBY_SYSTEM");
}
Every time the player launches their escape pod, they'll find themselves in the main station of a nearby system, which also avoids death in hyperspace...


If you're feeling vaguely evil/realistic, you could complicate things a bit, like by adding a small chance of life support malfunction to every escape pod launch...

Code: Select all

this.shipLaunchedEscapePod = function()
{
     if (Math.random() < .05) player.setEscapePodDestination(null); // die 5% of the time...
     else if (system.isInterstellarSpace) player.setEscapePodDestination("NEARBY_SYSTEM");
}
As well as adding a 5% malfunction chance, this script will move the pod to a nearby system only if the player launched it in hyperspace...
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16063
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Unusual planet jump failure

Post by Cody »

Kaks... does that mean that npcs could eject in interstellar space?
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
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: Unusual planet jump failure

Post by Commander McLane »

El Viejo wrote:
Kaks... does that mean that npcs could eject in interstellar space?
Sure. They do it all the time. (However, Thargoids don't have escape pods, so you don't see them ejecting.)
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16063
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Unusual planet jump failure

Post by Cody »

Damn… do you mean that the Python I followed into interstellar space the other day could’ve have ejected?
Rats, I should have picked him apart slowly, just to save him (and his cargo).
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
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: Unusual planet jump failure

Post by Kaks »

Yep, you did miss an opportunity there: starting from 1.75 everybody (but Thargoids) can eject in interstellar space! :)

Come to think of it, now that NPCs can use players' wormholes, I can't think of any reason for that Python not to follow you out of there...

Not sure whether adding that option to the standard AIs would be considered completing the new NPC wormhole features, or be seen as a completely new feature in and of itself... if the latter, we'll still have the option of creating a 'hitchhikers.oxp' to have NPCs take advantage of the odd wormhole or two...
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2412
Joined: Mon May 31, 2010 11:11 pm

Re: Unusual planet jump failure

Post by Switeck »

NPCs can use other NPCs wormholes under certain conditions. Trader escorts at least do it all the time. Some of the logic is there for pirates to follow the player's ship through their wormhole. I'm already experimenting with expanded trader roles in my mod, one in-progress includes the rare chance of reusing another trader's wormhole...or the player's wormhole. Kinda cruel to intentionally misjump if you have friendly tailgaters though.
Post Reply