You will need a basic understanding of programming jargon to understand the following post. While you will probably be able to get by without understanding parameters, variables and functions, I will make no effort to explain things further.
Example: test_level = 90 test_race = race.Race('night_elf') test_class = 'rogue'
Should be pretty self explanatory.
Example: test_buffs = buffs.Buffs('stat_multiplier_buff', 'agi_flask_mop', 'food_300_agi')
Another self explanatory variable, it's just a list of raid buffs, including flasks and food. Viable raid buffs to use can be seen in the allowed_buffs table here: https://github.com/dazer/ShadowCraft-Engine/blob/master/shadowcraft/objects/buffs.py#L9
Example: test_mh = stats.Weapon(6733, 1.8, 'dagger', 'dancing_steel')
This is what creates your main hand (and offhand) stats for damage calculations. The first parameter is the average damage per swing. You take the top end, and the bottom end of the weapon damage in it's tooltip and average them. The second parameter is the swing speed of the weapon. The third parameter is a string, and should be a 'dagger', 'axe', 'fist', 'sword', or 'mace'. The final parameter is the enchant for that specific weapon.
Viable enchants to use can be seen in the allowed_melee_enchants table here: https://github.com/dazer/ShadowCraft-Engine/blob/master/shadowcraft/objects/proc_data.py#L251
Example: test_procs = procs.ProcsList('heroic_bottle_of_infinite_stars', 'heroic_terror_in_the_mists')
ProcsList takes an "unlimited" number of parameters. They are typically just your two trinket procs that you don't directly control, but has the potential to include more. An example trinket that should be listed here is the Terror in the Mists proc.
Viable procs to use can be seen in the allowed_procs table here: https://github.com/dazer/ShadowCraft-Engine/blob/master/shadowcraft/objects/proc_data.py#L6
Example: test_gear_buffs = stats.GearBuffs('rogue_t14_2pc', 'rogue_t14_4pc', 'leather_specialization', 'virmens_bite', 'virmens_bite_prepot', 'chaotic_metagem')
This includes the rest of the on-use, and special effects not included in other objects. This object includes on-use trinkets, potions, tier bonuses, and more. An example of an on-use trinket would be Jade Bandit Figurine.
Viable procs to use can be seen in the activated_boosts and other_gear_buffs tables here: https://github.com/dazer/ShadowCraft-Engine/blob/master/shadowcraft/objects/stats.py#L161
Example: test_stats = stats.Stats(80, 19000, 250, 4800, 2550, 2550, 3000, 5000, test_mh, test_oh, test_procs, test_gear_buffs, pvp_power=0, pvp_resil=0, pvp_target_armor=None)
The first parameters are primary and secondary stats, with an order of: str, agi, ap, crit, hit, exp, haste, mastery. These are the sums from gear/gems/enchants before any effects, not your final stat values.
Example: test_talents = talents.Talents('322213', test_class, test_level)
There's only one new parameter here, and that's the string at the front of the list. Unlike Blizzard's talent calculator, we start counting at 1 and go from left to right. So the far left talent for a tier is represented by a 1, the next a 2, and so on. Each number represents the choice for a tier. A lack of a selection is typically represented by a 0.
In the above example, the first 3 represents Shadow Focus if the player was a 90 rogue.
Example: glyph_list = ['recuperate', 'sprint'] test_glyphs = glyphs.Glyphs(test_class, *glyph_list)
glyph_list is an array of strings for the glyphs used. When passing the glyph_list, the asterisk must be in front of the variable name. The asterisk tells python how to handle the data structure properly, and exceeds the scope of this posting. There is no distinction between minor and major glyphs, and they are left up to the user and/or front-end to properly manage.
Example: test_cycle = settings.AssassinationCycle(min_envenom_size_non_execute=4, min_envenom_size_execute=5, prioritize_rupture_uptime_non_execute=True, prioritize_rupture_uptime_execute=True)
This is an Assassination example, the Combat and Sub Cycle instantiation looks like settings.CombatCycle(...) and settings.SubtletyCycle(...) respectively. Each parameter is optional, and the order does not matter, but they need to be structured like a variable assignment.
The parameters vary with each spec, and you can see the available parameters here: https://github.com/dazer/ShadowCraft-Engine/blob/master/shadowcraft/calcs/rogue/Aldriana/settings.py
Combat: Every Combat setting is a boolean, that is it must be True or False.
test_settings = settings.Settings(test_cycle, time_in_execute_range=.35, tricks_on_cooldown=True, response_time=.5, dmg_poison='dp', utl_poison=None, duration=300, use_opener='always', opener_name='default', is_pvp=False, stormlash=False)
These are the settings that don't necessarily apply to a specific spec, but to the player and calculations in general. response_time is the player delay, duration is the fight duration, dmg_poison is damaging poison ('dp' or 'wp'), utl_poison is the utility poison ('lp', 'cp', 'pp', 'mnp'). The poison options are an acronym, 'dp' is Deadly Poison, 'lp' is Leeching Poison, etc.
is_pvp enables pvp mode, and starts to factor in pvp power, pvp resilience, and enables the EP weight for pvp_power.
duration is the fight duration, response time is used for customizing the impact of latency and human response time. 0.5s is a very tight response time.
stormlash is a mixed bag. You can set 3 values, True, False, or a integer. True gets converted into a single stormlash totem used on CD. False is none at all. An integer is the number of stormlash totems staggered that can be used on CD. So if you have two shaman dropping stormlash every 5min, we can account for both.
opener_name and use_opener let use handle things like Ambush, or Garrote, out of stealth, and after a Vanish. The opener_name can be almost any ability you want, finishers are not included. use_opener however, needs to be one of a couple different strings. 'opener' is to only use that ability once at the start of the fight. 'always', for use that ability on cooldown. 'never', for don't even bother getting into stealth.
These last two values don't really work with Subtlety however, as Sub requires Vanish for DPS in a different manner, and has to be utilized differently.
There are many tables that can be pulled, the most common two are ep_values, and dps_breakdown. Additional ones include calculator.get_oh_weapon_modifier() (nice for Combat spec), calculator.get_weapon_ep(), calculator.get_talents_ranking(), calculator.get_self_healing(), and calculator.get_glyphs_ranking().
The variable that stores the table returned needs to be placed in the list: dicts_for_pretty_print. Failing to do so will not display the data.
Last edited by Pathal,