Crosshair alignment
Moderators: winston, another_commander
Crosshair alignment
Hi all,
First may I congratulate everyone who worked on this game for an amazing job done. I played frontier as a kid but only dabbled with original elite, and now want to see how far I can get with the strict original elite mode.
One thing i've noticed is that the laser is not aligned with the centre of the crosshairs, but just below centre. I can understand the reasons for this (parallax error?) as the laser is mounted below the pilot, but in my copy of the original elite it lines up with the middle of the crosshairs, and I would like oolite to behave in the same way.
Is it possible to edit the settings to adjust this, or edit the crosshairs themselves?
Thanks a lot
Jon
First may I congratulate everyone who worked on this game for an amazing job done. I played frontier as a kid but only dabbled with original elite, and now want to see how far I can get with the strict original elite mode.
One thing i've noticed is that the laser is not aligned with the centre of the crosshairs, but just below centre. I can understand the reasons for this (parallax error?) as the laser is mounted below the pilot, but in my copy of the original elite it lines up with the middle of the crosshairs, and I would like oolite to behave in the same way.
Is it possible to edit the settings to adjust this, or edit the crosshairs themselves?
Thanks a lot
Jon
- Cmdr. Maegil
- Sword-toting nut-job
- Posts: 1294
- Joined: Tue Feb 27, 2007 10:28 pm
- Location: On the mend in Western Africa
Re: Crosshair alignment
Hi, jonboy, welcome to the Friendliest Board This Side of Riedquat!
To eliminate parallax, you have to align the laser with the view, and that'll require a quick bit of hacking - nothing complicated, really, it's simple enough that even I can do it...
But remember, always make a copy of the file you're about to tweak - even if you don't do something wrong, you may still want to roll back to the original.
Using a text editor such as jEdit or Notepad ++ (WARNING: do NOT use Notepad, it adds corrupting metadata), open the file
Looking at the code, you'll find the Cobbie about a third down the file... but there are four of them:
From this we find out that this is
To eliminate parallax, we have to align the view position with the laser mount- better yet, make it the same just to insure you don't end up looking at your own ship's bulkheads... but where is the laser?
Remember this is a
Replace the view positions for these values, and your lasers will be centred spot-on with the sights.
Save, and restart Oolite while holding the shift key until the spinning ship appears to refresh the cache (or the changes won't take place) - this only needs to be done the first time you try out a modified file.
Hope it helps!
To eliminate parallax, you have to align the laser with the view, and that'll require a quick bit of hacking - nothing complicated, really, it's simple enough that even I can do it...
But remember, always make a copy of the file you're about to tweak - even if you don't do something wrong, you may still want to roll back to the original.
Using a text editor such as jEdit or Notepad ++ (WARNING: do NOT use Notepad, it adds corrupting metadata), open the file
shipdata.plist
located in Oolite\oolite.app\Resources\Config
. This file contains the ships' characteristics, and since you're talking about strict mode, that means you only need to change the Cobra Mk III.Looking at the code, you'll find the Cobbie about a third down the file... but there are four of them:
cobra3-trader
, alternate
, pirate
and player
; we want to change the latter.Code: Select all
"cobra3-player" =
{
like_ship = "cobra3-trader";
energy_recharge_rate = 4;
forward_weapon_type = "WEAPON_PULSE_LASER";
max_energy = 256;
max_flight_speed = 350;
max_missiles = 4;
roles = "player";
thrust = 32;
view_position_aft = "0.0 7.5 -32.5";
view_position_forward = "0.0 7.25 16.25";
view_position_port = "-30.0 4.75 0.0";
view_position_starboard = "30.0 4.75 0.0";
custom_views = .........[list of custom views]
like_ship = "cobra3-trader"
, meaning "a copy except for the following differences", and that its view_position_forward = "0.0 7.25 16.25"
.To eliminate parallax, we have to align the view position with the laser mount- better yet, make it the same just to insure you don't end up looking at your own ship's bulkheads... but where is the laser?
Remember this is a
like_ship
copy? The original template is back up under the cobra3-trader
, and we're looking for the forward weapon position - but since you're already at it, you may as well modify the others.Code: Select all
weapon_position_aft = "0.0 0.0 -32.5";
weapon_position_forward = "0.0 0.0 27.5";
weapon_position_port = "-40.0 2.17 -4.33";
weapon_position_starboard = "40.0 2.17 -4.33";
Save, and restart Oolite while holding the shift key until the spinning ship appears to refresh the cache (or the changes won't take place) - this only needs to be done the first time you try out a modified file.
Hope it helps!
You know those who, having been mugged and stabbed, fired, dog run over, house burned down, wife eloped with best friend, daughters becoming prostitutes and their countries invaded - still say that "all is well"?
I'm obviously not one of them.
I'm obviously not one of them.
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Re: Crosshair alignment
Drawback of removing the parallax is that the laser fires from the viewpoint of the player, what looks awful.Cmdr. Maegil wrote:Hi, jonboy, welcome to the Friendliest Board This Side of Riedquat!
To eliminate parallax, you have to align the laser with the view, and that'll require a quick bit of hacking - nothing complicated, really, it's simple enough that even I can do it...
One other option I never heard of anybody trying is to lower the cross hairs themselves by one or two pixels. e.g. by adding a custom version in the hud. That would mean the hud than only works for that ship of course. (and ships with the same parallax)
And the parallax will still be there, but on long distant shorts the reticle is aligned.
UPS-Courier & DeepSpacePirates & others at the box and some older versions
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
Re: Crosshair alignment
Just one or two additions to Cmdr. Maegil's post:
First, directly editing the shipdata.plist (or any other file) inside Oolite.app is discouraged. Better copy and paste the relevant entry only into another file, which you then can save under the name of shipdata.plist in your AddOns-folder or in AddOns/Config/ (which you can create yourself). This way the program stays intact. Any plist inside AddOns/ will automatically override the corresponding plist in Oolite.app/Contents/Resources/Config/ .
Better yet, name the file you're creating "shipdata-overrides.plist" and let it contain only those keys you actually want to override. So your shipdata-overrides.plist should look exactly like this, provided you're flying a Cobra III:
Second: this works in the same way for all player ships. There are some OXP player ships which already have the same view- and weapon-positions, exactly for the purpose of eliminating the parallax. Most ships have the parallax, however. So, if you want to switch your ship and keep the non-parallax, you have to do the same thing as you did for the Cobra.
First, directly editing the shipdata.plist (or any other file) inside Oolite.app is discouraged. Better copy and paste the relevant entry only into another file, which you then can save under the name of shipdata.plist in your AddOns-folder or in AddOns/Config/ (which you can create yourself). This way the program stays intact. Any plist inside AddOns/ will automatically override the corresponding plist in Oolite.app/Contents/Resources/Config/ .
Better yet, name the file you're creating "shipdata-overrides.plist" and let it contain only those keys you actually want to override. So your shipdata-overrides.plist should look exactly like this, provided you're flying a Cobra III:
Code: Select all
"cobra3-player" =
{
view_position_aft = "0.0 0.0 -32.5";
view_position_forward = "0.0 0.0 27.5";
view_position_port = "-40.0 2.17 -4.33";
view_position_starboard = "40.0 2.17 -4.33";
}
Re: Crosshair alignment
Thanks for the quick and very detailed replies guys. I tried editing the shipdata but as Eric says, it does not look good although technically it solves the problem.
I did a fair bit of testing shooting the navigation buoy outside a coriolis station and realised that actually the laser is targeted right in the middle of the crosshairs, it just doesn't look like it. The laser appears to end as soon as it gets to 1 or maybe 2 pixels thickness, making it look 'shorter' than it really is. I think the ideal fix to this would be to make the laser taper to this thickness then continue at the same until it reaches the infinity point, if that's the right expression. However now I know the centre of the crosshairs is the area I should be placing on the target, it doesn't bother me.
Having the laser firing directly along the line of sight does make apparent what I think is a bit of a bug - the laser acts almost like a solid projectile in that if firing while the ship is moving, the laser image 'lingers' slightly, so if firing while moving rapidly, the pilot's perspective on the lsaer beam changes, whereas a light beam should always appear to be in the swame place relative to the pilot if the gun position is fixed. I guess it is acting more as a plasma than a laser beam - not sure if this is deliberate.
Anyway, enough wittering about minor details, I have some pirates to kill! Thanks again for the help.
Jon
I did a fair bit of testing shooting the navigation buoy outside a coriolis station and realised that actually the laser is targeted right in the middle of the crosshairs, it just doesn't look like it. The laser appears to end as soon as it gets to 1 or maybe 2 pixels thickness, making it look 'shorter' than it really is. I think the ideal fix to this would be to make the laser taper to this thickness then continue at the same until it reaches the infinity point, if that's the right expression. However now I know the centre of the crosshairs is the area I should be placing on the target, it doesn't bother me.
Having the laser firing directly along the line of sight does make apparent what I think is a bit of a bug - the laser acts almost like a solid projectile in that if firing while the ship is moving, the laser image 'lingers' slightly, so if firing while moving rapidly, the pilot's perspective on the lsaer beam changes, whereas a light beam should always appear to be in the swame place relative to the pilot if the gun position is fixed. I guess it is acting more as a plasma than a laser beam - not sure if this is deliberate.
Anyway, enough wittering about minor details, I have some pirates to kill! Thanks again for the help.
Jon
- SandJ
- ---- E L I T E ----
- Posts: 1048
- Joined: Fri Nov 26, 2010 9:08 pm
- Location: Help! I'm stranded down here on Earth!
Re: Crosshair alignment
In the RealWorld™ environment, there are many stories and statistics about:jonboy wrote:I did a fair bit of testing shooting the navigation buoy outside a coriolis station and realised that actually the laser is targeted right in the middle of the crosshairs, it just doesn't look like it.
- how much lead was fired from muskets to kill each man in the American Civil War (approximately his body weight) despite much of it being shot at a range of 30 feet!;
- how many tons of iron was fired from cannon in Napoleonic naval engagements to kill each man;
- how many thousands of rounds were fired from WWII fighters for each one that hit part of another aeroplane;
- how many tens of thousands of rounds of anti-aircraft were shot for each German bomber that was hit;
- how many archers could fire a full quiver of arrows to hit one defender behind a castle battlement (usually all of them for no casualties);
- how hard it is to hit someone with a handgun at ten paces, never mind give them a fatal wound.
So, you intend to fire a 3mm wide laser beam at a target 5 metres high travelling at 0.4 LY at 15km range for one second and expect to hit it with enough energy to make a difference? When viewed at a 1280 pixel resolution that covers about 30 degrees of vision?
It's amazing we ever hit anything!
Flying a Cobra Mk I Cobbie 3 with nothing but Explorers Club.OXP and a beam laser 4 proper lasers for company
Dropbox referral link 2GB of free space online + 500 Mb for the referral: good for securing work-in-progress.
Dropbox referral link 2GB of free space online + 500 Mb for the referral: good for securing work-in-progress.
- Smivs
- Retired Assassin
- Posts: 8408
- Joined: Tue Feb 09, 2010 11:31 am
- Location: Lost in space
- Contact:
Re: Crosshair alignment
Yeah, but we're good!SandJ wrote:
It's amazing we ever hit anything!
Commander Smivs, the friendliest Gourd this side of Riedquat.
- Cmdr Wyvern
- ---- E L I T E ----
- Posts: 1649
- Joined: Tue Apr 11, 2006 1:47 am
- Location: Somewhere in the great starry void
Re: Crosshair alignment
Cannons, muskets, and medieval bows and arrows weren't known for accuracy. Longbows and crossbows could be accurate, but it took a lot of practice for an archer to make impressive shots.SandJ wrote:In the RealWorld™ environment, there are many stories and statistics about:jonboy wrote:I did a fair bit of testing shooting the navigation buoy outside a coriolis station and realised that actually the laser is targeted right in the middle of the crosshairs, it just doesn't look like it.
- how much lead was fired from muskets to kill each man in the American Civil War (approximately his body weight) despite much of it being shot at a range of 30 feet!;
- how many tons of iron was fired from cannon in Napoleonic naval engagements to kill each man;
- how many thousands of rounds were fired from WWII fighters for each one that hit part of another aeroplane;
- how many tens of thousands of rounds of anti-aircraft were shot for each German bomber that was hit;
- how many archers could fire a full quiver of arrows to hit one defender behind a castle battlement (usually all of them for no casualties);
- how hard it is to hit someone with a handgun at ten paces, never mind give them a fatal wound.
So, you intend to fire a 3mm wide laser beam at a target 5 metres high travelling at 0.4 LY at 15km range for one second and expect to hit it with enough energy to make a difference? When viewed at a 1280 pixel resolution that covers about 30 degrees of vision?
It's amazing we ever hit anything!
Muskets weren't accurate to any degree until the invention of the rifled barrel (hence the volley fire method used in combat), and improved further with the introduction of the first bullet, the "miniball". Then came cartridge ammo and breechloading guns. Still, in combat the enemys are trying hard not to get shot, so there's a lot of dodging and covering on both sides, which leads back to volley fire of another kind: machineguns.
In WW2, air combat more involved trying to shoot down the aircraft, and many of those planes, American and German makes especially, were armored and could absorb a lot of abuse.
But that's talking ballistic projectile guns, where gravity, weather, and a lot of other variables apart from the shooter's skill determine where the bullet hits.
Lasers are a whole new ball game. A laser is a coherent light beam, so regardless of the energy used in firing, it always travels at the speed of light, and always in a straight line. Literately line of sight point and shoot. A laser weapon would be ultra accurate if the shooter does his part.
Running Oolite buttery smooth & rock stable w/ tons of eyecandy oxps on:
ASUS Prime X370-A
Ryzen 5 1500X
16GB DDR4 3200MHZ
128GB NVMe M.2 SSD (Boot drive)
1TB Hybrid HDD (For software and games)
EVGA GTX-1070 SC
1080P Samsung large screen monitor
ASUS Prime X370-A
Ryzen 5 1500X
16GB DDR4 3200MHZ
128GB NVMe M.2 SSD (Boot drive)
1TB Hybrid HDD (For software and games)
EVGA GTX-1070 SC
1080P Samsung large screen monitor
- SandJ
- ---- E L I T E ----
- Posts: 1048
- Joined: Fri Nov 26, 2010 9:08 pm
- Location: Help! I'm stranded down here on Earth!
Re: Crosshair alignment
... and not bolted immobile to the hull of the ship, requiring the entire vessel to be moved to aim it!Cmdr Wyvern wrote:A laser weapon would be ultra accurate if the shooter does his part.
Flying a Cobra Mk I Cobbie 3 with nothing but Explorers Club.OXP and a beam laser 4 proper lasers for company
Dropbox referral link 2GB of free space online + 500 Mb for the referral: good for securing work-in-progress.
Dropbox referral link 2GB of free space online + 500 Mb for the referral: good for securing work-in-progress.
Re: Crosshair alignment
If we can assume ships/targets are traveling even 1% the speed of light, then even lasers will need to lead the target at long range.