From AircraftState.java (AircraftState.class), we can alter the color and intensity of the illumination upon the plane exterior and the cockpit from both nav lights and the landing light. This code is from 4.12.
First, to adjust the color of the lighting (NOT the color of the textures that represent the lamps, but rather the color of the light they emit and thus illuminate their surrounds.)
I've subtly altered the color for the red and green nav lights, making the color a little less pure. Hardly enough to notice without a careful comparison. Look right about at the midpoint of the following listing; the original values are commented after // characters.
But the landing light illumination color has been more obviously altered, matching that for the ground lighting, as outlined in the previous post.
public void set(Actor actor, boolean bool) {
Loc loc = new Loc(0.0, 0.0, 0.0, 0.0F, 0.0F, 0.0F);
Loc loc_2_ = new Loc();
this.actor = actor;
if (actor instanceof Aircraft)
aircraft = (AircraftLH) actor;
else
throw new RuntimeException ("Can not cast aircraft structure into a non-aircraft entity.");
bIsMaster = bool;
for (int i = 0; i < 4; i++) {
try {
astateEffectChunks[i + 0] = this.actor.findHook("_Tank" + (i + 1) + "Burn").chunkName();
astateEffectChunks[i + 0] = astateEffectChunks[i + 0].substring(0, (astateEffectChunks[i + 0].length() - 1));
Aircraft.debugprintln(aircraft, ("AS: Tank " + i + " FX attached to '" + astateEffectChunks[i + 0] + "' substring.."));
} catch (Exception exception) {
/* empty */
} finally {
/* empty */
}
}
for (int i = 0; i < aircraft.FM.EI.getNum(); i++) {
try {
astateEffectChunks[i + 4] = this.actor.findHook("_Engine" + (i + 1) + "Smoke").chunkName();
astateEffectChunks[i + 4] = astateEffectChunks[i + 4].substring(0, (astateEffectChunks[i + 4].length() - 1));
Aircraft.debugprintln(aircraft, ("AS: Engine " + i + " FX attached to '" + astateEffectChunks[i + 4] + "' substring.."));
} catch (Exception exception) {
/* empty */
} finally {
/* empty */
}
}
for (int i = 0; i < astateNavLightsEffects.length; i++) {
try {
astateEffectChunks[i + 12] = this.actor.findHook("_NavLight" + i).chunkName();
astateEffectChunks[i + 12] = astateEffectChunks[i + 12].substring(0, astateEffectChunks[i + 12].length() - 1);
Aircraft.debugprintln(aircraft, ("AS: Nav. Lamp #" + i + " attached to '" + astateEffectChunks[i + 12] + "' substring.."));
HookNamed hooknamed = new HookNamed(aircraft, "_NavLight" + i);
loc_2_.set(1.0, 0.0, 0.0, 0.0F, 0.0F, 0.0F);
hooknamed.computePos(this.actor, loc, loc_2_);
Point3d point3d = loc_2_.getPoint();
astateNavLightsLights[i] = new LightPointActor(new LightPoint(), point3d);
if (i < 2)
astateNavLightsLights[i].light.setColor(1.0F, 0.2F, 0.0F); //(1.0F, 0.1F, 0.0F)
else if (i < 4)
astateNavLightsLights[i].light.setColor(0.1F, 0.8F, 0.0F); //(0.1F, 1.0F, 0.0F)
else
astateNavLightsLights[i].light.setColor(0.85F, 0.8F, 0.75F); //(0.85F, 0.8F, 0.75F)
astateNavLightsLights[i].light.setEmit(0.0F, 0.0F);
this.actor.draw.lightMap().put("_NavLight" + i, astateNavLightsLights[i]);
} catch (Exception exception) {
/* empty */
} finally {
/* empty */
}
}
for (int i = 0; i < 4; i++) {
try {
astateEffectChunks[i + 18] = this.actor.findHook("_LandingLight0" + i).chunkName();
astateEffectChunks[i + 18] = astateEffectChunks[i + 18].substring(0, astateEffectChunks[i + 18].length() - 1);
Aircraft.debugprintln(aircraft, ("AS: Landing Lamp #" + i + " attached to '" + astateEffectChunks[i + 18] + "' substring.."));
HookNamed hooknamed = new HookNamed(aircraft, "_LandingLight0" + i);
loc_2_.set(1.0, 0.0, 0.0, 0.0F, 0.0F, 0.0F);
hooknamed.computePos(this.actor, loc, loc_2_);
Point3d point3d = loc_2_.getPoint();
astateLandingLightLights[i] = new LightPointActor(new LightPoint(), point3d);
/* astateLandingLightLights[i].light.setColor(0.4941176F, 0.9098039F, 0.9607843F); */
astateLandingLightLights[i].light.setColor(0.96F, 0.91F, 0.84F);
astateLandingLightLights[i].light.setEmit(0.0F, 0.0F);
this.actor.draw.lightMap().put("_LandingLight0" + i, astateLandingLightLights[i]);
} catch (Exception exception) {
/* empty */
} finally {
/* empty */
}
}
for (int i = 0; i < aircraft.FM.EI.getNum(); i++) {
try {
astateEffectChunks[i + 22] = this.actor.findHook("_Engine" + (i + 1) + "Oil").chunkName();
astateEffectChunks[i + 22] = astateEffectChunks[i + 22].substring(0, astateEffectChunks[i + 22].length() - 1);
Aircraft.debugprintln(aircraft, ("AS: Oilfilter " + i + " FX attached to '" + astateEffectChunks[i + 22] + "' substring.."));
} catch (Exception exception) {
/* empty */
} finally {
/* empty */
}
}
for (int i = 0; i < astateEffectChunks.length; i++) {
if (astateEffectChunks[i] == null)
astateEffectChunks[i] = "AChunkNameYouCanNeverFind";
}
}
Now to adjust the intensity of the nav light emitters:
The method, setEmit(0.35F, 8F); has the first number representing intensity and the second the distance (in meters) over which the light intensity falls to some fractional intensity (perhaps zero?). As you can see, I dimmed the emitters for the nav lights to about 1/4 the old value. I also reduced the illumination range a bit. This makes for a much more subtle illumination level both externally and internally.
private void doSetNavLightsState(boolean flag)
{
for(int i = 0; i < astateNavLightsEffects.length; i++)
{
if(astateNavLightsEffects[i] != null)
{
Eff3DActor.finish(astateNavLightsEffects[i]);
astateNavLightsLights[i].light.setEmit(0.0F, 0.0F);
}
astateNavLightsEffects[i] = null;
}
if(flag)
{
Loc loc = new Loc(0.0D, 0.0D, 0.0D, 0.0F, 0.0F, 0.0F);
Loc loc1 = new Loc();
for(int j = 0; j < astateNavLightsEffects.length; j++)
{
Aircraft.debugprintln(aircraft, "AS: Checking '" + astateEffectChunks[j + 12] + "' visibility..");
boolean flag1 = aircraft.isChunkAnyDamageVisible(astateEffectChunks[j + 12]);
Aircraft.debugprintln(aircraft, "AS: '" + astateEffectChunks[j + 12] + "' is " + (flag1 ? "visible" : "invisible") + "..");
if(flag1)
{
bNavLightsOn = flag;
String s = "3DO/Effects/Fireworks/Flare" + (j <= 1 ? "Red" : j <= 3 ? "Green" : "White") + ".eff";
astateNavLightsEffects[j] = Eff3DActor.New(actor, actor.findHook("_NavLight" + j), null, 1.0F, s, -1F, false);
/* astateNavLightsLights[j].light.setEmit(0.35F, 8F); */
astateNavLightsLights[j].light.setEmit(0.09F, 6F);
}
}
} else
{
bNavLightsOn = flag;
}
}
Finally, to set the intensity of the landing light emitter (which illuminates the plane and cockpit.) Again, I diminished this to 1/4 the former intensity, but slightly increased the illumination range.
private void doSetLandingLightState(boolean flag)
{
bLandingLightOn = flag;
for(int i = 0; i < astateLandingLightEffects.length; i++)
{
if(astateLandingLightEffects[i] != null)
{
Eff3DActor.finish(astateLandingLightEffects[i]);
astateLandingLightLights[i].light.setEmit(0.0F, 0.0F);
}
astateLandingLightEffects[i] = null;
}
if(flag)
{
Loc loc = new Loc(0.0D, 0.0D, 0.0D, 0.0F, 0.0F, 0.0F);
Loc loc1 = new Loc();
for(int j = 0; j < astateLandingLightEffects.length; j++)
{
Aircraft.debugprintln(aircraft, "AS: Checking '" + astateEffectChunks[j + 18] + "' visibility..");
boolean flag1 = aircraft.isChunkAnyDamageVisible(astateEffectChunks[j + 18]);
Aircraft.debugprintln(aircraft, "AS: '" + astateEffectChunks[j + 18] + "' is " + (flag1 ? "visible" : "invisible") + "..");
if(flag1)
{
String s = "3DO/Effects/Fireworks/FlareWhiteWide.eff";
astateLandingLightEffects[j] = Eff3DActor.New(actor, actor.findHook("_LandingLight0" + j), null, 1.0F, s, -1F);
/* astateLandingLightLights[j].light.setEmit(1.2F, 8F); */
astateLandingLightLights[j].light.setEmit(0.3F, 9F);
}
}
}
}