Is there any torus-drive-oxp?

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

Moderators: winston, another_commander

Post Reply
User avatar
tsoj
Deadly
Deadly
Posts: 199
Joined: Wed May 18, 2016 8:19 pm
Location: Berlin
Contact:

Is there any torus-drive-oxp?

Post by tsoj »

Hello,

im wondering if anyone has already made an oxp, that changes the torus-drive to kind of a faster fuel-injection-drive, so not every single ship terminates the torus-drive and pirates, hunters and so on have an equipment to interrupt the torus-drive.
If not, what do you think about this idea?
User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: Is there any torus-drive-oxp?

Post by Norby »

The nearest is Redspear's tweak for [wiki]VariableMasslock[/wiki], where you can change the masslock distance from 17000 to zero in the case of escorts-traders.

The idea looks interesting due to you are (at least) third who mention something similar. The first Redspear in the VariableMasslock topic, second Dave-Morgan's 2. suggestion.
User avatar
tsoj
Deadly
Deadly
Posts: 199
Joined: Wed May 18, 2016 8:19 pm
Location: Berlin
Contact:

Re: Is there any torus-drive-oxp?

Post by tsoj »

Thank you, thats almost what i have looked for. The problem that i see there is that the player has a special role, yes of course he has but here i would like to have as player the possibility to be a pirate, thus i need something to get the full masslock range myself.

I looked into your code but I only have somewhat oop-experience and today i saw the first time javscript-code, so yeah.
What means this

Code: Select all

this.$VMShips = []; //store ships with changed scanClass and its original scanClass
?

If its not easy to explain it, no problem, ill take some time and learn javascript.
User avatar
Redspear
---- E L I T E ----
---- 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: Is there any torus-drive-oxp?

Post by Redspear »

tsoj wrote:
Thank you, thats almost what i have looked for. The problem that i see there is that the player has a special role, yes of course he has but here i would like to have as player the possibility to be a pirate, thus i need something to get the full masslock range myself.
I think it's possible to do the same but checking for whether or not caps-lock is enabled.

e.g.
  • Caps-lock ON: Piracy mode - mass-lock activates with any ship on scanner, as per standard game
    Caps-lock OFF: Evasion mode - only mass-locked by ships wishing to do so, as per my variant of Norby's variable masslock (or similar)
(edit: or by making it primable equipment)

Such 'code' isn't contained in my tweak but I think it should be workable.
tsoj wrote:
What means this...
My Javascript is poor and I apologise if I'm stating what you already know and so with that in mind... the text after the "//" explains it quite well when you know what's going on in this oxp.

The scanClass is the ship property that is changed to prevent it from mass-locking you (amongst other things) and that line asks the game to remember it so that it can be changed back once the ship is at the appropriate range to mass-lock you again (as defined by distance from the player). Were it not stored, once a ship's mass-locking ability were disabled it would remain disabled and the game might interact strangely with it upon 'scanning' it as a different class of entity.

I think I got that right... Norby?
User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: Is there any torus-drive-oxp?

Post by Norby »

Yes, I must change scanClass to CLASS_BUOY to prevent masslock. The $VMShips array store the original scanClass, for restore in the moment when it should do masslock again. The content is assigned in the 158. line in variablemasslock.js, it is another array inside the $VMShips array:

Code: Select all

w.$VMShips.push( [t, t.scanClass, r] ); 
The first (0.) item is the target ship itself (t), second is the original scanClass and third (r) is the new masslock radius what I check in every frame using FrameCallBack.

Currently when you would like to be a pirate then during torus travel you must press "j" again to stop your ship when a target is appear in your scanner, or a drastical solution is if you temporary uninstall the oxp.

CapsLock or other keys are not usable directly in oxps, just events like equipment activation, but you can keep your primable eq list shorter if you check another event instead, for example player.ship.missilesOnline. In this way when you travel with armed missiles then you could get normal masslocks and shortened (or 0) masslock rages otherwise.
User avatar
Cmdr. Aiden Henessy
Competent
Competent
Posts: 36
Joined: Wed Aug 24, 2016 10:30 pm

Re: Is there any torus-drive-oxp?

Post by Cmdr. Aiden Henessy »

Norby wrote:
Currently when you would like to be a pirate then during torus travel you must press "j" again to stop your ship when a target is appear in your scanner, or a drastical solution is if you temporary uninstall the oxp.
I rather like the idea of having to press "J" again. Think of it this way: In a "real" Ooniverse, you couldn't hard-wire the Torus Drive to stop at every scanner contact, regardless of range. So it'd be realistic that a majority of pirates would simply be forced to pop out of masslock at every scanner point, and check it out. Alternatively, you could buy a specialty "pirate torus" which would stop at every scanner contact. But then, that means that being a pirate is more of a permanent commitment, and not a "past time." It also means you have a suspicious piece of cargo in your ship that authorities might notice the next time you dock at the main station.

Not sure if the "specialty torus" would be something that could be implemented in game, but either way I think it makes sense that pirates would have to force themselves to stop and check every scanner. Remember, it's a rough and hard life as a pirate, right?
I'm Ravished by the Sheer Implausibility of that Last Statement

It should be a crime for Anacondas to fly without escort. That much temptation is just too much to resist.
User avatar
tsoj
Deadly
Deadly
Posts: 199
Joined: Wed May 18, 2016 8:19 pm
Location: Berlin
Contact:

Re: Is there any torus-drive-oxp?

Post by tsoj »

Is it right, that the torus-drive is only some kind of time acceleration for the player (not for the game time), so npc will never have something like an torus speed?
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Is there any torus-drive-oxp?

Post by Cody »

NPCs don't have torus drives (the handwavium being they do but one never sees it because of masslock).
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
tsoj
Deadly
Deadly
Posts: 199
Joined: Wed May 18, 2016 8:19 pm
Location: Berlin
Contact:

Re: Is there any torus-drive-oxp?

Post by tsoj »

Is there a propertie that changes the torus-drive-speed?
User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: Is there any torus-drive-oxp?

Post by Norby »

tsoj wrote:
Is there a propertie that changes the torus-drive-speed?
Not directly. The core code set it to 32x and sometimes increase it to reduce the time of long travels. In addition my [wiki]TorusToSun[/wiki] use a trick (position updates like micro teleportations in each frame) to get more relative speed.
Another possibility is manipulating velocity, [wiki]Q-Charger[/wiki] do this.
The most easy way is if you change the maxSpeed, this affect the torus speed also. Just you must set back to original when step out of torus.
Post Reply