ffxivcalc


Nameffxivcalc JSON
Version 0.8.930 PyPI version JSON
download
home_pagehttps://github.com/IAmPythagoras/FFXIV-Combat-Simulator
SummaryDPS simulator for Final Fantasy XIV.
upload_time2024-03-30 20:59:39
maintainerNone
docs_urlNone
authorAnthony Desrochers
requires_python>=3.10
licenseNone
keywords ffxiv xiv dps simulator ffxiv-combat-simulator
VCS
bugtrack_url
requirements contourpy cycler fonttools kiwisolver matplotlib numpy packaging Pillow pyparsing python-dateutil six coreapi pandas python_graphql_client
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![Discord](https://img.shields.io/discord/970724799464738977?color=7289da&label=Discord&logo=discord)](https://discord.gg/mZXKUNy2sw)

# Website

The website https://ffxivdpscalc.azurewebsites.net allows an easier time for people without coding knowledge to use the simulator.
It uses the most up to date version of FFIXV-Combat-Simulator, but has some limitations to keep computation time low.

# Install

You can install this library using pip : 

```
pip install ffxivcalc
```

or using git (this would let you download from the dev branch "feature/GeneralDev"): 

```
pip install ffxiv-combat-simulator@git+https://github.com/IAmPythagoras/FFXIV-Combat-Simulator.git@main
```

*Note that you must have git installed : https://git-scm.com/download/win 

You can find the documentation here : https://iampythagoras.github.io/index.html or join the discord linked above if you have any questions.

If you want to locally use the API. Install the ffxiv-combat-simulator library and also install uvicorn :
```
pip install uvicorn
```
And then run this command:
```
python -m uvicorn ffxivcalc.API.API:app
```
This will locally launch the API.

# FFXIV-Combat-Simulator (ffxivcalc)

This Python library lets you simulate combat from the game Final Fantasy XIV. It allows for as many players as possible and will simulate the fight in "real time". It
accurately keeps track of MP, cooldown on abilities, HP, DOTs, raid buffs, personnal buffs, team composition bonus, potions buff, which allows for a dynamic environment that portrays as accurately as possible the real game's environment.

The simulator in its base state will output every player's DPS (Damage Per Second), PPS (Potency Per Second), TP (Total Potency), but it can be customized to output any other metric that could be useful. Furthermore, the simulator is able to output a distribution of the DPS which allows to see the different DPS' percentiles.

Here are some examples of simulations :

BlackMage doing opener and some more :

![image](https://github.com/IAmPythagoras/FFXIV-Combat-Simulator/assets/62820030/5bde764b-7e4a-4fa5-9bc5-8668e716f1d9)
![image](https://github.com/IAmPythagoras/FFXIV-Combat-Simulator/assets/62820030/8f8fd525-6b17-4582-a490-1da3ae8f0bfb)
![image](https://github.com/IAmPythagoras/FFXIV-Combat-Simulator/assets/62820030/40304b27-af47-4181-bdff-d8d02b414cfd)

Here are some of the results the simulator will output : A text result, a graph of DPS over time and a graph of the distribution.

BlackMage, Dancer, Dragoon, Scholar doing opener and some more :

![image](https://github.com/IAmPythagoras/FFXIV-Combat-Simulator/assets/62820030/e3e8e2c7-935d-49fa-91c8-745f134e01e1)
![image](https://github.com/IAmPythagoras/FFXIV-Combat-Simulator/assets/62820030/f351ec39-c241-4ffb-9722-a6ce7098c5b9)
![image](https://github.com/IAmPythagoras/FFXIV-Combat-Simulator/assets/62820030/9972f6aa-e0ef-4a63-a908-2b106ecff814)

Note that the Blackmage's DPS is higher because it received all the buffs.

This library also has a built-in BiS (best in slot) solver. The advantage of using this one is that instead of simply maximizing the DPS of a dummy rotation, the simulator allows the solver to take into account the different raid buffs and when they are in effect. This means that the solver will find a BiS that is dependant on the simulation you want it to optimize damage in.

Learn more about the simulator and how to use it by going to the official documentation website : https://iampythagoras.github.io/index.html

With version 0.8.10 you can now output a "Simulation record" as a pdf file that shows information about the simulation :

![image](https://github.com/IAmPythagoras/FFXIV-Combat-Simulator/assets/62820030/88069e5d-8ffa-4783-acc3-b1b02c3ce33e)

This record's goal is to act as a sort of log, but which is more easily understood and contains only the most useful information on the running of the simulation.
You can also export a text only version of this record.
# Rotation BiS Solver 

As of ffxivcalc version 0.8.00, this library now has a built in rotation BiS solver. You can use the ffxivcalclayout.py in order to experiment with it.

You can read this PDF [BiS_Solver_Algorithm_Documentation.pdf](https://github.com/IAmPythagoras/FFXIV-Combat-Simulator/files/12580553/BiS_Solver_Algorithm_Documentation.pdf) if you are interested in its
functionning. 

You can read about the experimental results of this solver here : https://docs.google.com/spreadsheets/d/1yVl-F1tHARYIYvz4ZPxIY6MayakYug3OEqpGnpZllqU/edit?usp=sharing

# Validity of simulator

As of version 0.8.30 I have started adding in depth testing of the simulator. The simulator will still have some flaws, but it is currently being checked by around 430 individual tests. More tests
will be added with time.

# Discord bot): 
DISCORD BOT IS CURRENTLY OFFLINE. WILL UPDATE HERE WHEN IT IS AVAILABLE
I made a disbord bot that uses the python library ffxivcalc in order to simulate fights. Feel free to install it using the link below. As of now, the main bot commands are :
```
!Simulate (With a JSON file as a file in the same message)
!Template <filename> <job1> <job2> ... (Generates a template JSON file used to simulate)
!Help (for help)
```
Use this link to install the bot on your server : 
```
https://discord.com/oauth2/authorize?client_id=1071922835011932290&permissions=274878024704&scope=bot
```

# Currently Working On

Adding code to support multiple enemies at the same time and individual targetting of enemy by the players.


# HOW IT WORKS

The big advantage of this program is that instead of computing the average PPS (potency per second) and then using a damage formula to find the
DPS (Damage per second), it simulates the fight like it would happen in real time. That way, buffs are accurately taken into account. It is also able to discernate between oGCD and GCD, and will treat them accordingly (for weaving and stuff).The program can also see if a rotation is illegal, and will stop if it is determined to be a rotation that cannot be done in the game.

The time-unit used for the program is by default 0.01s/step, but it can be put at whatever smaller (or bigger) number we prefer. It is also able to know when a certain ability cannot be casted, and using that ability anyway will result in an error that stops the simulation. We could in theory disable this checking if we wanted.

Each job in the game is implemented in a relatively similar way. We first create a class JobSpell, which will be an object that will represent a spell/ability/weaponskill of the job. Such an object will have information like casting time, recast time (if GCD), potency, manacost, effect of applying that spell and the requirements of that spell. We then also need to create a class JobPlayer, which will inherit certain traits for its parent class (Healer, Caster, Melee, Ranged or Tank) (This is also the case for spell). This JobPlayer class will contain information like Ability Cooldown, Buff Timer, DOTTimer and other stuff that need to be tracked during the execution of the simulation.

And that's about it, the code will take these two new classes (and object of the JobSpell class) and if everything is done correctly the simulator will be able to run without any issues.

# If you want to help

If you want to help or want to ask questions to me directly, feel free to join the discord linked above:)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/IAmPythagoras/FFXIV-Combat-Simulator",
    "name": "ffxivcalc",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "ffxiv, xiv, dps, simulator, ffxiv-combat-simulator",
    "author": "Anthony Desrochers",
    "author_email": "anthony.desrochers17@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/63/84/fa34576e499e37dbbb28828eb644bf8d23c50af8f6c2c25441ec6cce81db/ffxivcalc-0.8.930.tar.gz",
    "platform": null,
    "description": "[![Discord](https://img.shields.io/discord/970724799464738977?color=7289da&label=Discord&logo=discord)](https://discord.gg/mZXKUNy2sw)\r\n\r\n# Website\r\n\r\nThe website https://ffxivdpscalc.azurewebsites.net allows an easier time for people without coding knowledge to use the simulator.\r\nIt uses the most up to date version of FFIXV-Combat-Simulator, but has some limitations to keep computation time low.\r\n\r\n# Install\r\n\r\nYou can install this library using pip : \r\n\r\n```\r\npip install ffxivcalc\r\n```\r\n\r\nor using git (this would let you download from the dev branch \"feature/GeneralDev\"): \r\n\r\n```\r\npip install ffxiv-combat-simulator@git+https://github.com/IAmPythagoras/FFXIV-Combat-Simulator.git@main\r\n```\r\n\r\n*Note that you must have git installed : https://git-scm.com/download/win \r\n\r\nYou can find the documentation here : https://iampythagoras.github.io/index.html or join the discord linked above if you have any questions.\r\n\r\nIf you want to locally use the API. Install the ffxiv-combat-simulator library and also install uvicorn :\r\n```\r\npip install uvicorn\r\n```\r\nAnd then run this command:\r\n```\r\npython -m uvicorn ffxivcalc.API.API:app\r\n```\r\nThis will locally launch the API.\r\n\r\n# FFXIV-Combat-Simulator (ffxivcalc)\r\n\r\nThis Python library lets you simulate combat from the game Final Fantasy XIV. It allows for as many players as possible and will simulate the fight in \"real time\". It\r\naccurately keeps track of MP, cooldown on abilities, HP, DOTs, raid buffs, personnal buffs, team composition bonus, potions buff, which allows for a dynamic environment that portrays as accurately as possible the real game's environment.\r\n\r\nThe simulator in its base state will output every player's DPS (Damage Per Second), PPS (Potency Per Second), TP (Total Potency), but it can be customized to output any other metric that could be useful. Furthermore, the simulator is able to output a distribution of the DPS which allows to see the different DPS' percentiles.\r\n\r\nHere are some examples of simulations :\r\n\r\nBlackMage doing opener and some more :\r\n\r\n![image](https://github.com/IAmPythagoras/FFXIV-Combat-Simulator/assets/62820030/5bde764b-7e4a-4fa5-9bc5-8668e716f1d9)\r\n![image](https://github.com/IAmPythagoras/FFXIV-Combat-Simulator/assets/62820030/8f8fd525-6b17-4582-a490-1da3ae8f0bfb)\r\n![image](https://github.com/IAmPythagoras/FFXIV-Combat-Simulator/assets/62820030/40304b27-af47-4181-bdff-d8d02b414cfd)\r\n\r\nHere are some of the results the simulator will output : A text result, a graph of DPS over time and a graph of the distribution.\r\n\r\nBlackMage, Dancer, Dragoon, Scholar doing opener and some more :\r\n\r\n![image](https://github.com/IAmPythagoras/FFXIV-Combat-Simulator/assets/62820030/e3e8e2c7-935d-49fa-91c8-745f134e01e1)\r\n![image](https://github.com/IAmPythagoras/FFXIV-Combat-Simulator/assets/62820030/f351ec39-c241-4ffb-9722-a6ce7098c5b9)\r\n![image](https://github.com/IAmPythagoras/FFXIV-Combat-Simulator/assets/62820030/9972f6aa-e0ef-4a63-a908-2b106ecff814)\r\n\r\nNote that the Blackmage's DPS is higher because it received all the buffs.\r\n\r\nThis library also has a built-in BiS (best in slot) solver. The advantage of using this one is that instead of simply maximizing the DPS of a dummy rotation, the simulator allows the solver to take into account the different raid buffs and when they are in effect. This means that the solver will find a BiS that is dependant on the simulation you want it to optimize damage in.\r\n\r\nLearn more about the simulator and how to use it by going to the official documentation website : https://iampythagoras.github.io/index.html\r\n\r\nWith version 0.8.10 you can now output a \"Simulation record\" as a pdf file that shows information about the simulation :\r\n\r\n![image](https://github.com/IAmPythagoras/FFXIV-Combat-Simulator/assets/62820030/88069e5d-8ffa-4783-acc3-b1b02c3ce33e)\r\n\r\nThis record's goal is to act as a sort of log, but which is more easily understood and contains only the most useful information on the running of the simulation.\r\nYou can also export a text only version of this record.\r\n# Rotation BiS Solver \r\n\r\nAs of ffxivcalc version 0.8.00, this library now has a built in rotation BiS solver. You can use the ffxivcalclayout.py in order to experiment with it.\r\n\r\nYou can read this PDF [BiS_Solver_Algorithm_Documentation.pdf](https://github.com/IAmPythagoras/FFXIV-Combat-Simulator/files/12580553/BiS_Solver_Algorithm_Documentation.pdf) if you are interested in its\r\nfunctionning. \r\n\r\nYou can read about the experimental results of this solver here : https://docs.google.com/spreadsheets/d/1yVl-F1tHARYIYvz4ZPxIY6MayakYug3OEqpGnpZllqU/edit?usp=sharing\r\n\r\n# Validity of simulator\r\n\r\nAs of version 0.8.30 I have started adding in depth testing of the simulator. The simulator will still have some flaws, but it is currently being checked by around 430 individual tests. More tests\r\nwill be added with time.\r\n\r\n# Discord bot): \r\nDISCORD BOT IS CURRENTLY OFFLINE. WILL UPDATE HERE WHEN IT IS AVAILABLE\r\nI made a disbord bot that uses the python library ffxivcalc in order to simulate fights. Feel free to install it using the link below. As of now, the main bot commands are :\r\n```\r\n!Simulate (With a JSON file as a file in the same message)\r\n!Template <filename> <job1> <job2> ... (Generates a template JSON file used to simulate)\r\n!Help (for help)\r\n```\r\nUse this link to install the bot on your server : \r\n```\r\nhttps://discord.com/oauth2/authorize?client_id=1071922835011932290&permissions=274878024704&scope=bot\r\n```\r\n\r\n# Currently Working On\r\n\r\nAdding code to support multiple enemies at the same time and individual targetting of enemy by the players.\r\n\r\n\r\n# HOW IT WORKS\r\n\r\nThe big advantage of this program is that instead of computing the average PPS (potency per second) and then using a damage formula to find the\r\nDPS (Damage per second), it simulates the fight like it would happen in real time. That way, buffs are accurately taken into account. It is also able to discernate between oGCD and GCD, and will treat them accordingly (for weaving and stuff).The program can also see if a rotation is illegal, and will stop if it is determined to be a rotation that cannot be done in the game.\r\n\r\nThe time-unit used for the program is by default 0.01s/step, but it can be put at whatever smaller (or bigger) number we prefer. It is also able to know when a certain ability cannot be casted, and using that ability anyway will result in an error that stops the simulation. We could in theory disable this checking if we wanted.\r\n\r\nEach job in the game is implemented in a relatively similar way. We first create a class JobSpell, which will be an object that will represent a spell/ability/weaponskill of the job. Such an object will have information like casting time, recast time (if GCD), potency, manacost, effect of applying that spell and the requirements of that spell. We then also need to create a class JobPlayer, which will inherit certain traits for its parent class (Healer, Caster, Melee, Ranged or Tank) (This is also the case for spell). This JobPlayer class will contain information like Ability Cooldown, Buff Timer, DOTTimer and other stuff that need to be tracked during the execution of the simulation.\r\n\r\nAnd that's about it, the code will take these two new classes (and object of the JobSpell class) and if everything is done correctly the simulator will be able to run without any issues.\r\n\r\n# If you want to help\r\n\r\nIf you want to help or want to ask questions to me directly, feel free to join the discord linked above:)\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "DPS simulator for Final Fantasy XIV.",
    "version": "0.8.930",
    "project_urls": {
        "Documentation": "https://iampythagoras.github.io/index.html",
        "Homepage": "https://github.com/IAmPythagoras/FFXIV-Combat-Simulator",
        "Site": "https://ffxivdpscalc.azurewebsites.net/simulate/",
        "Source": "https://github.com/IAmPythagoras/FFXIV-Combat-Simulator"
    },
    "split_keywords": [
        "ffxiv",
        " xiv",
        " dps",
        " simulator",
        " ffxiv-combat-simulator"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "efdacc814ad0431228f3d3ada40a3dc114ccafef126812fcdd24048776f59015",
                "md5": "215462b17978a020bbdc35ba7443f9c9",
                "sha256": "130ffcd60742b14c8cc13a5451d8d1285705fb43314c9a8c7a7f1d3d23f41efa"
            },
            "downloads": -1,
            "filename": "ffxivcalc-0.8.930-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "215462b17978a020bbdc35ba7443f9c9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 292337,
            "upload_time": "2024-03-30T20:59:36",
            "upload_time_iso_8601": "2024-03-30T20:59:36.972909Z",
            "url": "https://files.pythonhosted.org/packages/ef/da/cc814ad0431228f3d3ada40a3dc114ccafef126812fcdd24048776f59015/ffxivcalc-0.8.930-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6384fa34576e499e37dbbb28828eb644bf8d23c50af8f6c2c25441ec6cce81db",
                "md5": "a3d076dd4ad995c86dd12938fcaddb0d",
                "sha256": "648c059a98e2ea4bbf61be89aabb122b11661d097fc349c63d70a5595a604d7a"
            },
            "downloads": -1,
            "filename": "ffxivcalc-0.8.930.tar.gz",
            "has_sig": false,
            "md5_digest": "a3d076dd4ad995c86dd12938fcaddb0d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 266956,
            "upload_time": "2024-03-30T20:59:39",
            "upload_time_iso_8601": "2024-03-30T20:59:39.178696Z",
            "url": "https://files.pythonhosted.org/packages/63/84/fa34576e499e37dbbb28828eb644bf8d23c50af8f6c2c25441ec6cce81db/ffxivcalc-0.8.930.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-30 20:59:39",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "IAmPythagoras",
    "github_project": "FFXIV-Combat-Simulator",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "contourpy",
            "specs": [
                [
                    "==",
                    "1.0.5"
                ]
            ]
        },
        {
            "name": "cycler",
            "specs": [
                [
                    "==",
                    "0.11.0"
                ]
            ]
        },
        {
            "name": "fonttools",
            "specs": [
                [
                    "==",
                    "4.37.2"
                ]
            ]
        },
        {
            "name": "kiwisolver",
            "specs": [
                [
                    "==",
                    "1.4.4"
                ]
            ]
        },
        {
            "name": "matplotlib",
            "specs": [
                [
                    "==",
                    "3.6.0"
                ]
            ]
        },
        {
            "name": "numpy",
            "specs": [
                [
                    "==",
                    "1.23.3"
                ]
            ]
        },
        {
            "name": "packaging",
            "specs": [
                [
                    "==",
                    "21.3"
                ]
            ]
        },
        {
            "name": "Pillow",
            "specs": [
                [
                    "==",
                    "9.2.0"
                ]
            ]
        },
        {
            "name": "pyparsing",
            "specs": [
                [
                    "==",
                    "3.0.9"
                ]
            ]
        },
        {
            "name": "python-dateutil",
            "specs": [
                [
                    "==",
                    "2.8.2"
                ]
            ]
        },
        {
            "name": "six",
            "specs": [
                [
                    "==",
                    "1.16.0"
                ]
            ]
        },
        {
            "name": "coreapi",
            "specs": [
                [
                    "==",
                    "2.3.3"
                ]
            ]
        },
        {
            "name": "pandas",
            "specs": []
        },
        {
            "name": "python_graphql_client",
            "specs": []
        }
    ],
    "lcname": "ffxivcalc"
}
        
Elapsed time: 3.35973s