Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

How to thwart galactic hyperspace jump?

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: another_commander, winston

User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2301
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia

How to thwart galactic hyperspace jump?

Post by Wildeblood »

Doing this does not work as I had hoped it would:

Code: Select all

this.playerStartedJumpCountdown = function(type)
	{
	if(type === "galactic" && player.ship.fuel < 7)
		{
		player.ship.removeEquipment("EQ_GAL_DRIVE");
		player.consoleMessage("Hyperdrive must be fully fuelled for long-range jump.",3);
		}
	}
Going to the status screen shows the Gal-drive has been removed, but the countdown and jump continues successfully.
User avatar
JazHaz
---- E L I T E ----
---- E L I T E ----
Posts: 2991
Joined: Tue Sep 22, 2009 11:07 am
Location: Enfield, Middlesex
Contact:

Re: How to thwart galactic hyperspace jump?

Post by JazHaz »

Not being a programmer, I'm not really sure, but at a guess once the countdown has started the program doesn't recheck that the galactic hyperdrive still exists. It probably only checks once when the player initiates the hyperspace.

How about adding to your code the call to cancel the countdown (whatever that is)?
JazHaz

Gimi wrote:
drew wrote:
£4,500 though! :shock: <Faints>
Cheers,
Drew.
Maybe you could start a Kickstarter Campaign to found your £4500 pledge. 8)
Thanks to Gimi, I got an eBook in my inbox tonight (31st May 2014 - Release of Elite Reclamation)!
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2301
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia

Re: How to thwart galactic hyperspace jump?

Post by Wildeblood »

JazHaz wrote:
Not being a programmer, I'm not really sure, but at a guess once the countdown has started the program doesn't recheck that the galactic hyperdrive still exists. It probably only checks once when the player initiates the hyperspace.
Exactly. It would be better if it re-checked when the countdown reached 1 second.
JazHaz wrote:
How about adding to your code the call to cancel the countdown (whatever that is)?
There is no method to start the countdown from script, only the player can do that? So there's also no method to stop the countdown?
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: How to thwart galactic hyperspace jump?

Post by Smivs »

I suspect jazhaz is right in that once the countdown has started, then you are commited to the jump, and removal of the equipment after this time is irrelevent.
Also, I have to ask 'why?' A galactic jump is not dependent on fuel - the gal-drive is a self-contained one-shot piece of equipment, and the amount of fuel a ship has on board is in no way connected to its ability to gal-jump.
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2301
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia

Re: How to thwart galactic hyperspace jump?

Post by Wildeblood »

Smivs wrote:
Also, I have to ask 'why?' A galactic jump is not dependent on fuel - the gal-drive is a self-contained one-shot piece of equipment, and the amount of fuel a ship has on board is in no way connected to its ability to gal-jump.
Because I don't like that. My Sensible GalDrive requires fuel. I am going to try whether a scripted misjump works...
User avatar
Micha
Commodore
Commodore
Posts: 815
Joined: Tue Sep 02, 2008 2:01 pm
Location: London, UK
Contact:

Re: How to thwart galactic hyperspace jump?

Post by Micha »

Put in a feature request to influence jumping from script. Won't be added till after MNSR (1.76) though, and even then only if somebody gets the time, so no guarantees.

OTOH, continuously checking for GalDrive presence during the countdown would also allow it to be destroyed in a fight during the countdown, which could be interesting... which also indicates that the normal hyperdrive could be a damage-able piece of equipment perhaps.
The glass is twice as big as it needs to be.
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: How to thwart galactic hyperspace jump?

Post by Smivs »

Wildeblood wrote:
Because I don't like that. My Sensible GalDrive requires fuel.
The Wiki wrote:
A Galactic Hyperdrive doesn't use any fuel (all the fuel is contained in the device)
So you're designing a novel piece of equipment that does the same job as an existing bit of kit, but in a different way. No problem with that, but I don't think it should have any bearing on the way the existing equipment works, especially when that existing equipment is so deeply embedded in the core game.

Edit:- I just wanted to add that I don't want to seem negative about this - I actually like your 'sensible' equipment ideas, just not this one because I don't see it as sensible I suppose.
One other thought. Had you considered your proposal in terms of the native Nova Mission? Your change would make this mission impossible.
Last edited by Smivs on Mon Nov 14, 2011 10:56 am, edited 1 time in total.
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2301
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia

Re: How to thwart galactic hyperspace jump?

Post by Wildeblood »

Micha wrote:
OTOH, continuously checking for GalDrive presence during the countdown would also allow it to be destroyed in a fight during the countdown, which could be interesting... which also indicates that the normal hyperdrive could be a damage-able piece of equipment perhaps.
Capt. Murphy already did a damageable Witchdrive.

Righto, attempt two, also does not work as I had hoped:-

Code: Select all

