Alternative ship texture for different ship roles
Moderators: winston, another_commander
- Shipbuilder
- ---- E L I T E ----
- Posts: 877
- Joined: Thu May 10, 2012 9:41 pm
- Location: Derby
Alternative ship texture for different ship roles
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.
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.
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"
Increase the variety of ships within your Ooniverse by downloading my OXPs
Flying the [wiki]Serpent_Class_Cruiser[/wiki] "Thargoid's Bane"
Re: Alternative ship texture for different ship roles
The easiest way to do this is with 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";
...
}
- Shipbuilder
- ---- 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
cim - Thank you for your very prompt response and detailed example.
Much appreciated.
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"
Increase the variety of ships within your Ooniverse by downloading my OXPs
Flying the [wiki]Serpent_Class_Cruiser[/wiki] "Thargoid's Bane"
- Smivs
- 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
You need to like_ship them. Try this and just fill in the gaps with the correct specs.
Aaaargh! Ninja'd by cim 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
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).
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 ***
};
}
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 ***
};
Commander Smivs, the friendliest Gourd this side of Riedquat.
- Shipbuilder
- ---- 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
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.
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"
Increase the variety of ships within your Ooniverse by downloading my OXPs
Flying the [wiki]Serpent_Class_Cruiser[/wiki] "Thargoid's Bane"
- Smivs
- 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
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.
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.
Re: Alternative ship texture for different ship roles
Velove e appuntita has a separate Pirate and Police roles textures if you want to have a look
- Tricky
- ---- 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
Don't forget to use
is_template = yes
for the base used by like_ship- Smivs
- 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
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.Tricky wrote:Don't forget to useis_template = yes
for the base used by like_ship
Commander Smivs, the friendliest Gourd this side of Riedquat.
- Tricky
- ---- 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
Sorry. Was only a quick look on my part. Thought it was a layout for all ships.Smivs wrote: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.Tricky wrote:Don't forget to useis_template = yes
for the base used by like_ship
- Smivs
- 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
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.
- Tricky
- ---- 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
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.
Hopefully in a properly structured way. Helpful when it comes to debugging.
- Rorschachhamster
- ---- E L I T E ----
- Posts: 274
- Joined: Sun Aug 05, 2012 11:46 pm
- Contact:
Re: Alternative ship texture for different ship roles
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?
- Shipbuilder
- ---- 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
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 ?
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"
Increase the variety of ships within your Ooniverse by downloading my OXPs
Flying the [wiki]Serpent_Class_Cruiser[/wiki] "Thargoid's Bane"
- Shipbuilder
- ---- 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
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.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?
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"
Increase the variety of ships within your Ooniverse by downloading my OXPs
Flying the [wiki]Serpent_Class_Cruiser[/wiki] "Thargoid's Bane"