If you want to have the reticle off at mission start always, simply set
reticleBrightness = 0.0F;
in the CockpitPilot(String s, String sl) method in CockpitPilot.java.
It's that simple. No need to have an entry of any sort in [Mods] in conf.ini. As long as you're content to always have the reticle off at mission start. I am, and so I use this. If any modder wants to release a version so altered, please have at it!
Following is all code (entire methods) in CockpitPilot.java pertaining to or containing reticle brightness control for this mod. I highlight the relevant line that sets the reticle as OFF at mission start with "<<<<<<--------------------------------------".
public void toggleReticleBrightness()
{
toggleReticleBrightness(null);
}
public void toggleReticleBrightness(String s)
{
int i = -1;
if(s == null)
i = super.mesh.materialFind(getReticleMatName());
else
i = super.mesh.materialFind(s);
if(i != -1)
{
Mat mat = super.mesh.material(i);
mat.setLayer(0);
if(s == null)
reticleBrightness += 0.6F; //increment by 0.6 each key press; 0, 0.6, 1.2, 1.8, 2.4(goes to 0); off, dim, norm, brt, off
if(reticleBrightness >= 1.9F)
reticleBrightness = 0.0F;
float f = reticleBrightness * 0.75F; //bright = 1.8 * 0.75 = 1.35
if(f == 0.0F)
f = 0.0F;
mat.set((byte)24, f);
if((int)(reticleBrightness * 5F + 1.0F) == 1) //0.0 * 5 + 1 = 1
HUD.log("Gunsight Off");
if((int)(reticleBrightness * 5F + 1.0F) == 10) //1.8 * 5 + 1 = 10
HUD.log("Gunsight Bright");
if((int)(reticleBrightness * 5F + 1.0F) == 7) //1.2 * 5 + 1 = 7
HUD.log("Gunsight Normal");
if((int)(reticleBrightness * 5F + 1.0F) == 4) //0.6 * 5 + 1 = 4
HUD.log("Gunsight Dim");
}
}
public String getReticleMatName()
{
return "Reticle";
}
public float getReticleBrightness()
{
return reticleBrightness;
}
public void setReticleBrightness(float f)
{
reticleBrightness = f - 0.2F;
toggleReticleBrightness();
}
public CockpitPilot(String s, String s1)
{
super(s, s1);
stepAzimut = 45F;
stepTangage = 30F;
minMaxAzimut = 145F;
maxTangage = 90F;
minTangage = -60F;
cameraCenter = new Point3d();
isSimpleUse = false;
normZN = -1F;
gsZN = -1F;
normZNs = null;
reticleBrightness = 0.0F; //makes reticle off on mission start <<<<<----------------------------------------
pictBall = 0.0D;
oldBallTime = 0L;
HookNamed hooknamed = new HookNamed(super.mesh, "CAMERA");
Loc loc = new Loc();
hooknamed.computePos(this, super.pos.getAbs(), loc);
loc.get(cameraCenter);
setCameraOffset();
try
{
HookNamed hooknamed1 = new HookNamed(super.mesh, "CAMERAAIM");
loc.set(0.0D, 0.0D, 0.0D, 0.0F, 0.0F, 0.0F);
hooknamed1.computePos(this, super.pos.getAbs(), loc);
cameraAim = new Point3d();
loc.get(cameraAim);
}
catch(Exception exception)
{
System.out.println(exception.getMessage());
exception.printStackTrace();
}
try
{
HookNamed hooknamed2 = new HookNamed(super.mesh, "CAMERAUP");
loc.set(0.0D, 0.0D, 0.0D, 0.0F, 0.0F, 0.0F);
hooknamed2.computePos(this, super.pos.getAbs(), loc);
cameraUp = new Point3d();
loc.get(cameraUp);
}
catch(Exception exception1) { }
super.pos.setBase(aircraft(), new Cockpit.HookOnlyOrient(), false);
interpPut(new Interpolater(), "CockpitPilot", Time.current(), null);
if(HookPilot.current != null)
HookPilot.current.doUp(false);
Main3D.cur3D().camera3D.ZNear = 1.2F;
getZNearLimits();
try
{
Mat mat = super.mesh.material(super.mesh.materialFind(getReticleMatName()));
mat.setLayer(0);
mat.set((byte)24, reticleBrightness);
}
catch(Throwable throwable) { }
}