6 Commits

Author SHA1 Message Date
mikx
5918a3ed4c Scarab Generator 2024-08-08 16:19:23 -04:00
mikx
8ca0316e26 11.1.0 2023-05-18 20:23:01 -04:00
mikx
48b843bc31 11.0.1 2023-05-11 15:43:32 -04:00
mikx
183c8d7e03 11.0.0 2023-05-03 05:32:55 -04:00
mikx
7f066fdd50 Tier Updates 2023-01-06 01:27:05 -05:00
BuildTools
a5d47a41fd readme 2022-09-09 02:35:50 -04:00
18 changed files with 975 additions and 218 deletions

View File

@@ -216,12 +216,14 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="compiler\section.cs" />
<Compile Include="currency_classes.cs" />
<Compile Include="generator\accessory.cs" />
<Compile Include="generator\armour.cs" />
<Compile Include="generator\base.cs" />
<Compile Include="generator\card.cs" />
<Compile Include="generator\fossil.cs" />
<Compile Include="generator\scarab.cs" />
<Compile Include="generator\tier.cs" />
<Compile Include="generator\weapon.cs" />
<Compile Include="generator_classes.cs" />

View File

@@ -0,0 +1,261 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading.Tasks;
namespace PoE_MxFilterGen.compiler
{
public class Block
{
public string Type { get; set; }
public bool Show { get; set; }
public List<object> Class { get; set; }
public List<object> BaseType { get; set; }
public List<string> SetTextColor { get; set; }
public List<string> SetBackgroundColor { get; set; }
public List<string> SetBorderColor { get; set; }
public string SetFontSize { get; set; }
public List<Condition> Conditions { get; set; }
public List<Action> Actions { get; set; }
}
public class Condition
{
public string name { get; set; }
public string op { get; set; }
public string value { get; set; }
}
public class Action
{
public string name { get; set; }
public string va { get; set; }
public string vb { get; set; }
public string vc { get; set; }
public string vd { get; set; }
}
public class RootBlocks
{
public List<Block> blocks { get; set; }
}
internal class section
{
public static string outpath = "";
private static string iC;
private static string iB;
public static void Compile(string section, string filter)
{
if (File.Exists(outpath)) { File.Delete($"out/{section}.filter"); }
//DoSplash(filter, section);
string filson = $"filson/{section}.json";
if (main.profile)
{
filson = $"profiles/{main.profilename}/filson/{section}.json";
}
foreach (Block bl in JsonConvert.DeserializeObject<RootBlocks>(File.ReadAllText(filson, Encoding.UTF8)).blocks)
{
string type = filter;
string blocktype = bl.Type;
outpath = $"out/{filter}/{section}.filter";
DoCompile(bl, blocktype, filter);
}
}
public static void DoSplash(string filter, string section)
{
string outp = $"out/{filter}/{section}.filter";
////////// Splash //////////
File.AppendAllText(outp, $"#### Filson - PoE Item Filter JSON Parsing - MxFilterGen v{main.version}{Environment.NewLine}");
File.AppendAllText(outp, $"#### Filson and MxFilterGen are developped by mikx.{Environment.NewLine}");
File.AppendAllText(outp, $"#### MxGit: https://mxgit.ovh/mikx/PoE-MxFilterGen{Environment.NewLine}");
File.AppendAllText(outp, $"#### MxPoE: https://mxpoe.ovh/{Environment.NewLine}");
File.AppendAllText(outp, $"#### Contact: mikx@mxpoe.ovh / http://discord.mxg.ovh{Environment.NewLine}");
}
public static void DoCompile(Block bl, string bltype, string type)
{
////////// Skip a line //////////
File.AppendAllText(outpath, Environment.NewLine);
////////// Show or Hide //////////
string bshow = "";
if (bl.Show) { bshow = "Show"; } else { bshow = "Hide"; };
if (bltype == "Normal" && type == "Strict") { bshow = "Hide"; }
File.AppendAllText(outpath, bshow + Environment.NewLine);
////////// Class //////////
if (bl.Class != null)
{
foreach (var c in bl.Class) { iC += string.Format(@" ""{0}""", c); }
if (iC != "")
{
File.AppendAllText(outpath, $" Class {iC} {Environment.NewLine}");
}
}
////////// Base //////////
if (bl.BaseType != null)
{
foreach (var b in bl.BaseType) { iB += string.Format(@" ""{0}""", b); }
if (iB != "")
{
File.AppendAllText(outpath, $" BaseType {iB} {Environment.NewLine}");
}
}
////////// SetTextColor //////////
if (bl.SetTextColor[0] != null)
{
File.AppendAllText(outpath, $" SetTextColor {bl.SetTextColor[0]} {Environment.NewLine}");
}
////////// SetBackgroundColor //////////
if (bl.SetBackgroundColor[0] != null)
{
File.AppendAllText(outpath, $" SetBackgroundColor {bl.SetBackgroundColor[0]} {Environment.NewLine}");
}
////////// SetBorderColor //////////
if (bl.SetBorderColor[0] != null)
{
File.AppendAllText(outpath, $" SetBorderColor {bl.SetBorderColor[0]} {Environment.NewLine}");
}
////////// SetFontSize //////////
if (bl.SetFontSize != null)
{
File.AppendAllText(outpath, " SetFontSize " + bl.SetFontSize + Environment.NewLine);
}
////////// Conditions //////////
foreach (var con in bl.Conditions)
{
string cn = con.name;
string co = con.op;
var cv = con.value;
switch (con.name)
{
case "AreaLevel":
File.AppendAllText(outpath, $" {cn} {co} {cv} {Environment.NewLine}");
break;
case "ItemLevel":
File.AppendAllText(outpath, $" {cn} {co} {cv} {Environment.NewLine}");
break;
case "DropLevel":
File.AppendAllText(outpath, $" {cn} {co} {cv} {Environment.NewLine}");
break;
case "Quality":
File.AppendAllText(outpath, $" {cn} {co} {cv} {Environment.NewLine}");
break;
case "Rarity":
File.AppendAllText(outpath, $" {cn} {cv} {Environment.NewLine}");
break;
case "LinkedSockets":
File.AppendAllText(outpath, $" {cn} {co} {cv} {Environment.NewLine}");
break;
case "SocketGroup":
File.AppendAllText(outpath, $" {cn} {co} \"{cv}\" {Environment.NewLine}");
break;
case "Sockets":
File.AppendAllText(outpath, $" {cn} {co} {cv} {Environment.NewLine}");
break;
case "Height":
File.AppendAllText(outpath, $" {cn} {co} {cv} {Environment.NewLine}");
break;
case "Width":
File.AppendAllText(outpath, $" {cn} {co} {cv} {Environment.NewLine}");
break;
case "HasExplicitMod":
File.AppendAllText(outpath, $" {cn} \"{cv}\" {Environment.NewLine}");
break;
case "AnyEnchantment":
File.AppendAllText(outpath, $" {cn} {cv} {Environment.NewLine}");
break;
case "StackSize":
File.AppendAllText(outpath, $" {cn} {co} {cv} {Environment.NewLine}");
break;
case "GemLevel":
File.AppendAllText(outpath, $" {cn} {co} {cv} {Environment.NewLine}");
break;
case "GemQualityType":
File.AppendAllText(outpath, $" {cn} {cv} {Environment.NewLine}");
break;
case "AlternateQuality":
File.AppendAllText(outpath, $" {cn} {cv} {Environment.NewLine}");
break;
case "Identified":
File.AppendAllText(outpath, $" {cn} {cv} {Environment.NewLine}");
break;
case "Corrupted":
File.AppendAllText(outpath, $" {cn} {cv} {Environment.NewLine}");
break;
case "Mirrored":
File.AppendAllText(outpath, $" {cn} {cv} {Environment.NewLine}");
break;
case "ElderItem":
File.AppendAllText(outpath, $" {cn} {cv} {Environment.NewLine}");
break;
case "ShaperItem":
File.AppendAllText(outpath, $" {cn} {cv} {Environment.NewLine}");
break;
case "HasInfluence":
File.AppendAllText(outpath, $" {cn} {cv} {Environment.NewLine}");
break;
case "FracturedItem":
File.AppendAllText(outpath, $" {cn} {cv} {Environment.NewLine}");
break;
case "SynthesisedItem":
File.AppendAllText(outpath, $" {cn} {cv} {Environment.NewLine}");
break;
case "BlightedMap":
File.AppendAllText(outpath, $" {cn} {cv} {Environment.NewLine}");
break;
case "MapTier":
File.AppendAllText(outpath, $" {cn} {co} {cv} {Environment.NewLine}");
break;
}
}
////////// Actions //////////
if (bltype == "Normal" && type == "Strict")
{
// No Action
} else
{
foreach (var ac in bl.Actions)
{
string an;
string ava;
string avb;
string avc;
string avd;
an = ac.name;
ava = "";
avb = "";
avc = "";
avd = "";
if (ava != null) { ava = ac.va; }
if (avb != null) { avb = ac.vb; }
if (avc != null) { avc = ac.vc; }
if (avd != null) { avd = ac.vd; }
switch (ac.name)
{
case "PlayAlertSound":
File.AppendAllText(outpath, $" {an} {ava} {avb} {Environment.NewLine}");
break;
case "CustomAlertSound":
File.AppendAllText(outpath, $" {an} \"{ava}\" {Environment.NewLine}");
break;
case "MinimapIcon":
File.AppendAllText(outpath, $" {an} {ava} {avb} {avc} {Environment.NewLine}");
break;
case "PlayEffect":
File.AppendAllText(outpath, $" {an} {ava} {avb} {Environment.NewLine}");
break;
}
}
}
iB = "";
iC = "";
}
}
}

