Log in

View Full Version : [TEC] Getting rid of the hardcoded reticles (Yes, it can be done!!!)


Hitman
02-01-10, 12:52 AM
When I consider how simple the solution was, I feel almost stupid for the time (years!) it has taken to figure it out :damn:

I guess I'll never get accepted at MENSA ... oh well :haha:

On to the topic:

THE PROBLEM:

As most modders know, the reticles seen in the periscopes and UZO in SH3 and SH4 (german uboats, not american ones) are hardcoded and can't be removed away. This has given more of a headache to the modders who wanted to change the look of the reticles, because the old ones would still show, no matter what. The only solution we found for this was to reduce the field of view, and make it smaller than 30º for the periscopes (Because the graticle leaves a space of approximately that size in the centre, where you only see the crosshair). But that of course meant losing field of view at the expense of historical reality, where periscopes had some 38º (In the game it is 40º)

THE SOLUTION:

Well, as you also know, when you zoom in with your mouse wheel, the hardcoded reticle does NOT change its size. It is scaled to display in the proper size of the default zoom you have, which is usually 1.5x

Soooooo :DL if you think that the high power zoom is way less than 30º (Normally 8º-9º) and will as such never show the reticle ....

the simple solution is to INVERT the order of the zoom levels in cameras.dat, making the high power (6x) the default one (First zoom entry in cameras.dat), and the low power (1.5x) the second one (Second zoom entry in cameras.dat) you get when moving the wheel mouse. That way, the reticle is scaled to the 6x default one, and actually is moved off the screen, leaving only the central crosshair :yeah: And you won't see it either when switching zoom to low power, because it doesn't rescale :woot:

That's it gentlemen :rock:

karamazovnew
02-01-10, 01:30 AM
:salute: Brilliant!

keltos01
02-01-10, 01:59 AM
incredible !:yeah:

well thought out of the box Hitman !!!!

:|\\

will ask Peabody to implement that on our scope right away !!!


thanks

keltos

Reece
02-01-10, 02:40 AM
Excellent find Hitman,:yep: funny when the answer for something that has eluded many for years was right under our noses!!:up:

Stiebler
02-01-10, 03:41 AM
Brilliant again!

Stiebler.

h.sie
02-01-10, 03:54 AM
Excellent. Hope I may use your idea in my work?

Mikhayl
02-01-10, 04:59 AM
Ahah, "simple" as that, good job Hitman :rock:
PS: can't wait for your new GUI!

Uber Gruber
02-01-10, 08:57 AM
Nice bit of noggin porn :up:

Hitman
02-01-10, 09:03 AM
Excellent. Hope I may use your idea in my work?

LOL of course, no need to even ask :up:

irish1958
02-01-10, 09:22 AM
Hitman: "I guess I'll never get accepted at MENSA ... oh well"
I know two people who are (?have been?) members, and I can't decide which one is more stupid.

onelifecrisis
02-01-10, 10:08 AM
Heh, finally! :DL

makman94
02-01-10, 10:52 AM
excellent find by you,Hitman ! :up:
yea,the solution is sometimes more than simple
finally ,the scopes can be designed now as it should be
hope that is ok by you to import the changes at cameras to MaGui

one question though ,is there any solution for the reticles color's changing during night ? i mean that i want them to be black during day but ,at night, will not be vissible . any idea at this?

Hitman
02-01-10, 11:33 AM
hope that is ok by you to import the changes at cameras to MaGui

Yes yes already said it, no need even to ask... I posted it here publically as info for free use, by God :D

is there any solution for the reticles color's changing during night ? i mean that i want them to be black during day but ,at night, will not be vissible . any idea at this?

Karamazov discovered that in SH4 graphics hooked to the reticle submenu in the menu.ini (Zoom and "10" marks) would also make the new item behave as those numbers, i.e. black at day and green at night. I haven't gotten it to work yet in SH3, but I have not tried in depth with the different possibilities to do that.

Cheers

makman94
02-01-10, 11:39 AM
Karamazov discovered that in SH4 graphics hooked to the reticle submenu in the menu.ini (Zoom and "10" marks) would also make the new item behave as those numbers, i.e. black at day and green at night. I haven't gotten it to work yet in SH3, but I have not tried in depth with the different possibilities to do that.

Cheers

i get it, have to try it ...
thank you and Kara for the info :up:

karamazovnew
02-01-10, 12:14 PM
http://www.subsim.com/radioroom/showpost.php?p=1205774&postcount=141

The main thing is to parent the objects to the Marking Lines group and have a "WHITE" color channel for the marks file. If you make them black, you won't see any difference. The color will multiply with the green color during the night so white turns to green and black remains black. And they'll always be black during the day. It's sort of like the contact icons for the ships. If you make those white, they'll color themselves to show enemy status (blue, green, black, red). If you make them black, they'll always remain black.

Hitman
02-01-10, 12:43 PM
Ahhh that's the key then :up:

makman94
02-01-10, 01:00 PM
just test it guys ! it working !! now everything can be placed and designed as proper and will change its color during night !
thats great,great news !
matflags=0x29 (<-----this bothered me but setted at 0x29 is working perfect for the attached image for reticles)
really does anybody knows what this matflags is?

karamazovnew
02-01-10, 01:05 PM
just test it guys ! it working !! now everything can be placed and designed as proper and will change its color during night !
thats great,great news !
matflags=0x29 (<-----this bothered me but setted at 0x29 is working perfect for the attached image for reticles)
really does anybody knows what this matflags is?

All you need to know is that it must be 0x9 for any rotating object (dial needles) or button that changes its image and 0x29 for anything else.

makman94
02-01-10, 01:33 PM
All you need to know is that it must be 0x9 for any rotating object (dial needles) or button that changes its image and 0x29 for anything else.

yes, but at compass entry is 0x1 ....i am thinking if at matflags is the answer for solving an issue at the compass image i am using at MaGui(its a very bigger image) (the image of compass is not highlited perfect during night)

Dani
02-02-10, 10:11 AM
@ Hitman

So, can we soon expect a new optics mod for NYGM,with visible marks at night?;)