https://googledrive.com/host/0B8EFYcEZMa4deTNOUjM2OTlKTVU/xim4ballisticscurvetool.htmlHi everyone, with much thanks to abc123 for helping to update things, the ballistics curve editor is now working for XIM4 codes.

There's also now a new method for editting curves that more visually oriented people should like. Basically when you first load up the tool, it begins with a single line "segment", which is a straight line from 0,0 to the maximum 20,100. If you look below the chart, you'll see a box labelled "Insert", as long as it stays that way, you can add new segment points by clicking on the chart. I.e. if you click somewhere in the middle, it will split the segment into two segments: a straight line to the point you clicked and another segment leading to where the old segment originally led from there.

After laying out all the general places you want to hit with straight segments, you can switch the box from "Insert" to "Curve". In this mode, if you click an area, instead of adding a new segment, it will attempt to curve one of the existing segments to get as close to that point as possible using linear acceleration or deceleration as appropriate. You can switch back and forth between these modes as you see fit.

For the time being, only linear curves are supported, so the types of curvature you can create are limited by that. I may add more types of curves in the future. If you are having trouble bending curves the way you like, try clicking in different areas (i.e. closer to the beginning or endpoints of the segment you are curving versus in the middle, etc.).

If you prefer the old method of working with the generation code, it still works and you can use both interchangeably. I.e. you can use the visual point and click method to get started, then adjust the text of the code to tweak things, and go back to make some more changes by clicking, etc. The chart images can still also be downloaded by clicking the icon in the upper right, or hosted on imgur and pasted into a forum post by clicking the button on the bottom.

The generation code is a little simpler since the XIM4 doesn't include hip and ads in a single code and also doesn't store sensitivity. So for example, you can enter the following:

`0.2 0.3 lineardeceleration 0.4`

0.7 0.8 linear

1 1 lineardeceleration 0.6

Try it out and see what happens. Basically, we have created a simple boost curve for pushing past auto-aim, using linear deceleration curves at the bottom and top to smooth it out. The first line starts with "0.2 0.3", saying we wish to move through the point 20% along the X axis and 30% up the Y-axis. This is followed by "lineardeceleration", stating the type of curve we wish to use to get to that point, along with a parameter specific to linear deceleration curves. Different functions will take different types and numbers of parameters. The next line connects us to the point "0.7 0.8" with a straight line. And the third line finishes off by reaching the top right corner of the graph.

When specifying points, you can enter "?" as the Y coordinate. When doing so, the tool will calculate the curve that would have led to the previous point, then extend it to the new X coordinate and use the Y coordinate that would have naturally resulted. This should not be used on the first point. Note that using this method will prevent the visual graph click editting method from working.

Currently the following functions are supported:

linear - connect two points with a straight line, no parameters

linearacceleration - use a linear acceleration curve, 1 parameter (must be >0). The sensitivity at the endpoint is fixed, and the parameter indicates what the factor of sensitivity rampup from start to end to reach it was. For example a factor of 2 will add twice the starting sensitivity from beginning to end, so the sensitivity at the end of the range will be triple the start.

lineardeceleration - use a linear deceleration curve, 1 parameter (must be >0). The sensitivity at the endpoint is fixed, and the parameter indicates what the factor of sensitivity lowering from start to end to reach it was. For example a factor of 2 will start at an additional twice the ending sensitivity, so the sensitivity at the end of the range will be triple at the start.

logarithmic - a logarithmic curve, 1 parameter (must be >0) indicating the domain range that should be set to match the endpoint (higher values will make for a steeper start, lower values will make the curve straighter)

exponential - an exponential growth curve, 1 parameter (must be >0) indicating the domain range that should be set to match the endpoing (higher values will make for a steeper start, lower values will make the curve straighter)

The three parameters are designed so that if you operate on a region twice as wide, you should double the parameter to achieve a similar curve nature. So looking at the example script, the parameter was raised by 50% for the second deceleration section, because that section covers an area 50% wider, resulting in similar curves.

Curve generation will also create a save link to come back to your work, and forum code to post the results, as will viewing of xim-pasted curves. Following either method, if you want to add images of the graphs to the forum code, you can do so by clicking the button at the bottom of the page. This takes some time, wait until it automatically selects the text to let you know it is complete.

I make no promises about what might happen if you enter weird things (incorrect parameters, points out of order or out of bounds or not reaching the end, etc). Suggestions on what to work on next or bug reports are welcome.