[SimC] Python script for generating trinket comparison sims

Anything mage specific not covered by any of the other subforums, like raid instance guides for mages.
User avatar
Komma
Administrator
Posts: 1486
Joined: Wed May 28, 2014 7:37 pm

[SimC] Python script for generating trinket comparison sims

Unread postby Komma Tue Nov 25, 2014 12:04 am

While messing around in IRC Dutch decided to conjure up a script to quickly generate SimC input files to compare trinkets. I decided to one-up him with a shorter Python script. Then I decided that folks might find it useful, so here you go.

Requirements:
You need to have python installed.

Usage:
1. Save the code to a file, ie. "trinkets.py".
2. Change the source profile and trinket list as you like.
3. Do this in cmd: "python trinkets.py > trinket_comparison.simc"
4. Copy the contents of trinket_comparison.simc into SimC and press "Run".

Code: Select all

from itertools import combinations # The base profile that denotes the name, other pieces of gear, spec, etc. # You can also use your own character: source_profile = "armory=us,aerie-peak,komma" source_profile = "Mage_Frost_T17H.simc" # List of trinkets and how they will be displayed in the profile name trinket_list = [ ("blackiron_micro_crucible,id=113984,bonus_id=567", "M-Crucible"), ("blackiron_micro_crucible,id=113984,bonus_id=566", "HC-Crucible"), ("quiescent_runestone,id=113859,bonus_id=567", "M-Runestone"), ("quiescent_runestone,id=113859,bonus_id=566", "HC-Runestone"), ("goren_soul_repository,id=119194,bonus_id=567", "M-Repository"), ("goren_soul_repository,id=119194,bonus_id=566", "HC-Repository"), ("darmacs_unstable_talisman,id=113948,bonus_id=567", "M-talisman"), ("darmacs_unstable_talisman,id=113948,bonus_id=566", "HC-talisman"), ("sandmans_pouch,id=112320,bonus_id=527", "DMFTrinketStage3"), ("copelands_clarity,id=118878", "CClarity"), ("shards_of_nothing,id=113835,bonus_id=567", "M-Shards"), ("shards_of_nothing,id=113835,bonus_id=566", "HC-Shards"), ("everburning_candle,id=118880", "EverburningCandle") ] profile = source_profile + "\n" profile += "default_actions=1\n" profile += "\n".join( "\n".join([ "copy=" + combo[0][1] + "_" + combo[1][1], "trinket1=" + combo[0][0], "trinket2=" + combo[1][0] ]) for combo in combinations(trinket_list, 2) if combo[0][0].split(",")[1] != combo[1][0].split(",")[1] ) print(profile)
Admin of Altered Time.

Have an issue with the website or moderation? Send me a PM!
Architech
Posts: 31
Joined: Sat Sep 20, 2014 8:35 pm

Re: [SimC] Python script for generating trinket comparison s

Unread postby Architech Tue Nov 25, 2014 7:48 am


Requirements:
You need to have python installed.
or alternatively go here and click the arrow: http://repl.it/4uA" target="_blank
MrGba2z
Posts: 6
Joined: Sat Nov 29, 2014 5:19 am

Re: [SimC] Python script for generating trinket comparison s

Unread postby MrGba2z Sat Nov 29, 2014 5:24 am

thx komma
but i got an error saying that :
Simulation setup error: Unknown option 'armory' with value 'us,ilidan,mageio'
Simulation failed!
when i tried to simulate with my profile.
User avatar
Komma
Administrator
Posts: 1486
Joined: Wed May 28, 2014 7:37 pm

Re: [SimC] Python script for generating trinket comparison s

Unread postby Komma Sat Nov 29, 2014 5:39 am

thx komma
but i got an error saying that :
Simulation setup error: Unknown option 'armory' with value 'us,ilidan,mageio'
Simulation failed!
when i tried to simulate with my profile.
I think your server is spelt as "Illidan", with 2 "L"s!
Admin of Altered Time.

