Masslock Reimagined OXZ

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

Moderators: another_commander, winston

User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2637
Joined: Thu Jun 20, 2013 10:22 pm

Masslock Reimagined OXZ

Post by Redspear »

Currently having trouble uploading this one due to ".zip" is not a permitted file type." error but it is otherwise ready to go.


Masslocks without this mod
  • Masslocks interrupt torus drive use
  • Torus drive only reusable once masslock escaped
  • Masslock clearances can take upwards of five minutes without steering around them
  • Slower ships can get trapped in traffic jams if staying on lane, making them less attractive and faster NPC vessels problematic

Masslocks with this mod
  • Masslocks interrupt torus drive use
  • Torus drive reusable after a short delay
  • Masslock clearances can take less than a minute
  • Ship speed is no longer critical in determining masslock clearance


How it Works


Initial Masslock
The player is masslocked as normal as the torus drive begins to recalibrate around the new masslocking bodies.

Masslock Neutralisation
After a short period the player receives the message, "Torus Drive Online", as the existing masslock is temporarily removed.

Masslock Escape
There is now a short window for the player to re-employ the torus drive before "Mass-Lock Sensitivity Restored" and thye torus drive requires further recalibration.

Masslock Dominance
The following factors prevent the torus drive from overpowering a masslock.
  • Gravity wells of stars and planets
  • Aegis of station
  • Taking fire

Current Settings
  • 30 seconds before torus drive is back online (almost certainly too short but good for testing)
  • 10 seconds before masslock sensitivity returns (perhaps slightly too long but starts from masslock release rather than torus engagement)
  • Console messages for -
    • Torus Drive Online
    • Mass-Lock Sensitivity Restored
    • Gravity Well Influence Detected

Timers are new to me so there's a fair chance that I've messed something up but I wanted an early release for feedback on times and general operation. I've recently written of (some) justification re player-centricity so I won't repeat myself here.

Hopefully I can upload very soon.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16052
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Masslock Reimagined OXZ

Post by Cody »

Redspear wrote: Mon May 16, 2022 6:04 pm
Currently having trouble uploading this one due to ".zip" is not a permitted file type." error but it is otherwise ready to go.
Where are you trying to upload it to?
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
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2637
Joined: Thu Jun 20, 2013 10:22 pm

Re: Masslock Reimagined OXZ

Post by Redspear »

Cody wrote: Mon May 16, 2022 6:20 pm
Where are you trying to upload it to?
To the wiki (with an .oxz extension, not a .zip one).
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2637
Joined: Thu Jun 20, 2013 10:22 pm

Re: Masslock Reimagined OXZ

Post by Redspear »

Still doesn't seem to want to upload, so meanwhile (for anyone who's interested) here's the script itself:

Code: Select all

this.name		= "masslock_reimagined";
this.author		= "Redspear";
this.copyright		= "2022 Redspear";
this.licence		= "CC BY-NC-SA 4.0"; 
this.description	= "Masslock delays (rather than always holds) torus drive";
this.version		= "1.0";

"use strict";

// establish toggle variable

this.startUpComplete = function()
{
	this._MLOR = 0;
}

// establish where masslock may be overridden

this.shipExitedPlanetaryVicinity = this.shipExitededStationAegis = this.shipExitedWitchspace = function()
{
	this._MLOR = 1;
}

// establish where masslock may not be overridden

this.shipEnteredStationAegis = this.shipLaunchedFromStation = function()
{
	this.$stopTimer();
	this._MLOR = 0;
	player.ship.massLockable = true;
}

this.shipEnteredPlanetaryVicinity = function()
{
	this.$stopTimer();
	this._MLOR = 0;
	player.ship.massLockable = true;
	player.consoleMessage ("Gravity Well Influence Detected");
	
}

this.shipBeingAttacked = function(player)
{
	this.$stopTimer();
	this._MLOR = 0;
	player.ship.massLockable = true;
	player.consoleMessage ("Torus Drive Recalibrating");
}

// timer management

this.shipDied = function()
{	
	this.$stopTimer();
}	

this.$startTimer1 = function $startTimer1 () {
			this.$stopTimer(); // reset safety check
			this._myTimer = new Timer(this, this.$masslockReleaseTimer, 30, 0); // 30 seconds, no repeat
			}
			
this.$startTimer2 = function $startTimer2 () {
			this.$stopTimer(); // reset safety check
			this._myTimer = new Timer(this, this.$masslockRestoreTimer, 10, 0); // 10 seconds, no repeat
			}

this.$stopTimer = function $stopTimer ()
{
    if (this._myTimer && this._myTimer.isRunning) this._myTimer.stop();
}

// masslock management

this.alertConditionChanged = function()
{
	if (player.alertCondition === 2 && _MLOR === 1)
		{this.$startTimer1();
		}
		
	if (player.alertCondition === 2 && _MLOR === 0)
		{this.$stopTimer();
		}
		
	if (player.alertCondition === 1)
		{this.$startTimer2();
		player.consoleMessage ("Torus Drive Online");
		}
}

this.$masslockReleaseTimer = function $masslockReleaseTimer ()
{
	player.ship.massLockable = false;	
}

this.$masslockRestoreTimer = function $masslockRestoreTimer ()
{
    player.ship.massLockable = true;
	player.consoleMessage ("Mass-Lock Sensitivity Restored");
}
EDIT: playership/player.ship typo
User avatar
Old Murgh
Wiki Wizard
Wiki Wizard
Posts: 639
Joined: Sat Dec 04, 2021 11:01 pm

Re: Masslock Reimagined OXZ

Post by Old Murgh »

Redspear wrote: Mon May 16, 2022 9:21 pm
To the wiki (with an .oxz extension, not a .zip one).
Ugh. Sorry about setting in motion this disturbance to the fragile balance.

