cloaked ships don't masslock you

For test results, bug reports, announcements of new builds etc.

Moderators: another_commander, winston, Getafix

Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 1998
Joined: Mon May 31, 2010 11:11 pm

Post by Switeck »

I remember seeing the Cougar about 3-5 times on the C64 Elite.
Usually I beat it, through luck or guile (ramming or point-blank missile shot before it could ECM). It was still a very hard fight.

User avatar
Gimi
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 2073
Joined: Tue Aug 29, 2006 5:02 pm
Location: Norway

Post by Gimi »

Gimi wrote:
El Viejo wrote:
Gimi wrote:Hope I still have my save games.
I’ve checked scores of old 3.5 floppies this morning, and I can’t find my Elite Plus saves.
Most annoying, as I’m sure that I wouldn’t have deleted them. Hey-Ho!
Yess!
Have found one save game. Most likely the last one, before I become Elite. Will check this out after exams and report back.
It was not to be.
The save game I found was from just before the constrictor mission. (I always kept the last save game before something was triggered) How anoying. Well, I have more to search through. Still have some old ZIP-disks somewhere with backups of some of my old PC-stuff and even some C-64 stuff I had transferred at some time.
"A brilliant game of blasting and trading... Truly a mega-game... The game of a lifetime."
(Gold Medal Award, Zzap!64 May 1985).

User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2303
Joined: Fri Jul 14, 2006 12:29 pm
Location: Wales

Post by Griff »

I went through the PC 'Elite +' code with a hex editor a while ago, looking for the Stolen viper mission text, i thought it might be fun to implement (basically i wanted an excuse to repaint a police viper with 60s free love hippy camper van art). I was a bit dissapointed to read it was those pesky Thargoids behind the theft, it would have been cooler to have had Anarchists stealing the ship i would have thought, anyway, here's the text bits i found, i've tried to piece them together so the mission result text follows the briefing, but it all seemed to be jumbled up in the code so i've probably got some stuff wrong

Code: Select all


EMERGENCY URGENT MESSAGE

Hi there! Sorry to interrupt you, but I have pleasure in informing you that you have been specially selected from the thousands of travellers passing through this station, to be offered the bargain of the century - the last remaining Tribble in the Universe! For only 5000 credits you can own this remarkable creature - you won't be disappointed!
Do you want to buy it? (Y/N)

---

Our sun is going supernova! You are advised to hyper-space out of the system immediately!
Will you help us (Y/N)?
N: We hope you die a horribly long lingering death at the hands of a slimy green lobstoid or a vicious furry goat-shrew from Xafolif if you're not blown to bits by our sun!
Press any key to continue!

Y: Thank you! I'm afraid that we've had to dump any cargo you had to get all of us refugees in. If you just drop us off at the nearest system, that'll be fine!
Press any key to continue!
Thank you for saving us. Please accept 1000 Credits!
Press any key to continue!

---

One of our military police ships has been stolen by Thargoid infiltrators. We have tracked it to the *some weird variable* system  We would like you to seek out and destroy this ship
Press any key to continue!

upon blasting the ship: "Stolen Viper Destroyed!" is displayed on screen 
TASK COMPLETE - CONGRATULATIONS!
The military thank you for destroying the stolen police ship, and give you a reward of 4000 credits
Press any key to continue

---

We have received a distress signal from the *some weird variable* system which is being bombarded by large rocks and asteroids. All their ships have been destroyed while trying to fragment the asteroids, and the asteroids are now dangerously close to the planet - your mission is to go to the *some weird variable* system and destroy the asteroids before they reach the planet!
Press any key to continue!
Success text:-
Well done - you saved our planet from certain destruction - your reward is 6000 credits!

---

We're getting reports of a new invisible masking device in the *some weird variable* system near by, which allows space craft to become totally invisible.
We would like you to go and find out what's happening and if possible retrieve the mask device!
Press any key to continue!

hints: I hear a *some weird variable* looking ship appeared at Errius. 
       Yeah, I hear a *some weird variable* ship left Errius a while back. 
       Get your iron ass over to Errius. 
       Some new ship was seen at Errius. 
       Try Errius

