Page 12 of 15
Posted: Wed Mar 03, 2010 12:36 pm
by Diziet Sma
Scarecrow wrote:As an aside, I'm checking the ships in the front end, where it cycles through all the ship types in the game. I'm assuming that the shaders would be working in this part of the game?
To answer your question, yes, shaders do work in the demo cycle. This does raise a point in my mind, though.
This may be a dumb question, but, given the bolded sentence above, are you sure the entry in the demoships.plist is referencing the ship you are customising? If there's a discrepancy, you'd only see the version in the demoships.plist, rather than the actual version you're editing..
Posted: Wed Mar 03, 2010 1:27 pm
by Scarecrow
Okay, further to my last post on the previous page, I retried the code. I decided not to try and be too clever and instead of interpreting it, I used the lines from the Dredgers OXP exactly, swapping out my own texture names and is still doesn't like it.
Code: Select all
materials =
{
"seraphim.png" = {shininess = 20; specular = (0.75, 0.75, 0.8, 1.0);
normal_map = "seraphim_n.png";};
};
The log gives me this:
Code: Select all
[plist.parse.foundation.failed]: Failed to parse ../AddOns/seraphim.oxp/Config/shipdata.plist as a property list using Foundation. Retrying using homebrew parser. WARNING: the homebrew parser is deprecated and will be removed in a future version of Oolite.
Parse failed at line 51 (char 1658) - extra data after parsed string
[plist.homebrew.parseError]: Property list isn't in XML format, homebrew parser can't help you.
Crow
Posted: Wed Mar 03, 2010 1:28 pm
by another_commander
Which line is line 51?
Posted: Wed Mar 03, 2010 1:36 pm
by JensAyton
The syntax is correct. Possibly you have stray junk like hard spaces, or maybe GNUstep’s parser has problems with the lack of spacing around some of the braces.
If you posted the file, we could fix it.
Posted: Wed Mar 03, 2010 2:18 pm
by Scarecrow
That makes the most sense
Here you go. This is the Shipdata.Plist:
Code: Select all
{
viper =
{
aft_eject_position = "0.0 6.5 -28.0";
ai_type = "route1patrolAI.plist";
cargo_type = "CARGO_NOT_CARGO";
energy_recharge_rate = 4;
exhaust = ("0.0 0.0 -12.5 3.0 3.0 12.0");
forward_weapon_type = "WEAPON_BEAM_LASER";
has_ecm = yes;
laser_color = "magentaColor";
max_energy = 180;
max_flight_pitch = 1.8;
max_flight_roll = 2.8;
max_flight_speed = 320;
missile_launch_position = "-1.5 -5.6 2.0";
missiles = 1;
model = "seraphim_main.dat";
name = "GalCop Viper";
roles = "police oolite-viper";
scanClass = "CLASS_POLICE";
subentities = (
"canopy 0 0 0 1 0 0 0",
"gun 0 0 0 1 0 0 0",
"pilots 0 0 0 1 0 0 0",
"wings 0 0 0 1 0 0 0",
"*FLASHER* 13.5 -9.0 -25.0 260.0 0.5 0.0 8",
"*FLASHER* 25.0 0.0 -20.0 260.0 0.5 0.0 8",
"*FLASHER* 13.5 9.0 -25.0 260.0 0.5 0.0 8",
"*FLASHER* -13.5 9.0 -25.0 260.0 0.5 0.0 8",
"*FLASHER* -25.0 0.0 -20.00 260.0 0.5 0.0 8",
"*FLASHER* -13.5 -9.00 -25.0 260.0 0.5 0.0 8",
"*FLASHER* 13.5 -9.0 -25.0 310.0 0.5 0.5 8",
"*FLASHER* 25.0 0.0 -20.0 310.0 0.5 0.5 8",
"*FLASHER* 13.5 9.0 -25.0 310.0 0.5 0.5 8",
"*FLASHER* -13.5 9.0 -25.0 310.0 0.5 0.5 8",
"*FLASHER* -25.0 0.0 -20.00 310.0 0.5 0.5 8",
"*FLASHER* -13.5 -9.00 -25.0 310.0 0.5 0.5 8",
);
materials =
{
"seraphim.png" = {shininess = 20; specular = (0.75, 0.75, 0.8, 1.0);
normal_map = "seraphim_n.png";};
};
};
thrust = 32;
weapon_position_aft = "0.0 0.0 -27.5";
weapon_position_forward = "2.1 -5.5 23.5.33";
weapon_position_port = "-12.5 0.0 0.0";
weapon_position_starboard = "12.5 0.0 0.0";
};
"canopy" =
{
ai_type = "nullAI.plist";
model = "seraphim_canopy.dat";
name = "seraphim canopy";
smooth = yes;
};
"gun" =
{
ai_type = "nullAI.plist";
model = "seraphim_gun.dat";
name = "seraphim gun";
};
"pilots" =
{
ai_type = "nullAI.plist";
model = "seraphim_pilots.dat";
name = "seraphim pilots";
smooth = yes;
};
"wings" =
{
ai_type = "nullAI.plist";
model = "seraphim_wings.dat";
name = "seraphim wings";
};
}
//
Posted: Wed Mar 03, 2010 2:20 pm
by Scarecrow
AARGH! I think I've just realised what's wrong. I think I've put it inside the sub-entities section, haven't I?
sigh.
I'll test it. brb.
Crow
Posted: Wed Mar 03, 2010 2:30 pm
by Scarecrow
Okay, that didn't work.
However, I noticed that the close bracket above the line
thrust = 32 appeared to be unnecessary - which would explain my previous errors. I deleted that, and it's now compiling without any complaints.
YAY! \0/
However, the Seraphim is once again showing up with apparently no shaders on it
Boo!
This is what the code looks like now:
Code: Select all
{
viper =
{
aft_eject_position = "0.0 6.5 -28.0";
ai_type = "route1patrolAI.plist";
cargo_type = "CARGO_NOT_CARGO";
energy_recharge_rate = 4;
exhaust = ("0.0 0.0 -12.5 3.0 3.0 12.0");
forward_weapon_type = "WEAPON_BEAM_LASER";
has_ecm = yes;
laser_color = "magentaColor";
max_energy = 180;
max_flight_pitch = 1.8;
max_flight_roll = 2.8;
max_flight_speed = 320;
missile_launch_position = "-1.5 -5.6 2.0";
missiles = 1;
model = "seraphim_main.dat";
name = "GalCop Viper";
roles = "police oolite-viper";
scanClass = "CLASS_POLICE";
subentities = (
"canopy 0 0 0 1 0 0 0",
"gun 0 0 0 1 0 0 0",
"pilots 0 0 0 1 0 0 0",
"wings 0 0 0 1 0 0 0",
"*FLASHER* 13.5 -9.0 -25.0 260.0 0.5 0.0 8",
"*FLASHER* 25.0 0.0 -20.0 260.0 0.5 0.0 8",
"*FLASHER* 13.5 9.0 -25.0 260.0 0.5 0.0 8",
"*FLASHER* -13.5 9.0 -25.0 260.0 0.5 0.0 8",
"*FLASHER* -25.0 0.0 -20.00 260.0 0.5 0.0 8",
"*FLASHER* -13.5 -9.00 -25.0 260.0 0.5 0.0 8",
"*FLASHER* 13.5 -9.0 -25.0 310.0 0.5 0.5 8",
"*FLASHER* 25.0 0.0 -20.0 310.0 0.5 0.5 8",
"*FLASHER* 13.5 9.0 -25.0 310.0 0.5 0.5 8",
"*FLASHER* -13.5 9.0 -25.0 310.0 0.5 0.5 8",
"*FLASHER* -25.0 0.0 -20.00 310.0 0.5 0.5 8",
"*FLASHER* -13.5 -9.00 -25.0 310.0 0.5 0.5 8",
);
materials =
{
"seraphim.png" = {shininess = 20; specular = (0.75, 0.75, 0.8, 1.0);
normal_map = "seraphim_n.png";};
};
thrust = 32;
weapon_position_aft = "0.0 0.0 -27.5";
weapon_position_forward = "2.1 -5.5 23.5.33";
weapon_position_port = "-12.5 0.0 0.0";
weapon_position_starboard = "12.5 0.0 0.0";
};
"canopy" =
{
ai_type = "nullAI.plist";
model = "seraphim_canopy.dat";
name = "seraphim canopy";
smooth = yes;
};
"gun" =
{
ai_type = "nullAI.plist";
model = "seraphim_gun.dat";
name = "seraphim gun";
};
"pilots" =
{
ai_type = "nullAI.plist";
model = "seraphim_pilots.dat";
name = "seraphim pilots";
smooth = yes;
};
"wings" =
{
ai_type = "nullAI.plist";
model = "seraphim_wings.dat";
name = "seraphim wings";
};
}
//
Crow
Posted: Wed Mar 03, 2010 2:49 pm
by JensAyton
Put the following in a file named
logcontrol.plist, directly in your AddOns folder:
Code: Select all
{
textureLoader.asyncLoad = yes;
}
Then see if you get the message “[textureLoader.asyncLoad] Loading texture seraphim_n.png” in the log.
Making the corresponding check for some other shader-using OXP is probably a good idea. :-)
Another thing you might do is add an
emission_map with, say, a red and black checkerboard pattern on it. That’s a lot less subtle than a normal map, so it’s easier to be certain whether it’s working or not.
Posted: Wed Mar 03, 2010 2:51 pm
by Eric Walch
Your first example seemed okay but the whole file has a wrong material directory, 2x { but 3x }
I see you already corrected that
Posted: Wed Mar 03, 2010 3:07 pm
by Scarecrow
@Ahruman
No, amongst all the other textureloader lines, all I get related to the Seraphim is this:
Code: Select all
[textureLoader.asyncLoad]: Loading texture seraphim.png
[textureLoader.asyncLoad.notStall]: Texture seraphim.png loaded asynchronously.
It doesn't mention the normal map
Crow
Posted: Wed Mar 03, 2010 3:20 pm
by Scarecrow
ooookaaaaay....
I added the emission map and that showed up. Equally, it's now loading the normal map and specular map too.
hm....
Crow
Posted: Wed Mar 03, 2010 3:31 pm
by Scarecrow
Okay,
I removed the emission map and it now appears to only load the diffuse and normal. It doesn't load the specular.
The body of the Seraphim (That the material applies to appears darker than the other objects).
The code looks like this:
Code: Select all
materials =
{
"seraphim.png" = {shininess = 20;
normal_map = "seraphim_n.png";
specular_map = "seraphim_s.png";};
};
Crow
Posted: Wed Mar 03, 2010 3:40 pm
by JensAyton
You didn’t have a specular map before. :-)
Are you by any chance using simple shader mode?
Posted: Wed Mar 03, 2010 3:43 pm
by Scarecrow
No, I put that code in that you see above but it refuses to load the specular map. It also only loads the normal map if I also put in the emission map.
I am almost certainly running simple shader mode. How do I find out and how do I change it?
Crow
Posted: Wed Mar 03, 2010 3:46 pm
by JensAyton
Scarecrow wrote:I am almost certainly running simple shader mode. How do I find out and how do I change it?
Menu (F2), Game Options…, Shader Effects.