This program is designed to help determine to best combinations of spells to use in each turn in the Dofus MMORPG.
It can handle multiple stats pages, spells and spell sets, as well as multiple conditions for the damage computations, in order to give the most freedom possible.
It runs on a Python 3 console (developed on 3.9.10, probably work for older versions) and does not require any external package. However, if the tqdm package is installed, it will be used for some progress bars. To run it, just use python main.py
in the folder containing the python files.
This optimizer works by creating spells, stats page, spell sets and parameters set and then picking the desired one to determine the best possible combination of spells to maximize the damages dealt.
A spell contains informations about its damages, number of uses and AP cost, a stats page contains every useful stats needed to compute damages, a spell set is (as suggested by the name) a collection of spells and a parameters set contains informations about the computation like maximum number of AP to use, resistances of the enemy or its distance.
A spell also contains "buffs", which are events triggered in certain conditions that can affect the spells coming next in the computation. They are used when spells interact each other, or when one increase damages of the following.
Every computation need to use a spell set and a parameters set (which eventually contains stats pages).
Every <name>
parameter in the commands below should not contains spaces and is unique for each type of commands.
s
: save everything (automatically done after most actions)i
: get informations on current state (TODO)cache
: get informations on the cacheq
: quit
Every param
can be replaced with only p
.
param new <name>
: create a new parameters set, based on the current oneparam change <name>
: change the current parameters set to the specified oneparam [[<parameter> <value>] ...]
: update the current parameters set with the specified parameters (the parameters are described in the "Parameters" section)param ls
: list all the currently available parameters setparam show [name]
: show more details on the specified parameters set (if none is supplied, use the currently selected one)
st new <name>
: create a new stats page and prompt the user for all the required informationsst rm <name>
: delete a stats pagest mod <name>
: modify a stats page (prompt the user for all the changes)st ls
: list all the currently available stats pagesst show <name>
: show more details on the specified stats pagesst addfile <name>
: create a stats page from a file whose path isstats\\{name}.json
st copy <source_name> <target_name>
: copy the source stats page into a new page
sp new <name>
: create a new spell and prompt the user for all the required informationssp rm <name>
: delete a spellsp mod <name>
: modify a spell (prompt the user for all the changes)sp ls
: list all the currently available spellssp show <name>
: show more details on the specified spellsp buffs <name>
: show every buff of the specified spell in detailssp dmg|d <spell_name> [[<parameter> <value>] ...]
: compute and show the detailed damages of a spell (the parameters are described in the "Parameters" section)sp addfile <name>
: create a spell from a file whose path isspells\\{name}.json
ss new <name>
: creates a new spell setss rm <name>
: deletes a spell setss add <spell_set_name> <spell_name> [<spell_name> ...]
: add the specified spell(s) to the spell setss del <spell_set_name> <spell_name>
: remove the specified spell from the spell setss ls
: lists all the currently available spell setsss show <name>
: shows more details on the specified spell setss copy <source_name> <target_name>
: copy the source spell set with the new specified name
dmg <spell_set_name> [[<param> <value>] ...]
: return the best combination of spells for the given constraints (the parameters are described in the "Parameters" section) ;dmgs <spell_set_name> [[<param> <value>] ...]
: return the best combination of spells using the simple method which does not use the interactions between spells ;dmgc <spell1> <spell2> ... [[<param> <value>] ...]
: return the damages of the specified combination of spells in the specified order.
The possible parameters for every command that requires it are :
-s
(or-stats
) followed by as many stats page short name as wanted : the stats page to use for the computations (if one starts with a!
, it will remove this page) ;-pa
followed by a positive integer : the maximum number of AP (action point) to use ;-po
followed by a non negative integer : the exact range to the enemy ;-pomin
(or-minpo
) followed by a non negative integer : the minimum range to the enemy ;-pomax
(or-maxpo
) followed by a non negative integer : the maximum range to the enemy (note that maximum should be >= minimum) ;-t
(or-type
) followed by one ofmono
,multi
,versa
: indicates if the computation takes into account the number of uses per target ('mono'), the number of uses per turn ('multi') or only one time each spell ('versa') ;-r
(or-res
,-resistances
) followed by five integers (may be negative) : indicates the resistances of the enemy to each element (in order : NEUTRAL, EARTH, FIRE, WATER, AIR) ;-d
(or-distance
) followed by one ofmelee
,range
: indicates if the damage computations should take into account RANGE or MELEE damages ;-v
(or-vulne
,-vulnerability
) followed by one integer (may be negative) : indicate the bonus (or reduced) damages dealt because of vulnerability or damage reduction (independant from resistances) ;-bdmg
(or-bdamages
,-base-damages
) followed by five integers (may be negative) : bonus (or malus) base damages of each element (in order : NEUTRAL, EARTH, FIRE, WATER, AIR) of the spell ;-states
(or-state
) followed by as many states as wanted : the starting states used for the computations (only used in a damage command).
Setting default parameters:
>>> param -s base -pa 11 -pomin 1 -pomax 10 -t mono
Default parameters successfully set.
Simple damages optimisation (all
is the name of the spell set):
>>> dmg all
Maximum average damages ('base' ; PA = 11 ; PO = 1 - 10 ; type = mono ; position = unspecified ; distance = range) is:
=> 1697 dmg : 1577 - 1714 (1768 - 1906)
Using, in this order:
- Ouragan
- Drain Elémentaire
- Ether
- Lame Astrale
189924 possible combinations, 1 with the same damages, including:
- Ouragan, Drain Elémentaire, Lame Astrale, Ether
With parameters:
>>> dmg all -po 8 -t multi
Maximum average damages ('base' ; PA = 11 ; PO = 8 - 8 ; type = multi ; position = unspecified ; distance = range) is:
=> 1275 dmg : 1189 - 1278 (1327 - 1416)
Using, in this order:
- Lame Astrale
- Orage
- Lame Astrale
2720 possible combinations, 1 with the same damages, including:
- Orage, Lame Astrale, Lame Astrale
With an additional stats page:
>>> dmg all -po 8 -t versa -s turquoise
Maximum average damages ('base' ; PA = 11 ; PO = 8 - 8 ; type = versa ; position = unspecified ; distance = range) is:
=> 1292 dmg : 1184 - 1286 (1325 - 1429)
Using, in this order:
- Comète
- Orage
- Lame Astrale
700 possible combinations, 1 with the same damages, including:
- Orage, Comète, Lame Astrale
Calculating only one spell damages:
>>> sp d tison
Damages of the spell 'Tison' (parameters set : 'base' ; distance: range ; initial states: ()):
Individual characteristics:
- INTELLIGENCE: 144 - 160 (171 - 185)
- AGILITY: 384 - 430 (449 - 495)
Total damages: 528 - 590 (620 - 680)
Average damages: 559 (650) => 575 with 18 % crit chance
Calculating damages of a specific combination of spells (with starting states):
>>> dmgc tribut ether -states h:w
Damages of the given combination (parameters : 'base' ; total PA : 4 ; initial states: (h:w)) is:
=> 393 dmg : 371 - 397 (418 - 445)
- Spell buffs can increase damage field by field ('min', 'max', 'crit_min', 'crit_max') instead of one flat value
i
command