View File

@@ -26,7 +26,7 @@ namespace PoE_MxFilterGen.generator
if (accessory.iB == null)
accessory.iB = "\"\"";
string path = "gen/" + section + ".filter";
File.AppendAllText(path, string.Format("# Section: {0}", (object)section) + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, string.Format("#### SECTION: {0}", (object)section) + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType" + accessory.iB + Environment.NewLine, Encoding.UTF8);
@@ -38,6 +38,7 @@ namespace PoE_MxFilterGen.generator
File.AppendAllText(path, " CustomAlertSound \"mx_unique.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " MinimapIcon 0 White Star" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " PlayEffect White", Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine, Encoding.UTF8);
}
}
}

View File

@@ -33,7 +33,7 @@ namespace PoE_MxFilterGen.generator
if (armour.iB == null)
armour.iB = "\"\"";
string path = "gen/" + section + ".filter";
File.AppendAllText(path, string.Format("# Section: {0}", (object)section) + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, string.Format("#### SECTION: {0}", (object)section) + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + armour.iB + Environment.NewLine, Encoding.UTF8);
@@ -45,6 +45,7 @@ namespace PoE_MxFilterGen.generator
File.AppendAllText(path, " CustomAlertSound \"mx_unique.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " MinimapIcon 0 White Star" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " PlayEffect White", Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine, Encoding.UTF8);
}
}
}

View File

@@ -32,7 +32,7 @@ namespace PoE_MxFilterGen.generator
if (card.iB == null)
card.iB = "\"\"";
string path = "gen/" + section + ".filter";
File.AppendAllText(path, string.Format("# Section: {0}", (object) section) + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, string.Format("#### SECTION: {0}", (object) section) + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Class \"Divination Card\"" + Environment.NewLine, Encoding.UTF8);
@@ -42,6 +42,7 @@ namespace PoE_MxFilterGen.generator
File.AppendAllText(path, " SetBorderColor 0 105 178" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 45" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_highvalue.mp3\"", Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine, Encoding.UTF8);
}
}
}

View File

@@ -32,7 +32,7 @@ namespace PoE_MxFilterGen.generator
if (fossil.iB == null)
fossil.iB = "\"\"";
string path = "gen/" + section + ".filter";
File.AppendAllText(path, string.Format("# Section: {0}", (object) section) + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, string.Format("#### SECTION: {0}", (object) section) + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Class \"Stackable Currency\"" + Environment.NewLine, Encoding.UTF8);
@@ -42,6 +42,7 @@ namespace PoE_MxFilterGen.generator
File.AppendAllText(path, " SetBorderColor 255 165 0 255" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_fossil.mp3\"", Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine, Encoding.UTF8);
}
}
}

View File

@@ -0,0 +1,123 @@
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
{
internal class scarab
{
private static string iBbasic;
private static string iB5c;
private static string iB10c;
private static string iB100c;
private static string iBhigh;
public static void Gen(string section)
{
List<string> stringList = new List<string>();
foreach (Line line in JsonConvert.DeserializeObject<Root>(File.ReadAllText("data/ninja.scarab.json", Encoding.UTF8)).lines)
{
int chaosValue = Convert.ToInt32(line.chaosValue);
if (chaosValue <= 1.0)
{
stringList.Add(line.name);
scarab.iBbasic += string.Format(@" ""{0}""", line.name);
}
if (chaosValue <= 5.0 && chaosValue > 1.0)
{
stringList.Add(line.name);
scarab.iB5c += string.Format(@" ""{0}""", line.name);
}
if (chaosValue <= 10.0 && chaosValue > 5.0)
{
stringList.Add(line.name);
scarab.iB10c += string.Format(@" ""{0}""", line.name);
}
if (chaosValue <= 100.0 && chaosValue > 10.0)
{
stringList.Add(line.name);
scarab.iB100c += string.Format(@" ""{0}""", line.name);
}
if (chaosValue > 100.0)
{
stringList.Add(line.name);
scarab.iBhigh += string.Format(@" ""{0}""", line.name);
}
}
string path = "gen/" + section + ".filter";
if (scarab.iBbasic == null)
scarab.iBbasic = "\"\"";
File.AppendAllText(path, string.Format("#### SECTION: {0}", (object)section) + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Class \"Map Fragment\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType" + scarab.iBbasic + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetTextColor 0 255 255 255" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 94 3 3" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBorderColor 0 255 255 255" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 25" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_scarab.mp3\"", Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine, Encoding.UTF8);
if (scarab.iB5c == null)
scarab.iB5c = "\"\"";
File.AppendAllText(path, string.Format("#### SECTION: {0}", (object)section) + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Class \"Map Fragment\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType" + scarab.iB5c + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetTextColor 0 255 255 255" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 94 3 3" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBorderColor 0 255 255 255" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 30" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_scarab.mp3\"", Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine, Encoding.UTF8);
if (scarab.iB10c == null)
scarab.iB10c = "\"\"";
File.AppendAllText(path, string.Format("#### SECTION: {0}", (object)section) + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Class \"Map Fragment\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType" + scarab.iB10c + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetTextColor 0 255 255 255" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 94 3 3" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBorderColor 0 255 255 255" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_scarab.mp3\"", Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine, Encoding.UTF8);
if (scarab.iB100c == null)
scarab.iB100c = "\"\"";
File.AppendAllText(path, string.Format("#### SECTION: {0}", (object)section) + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Class \"Map Fragment\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType" + scarab.iB100c + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetTextColor 0 255 255 255" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 94 3 3" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBorderColor 0 255 255 255" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_scarab.mp3\"", Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine, Encoding.UTF8);
if (scarab.iBhigh == null)
scarab.iBhigh = "\"\"";
File.AppendAllText(path, string.Format("#### SECTION: {0}", (object)section) + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Class \"Map Fragment\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType" + scarab.iBhigh + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetTextColor 0 255 255 255" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 255 255 255" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBorderColor 0 255 255 255" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 42" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_scarab.mp3\"", Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine, Encoding.UTF8);
}
}
}

