Added Subzero icons and Achievements
Subzero icons are only available in low quality so I upscaled them with Waifu2x. Result is... well, good enough
BIN
assets/previewicons/cube-143.png
Normal file
After Width: | Height: | Size: 3.9 KiB |
BIN
assets/previewicons/cube-144.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
assets/previewicons/cube-145.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
assets/previewicons/cube-146.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
assets/previewicons/cube-147.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
BIN
assets/previewicons/cube-148.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
|
@ -41,6 +41,7 @@
|
|||
<img class="gdButton achFilter gameFilter" src="../assets/achievements/gd.png" height="12%" style="margin: 0% 1%" title="Geometry Dash" filter="gd">
|
||||
<img class="gdButton achFilter gameFilter" src="../assets/achievements/gdm.png" height="12%" style="margin: 0% 1%" title="Geometry Dash Meltdown" filter="meltdown">
|
||||
<img class="gdButton achFilter gameFilter" src="../assets/achievements/gdw.png" height="12%" style="margin: 0% 1%" title="Geometry Dash World" filter="world">
|
||||
<img class="gdButton achFilter gameFilter" src="../assets/achievements/gds.png" height="12%" style="margin: 0% 1%" title="Geometry Dash Subzero" filter="subzero">
|
||||
</div>
|
||||
<img id="submitFilters" class="gdButton" style="margin: 2.5% 0.7%" src="../assets/btn-submit.png" height="10%">
|
||||
</div>
|
||||
|
@ -83,7 +84,7 @@
|
|||
|
||||
let disabledFilters = {reward: [], type: [], game: []}
|
||||
let forms = ["cube", "ship", "ball", "ufo", "wave", "robot", "spider"]
|
||||
let gameColors = {meltdown: "rgb(255, 100, 0)", world: "rgb(0, 225, 255)"}
|
||||
let gameColors = {gd: "255,200,0", meltdown: "255, 100, 0", world: "100,220,0", subzero: "0,255,255"}
|
||||
let achievements = []
|
||||
let colors = {}
|
||||
let completed = false
|
||||
|
@ -111,7 +112,7 @@ function append(reset=true) {
|
|||
$('#searchBox').append(`<div class="flex searchresult leaderboardSlot" style="height: 18%; width: 92%; padding-left: 3%; padding-top: 0%">
|
||||
<div class="flex" style="width: 8%; margin-right: 2%"><img src="${iconImg}></div>
|
||||
<div>
|
||||
<h2 title="${x.trueID}" smaller inline" style="font-size: 4.5vh; margin-top: 1vh; color: ${gameColors[x.game] || "default"}">${x.name}</h2>
|
||||
<h2 title="${x.trueID}" smaller inline" style="font-size: 4.5vh; margin-top: 1vh; color: rgb(${gameColors[x.game]})">${x.name}</h2>
|
||||
<p style="margin-top: 2vh; color:${completed ? "yellow" : "white"}">${completed ? x.achievedDescription : x.description}</p>
|
||||
</div>
|
||||
</div>`)
|
||||
|
|
|
@ -164,6 +164,8 @@ fetch('./api/icons').then(res => {
|
|||
return (res.json())})
|
||||
.then(iconStuff => {
|
||||
|
||||
let miniIcon = iconStuff.icons.filter(x => x.startsWith("cube")).length
|
||||
|
||||
function filterIcon(name) { return iconStuff.icons.filter(x => x.startsWith(name)).sort(function (a,b) {return a.replace(/[^0-9]/g, "") - b.replace(/[^0-9]/g, "");})}
|
||||
|
||||
function appendIcon(form, formName) {
|
||||
|
@ -292,7 +294,7 @@ fetch('./api/icons').then(res => {
|
|||
$(this).addClass('iconSelected');
|
||||
selectedIcon = $(this).attr('num');
|
||||
selectedForm = $(this).attr('form');
|
||||
if (selectedIcon == 143) selectedIcon = 0;
|
||||
if (selectedIcon == miniIcon) selectedIcon = 0;
|
||||
|
||||
if (iconStuff.whiteIcons.find(x => x[1] == selectedIcon && x[0] == selectedForm)) { $('#colW').show(); $('#ccW').show() }
|
||||
else { $('#colW').hide(); $('#ccW').hide(); $(`#colW-12`).trigger('click') }
|
||||
|
|
|
@ -1587,6 +1587,66 @@
|
|||
"spriteOffset": [0, 0],
|
||||
"spriteSize": [88, 90]
|
||||
},
|
||||
"player_143_001.png": {
|
||||
"spriteOffset":[0,0],
|
||||
"spriteSize":[120,120]
|
||||
},
|
||||
"player_143_2_001.png": {
|
||||
"spriteOffset":[0,0],
|
||||
"spriteSize":[92,88]
|
||||
},
|
||||
"player_144_001.png": {
|
||||
"spriteOffset":[0,0],
|
||||
"spriteSize":[120,120]
|
||||
},
|
||||
"player_144_2_001.png": {
|
||||
"spriteOffset":[0,0],
|
||||
"spriteSize":[88,88]
|
||||
},
|
||||
"player_145_001.png": {
|
||||
"spriteOffset":[0,0],
|
||||
"spriteSize":[120,120]
|
||||
},
|
||||
"player_145_2_001.png": {
|
||||
"spriteOffset":[0,0],
|
||||
"spriteSize":[108,108]
|
||||
},
|
||||
"player_145_extra_001.png": {
|
||||
"spriteOffset":[0,-2],
|
||||
"spriteSize":[88,68]
|
||||
},
|
||||
"player_146_001.png": {
|
||||
"spriteOffset":[0,0],
|
||||
"spriteSize":[120,120]
|
||||
},
|
||||
"player_146_2_001.png": {
|
||||
"spriteOffset":[0,-18],
|
||||
"spriteSize":[92,52]
|
||||
},
|
||||
"player_146_extra_001.png": {
|
||||
"spriteOffset":[0,24],
|
||||
"spriteSize":[92,36]
|
||||
},
|
||||
"player_147_001.png": {
|
||||
"spriteOffset":[0,0],
|
||||
"spriteSize":[120,120]
|
||||
},
|
||||
"player_147_2_001.png": {
|
||||
"spriteOffset":[0,0],
|
||||
"spriteSize":[104,112]
|
||||
},
|
||||
"player_148_001.png": {
|
||||
"spriteOffset":[0,0],
|
||||
"spriteSize":[128,120]
|
||||
},
|
||||
"player_148_2_001.png": {
|
||||
"spriteOffset":[0,4],
|
||||
"spriteSize":[108,100]
|
||||
},
|
||||
"player_148_extra_001.png": {
|
||||
"spriteOffset":[0,-8],
|
||||
"spriteSize":[84,16]
|
||||
},
|
||||
"player_14_001.png": {
|
||||
"spriteOffset": [0, 0],
|
||||
"spriteSize": [121, 120]
|
||||
|
|
15
icons/parseIconPlist.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
const plist = require('plist');
|
||||
const fs = require('fs');
|
||||
const data = plist.parse(fs.readFileSync('C:/Users/Craig/Downloads/sz/assets/GJ_GameSheet02-hd.plist', 'utf8'));
|
||||
for (let key in data.frames) {
|
||||
if (key.startsWith(".")) delete data.frames[key]
|
||||
else { let fileData = data.frames[key];
|
||||
for (let innerKey in fileData) {
|
||||
if (typeof fileData[innerKey]) {
|
||||
if (!["spriteSize", "spriteOffset"].includes(innerKey)) delete fileData[innerKey] // remove useless stuff
|
||||
else fileData[innerKey] = JSON.parse(fileData[innerKey].replace(/{/g, '[').replace(/}/g, ']'));
|
||||
}
|
||||
}
|
||||
}}
|
||||
fs.writeFileSync('./gameSheet.json', JSON.stringify(data.frames, null, 2).replace(/\[\n.+?(-?\d+),\n.+?(-?\d+)\n.+]/g, "[$1, $2]")); // regex to make it easier to read
|
||||
console.log("Successfully converted!")
|
BIN
icons/player_143_001.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
icons/player_143_2_001.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
BIN
icons/player_144_001.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
icons/player_144_2_001.png
Normal file
After Width: | Height: | Size: 4 KiB |
BIN
icons/player_145_001.png
Normal file
After Width: | Height: | Size: 9.1 KiB |
BIN
icons/player_145_2_001.png
Normal file
After Width: | Height: | Size: 390 B |
BIN
icons/player_145_extra_001.png
Normal file
After Width: | Height: | Size: 5 KiB |
BIN
icons/player_146_001.png
Normal file
After Width: | Height: | Size: 8.2 KiB |
BIN
icons/player_146_2_001.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
icons/player_146_extra_001.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
icons/player_147_001.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
icons/player_147_2_001.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
icons/player_148_001.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
icons/player_148_2_001.png
Normal file
After Width: | Height: | Size: 6 KiB |
BIN
icons/player_148_extra_001.png
Normal file
After Width: | Height: | Size: 2 KiB |
|
@ -10,10 +10,10 @@
|
|||
"shardPoison": ["Poison Shards", ["shardPoison"]],
|
||||
"shardShadow": ["Shadow Shards", ["shardShadow"]],
|
||||
"shardBonus": ["Bonus Shards", ["shardBonus"]],
|
||||
"level": ["Official Levels", ["level", "mdlevel", "world.level", "steam"]],
|
||||
"level": ["Official Levels", ["level", "mdlevel", "world.level", "subzero.level", "steam"]],
|
||||
"customLevels": ["Online Levels", ["custom"]],
|
||||
"creator": ["Creator", ["creator", "submit"]],
|
||||
"ultimate": ["3 Coins", ["ultimatedemon", "mdcoin"]],
|
||||
"ultimate": ["3 Coins", ["ultimatedemon", "mdcoin", "szcoin"]],
|
||||
"mappacks": ["Map Packs", ["mappacks"]],
|
||||
"attempts": ["Attempts", ["attempt", "special"]],
|
||||
"jumps": ["Jumping", ["jump"]],
|
||||
|
|
|
@ -1694,7 +1694,7 @@
|
|||
"game": "gd",
|
||||
"name": "Bounce",
|
||||
"rewardType": "color2",
|
||||
"rewardID": 6,
|
||||
"rewardID": 5,
|
||||
"description": "Jump 1000 times",
|
||||
"achievedDescription": "Jumped 1000 times",
|
||||
"trueID": "geometry.ach.jump01"
|
||||
|
@ -1704,7 +1704,7 @@
|
|||
"game": "gd",
|
||||
"name": "I like jumping",
|
||||
"rewardType": "color2",
|
||||
"rewardID": 12,
|
||||
"rewardID": 11,
|
||||
"description": "Jump 10000 times",
|
||||
"achievedDescription": "Jumped 10000 times",
|
||||
"trueID": "geometry.ach.jump02"
|
||||
|
@ -1714,7 +1714,7 @@
|
|||
"game": "gd",
|
||||
"name": "You jump like a pro!",
|
||||
"rewardType": "color2",
|
||||
"rewardID": 13,
|
||||
"rewardID": 12,
|
||||
"description": "Jump 20000 times",
|
||||
"achievedDescription": "Jumped 20000 times",
|
||||
"trueID": "geometry.ach.jump03"
|
||||
|
@ -1744,7 +1744,7 @@
|
|||
"game": "gd",
|
||||
"name": "Trial and error",
|
||||
"rewardType": "color2",
|
||||
"rewardID": 7,
|
||||
"rewardID": 6,
|
||||
"description": "Do 100 attempts",
|
||||
"achievedDescription": "Did 100 attempts",
|
||||
"trueID": "geometry.ach.attempt01"
|
||||
|
@ -1754,7 +1754,7 @@
|
|||
"game": "gd",
|
||||
"name": "Crash Tester",
|
||||
"rewardType": "color2",
|
||||
"rewardID": 8,
|
||||
"rewardID": 7,
|
||||
"description": "Do 500 attempts",
|
||||
"achievedDescription": "Did 500 attempts",
|
||||
"trueID": "geometry.ach.attempt02"
|
||||
|
@ -1764,7 +1764,7 @@
|
|||
"game": "gd",
|
||||
"name": "You Shall Not Pass!",
|
||||
"rewardType": "color2",
|
||||
"rewardID": 15,
|
||||
"rewardID": 14,
|
||||
"description": "Do 2000 attempts",
|
||||
"achievedDescription": "Did 2000 attempts",
|
||||
"trueID": "geometry.ach.attempt03"
|
||||
|
@ -1984,7 +1984,7 @@
|
|||
"game": "gd",
|
||||
"name": "Number one fan!",
|
||||
"rewardType": "color2",
|
||||
"rewardID": 14,
|
||||
"rewardID": 13,
|
||||
"description": "Like Geometry Dash on Facebook",
|
||||
"achievedDescription": "Liked Geometry Dash on Facebook",
|
||||
"trueID": "geometry.ach.facebook"
|
||||
|
@ -1994,7 +1994,7 @@
|
|||
"game": "gd",
|
||||
"name": "GeometryTube",
|
||||
"rewardType": "color2",
|
||||
"rewardID": 21,
|
||||
"rewardID": 20,
|
||||
"description": "Subscribe to RobTop Games on YouTube",
|
||||
"achievedDescription": "Subscribed to RobTop Games on YouTube",
|
||||
"trueID": "geometry.ach.youtube"
|
||||
|
@ -2024,7 +2024,7 @@
|
|||
"game": "gd",
|
||||
"name": "Rampage!",
|
||||
"rewardType": "color2",
|
||||
"rewardID": 20,
|
||||
"rewardID": 19,
|
||||
"description": "A secret is required",
|
||||
"achievedDescription": "Destroyed a player",
|
||||
"trueID": "geometry.ach.secret01"
|
||||
|
@ -2044,7 +2044,7 @@
|
|||
"game": "gd",
|
||||
"name": "Ultrakill!",
|
||||
"rewardType": "color2",
|
||||
"rewardID": 28,
|
||||
"rewardID": 27,
|
||||
"description": "A secret is required",
|
||||
"achievedDescription": "Destroyed 100 players",
|
||||
"trueID": "geometry.ach.secret02b"
|
||||
|
@ -2659,6 +2659,106 @@
|
|||
"achievedDescription": "Collected 100 of each shard",
|
||||
"trueID": "geometry.ach.shardBonus05"
|
||||
},
|
||||
{
|
||||
"id": "mdlevel01a",
|
||||
"game": "meltdown",
|
||||
"name": "Yarrr!",
|
||||
"rewardType": "color1",
|
||||
"rewardID": 5,
|
||||
"description": "Complete \"The Seven Seas\" in Practice mode",
|
||||
"achievedDescription": "Completed \"The Seven Seas\" in Practice mode",
|
||||
"trueID": "geometry.ach.mdlevel01a"
|
||||
},
|
||||
{
|
||||
"id": "mdlevel01b",
|
||||
"game": "meltdown",
|
||||
"name": "The Seven Seas!",
|
||||
"rewardType": "cube",
|
||||
"rewardID": 65,
|
||||
"description": "Complete \"The Seven Seas\" in Normal mode",
|
||||
"achievedDescription": "Completed \"The Seven Seas\" in Normal mode",
|
||||
"trueID": "geometry.ach.mdlevel01b"
|
||||
},
|
||||
{
|
||||
"id": "mdlevel02a",
|
||||
"game": "meltdown",
|
||||
"name": "Lost Viking",
|
||||
"rewardType": "color1",
|
||||
"rewardID": 8,
|
||||
"description": "Complete \"Viking Arena\" in Practice mode",
|
||||
"achievedDescription": "Completed \"Viking Arena\" in Practice mode",
|
||||
"trueID": "geometry.ach.mdlevel02a"
|
||||
},
|
||||
{
|
||||
"id": "mdlevel02b",
|
||||
"game": "meltdown",
|
||||
"name": "Viking Arena!",
|
||||
"rewardType": "cube",
|
||||
"rewardID": 67,
|
||||
"description": "Complete \"Viking Arena\" in Normal mode",
|
||||
"achievedDescription": "Completed \"Viking Arena\" in Normal mode",
|
||||
"trueID": "geometry.ach.mdlevel02b"
|
||||
},
|
||||
{
|
||||
"id": "mdlevel03a",
|
||||
"game": "meltdown",
|
||||
"name": "Grounded Robots",
|
||||
"rewardType": "color1",
|
||||
"rewardID": 7,
|
||||
"description": "Complete \"Airborne Robots\" in Practice mode",
|
||||
"achievedDescription": "Completed \"Airborne Robots\" in Practice mode",
|
||||
"trueID": "geometry.ach.mdlevel03a"
|
||||
},
|
||||
{
|
||||
"id": "mdlevel03b",
|
||||
"game": "meltdown",
|
||||
"name": "Airborne Robots!",
|
||||
"rewardType": "cube",
|
||||
"rewardID": 69,
|
||||
"description": "Complete \"Airborne Robots\" in Normal mode",
|
||||
"achievedDescription": "Completed \"Airborne Robots\" in Normal mode",
|
||||
"trueID": "geometry.ach.mdlevel03b"
|
||||
},
|
||||
{
|
||||
"id": "mdcoin01",
|
||||
"game": "meltdown",
|
||||
"name": "Ultimate Seven Seas",
|
||||
"rewardType": "cube",
|
||||
"rewardID": 66,
|
||||
"description": "Collect all 3 coins on The Seven Seas",
|
||||
"achievedDescription": "Collected all 3 coins on The Seven Seas",
|
||||
"trueID": "geometry.ach.mdcoin01"
|
||||
},
|
||||
{
|
||||
"id": "mdcoin02",
|
||||
"game": "meltdown",
|
||||
"name": "Ultimate Viking Arena",
|
||||
"rewardType": "cube",
|
||||
"rewardID": 68,
|
||||
"description": "Collect all 3 coins on Viking Arena",
|
||||
"achievedDescription": "Collected all 3 coins on Viking Arena",
|
||||
"trueID": "geometry.ach.mdcoin02"
|
||||
},
|
||||
{
|
||||
"id": "mdcoin03",
|
||||
"game": "meltdown",
|
||||
"name": "Ultimate Airborne Robots",
|
||||
"rewardType": "cube",
|
||||
"rewardID": 70,
|
||||
"description": "Collect all 3 coins on Airborne Robots",
|
||||
"achievedDescription": "Collected all 3 coins on Airborne Robots",
|
||||
"trueID": "geometry.ach.mdcoin03"
|
||||
},
|
||||
{
|
||||
"id": "mdrate",
|
||||
"game": "meltdown",
|
||||
"name": "Meltdown Supporter!",
|
||||
"rewardType": "cube",
|
||||
"rewardID": 71,
|
||||
"description": "Rate \"Geometry Dash Meltdown\" and let us know what you think",
|
||||
"achievedDescription": "Rated \"Geometry Dash Meltdown\", thanks!",
|
||||
"trueID": "geometry.ach.mdrate"
|
||||
},
|
||||
{
|
||||
"id": "world.level001b",
|
||||
"game": "world",
|
||||
|
@ -2760,103 +2860,63 @@
|
|||
"trueID": "geometry.ach.world.level010b"
|
||||
},
|
||||
{
|
||||
"id": "mdlevel01a",
|
||||
"game": "meltdown",
|
||||
"name": "Yarrr!",
|
||||
"rewardType": "color1",
|
||||
"rewardID": 5,
|
||||
"description": "Complete \"The Seven Seas\" in Practice mode",
|
||||
"achievedDescription": "Completed \"The Seven Seas\" in Practice mode",
|
||||
"trueID": "geometry.ach.mdlevel01a"
|
||||
},
|
||||
{
|
||||
"id": "mdlevel01b",
|
||||
"game": "meltdown",
|
||||
"name": "The Seven Seas!",
|
||||
"id": "subzero.level001",
|
||||
"game": "subzero",
|
||||
"name": "Press Start!",
|
||||
"rewardType": "cube",
|
||||
"rewardID": 65,
|
||||
"description": "Complete \"The Seven Seas\" in Normal mode",
|
||||
"achievedDescription": "Completed \"The Seven Seas\" in Normal mode",
|
||||
"trueID": "geometry.ach.mdlevel01b"
|
||||
"rewardID": 143,
|
||||
"description": "Complete \"Press Start\" in Normal mode",
|
||||
"achievedDescription": "Completed \"Press Start\" in Normal mode",
|
||||
"trueID": "geometry.ach.subzero.level001"
|
||||
},
|
||||
{
|
||||
"id": "mdlevel02a",
|
||||
"game": "meltdown",
|
||||
"name": "Lost Viking",
|
||||
"rewardType": "color1",
|
||||
"rewardID": 8,
|
||||
"description": "Complete \"Viking Arena\" in Practice mode",
|
||||
"achievedDescription": "Completed \"Viking Arena\" in Practice mode",
|
||||
"trueID": "geometry.ach.mdlevel02a"
|
||||
},
|
||||
{
|
||||
"id": "mdlevel02b",
|
||||
"game": "meltdown",
|
||||
"name": "Viking Arena!",
|
||||
"id": "subzero.level002",
|
||||
"game": "subzero",
|
||||
"name": "Nock Em!",
|
||||
"rewardType": "cube",
|
||||
"rewardID": 67,
|
||||
"description": "Complete \"Viking Arena\" in Normal mode",
|
||||
"achievedDescription": "Completed \"Viking Arena\" in Normal mode",
|
||||
"trueID": "geometry.ach.mdlevel02b"
|
||||
"rewardID": 144,
|
||||
"description": "Complete \"Nock Em\" in Normal mode",
|
||||
"achievedDescription": "Completed \"Nock Em\" in Normal mode",
|
||||
"trueID": "geometry.ach.subzero.level002"
|
||||
},
|
||||
{
|
||||
"id": "mdlevel03a",
|
||||
"game": "meltdown",
|
||||
"name": "Grounded Robots",
|
||||
"rewardType": "color1",
|
||||
"rewardID": 7,
|
||||
"description": "Complete \"Airborne Robots\" in Practice mode",
|
||||
"achievedDescription": "Completed \"Airborne Robots\" in Practice mode",
|
||||
"trueID": "geometry.ach.mdlevel03a"
|
||||
},
|
||||
{
|
||||
"id": "mdlevel03b",
|
||||
"game": "meltdown",
|
||||
"name": "Airborne Robots!",
|
||||
"id": "subzero.level003",
|
||||
"game": "subzero",
|
||||
"name": "Power Trip!",
|
||||
"rewardType": "cube",
|
||||
"rewardID": 69,
|
||||
"description": "Complete \"Airborne Robots\" in Normal mode",
|
||||
"achievedDescription": "Completed \"Airborne Robots\" in Normal mode",
|
||||
"trueID": "geometry.ach.mdlevel03b"
|
||||
"rewardID": 145,
|
||||
"description": "Complete \"Power Trip\" in Normal mode",
|
||||
"achievedDescription": "Completed \"Power Trip\" in Normal mode",
|
||||
"trueID": "geometry.ach.subzero.level003"
|
||||
},
|
||||
{
|
||||
"id": "mdcoin01",
|
||||
"game": "meltdown",
|
||||
"name": "Ultimate Seven Seas",
|
||||
"id": "szcoin001",
|
||||
"game": "subzero",
|
||||
"name": "Ultimate Press Start",
|
||||
"rewardType": "cube",
|
||||
"rewardID": 66,
|
||||
"description": "Collect all 3 coins on The Seven Seas",
|
||||
"achievedDescription": "Collected all 3 coins on The Seven Seas",
|
||||
"trueID": "geometry.ach.mdcoin01"
|
||||
"rewardID": 146,
|
||||
"description": "Collect all 3 coins on Press Start",
|
||||
"achievedDescription": "Collected all 3 coins on Press Start",
|
||||
"trueID": "geometry.ach.subzero.coins001"
|
||||
},
|
||||
{
|
||||
"id": "mdcoin02",
|
||||
"game": "meltdown",
|
||||
"name": "Ultimate Viking Arena",
|
||||
"id": "szcoin002",
|
||||
"game": "subzero",
|
||||
"name": "Ultimate Nock Em",
|
||||
"rewardType": "cube",
|
||||
"rewardID": 68,
|
||||
"description": "Collect all 3 coins on Viking Arena",
|
||||
"achievedDescription": "Collected all 3 coins on Viking Arena",
|
||||
"trueID": "geometry.ach.mdcoin02"
|
||||
"rewardID": 147,
|
||||
"description": "Collect all 3 coins on Nock Em",
|
||||
"achievedDescription": "Collected all 3 coins on Nock Em",
|
||||
"trueID": "geometry.ach.subzero.coins002"
|
||||
},
|
||||
{
|
||||
"id": "mdcoin03",
|
||||
"game": "meltdown",
|
||||
"name": "Ultimate Airborne Robots",
|
||||
"id": "szcoin003",
|
||||
"game": "subzero",
|
||||
"name": "Ultimate Power Trip",
|
||||
"rewardType": "cube",
|
||||
"rewardID": 70,
|
||||
"description": "Collect all 3 coins on Airborne Robots",
|
||||
"achievedDescription": "Collected all 3 coins on Airborne Robots",
|
||||
"trueID": "geometry.ach.mdcoin03"
|
||||
},
|
||||
{
|
||||
"id": "mdrate",
|
||||
"game": "meltdown",
|
||||
"name": "Meltdown Supporter!",
|
||||
"rewardType": "cube",
|
||||
"rewardID": 71,
|
||||
"description": "Rate \"Geometry Dash Meltdown\" and let us know what you think",
|
||||
"achievedDescription": "Rated \"Geometry Dash Meltdown\", thanks!",
|
||||
"trueID": "geometry.ach.mdrate"
|
||||
"rewardID": 148,
|
||||
"description": "Collect all 3 coins on Power Trip",
|
||||
"achievedDescription": "Collected all 3 coins on Power Trip",
|
||||
"trueID": "geometry.ach.subzero.coins003"
|
||||
}
|
||||
]
|
47
misc/parseAchievementPlist.js
Normal file
|
@ -0,0 +1,47 @@
|
|||
let path = "../extra/"
|
||||
|
||||
let files = ["AchievementsDesc", "AchievementsDescMD", null, "AchievementsDescSZ"]
|
||||
let gameNames = ["gd", "meltdown", "world", "subzero"]
|
||||
let achString = "geometry.ach."
|
||||
let rewardTypes = { color: "color1", icon: "cube", bird: "ufo", dart: "wave", special: "trail", death: "deathEffect" }
|
||||
let games = { "md": "meltdown", "world.": "world", "subzero.": "subzero" }
|
||||
|
||||
const plist = require('plist');
|
||||
const fs = require('fs');
|
||||
|
||||
let achArray = []
|
||||
|
||||
files.forEach((file, fileNum) => {
|
||||
if (!file) return
|
||||
let data = plist.parse(fs.readFileSync(path + file + '.plist', 'utf8'));
|
||||
|
||||
console.log(`Converting ${file}.plist...`)
|
||||
|
||||
for (let key in data) {
|
||||
if (!achArray.find(x => x.trueID == key)) {
|
||||
let fileData = data[key];
|
||||
let reward = fileData.icon ? fileData.icon.split("_") : []
|
||||
let achObj = {
|
||||
id: key.slice(achString.length),
|
||||
game: gameNames[fileNum],
|
||||
name: fileData.title,
|
||||
rewardType: rewardTypes[reward[0]] || reward[0] || "misc",
|
||||
rewardID: +reward[1] || -1,
|
||||
description: fileData.unachievedDescription,
|
||||
achievedDescription: fileData.achievedDescription,
|
||||
trueID: key
|
||||
}
|
||||
Object.keys(games).forEach(x => { if (key.startsWith(achString + x)) achObj.game = games[x] })
|
||||
if (key == achString + "rate") achObj.id = "rating"
|
||||
if (achObj.id.startsWith("subzero.coins")) achObj.id = achObj.id.replace("subzero.coins", "szcoin")
|
||||
if (achObj.id.includes("demoncoin")) achObj.id = achObj.id.replace("demoncoin", "ultimatedemon")
|
||||
achArray.push(achObj)
|
||||
}}
|
||||
})
|
||||
|
||||
achArray = achArray.filter(x => !x.id.startsWith("lite"))
|
||||
let final = achArray.filter(x => x.game == "gd")
|
||||
gameNames.slice(1).forEach(g => final = final.concat(achArray.filter(x => x.game == g)))
|
||||
|
||||
fs.writeFileSync('achievements.json', JSON.stringify(final, null, 2).replace(/\[\n.+?(-?\d+),\n.+?(-?\d+)\n.+]/g, "[$1, $2]")); // regex to make it easier to read
|
||||
console.log("Successfully converted!")
|
|
@ -1,71 +0,0 @@
|
|||
let path = "C:/Program Files (x86)/Steam/steamapps/common/Geometry Dash/Resources/"
|
||||
|
||||
let files = ["AchievementsDesc", "AchievementsDescMD"]
|
||||
let values = ["achievedDescription", "title", "icon", "unachievedDescription"]
|
||||
let innerKey = null
|
||||
let jsonValues = false
|
||||
let exportName = "achievements"
|
||||
|
||||
// let files = ["GJ_GameSheet02-uhd"]
|
||||
// let values = ["spriteSize", "spriteOffset"]
|
||||
// let innerKey = "frames"
|
||||
// let jsonValues = true
|
||||
|
||||
const plist = require('plist');
|
||||
const fs = require('fs');
|
||||
|
||||
let final = {}
|
||||
|
||||
files.forEach(file => {
|
||||
let data = plist.parse(fs.readFileSync(path + file + '.plist', 'utf8'));
|
||||
if (innerKey) data = data[innerKey]
|
||||
|
||||
console.log(`Converting ${file}.plist...`)
|
||||
|
||||
for (let key in data) {
|
||||
let fileData = data[key];
|
||||
for (let innerKey in fileData) {
|
||||
if (fileData[innerKey] && values.includes(innerKey)) {
|
||||
if (!final[key]) final[key] = {}
|
||||
if (jsonValues) final[key][innerKey] = JSON.parse(fileData[innerKey].replace(/{/g, '[').replace(/}/g, ']')); // for icon sheet
|
||||
else final[key][innerKey] = fileData[innerKey]
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
console.log("Finishing up...")
|
||||
|
||||
if (exportName == "achievements") { // hardcoded shit starts here!
|
||||
|
||||
let achString = "geometry.ach."
|
||||
let rewardTypes = {color: "color1", icon: "cube", bird: "ufo", dart: "wave", special: "trail", death: "deathEffect"}
|
||||
let games = {"md": "meltdown", "world.": "world"}
|
||||
|
||||
let achArray = []
|
||||
for (let k in final) {
|
||||
let reward = final[k].icon ? final[k].icon.split("_") : []
|
||||
let achObj = {
|
||||
id: k.slice(achString.length),
|
||||
game: "gd",
|
||||
name: final[k].title,
|
||||
rewardType: rewardTypes[reward[0]] || reward[0] || "misc",
|
||||
rewardID: +reward[1] || -1,
|
||||
description: final[k].unachievedDescription,
|
||||
achievedDescription: final[k].achievedDescription,
|
||||
trueID: k
|
||||
}
|
||||
Object.keys(games).forEach(x => {
|
||||
if (k.startsWith(achString + x)) achObj.game = games[x]
|
||||
if (k == achString + "rate") achObj.id = "rating"
|
||||
if (achObj.id.includes("demoncoin")) achObj.id = achObj.id.replace("demoncoin", "ultimatedemon")
|
||||
})
|
||||
achArray.push(achObj)
|
||||
}
|
||||
data = achArray.filter(x => !x.id.startsWith("lite"))
|
||||
data = data.filter(x => x.game == "gd").concat(data.filter(x => x.game != "gd"))
|
||||
}
|
||||
|
||||
fs.writeFileSync(exportName + '.json', JSON.stringify(data, null, 2).replace(/\[\n.+?(-?\d+),\n.+?(-?\d+)\n.+]/g, "[$1, $2]")); // regex to make it easier to read
|
||||
|
||||
console.log("Successfully converted!")
|