Keep increasing to what upper limit?
p.s.torusEngaged & p.s.injectorsEngaged Booleans
Moderators: winston, another_commander
- Wildeblood
- ---- E L I T E ----
- Posts: 2453
- Joined: Sat Jun 11, 2011 6:07 am
- Location: Western Australia
- Contact:
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: p.s.torusEngaged & p.s.injectorsEngaged Booleans
There is none that I'm aware of. And certainly none you're going to reach without heading away from the planet for a long way, and I mean a *really* long way.
- Redspear
- ---- E L I T E ----
- Posts: 2685
- Joined: Thu Jun 20, 2013 10:22 pm
- Location: On the moon Thought, orbiting the planet Ignorance.
Re: p.s.torusEngaged & p.s.injectorsEngaged Booleans
Might it be this? (4th line)
If not, then it would be one less line of code for me to tweak when rescaling...
Code: Select all
#if OO_VARIABLE_TORUS_SPEED
#define HYPERSPEED_FACTOR [PLAYER hyperspeedFactor]
#define MIN_HYPERSPEED_FACTOR 32.0
#define MAX_HYPERSPEED_FACTOR 1024.0
#else
#define HYPERSPEED_FACTOR 32.0
#endif
- Wildeblood
- ---- E L I T E ----
- Posts: 2453
- Joined: Sat Jun 11, 2011 6:07 am
- Location: Western Australia
- Contact:
Re: p.s.torusEngaged & p.s.injectorsEngaged Booleans
Thank you, Redspear. But, you know, a polite poster would have mentioned the name of the file he was quoting. I presume it's got some poetic title, like "player.m"?Redspear wrote: ↑Sun Feb 18, 2024 10:05 pmMight it be this? (4th line)
If not, then it would be one less line of code for me to tweak when rescaling...Code: Select all
#if OO_VARIABLE_TORUS_SPEED #define HYPERSPEED_FACTOR [PLAYER hyperspeedFactor] #define MIN_HYPERSPEED_FACTOR 32.0 #define MAX_HYPERSPEED_FACTOR 1024.0 #else #define HYPERSPEED_FACTOR 32.0 #endif
1024 x maxSpeed sounds fast, doesn't it? Like... really fast. Like, um, that really makes a mockery of maxSpeed, man.
Anyway, below is the entirety of Bullet Drive.
Code: Select all
"use strict";
this.name = "Bullet Drive";
this.version = "1.0.3"; // Wildeblood, May 16th, 2013
/* ====================================================================================
MAINTAIN LOCKED HEADING AT HIGH SPEED
======================================================================================= */
this.$maintainHeading = function()
{
var self = player.ship;
if (self.status !== "STATUS_IN_FLIGHT" && self.status !== "STATUS_WITCHSPACE_COUNTDOWN")
{
removeFrameCallback(this.$monitor);
delete this.$monitor;
return;
}
if (self.speed <= (7 * self.maxSpeed))
{
if (this.$heading) delete this.$heading;
if (player.alertCondition != 1)
{
removeFrameCallback(this.$monitor);
delete this.$monitor;
}
return;
}
if (self.speed > (7 * self.maxSpeed)) // Exceeding injector speed, must be cheat button speed.
{
if (this.$heading)
{
var angle = self.heading.angleTo(this.$heading);
var cross = self.heading.cross(this.$heading).direction();
self.orientation = self.orientation.rotate(cross,-angle);
}
else this.$heading = self.heading;
}
}
/* ====================================================================================
STARTING $maintainHeading
======================================================================================= */
this.alertConditionChanged = function(newCondition, oldCondition)
{
if (newCondition == 1 && !this.$monitor)
{
this.$monitor = addFrameCallback(this.$maintainHeading.bind(this));
}
}
this.shipExitedWitchspace = function()
{
if (player.alertCondition == 1 && !this.$monitor)
{
this.$monitor = addFrameCallback(this.$maintainHeading.bind(this));
}
}
/* ====================================================================================
CHANGE LOG
1.0.3 (May 16th, 2013) Added this.shipExitedWitchspace check.
1.0.2 (December 19th, 2012) Changed < to <= in speed check.
1.0.1 (December 18th, 2012) Comment removed.
1.0 (December 18th, 2012) Created.
======================================================================================= */
I like the way it's formatted like PHP, not like javaScript.
I suppose the first thing it will need is a version check? Which version of Oolite introduced these wonders we've been discussing?
Hey guys? Where did you o? We're doing this, aren't we?
Last edited by Wildeblood on Sun Feb 18, 2024 10:48 pm, edited 1 time in total.
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: p.s.torusEngaged & p.s.injectorsEngaged Booleans
It's player.h.
- Redspear
- ---- E L I T E ----
- Posts: 2685
- Joined: Thu Jun 20, 2013 10:22 pm
- Location: On the moon Thought, orbiting the planet Ignorance.
Re: p.s.torusEngaged & p.s.injectorsEngaged Booleans
Apologies if I didn't meet your standards...Wildeblood wrote: ↑Sun Feb 18, 2024 10:24 pmThank you, Redspear. But, you know, a polite poster would have mentioned the name of the file he was quoting
And that's not sarcasm on my part, rather it's to do with the nature of politeness itself.
- Wildeblood
- ---- E L I T E ----
- Posts: 2453
- Joined: Sat Jun 11, 2011 6:07 am
- Location: Western Australia
- Contact:
Re: p.s.torusEngaged & p.s.injectorsEngaged Booleans
I don't understand that remark. Have I offended you?Redspear wrote: ↑Sun Feb 18, 2024 10:47 pmApologies if I didn't meet your standards...Wildeblood wrote: ↑Sun Feb 18, 2024 10:24 pmThank you, Redspear. But, you know, a polite poster would have mentioned the name of the file he was quoting
And that's not sarcasm on my part, rather it's to do with the nature of politeness itself.
- Redspear
- ---- E L I T E ----
- Posts: 2685
- Joined: Thu Jun 20, 2013 10:22 pm
- Location: On the moon Thought, orbiting the planet Ignorance.
Re: p.s.torusEngaged & p.s.injectorsEngaged Booleans
No and furthermore my apology was genuine. What's considered polite tends to vary somewhat however so consider that my defence, if you will.
- Wildeblood
- ---- E L I T E ----
- Posts: 2453
- Joined: Sat Jun 11, 2011 6:07 am
- Location: Western Australia
- Contact:
Re: p.s.torusEngaged & p.s.injectorsEngaged Booleans
It seems it doesn't actually check for 32 x maxSpeed anywhere, just speed > 7 x maxSpeed, so - assuming injectors speed hasn't also been changed - it should still work fine. No need to change anything.Wildeblood wrote: ↑Sun Feb 18, 2024 10:24 pmAnyway, below is the entirety of Bullet Drive.Code: Select all
"use strict"; this.name = "Bullet Drive"; this.version = "1.0.3"; // Wildeblood, May 16th, 2013 /* ==================================================================================== MAINTAIN LOCKED HEADING AT HIGH SPEED ======================================================================================= */ this.$maintainHeading = function() { var self = player.ship; if (self.status !== "STATUS_IN_FLIGHT" && self.status !== "STATUS_WITCHSPACE_COUNTDOWN") { removeFrameCallback(this.$monitor); delete this.$monitor; return; } if (self.speed <= (7 * self.maxSpeed)) { if (this.$heading) delete this.$heading; if (player.alertCondition != 1) { removeFrameCallback(this.$monitor); delete this.$monitor; } return; } if (self.speed > (7 * self.maxSpeed)) // Exceeding injector speed, must be cheat button speed. { if (this.$heading) { var angle = self.heading.angleTo(this.$heading); var cross = self.heading.cross(this.$heading).direction(); self.orientation = self.orientation.rotate(cross,-angle); } else this.$heading = self.heading; } } /* ==================================================================================== STARTING $maintainHeading ======================================================================================= */ this.alertConditionChanged = function(newCondition, oldCondition) { if (newCondition == 1 && !this.$monitor) { this.$monitor = addFrameCallback(this.$maintainHeading.bind(this)); } } this.shipExitedWitchspace = function() { if (player.alertCondition == 1 && !this.$monitor) { this.$monitor = addFrameCallback(this.$maintainHeading.bind(this)); } } /* ==================================================================================== CHANGE LOG 1.0.3 (May 16th, 2013) Added this.shipExitedWitchspace check. 1.0.2 (December 19th, 2012) Changed < to <= in speed check. 1.0.1 (December 18th, 2012) Comment removed. 1.0 (December 18th, 2012) Created. ======================================================================================= */
- Wildeblood
- ---- E L I T E ----
- Posts: 2453
- Joined: Sat Jun 11, 2011 6:07 am
- Location: Western Australia
- Contact:
Re: p.s.torusEngaged & p.s.injectorsEngaged Booleans
I copy/pasted it out of the debug console, so it looks more like javaScript, and less like PHP, and just uploaded it as version 1.0.4 - easiest "update" ever.
In your heart, you know it's flat.
- Wildeblood
- ---- E L I T E ----
- Posts: 2453
- Joined: Sat Jun 11, 2011 6:07 am
- Location: Western Australia
- Contact:
Re: p.s.torusEngaged & p.s.injectorsEngaged Booleans
Only took about 10-12 minutes to build up from 32x to 1024x.
Fell through from 1024x back down to 32x - and stayed there.
Because of the way it's implemented - based on distance from zero point, NOT time spent accelerating - the multiplier is increasing as you head outward, but always falling as you head inward.
But if it falls through from 1024 to 32, as it did for me, it can't decrease because it's at the lowest possible torus speed - 32x.
Bottom line: 12 minutes outwards, an hour to get back.
Nice one, seriously noice.
In your heart, you know it's flat.
- Redspear
- ---- E L I T E ----
- Posts: 2685
- Joined: Thu Jun 20, 2013 10:22 pm
- Location: On the moon Thought, orbiting the planet Ignorance.
Re: p.s.torusEngaged & p.s.injectorsEngaged Booleans
As I made systems bigger for my rescaling, I found it necessary to increase all of those values that I posted (and not just max value).
Then I needed to increase the deceleration rate upon exiting torus speed too.
Then I needed to increase the deceleration rate upon exiting torus speed too.