View File

@@ -1,121 +1,274 @@
// Decompiled with JetBrains decompiler
// Type: PoE_MxFilterGen.generator.tier
// Assembly: mxfiltergen, Version=8.4.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 9686B206-07DB-4C70-B4F4-1F6EF4D87358
// Assembly location: C:\Users\blood\OneDrive\Desktop\mxfiltergen.exe
using Newtonsoft.Json;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Linq;
namespace PoE_MxFilterGen.generator
{
{
internal class tier
{
private static string iB;
private static string bAxe;
private static string bBow;
private static string bClaw;
private static string bDagger;
private static string bFishing;
private static string bMace;
private static string bSceptre;
private static string bStaff;
private static string bSword;
private static string bWand;
private static string bBody;
private static string bBoots;
private static string bGloves;
private static string bHelmet;
private static string bShield;
private static string bQuiver;
public static void Gen(string section, int tierValue, bool tier1HAxe, bool tier2HAxe, bool tierBow, bool tierClaw, bool tierDagger, bool tier1HMace, bool tier2HMace, bool tierSceptre, bool tierStaff, bool tier1HSword, bool tier2HSword, bool tierWand, bool tierBody, bool tierBoots, bool tierGloves, bool tierHelmet, bool tierShield, bool tierQuiver)
private static List<string> iBA = new List<string>();
private static string iBInt;
private static List<string> iBIntA = new List<string>();
private static string iBStr;
private static List<string> iBStrA = new List<string>();
private static string iBDex;
private static List<string> iBDexA = new List<string>();
public static string[] Int()
{
string[] Int = new string[] {
"Wand",
"Sorcerer",
"Mind",
"Bone",
"Silk",
"Arcanist",
"Spirit",
"Solaris",
"Slippers",
"Samite",
"Demon's Horn",
"Conjurer Gloves",
"Slaughter Knife",
"Deicide",
"Conjurer",
"Necromancer",
"Deicide",
"Platinum Kris",
"Zealot Boots",
"Golden Kris",
"Steel Circlet",
"Butcher Knife",
"Embroidered Gloves",
"Void Sceptre",
"Opal Sceptre",
"Abyssal Sceptre",
"Crystal Sceptre",
"Carnal Sceptre",
"Vaal Sceptre",
"Quartz Sceptre",
"Shadow Sceptre",
"Grinning Fetish",
"Crystal Sceptre",
"Lead Sceptre",
"Blood Sceptre",
"Royal Sceptre",
"Stabilising Sceptre",
"Abyssal Sceptre",
"Karui Sceptre",
"Tyrant's Sekhem",
"Opal Sceptre",
"Platinum Sceptre",
"Vaal Sceptre",
"Carnal Sceptre",
"Void Sceptre",
"Alternating Sceptre",
"Sambar Sceptre"
};
return Int;
}
public static string[] Str()
{
string[] Str = new string[] {
"Astral",
"Tower",
"Burgonet",
"Ancient",
"Fencer",
"Goliath",
"Pig-Faced",
"Crusader Boots",
"Vaal Gauntlets",
"Prophet Crown",
"Antique Greaves",
"Vaal Greaves",
"Siege Helmet",
"Reinforced Greeves",
"Soldier Boots",
"Aventail Helmet",
"Reaver Helmet",
"Saint's Hauberk",
"Samnite Helmet"
};
return Str;
}
public static string[] Dex()
{
string[] Dex = new string[] {
"Claw",
"Bow",
"Quiver",
"Deerskin",
"Ambusher",
"Wyrnmscale",
"Gouger",
"Dagger",
"Spiked",
"Hood",
"Ursine",
"Oak",
"Carnal",
"Vaal Buckler",
"Nightmare Bascinet",
"Poignard",
"Gutting Knife",
"Vaal Mask",
"Throat Stabber",
"Lion Pelt",
"Stealth Gloves",
"Battle Buckler",
"Shagreen Boots",
"Shagreen Gloves",
"Sharkskin Gloves",
"Enameled Buckler",
"Corsair Sword",
"Slink Boots",
"Stealth Boots",
"Slink Gloves",
"Wolf Pelt"
};
return Dex;
}
public static void Gen(string section, int tierValue, bool tier1HAxe, bool tier2HAxe, bool tierBow, bool tierClaw, bool tierDagger, bool tier1HMace, bool tier2HMace, bool tierSceptre, bool tierStaff, bool tier1HSword, bool tier2HSword, bool tierWand, bool tierBody, bool tierBoots, bool tierGloves, bool tierHelmet, bool tierShield, bool tierQuiver, List<string> tierBaseInclude, List<string> tierBaseExclude)
{
var ln = JsonConvert.DeserializeObject<Root>(File.ReadAllText("data/ninja.base.json", Encoding.UTF8));
ForEachLine(ln, "One Handed Axe", tier1HAxe, section, tierValue);
ForEachLine(ln, "Two Handed Axe", tier2HAxe, section, tierValue);
ForEachLine(ln, "Bow", tierBow, section, tierValue);
ForEachLine(ln, "Claw", tierClaw, section, tierValue);
ForEachLine(ln, "Dagger", tierDagger, section, tierValue);
ForEachLine(ln, "One Handed Mace", tier1HMace, section, tierValue);
ForEachLine(ln, "Two Handed Mace", tier2HMace, section, tierValue);
ForEachLine(ln, "Sceptre", tierSceptre, section, tierValue);
ForEachLine(ln, "Staff", tierStaff, section, tierValue);
ForEachLine(ln, "One Handed Sword", tier1HSword, section, tierValue);
ForEachLine(ln, "Two Handed Sword", tier2HSword, section, tierValue);
ForEachLine(ln, "Wand", tierWand, section, tierValue);
ForEachLine(ln, "Body Armour", tierBody, section, tierValue);
ForEachLine(ln, "Boots", tierBoots, section, tierValue);
ForEachLine(ln, "Gloves", tierGloves, section, tierValue);
ForEachLine(ln, "Helmet", tierHelmet, section, tierValue);
ForEachLine(ln, "Shield", tierShield, section, tierValue);
ForEachLine(ln, "Quiver", tierQuiver, section, tierValue);
ForEachLine(ln, "One Handed Axe", tier1HAxe, section, tierValue, tierBaseInclude, tierBaseExclude);
ForEachLine(ln, "Two Handed Axe", tier2HAxe, section, tierValue, tierBaseInclude, tierBaseExclude);
ForEachLine(ln, "Bow", tierBow, section, tierValue, tierBaseInclude, tierBaseExclude);
ForEachLine(ln, "Claw", tierClaw, section, tierValue, tierBaseInclude, tierBaseExclude);
ForEachLine(ln, "Dagger", tierDagger, section, tierValue, tierBaseInclude, tierBaseExclude);
ForEachLine(ln, "One Handed Mace", tier1HMace, section, tierValue, tierBaseInclude, tierBaseExclude);
ForEachLine(ln, "Two Handed Mace", tier2HMace, section, tierValue, tierBaseInclude, tierBaseExclude);
ForEachLine(ln, "Sceptre", tierSceptre, section, tierValue, tierBaseInclude, tierBaseExclude);
ForEachLine(ln, "Staff", tierStaff, section, tierValue, tierBaseInclude, tierBaseExclude);
ForEachLine(ln, "One Handed Sword", tier1HSword, section, tierValue, tierBaseInclude, tierBaseExclude);
ForEachLine(ln, "Two Handed Sword", tier2HSword, section, tierValue, tierBaseInclude, tierBaseExclude);
ForEachLine(ln, "Wand", tierWand, section, tierValue, tierBaseInclude, tierBaseExclude);
ForEachLine(ln, "Body Armour", tierBody, section, tierValue, tierBaseInclude, tierBaseExclude);
ForEachLine(ln, "Boots", tierBoots, section, tierValue, tierBaseInclude, tierBaseExclude);
ForEachLine(ln, "Gloves", tierGloves, section, tierValue, tierBaseInclude, tierBaseExclude);
ForEachLine(ln, "Helmet", tierHelmet, section, tierValue, tierBaseInclude, tierBaseExclude);
ForEachLine(ln, "Shield", tierShield, section, tierValue, tierBaseInclude, tierBaseExclude);
ForEachLine(ln, "Quiver", tierQuiver, section, tierValue, tierBaseInclude, tierBaseExclude);
}
public static void ForEachLine(dynamic lnb, string type, bool tierBool, string section, int tierValue)
public static void ForEachLine(dynamic lnb, string type, bool tierBool, string section, int tierValue, List<string> tierBaseInclude, List<string> tierBaseExclude)
{
int c = 0;
if (tierBool)
List<string> stringList = new List<string>();
var ln = JsonConvert.DeserializeObject<Root>(File.ReadAllText("data/ninja.base.json", Encoding.UTF8));
foreach (var line in ln.lines)
{
var ln = JsonConvert.DeserializeObject<Root>(File.ReadAllText("data/ninja.base.json", Encoding.UTF8));
foreach (var line in ln.lines)
string[] cint = Int();
string[] cstr = Str();
string[] cdex = Dex();
if (line.itemType == type && tierBool && line.levelRequired <= 86 && line.variant == null && line.chaosValue >= tierValue && !stringList.Contains(line.baseType) && line.baseType != "Serpent Wand")
{
if (line.itemType == type && tierBool && line.levelRequired <= 86 && line.variant == null && line.chaosValue >= tierValue)
if (!tierBaseExclude.Contains(line.baseType))
{
c++;
iB += string.Format(@" ""{0}""", line.baseType);
iBA.Add(line.baseType);
if (cint.Any(line.baseType.Contains))
{
iBIntA.Add(line.baseType);
iBA.Remove(line.baseType);
}
if (cstr.Any(line.baseType.Contains))
{
iBStrA.Add(line.baseType);
iBA.Remove(line.baseType);
}
if (cdex.Any(line.baseType.Contains))
{
iBDexA.Add(line.baseType);
iBA.Remove(line.baseType);
}
stringList.Add(line.baseType);
}
}
else if (line.itemType == type && !tierBool && line.levelRequired <= 86 && line.variant == null && line.chaosValue >= tierValue && tierBaseInclude.Contains(line.baseType) && !stringList.Contains(line.baseType))
{
c++;
iBA.Add(line.baseType);
if (cint.Any(line.baseType.Contains))
{
iBIntA.Add(line.baseType);
iBA.Remove(line.baseType);
}
if (cstr.Any(line.baseType.Contains))
{
iBStrA.Add(line.baseType);
iBA.Remove(line.baseType);
}
if (cdex.Any(line.baseType.Contains))
{
iBDexA.Add(line.baseType);
iBA.Remove(line.baseType);
}
stringList.Add(line.baseType);
}
}
if (tierBool && c != 0)
foreach (string b in iBA)
{
GenerateFile(section, iB, type);
}
iB = "";
iB += string.Format(@" ""{0}""", b);
}
foreach (string b in iBIntA)
{
iBInt += string.Format(@" ""{0}""", b);
}
foreach (string b in iBStrA)
{
iBStr += string.Format(@" ""{0}""", b);
}
foreach (string b in iBDexA)
{
iBDex += string.Format(@" ""{0}""", b);
}
if (c != 0)
{
if (iBA.Count >= 1) { GenerateFile(section, iB, type, "Base", " SetBackgroundColor 54 54 54 255"); }
if (iBIntA.Count >= 1) { GenerateFile(section, iBInt, type, "Int", " SetBackgroundColor 56 69 89 255"); }
if (iBStrA.Count >= 1) { GenerateFile(section, iBStr, type, "Str", " SetBackgroundColor 81 54 54 255"); }
if (iBDexA.Count >= 1) { GenerateFile(section, iBDex, type, "Dex", " SetBackgroundColor 50 69 49 255"); }
}
c = 0;
iBA = new List<string>();
iBIntA = new List<string>();
iBStrA = new List<string>();
iBDexA = new List<string>();
iB = "";
iBInt = "";
iBStr = "";
iBDex = "";
}
public static void GenerateFile(string section, string iB, string type)
public static void GenerateFile(string section, string iB, string type, string att, string SetBackgroundColor)
{
if (iB == null)
if (iB == null || iB == "")
iB = "\"\"";
string path = "gen/" + section + ".filter";
File.AppendAllText(path, $"# Section: {section} ({type})" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iB + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " HasExplicitMod \"Veiled\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBorderColor 112 255 112 255" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " MinimapIcon 1 Green Star" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " PlayEffect Green" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iB + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " FracturedItem True" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBorderColor 112 255 112 255" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " MinimapIcon 1 Green Star" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " PlayEffect Green" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, $"#### SECTION: {section} ({type})({att})" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iB + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SynthesisedItem True" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, SetBackgroundColor + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBorderColor 112 255 112 255" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " MinimapIcon 1 Green Star" + Environment.NewLine, Encoding.UTF8);
@@ -127,7 +280,7 @@ namespace PoE_MxFilterGen.generator
File.AppendAllText(path, " Identified True" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, SetBackgroundColor + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBorderColor 0 0 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
@@ -137,7 +290,7 @@ namespace PoE_MxFilterGen.generator
File.AppendAllText(path, " Corrupted True" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, SetBackgroundColor + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBorderColor 210 0 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
@@ -148,7 +301,7 @@ namespace PoE_MxFilterGen.generator
File.AppendAllText(path, " ItemLevel <= 100" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, SetBackgroundColor + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBorderColor 184 218 242" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
@@ -159,7 +312,7 @@ namespace PoE_MxFilterGen.generator
File.AppendAllText(path, " ItemLevel <= 74" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, SetBackgroundColor + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBorderColor 222 118 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
@@ -170,7 +323,7 @@ namespace PoE_MxFilterGen.generator
File.AppendAllText(path, " ItemLevel <= 74" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, SetBackgroundColor + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBorderColor 222 118 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);

View File

@@ -33,7 +33,7 @@ namespace PoE_MxFilterGen.generator
if (weapon.iB == null)
weapon.iB = "\"\"";
string path = "gen/" + section + ".filter";
File.AppendAllText(path, string.Format("# Section: {0}", (object)section) + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, string.Format("#### SECTION: {0}", (object)section) + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + weapon.iB + Environment.NewLine, Encoding.UTF8);
@@ -45,6 +45,7 @@ namespace PoE_MxFilterGen.generator
File.AppendAllText(path, " CustomAlertSound \"mx_unique.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " MinimapIcon 0 White Star" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " PlayEffect White", Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine, Encoding.UTF8);
}
}
}

View File

@@ -3,6 +3,7 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Security.Policy;
using System.Text;
using System.Threading.Tasks;
@@ -10,6 +11,10 @@ namespace PoE_MxFilterGen.json
{
public class SETTINGS
{
public string version { get; set; }
public string league { get; set; }
public string profile { get; set; }
public List<string> Structures { get; set; }
public int tierValue { get; set; }
public bool tier1HAxe { get; set; }
public bool tier2HAxe { get; set; }
@@ -32,155 +37,209 @@ namespace PoE_MxFilterGen.json
public int uniqueValue { get; set; }
public int fossilValue { get; set; }
public int cardValue { get; set; }
public string updateurl { get; set; }
public string section { get; set; }
public List<string> tierBaseInclude { get; set; }
public List<string> tierBaseExclude { get; set; }
public bool install { get; set; }
public string path { get; set; }
public string structure { get; set; }
public List<string> Sizes { get; set; }
public List<string> Colors { get; set; }
public List<string> Shapes { get; set; }
public List<string> Actions { get; set; }
public List<string> Conditions { get; set; }
public List<string> Operators { get; set; }
}
class settings
{
internal static string GetVersion()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
return j.version;
}
internal static string GetLeague()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
return j.league;
}
internal static string GetProfile()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
return j.league;
}
public static int GetTierValue()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
return j.tierValue;
}
public static int GetUniqueValue()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
return j.uniqueValue;
}
public static int GetFossilValue()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
return j.fossilValue;
}
public static int GetCardValue()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
return j.cardValue;
}
public static string GetSection()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
return j.section;
}
internal static bool GetTier1HAxe()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
return j.tier1HAxe;
}
internal static bool GetTier2HAxe()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
return j.tier2HAxe;
}
internal static bool GetTierBow()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
return j.tierBow;
}
internal static bool GetTierClaw()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
return j.tierClaw;
}
internal static bool GetTierDagger()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
return j.tierDagger;
}
internal static bool GetTier1HMace()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
return j.tier1HMace;
}
internal static bool GetTier2HMace()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
return j.tier2HMace;
}
internal static bool GetTierSceptre()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
return j.tierSceptre;
}
internal static bool GetTierStaff()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
return j.tierStaff;
}
internal static bool GetTier1HSword()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
return j.tier1HSword;
}
internal static bool GetTier2HSword()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
return j.tier2HSword;
}
internal static bool GetTierWand()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
return j.tierWand;
}
internal static bool GetTierBody()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
return j.tierBody;
}
internal static bool GetTierBoots()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
return j.tierBoots;
}
internal static bool GetTierGloves()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
return j.tierGloves;
}
internal static bool GetTierHelmet()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
return j.tierHelmet;
}
internal static bool GetTierShield()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
return j.tierShield;
}
internal static bool GetTierQuiver()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
return j.tierQuiver;
}
public static void WriteSection(string section)
internal static bool GetInstall()
{
SETTINGS js = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($@"settings.json"));
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
return j.install;
}
internal static string GetPath()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
return j.path;
}
internal static List<string> GetTierBaseInclude()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
return j.tierBaseInclude;
}
internal static List<string> GetTierBaseExclude()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
return j.tierBaseExclude;
}
internal static List<string> GetStructure()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
return j.Structures;
}
public static void WriteSection(string structure)
{
SETTINGS js = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($"profiles/{main.profilename}/{main.profilename}.json"));
SETTINGS se = new SETTINGS
{
version = js.version,
league = js.league,
profile = js.profile,
tierValue = js.tierValue,
tier1HAxe = js.tier1HAxe,
tier2HAxe = js.tier2HAxe,
@@ -201,12 +260,23 @@ namespace PoE_MxFilterGen.json
tierShield = js.tierShield,
tierQuiver = js.tierQuiver,
uniqueValue = js.uniqueValue,
tierBaseInclude = js.tierBaseInclude,
tierBaseExclude = js.tierBaseExclude,
fossilValue = js.fossilValue,
cardValue = js.cardValue,
section = section
install = js.install,
path = js.path,
structure = structure,
Structures = js.Structures,
Sizes = js.Sizes,
Colors = js.Colors,
Shapes = js.Shapes,
Actions = js.Actions,
Conditions = js.Conditions,
Operators = js.Operators
};
var raw = JsonConvert.SerializeObject(se, Formatting.Indented);
File.WriteAllText($@"settings.json", raw);
File.WriteAllText($"profiles/{main.profilename}/{main.profilename}.json", raw);
}
}
}

