Alternative ship texture for different ship roles

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

Moderators: winston, another_commander

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

Alternative ship texture for different ship roles

Post by Shipbuilder »

I am in the process of developing a new ship OXP and would like to use a variety of different ship textures for the different roles.

For example the player ship would have one texture but the OXP would then use different textures for a ship with other roles such as police, pirate etc.

I am putting together different texture files at the moment as follows:-

Myshipname.png
Myshipname_police.png
Myshipname_pirate.png

Would anyone be able to post an example of Openstep code that I can use to achieve this ?

Any help with this would be much appreciated. :wink:
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: Alternative ship texture for different ship roles

Post by cim »

The easiest way to do this is with [EliteWiki] like_ship.

Code: Select all

"myship" = {
   ...
   roles = "pirate";
   materials = "myship_pirate.png";
   ...
};

"myship-police" = {
   like_ship = "myship";
   scan_class = "CLASS_POLICE";
   roles = "police";
   materials = "myship_police.png";
   ...
}

"myship-player" = {
   like_ship = "myship";
   materials = "myship_player.png";
   ...
}
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: Alternative ship texture for different ship roles

Post by Shipbuilder »

cim - Thank you for your very prompt response and detailed example. :D

Much appreciated.
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: Alternative ship texture for different ship roles

Post by Smivs »

You need to like_ship them. Try this and just fill in the gaps with the correct specs.

Code: Select all

{
	"myship" =
	{
		aft_eject_position = "0.0 -4.5 -23.0";
		ai_type = "route1traderAI.plist";
		auto_ai = yes;
                *** other code **
                materials = 
		{ 
	        "myship.png" = 
                               {  
                               emission_map = "myship_em-map.png";s
                               shininess = 10;
                               specular_color = ( 0.3, 0.3, 0.3, 0.5 );  
                               };  
		};
		model = "myship_redux.dat";
		name = "Myship";
		roles = "trader";           
                ***other code ***
        };
        "myship_police" =
	{
		like_ship = "myship";
		ai_type = "route1patrolAI.plist";    
		auto_ai = yes;         
                *** other code ***
                materials = 
		{ 
		"myship.png" = 
                               {  
                               diffuse_map = "myship_police.png";
                               emission_map = "myship_police_em-map.png";
                               shininess = 10;
                               specular_color = ( 0.3, 0.3, 0.3, 0.5 ); 
                               };  
		};
		model = "myship_redux.dat";
		name = "Myship Police";
		roles = "police";   
                *** other code ***
	};
        "myship_pirate" =
	{
		like_ship = "myship";
		ai_type = "pirateAI.plist";
		auto_ai = yes;
                *** other code ***
                materials = 
		{ 
		"myship.png" = 
                               {  
                               diffuse_map = "myship_pirate.png";
                               emission_map = "myship_pirate_em-map.png";
                               shininess = 10;
                               specular_color = ( 0.3, 0.3, 0.3, 0.5 ); 
                               };  
		};
		model = "myship_redux.dat";
		name = "Myship Pirate";
		roles = "pirate";
                *** other code ***
	};
}
Aaaargh! Ninja'd by cim :roll: I made the standard an NPC - if its a player ship then just remove the AI references and add 'Player' as the role, like this

Code: Select all

	"myship-player" =
	{             
like_ship = "myship";
                *** other code **
                materials = 
		{ 
	        "myship.png" = 
                               {  
                               emission_map = "myship_em-map.png";
                               shininess = 10;
                               specular_color = ( 0.3, 0.3, 0.3, 0.5 );  
                               };  
		};
		model = "myship_redux.dat";
		name = "Myship";
		roles = "player";           
                ***other code ***
        };
which will give the player the same texture/em-map as the trader. Of course it can also use a unique texture (as per the pirate and police versions).
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: Alternative ship texture for different ship roles

Post by Shipbuilder »

Cheers Smivs - I have been busily putting together some alternative textures that I am pretty pleased with.

I would post a teaser screenshot or two but I appear to be having problems uploading to Photobucket this morning.
Last edited by Shipbuilder on Sat Nov 17, 2012 11:15 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
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Alternative ship texture for different ship roles

Post by Smivs »

Look forward to seeing them :)

Re the code above, just to be clear, this will allow you to use just one model for all the varieties. The .dat file will have 'myship.png' (the trader version) as the specified texture, then the police, pirate and player versions will have the correct textures applied.
Commander Smivs, the friendliest Gourd this side of Riedquat.
Knotty
Dangerous
Dangerous
Posts: 66
Joined: Sat Jun 09, 2012 11:22 pm

Re: Alternative ship texture for different ship roles

Post by Knotty »

Velove e appuntita has a separate Pirate and Police roles textures if you want to have a look
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: Alternative ship texture for different ship roles

Post by Tricky »

Don't forget to use is_template = yes for the base used by like_ship
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Alternative ship texture for different ship roles

Post by Smivs »

Tricky wrote:
Don't forget to use is_template = yes for the base used by like_ship
I don't think this is required/necessary if the 'base' ship (the one you are 'like_ship'-ing to) is an actual ship used in the game, as in my example above.
Commander Smivs, the friendliest Gourd this side of Riedquat.
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: Alternative ship texture for different ship roles

Post by Tricky »

Smivs wrote:
Tricky wrote:
Don't forget to use is_template = yes for the base used by like_ship
I don't think this is required/necessary if the 'base' ship (the one you are 'like_ship'-ing to) is an actual ship used in the game, as in my example above.
Sorry. Was only a quick look on my part. Thought it was a layout for all ships.
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Alternative ship texture for different ship roles

Post by Smivs »

No worries...it's a good point to make. 'is_template' is essential if the base is purely a template which is not an actual ship used in the game, and we don't know exactly how shipbuilder is structuring his OXP.
Commander Smivs, the friendliest Gourd this side of Riedquat.
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: Alternative ship texture for different ship roles

Post by Tricky »

Smivs wrote:
No worries...it's a good point to make. 'is_template' is essential if the base is purely a template which is not an actual ship used in the game, and we don't know exactly how shipbuilder is structuring his OXP.
:lol:

Hopefully in a properly structured way. Helpful when it comes to debugging. :wink:
User avatar
Rorschachhamster
---- E L I T E ----
---- E L I T E ----
Posts: 274
Joined: Sun Aug 05, 2012 11:46 pm
Contact:

Re: Alternative ship texture for different ship roles

Post by Rorschachhamster »

short related question: Is there a way to make a ship take on a random texture, or would I have to randomize wich ship is used after having all possible textures defined via shipdata.plist?
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: Alternative ship texture for different ship roles

Post by Shipbuilder »

Thanks gents for your advice and suggestions. I have almost completed the various textures the aim then is to set up a shipdata.plist which will define the player ship with the standard texture then set up in detail one of the npc roles including the alternative option. The remaining npc ships can then be set up using the like_ship method.

Once I've got everything set up and have carried out some play-testing would anyone be willing to take a look at a pre-release version of this oxp as it is the first one I have looked at using Openstep ?
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: Alternative ship texture for different ship roles

Post by Shipbuilder »

Rorschachhamster wrote:
short related question: Is there a way to make a ship take on a random texture, or would I have to randomize wich ship is used after having all possible textures defined via shipdata.plist?
As far as I am aware this is not possible but I'm sure one of the noggins will be along shortly to confirm either way.

I do think that this would be a great option.

A question to the development team - If this is not currently an option would there be any chance that this could be looked at for a future release ?
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"
Post Reply