import yaml
import random

barrels = yaml.load(open("affix_barrel.yml"))
sights = yaml.load(open("affix_sight.yml"))
print (barrels)
print(sights)
print ("")

barrel_class = random.choice(barrels)
sight_class = random.choice(sights)
print (barrel_class)
print(sight_class)
print("")

barrel_affix = random.choice(barrel_class['tiers'])
sight_affix = random.choice(sight_class['tiers'])
print (barrel_affix)
print (sight_affix)
print ("")
@@ -110,16 +110,66 @@
 .yml%22))%0A
+magazines = yaml.load(open(%22affix_magazine.yml%22))%0A
 print (b
@@ -177,24 +177,25 @@
 rrels)%0Aprint
+ 
 (sights)%0Apri
@@ -187,24 +187,42 @@
 nt (sights)%0A
+print (magazines)%0A
 print (%22%22)%0A%0A
@@ -291,24 +291,66 @@
 ice(sights)%0A
+magazine_class = random.choice(magazines)%0A
 print (barre
@@ -363,16 +363,17 @@
 s)%0Aprint
+ 
 (sight_c
@@ -374,24 +374,47 @@
 ight_class)%0A
+print (magazine_class)%0A
 print(%22%22)%0A%0Ab
@@ -514,16 +514,72 @@
 iers'%5D)%0A
+magazine_affix = random.choice(magazine_class%5B'tiers'%5D)%0A
 print (b
@@ -607,22 +607,45 @@
 ight_affix)%0A
+print (magazine_affix)%0A
 print (%22%22)

add magazines to select script