View File

@@ -4,6 +4,7 @@ using PoE_MxFilterGen.json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
namespace PoE_MxFilterGen
@@ -11,7 +12,7 @@ namespace PoE_MxFilterGen
internal class main
{
private static DateTime dt = DateTime.Now;
public static string version = "10.5.1";
public static string version = "11.2.0";
public static string fDate = string.Format("{0}-{1}-{2}", (object)main.dt.Day, (object)main.dt.Month, (object)main.dt.Year);
public static string api = "";
public static string giturl = "https://mxgit.ovh/mikx";
@@ -23,34 +24,71 @@ namespace PoE_MxFilterGen
public static int sprog = 0;
public static int stotal = 0;
public static bool debug = false;
public static bool install;
public static bool compile = false;
public static bool profile = false;
public static string profilename = "";
public static string ipath;
public static string docpath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
private static void Main(string[] args)
{
if (!File.Exists("config/mxfiltergen_settings.json"))
if (args.Count() >= 1)
{
if (args.Contains("--compile"))
{
compile = true;
}
if (args.Contains("--profile"))
{
profile = true;
int proin = Array.IndexOf(args, "--profile");
profilename = args[proin + 1];
} else
{
profilename = "Default";
}
}
if (!Directory.Exists("data"))
{
Directory.CreateDirectory("data");
}
if (!Directory.Exists("gen"))
{
Directory.CreateDirectory("gen");
}
if (!Directory.Exists("structure"))
{
Directory.CreateDirectory("structure");
}
if (!Directory.Exists("out"))
{
Directory.CreateDirectory("out");
}
if (!File.Exists("settings.json"))
{
msg.CMW("ERROR: settings.json not found! Downloading a template...", true, 3);
web.DownloadFile("https://mxpoe.ovh/mxfilter/data/settings_template.json", "config/mxfiltergen_settings.json");
web.DownloadFile("https://mxpoe.ovh/mxfilter/mxfiltergen_settings.json", "settings.json");
}
msg.Splash();
msg.Splash("MxFilterGen", "mikx");
main.CleanDirData();
main.league = JsonConvert.DeserializeObject<main.REMVAR>(File.ReadAllText("config/mxfiltergen_var.json")).league;
main.league = settings.GetLeague();
main.api = "https://poe.ninja/api/data/";
msg.CMW("League: " + main.league, true, 1);
msg.CMW(string.Format("Min. Unique Value - {0}c", (object)settings.GetUniqueValue()), true, 1);
msg.CMW(string.Format("Min. Fossil Value - {0}c", (object)settings.GetFossilValue()), true, 1);
msg.CMW(string.Format("Min. Card Value - {0}c", (object)settings.GetCardValue()), true, 1);
msg.CMW("Checking for required dirs...", true, 1);
if (!Directory.Exists("data"))
Directory.CreateDirectory("data");
if (!Directory.Exists("gen"))
Directory.CreateDirectory("gen");
if (!Directory.Exists("structure"))
Directory.CreateDirectory("structure");
msg.CMW("Cleaning the base dirs...", true, 1);
main.CleanDirData();
msg.CMW("Cleaning the last filter from path...", true, 1);
foreach (string filter in structures.Filters())
File.Delete("out/MxFilter_" + filter + ".filter");
msg.CMW($"Using Profile: {profile.ToString()} ({profilename})", true, 1);
foreach (string filter in structures.Filters()) {
if (File.Exists("out/MxFilter_" + filter + ".filter"))
{
File.Delete("out/MxFilter_" + filter + ".filter");
}
}
msg.CMW("Downloading the latest API data from poe.ninja...", true, 1);
web.SaveString(main.api + "itemoverview?league=" + main.league + "&type=UniqueArmour&language=en", "data/ninja.armour.json");
web.SaveString(main.api + "itemoverview?league=" + main.league + "&type=UniqueWeapon&language=en", "data/ninja.weapon.json");
@@ -58,14 +96,25 @@ namespace PoE_MxFilterGen
web.SaveString(main.api + "itemoverview?league=" + main.league + "&type=DivinationCard&language=en", "data/ninja.card.json");
web.SaveString(main.api + "currencyoverview?league=" + main.league + "&type=Currency&language=en", "data/ninja.currency.json");
web.SaveString(main.api + "itemoverview?league=" + main.league + "&type=Fossil&language=en", "data/ninja.fossil.json");
web.SaveString(main.api + "itemoverview?league=" + main.league + "&type=BaseType&language=en", "data/ninja.base.json");
web.SaveString(main.api + "itemoverview?league=" + main.league + "&type=Scarab&language=en", "data/ninja.scarab.json");
web.SaveString(main.api + "itemoverview?league=" + main.league + "&type=BaseType&language=en", "data/ninja.base.json");
foreach (string filter in structures.Filters())
{
if(!Directory.Exists($@"out\{filter}")) { Directory.CreateDirectory($@"out\{filter}"); }
if (Directory.Exists($@"out\{filter}"))
{
var fout = Directory.GetFiles($@"out\{filter}");
foreach (var f in fout)
{
File.Delete(f);
}
}
string str = "MxFilter";
int sc = structures.Structures().Length;
List<string> struc = settings.GetStructure();
int sc = struc.Count;
msg.CMW(string.Format("Generating the {0} filter using {1} source(s)...", filter, sc), true, 1);
main.ftotal = sc;
foreach (var structure in structures.Structures())
foreach (var structure in settings.GetStructure())
{
++main.fprog;
msg.drawProgress(main.fprog, main.ftotal);
@@ -93,86 +142,149 @@ namespace PoE_MxFilterGen
bool tierHelmet = settings.GetTierHelmet();
bool tierShield = settings.GetTierShield();
bool tierQuiver = settings.GetTierQuiver();
switch (structure)
install = settings.GetInstall();
ipath = settings.GetPath();
List<string> tierBaseInclude = settings.GetTierBaseInclude();
List<string> tierBaseExclude = settings.GetTierBaseExclude();
if (section.Contains("(GEN)"))
{
case "DIVINATION CARD (GEN)":
card.Gen(section, cardValue);
break;
case "EXPENSIVE UNIQUE (GEN) (Accessories)":
accessory.Gen(section, uniqueValue);
break;
case "EXPENSIVE UNIQUE (GEN) (Armours)":
armour.Gen(section, uniqueValue);
break;
case "EXPENSIVE UNIQUE (GEN) (Weapons)":
weapon.Gen(section, uniqueValue);
break;
case "FOSSIL (GEN)":
fossil.Gen(section, fossilValue);
break;
case "Tiers (DATA)":
tier.Gen(section, tierValue, tier1HAxe, tier2HAxe, tierBow, tierClaw, tierDagger, tier1HMace, tier2HMace, tierSceptre, tierStaff, tier1HSword, tier2HSword, tierWand, tierBody, tierBoots, tierGloves, tierHelmet, tierShield, tierQuiver);
break;
}
if (!compile)
{
switch (structure)
{
case "DIVINATIONCARD(GEN)":
card.Gen(section, cardValue);
break;
case "EXPENSIVEUNIQUE(GEN)(Accessories)":
accessory.Gen(section, uniqueValue);
break;
case "EXPENSIVEUNIQUE(GEN)(Armours)":
armour.Gen(section, uniqueValue);
break;
case "EXPENSIVEUNIQUE(GEN)(Weapons)":
weapon.Gen(section, uniqueValue);
break;
case "FOSSIL(GEN)":
fossil.Gen(section, fossilValue);
break;
case "SCARAB(GEN)":
scarab.Gen(section);
break;
case "Tiers(GEN)":
tier.Gen(section, tierValue, tier1HAxe, tier2HAxe, tierBow, tierClaw, tierDagger, tier1HMace, tier2HMace, tierSceptre, tierStaff, tier1HSword, tier2HSword, tierWand, tierBody, tierBoots, tierGloves, tierHelmet, tierShield, tierQuiver, tierBaseInclude, tierBaseExclude);
break;
}
}
} else
{
compiler.section.Compile(section, filter);
}
}
msg.CMW("Creating the final filter...", true, 1);
foreach (var structure in structures.Structures())
string outp = "out/" + str + "_" + filter + ".filter";
////////// Splash //////////
File.AppendAllText(outp, $"#### Filson - PoE Item Filter JSON Parsing - MxFilterGen v{main.version}{Environment.NewLine}");
File.AppendAllText(outp, $"#### Filson and MxFilterGen are developped by mikx.{Environment.NewLine}");
File.AppendAllText(outp, $"#### MxGit: https://mxgit.ovh/mikx/PoE-MxFilterGen{Environment.NewLine}");
File.AppendAllText(outp, $"#### MxPoE: https://mxpoe.ovh/{Environment.NewLine}");
File.AppendAllText(outp, $"#### Contact: mikx@mxpoe.ovh / http://discord.mxg.ovh{Environment.NewLine}");
File.AppendAllText(outp, $"{Environment.NewLine}");
File.AppendAllText(outp, $"#### SECTIONS{Environment.NewLine}");
foreach (var s in settings.GetStructure())
{
File.AppendAllText(outp, $"# {s}{Environment.NewLine}");
}
File.AppendAllText(outp, $"{Environment.NewLine}");
foreach (var structure in settings.GetStructure())
{
switch (structure)
{
case "DIVINATION CARD (GEN)":
case "DIVINATIONCARD(GEN)":
File.AppendAllText("out/" + str + "_" + filter + ".filter", File.ReadAllText(string.Format("gen/" + structure + ".filter")));
File.AppendAllText("out/" + str + "_" + filter + ".filter", Environment.NewLine ?? "");
File.AppendAllText("out/" + str + "_" + filter + ".filter", Environment.NewLine ?? "");
break;
case "EXPENSIVE UNIQUE (GEN) (Accessories)":
case "EXPENSIVEUNIQUE(GEN)(Accessories)":
File.AppendAllText("out/" + str + "_" + filter + ".filter", File.ReadAllText(string.Format("gen/" + structure + ".filter")));
File.AppendAllText("out/" + str + "_" + filter + ".filter", Environment.NewLine ?? "");
File.AppendAllText("out/" + str + "_" + filter + ".filter", Environment.NewLine ?? "");
break;
case "EXPENSIVE UNIQUE (GEN) (Armours)":
case "EXPENSIVEUNIQUE(GEN)(Armours)":
File.AppendAllText("out/" + str + "_" + filter + ".filter", File.ReadAllText(string.Format("gen/" + structure + ".filter")));
File.AppendAllText("out/" + str + "_" + filter + ".filter", Environment.NewLine ?? "");
File.AppendAllText("out/" + str + "_" + filter + ".filter", Environment.NewLine ?? "");
break;
case "EXPENSIVE UNIQUE (GEN) (Weapons)":
case "EXPENSIVEUNIQUE(GEN)(Weapons)":
File.AppendAllText("out/" + str + "_" + filter + ".filter", File.ReadAllText(string.Format("gen/" + structure + ".filter")));
File.AppendAllText("out/" + str + "_" + filter + ".filter", Environment.NewLine ?? "");
File.AppendAllText("out/" + str + "_" + filter + ".filter", Environment.NewLine ?? "");
break;
case "FOSSIL (GEN)":
case "FOSSIL(GEN)":
File.AppendAllText("out/" + str + "_" + filter + ".filter", File.ReadAllText(string.Format("gen/" + structure + ".filter")));
File.AppendAllText("out/" + str + "_" + filter + ".filter", Environment.NewLine ?? "");
File.AppendAllText("out/" + str + "_" + filter + ".filter", Environment.NewLine ?? "");
break;
case "Tiers (DATA)":
case "SCARAB(GEN)":
File.AppendAllText("out/" + str + "_" + filter + ".filter", File.ReadAllText(string.Format("gen/" + structure + ".filter")));
File.AppendAllText("out/" + str + "_" + filter + ".filter", Environment.NewLine ?? "");
break;
case "Tiers(GEN)":
File.AppendAllText("out/" + str + "_" + filter + ".filter", File.ReadAllText(string.Format("gen/" + structure + ".filter")));
File.AppendAllText("out/" + str + "_" + filter + ".filter", Environment.NewLine ?? "");
break;
case "Tiers - Caster (DATA)":
File.AppendAllText("out/" + str + "_" + filter + ".filter", File.ReadAllText(string.Format("gen/" + structure + ".filter")));
File.AppendAllText("out/" + str + "_" + filter + ".filter", Environment.NewLine ?? "");
File.AppendAllText("out/" + str + "_" + filter + ".filter", Environment.NewLine ?? "");
break;
default:
File.AppendAllText("out/" + str + "_" + filter + ".filter", string.Format("# Section: {0}", (object)structure) + Environment.NewLine);
File.AppendAllText("out/" + str + "_" + filter + ".filter", Environment.NewLine ?? "");
File.AppendAllText("out/" + str + "_" + filter + ".filter", File.ReadAllText(string.Format("structure/" + filter + "/" + structure + ".filter")));
File.AppendAllText("out/" + str + "_" + filter + ".filter", Environment.NewLine ?? "");
File.AppendAllText("out/" + str + "_" + filter + ".filter", string.Format("#### SECTION: {0}", (object)structure) + Environment.NewLine);
File.AppendAllText("out/" + str + "_" + filter + ".filter", File.ReadAllText(string.Format("out/" + filter + "/" + structure + ".filter")));
File.AppendAllText("out/" + str + "_" + filter + ".filter", Environment.NewLine ?? "");
break;
}
}
main.ftotal = 0;
main.fprog = 0;
main.CleanDir();
CurrencyValueOut();
if(debug)
//main.CleanDir();
CurrencyValueOut();
}
if (debug)
{
Console.ReadKey();
}
else if (!debug && install)
{
msg.CMW("INFO: install is true and will act as a personal filter generator.", true, 2);
foreach (var f in structures.Filters())
{
Console.ReadKey();
}
if (File.Exists($@"{docpath}\My Games\Path of Exile\MxFilter_{f}.filter"))
{
File.Copy($@"{docpath}\My Games\Path of Exile\MxFilter_{f}.filter", $@"{docpath}\My Games\Path of Exile\MxFilter_{f}.filter.backup", true);
File.Delete($@"{docpath}\My Games\Path of Exile\MxFilter_{f}.filter");
}
}
if (ipath == "" || ipath == null)
{
msg.CMW("ERROR: install is true but there is no path given, using default windows path.", true, 3);
foreach (var f in structures.Filters())
{
File.Copy($"out/MxFilter_{f}.filter", $@"{docpath}\My Games\Path of Exile\MxFilter_{f}.filter");
}
foreach (var s in Directory.EnumerateFiles("sound"))
{
string sf = Path.GetFileName(s);
File.Copy($"{s}", $@"{docpath}\My Games\Path of Exile\{sf}", true);
}
}
else
{
foreach (var f in structures.Filters())
{
File.Copy($"out/MxFilter_{f}.filter", $@"{ipath}\MxFilter_{f}.filter");
}
foreach (var s in Directory.EnumerateFiles("sound"))
{
File.Copy($"sound/{s}", $@"{ipath}\{s}");
}
}
} else
{
msg.CMW("INFO: install is false and will act as a remote generator.", true, 2);
}
}
@@ -185,55 +297,55 @@ namespace PoE_MxFilterGen
if (currencyTypeName == "Divine Orb")
{
string fc = line.chaosEquivalent.ToString();
File.WriteAllText("out/divine.txt", fc);
File.WriteAllText("out/Market/divine.txt", fc);
}
if (currencyTypeName == "Exalted Orb")
{
string fc = line.chaosEquivalent.ToString();
File.WriteAllText("out/exalted.txt", fc);
File.WriteAllText("out/Market/exalted.txt", fc);
}
if (currencyTypeName == "Orb of Annulment")
{
string fc = line.chaosEquivalent.ToString();
File.WriteAllText("out/annulment.txt", fc);
File.WriteAllText("out/Market/annulment.txt", fc);
}
if (currencyTypeName == "Orb of Alteration")
{
string fc = line.chaosEquivalent.ToString();
File.WriteAllText("out/alteration.txt", fc);
File.WriteAllText("out/Market/alteration.txt", fc);
}
if (currencyTypeName == "Orb of Fusing")
{
string fc = line.chaosEquivalent.ToString();
File.WriteAllText("out/fusing.txt", fc);
File.WriteAllText("out/Market/fusing.txt", fc);
}
if (currencyTypeName == "Chromatic Orb")
{
string fc = line.chaosEquivalent.ToString();
File.WriteAllText("out/chromatic.txt", fc);
File.WriteAllText("out/Market/chromatic.txt", fc);
}
if (currencyTypeName == "Jeweller's Orb")
{
string fc = line.chaosEquivalent.ToString();
File.WriteAllText("out/jeweller.txt", fc);
File.WriteAllText("out/Market/jeweller.txt", fc);
}
if (currencyTypeName == "Orb of Alchemy")
{
string fc = line.chaosEquivalent.ToString();
File.WriteAllText("out/alchemy.txt", fc);
File.WriteAllText("out/Market/alchemy.txt", fc);
}
if (currencyTypeName == "Cartographer's Chisel")
{
string fc = line.chaosEquivalent.ToString();
File.WriteAllText("out/chisel.txt", fc);
File.WriteAllText("out/Market/chisel.txt", fc);
}
}
}
@@ -244,14 +356,20 @@ namespace PoE_MxFilterGen
DirectoryInfo directoryInfo2 = new DirectoryInfo("gen");
foreach (FileSystemInfo file in directoryInfo1.GetFiles())
file.Delete();
foreach (FileSystemInfo file in directoryInfo2.GetFiles())
file.Delete();
if(!compile)
{
foreach (FileSystemInfo file in directoryInfo2.GetFiles())
file.Delete();
}
}
public static void CleanDir()
{
foreach (FileSystemInfo file in new DirectoryInfo("gen").GetFiles())
file.Delete();
if (!compile)
{
foreach (FileSystemInfo file in new DirectoryInfo("gen").GetFiles())
file.Delete();
}
}
private static void AutoUpdater_ApplicationExitEvent() => Environment.Exit(-1);

