Skip to content

Commit

Permalink
Merge pull request #303 from hymccord/soso
Browse files Browse the repository at this point in the history
Add initial SoSo pop data from MHCT
  • Loading branch information
tsitu authored Apr 27, 2024
2 parents 2070f9e + 7b12807 commit 25ee6e8
Show file tree
Hide file tree
Showing 9 changed files with 285 additions and 39 deletions.
1 change: 1 addition & 0 deletions build/process-population.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"data/pop-csv/queso-geyser.csv",
"data/pop-csv/queso-river.csv",
"data/pop-csv/ronza.csv",
"data/pop-csv/school-of-sorcery.csv",
"data/pop-csv/table-of-contents.csv",
"data/pop-csv/town-of-digby.csv",
"data/pop-csv/town-of-gnawnia.csv",
Expand Down
12 changes: 12 additions & 0 deletions data/_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@ var json2csv = require("json2csv");
var _ = require("lodash");
var Combinatorics = require("js-combinatorics");

/**
* @typedef {Object} AttractionData
* @property {string} location
* @property {string} stage
* @property {string} cheese
* @property {string} charm
* @property {string} attraction
* @property {string} mouse
* @property {number} sample
* @property {number} seen
*/

// Location,Phase,Cheese,Charm,Attraction Rate,Mouse,Sample Size
exports.POP_FIELDS = [
{ label: "Location", value: "location" },
Expand Down
18 changes: 9 additions & 9 deletions data/cheese-attraction.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,12 @@ var baselineAttArray = {
"Extra Rich Cloud Cheesecake": 1.0000, // Added with SP + Gameplay update 10/05
"Festive Feta": 0.9000, // Sample: 4959 (High)
"Final Draft Derby": 1.0000, // Added with FF release
"Fishy Fromage": 1.0000, // 2021-10-05 Gameplay Update
"First Draft Derby": 1.0000, // Added with FF release
"Fishy Fromage": 1.0000, // 2021-10-05 Gameplay Update
"Flamin' Queso": 1.0000, // 2021-10-05 Gameplay Update
"Fusion Fondue": 1.0000, // 2021-10-05 Gameplay Update
"Galleon Gouda": 1.0000, // 2021-10-05 Gameplay Update (Confirmed by Michele in #community-tools on discord on 10/5 12:04PM GMT-5)
"Gauntlet String": 1.0000, // 2021-10-05 Gameplay Update
"Grubbeen": 1.0000, // Added with FF release
"Tier 2": 1.0000, // 2021-10-05 Gameplay Update
"Tier 3": 1.0000, // 2021-10-05 Gameplay Update
"Tier 4": 1.0000, // 2021-10-05 Gameplay Update
"Tier 5": 1.0000, // 2021-10-05 Gameplay Update
"Tier 6": 1.0000, // 2021-10-05 Gameplay Update
"Tier 7": 1.0000, // 2021-10-05 Gameplay Update
"Tier 8": 1.0000, // 2021-10-05 Gameplay Update
"Gemstone": 1.0000, // 2021-10-05 Gameplay Update
"Ghastly Galleon Gouda": 1.0000, // 2021-10-05 Gameplay Update
"Ghoulgonzola": 0.8957, // Sample: 3123 (High)
Expand All @@ -76,6 +68,7 @@ var baselineAttArray = {
"Gouda": 0.9000, // 2021-10-05 Gameplay Update
"Graveblossom Camembert": 1.0000, // 2021-10-05 Gameplay Update
"Grilled": 1.0000, // 2021-10-05 Gameplay Update
"Grubbeen": 1.0000, // Added with FF release
"Gumbo": 1.0000, // 2021-10-05 Gameplay Update
"Hot Queso": 1.0000, // 2021-10-05 Gameplay Update
"Inferno Havarti": 1.0000, // 2021-10-05 Gameplay Update
Expand Down Expand Up @@ -140,6 +133,13 @@ var baselineAttArray = {
"Swiss String": 0.8000, // 2021-10-05 Gameplay Update
"Terre Ricotta": 1.0000, // 2021-10-05 Gameplay Update
"Thousandth Draft Derby": 1.0000, // M1K release 16 Apr 24
"Tier 2": 1.0000, // 2021-10-05 Gameplay Update
"Tier 3": 1.0000, // 2021-10-05 Gameplay Update
"Tier 4": 1.0000, // 2021-10-05 Gameplay Update
"Tier 5": 1.0000, // 2021-10-05 Gameplay Update
"Tier 6": 1.0000, // 2021-10-05 Gameplay Update
"Tier 7": 1.0000, // 2021-10-05 Gameplay Update
"Tier 8": 1.0000, // 2021-10-05 Gameplay Update
"Undead Emmental": 1.0000, // 2021-10-05 Gameplay Update
"Undead String Emmental": 1.0000, // 2021-10-05 Gameplay Update
"Vanilla Stilton": 1.0000, // Confirmed by Michele in #community-tools on discord on 08 Apr 22
Expand Down
47 changes: 47 additions & 0 deletions data/pop-csv/school-of-sorcery.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
"Location","Phase","Cheese","Charm","Attraction Rate","Mouse","Sample Size"
"School of Sorcery","Hallway","SB+/Gouda/Brie","-","100%","Hall Monitor",1
"School of Sorcery","Arcane Arts","SB+/Gouda/Brie","-","41.29%","Broomstick Bungler",5118
"School of Sorcery","Arcane Arts","SB+/Gouda/Brie","-","38.32%","Perpetual Detention",5118
"School of Sorcery","Arcane Arts","SB+/Gouda/Brie","-","20.40%","Misfortune Teller",5118
"School of Sorcery","Arcane Arts","Apprentice Ambert","-","43.57%","Invisible Fashionista",8006
"School of Sorcery","Arcane Arts","Apprentice Ambert","-","40.98%","Arcana Overachiever",8006
"School of Sorcery","Arcane Arts","Apprentice Ambert","-","15.45%","Enchanted Chess Club Champion",8006
"School of Sorcery","Arcane Arts","Master Mimolette","-","47.92%","Featherlight",1319
"School of Sorcery","Arcane Arts","Master Mimolette","-","37.53%","Illustrious Illusionist",1319
"School of Sorcery","Arcane Arts","Master Mimolette","-","14.56%","Constructively Critical Artist",1319
"School of Sorcery","Shadow Sciences","SB+/Gouda/Brie","-","41.29%","Uncoordinated Cauldron Carrier",5118
"School of Sorcery","Shadow Sciences","SB+/Gouda/Brie","-","38.32%","Mixing Mishap",5118
"School of Sorcery","Shadow Sciences","SB+/Gouda/Brie","-","20.40%","Bookworm",5118
"School of Sorcery","Shadow Sciences","Apprentice Ambert","-","43.57%","Audacious Alchemist",8006
"School of Sorcery","Shadow Sciences","Apprentice Ambert","-","40.98%","Classroom Keener",8006
"School of Sorcery","Shadow Sciences","Apprentice Ambert","-","15.45%","Prestigious Prestidigitator",8006
"School of Sorcery","Shadow Sciences","Master Mimolette","-","47.92%","Teleporting Truant",1319
"School of Sorcery","Shadow Sciences","Master Mimolette","-","37.53%","Classroom Disrupter",1319
"School of Sorcery","Shadow Sciences","Master Mimolette","-","14.56%","Magical Multitasker",1319
"School of Sorcery","Final Exam - Arcane","SB+/Gouda/Brie","-","32.33%","Perpetual Detention",133
"School of Sorcery","Final Exam - Arcane","SB+/Gouda/Brie","-","27.07%","Misfortune Teller",133
"School of Sorcery","Final Exam - Arcane","SB+/Gouda/Brie","-","32.33%","Broomstick Bungler",133
"School of Sorcery","Final Exam - Arcane","SB+/Gouda/Brie","-","8.27%","Sleep Starved Scholar",133
"School of Sorcery","Final Exam - Arcane","Apprentice Ambert","-","36.35%","Invisible Fashionista",520
"School of Sorcery","Final Exam - Arcane","Apprentice Ambert","-","22.50%","Enchanted Chess Club Champion",520
"School of Sorcery","Final Exam - Arcane","Apprentice Ambert","-","30.58%","Arcana Overachiever",520
"School of Sorcery","Final Exam - Arcane","Apprentice Ambert","-","10.58%","Class Clown",520
"School of Sorcery","Final Exam - Arcane","Master Mimolette","-","34.54%","Featherlight",1349
"School of Sorcery","Final Exam - Arcane","Master Mimolette","-","31.06%","Illustrious Illusionist",1349
"School of Sorcery","Final Exam - Arcane","Master Mimolette","-","24.46%","Constructively Critical Artist",1349
"School of Sorcery","Final Exam - Arcane","Master Mimolette","-","9.93%","Tyrannical Thaumaturge",1349
"School of Sorcery","Final Exam - Shadow","SB+/Gouda/Brie","-","32.33%","Uncoordinated Cauldron Carrier",133
"School of Sorcery","Final Exam - Shadow","SB+/Gouda/Brie","-","32.33%","Mixing Mishap",133
"School of Sorcery","Final Exam - Shadow","SB+/Gouda/Brie","-","27.07%","Bookworm",133
"School of Sorcery","Final Exam - Shadow","SB+/Gouda/Brie","-","8.27%","Cheat Sheet Conjurer",133
"School of Sorcery","Final Exam - Shadow","Apprentice Ambert","-","36.35%","Audacious Alchemist",520
"School of Sorcery","Final Exam - Shadow","Apprentice Ambert","-","30.58%","Classroom Keener",520
"School of Sorcery","Final Exam - Shadow","Apprentice Ambert","-","22.50%","Prestigious Prestidigitator",520
"School of Sorcery","Final Exam - Shadow","Apprentice Ambert","-","10.58%","Celestial Summoner",520
"School of Sorcery","Final Exam - Shadow","Master Mimolette","-","34.54%","Teleporting Truant",1349
"School of Sorcery","Final Exam - Shadow","Master Mimolette","-","31.06%","Classroom Disrupter",1349
"School of Sorcery","Final Exam - Shadow","Master Mimolette","-","24.46%","Magical Multitasker",1349
"School of Sorcery","Final Exam - Shadow","Master Mimolette","-","9.93%","Data Devourer",1349
"School of Sorcery","Arcane Arts - Boss","SB+/Gouda/Brie/Apprentice Ambert/Master Mimolette","-","100%","Arcane Master Sorcerer",1
"School of Sorcery","Shadow Sciences - Boss","SB+/Gouda/Brie/Apprentice Ambert/Master Mimolette","-","100%","Shadow Master Sorcerer",1
"School of Sorcery","Final Exam - Boss","SB+/Gouda/Brie/Apprentice Ambert/Master Mimolette","-","100%","Mythical Master Sorcerer",1
4 changes: 2 additions & 2 deletions data/pop-js/_template.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ module.exports = {
],
/**
*
* @param {{stage: string, location: string, cheese: string, mouse: string, attraction: string, sample: number}[]} data
* @returns {{stage: string, location: string, cheese: string, mouse: string, attraction: string, sample: number}[]}
* @param {import('../_utils').AttractionData[]} data
* @returns {import('../_utils').AttractionData[]}
*/
postProcess: function(data) {
return data;
Expand Down
200 changes: 200 additions & 0 deletions data/pop-js/school-of-sorcery.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
const utils = require("../_utils");

const stages = ["Arcane Arts", "Shadow Sciences", "Final Exam - Arcane", "Final Exam - Shadow"];
const cheeses = ["Standard", "Apprentice Ambert", "Master Mimolette"];

const miceByStageThenCheese = {
"Arcane Arts": {
"Standard": [
"Perpetual Detention",
"Broomstick Bungler",
"Misfortune Teller",
],
"Apprentice Ambert": [
"Arcana Overachiever",
"Invisible Fashionista",
"Enchanted Chess Club Champion",
],
"Master Mimolette": [
"Illustrious Illusionist",
"Featherlight",
"Constructively Critical Artist",
]
},
"Shadow Sciences": {
"Standard": [
"Mixing Mishap",
"Uncoordinated Cauldron Carrier",
"Bookworm",
],
"Apprentice Ambert": [
"Classroom Keener",
"Audacious Alchemist",
"Prestigious Prestidigitator",
],
"Master Mimolette": [
"Classroom Disrupter",
"Teleporting Truant",
"Magical Multitasker",
]
}
}

// Instead of repeating a lot of line just use previous pools
miceByStageThenCheese["Final Exam - Arcane"] = {
"Standard": [
...miceByStageThenCheese["Arcane Arts"]["Standard"],
"Sleep Starved Scholar",
],
"Apprentice Ambert": [
...miceByStageThenCheese["Arcane Arts"]["Apprentice Ambert"],
"Class Clown",
],
"Master Mimolette": [
...miceByStageThenCheese["Arcane Arts"]["Master Mimolette"],
"Tyrannical Thaumaturge",
]
};

miceByStageThenCheese["Final Exam - Shadow"] = {
"Standard": [
...miceByStageThenCheese["Shadow Sciences"]["Standard"],
"Cheat Sheet Conjurer",
],
"Apprentice Ambert": [
...miceByStageThenCheese["Shadow Sciences"]["Apprentice Ambert"],
"Celestial Summoner",
],
"Master Mimolette": [
...miceByStageThenCheese["Shadow Sciences"]["Master Mimolette"],
"Data Devourer",
]
}

const standardCheeseVarItem = {
vars: {
cheese: {
Brie: true,
"Empowered Brie": true,
Gouda: true,
"SB+": true,
"ESB+": true,
}
},
fields: {
cheese: "SB+/Gouda/Brie"
}
}

function genSeries() {
const series = [];
for (const stage of stages) {
for (const cheese of cheeses) {
const config = {
stage: utils.genVarField("stage", stage),
cheese: utils.genVarField("cheese", cheese),
config: [
{
opts: {
include: miceByStageThenCheese[stage][cheese]
}
}
]
};

// Replace the standard placeholder with actual multi cheese config (see above)
if (cheese === "Standard") {
config.cheese[0] = standardCheeseVarItem;
}

series.push(config);
}
}

return series;
}

module.exports = {
default: {
location: utils.genVarField("location", "School of Sorcery"),
},
series: genSeries(),
/**
*
* @param {import('../_utils').AttractionData[]} data
* @returns {import('../_utils').AttractionData[]}
*/
postProcess: function(data) {

// See comments in Zugwangz's Tower about how to combine pools of mice that exist on opposite sides but have same AR

// To find the matching pair: https://docs.google.com/spreadsheets/d/1LhtH3yf0ImnUv4Z5rGqDskmGxfXvSglDfXqFfeXmFq8/edit?usp=sharing
// Find Arcane Mouse and match its Mouse Power with the Shadow Side. Or look at the MinLuck table. It's the same thing.
const arcaneToShadowMiceMap = {
// Standard
"Perpetual Detention": "Mixing Mishap",
"Broomstick Bungler": "Uncoordinated Cauldron Carrier",
"Misfortune Teller": "Bookworm",

// AA
"Arcana Overachiever": "Classroom Keener",
"Invisible Fashionista": "Audacious Alchemist",
"Enchanted Chess Club Champion": "Prestigious Prestidigitator",

// MM
"Illustrious Illusionist": "Classroom Disrupter",
"Featherlight": "Teleporting Truant",
"Constructively Critical Artist": "Magical Multitasker",

// FE Standard
"Sleep Starved Scholar": "Cheat Sheet Conjurer",

// FE AA
"Class Clown": "Celestial Summoner",

// FE MM
"Tyrannical Thaumaturge": "Data Devourer"
}

data.forEach((run, i) => {
if (run.stage.indexOf('Arcane') > -1) {
const oppStage = run.stage === 'Arcane Arts' ? 'Shadow Sciences' : 'Final Exam - Shadow';
const oppMouse = arcaneToShadowMiceMap[run.mouse];

data
.forEach((other, j) => {
if (other.cheese == run.cheese
&& other.stage == oppStage
&& other.mouse == oppMouse) {
// Add seen to each other. Recalc AR.

data[i].seen += data[j].seen;
data[i].sample += data[j].sample;

data[j].seen = data[i].seen;
data[j].sample = data[i].sample;

data[i].attraction = (data[i].seen / data[i].sample * 100).toFixed(2) + "%";
data[j].attraction = (data[j].seen / data[j].sample * 100).toFixed(2) + "%";
}
});
}
});

// Put this first
data.unshift(
// Hallway, why are you here!
{location: "School of Sorcery", cheese: "SB+/Gouda/Brie", stage: "Hallway", mouse: "Hall Monitor", attraction: "100%", sample: 1},
);

// These last
data.push(
// Manually add boss stages
{location: "School of Sorcery", cheese: "SB+/Gouda/Brie/Apprentice Ambert/Master Mimolette", stage: "Arcane Arts - Boss", mouse: "Arcane Master Sorcerer", attraction: "100%", sample: 1},
{location: "School of Sorcery", cheese: "SB+/Gouda/Brie/Apprentice Ambert/Master Mimolette", stage: "Shadow Sciences - Boss", mouse: "Shadow Master Sorcerer", attraction: "100%", sample: 1},
{location: "School of Sorcery", cheese: "SB+/Gouda/Brie/Apprentice Ambert/Master Mimolette", stage: "Final Exam - Boss", mouse: "Mythical Master Sorcerer", attraction: "100%", sample: 1},
);

return data;
}
}
28 changes: 0 additions & 28 deletions data/populations.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2852,31 +2852,3 @@ Twisted Garden,Poured,Lunaria Camembert,-,29.63%,Twisted Carmine,
Twisted Garden,Poured,Lunaria Camembert,Shattering,38.86%,Camofusion,
Twisted Garden,Poured,Lunaria Camembert,Shattering,36.57%,Fungal Spore,
Twisted Garden,Poured,Lunaria Camembert,Shattering,24.57%,Shattered Carmine,
School of Sorcery,Hallway,SB+/Gouda/Brie,-,100.00%,Hall Monitor,
School of Sorcery,Arcane Arts,SB+/Gouda/Brie,-,33.33%,Perpetual Detention,
School of Sorcery,Arcane Arts,SB+/Gouda/Brie,-,33.33%,Broomstick Bungler,
School of Sorcery,Arcane Arts,SB+/Gouda/Brie,-,33.33%,Misfortune Teller,
School of Sorcery,Arcane Arts,Apprentice Ambert,-,40.00%,Arcana Overachiever,
School of Sorcery,Arcane Arts,Apprentice Ambert,-,45.00%,Invisible Fashionista,
School of Sorcery,Arcane Arts,Apprentice Ambert,-,15.00%,Enchanted Chess Club Champion,
School of Sorcery,Arcane Arts,Master Mimolette,-,40.00%,Illustrious Illusionist,
School of Sorcery,Arcane Arts,Master Mimolette,-,45.00%,Featherlight,
School of Sorcery,Arcane Arts,Master Mimolette,-,15.00%,Constructively Critical Artist,
School of Sorcery,Arcane Arts - Boss,SB+/Gouda/Brie/Apprentice Ambert/Master Mimolette,-,100.00%,Arcane Master Sorcerer,
School of Sorcery,Shadow Sciences,SB+/Gouda/Brie,-,33.33%,Mixing Mishap,
School of Sorcery,Shadow Sciences,SB+/Gouda/Brie,-,33.33%,Uncoordinated Cauldron Carrier,
School of Sorcery,Shadow Sciences,SB+/Gouda/Brie,-,33.33%,Bookworm,
School of Sorcery,Shadow Sciences,Apprentice Ambert,-,40.00%,Classroom Keener,
School of Sorcery,Shadow Sciences,Apprentice Ambert,-,45.00%,Audacious Alchemist,
School of Sorcery,Shadow Sciences,Apprentice Ambert,-,15.00%,Prestigious Prestidigitator,
School of Sorcery,Shadow Sciences,Master Mimolette,-,40.00%,Classroom Disrupter,
School of Sorcery,Shadow Sciences,Master Mimolette,-,45.00%,Teleporting Truant,
School of Sorcery,Shadow Sciences,Master Mimolette,-,15.00%,Magical Multitasker,
School of Sorcery,Shadow Sciences - Boss,SB+/Gouda/Brie/Apprentice Ambert/Master Mimolette,-,100.00%,Shadow Master Sorcerer,
School of Sorcery,Final Exam - Arcane,SB+/Gouda/Brie,-,100.00%,Sleep Starved Scholar,
School of Sorcery,Final Exam - Arcane,Apprentice Ambert,-,100.00%,Class Clown,
School of Sorcery,Final Exam - Arcane,Master Mimolette,-,100.00%,Tyrannical Thaumaturge,
School of Sorcery,Final Exam - Shadow,SB+/Gouda/Brie,-,100.00%,Cheat Sheet Conjurer,
School of Sorcery,Final Exam - Shadow,Apprentice Ambert,-,100.00%,Celestial Summoner,
School of Sorcery,Final Exam - Shadow,Master Mimolette,-,100.00%,Data Devourer,
School of Sorcery,Final Exam - Boss,SB+/Gouda/Brie/Apprentice Ambert/Master Mimolette,-,100.00%,Mythical Master Sorcerer,
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"pop:prickly": "node data/pop prickly-plains > data/pop-csv/prickly-plains.csv",
"pop:queso": "node data/pop queso-river > data/pop-csv/queso-river.csv",
"pop:ronza": "node data/pop ronza > data/pop-csv/ronza.csv",
"pop:soso": "node data/pop school-of-sorcery > data/pop-csv/school-of-sorcery.csv",
"pop:toc": "node data/pop table-of-contents > data/pop-csv/table-of-contents.csv",
"pop:toxic": "node data/pop toxic-spill > data/pop-csv/toxic-spill.csv",
"pop:vrift": "node data/pop valour-rift > data/pop-csv/valour-rift.csv",
Expand Down
13 changes: 13 additions & 0 deletions patches/jacksmhtools-client+0.1.2.patch
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,16 @@ index 98150c1..6d3fe95 100644
var Promise = require('bluebird')

var DEFAULTS = {
diff --git a/node_modules/jacksmhtools-client/src/utils.js b/node_modules/jacksmhtools-client/src/utils.js
index 23250e1..1b13d7a 100644
--- a/node_modules/jacksmhtools-client/src/utils.js
+++ b/node_modules/jacksmhtools-client/src/utils.js
@@ -5,6 +5,8 @@ var TYPE_ALIASES = {
}
var NAME_ALIASES = {
cheese: {
+ 'esb': 'Empowered SUPER|Brie+',
+ 'esb+': 'Empowered SUPER|Brie+',
'sb': 'SUPER|Brie+',
'sb+': 'SUPER|Brie+',
'toxic sb': 'Toxic SUPER|Brie+',

0 comments on commit 25ee6e8

Please sign in to comment.