Her Imperial Majesty's Space Navy

An area for discussing new ideas and additions to Oolite.

Moderators: winston, another_commander

User avatar
Pleb
---- E L I T E ----
---- E L I T E ----
Posts: 908
Joined: Sun Apr 29, 2012 2:23 pm
Location: United Kingdom

Re: Her Imperial Majesty's Space Navy

Post by Pleb »

Diziet Sma wrote:
"If you have official dealings with the Navy" would sound better as "If you have official business with the Navy".
I agree this does sound better. I was using Gimi's text before as I've tried to keep this as true to what Gimi wanted as possible. However I will make this change as the wording sounds much better.
Cody wrote:
Never got to see the plasma cannon - Thunder Child's escorts are ruthless and damn efficient!
However, once I'd been warned-off initially, they didn't attack me until I actually opened fire on the cruiser.
I made the escorts that way to make up for the cruiser's lack of firepower. Also I wanted the Navy to be strong...maybe they're too strong now? However yes I should probably get them to engage if the player hangs around for too long, otherwise it's an empty threat...
Cody wrote:
I'm inclined to think that a Navy station wouldn't have a buoy - Navy pilots, and any civilians who have dealings with the Navy, shouldn't need one.
I added one in more so you could find the station when testing. In the next version you will have to hunt it down and find it yourself... :twisted: (Will still be near planet though so it's not completely undiscoverable! )
Desktop PC: CPU: Intel i7-4790K Quad Core 4.4GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1080Ti RAM: 32GB DDR3

Laptop PC: CPU: Intel i5-10300H Quad Core 4.5GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1650 RAM: 32GB DDR4
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2691
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: Her Imperial Majesty's Space Navy

Post by spara »

Pleb wrote:
As for that log error, I get that too...not sure why it's trying to launch ships out of a buoy?!?! The code for the buoy is:

Code: Select all

	"himsn_station_buoy" = 
	{
		"beacon" = "N";
		"beacon_label" = "Imperial Navy Station";
		"like_ship" = "buoy";
		"name" = "Imperial Navy Navigation Buoy";
		"roles" = "himsn_station_buoy";
		"script" = "himsn_buoy.js";
	};
So there's no reason for it to be trying to launch ships from it... :?
My guess would be the role "himsn_station_buoy", that has the word "station" in it, thus Oolite probably sees it as a station.
User avatar
Pleb
---- E L I T E ----
---- E L I T E ----
Posts: 908
Joined: Sun Apr 29, 2012 2:23 pm
Location: United Kingdom

Re: Her Imperial Majesty's Space Navy

Post by Pleb »

Well I'm going to remove it in the next test release, but I figured out that if you set has_npc_traffic to no then this fixes this problem, which I've already done in the OXZ that's available to download.
Desktop PC: CPU: Intel i7-4790K Quad Core 4.4GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1080Ti RAM: 32GB DDR3

Laptop PC: CPU: Intel i5-10300H Quad Core 4.5GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1650 RAM: 32GB DDR4
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2691
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: Her Imperial Majesty's Space Navy

Post by spara »

Pleb wrote:
Well I'm going to remove it in the next test release, but I figured out that if you set has_npc_traffic to no then this fixes this problem, which I've already done in the OXZ that's available to download.
If you're going to remove it anyway, then it does not matter of course. Note though, that if the game thinks it's a station, you can actually dock it. Even if it has no docks defined, the game creates a virtual dock for it. I have successfully docked a buoy at some point, when I had a word station in it's role.
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Her Imperial Majesty's Space Navy

Post by Diziet Sma »

Pleb wrote:
However yes I should probably get them to engage if the player hangs around for too long, otherwise it's an empty threat...
I was thinking the same thing.. perhaps something along the lines of: "[Player Ship Name] - You have ignored our warning. If you do not leave the area within the next 15 seconds, your ship will be destroyed."
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Her Imperial Majesty's Space Navy

Post by cim »

spara wrote:
My guess would be the role "himsn_station_buoy", that has the word "station" in it, thus Oolite probably sees it as a station.
Correct. A particularly annoying piece of backward-compatibility code, that one.

Code: Select all

is_carrier = 0;
will fix it.
Pleb wrote:
However yes I should probably get them to engage if the player hangs around for too long, otherwise it's an empty threat...
An interesting challenge will be successfully warning off NPCs.
User avatar
Pleb
---- E L I T E ----
---- E L I T E ----
Posts: 908
Joined: Sun Apr 29, 2012 2:23 pm
Location: United Kingdom

Re: Her Imperial Majesty's Space Navy

Post by Pleb »

cim wrote:
Correct. A particularly annoying piece of backward-compatibility code, that one.
Agreed, I have already managed to use Diziet Sma's example and get the cruiser and it's fleet to attack the player if it doesn't leave its vicinity within 15 seconds of being warned the second time (not in the test release on my site yet though, will wait until I've done a bit more before updating this again). However getting it warn off NPCs I left out originally as because it patrols in the lane, it encounters lots of NPCs and they way I have written the code meant it never sent the warning to the player as it waits to resend the warning after it cannot detect a friendly intruder and then resets the warning. But even if it could send the NPC a warning, getting the NPC to heed the advice is a different question... :lol:
Desktop PC: CPU: Intel i7-4790K Quad Core 4.4GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1080Ti RAM: 32GB DDR3

