Symthic Forum was shut down on January 11th, 2019. You're viewing an archive of this page from 20190108 at 23:52. Thank you all for your support! Please get in touch via the Curse help desk if you need any support using this archive.
Quoted from ""lqud""
General question about recoil mechanic.
....
Quoted from ""Symthic""
Distance still doesn't seem to be working from ini or did the template change aswell?
Titles etc. are tho.
The recoil decrease actually should also be added.
Heres how:
Lets take an example of 0.5 vertical and 0.3 horizontal recoil.
Decrease would be 18, or 1.8 while shooting.
Weapon would have 800rpm rof.
Pixels per degree scale would be 1000
we start from point x1000 y1700
the first shot without spread would land at:
x = 1000 + 1000 * 0.3 = 1300
y = 1700  1000 * 0.5 = 1200
Then we draw triangle between following points:
1000,1700 (the starting point)
1300,1700 (horizontal recoil taken into count but not vertical)
1300,1200 (both recoils taken into account)
Now we need to know length of each side of triangle.
Base is of course 300px (amount of horizontal recoil)
Side is 500px (amount of vertical recoil)
Hypotenuse or what ever its called is
sqrt(300^2+500^2) = 583,09518948453004708741528775456
The amount of decrease in pixels is Scale*Decrease/(RoF/60)
1000 * 1.8 / (800/60) = 135
We need to go 135 pixels towards the starting point from the calculated point of recoil.
we need to draw another triangle to get the coordinates of this point, but we only know the lenght of hypotenuse (135)
The angle of every corner in the triangle stays the same so we can use the same lenght ratios for new triangle than the one we draw before so:
500/583,0951 = 0,85749305730746151013788316862893
300/583,0951 = 0,51449583438447690608272990117736
Then we use these ratios to calculate the the base and side of the triangle with hypotenuse of 135
side = 135 * 0,857 = 115,695
base = 135 * 0,514 = 69,39
The point where shot will land with recoil decrease is
x = 1300  69 = 1231
y = 1200 + 116 = 1316
Quoted from ""lqud""
Thanks for clearing up. Any idea on whats the recoil Max values are for?
Also is there a transcript of Demize's info somewhere?
Yep but what if they're only partly on top of each other?Quoted from ""lqud""
simple for circles aimed at their center
Source code 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 
Public Function getbulletdata(ByVal projectilehash As String, ByVal value As String) Dim viiva = InStr(projectilehash, "") projectilehash = Microsoft.VisualBasic.Mid(projectilehash, viiva + 1, Len(projectilehash)  viiva  1) Dim list As List(Of String) = GetFiles(*path to weapon files* + "\Common\Bullets") Dim data = Nothing For Each path In list data = My.Computer.FileSystem.ReadAllText(path) If InStr(data, projectilehash) Then Exit For End If Next Dim start = InStr(data, value) + (Len(value) + 1) data = Microsoft.VisualBasic.Mid(data, start, 200) Dim val As String = "" Dim leni As Integer = 1 Do Until InStr(val, Environment.NewLine) val = Microsoft.VisualBasic.Left(data, leni) leni += 1 Loop val = Microsoft.VisualBasic.Left(val, Len(val)  2) Return val End Function 
Source code 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 
Public Function GetValue(ByVal weapon As String, ByVal value As String, Optional ByVal stance As String = "Stand") Dim data = GetData(weapon, "") Dim preparsevalues = "IncreasePerShotMinAngleMaxAngleDecreasePerSecondRecoilAmplitudeMaxRecoilAmplitudeIncPerShotHorizo" + _ "ntalRecoilAmplitudeIncPerShotMinHorizontalRecoilAmplitudeIncPerShotMaxHorizontalRecoilAmplitudeMaxRe" + _ "coilAmplitudeDecreaseFactor" If InStr(preparsevalues, value) Then data = Microsoft.VisualBasic.Right(data, Len(data)  InStr(data, "WeaponSwayData")) Else If InStr(value, "MinAngle") Or InStr(value, "MaxAngle") Then data = Microsoft.VisualBasic.Right(data, Len(data)  InStr(data, "WeaponSwayData")) End If End If stance = "" + stance + "" If InStr(stance, "Stand") Then data = Microsoft.VisualBasic.Right(data, Len(data)  InStr(data, "Stand")) ElseIf InStr(stance, "Crouch") Then data = Microsoft.VisualBasic.Right(data, Len(data)  InStr(data, "Crouch")) ElseIf InStr(stance, "Prone") Then data = Microsoft.VisualBasic.Right(data, Len(data)  InStr(data, "Prone")  1) data = Microsoft.VisualBasic.Right(data, Len(data)  InStr(data, "Prone")  1) End If If InStr(value, "ADS") Then data = Microsoft.VisualBasic.Right(data, Len(data)  InStr(data, " Zoom")) ElseIf InStr(value, "HIP") Then data = Microsoft.VisualBasic.Right(data, Len(data)  InStr(data, "NoZoom")) End If If InStr(value, "Base") Then data = Microsoft.VisualBasic.Right(data, Len(data)  InStr(data, "BaseValue")) ElseIf InStr(value, "Moving") Then data = Microsoft.VisualBasic.Right(data, Len(data)  InStr(data, "Moving")) End If If InStr(value, "MinAngle") Then value = "MinAngle" ElseIf InStr(value, "MaxAngle") Then value = "MaxAngle" End If If InStr(value, "Speed") Then data = Microsoft.VisualBasic.Right(data, Len(data)  InStr(data, "InitialSpeed")) value = "z" End If Dim start = InStr(data, value) + (Len(value) + 1) data = Microsoft.VisualBasic.Mid(data, start, 200) Dim val As String = "" Dim leni As Integer = 1 Do Until InStr(val, Environment.NewLine) val = Microsoft.VisualBasic.Left(data, leni) leni += 1 Loop val = Microsoft.VisualBasic.Left(val, Len(val)  2) Return val End Function 
Quoted from ""Symthic""
RobotMonkey, theres something wrong when generating plots with small spread/recoil values.
Recoil goes down and it makes kinda heart shaped plots.
Are you sure you set the recoil decrease function "zeropoint" to same coordinates where the first shot goes wo spread?
Source code 

1 2 3 
If diffYSmall > Math.Abs(ShootY  StartY) Then Return StartY ... If diffXSmall > Math.Abs(StartX  ShootX) Then Return StartX 
Quoted from ""lqud""
Quoted from ""Symthic""
RobotMonkey, theres something wrong when generating plots with small spread/recoil values.
Recoil goes down and it makes kinda heart shaped plots.
Are you sure you set the recoil decrease function "zeropoint" to same coordinates where the first shot goes wo spread?
Think found it.
in recoildecrease function, needs to check for
Source code
1 2 3 If diffYSmall > Math.Abs(ShootY  StartY) Then Return StartY ... If diffXSmall > Math.Abs(StartX  ShootX) Then Return StartX
otherwise it will autocorrect past initial shot which drags it down, left and rigt but not in center (heart shape)
Quoted from ""Jazz""
oke and i'm still waiting for some bipod recoil fix :>
Forum Software: Burning BoardÂ®, developed by WoltLabÂ® GmbH
Â© Design by Symthic.com