Page 1 of 3

[RELEASE] - Synchronised Torus 1.0 (2015-12-14)

Posted: Fri Dec 11, 2015 8:11 pm
by Fritz
Did you ever follow a freighter or another ship from witchpoint to the station, to the sun, or to a remote rock hermit? Did you spend countless hours of real world time doing this because NPC ships don't seem to have torus drives?

But the NPC pilots are using the same ship types as the player, so they must have torus drives too. We just don't see them being used because of the mass-locking problem. If we follow NPCs, we mass-lock them! And perhaps NPC pilots, especially Anaconda and shuttle pilots, are paid by the hour...

Since the release of the Escort Contracts OXP we know that even Anacondas have torus drives and that mass-locking can be prevented if the torus drives of two or perhaps even more than two ships are synchronised. This is possible when the ships are close together and head in the same direction.

Image

Because I liked to follow freighter convoys from the beginning, I had the idea for this even before I had changed a single line in any OXP and definitely before I had installed Escort Contracts. Now, some months later, I have learned enough to implement the idea, and the OXP took only a few hours to create. It uses the same basic technique as Escort Contracts, using a high velocity to simulate torus speeds and a frame callback function to keep the velocity of both ships identical. But there are also significant differences between both OXPs because I use a timer function to control everything while Escort Contracts uses a special AI. And, of course, the synchronisation is started by the player in my OXP, while it is controlled by the "mother" in Escort Contracts.

The torus synchronisation controller is a piece of (invisible) equipment, but you don't need to buy it because every ship can do this (as is shown by Escort Contracts). It can be primed by using "shift-n". Then you have to target a ship, and if all conditions are met you can start and stop the synchronised torus drive with the "n" key. Note that while the player has to start the synchronisation and can interrupt it at any time, he isn't really in charge: The course and destination is defined by the NPC, and you can't steer a NPC somewhere you want him to go!

The conditions for starting and maintaining synchronisation include:
- Distance between ships must be between 500 and 2500 meters (like in Escort Contracts).
- The headings must match (a few degrees deviation will be tolerated).
- The destination (next waypoint) of the NPC ship must be outside scanner range.
- Neither the player nor the NPC ship must be mass-locked.

I consider this first release a beta version because there are still some things to do:
- It works only for single ships. But many ships travel with escorts, and I plan to include them (this shouldn't be too difficult).
- Perhaps I'll have to implement some kind of asteroid detection to prevent collisions, especially when including escorts.
- The console messages should "beep up" and "beep down" like it is done with the standard torus messages.
- I want to make some more testing runs.

Is there a simple way to include the beeping without using a SoundObject? There is a method player.consoleMessage() but no player.beep() or, what I had expected, a beep parameter for the console message.

The OXP is actually quite simple (at least until now) and easy to understand. If you look at the code, much of it is used for checking the conditions (distance, heading, mass locking). Because it isn't AI based, it doesn't change the "target" ship in any way, so it should work with OXP ships too. It even works with friendly aliens - I was able to make a long test flight together with an Odonatean, only the second one I've ever met! (If you are reading this, thank you for your cooperation!)

Image

Is this OXP useful for playing? It is probably usful for testing, especially AI testing, but it's not much of a game changer. It's made for players who love flying around and watching other ships. On one of the first test runs with this OXP, I met a Moray Medical Boat, and I was able to follow it during sun skimming, and today I did the same with the mentioned Odonatean. This would not have been possible without torus synchronisation because approaching the sun without torus drive takes too long and the player ship would overheat.

But, at least in theory, you can use torus synchronisation for tactical reasons too. If you feel unsafe, you can attach to a group of Vipers (when I have finished including escorts). Or you can follow a freighter, hoping that it will be attacked and drop its cargo, so you can scoop it after killing the pirates. You could do the same without torus drive of course, but it would take much longer. Using the torus drive seems to increase the chances of running into trouble: If you travel through a system with normal speed, many of the pirates, bounty hunters, and police seem to eliminate each other before you run into them.

The current version is available in the OXZ manager and also on the Wiki page.

Re: [BETA RELEASE] - Synchronised Torus 0.91 (2015-12-11)

Posted: Fri Dec 11, 2015 10:40 pm
by Norby
Nice work! When escorts will be supported I suggest to upload into the oxz manager.
Notes:
- The log() function need two parameters to work, the first should be this.name and the second is the message.
- Your $st_torusEngaged variable is unaccesible from other OXPs at the moment due to placed into the equipment script. Should be in the worldscript to be readable in this way:

Code: Select all

worldScripts["Synchronised Torus"].$st_torusEngaged

Re: [BETA RELEASE] - Synchronised Torus 0.91 (2015-12-11)

Posted: Fri Dec 11, 2015 10:51 pm
by Fritz
Norby wrote:
Nice work!
Thank you!
When escorts will be supported I suggest to upload into the oxz manager.
I'll definitely do that. It seems that the download count is at least ten times as high if it is available there.
- The log() function need two parameters to work, the first should be this.name and the second is the message.
I've always used it like that. :oops: But it works, although the second parameter would make including the OXP name into the message unnecessary.
Your $st_torusEngaged variable is unaccesible from other OXPs at the moment due to placed into the equipment script.
That seems logical. I don't read the switch in my Engine Sounds OXP yet, so I didn't notice the mistake.

Re: [BETA RELEASE] - Synchronised Torus 0.91 (2015-12-11)

Posted: Sat Dec 12, 2015 3:47 pm
by Fritz
I'm wondering if there is a simple way do determine if a targeted ship as an escort (you shouldn't target an escort for synchronised torus). It is simple if I know the leader already, but if I don't? Do I have to check all ships in the system (or in the vicinity) to see if one of them has the targeted ship as an escort? That seems like a lot of work (for the CPU). But there must be some way to do this because the leader and all other escorts react when an escort is attacked.