Laptop PC: CPU: Intel i5-10300H Quad Core 4.5GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1650 RAM: 32GB DDR4
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Her Imperial Majesty's Space Navy

Post by Diziet Sma »

Pleb wrote:
I have already managed to use Diziet Sma's example and get the cruiser and it's fleet to attack the player if it doesn't leave its vicinity within 15 seconds of being warned the second time
Speaking personally, it seems a little strange to me that the cruiser would get involved in such a minor task, one more suited to its' escorts.. you don't generally use a sledgehammer to swat a fly. I'd only expect the cruiser to engage the player if it turns out that the escorts have bitten off more than they can chew.. (or maybe launch some backup, if it has carrier capabilities)

(and just 'Dizzy' will do fine.. no need to be all formal :wink: )
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Her Imperial Majesty's Space Navy

Post by cim »

Pleb wrote:
But even if it could send the NPC a warning, getting the NPC to heed the advice is a different question... :lol:
A couple of possibilities:
- send the NPC's ship script (and plist AI, if it has one) the quirium cascade event. That should get them running, but might give odd comms messages as a result.
- if the ship is a carrier, giving it "restricted" allegiance will get NPCs to stay well clear: outside scanner range, most of the time. If it's not a carrier, a small dock just big enough for shuttles could be added.
Diziet Sma wrote:
Speaking personally, it seems a little strange to me that the cruiser would get involved in such a minor task, one more suited to its' escorts.
If the safety zone is only 7km then pretty clearly the cruiser is not actually scared of anything the player might be carrying short of a Q-mine anyway - and even then you'd want to be warning them off well before they got within deployment range. It's the ships 27.5km away using the fact that the cruiser is still a large target at that distance to pile on with military lasers that you've really got to watch for.
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: Her Imperial Majesty's Space Navy

Post by Cody »

cim wrote:
It's the ships 27.5km away using the fact that the cruiser is still a large target at that distance...
The cruiser is too large anyway, in my opinion - it needs to be smaller.
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
Pleb
---- E L I T E ----
---- E L I T E ----
Posts: 908
Joined: Sun Apr 29, 2012 2:23 pm
Location: United Kingdom

Re: Her Imperial Majesty's Space Navy

Post by Pleb »

cim wrote:
A couple of possibilities:
- send the NPC's ship script (and plist AI, if it has one) the quirium cascade event. That should get them running, but might give odd comms messages as a result.
- if the ship is a carrier, giving it "restricted" allegiance will get NPCs to stay well clear: outside scanner range, most of the time. If it's not a carrier, a small dock just big enough for shuttles could be added
To get the NPC's to move away, would the following work?

Code: Select all

