Page 1 of 7

Sniper Sight - MilHUD integrated

Posted: Wed Jun 22, 2011 1:56 pm
by Wildeblood
Image

The Seeker of Indulgence moments before its terrible end. There are two versions of the Wildefire Systems Type 1 Gunsight available for download here:-

No, there aren't.

The file "SniperScope.99.zip" is a stand-alone version that can be purchased through the "Ship Outfitting" screen at any tech level 10 planet.

The file "MilHUD-v3.5-WS.zip" is the latest version of Cmdr Wyvern's Military HUD, with the sniper sight already integrated.

Those early prototype versions are long gone, but unfortunately there are still some links from the wiki pointing at this thread. For the latest versions of Sniper Sight and my modified version of MilHUD see these other threads:-

Sniper Sight 2 OXP.

MilHUD 4000 and matching MilHUD 4000 Sniper Sight version.

Re: [WIP] Sniper Scope

Posted: Wed Jun 22, 2011 2:14 pm
by DaddyHoggy
OK....

So, what have you done and how does it work? Some kind of zoom facility? What do the rings do/mean?

Confused and drugged-up on painkillers, so accept my apologies if it should be obvious.

Re: [WIP] Sniper Scope

Posted: Wed Jun 22, 2011 2:55 pm
by Wildeblood
It's what a giant, centred compass looks like. I've been messing about with it all week, making it bigger, bigger, bigger... oops too big, smaller, bigger. After many hours of testing, I've settled on this as the optimum size and transparency to use the compass in place of the usual cross-hairs. When the compass is in target mode, those crosses on the compass follow a target around, and when the two crosses are aligned that target is absolutely dead centre and soon to be history. Much better than the usual cross-hairs.

My problem is this: it's a damned eye-sore when not in target mode - i.e. in beacon mode, planet mode etc. - you get a giant N or W obscuring most of the screen. It needs to be scripted to make it only appear when the compass is in target mode. That's simple and only needs about 8 lines of code, but javascript and I have a hate/hate relationship. Someone else, who knows why some lines end in semi-colons and others don't, could have this finished in 15 minutes. I can describe what the script needs to do.

So spoon-feed me the script, someone! Or wait for a few weeks while I learn.

Image

And this has the advantage that, unlike the usual cross-hairs, it's visible in custom view mode. So it would be ridiculously appropriate for ships that have a custom "Gun Camera" view defined.

Re: [WIP] Sniper Scope

Posted: Wed Jun 22, 2011 3:25 pm
by JensAyton
You might want to get rid of the standard crosshairs. In a HUD plist:

Code: Select all

crosshairs = { OTHER = (); };

Re: [WIP] Sniper Scope

Posted: Wed Jun 22, 2011 3:32 pm
by Zireael
I love the idea. L-O-V-E.
Someone help the guy with scripting, please...

Re: [WIP] Sniper Scope

Posted: Wed Jun 22, 2011 3:45 pm
by Wildeblood
Ahruman wrote:
You might want to get rid of the standard crosshairs. In a HUD plist:

Code: Select all

crosshairs = { OTHER = (); };
Thank you. I actually did hide them by setting them to clearColor in my own HUD. The images above were chosen because they have the standard HUD.

Re: [WIP] Sniper Scope

Posted: Wed Jun 22, 2011 5:04 pm
by Capt. Murphy
I guess it's a custom hud.plist to have the compass like that?

Something like this should start you off.

Code: Select all

this.compassTargetChanged = function(whom, mode)
{
  if (mode == "COMPASS_MODE_TARGET")
{player.ship.hud = "name of your hud.plist with big compass";}
else if (mode != "COMPASS_MODE_TARGET" && player.ship.hud == "name of your hud.plist with big compass")
{player.ship.hud = "name of the standard hud.plist with no big compass";}
}
edit to add - I knew absolutely zilch javascript a couple of months ago and am not a programmer*. I found this website, along with the wiki JS documentation and trawling through other's scripts helped me pick the basics up. I'm still learning.....

http://www.w3schools.com/js/default.asp

* not entirely true - I taught myself 80x86 Assembler a good 5-6 years ago whilst hacking the executable of the game Hardwar to make mods for it. Completely forgotten again now. Oh and I was a whizz on BBC Basic when I was a kid.

Re: [WIP] Sniper Scope

Posted: Wed Jun 22, 2011 5:16 pm
by Wildeblood
Not quite.

Re: [WIP] Sniper Scope

Posted: Wed Jun 22, 2011 5:21 pm
by Capt. Murphy
Wildeblood wrote:

Not quite. Don't go away, yeah?
:lol: unfortunately Vice Admiral Field Commander Mrs Murphy tends to demand I leave the computer alone when she gets home from work. Whilst whipping my trousers off and putting them on herself.

Re: [WIP] Sniper Scope

Posted: Wed Jun 22, 2011 6:50 pm
by Cmdr Wyvern
Finally a use for the compass' target mode! I thought it was as useless as a spammer's rogue product 'till now...

I'll be keeping an eye on this thread, and mebbe take a crack at making it work.

Re: [WIP] Sniper Scope

Posted: Wed Jun 22, 2011 7:16 pm
by Wildeblood
Uploaded a demo, link is in the first post. Just drop it in your AddOns after disabling any custom HUDs. If you like it, and want to add it to your HUD, the bit to copy/paste is right at the top of the hud.plist file, and clearly commented. If you try it and don't like it, please come back and say why.

Re: [WIP] Sniper Scope

Posted: Wed Jun 22, 2011 7:27 pm
by CaptSolo
I applaud your work thus far but for some reason I don't have a problem hitting the mark using only the cross-hairs.

Re: [WIP] Sniper Scope

Posted: Thu Jun 23, 2011 1:43 am
by Cmdr Wyvern
Wildeblood wrote:
Uploaded a demo, link is in the first post. Just drop it in your AddOns after disabling any custom HUDs. If you like it, and want to add it to your HUD, the bit to copy/paste is right at the top of the hud.plist file, and clearly commented. If you try it and don't like it, please come back and say why.
Your link doesn't quite work; that is, it downloads a zip with nothing in it. :?

Anyway, using Cptn Murphy's code and some plist hackery, I managed to add the feature to MilHUD. I swear I just became 50% more lethal to fighters at the extreme edge of scanner range. :twisted:

Re: [WIP] Sniper Scope

Posted: Thu Jun 23, 2011 3:06 am
by Wildeblood
Cmdr Wyvern wrote:
Your link doesn't quite work; that is, it downloads a zip with nothing in it. :?
Sorry about that. Fixed now I hope.

Re: [WIP] Sniper Scope, please test

Posted: Thu Jun 23, 2011 4:46 am
by Capt. Murphy
I've just had a little tester and quite like this. It is a real boon for extreme range sniping when even the sensitive reticle often gets it wrong.

I think it should cost to buy as a final OXP.