View File

@@ -200,13 +200,13 @@ namespace PoE_MxFilterGen
Console.WriteLine();
}
public static void Splash()
public static void Splash(string progname, string dev)
{
Console.ForegroundColor = ConsoleColor.Cyan;
Console.WriteLine("");
Console.WriteLine("#### MxFilterGen");
Console.WriteLine($"#### {progname}");
Console.WriteLine(string.Format("#### VERSION: {0}", (object)main.version));
Console.WriteLine("#### DEV: mikx");
Console.WriteLine($"#### DEV: {dev}");
Console.WriteLine("#### POWERED BY: poe.ninja");
Console.WriteLine("");
Console.ForegroundColor = ConsoleColor.White;

View File

@@ -52,13 +52,24 @@ I:\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\mxfiltergen.exe
I:\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\mxfiltergen.pdb
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csproj.AssemblyReference.cache
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csproj.CoreCompileInputs.cache
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csproj.SuggestedBindingRedirects.cache
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.exe.config
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.exe
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.pdb
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\Newtonsoft.Json.xml
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\System.Diagnostics.DiagnosticSource.xml
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csproj.Fody.CopyLocal.cache
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csproj.CopyComplete
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\mxfiltergen.exe
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\mxfiltergen.pdb
\\mxhome\Seagate\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.exe.config
\\mxhome\Seagate\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.exe
\\mxhome\Seagate\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.pdb
\\mxhome\Seagate\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\Newtonsoft.Json.xml
\\mxhome\Seagate\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\System.Diagnostics.DiagnosticSource.xml
\\mxhome\Seagate\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csproj.AssemblyReference.cache
\\mxhome\Seagate\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csproj.SuggestedBindingRedirects.cache
\\mxhome\Seagate\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csproj.CoreCompileInputs.cache
\\mxhome\Seagate\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csproj.Fody.CopyLocal.cache
\\mxhome\Seagate\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csproj.CopyComplete
\\mxhome\Seagate\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\mxfiltergen.exe
\\mxhome\Seagate\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\mxfiltergen.pdb
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFi.17C09766.Up2Date

View File

@@ -21,25 +21,26 @@ namespace PoE_MxFilterGen
{
string[] Structures = new string[] {
"LEAGUE",
"FOSSIL (GEN)",
"FOSSIL(GEN)",
"FOSSIL",
"MISC",
"ESSENCE",
"SKILL GEM",
"FLASK",
"SKILLGEM",
"MAPS",
"JEWEL",
"DIVINATION CARD",
"DIVINATION CARD (GEN)",
"EXPENSIVE UNIQUE (GEN) (Armours)",
"EXPENSIVE UNIQUE (GEN) (Weapons)",
"JEWEL",
"DIVINATIONCARD(GEN)",
"DIVINATIONCARD",
"EXPENSIVEUNIQUE(GEN)(Armours)",
"EXPENSIVEUNIQUE(GEN)(Weapons)",
"CURRENCY",
"INFLUENCED",
"ACCESSORIES",
"Tiers (DATA)",
"GEAR BY SOCKET",
"GEAR BY QUALITY",
"RECIPES",
"ACCESSORIES",
"Tiers(GEN)",
"GEARBYSOCKET",
"GEARBYQUALITY",
"LEVELING",
"RECIPES",
"FLASK",
"HIDE",
};
return Structures;

View File

@@ -1,3 +1,16 @@
## MxFilterGen
Generate up to date Filter data for expensive uniques/cards based on the poe.ninja API.
MxFilterGen is my Path of Exile "Item Filter" Generator.
## Installation
- Install Visual Studio 2019 (Community or paid.) or newer.
- Get the source, put it inside a folder and open it.
- Build and copy the executable to a dedicated folder.
- Launch it, close it and edit the settings.json file.
- You are now ready to use it!
## Usage
- Edit the settings.json file to your desired config.
- Turn off Tier item type as you like.
- Set the values to a desired amount.
- Launch the generator.
- Copy the filter from the "out" directory within the generator folder.