Failure text:-
It was unfortunate that you could only destroy the masking ship and not actually retrieve the mask device. We shall never know anything about it now.
Press any key to continue!
or
Running away from the mask ship was probably a good idea!
Press any key to continue!

Upon scooping "Masking Device!" is displayed on screen

Success text:- 
This masking device looks very interesting. We will fit a modified version to your space craft as a reward! Use J to activate it, but be careful as it uses a lot of energy
Press any key to continue!

---

Intelligence reports that a nearby system has been invaded by alien Thargoid ships and that the Coriolis orbiting space station is under attack. We suggest that you destroy the space station and  
not try to dock with it if you come across heavy alien concentrations in that system!
Press any key to continue!

whilst in system, and trying to hyper out: Hyperspace Drive is Being Jammed!

Success text:- 
Thank you for destroying the Thargoid base in the last system. From your flight log records, we have found that you were subject to anti ECM broadcasts, which may have affected your hyperspace drive  
unit! We have fitted a device capable of emulating the anti ECM broadcasts, which is activated by using ; We have also awarded you the title Archangel!
Press any key to continue!

When using the device, you get:-
ANTI-ECM OPERATING.
ANTI-ECM SWITCHED OFF
displayed on screen


Welcome to the 9th Galaxy!

The plans for a new Thargoid invasion ship have recently come into our possession - we need to get  them to the technical research labs in the *some weird variable* system, You are required to deliver  
them as quickly as possible  - but watch out for the Thargoids!
Press any key to continue!
Thank you for delivering the Thargoid invasion ship plans - 5000 credits have been added to your account!
Press any key to continue!

User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 13887
Joined: Sat Jul 04, 2009 9:31 pm
Location: Corke's Drift
Contact:

Post by Cody »

That's really interesting Griff.
I was all over Elite Plus and ended up as Archangel, but don't remember the stolen Viper mission.
A squid eating dough in a polyethylene bag is fast and bulbous! Got me?

User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3092
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

..

Post by Lestradae »

Now someone could convert the "Elite +" missions to Oolite - I would really like that.

User avatar
CaptSolo
---- E L I T E ----
---- E L I T E ----
Posts: 893
Joined: Wed Feb 23, 2011 10:08 pm
Location: Preying Manta
Contact:

Re:

Post by CaptSolo »

[quote="Frame"]I also found the vertex data...

Code: Select all

 COUGAR
 &00
 &14,&0E
 vertices
 &00,&05,&43
 -&14,&00,&28
 -&28,&00,-&28
 &00,&0E,-&28
 &00,-&0E,-&28
 &14,&00,&28
 &28,&00,-&28
 -&24,&00,&38
 -&3C,&00,-&14
 &24,&00,&38
 &3C,&00,-&14
 &00,&07,&23
 &00,&08,&19
 -&0C,&02,&2D
 &0C,&02,&2D
 -&0A,&06,-&28
 -&0A,-&06,-&28
 &0A,-&06,-&28
 &0A,&06,-&28
 &00,&00,-&28
Inspired by thread over at Frontier Forums. Vertex hex code demystified:

Code: Select all

// main fuselage
&00,&05,&43
&14,&00,&28
&28,&00,-&28
&00,&0E,-&28
-&28,&00,-&28
&00,-&0E,-&28
-&14,&00,&28
 
// wing extensions
&3C,&00,-&14
&24,&00,&38
-&24,&00,&38
-&3C,&00,-&14

// view port
&00,&07,&23
&00,&08,&19
-&0C,&02,&2D
&0C,&02,&2D

// exhaust 
-&0A,&06,-&28
-&0A,-&06,-&28
&0A,-&06,-&28
&0A,&06,-&28
&00,&00,-&28
The Cougar. Very similar to the Cat from Old Ships OXP, except this model is accurate in its dimensions. In fact, it is significantly larger than the Cat.
Image

User avatar
Milo
---- E L I T E ----
---- E L I T E ----
Posts: 361
Joined: Mon Sep 17, 2018 5:01 pm