this.ship.target.target = this.ship;
this.ship.target.performFlee();
Surely this would make the NPC turn around and flee?
Cody wrote:
The cruiser is too large anyway, in my opinion - it needs to be smaller.
Agreed, I'm using the Thunderchild as an example for a cruiser, but it would probably work better as eye-candy on a mission or near the Navy HQ. A carrier would be better suited to this size, and then the "allegiance" = "restricted"; would work to keep the NPC's away from the carrier and it's fleet. A cruiser would ideally be about half this size and better armed. A carrier should be lightly armed, but have a large escort fleet to engage hostiles.
Diziet Sma wrote:
Speaking personally, it seems a little strange to me that the cruiser would get involved in such a minor task, one more suited to its' escorts.. you don't generally use a sledgehammer to swat a fly. I'd only expect the cruiser to engage the player if it turns out that the escorts have bitten off more than they can chew.. (or maybe launch some backup, if it has carrier capabilities
That would probably be better, maybe the cruiser should only engage the hostile (NPC or player) if the hostile attacks the cruiser.

Unfortunately, as previously stated I have no modelling experience whatsoever, so I myself won't be able to create a cruiser or carrier. I like Gimi's idea of having the ships having an Imperial White texture colour, and they should carry the HIMSN logo/emblem - if anyone has ideas for this I'd be grateful for some direction on this?
Desktop PC: CPU: Intel i7-4790K Quad Core 4.4GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1080Ti RAM: 32GB DDR3

Laptop PC: CPU: Intel i5-10300H Quad Core 4.5GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1650 RAM: 32GB DDR4
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: Her Imperial Majesty's Space Navy

Post by Cody »

Pleb wrote:
... as previously stated I have no modelling experience whatsoever, so I myself won't be able to create a cruiser or carrier.
I'm sure you'll get plenty of ship-model offers - but in case you don't, I happen to know a good shipwright.
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
Pleb
---- E L I T E ----
---- E L I T E ----
Posts: 908
Joined: Sun Apr 29, 2012 2:23 pm
Location: United Kingdom

Re: Her Imperial Majesty's Space Navy

Post by Pleb »

Well I've updated the test release. You now have 8 regional HQ's (Xeer, Ceiner, Vereza, Xeis, Orusge, Anares, Xeusreor and Onanqu systems) and 1 main HQ in the Zaeredre system. There are random encounters in Interstellar space, and random chances of meeting patrols (heavy or light) in other systems. Heavy patrols are lead by an Anaconda, light patrols are led by an Asp. There are also rare encounters with cruisers and recon ships (Constrictors).

I've added a small amount more of dialogue, and I have implemented nearly everything that's been suggested since the last test release (except cruiser not engaging hostiles - will work on this). Same link as before but here it is anyway:

Download Test OXZ
Desktop PC: CPU: Intel i7-4790K Quad Core 4.4GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1080Ti RAM: 32GB DDR3

Laptop PC: CPU: Intel i5-10300H Quad Core 4.5GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1650 RAM: 32GB DDR4
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: Her Imperial Majesty's Space Navy

Post by Cody »

I happened to be close to Xeusreor, so I jumped over there for a look round. The Navy station was in the GalCop aegis, very close to the main station, and did not challenge me as I approached. The log threw five of these, btw:

Code: Select all

01:39:53.348 [script.javaScript.exception.unexpectedType]: ***** JavaScript exception (himsn_station_defender_ai.js 0.2): TypeError: this.homeBase is null
Edit to add: the Navy station is now challenging me on approach.
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
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Her Imperial Majesty's Space Navy

Post by cim »

Pleb wrote:
To get the NPC's to move away, would the following work?

Code: Select all

this.ship.target.target = this.ship;
this.ship.target.performFlee();
Yes, though only until the next AI reevaluation for a JS AI. If you're just trying to keep them at 7km distance, then it'll probably be enough, though. However, if the ship has escorts, the escorts at the next reevaluation will pick up that the mothership is in a fleeing state with a ship targeted, and may well attack to cover its escape...

Setting a destination and getting them to fly there at top speed is probably more reliable, though still might not work in certain cases.

Plist AIs are trickier - it'll certainly get them to run, but there's no guarantee that anything in the plist AI will then respond correctly to the AI events once safe distance is reached, so they might just end up dead in space afterwards until something "expected" like an attack interrupts them.
Post Reply