New ships under development

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

Moderators: winston, another_commander

User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: New ships under development

Post by Smivs »

Shipbuilder wrote:
Reading the Shipdata.plist information on the Wiki there is a accutacy ship key for NPC vessels. The available range is -5 to 10.

Does anyone know what value is used as the default if this key is not used ?
From the Wiki
In 1.76 or earlier, when used with NPC ships it slightly enlarges the chance of shooting at greater distances, and makes a small improvement to their aim. Value with NPC ships is between -5 and 10 though all values between -5 and +1 will be increased to +1. When not defined, NPCs will be assigned a random value in the range +1 to +10.
Emphasis added by me.

With regard to the death_actions, I believe this relies on the old legacy scripting methods so may be best avoided. Adding a ship script using a (this.shipDied event handler) is probably a better way to do this these days. Take a look at the cloak and constrictor scripts from the core game to get you started.
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: New ships under development

Post by cim »

Accuracy:
In 1.76 a random value between +1 and +10 will be picked. You will barely notice the difference.

In trunk (and so in 1.77) a random value between -5 and +4.999 will be picked. Values in the +5 to +10 range gradually enable additional combat tactics and improve piloting skill. See[wiki]OXP_NPC_Combat_AI[/wiki] for more details. At +10 they're probably about as good as a Competent human pilot. (The entire -5 to +4.999 range basically covers the "Harmless" rank). If you want to see what this means in practice, download a nightly build of Oolite and my "Combat Arena" testing OXP.

Death actions:
As Smivs says, it's much better to use a ship script for this.
User avatar
Shipbuilder
---- E L I T E ----
---- E L I T E ----
Posts: 877
Joined: Thu May 10, 2012 9:41 pm
Location: Derby

Re: New ships under development

Post by Shipbuilder »

Thanks gents - It looks like the copy of the Shipdata.plist document that I printed some time ago is out of date as it had no mention of the random value selection.

I guess that I should check for updates more often :wink:

Regarding the death actions query I'll have a look at using a scripting method.
The GalTech Industries Corporation - Building ships to populate the galaxies.

Increase the variety of ships within your Ooniverse by downloading my OXPs

Flying the [wiki]Serpent_Class_Cruiser[/wiki] "Thargoid's Bane"
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: New ships under development

Post by Smivs »

Shipbuilder wrote:
Regarding the death actions query I'll have a look at using a scripting method.
This is dead easy - give me a shout if you need any help with it. :)
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Shipbuilder
---- E L I T E ----
---- E L I T E ----
Posts: 877
Joined: Thu May 10, 2012 9:41 pm
Location: Derby

Re: New ships under development

Post by Shipbuilder »

A quick teaser for one of the variety of textured GalTech Escort Fighters due to be released as an oxp soon. This one is the bounty hunter variant.

Image
Last edited by Shipbuilder on Mon Nov 19, 2012 7:39 pm, edited 1 time in total.
The GalTech Industries Corporation - Building ships to populate the galaxies.

Increase the variety of ships within your Ooniverse by downloading my OXPs

Flying the [wiki]Serpent_Class_Cruiser[/wiki] "Thargoid's Bane"
User avatar
Gimbal Locke
---- E L I T E ----
---- E L I T E ----
Posts: 293
Joined: Sun Jan 08, 2012 11:32 pm
Location: Brussels
Contact:

Re: New ships under development

Post by Gimbal Locke »

Shipbuilder wrote:
A quick teaser for one of a variety of textured GalTech Escort Fighters due to be released as an oxp soon. This one is the bounty hunter variant.
I love the "six pirates and a thargoid" detail. And I want one!

Edits: typos.
Last edited by Gimbal Locke on Mon Nov 19, 2012 7:40 pm, edited 2 times in total.
User avatar
Tricky
---- E L I T E ----
---- E L I T E ----
Posts: 821
Joined: Sun May 13, 2012 11:12 pm
Location: Bradford, UK. (Anarchic)

Re: New ships under development

Post by Tricky »

