Heh - "ease myself back in" indeed! I've spent much of this evening running up against my own limitations
Still, I guess the only way from here is up...
On the texturing front...
I've tried tinkering with the main texture - even installing a new graphics program, GIMP, to see if that would help me - but only succeeded in making it worse
I think the problem (aside from my woeful lack of knowledge when it comes to computer-arty stuff) is that the sheer size of the model relative to the dimensions of the texture (512 x 512) means it ends up being pretty lo-res. I deliberately held back on the texture size to prevent the thing from crippling performance on lower-spec machines - do you guys think this was the right decision, or would it be safe to go higher? For now I've just made a very subtle change and moved on to the docking bay...
Well, I say moved on - mostly what I've done is (attempt to) read up on this whole materials/shaders malarkey, while uttering such exclamations as "Oh, Jesus Christ!" and "But... but...
how?!" and wishing I had more liquor to hand
My goal is to emulate the "glow" of the docking bay on the Navy Station (with Sung's textures). My best hope would appear to be borrowing from Griff's Illumimated Docking Bay OXP (assuming he would be OK with this).
Now then... The Shaders dictionary in shipdata makes sense to me. The shaders themselves...
Would I be right in thinking that ahruman-generic.vertex is an all-purpose vertex shader that'll give reasonable results with anything? Similarly, will griff_dockingbay.fragment work with my textures? Looking at the code for this scares me, quite frankly - I can see how to adjust the "glossiness" and the glow colour, I assume I can lose the two "uniform float" lines near the top, but I'm stumped by just about everything else! My fear is that some of this stuff is linked to coordinates on Griff's textures - if this is the case, then I'm probably screwed.
And then we come to the textures themselves, which is where I'm going to sound really stupid
Clearly I need three textures - my standard one (the equivalent of Griff's unshaded_diffuse texture), the standard one simply renamed (for the shaders to use) and a third one containing red- and blue-channel information. Now, I can see how to select each channel of an image separately in GIMP. But, uh, what do I actually do?
In what channel(s) should I draw, and with what colour/type of tool, to end up with my nice blue-, red-and-black texture, with red denoting "constant light", blue "ambient light" and black "shadow"?
On the AI front...
@Eric Walsh
The HQ successfully launches defence ships despite not having the station role. I'm assuming that increaseAlertLevel is working too, though that's not so observable. Here is the DEFENSE_MODE part of the AI, so you can see the full picture:
Code: Select all
"DEFENSE_MODE" = {
ATTACKED = (setTargetToPrimaryAggressor, increaseAlertLevel, launchDefenseShip);
ENTER = (checkTargetLegalStatus);
EXIT = ();
"RED_ALERT" = (launchDefenseShip);
"YELLOW_ALERT" = ("setStateTo: IDLE");
"CONDITION_YELLOW" = ("setStateTo: IDLE");
"CONDITION_GREEN" = ("setStateTo: IDLE");
"INCOMING_MISSILE" = (fireECM, increaseAlertLevel, setTargetToPrimaryAggressor, launchDefenseShip);
"TARGET_OFFENDER" = (increaseAlertLevel);
"TARGET_FUGITIVE" = (increaseAlertLevel);
"ENERGY_FULL" = ("pauseAI: 1800.0", "setStateTo: IDLE");
"OFFENCE_COMMITTED" = (setTargetToFoundTarget, "markTargetForOffence: 15", launchDefenseShip, increaseAlertLevel);
"TARGET_DESTROYED" = ("pauseAI: 1800.0", "setStateTo: IDLE");
"TARGET_LOST" = ("pauseAI: 1800.0", "setStateTo: IDLE");
"NO_TARGET" = ("pauseAI: 1800.0", "setStateTo: IDLE");
UPDATE = ();
};
Ah Ahruman put a very powerful debugging tool in for this. "Target_key_dump". Select the target, press capital "H" and look inside Oolites logfile.
Forgive my ignorance - I'm feeling very stupid tonight. So in Oolite, I press (shift?) H, then close the program and look... where?
It's been too long since I did any of this stuff.
setTargetToPrimaryAggressor - yes, I spotted the new info on this on the Wiki. Will setTargetToFoundTarget work as a response to ATTACKED and "INCOMING_MISSILE"? Or does it require a scanFor...?
@matt634
The HQ is already ridiculously well defended, but it might be nice to have a random chance of encountering a Frigate undergoing a final test flight in the system, prior to being handed over to the Navy. I could even have it perform a weapons test on a stationary target! Let me know what you think - at the moment I've got more than enough on my plate, but it would make a nice finishing touch to the package