-
Notifications
You must be signed in to change notification settings - Fork 33
Developer
- "the chart" is https://wildshinobu.pythonanywhere.com/dl-sim-vue/#/, which is a static page showing DPS of everyone
- "websim" is https://wildshinobu.pythonanywhere.com/ui/dl_simc.html, which is the GUI for running DPS sims
dlsim-vue: This is the source code of the chart's UI, it is set up as a submodule to dl
under /wwwsrc
.
mushymato.github.io: This is the repo of the github userpage currently serving the chart, it is set up as a submodule to dl
, under /www
. Since it is a user page, the mushymato
part should be changed to your username. Of course you can change the deployment structure to deploy it elsewhere as long as you make corresponding changes in dl
and dlsim-vue
.
dl-datamine: This is the datamine repo that helps with sim. The two relevant files are /exporter/SkillShare.py that generates skillshare.json and /exporter/AdvConf.py which generates adventurer, dragon, weapontype, and wyrmprint conf json files. The pipeline of that repo does not work out of the box as some code related to manifest parsing is not public, but manifests are archived there.
To implement a new adventurer (let's say Gala_Cube), the following files need to be edited:
-
/conf/adv/Gala_Cube.json
needs to be created, usually populated with data fromAdvConf.py
. The majority of generic mechanics such as SP gain, buffs, and skill modifiers are described in the form of hitattr objects, consult advbase.py hitattr_make to see how they are consumed. - If special implementation is needed, create
adv/gala_cube.py
like so:
from core.advbase import *
class Gala_Cube(Adv):
...
variants = {None: Gala_Cube}
-
/conf/skillshare.json
can be generated fromdl-datamine
or manually updated with Gala_Cube's skill share. -
/conf/chains.json
needs a new entry if Gala_Cube has a unique combination of coab and chain coab. The syntax is same as abilities. Note that the entries are sorted by element.
To implement a new dragon, first generate new dragon confs with AdvConf.py, then if they require special implementation, add a new subclass of DragonBase
in core/slots.py
.
Wyrmprints are 100% automated, but if there are new abilities, they should be implemented in core/ability.py
.
Modifiers refer to damage modifiers used in dmg_formula
, in /core/advbase.py
. Each modifier belongs to a type (att, crit, sd, fs, killer) that defines the general target of the modifier and a order where mods of the same order are additive, while mods of different orders are multiplicative. Generally, modifiers should be accessed through abilities and buffs instead of directly, and the value of a modifier should be queried through self.mod(name)
.
At runtime, the various ability params attached to adventurers, prints, dragons, and weapons are processed and then initialized in /slot/__init__.py
.
The parameters of an ability generally take this format:
('abilityclassname_extra_info', value, condition, ...)
The abilityclassname
portion of the first param should be a key of ability_dict
while the target class is the value, and the whole tuple will be splat into the class. The remaining parts of the first param is generally used for varients, for example k_paralysis
for paralysis punisher. Refer to the constructors of each class to see how the params are used.
After constructing the class, the oninit
function is called to do any initialization that requires a reference to the adv
instance.
Each action in the game is abstracted as startup -> proc -> recovery. Actions can be interrupted by other actions during startup such that proc does not occur, and canceled by other actions during recovery after the proc has already executed. A action can have multiple hitattrs attached, and if the hitattr does not have msl
set, it will be removed from timeline when the overall action is cancelled.
Whether or not an action can be canceled/interrupted by another action is defined with the interrupt
and cancel
fields in conf. Sometimes, the cancel is only allowed after a certain number of seconds.
Dragons are implemented as a special Action that does not follow standard behavior of actions described above. The class is really a handler that manages multiple actions, while pretending to be an Action class to be compatible with normal ACL
Affliction efficiency is done by computing expected value. The states are updated when the adventurer casts affliction and when the timer expires. This expected value is used to calculate the damage of DoT and the efficiency of various abilities, most notably killers.
Various functions make calls to log to record damage inflicted, skill use, and so on. It is then read by /core/simulation.py
to produce outputs. Datapoints are also recorded through log, for purpose of custom sim graph displays.
ACL is the domain specific language used for adventurer logic. The parse tree derived from the acl input drives the simulation.
A dict that supports multilevel attribute access, for holding sim settings.
-
bleed.py
: covers bleed DOT mechanics -
template.py
: some subclasses of Adv for things like stance and rng on crit.
Actual black magic stuff.