flyxiv / ffxiv_simbot

0 stars 0 forks source link

Make Simulator Board #6

Closed flyxiv closed 3 weeks ago

flyxiv commented 1 month ago

Unlike Wow, FFXIV's damage system is a team effort; we have to calculate the RDPS contribution of each player to actually measure which jobs are beneficial to the party DPS-wise.

To do this, we need to implement a party DPS simulator board instead of a single simulation thread.

Screenshot 2024-04-16 at 8 29 38 AM

flyxiv commented 1 month ago

Class Hierarchy

  1. We need a main board which consists of the following things:
    struct MainBoard {
    party: Rc<Refcell<Player>> // 8 man party
    target: Target // Only single target for now
    buffs_rdps_tracker // Tracks Rdps of each buff by ID.
    }

    Turn Simulator

    • Since FFXIV can only use skill every GCD and two oGCDs 0.7 seconds after each GCD cast, FFXIV combat actually can be dissected to a turn-based combat(since in FFXIV it is always right to be casting for 100% uptime, no pooling) where the player who gets the earliest oGCD/GCD cooldown gets their turn to make a move.
    • We set the start clock of each party member a slight delta time at 0.01 * index, so that the combat times don't overlap. If the turn's combat time overlaps even so, the party member with the lowest index will get their turn.
    • So the turn simulator calculates the combat time when each player can play their next move, and then gives turn to the next player.
    • Also when a player casts a skill/spell, the simulator must update the combat time of all the players in the party to keep track of which buffs expired at the moment of the skill execution.

RDPS Calculator

Every time damage is dealt to target, we need to find which buffs were on each player/target and dissect the damage by the raw damage and the damage contribution of each buff(explained in https://github.com/flyxiv/ffxiv_simbot/issues/5#issuecomment-2053635532)

flyxiv commented 1 month ago

Players

1) Players need to keep track of their multipliers and combat time. 2) They need to keep track of all buffs that are applied to only them. 3) After casting a skill/spell, they must tell the turn simulator to update all the player's combat time and the player must calculate at what combat time their next move will be.

flyxiv commented 1 month ago

This is the final structure version that I think will work. Let's implement based on this

Screenshot 2024-04-18 at 9 01 15 AM

flyxiv commented 1 month ago

Things Needed to Implement

flyxiv commented 3 weeks ago

Added all the basic versions. time to add response results etc.