Graviteam

English-speaking community => Graviteam Tactics: Operation Star => Topic started by: JamesX on January 27, 2015, 04:44:47 PM



Title: Modding Sights Question
Post by: JamesX on January 27, 2015, 04:44:47 PM
In common_res_mod.loc_def is a section on sights which gives the parameters of sights periscopes ect.  What I want to do is to decrease the vision of tanks so they find infantry harder to spot.  Does anyone know which parts of the code to alter to achieve this?


Title: Re: Modding Sights Question
Post by: FB_AGA on January 27, 2015, 05:10:42 PM
You can try the bold parameter

gunner_mg, 20, 0, 0, 0, 1, 1, 0, 0, 4, 0.75, 0.2, 0.04, 1, true, 0, 0, 0, 0, 1, 0.2, 0, 0, false, , , 0, 0, 0, 0, 0, 0, 0, 0, 0, false, 0, 0, 0, 0, false, , , , 0, 0, 0, 0, 0, 0, 0, 0, 0, , ;

It's called the quality. No idea what exactly it will change. To reduce visiability of the infantry only for the tanks only is impossible.

But I've never modded sights, may be I don't know something.


Title: Re: Modding Sights Question
Post by: JamesX on January 27, 2015, 05:32:59 PM
Thanks FB, very useful information, I shall give this a go.  Out of curiosity am I right in guessing that the first number denotes in degrees the field of vision?
ie:  
human_tech, 180, 0, 0, 0, 1, 1, 0, 0, 6, 4, 0.3, 0.1, 1, false..........................
periscope, 45, 0, 0, 0, 1, 1, 0, 0, 6, 4, 0.3, 0.1, 1, true, ..........................................
gunner_mg, 20, 0, 0, 0, 1, 1, 0, 0, 4, 0.75, 0.2, 0.04, 1, true,.....................................

By the way do you have any lists that show what the code denotes in this and other sections?


Title: Re: Modding Sights Question
Post by: Krabb on January 28, 2015, 09:28:41 AM
Yes, it's the field of vision.

Here's the list. I wrote the value type in parentheses - arrays are four integers, vectors are four floats designated as "x", "y", "z", and "w", unused values are "filled" with zeroes.

Name (string)
Field of vision, deg (x: for AI, y: for human at min zoom) (vector)
Initial zoom, final zoom, step (0 - discrete) (vector)
Pointing accuracy of AI (with experience of 0, with experience of 1), z-w - by range (vector)
Sight quality (float)
Sight can be damaged (boolean)
Horizontal rotation angle of the sight (min, max), deg (vector)
Sight applicability coefficient during day-time, night-time (vector)
External sight (used from the external view) (boolean)
Fixed scale (string)
Marker scale (string)
Colors: scale, illumination, eyepiece, light filter (array)
Sight "mask" 0 - no, 1 - wide, 2 - rectangle, 3 - circle, 4 - binoculars (unsigned integer)
Offset or rotation parameters (up-down), scale of velocity, scale of fixed x axis (vector)
Does sight scale rotate (boolean)
Scale of scales, sight "mask" and cursor movement (vector)
Is rangefinder rendered (boolean)
Changeable scale No. 1 (string)
Changeable scale No. 2 (string)
Changeable scale No. 3 (string)
Render type: 0 - normal, 1 - optoelectronic complex, 2 - thermovision (unsigned integer)
Render parameters: x - visibility range, y - temperature contrast in K, w - "smearing" (vector)
Color palette: 0 - cold, 1 - warm (array)
Name (string)
Sprite (string)


Title: Re: Modding Sights Question
Post by: Veteran66 on January 28, 2015, 01:43:02 PM
you can make this idea from NSU?

http://simhq.com/forum/ubbthreads.php/topics/4012173/Re:_[GTMF]_Graviteam_Tactics:_#Post4012173 (http://simhq.com/forum/ubbthreads.php/topics/4012173/Re:_%5BGTMF%5D_Graviteam_Tactics:_#Post4012173)

Krabb: Link fixed.


Title: Re: Modding Sights Question
Post by: Krabb on January 28, 2015, 02:31:27 PM
Why'd you want such an unrealistic sight? :D


Title: Re: Modding Sights Question
Post by: Veteran66 on January 28, 2015, 03:21:31 PM
unrealistic, the binoculars picture is only a sample ;)


Title: Re: Modding Sights Question
Post by: JamesX on January 30, 2015, 01:08:04 PM
Thanks for the info guys. Surprisingly FOV reductions actually seems to make spotting from tanks more effective and focused. So I'm just using quality reduction and the results seem more realistic, especially in infantry vs tanks situations!

By the way, does anyone know where to find the code to increase the effectiveness of entrenchments?


Title: Re: Modding Sights Question
Post by: Krabb on January 30, 2015, 02:02:05 PM
Don't ask the same question everywhere, please.


Title: Re: Modding Sights Question
Post by: JamesX on January 30, 2015, 04:53:18 PM
My apologies sir, it wont happen again.


Title: Re: Modding Sights Question
Post by: Flashburn on January 30, 2015, 09:52:57 PM
You should test in poor light and bad weather.  Lowering sights value will probably result in a blind tank.  In these conditions tanks are pretty blind as it is now.  On a bright sunny day you most certainly can spot stuff rather easy far off.  But what makes tanks so effective is that as soon as things start firing this gives away positions to the tank.  And then it starts mowing things down. 


Title: Re: Modding Sights Question
Post by: Krabb on January 31, 2015, 08:05:14 AM
My apologies sir, it wont happen again.
No need to apologize, it's just a friendly request. :)