http://assets.povray-planets.org/static ... ta.oxp.zip
Edit: thank you Commander McLane for pointing out how this happened.
Moderators: winston, another_commander
That mainly depends on what do you mean by "not working".submersible wrote:If anyone can tell me why the ballturret is only working for system populated ships and not the player... that would be great.
Sorry - that was poorly explained. The turret appears in the shipyard, and on ships encountered in system. If I buy one and launch with it , no turret appears and no plasma bolts appear to fire at my target when at range.Commander McLane wrote:That mainly depends on what do you mean by "not working".submersible wrote:If anyone can tell me why the ballturret is only working for system populated ships and not the player... that would be great.
yup - that was it. Another testing OXP. Right On Commander McLane - thankyou.Commander McLane wrote:Wild guess: have you any OXP installed that manipulates subentities? If the turret is clearly visible on the shipyard, but not when you launch, it must have been removed in-between. Some OXPs could do that.
shaders
directory seems to be totally botched, I can't make any sense of it; (3) as a result I'm not totally sure that the number of closing brackets in the end is correct, it seems too high. I'm not even able to fix it in PlistEdit Pro.roles = "hunter(5.0) trader(1.0) pirate(2.0) tetra"
. (This sole entry nevertheless features custom_views
, which don't make sense for an NPC.) So the ship shouldn't even appear in a shipyard.Code: Select all
{
"tetra-glitter" = {
accuracy = 8;
"ai_type" = "route1patrolAI.plist";
"custom_views" = (
{
"view_description" = "Rear View";
"view_orientation" = "1.0 0.0 0.0 0.0";
"view_position" = "5.0 30.0 -250.0";
"weapon_facing" = FORWARD;
},
{
"view_description" = "Rear Right View";
"view_orientation" = "0.9239 0.0 0.3827 0.0";
"view_position" = "191.42 30.0 -191.42";
"weapon_facing" = FORWARD;
},
{
"view_description" = "Right View";
"view_orientation" = "0.7071 0.0 0.7071 0.0";
"view_position" = "250.0 30.0 5.0";
"weapon_facing" = FORWARD;
},
{
"view_description" = "Front Right View";
"view_orientation" = "0.3827 0.0 0.9239 0.0";
"view_position" = "191.42 30.0 191.42";
"weapon_facing" = FORWARD;
},
{
"view_description" = "Front View";
"view_orientation" = "-5.0 0.0 1.0 0.0";
"view_position" = "0.0 30.0 250.0";
"weapon_facing" = FORWARD;
},
{
"view_description" = "Front Left View";
"view_orientation" = "0.3827 0.0 -0.9239 0.0";
"view_position" = "-191.42 30.0 191.42";
"weapon_facing" = FORWARD;
},
{
"view_description" = "Left View";
"view_orientation" = "0.7071 0.0 -0.7071 0.0";
"view_position" = "-250.0 30.0 0.0";
"weapon_facing" = FORWARD;
},
{
"view_description" = "Rear Left View";
"view_orientation" = "0.9239 0.0 -0.3827 0.0";
"view_position" = "-191.42 30.0 -191.42";
"weapon_facing" = FORWARD;
},
{
"view_description" = "Top View";
"view_orientation" = "-0.7071 0.7071 0.0 0.0";
"view_position" = "0.0 290.0 0.0";
"weapon_facing" = FORWARD;
},
{
"view_description" = "Bottom View";
"view_orientation" = "0.0 0.0 0.7071 0.7071";
"view_position" = "0.0 -290.0 0.0";
"weapon_facing" = FORWARD;
}
);
"energy_recharge_rate" = "3.5";
exhaust = (
"0.0 -1.0 -12.3 4.0 5.0 9.0",
"-5.0 -7.7 -12.3 4.0 5.0 9.0",
"5.0 -7.7 -12.3 4.0 5.0 9.0"
);
"forward_weapon_type" = "WEAPON_MILITARY_LASER";
"laser_color" = "1.0 0.8 0.3";
materials = {
"tetrahedron2_auv.png" = {
"emission_and_illumination_map" = "tetrahedron2_emission.png";
normalmap = "tetrahedron2_normal.png";
"specular_map" = "tetrahedron2_auv.png";
};
};
"max_cargo" = 5;
"max_energy" = 280;
"max_flight_pitch" = "1.5";
"max_flight_roll" = "2.0";
"max_flight_speed" = 480;
"max_missiles" = 2;
"missile_launch_position" = "0.0 -19.0 11.0";
model = "tetra_16.dat";
name = "Tetra Yacht";
roles = "hunter(5.0) trader(1.0) pirate(2.0) tetra";
shaders = {
"tetrahedron2_auv.png" = {
"fragment_shader" = "glitter.fragment";
textures = (
"tetrahedron2_auv.png",
"tetrahedron2_normal.png",
{
"mag_filter" = nearest;
"min_filter" = nearest;
name = "tetrahedron2_normal_flake.png";
"repeat_s" = yes;
"repeat_t" = yes;
},
{
"cube_map" = yes;
name = "small_environment_cube.png";
},
{
name = "tetrahedron2_emission.png";
},
"tetrahedron2_spectrum.png"
);
uniforms = {
orientation = {
binding = orientation;
type = binding;
};
position = {
binding = position;
type = binding;
};
uCameraPos = {
binding = relativePosition;
type = binding;
};
uDiffuseMap = {
type = texture;
value = 0;
};
uEmission = {
type = texture;
value = 4;
};
uEnvironment = {
type = texture;
value = 3;
};
uFlake = {
type = texture;
value = 2;
};
uNormalMap = {
type = texture;
value = 1;
};
uSpectrum = {
type = texture;
value = 5;
};
};
"vertex_shader" = "glitter.vertex";
};
};
subentities = (
{
"fire_rate" = "0.75";
orientation = "0.5 0.0 0.8666 0.0";
position = "0.0 45.60 -26.26";
"subentity_key" = ballturret;
type = "ball_turret";
}
);
thrust = 120;
"view_position_aft" = "0.0 15.0 -13.0";
"view_position_forward" = "0.0 31.9375 16.0";
"view_position_port" = "-16.0 4.0 0.0";
"weapon_position_forward" = "0.0 8.7 53.0";
"weapon_position_port" = "44.087 -29.471 -12.307";
};
}
Code: Select all
17:31:09.277 [shader.compile.failure]: ***** ERROR: GLSL vertex shader compilation failed for glitter.vertex:
>>>>> GLSL log:
ERROR: 0:2: '' : #version must occur before any other statement in the program
17:31:09.277 [shader.load.fullModeFailed]: ----- WARNING: Could not build shader glitter.vertex/glitter.fragment in full complexity mode, trying simple mode.
17:31:09.278 [shader.compile.failure]: ***** ERROR: GLSL vertex shader compilation failed for glitter.vertex:
>>>>> GLSL log:
ERROR: 0:2: '' : #version must occur before any other statement in the program
17:31:09.278 [shader.load.failed]: ***** ERROR: Could not build shader glitter.vertex/glitter.fragment.
Code: Select all
17:33:23.078 [exception]: ***** Exception during [update:entity [<ShipEntity 0x102906a00>{"Tetra Yacht" position: (5845.52, -17434.8, 402348) scanClass: CLASS_NEUTRAL status: STATUS_IN_FLIGHT}]] in [Universe update:] : NSGenericException : *** Collection <NSCFSet: 0x11aacfcb0> was mutated while being enumerated.<CFBasicHash 0x11aacfcb0 [0x7fff70bb6ee0]>{type = mutable set, count = 1,
entries =>
1 : <ShipEntity 0x12331d400>{"Missile" position: (5831.51, -17417.3, 402431) scanClass: CLASS_MISSILE status: STATUS_DEAD}
}
*****
Much more so than the Mac parser, certainly. If you update to more recent GNUstep libraries then you'll get Latest.log warnings on parsing for that sort of thing, though not particularly helpful ones (they give line and character of the parse warning ... but not the file)submersible wrote:It has struck me before that in linux the plist parsing seems to be very forgiving of key quoting , dictionary semicolons and dangling commas in arrays. I'll keep up the reading and try to get all these ducks in a row before posting in future.
Un-conscious - almost in a coma actually. I've since adjust it into a -template , -player and -npc and placed in -player definition in shipdata.plist and it seems to be working . The glsl #version requirement is tricky, casting mat4 to mat3 requires that #version 120 is declared, however this declaration strictly should be the very first line of the shader and I think oolite adds some boilerplate at the top.Commander McLane wrote:In this OXP submersible has (consciously or not) chosen a different approach: there is only one variant in shipdata.plist, defining the keys for both NPC and player ship.
Code: Select all
//mat3 EnvOrient = mat3(orientation); // casting m4 to m3 requires #version 120
mat3 EnvOrient = mat3( orientation[0] , orientation[1], orientation[2] );
I've listed this as a lost oxp. If there is a working .oxp anywhere, I'd be happy to create a page for it.submersible wrote: ↑Thu Mar 07, 2013 1:06 pmWork in progress , experimenting with modelling and shaders for ships. The Glitter ship 'Tetra Yacht' , preferred vessel of the incredibly vain.
http://swarm.perlide.org/static/Glitter-beta.oxp.zip
If anyone can tell me why the ballturret is only working for system populated ships and not the player... that would be great.
Edit: thank you Commander McLane for pointing out how this happened.