Perhaps ship.owner is used for escorts and pointing to the leader? I'm just trying to figure that out.

Edit: ship.owner can be used. I took the freedom of adding it in the wiki.

Re: [BETA RELEASE] - Synchronised Torus 0.91 (2015-12-11)

Posted: Sat Dec 12, 2015 4:23 pm
by another_commander
You can use ship.group.leader to identify the leader of a group containing escorts. If you apply this on a ship not belonging to a group, null is returned.

Re: [BETA RELEASE] - Synchronised Torus 0.91 (2015-12-11)

Posted: Sat Dec 12, 2015 4:57 pm
by Fritz
You're right, that would work too.

Hmm... and in theory I could move the target to the leader when I targeted one of the group members and try to start synchronisation... after all, ship.target seems to be read-write...

Re: [BETA RELEASE] - Synchronised Torus 0.91 (2015-12-11)

Posted: Sat Dec 12, 2015 6:11 pm
by Norby
Fritz wrote:
I could move the target to the leader when I targeted one of the group members and try to start synchronisation
Do not change the target, just synchronize all ships in the ship.group.ships array.

Re: [BETA RELEASE] - Synchronised Torus 0.91 (2015-12-11)

Posted: Sat Dec 12, 2015 7:19 pm
by Fritz
I'm doing this, and it work's fine. What I meant was that the player should target the group leader before starting torus synchronisation, because the leader is supposed to be the ship that controls synchronisation for the whole group. So the distance between player and leader is relevant and not the distance between player and one of the escorts.

Now, if the player targets one of the escorts, he can simply get an error message "Please target the leader", or I can move the target automatically to the leader. I tried the latter and it works, but it seems to be a little confusing, so I chose the first method.

The whole thing is basically working already, and I had a successful test run with three vipers. But I still have to fix some minor issues concerning scanner display colours and planet distances. Also, I probably should check if the whole group is aligned correctly before starting, or it would look odd.

Re: [BETA RELEASE] - Synchronised Torus 0.91 (2015-12-11)

Posted: Sat Dec 12, 2015 8:45 pm
by Fritz
Evil things happen during sun skimming. I followed a Boa 2 with three escorts to a sun, where it fuelled up. But the escorts didn't survive this procedure or lost track of their leader, and when the Boa opened a wormhole, they were all gone... :shock:

Next time I'll watch more closely what happens.

Re: [BETA RELEASE] - Synchronised Torus 0.91 (2015-12-11)

Posted: Sun Dec 13, 2015 11:02 am
by Amah
Nice! opens up a lot of opportunies.

I'll check with the RRS salvaging mission and see what happens when I meet a space jelly (I always wondered what they were up to ;-)

Nevertheless, I just followed out of curiosity a lonely viper patroling from sun to witchpoint route

Re: [BETA RELEASE] - Synchronised Torus 0.91 (2015-12-11)

Posted: Sun Dec 13, 2015 12:34 pm
by Fritz
Does space jelly move? But even if it does, I fear that it doesn't qualify as "piloted", so you won't be able to target it for synchronisation. And I wonder if the propulsion system is compatible... :roll:

PS: The next version with convoy abilities will be up in one or two hours!

Re: [BETA RELEASE] - Synchronised Torus 0.91 (2015-12-11)

Posted: Sun Dec 13, 2015 1:45 pm
by Smivs
Fritz wrote:
Does space jelly move?
Not unless you count wobbling :wink:

Re: [BETA RELEASE] - Synchronised Torus 0.91 (2015-12-11)

Posted: Sun Dec 13, 2015 2:48 pm
by Fritz
Version 0.92 is online.

It now works with escort groups, and I've added a "b" key function to show the distance to the next waypoint. I also added the beep sounds used during normal torus drive operation.

Be aware that there are groups around that don't qualify as escort groups but still seem to be connected somehow. These formations are less accurate, if you want to call it formation at all. Most of these groups seem to be pirates or bounty hunters. The OXP doesn't work with them because the escorts aren't really escorts from a technical viewpoint, and it probably wouldn't work if I tried because torus synchronisation needs some order in the group (distances, heading alignment).

It's still a beta version because some more testing has to be done and the group alignment check is not included yet. In practise, the latter doesn't seem to be very important because groups usually are aligned more quickly than the player can join. An asteroid collision warning system seems to be even more unimportant: I've never had an accident or even a near miss, except in situations where I had deliberately aimed at an asteroid, rock hermit, or navigation buoy. Space is big - even in the Ooniverse.

Re: [BETA RELEASE] - Synchronised Torus 0.91 (2015-12-11)

Posted: Sun Dec 13, 2015 2:48 pm
by Fritz
Smivs wrote:
Fritz wrote:
Does space jelly move?
Not unless you count wobbling :wink:
I really must have a look at it!

Re: [BETA RELEASE] - Synchronised Torus 0.91 (2015-12-11)

Posted: Sun Dec 13, 2015 2:54 pm
by Smivs
Ha, sorry, I was joking - they don't really wobble. Actually they are static, but seem to rotate very slowly sometimes.
<Smivs starts wondering if they should wobble...>