I asked Winston to consider adding .zip to the menu of permitted formats, and he made an effort but had little time before leaving on a journey. I'm sure he will set it right once he's back.
I was young, I was naïve. [EliteWiki] Jonny Cuba made me do it!
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2637
Joined: Thu Jun 20, 2013 10:22 pm

Re: Masslock Reimagined OXZ

Post by Redspear »

Old Murgh wrote: Wed May 18, 2022 8:36 pm
Ugh. Sorry about setting in motion this disturbance to the fragile balance.
Honestly! I finally make the oxp that I've always wanted and... :lol:

No problem at all, I'm sure it will be worth it in the long run 8)
User avatar
Cholmondely
Archivist
Archivist
Posts: 4965
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Masslock Reimagined OXZ

Post by Cholmondely »

Any chance of a nutshell description of what are now four oxp's - all tackling masslock - which I can incorporate into the wiki?

No problems with 4 oxp's - just problems with explaining what's going on!
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2637
Joined: Thu Jun 20, 2013 10:22 pm

Re: Masslock Reimagined OXZ

Post by Redspear »

:D No worries.

Power to Engines
  • Speedboost (150%) when weapons offline
  • Useful for escaping faster opponents (if they did same then they wouldn't be able to shoot)
  • Helps reduce duration of masslocks
Masslock Compensators
  • Speedboost (200%) when masslocked but cancelled by red alert
  • No benefit for combat
  • Significant reduction of time spent in masslock
Traffic Redistributer
  • Adjusts traffic to increase frequency of slower traders (and so that the 'best' courier ships aren't also the most common)
  • Station bound traffic becomes easier to overtake because it's usually slower
  • Pirates, hunters and police are unaffected
Masslock Reimagined
  • Masslock lasts for a fixed duration rather than until scanner is clear
  • No speed changes to either player or average encountered NPC
  • Taking fire negates the effect but possible to dodge your way out of a masslock without being the faster ship
  • Likely to make Masslock Compensators obsolete if it develops as I hope
User avatar
Cholmondely
Archivist
Archivist
Posts: 4965
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Masslock Reimagined OXZ

Post by Cholmondely »

Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2637
Joined: Thu Jun 20, 2013 10:22 pm

Re: Masslock Reimagined OXZ

Post by Redspear »

Cholmondely wrote: Thu May 19, 2022 1:51 pm
Belated thanks.

At least I've been able to test it a bit more.
No obvious bugs as yet but I've ironed out the odd quirk.
User avatar
Cholmondely
Archivist
Archivist
Posts: 4965
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Masslock Reimagined OXZ

Post by Cholmondely »

Redspear wrote: Thu May 26, 2022 7:48 pm
Cholmondely wrote: Thu May 19, 2022 1:51 pm
Belated thanks.

At least I've been able to test it a bit more.
No obvious bugs as yet but I've ironed out the odd quirk.
I so wish that I had your mastery of the Dark Arts.
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2637
Joined: Thu Jun 20, 2013 10:22 pm

Re: Masslock Reimagined OXZ

Post by Redspear »

Cholmondely wrote: Thu May 26, 2022 10:22 pm
I so wish that I had your mastery of the Dark Arts.
You can write oxps... and likely much better than I could when I started (if only I'd understood event handlers back then).
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2637
Joined: Thu Jun 20, 2013 10:22 pm

Re: Masslock Reimagined OXZ

Post by Redspear »

v1.1 now (finally) available from the manager.

Minor tweaks to masslock sensitivity returning and torus drive status reports.
User avatar
Redspear
---- E L I T E ----
---- E L I T E ----
Posts: 2637
Joined: Thu Jun 20, 2013 10:22 pm

Re: Masslock Reimagined OXZ

Post by Redspear »

With thanks to Alnivel & Massively Locked...
  • v1.2 is here...
    • fixed a bug with combat overrides not resetting
    • avoid taking fire for 60 seconds and you can torus out of there
    • removed 'escape window' (it was too short for convenience but also too long not to risk skipping other encounters)
    • instead a scanner check function makes sure you escape current/overlapping masslocks only

It now pretty much works as I'd like it too.

I think this might be the best thing I've ever made for oolite: it both respects (or at least tries to) the masslock mechanic and its utilty whilst also addressing its gameplay issues in relation to oolite. Slow ships become much more playable IMHO with this oxp and it's only as player-centric as one's rationale for it.

Crawling out of a masslock or running from a combat with no other strategy than patience can be both time-consuming and tedious.
If you disagree with that last statement then this oxp likely won't be to your taste.
User avatar
Cholmondely
Archivist
Archivist
Posts: 4965
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Masslock Reimagined OXZ

Post by Cholmondely »

Redspear wrote: Sat Dec 03, 2022 11:27 pm
With thanks to Alnivel & Massively Locked...
  • v1.2 is here...
    • fixed a bug with combat overrides not resetting
    • avoid taking fire for 60 seconds and you can torus out of there
    • removed 'escape window' (it was too short for convenience but also too long not to risk skipping other encounters)
    • instead a scanner check function makes sure you escape current/overlapping masslocks only

It now pretty much works as I'd like it too.

I think this might be the best thing I've ever made for oolite: it both respects (or at least tries to) the masslock mechanic and its utilty whilst also addressing its gameplay issues in relation to oolite. Slow ships become much more playable IMHO with this oxp and it's only as player-centric as one's rationale for it.

Crawling out of a masslock or running from a combat with no other strategy than patience can be both time-consuming and tedious.
If you disagree with that last statement then this oxp likely won't be to your taste.
I've added the download details and the version history to your wiki page, but you might care to rework it if, as you say, this is your magnum opus!
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
Post Reply