Have an issue with the website or moderation? Send me a PM!
MrGba2z
Posts: 6
Joined: Sat Nov 29, 2014 5:19 am

Re: [SimC] Python script for generating trinket comparison s

Unread postby MrGba2z Sat Nov 29, 2014 7:06 am

oops, this's a stupid mistake. thx komma.
MrGba2z
Posts: 6
Joined: Sat Nov 29, 2014 5:19 am

Re: [SimC] Python script for generating trinket comparison s

Unread postby MrGba2z Sat Nov 29, 2014 9:30 am

one more question, how can i get those trinkets information? I found some in wowhead, but not found warforged version and can not use their names because the space in the name make python complain.
User avatar
Dutchmagoz
Administrator
Posts: 603
Joined: Tue May 27, 2014 11:53 am

Re: [SimC] Python script for generating trinket comparison s

Unread postby Dutchmagoz Sat Nov 29, 2014 4:53 pm

one more question, how can i get those trinkets information? I found some in wowhead, but not found warforged version and can not use their names because the space in the name make python complain.
Names don't matter, but in general simc uses _ instead of a space. so like "copelands_clarity".

Warforged and the likes are handles by "bonus_id=1337".

Example: http://www.wowhead.com/item=112320&bonus=526" target="_blank, if you select a different stage or whatnot, the url will change the "bonus=something" part. replace this with "bonus_id=something" in simc/python.
Owner of Altered Time.

Twitch - Twitter - Arcane Guide (AT) - Arcane Guide (IV) - Fire Guide

For any issues with a moderator or the website, send me a PM!
User avatar
Komma
Administrator
Posts: 1486
Joined: Wed May 28, 2014 7:37 pm

Re: [SimC] Python script for generating trinket comparison s

Unread postby Komma Tue Dec 02, 2014 11:18 pm

Added a small hack to prevent different versions of the same trinket from being used twice.
Admin of Altered Time.

Have an issue with the website or moderation? Send me a PM!
User avatar
Komma
Administrator
Posts: 1486
Joined: Wed May 28, 2014 7:37 pm

Re: [SimC] Python script for generating trinket comparison s

Unread postby Komma Sun Jan 18, 2015 1:37 am

Updated the script again because I was a dummy with the first attempt at eliminating duplicates.
Admin of Altered Time.

Have an issue with the website or moderation? Send me a PM!
User avatar
Frosted
Posts: 1024
Joined: Thu May 29, 2014 5:09 pm

Re: [SimC] Python script for generating trinket comparison s

Unread postby Frosted Sat Jun 13, 2015 5:30 am

I've updated this to generate trinkets for 6.2.

http://repl.it/sSE" target="_blank for the direct link. Just hit "run" at the top, and it will spit out all of the possible combinations for you to copy/paste into SimC.

If you want to run it yourself using python, code is below.

Code: Select all

from itertools import combinations # The base profile that denotes the name, other pieces of gear, spec, etc. # You can also use your own character: source_profile = "armory=us,aerie-peak,komma" source_profile = "Mage_Frost_T17H.simc" # List of trinkets and how they will be displayed in the profile name trinket_list = [ ("blackiron_micro_crucible,id=113984,bonus_id=567", "M-Crucible"), ("goren_soul_repository,id=119194,bonus_id=567", "M-Repository"), ("darmacs_unstable_talisman,id=113948,bonus_id=567", "M-talisman"), ("sandmans_pouch,id=112320,bonus_id=618", "S4sandmans"), ("iron_reaver_piston,id=124227,bonus_id=566", "H-Piston"), ("iron_reaver_piston,id=124227", "N-Piston"), ("iron_reaver_piston,id=124227,bonus_id=567", "M-Piston"), (",id=124545", "Allstats"), ("desecrated_shadowmoon_insignia,id=124228,bonus_id=567", "M-Insignia"), ("desecrated_shadowmoon_insignia,id=124228,bonus_id=566", "H-Insignia"), ("desecrated_shadowmoon_insignia,id=124228", "N-Insignia"), ("unblinking_gaze_of_sethe,id=124229,bonus_id=567", "M-Gaze"), ("unblinking_gaze_of_sethe,id=124229,bonus_id=566", "H-Gaze"), ("unblinking_gaze_of_sethe,id=124229", "N-Gaze"), ("prophecy_of_fear,id=124230,bonus_id=567", "M-Prophecy"), ("prophecy_of_fear,id=124230,bonus_id=566", "H-Prophecy"), ("prophecy_of_fear,id=124230", "N-Prophecy"), ("tome_of_shifting_words,id=124516,bonus_id=567", "M-Tome"), ("tome_of_shifting_words,id=124516,bonus_id=566", "H-Tome"), ("tome_of_shifting_words,id=124516", "N-Tome") ] profile = source_profile + "\n" profile += "default_actions=1\n" profile += "\n".join( "\n".join([ "copy=" + combo[0][1] + "_" + combo[1][1], "trinket1=" + combo[0][0], "trinket2=" + combo[1][0] ]) for combo in combinations(trinket_list, 2) if combo[0][0].split(",")[1] != combo[1][0].split(",")[1] ) print(profile)
Wilderness
Posts: 544
Joined: Tue Jun 17, 2014 11:38 pm

