RSPSApp / elvarg-rsps

16 stars 39 forks source link

osrs anim values #254

Closed MatthewBishop closed 1 year ago

MatthewBishop commented 1 year ago

Opening a PR for tracking. This will ultimately replace the current animation for weapon walk/run/idle/turn etc with values dumped from OSRS using a runelite plugin. The data is incomplete and just needs more time ingame with the plugin to get the values from the player update packet.

MatthewBishop commented 1 year ago

Plugin is here: https://github.com/MatthewBishop/rl-animations

MatthewBishop commented 1 year ago

image Animations work fine

tobywisener commented 1 year ago

Looks beautiful. Gj man!

MatthewBishop commented 1 year ago

Work to dump projectiles from OSRS using the plugin linked to above.

Projectile dump contains the speed and distance. They are related using the equation below.

    //speed = delay + duration + distance * span);

So, if we have the speed values from 2 separate locations, we can solve this algebraically.

    //we know e, a, c, f, h
    //e = a + b + c * d);
    //f = a + b + h * d);

    //Solve for b and d

    // d = (e - f) / (c - h)

    // b = e - a - (c * d)

    As a result, 
    // span = speed1 - speed2 / (distance1 - distance2)

    // duration = speed1 - delay - (distance * span).

I will be pushing proper projectiles in abit as I plan on redesigning the current range system.

MatthewBishop commented 1 year ago

still need to get data for darts, blowpipe, javelins (when they are not shot from ballista), dark bow+crystal bow+msb spec.

I assume that the crystal bow uses the same arc as shortbows but the source previously differentiated between shortbows and longbows and had darkbows as a type of longbow.

Additionally, blowpipe data vs thrown darts is needed to avoid incorrect derivations of the formula.