diff --git a/PoE-MxFilterGen/generator/accessory.cs b/PoE-MxFilterGen/generator/accessory.cs new file mode 100644 index 0000000..f7bcf10 --- /dev/null +++ b/PoE-MxFilterGen/generator/accessory.cs @@ -0,0 +1,49 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PoE_MxFilterGen.generator +{ + class accessory + { + private static string iB; + + public static void Gen(string section, int uniquev) + { + List itemBase = new List(); + Root j = JsonConvert.DeserializeObject(File.ReadAllText("data/ninja.accessory.json", Encoding.UTF8)); + + foreach (var ln in j.lines) + { + // Check if the item value is equal or superior to the minimum value + if (ln.chaosValue >= uniquev) + { + if (!itemBase.Contains(ln.baseType)) + { + itemBase.Add(ln.baseType); + iB = iB + string.Format(@" ""{0}""", ln.baseType); + } + } + } + + if (iB == null) { iB = @""""""; } + string fn = $"gen/" + section + ".filter"; + File.AppendAllText(fn, string.Format("# Section: {0}", section) + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " BaseType" + iB + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " Rarity = Unique" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetTextColor 222 95 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBackgroundColor 255 255 255" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBorderColor 180 96 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetFontSize 45" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, @" CustomAlertSound ""mx_chase.mp3""" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " MinimapIcon 0 White Star" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " PlayEffect White", Encoding.UTF8); + } + } +} diff --git a/PoE-MxFilterGen/generator/armour.cs b/PoE-MxFilterGen/generator/armour.cs new file mode 100644 index 0000000..3908644 --- /dev/null +++ b/PoE-MxFilterGen/generator/armour.cs @@ -0,0 +1,53 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PoE_MxFilterGen.generator +{ + class armour + { + private static string iB; + + public static void Gen(string section, int uniquev) + { + List itemBase = new List(); + Root j = JsonConvert.DeserializeObject(File.ReadAllText("data/ninja.armour.json", Encoding.UTF8)); + + foreach (var ln in j.lines) + { + // Check if the item count is at least equal to the desired confidence level + if (ln.links <= 5) + { + // Check if the item value is equal or superior to the minimum value + if (ln.chaosValue >= uniquev) + { + if (!itemBase.Contains(ln.baseType)) + { + itemBase.Add(ln.baseType); + iB = iB + string.Format(@" ""{0}""", ln.baseType); + } + } + } + } + + if (iB == null) { iB = @""""""; } + string fn = $"gen/" + section + ".filter"; + File.AppendAllText(fn, string.Format("# Section: {0}", section) + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " BaseType" + iB + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " Rarity = Unique" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetTextColor 222 95 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBackgroundColor 255 255 255" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBorderColor 180 96 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetFontSize 45" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, @" CustomAlertSound ""mx_chase.mp3""" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " MinimapIcon 0 White Star" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " PlayEffect White", Encoding.UTF8); + } + } +} diff --git a/PoE-MxFilterGen/generator/card.cs b/PoE-MxFilterGen/generator/card.cs new file mode 100644 index 0000000..2b1415c --- /dev/null +++ b/PoE-MxFilterGen/generator/card.cs @@ -0,0 +1,48 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PoE_MxFilterGen.generator +{ + class card + { + private static string iB; + + public static void Gen(string section, int cardv) + { + List itemBase = new List(); + + Root j = JsonConvert.DeserializeObject(File.ReadAllText("data/ninja.card.json", Encoding.UTF8)); + + foreach (var ln in j.lines) + { + // Check if the item value is equal or superior to the minimum value + if (ln.chaosValue >= cardv) + { + if (!itemBase.Contains(ln.name)) + { + itemBase.Add(ln.name); + iB = iB + string.Format(@" ""{0}""", ln.name); + } + } + } + + if (iB == null) { iB = @""""""; } + string fn = $"gen/" + section + ".filter"; + File.AppendAllText(fn, string.Format("# Section: {0}", section) + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, @" Class ""Divination Card""" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " BaseType" + iB + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetTextColor 0 105 178" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBackgroundColor 255 255 255" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBorderColor 0 105 178" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetFontSize 45" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, @" CustomAlertSound ""mx_highvalue.mp3""", Encoding.UTF8); + } + } +} diff --git a/PoE-MxFilterGen/generator/fossil.cs b/PoE-MxFilterGen/generator/fossil.cs new file mode 100644 index 0000000..d5d0488 --- /dev/null +++ b/PoE-MxFilterGen/generator/fossil.cs @@ -0,0 +1,48 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PoE_MxFilterGen.generator +{ + class fossil + { + private static string iB; + + public static void Gen(string section, int fossilv) + { + List itemBase = new List(); + + Root j = JsonConvert.DeserializeObject(File.ReadAllText("data/ninja.fossil.json", Encoding.UTF8)); + + foreach (var ln in j.lines) + { + // Check if the item value is equal or superior to the minimum value + if (ln.chaosValue >= fossilv) + { + if (!itemBase.Contains(ln.name)) + { + itemBase.Add(ln.name); + iB = iB + string.Format(@" ""{0}""", ln.name); + } + } + } + + if (iB == null) { iB = @""""""; } + string fn = $"gen/" + section + ".filter"; + File.AppendAllText(fn, string.Format("# Section: {0}", section) + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, @" Class ""Stackable Currency""" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " BaseType" + iB + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetTextColor 255 165 0 255" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBackgroundColor 255 255 255" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBorderColor 255 165 0 255" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, @" CustomAlertSound ""mx_fossil.mp3""", Encoding.UTF8); + } + } +} diff --git a/PoE-MxFilterGen/generator/tier.cs b/PoE-MxFilterGen/generator/tier.cs new file mode 100644 index 0000000..e90b671 --- /dev/null +++ b/PoE-MxFilterGen/generator/tier.cs @@ -0,0 +1,118 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PoE_MxFilterGen.generator +{ + class tier + { + private static string iB; + public static void Gen(string section) + { + var js = File.ReadAllText($@"config/Tiers.txt"); + + if (iB == null) { iB = @""""""; } + string fn = $"gen/" + section + ".filter"; + File.AppendAllText(fn, string.Format("# Section: {0}", section) + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, @" HasExplicitMod ""Veiled""" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBorderColor 112 255 112 255" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " MinimapIcon 1 Green Star" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " PlayEffect Green" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, @" CustomAlertSound ""mx_tier.mp3""" + Environment.NewLine, Encoding.UTF8); + + File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " FracturedItem True" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBorderColor 112 255 112 255" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " MinimapIcon 1 Green Star" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " PlayEffect Green" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, @" CustomAlertSound ""mx_tier.mp3""" + Environment.NewLine, Encoding.UTF8); + + File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SynthesisedItem True" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBorderColor 112 255 112 255" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " MinimapIcon 1 Green Star" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " PlayEffect Green" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, @" CustomAlertSound ""mx_tier.mp3""" + Environment.NewLine, Encoding.UTF8); + + File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " Identified True" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBorderColor 0 0 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, @" CustomAlertSound ""mx_tier.mp3""" + Environment.NewLine, Encoding.UTF8); + + File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " Corrupted True" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBorderColor 210 0 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, @" CustomAlertSound ""mx_tier.mp3""" + Environment.NewLine, Encoding.UTF8); + + File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " ItemLevel >= 75" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " ItemLevel <= 100" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBorderColor 184 218 242" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, @" CustomAlertSound ""mx_tier.mp3""" + Environment.NewLine, Encoding.UTF8); + + File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " ItemLevel >= 60" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " ItemLevel <= 74" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBorderColor 222 118 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, @" CustomAlertSound ""mx_tier.mp3""" + Environment.NewLine, Encoding.UTF8); + + File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " ItemLevel >= 60" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " ItemLevel <= 74" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBorderColor 222 118 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, @" CustomAlertSound ""mx_tier.mp3""" + Environment.NewLine, Encoding.UTF8); + } + } +} diff --git a/PoE-MxFilterGen/generator/tier_caster.cs b/PoE-MxFilterGen/generator/tier_caster.cs new file mode 100644 index 0000000..8d22908 --- /dev/null +++ b/PoE-MxFilterGen/generator/tier_caster.cs @@ -0,0 +1,118 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PoE_MxFilterGen.generator +{ + class tier_caster + { + private static string iB; + public static void Gen(string section) + { + var js = File.ReadAllText($@"config/Tiers_Caster.txt"); + + if (iB == null) { iB = @""""""; } + string fn = $"gen/" + section + ".filter"; + File.AppendAllText(fn, string.Format("# Section: {0}", section) + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, @" HasExplicitMod ""Veiled""" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBorderColor 112 255 112 255" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " MinimapIcon 1 Green Star" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " PlayEffect Green" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, @" CustomAlertSound ""mx_tier.mp3""" + Environment.NewLine, Encoding.UTF8); + + File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " FracturedItem True" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBorderColor 112 255 112 255" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " MinimapIcon 1 Green Star" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " PlayEffect Green" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, @" CustomAlertSound ""mx_tier.mp3""" + Environment.NewLine, Encoding.UTF8); + + File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SynthesisedItem True" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBorderColor 112 255 112 255" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " MinimapIcon 1 Green Star" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " PlayEffect Green" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, @" CustomAlertSound ""mx_tier.mp3""" + Environment.NewLine, Encoding.UTF8); + + File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " Identified True" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBorderColor 0 0 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, @" CustomAlertSound ""mx_tier.mp3""" + Environment.NewLine, Encoding.UTF8); + + File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " Corrupted True" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBorderColor 210 0 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, @" CustomAlertSound ""mx_tier.mp3""" + Environment.NewLine, Encoding.UTF8); + + File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " ItemLevel >= 75" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " ItemLevel <= 100" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBorderColor 184 218 242" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, @" CustomAlertSound ""mx_tier.mp3""" + Environment.NewLine, Encoding.UTF8); + + File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " ItemLevel >= 60" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " ItemLevel <= 74" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBorderColor 222 118 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, @" CustomAlertSound ""mx_tier.mp3""" + Environment.NewLine, Encoding.UTF8); + + File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " ItemLevel >= 60" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " ItemLevel <= 74" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBorderColor 222 118 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, @" CustomAlertSound ""mx_tier.mp3""" + Environment.NewLine, Encoding.UTF8); + } + } +} diff --git a/PoE-MxFilterGen/generator/weapon.cs b/PoE-MxFilterGen/generator/weapon.cs new file mode 100644 index 0000000..6cc92b2 --- /dev/null +++ b/PoE-MxFilterGen/generator/weapon.cs @@ -0,0 +1,53 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PoE_MxFilterGen.generator +{ + class weapon + { + private static string iB; + + public static void Gen(string section, int uniquev) + { + List itemBase = new List(); + Root j = JsonConvert.DeserializeObject(File.ReadAllText("data/ninja.weapon.json", Encoding.UTF8)); + + foreach (var ln in j.lines) + { + // Check if the item count is at least equal to the desired confidence level + if (ln.links <= 5) + { + // Check if the item value is equal or superior to the minimum value + if (ln.chaosValue >= uniquev) + { + if (!itemBase.Contains(ln.baseType)) + { + itemBase.Add(ln.baseType); + iB = iB + string.Format(@" ""{0}""", ln.baseType); + } + } + } + } + + if (iB == null) { iB = @""""""; } + string fn = $"gen/" + section + ".filter"; + File.AppendAllText(fn, string.Format("# Section: {0}", section) + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " BaseType" + iB + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " Rarity = Unique" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetTextColor 222 95 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBackgroundColor 255 255 255" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBorderColor 180 96 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetFontSize 45" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, @" CustomAlertSound ""mx_chase.mp3""" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " MinimapIcon 0 White Star" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " PlayEffect White", Encoding.UTF8); + } + } +} diff --git a/PoE-MxFilterGen/generator_classes.cs b/PoE-MxFilterGen/generator_classes.cs new file mode 100644 index 0000000..80a1e13 --- /dev/null +++ b/PoE-MxFilterGen/generator_classes.cs @@ -0,0 +1,76 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PoE_MxFilterGen +{ + public class Sparkline + { + [JsonProperty(NullValueHandling = NullValueHandling.Ignore)] + public List data { get; set; } + public double? totalChange { get; set; } + } + + public class LowConfidenceSparkline + { + public List data { get; set; } + public double? totalChange { get; set; } + } + + public class ExplicitModifier + { + public string? text { get; set; } + public bool? optional { get; set; } + } + + public class Line + { + public int? id { get; set; } + public string? name { get; set; } + public string? icon { get; set; } + public int? mapTier { get; set; } + public int? levelRequired { get; set; } + public string? baseType { get; set; } + public int? stackSize { get; set; } + public object? variant { get; set; } + public object? prophecyText { get; set; } + public object? artFilename { get; set; } + public int? links { get; set; } + public int? itemClass { get; set; } + public Sparkline sparkline { get; set; } + public LowConfidenceSparkline lowConfidenceSparkline { get; set; } + public List implicitModifiers { get; set; } + public List explicitModifiers { get; set; } + public string? flavourText { get; set; } + public bool? corrupted { get; set; } + public int? gemLevel { get; set; } + public int? gemQuality { get; set; } + public string? itemType { get; set; } + public double? chaosValue { get; set; } + public double? exaltedValue { get; set; } + public int? count { get; set; } + public string? detailsId { get; set; } + public object? tradeInfo { get; set; } + public object? mapRegion { get; set; } + public int? listingCount { get; set; } + } + + public class Translations + { + } + + public class Language + { + public string? name { get; set; } + public Translations translations { get; set; } + } + + public class Root + { + public List lines { get; set; } + public Language language { get; set; } + } +}