this.playerStartedJumpCountdown = function(type)
	{
	if(type === "galactic" && player.ship.fuel < 7)
		{
		player.ship.scriptedMisjump === true;
		player.commsMessage("DANGER!",6);
		player.commsMessage("Hyperdrive must be fully fuelled for long-range jump.",3);
		player.commsMessage("You will be stranded in interstellar space!",3);
		}
	}
It appears the scriptedMisjump flag is reset by entering a new galaxy, as I didn't get a mis-jump on the subsequent in-galaxy jump, either.

Maybe I'll just destroy the player ship if it tries to jump without fuel. :twisted:
Smivs wrote:
I just wanted to add that I don't want to seem negative about this...
Smivs, you will be very negative when you see it, it's a love it or hate it thing, and I'm sure you'll hate it. That's okay, there's room in the ooniverses for everyone.
User avatar
Ironfist
Commander
Commander
Posts: 218
Joined: Tue Jun 28, 2011 2:16 pm
Location: London

Re: How to thwart galactic hyperspace jump?

Post by Ironfist »

Wildeblood,

I think there might be an error in your script.
player.ship.scriptedMisjump === true; > is a comparison
I think you need
player.ship.scriptedMisjump = true; > to actually set the value to true
Of course I could be wrong, if so just ignore this!

Ironfist
64bit Mint 10 and Win 8 64bit on E8400 at 3.6GHz - ATI HD5750 graphics.
Concentration is the ability to think of absolutely nothing when it is absolutely necessary.
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2301
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia

Re: How to thwart galactic hyperspace jump?

Post by Wildeblood »

Ironfist wrote:
Wildeblood,

I think there might be an error in your script.
player.ship.scriptedMisjump === true; > is a comparison
I think you need
player.ship.scriptedMisjump = true; > to actually set the value to true
Thank you, Ironfist, thank you. Unfortunately, fixing my dopey mistake made no difference: the scriptedMisjump flag has no effect after an intergalactic jump.
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Re: How to thwart galactic hyperspace jump?

Post by Switeck »

Currently there's no provisions in Oolite's code for a galactic hyperspace jump to be "different" if player.ship.scriptedMisjump === true;

Using an invisible ship/object to mass-lock the player's ship is pretty much the only way I know of to prevent a hyperspace jump. (trivia: But even a invisible ship won't prevent going through an already-existing wormhole.)
User avatar
Cmdr James
Commodore
Commodore
Posts: 1357
Joined: Tue Jun 05, 2007 10:43 pm
Location: Berlin

Re: How to thwart galactic hyperspace jump?

Post by Cmdr James »

A misjump moves the player midway between the origination and target system. There is no meaningful equivalent for a galjump. And in the base game there would be no way to escape since the galdrive is a single use, there would be noway to escape.

Perhaps galactic misjumps could be implemented, but there is no way to somehow bodge it based on where we are now by reusing standard misjump behaviour.

It is also important to think about game dynmamics. Having a galdrive that requires fuel could break some missions, so you may need to rewrite core game missions as well. I dont think Im giving any spoilers away by saying there is a core mission that is only triggered when you have a galdrive, and this could be impacted by a rewrite.

Having an "abort galjump" JS method could probably be added, and I think is harmless on its own. But it is not a trivial decision.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Re: How to thwart galactic hyperspace jump?

Post by Thargoid »

Personally speaking, as the galactic hyperdrive can be damaged, and if you try and initialise a galactic jump with a damaged drive it fails, for me I would define it as a bug that if it is damaged during a jump then the jump continues and at the end of the countdown is successful.

The basic rationale should apply to all equipment, for example would it make sense for automated (Blue Danube) docking to continue if the docking computer gets shot up and damaged? If that happens in-game the docking gets cancelled. So for me the damaging of a GalDrive should immediately cancel the galactic jump...
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: How to thwart galactic hyperspace jump?

Post by Kaks »

Thargoid wrote:
Personally speaking, as the galactic hyperdrive can be damaged, and if you try and initialise a galactic jump with a damaged drive it fails, for me I would define it as a bug that if it is damaged during a jump then the jump continues and at the end of the countdown is successful.
Makes sense!


However: Wideblood, as mentioned twice already, your proposed 'sensible galDrive' would very much break a standard mission. Not very sensible, I don't think...
By the way, you might want to play through that particular mission to see exactly what happens and why your proposed oxp would break it! :)
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
Micha
Commodore
Commodore
Posts: 815
Joined: Tue Sep 02, 2008 2:01 pm
Location: London, UK
Contact:

Re: How to thwart galactic hyperspace jump?

Post by Micha »

Personally I see the Gal Hyperdrive as being some sort of one-shot overdrive of the standard Hyperdrive, containing all the fuel/energy/gubbins needed for the Galactic Jump, burning itself out in the process. As such I also don't think it would make sense for the GHD to be available to ships which don't have a normal HD fitted (I think that was asked/raised in another thread).

Looks like we'll need to revise all core equipment though, and ensure that if it gets damaged that whatever it does stops working.
The glass is twice as big as it needs to be.
Post Reply