Re: cloaked ships don't masslock you

Post by Milo »

Right, so I just discovered this fact independently, and came to this thread to see what was concluded about it, only to find that you all derailed into an admittedly very interesting (and vaguely related) discussion of the cougar and never came to a consensus about the original issue! Cloaked ships still do not mass lock, and I think they should.

another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 5631
Joined: Wed Feb 28, 2007 7:54 am

Re: cloaked ships don't masslock you

Post by another_commander »

I agree. Imagine the scenario: A player against a ship capable of cloaking. The player gets badly beaten. As soon as the NPC cloaks, the player activates torus and warps away. Now picture the reverse: The player is beating the NPC and cloaks. The NPC can never get away because NPCs do not have torus capability. This is wrong and I think I'll send in the fix after all these years, probably tomorrow after some more testing.

another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 5631
Joined: Wed Feb 28, 2007 7:54 am

Re: cloaked ships don't masslock you

Post by another_commander »

Done with commits 4f19c98 and ba63810.

User avatar
Milo
---- E L I T E ----
---- E L I T E ----
Posts: 361
Joined: Mon Sep 17, 2018 5:01 pm

Re: cloaked ships don't masslock you

Post by Milo »

Wouldn't it be slightly more efficient to set the massLocked flag when we change the class instead of checking again in the switch below?

Like this:

Code: Select all

	else if (theirClass != CLASS_NO_DRAW)
	{
		if (EXPECT_NOT (entIsCloakedShip))
		{
			// cloaked ships do mass lock! - Nikos 20200718
			if (ent->zero_distance <= SCANNER_MAX_RANGE2) massLocked = YES;
			theirClass = CLASS_NO_DRAW;
		}
	}

	if (!massLocked && ent->zero_distance <= SCANNER_MAX_RANGE2)
	{
		switch (theirClass)
		{
			case CLASS_NO_DRAW:
			case CLASS_PLAYER:
			case CLASS_BUOY:
			case CLASS_ROCK:
			case CLASS_CARGO:
			case CLASS_MINE:
			case CLASS_VISUAL_EFFECT:
				break;
Instead of this:

Code: Select all

	else if (theirClass != CLASS_NO_DRAW)
	{
		if (EXPECT_NOT (entIsCloakedShip))
		{
			theirClass = CLASS_NO_DRAW;
		}
	}

	if (!massLocked && ent->zero_distance <= SCANNER_MAX_RANGE2)
	{
		switch (theirClass)
		{
			case CLASS_NO_DRAW:
				// cloaked ships do mass lock! - Nikos 20200718
				if (entIsCloakedShip && ![ent isPlayer])
				{
					massLocked = YES;
				}
				break;

another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 5631
Joined: Wed Feb 28, 2007 7:54 am

Re: cloaked ships don't masslock you

Post by another_commander »

I doubt that any kind of difference would be measurable in practical terms. But the real problem here is that the proposed change does not do what we want.

The checkEntityForMassLock method is one that runs every frame. However, because of this:

Code: Select all

else if (theirClass != CLASS_NO_DRAW)
a cloaked ship's scan class is already switched to CLASS_NO_DRAW when the check happens. So the code inside the block is executed only for the specific frame where the ship goes from uncloaked to cloaked. For all other frames following that, it is bypassed and you will not be able to assign massLock = YES to the player ship. I had initially tried it the way you proposed and then had some fun debugging time fiugring out why it didn't work. Anyway, this is why the assignment for massLock has to happen at the stage where we are running the check for theirClass. This is guaranteed to run every frame so we are good. We also need the ![ent isPlayer] check there, otherwise the player ship would become torus-incapable every time the cloaking device got switched on. All tests I've run with the code that got committed indicate no side effects, but if you catch something (and I know you will, if it's there), give a shout.

User avatar
Milo
---- E L I T E ----
---- E L I T E ----
Posts: 361
Joined: Mon Sep 17, 2018 5:01 pm

Re: cloaked ships don't masslock you

Post by Milo »

Hmm, I see. Thanks for the explanation!

Post Reply