Five (5) Variable Crosshairs OXPs

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: another_commander, winston

User avatar
Cmdr Wyvern
---- E L I T E ----
---- E L I T E ----
Posts: 1649
Joined: Tue Apr 11, 2006 1:47 am
Location: Somewhere in the great starry void

Re: Three (3) Variable Crosshairs OXPs

Post by Cmdr Wyvern »

Wildeblood wrote:
Hmm. Are there any more experiences like COMANDERCRUSET and UK_Eliter reported above with Auto-Crosshairs?
Yes.

It works great for a few kills, then sticks in the locked-on mode till I dock. The stick happens randomly, but always immediately on getting a kill.
I tried at fixing it, to no avail.
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
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2286
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia

Re: Three (3) Variable Crosshairs OXPs

Post by Wildeblood »

Wildeblood wrote:
Diziet Sma wrote:
Is it possible to use a combination of any two (or all) of the 3 OXPs to get the set of features one would like to have?
The combination which does not work is selectable cross-hairs with alerting cross-hairs.
I've combined these two into a single OXP, called Active Crosshairs. I think it's working properly, but it needs testing and refining. (In particular the default settings are not particularly good, to encourage you to change them).

Using the "Cross-hairs selector" you can change the cross-hairs at any time, and it should store the setting for that specific weapon type and danger level combination. Shift-N to prime, n for next, b for back.

http://wiki.alioth.net/img_auth.php/c/c ... shairs.oxz

Feedback and bug reports (and donations of fancier cross-hair designs) are welcomed. Obviously, remove the earlier OXPs before testing this one.
User avatar
Captain Beatnik
Deadly
Deadly
Posts: 143
Joined: Sun Feb 27, 2011 10:15 pm
Location: Eastern Bavaria (Average Agricultural Confederacy)

Re: Three (3) Variable Crosshairs OXPs

Post by Captain Beatnik »

Wildeblood wrote:
Zireael wrote:
Is it possible to get round crosshairs with Select-o-matic?
No. That version only had the familiar four, IIRC. I had a version 2.0 with my own crosshair designs as well, which is now lost. But they were all quite traditional. Captain Beatnik has created many original crosshair files, you should ask him.
I don´t know a method to specify a exact circle in the crosshairs.plist (or the hud.plist), but it ist possible to specifiy a polygon as an approximation. Here is a example of a crosshair with a 16-sided-figure:

Image

I think a 16-sided-figure is "round enough" and a reasonable compromise between roundness and effort. Here is the code that specifies the crosshair you see in the picture above:

Code: Select all

WEAPON_MILITARY_LASER =
	(
		//Targetmarker
		(0.75, -0.555,  0.555,		0.75, -0.280,  0.555),
		(0.75,  0.280,  0.555,		0.75,  0.555,  0.555),
		(0.75, -0.555, -0.555,		0.75, -0.280, -0.555),
		(0.75,  0.280, -0.555,		0.75,  0.555, -0.555),
		(0.75, -0.555,  0.555,		0.75, -0.555,  0.280),
		(0.75, -0.555, -0.28,		0.75, -0.555, -0.555),
		(0.75,  0.555,  0.555,		0.75,  0.555,  0.280),
		(0.75,  0.555, -0.280,		0.75,  0.555, -0.555),

		//Circle
		(0.25,  0.000,  1.700,		0.25, -0.651,  1.571),
		(0.25, -0.651,  1.571,		0.25, -1.202,  1.202),
		(0.25, -1.202,  1.202,		0.25, -1.571,  0.651),
		(0.25, -1.571,  0.651,		0.25, -1.700,  0.000),
		(0.25, -1.700,  0.000,		0.25, -1.571, -0.651),
		(0.25, -1.571, -0.651,		0.25, -1.202, -1.202),
		(0.25, -1.202, -1.202,		0.25, -0.651, -1.571),
		(0.25, -0.651, -1.571,		0.25,  0.000, -1.700),
		(0.25,  0.000, -1.700,		0.25,  0.651, -1.571),
		(0.25,  0.651, -1.571,		0.25,  1.202, -1.202),
		(0.25,  1.202, -1.202,		0.25,  1.571, -0.651),
		(0.25,  1.571, -0.651,		0.25,  1.700,  0.000),
		(0.25,  1.700,  0.000,		0.25,  1.571,  0.651),
		(0.25,  1.571,  0.651,		0.25,  1.202,  1.202),
		(0.25,  1.202,  1.202,		0.25,  0.651,  1.571),
		(0.25,  0.651,  1.571,		0.25,  0.000,  1.700),

		//Guidelines
		(0.25,   0.000,   9.000,	0.25,  0.000,  0.100),
		(0.25,   0.000,  -5.000,	0.25,  0.000, -0.100),
		(0.25,  14.000,   0.000,	0.25,  0.100,  0.000),
		(0.25, -14.000,   0.000,	0.25, -0.100,  0.000),
	);
A easy way to get the coordinates of the 16-sided-figure is via Wings3D: Draw a polygon that has 16 corners and the radius you want to have. Wings3D shows you the exact cooridinates of a corner if you select the respective node. The rest is copy and paste. :wink:
I love deadlines. I like the whooshing sound they make as they fly by.
(Douglas Adams, 1952 - 2001)
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2286
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia

Re: Three (3) Variable Crosshairs OXPs

Post by Wildeblood »

Cmdr Wyvern wrote:
Wildeblood wrote:
Hmm. Are there any more experiences like COMANDERCRUSET and UK_Eliter reported above with Auto-Crosshairs?
Yes. It works great for a few kills, then sticks in the locked-on mode till I dock. The stick happens randomly, but always immediately on getting a kill.
I haven't seen this myself, but have a fair idea of what was happening. Version 1.0.5 of Auto Crosshairs is available through the download manager and should fix this.
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2286
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia

