(8.4.0) Dedicated Update

This commit is contained in:
mikx 2021-10-31 02:26:25 -04:00
parent de0255f6e0
commit 4e48bb9449
8 changed files with 563 additions and 0 deletions

@ -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<string> itemBase = new List<string>();
Root j = JsonConvert.DeserializeObject<Root>(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);
}
}
}

@ -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<string> itemBase = new List<string>();
Root j = JsonConvert.DeserializeObject<Root>(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);
}
}
}

@ -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<string> itemBase = new List<string>();
Root j = JsonConvert.DeserializeObject<Root>(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);
}
}
}

@ -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<string> itemBase = new List<string>();
Root j = JsonConvert.DeserializeObject<Root>(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);
}
}
}

@ -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);
}
}
}

@ -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);
}
}
}

@ -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<string> itemBase = new List<string>();
Root j = JsonConvert.DeserializeObject<Root>(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);
}
}
}

@ -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<double?> data { get; set; }
public double? totalChange { get; set; }
}
public class LowConfidenceSparkline
{
public List<double?> 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<object?> implicitModifiers { get; set; }
public List<ExplicitModifier> 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<Line> lines { get; set; }
public Language language { get; set; }
}
}