Flyffulator icon indicating copy to clipboard operation
Flyffulator copied to clipboard

LineChart that simulates leveling curve over time

Open 1core0 opened this issue 7 months ago • 2 comments

Hi,

I would like to have a linechart that displays the average time to level up for specific target within the "Experience" tab. Even though, the barchart within the "Experience" tab shows how many kills you need, it would also be helpful to show a level-up-curve as the time investment would be more relevant.

I had a look at the code, there isn't much to add here as all functions are already available. The Atkspd and time consumed per kill should be simulated, so accumulate the time passed and xp gained until 100% reached.

1core0 avatar Jun 23 '25 08:06 1core0

The main struggle with giving a statistic like this is simulating attack speed when we don't have reliable animation information for each attack (which attack is being used for the killing anyway?), as well as very unpredictable spawn information, running between monsters, etc. These things add up to significant values.

Frostiae avatar Jun 23 '25 10:06 Frostiae

The main struggle with giving a statistic like this is simulating attack speed when we don't have reliable animation information for each attack (which attack is being used for the killing anyway?), as well as very unpredictable spawn information, running between monsters, etc. These things add up to significant values.

Yes, I agree. In case of

  • mob density, we set the condition to perfect
  • mob spawn time, we set the condition to null, which means mob availability is never zero
  • mob travel time, we set the condition to avg. of a constant depending on weapon range

As you say, atkspd is very crucial but as far as I remember, simulator had an approx. value how much time you needed to kill a specific target. How about we just calculate a approx. with a range.

For example, character A needs to kill 1000 of mob A to level up. We simulate atkspd as in code:

const aspd = Context.player.getStat("attackspeed", true) / 100 * 2.0;

So its like 1.2 to 2 hits per second, now we can simulate it with existing

damage: getDamage(leftHand), critical: (Context.attackFlags & Utils.ATTACK_FLAGS.CRITICAL) != 0, block: (Context.attackFlags & Utils.ATTACK_FLAGS.BLOCKING) != 0, miss: (Context.attackFlags & Utils.ATTACK_FLAGS.MISS) != 0, parry: (Context.attackFlags & Utils.ATTACK_FLAGS.PARRY) != 0, double: (Context.attackFlags & Utils.ATTACK_FLAGS.DOUBLE) != 0,

depending on the targets block, we can calculate the avg. killing speed, ignore travel time, mob density etc. for the user to display a roughly approx. value how much time is needed.

1core0 avatar Jun 23 '25 10:06 1core0