There's going to be a few ships that don't work, most of the new stuff such as the wolf, bug, the mamba and cobraI alt versions probably won't work, i'll make a start on posting up the edits for the respray script to add them in - there's no way these edits could be saved as a .js file in the relevant ship oxp and somehow read in by Capt. Murphy's scripts is there? - sort of how you can use shipdata-overrrides.plist to add in extra settings to other ships?
anyway here's how to get the gnat oxp working
Ship check code: insert on new lines after the
break on line 696 (although this is just to keep the list of ships in alphabetical order)
Code: Select all
case "Gnat":
this.colours = [0.28,0.26];
this.origColours = [0.28, 0.26];
this.shader = this.gnatShader;
this.material = this.gnatMaterial;
this.decal = ["griff_player_decal.png",[3.1,"0.72 0.765 12.0",3.05,"0.19 0.765 12.0"]];
this.origDecal = ["griff_player_decal.png",[3.1,"0.72 0.765 12.0",3.05,"0.19 0.765 12.0"]];
if (dataKey === "griff_gnat_player_alt_paintmap")
{
this.colours = [0.28,0.26];
this.origColours = [0.28, 0.26];
this.shader = this.gnataltpaintmapShader;
this.material = this.gnatMaterial;
this.decal = ["griff_player_decal.png",[3.1,"0.72 0.765 12.0",3.05,"0.19 0.765 12.0"]];
this.origDecal = ["griff_player_decal.png",[3.1,"0.72 0.765 12.0",3.05,"0.19 0.765 12.0"]];
}
break;
Shader definitions code: insert on new lines in a suitable spot somewhere around line 920 or where ever makes the most sense to you - the ships in this bit of the code don't seem to be in alphabetical order, just don't paste this it in the middle of another ships definitions
Code: Select all
// Gnat
this.gnatShader = {"griff_gnat_diffuse.png":{fragment_shader: "griff_gnat_PLAYER.fragment",textures:["griff_gnat_diffuse.png","griff_gnat_normal.png","griff_gnat_effects.png","griff_player_decal.png"],uniforms:{uColorMap:{type:"texture",value:0}, uNormalMap:{type:"texture",value:1}, uEffectsMap:{type:"texture",value:2}, uDecalMap:{type:"texture",value:3},uTime:"universalTime", alertlevel: "alertCondition", damage_amount: "damage", hull_heat_level: "hullHeatLevel", engine_power: "speedFactor", laser_heat_level: "laserHeatLevel", PaintColor1:{scale: 1.0,type: "randomUnitVector"},PaintColor2:{scale: 1.0,type: "randomUnitVector"}, Decal1_Scale_and_Position:{type:"vector",value:"0.72 0.765 12.0"}, Decal1_Rotation:{type:"float",value:3.1},Decal2_Scale_and_Position:{type:"vector",value:"0.19 0.765 12.0"}, Decal2_Rotation:{type:"float",value:3.05}},vertex_shader:"griff_normalmap_ships.vertex"}}
this.gnataltpaintmapShader = {"griff_gnat_diffuse.png":{fragment_shader: "griff_gnat_PLAYER.fragment",textures:["griff_gnat_diffuse.png","griff_gnat_normal.png","griff_gnat_effects_alt_paintmap.png","griff_player_decal.png"],uniforms:{uColorMap:{type:"texture",value:0}, uNormalMap:{type:"texture",value:1}, uEffectsMap:{type:"texture",value:2}, uDecalMap:{type:"texture",value:3},uTime:"universalTime", alertlevel: "alertCondition", damage_amount: "damage", hull_heat_level: "hullHeatLevel", engine_power: "speedFactor", laser_heat_level: "laserHeatLevel", PaintColor1:{scale: 1.0,type: "randomUnitVector"},PaintColor2:{scale: 1.0,type: "randomUnitVector"}, Decal1_Scale_and_Position:{type:"vector",value:"0.72 0.765 12.0"}, Decal1_Rotation:{type:"float",value:3.1},Decal2_Scale_and_Position:{type:"vector",value:"0.19 0.765 12.0"}, Decal2_Rotation:{type:"float",value:3.05}},vertex_shader:"griff_normalmap_ships.vertex"}}
this.gnatMaterial = {"griff_gnat_diffuse.png":{diffuse_map:"griff_gnat_diffuse.png",emission_map:
{extract_channel:"a",name:"griff_gnat_normal.png"},emission_modulate_color:[0.9926,0.9686,0.9926],shininess:5,specular_color:[0.2,0.2,0.2]}};