Customizing the cross-hair design in Auto Crosshairs

Post by Wildeblood »

From version 1.0.66, Auto Crosshairs OXP can be customized to use a specific cross-hair design with a particular HUD.

To use a different cross-hairs file to the included one there is no need to modify this OXP; Auto Crosshairs can automatically detect and use patches for it in other OXPs. Create a file with the design of cross-hairs you want to use when on target. In any world script (script.js file):

Code: Select all

this.name = "Any name will work";
this.version = "1.0";
Define an object called $autoCrosshairs, and within it an object with the same name as your HUD file:

Code: Select all

this.$autoCrosshairs = {};
this.$autoCrosshairs["hud.plist"] = {};
Then define two properties called off and on with the names of the cross-hair files you want to use when the target is off-centre or on-centre:

Code: Select all

this.$autoCrosshairs["hud.plist"].off = "crosshairs.plist";
this.$autoCrosshairs["hud.plist"].on = "my_fancy_on_target_crosshairs.plist";
You can declare the whole $autoCrosshairs object simply like this:-

Code: Select all

this.$autoCrosshairs = {
    "hud.plist": {
        off: "crosshairs.plist",
        on: "my_fancy_on_target_crosshairs.plist"
    }
}
That example will associate your fancy on-target crosshairs with the default HUD and crosshairs. You can also associate crosshair files with a specific HUD file, e.g.:

Code: Select all

this.$autoCrosshairs = {
    "coluber_hud_ch01.plist": {
        off: "coluber_hud_ch01_off_target_crosshairs.plist",
        on: "coluber_hud_ch01_on_target_crosshairs.plist"
    }
}
It does not matter whether these patches for Auto Crosshairs are in the same OXP as their associated HUD or another OXP.
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2286
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia

Auto Crosshairs OXP version 1.1

Post by Wildeblood »

Auto Crosshairs OXP version 1.1

Because a crosshair reset causes a HUD reset, this now saves and routinely restores reticleTargetSensitive, scannerNonLinear, and scannerUltraZoom settings. (I think this is wrong, but the commoonity seem to think it is right. Too bad if another script is actually trying to change these settings on the fly. A backup copy of the version 1.0.77 script remains inside.)
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2286
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia

Laserific Crosshairs OXP

Post by Wildeblood »

Captain Beatnik wrote:
I don´t know a method to specify an exact circle in the crosshairs.plist (or the hud.plist), but it is possible to specify a polygon as an approximation. Here is a example of a crosshair with a 16-sided-figure...

I think a 16-sided-figure is "round enough" and a reasonable compromise between roundness and effort. Here is the code that specifies the crosshair you see in the picture above...
Thank you, Captain Beatnik. I have used that information as the starting point to create Laserific Crosshairs OXP.
Laserific Crosshairs OXP ver. 1.2

Date: October 4th, 2014
Author: Wildeblood

Adds a circular dial showing the laser heat level around the central cross-hairs. Compatible with most HUDs.
The readme file is lies, all lies, (but no one reads them anyway): it's not a circular dial, it's a 16-sided polygon. (The dial runs anti-clockwise because of my contrarian nature; the first person to suggest selectable clockwise or anti-clockwise dials wins dickhead of the week.)

Yes, a picture is worth a thousand words, so I might come back with one later. OTOH, it's available in the download manager, is a tiny download, and won't leave any changes after it's deleted, so just try it out, yes?
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2286
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia

Re: Laserific Crosshairs OXP

Post by Wildeblood »

I updated Laserific Crosshairs OXP to version 1.3 this morning. I have tidied up the animation a little more - I think it's looking fairly polished now. And, it's now compatible with Auto Crosshairs OXP 1.1 - yes, you can haz both running simultaneously.

I'm getting a bit carried away with the idea of animated cross-hairs, here are three more ideas:-
1) Shieldtastic Crosshairs - put a pair of semicircles over and under the cross-hairs that show the state of your fore and aft shields. I think that would look better than HUDs that have the horizontal bar graphs that always run from left to right over and under the cross-hairs. (It would be better if we could specify HUD dials to run from right to left, then you could put a pair side by side to apparently grow out from the centre.)
2) FPS Crosshairs - run a continuous animation that changes after a fixed number of frames, so the speed of the animation would let you infer Oolite's frame rate.
3) Friend Or Foe Crosshairs - when you target a vessel, leave the cross-hairs like this + if it's hostile, but change them to X if it's harmless.
Zireael
---- E L I T E ----
---- E L I T E ----
Posts: 1396
Joined: Tue Nov 09, 2010 1:44 pm

Re: Four (4) Variable Crosshairs OXPs

Post by Zireael »

+1 to shieldtastic and Friend or Foe.
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2286
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia

Shieldtastic Crosshairs OXP

Post by Wildeblood »

Wildeblood wrote:
Shieldtastic Crosshairs - put a pair of semicircles over and under the cross-hairs that show the state of your fore and aft shields. I think that would look better than HUDs that have the horizontal bar graphs that always run from left to right over and under the cross-hairs.
I went ahead and did that. It took longer than I expected, and I'm not particularly impressed with the result. It works, but I just don't find it particularly useful. It has made me even more suspicious of HUDs that crowd dials around the cross-hairs; to my mind they are just blocking the view. Nevertheless, if you like that sort of thing you might like this. Adding a pair of arcs to the cross-hairs definitely blocks the view less than bar indicators would.
Shieldtastic Crosshairs OXP ver. 1.0
Date: October 8th, 2014
Author: Wildeblood

Adds two semi-circular indicators, showing the state of the shields, around the central cross-hairs. Compatible with most HUDs.
It should work with Auto Crosshairs OXP, too.
Post Reply