Re: [SimC] Python script for generating trinket comparison s

Unread postby Wilderness Sat Jun 13, 2015 2:56 pm

Awesome, thanks Frosted.
Ashamanxx || <Good Talk> || 13/13M
reforge
Posts: 4
Joined: Sun Oct 12, 2014 7:30 am

Re: [SimC] Python script for generating trinket comparison s

Unread postby reforge Tue Jun 16, 2015 6:51 pm

Thanks for this Frosted!
User avatar
Frosted
Posts: 1024
Joined: Thu May 29, 2014 5:09 pm

Re: [SimC] Python script for generating trinket comparison s

Unread postby Frosted Sat Aug 13, 2016 7:20 pm

http://pastebin.com/93wyET2L" target="_blank

pre-raid items.
User avatar
Frosted
Posts: 1024
Joined: Thu May 29, 2014 5:09 pm

Re: [SimC] Python script for generating trinket comparison s

Unread postby Frosted Sat Aug 13, 2016 7:23 pm

Arch updated the trinket generator

https://repl.it/4uA/92" target="_blank
Architech
Posts: 31
Joined: Sat Sep 20, 2014 8:35 pm

Re: [SimC] Python script for generating trinket comparison s

Unread postby Architech Sat Aug 13, 2016 7:26 pm

Talent combo's

https://repl.it/Ccer/1" target="_blank
User avatar
Frosted
Posts: 1024
Joined: Thu May 29, 2014 5:09 pm

Re: [SimC] Python script for generating trinket comparison s

Unread postby Frosted Sat Aug 20, 2016 12:29 am

Updated trinket script

https://repl.it/4uA/95" target="_blank
Last edited by Frosted on Tue Aug 23, 2016 1:14 am, edited 2 times in total.
Architech
Posts: 31
Joined: Sat Sep 20, 2014 8:35 pm

Re: [SimC] Python script for generating trinket comparison s

Unread postby Architech Sat Aug 20, 2016 7:31 pm

https://repl.it/CpZT/4" target="_blank

script for generating FIRE relic combination. some one who knows python might be able to clean this up quite a bit.

Only works for fire!
Architech
Posts: 31
Joined: Sat Sep 20, 2014 8:35 pm

Re: [SimC] Python script for generating trinket comparison s

Unread postby Architech Tue Aug 23, 2016 3:26 am

https://repl.it/CqRi/0" target="_blank

another relic combination script

that sucks a little bit less (and should eliminate the 250+ duplicates)

thanks Zulandia!
User avatar
Frosted
Posts: 1024
Joined: Thu May 29, 2014 5:09 pm

Re: [SimC] Python script for generating trinket comparison s

Unread postby Frosted Sat Sep 10, 2016 2:57 pm

https://repl.it/4uA/104" target="_blank

Updated trinket script.

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 10 guests