Shipbuilder wrote:
A quick teaser for one of a variety of textured GalTech Escort Fighters due to be released as an oxp soon. This one is the bounty hunter variant.

Image
Inspired by HOTOL? Like the teeth.
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: New ships under development

Post by Cody »

Those teeth bring to mind this pic... and I'd still like a P-51 Mustang!
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
Shipbuilder
---- E L I T E ----
---- E L I T E ----
Posts: 877
Joined: Thu May 10, 2012 9:41 pm
Location: Derby

Re: New ships under development

Post by Shipbuilder »

Thanks Gents - The ship itself kind of evolved from something entirely different (It actually started life as a shuttle).

I must admit though that the shark teeth were inspired by just the type of WW2 aircraft linked to in El Viejo's above post specifically a Hawker Typhoon.
The GalTech Industries Corporation - Building ships to populate the galaxies.

Increase the variety of ships within your Ooniverse by downloading my OXPs

Flying the [wiki]Serpent_Class_Cruiser[/wiki] "Thargoid's Bane"
User avatar
Shipbuilder
---- E L I T E ----
---- E L I T E ----
Posts: 877
Joined: Thu May 10, 2012 9:41 pm
Location: Derby

Re: New ships under development

Post by Shipbuilder »

cim wrote:
Death actions:
As Smivs says, it's much better to use a ship script for this.
Ok I have had a go at a basic script which sends a message from a NPC ship to the player ship upon its destruction which seems to work ok. At the moment it is, however, limited to a single message.

How do I define a list of messages from which Oolite will randomly select one message only and send to the player upon a NPC ship's destruction.

The code I have so far is: -

Code: Select all

this.shipDied = function()
{
	{
		this.ship.commsMessage("Hold fire I surrender");
	}	    
};
The GalTech Industries Corporation - Building ships to populate the galaxies.

Increase the variety of ships within your Ooniverse by downloading my OXPs

Flying the [wiki]Serpent_Class_Cruiser[/wiki] "Thargoid's Bane"
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: New ships under development

Post by Cody »

The Green Gecko has a lot of random shout-outs... you might find a clue in that.
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
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: New ships under development

Post by Commander McLane »

Shipbuilder wrote:
How do I define a list of messages from which Oolite will randomly select one message only and send to the player upon a NPC ship's destruction.
Put the messages in an array:

Code: Select all

this.shipSpawned = function()
{
	this.deathMessage = ["Hold fire I surrender", "Help!", "whatever you come up with", "and so on"];
}
And then let one of the messages be displayed randomly:

Code: Select all

this.shipDied = function()
{
	var choice = Math.floor(Math.random() * this.deathMessage.length);	    
	this.ship.commsMessage(this.deathMessage[choice]);
}
As an aside: you don't need double curly brackets.
User avatar
Shipbuilder
---- E L I T E ----
---- E L I T E ----
Posts: 877
Joined: Thu May 10, 2012 9:41 pm
Location: Derby

Re: New ships under development

Post by Shipbuilder »

@ El Viejo and Commander McLane - Thanks for the feedback. :wink:

I'll crack on with this tonight so should have it up an working shortly.
The GalTech Industries Corporation - Building ships to populate the galaxies.

Increase the variety of ships within your Ooniverse by downloading my OXPs

Flying the [wiki]Serpent_Class_Cruiser[/wiki] "Thargoid's Bane"
User avatar
Shipbuilder
---- E L I T E ----
---- E L I T E ----
Posts: 877
Joined: Thu May 10, 2012 9:41 pm
Location: Derby

Re: New ships under development

Post by Shipbuilder »

Can someone remind me if I want to define a player ship with forward and rear lasers only what number do I use in the weapon facings key in the shipyard.plist?

I know 1 if for forward lasers only and 15 is for all four lasers.
The GalTech Industries Corporation - Building ships to populate the galaxies.

Increase the variety of ships within your Ooniverse by downloading my OXPs

Flying the [wiki]Serpent_Class_Cruiser[/wiki] "Thargoid's Bane"
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: New ships under development

Post by cim »

Post Reply