Compare commits
112 commits
Author | SHA1 | Date | |
---|---|---|---|
446951ea0f | |||
03b87c64f6 | |||
638fc44b23 | |||
315a345009 | |||
3d2d96f86e | |||
afa7971f17 | |||
8d2e685957 | |||
477532580c | |||
3f91f62047 | |||
192765a3ec | |||
862ee83356 | |||
116fd90232 | |||
22f5f06e5c | |||
7d4dcfa2b9 | |||
fe7ec985f2 | |||
2a3fcd5820 | |||
24bab0fb18 | |||
76108fa49f | |||
7446de3741 | |||
a3533aa7e9 | |||
1034ab46f4 | |||
d59ccdcd8a | |||
cb04dc166c | |||
6984d9cabc | |||
25b29da736 | |||
0588b2a6a3 | |||
38fad624a8 | |||
9d34436d3f | |||
56d11b3534 | |||
44ab8f1f9c | |||
2490c77bbb | |||
9066e96a7c | |||
385a0af747 | |||
3d00b8306a | |||
bde76d6548 | |||
3b11775582 | |||
fb2a5e8c02 | |||
281ff67005 | |||
69d0964b9b | |||
6f706c62bd | |||
55e5242f6f | |||
d98f24812d | |||
cd3261c9b4 | |||
ef9aa2d8cb | |||
e11c54cae5 | |||
e90124c4df | |||
e6fe118201 | |||
f21aaee514 | |||
9c2771ad1f | |||
910658cf4c | |||
7615c17b60 | |||
02b5cabcb9 | |||
4a3ee91d9b | |||
e2b188c982 | |||
658b9b758e | |||
e5455fddd8 | |||
5c17f1c21e | |||
655cbda1c9 | |||
e3278243c0 | |||
a29295d878 | |||
9459b6adb9 | |||
bc063bae6e | |||
e066263704 | |||
85eb199939 | |||
f4cdf669cf | |||
f678b418a8 | |||
1cf1701579 | |||
6313b56064 | |||
84e696bea2 | |||
4fcba6b7be | |||
4324f68f65 | |||
062cc18be1 | |||
d7793c200a | |||
f6a78a95a5 | |||
ead3d77f0c | |||
c030081f6b | |||
3bc00f3389 | |||
700f40fba7 | |||
a2c6317474 | |||
0a06bc80e4 | |||
13e4eb76a9 | |||
366f5b5a64 | |||
321a5b302f | |||
a8b3b63a0a | |||
aca07977b0 | |||
9aba8d2bc1 | |||
2fe769e08d | |||
9835e9f9d2 | |||
b4f61b9eb1 | |||
501bacc7f3 | |||
6c50e01549 | |||
22983ae8e0 | |||
5667364165 | |||
33c4d64b92 | |||
8d46acb705 | |||
ebeb57b3fa | |||
8d5341f3e2 | |||
0403ecb8ce | |||
1933cb1d12 | |||
468a6d29f1 | |||
f6d9feacec | |||
fa9a50b60e | |||
41610c51ca | |||
db78cdaf30 | |||
5e55c04d22 | |||
88092f1456 | |||
522a92f864 | |||
c5a30d0d46 | |||
78b6e9ddcc | |||
7cd826a735 | |||
a7506faef8 | |||
95223cbbda |
42 changed files with 2334 additions and 1177 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -23,3 +23,4 @@ product/
|
||||||
releases
|
releases
|
||||||
id_keys.json
|
id_keys.json
|
||||||
shiny_stats.json
|
shiny_stats.json
|
||||||
|
data
|
391
Cargo.lock
generated
391
Cargo.lock
generated
|
@ -19,9 +19,9 @@ checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "anstream"
|
name = "anstream"
|
||||||
version = "0.6.15"
|
version = "0.6.18"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526"
|
checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anstyle",
|
"anstyle",
|
||||||
"anstyle-parse",
|
"anstyle-parse",
|
||||||
|
@ -34,36 +34,37 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "anstyle"
|
name = "anstyle"
|
||||||
version = "1.0.8"
|
version = "1.0.10"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1"
|
checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "anstyle-parse"
|
name = "anstyle-parse"
|
||||||
version = "0.2.5"
|
version = "0.2.6"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb"
|
checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"utf8parse",
|
"utf8parse",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "anstyle-query"
|
name = "anstyle-query"
|
||||||
version = "1.1.1"
|
version = "1.1.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a"
|
checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"windows-sys 0.52.0",
|
"windows-sys 0.59.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "anstyle-wincon"
|
name = "anstyle-wincon"
|
||||||
version = "3.0.4"
|
version = "3.0.7"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8"
|
checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anstyle",
|
"anstyle",
|
||||||
"windows-sys 0.52.0",
|
"once_cell",
|
||||||
|
"windows-sys 0.59.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -101,9 +102,18 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bitflags"
|
name = "bitflags"
|
||||||
version = "2.6.0"
|
version = "2.8.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
|
checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "block-buffer"
|
||||||
|
version = "0.10.4"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
|
||||||
|
dependencies = [
|
||||||
|
"generic-array",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bumpalo"
|
name = "bumpalo"
|
||||||
|
@ -119,9 +129,9 @@ checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cc"
|
name = "cc"
|
||||||
version = "1.2.5"
|
version = "1.2.10"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c31a0499c1dc64f458ad13872de75c0eb7e3fdb0e67964610c914b034fc5956e"
|
checksum = "13208fcbb66eaeffe09b99fffbe1af420f00a7b35aa99ad683dfc1aa76145229"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"shlex",
|
"shlex",
|
||||||
]
|
]
|
||||||
|
@ -134,9 +144,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clap"
|
name = "clap"
|
||||||
version = "4.5.20"
|
version = "4.5.26"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8"
|
checksum = "a8eb5e908ef3a6efbe1ed62520fb7287959888c88485abe072543190ecc66783"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap_builder",
|
"clap_builder",
|
||||||
"clap_derive",
|
"clap_derive",
|
||||||
|
@ -144,9 +154,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clap_builder"
|
name = "clap_builder"
|
||||||
version = "4.5.20"
|
version = "4.5.26"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54"
|
checksum = "96b01801b5fc6a0a232407abc821660c9c6d25a1cafc0d4f85f29fb8d9afc121"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anstream",
|
"anstream",
|
||||||
"anstyle",
|
"anstyle",
|
||||||
|
@ -156,27 +166,27 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clap_derive"
|
name = "clap_derive"
|
||||||
version = "4.5.18"
|
version = "4.5.24"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab"
|
checksum = "54b755194d6389280185988721fffba69495eed5ee9feeee9a599b53db80318c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"heck",
|
"heck",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.87",
|
"syn",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clap_lex"
|
name = "clap_lex"
|
||||||
version = "0.7.2"
|
version = "0.7.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97"
|
checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "colorchoice"
|
name = "colorchoice"
|
||||||
version = "1.0.2"
|
version = "1.0.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0"
|
checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "core-foundation"
|
name = "core-foundation"
|
||||||
|
@ -195,14 +205,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
|
checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "derive-deref-rs"
|
name = "cpufeatures"
|
||||||
version = "0.1.1"
|
version = "0.2.16"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "fb44ba65b4c7afe45d03d8e33ecb53a21c57d0ffff196f04aefa15c43671f8a6"
|
checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"libc",
|
||||||
"quote",
|
]
|
||||||
"syn 1.0.109",
|
|
||||||
|
[[package]]
|
||||||
|
name = "crypto-common"
|
||||||
|
version = "0.1.6"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
|
||||||
|
dependencies = [
|
||||||
|
"generic-array",
|
||||||
|
"typenum",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "digest"
|
||||||
|
version = "0.10.7"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
|
||||||
|
dependencies = [
|
||||||
|
"block-buffer",
|
||||||
|
"crypto-common",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -213,7 +241,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.87",
|
"syn",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -327,6 +355,16 @@ dependencies = [
|
||||||
"slab",
|
"slab",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "generic-array"
|
||||||
|
version = "0.14.7"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
|
||||||
|
dependencies = [
|
||||||
|
"typenum",
|
||||||
|
"version_check",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "getrandom"
|
name = "getrandom"
|
||||||
version = "0.2.15"
|
version = "0.2.15"
|
||||||
|
@ -602,30 +640,29 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.87",
|
"syn",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "idmangler-cli"
|
name = "idmangler-cli"
|
||||||
version = "0.4.1"
|
version = "0.5.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64",
|
|
||||||
"clap",
|
"clap",
|
||||||
"derive-deref-rs",
|
|
||||||
"idmangler-lib",
|
"idmangler-lib",
|
||||||
"reqwest",
|
"reqwest",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
|
"serde_json5",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
"tribool",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "idmangler-lib"
|
name = "idmangler-lib"
|
||||||
version = "0.4.0"
|
version = "0.5.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "0395df40b27e5b44d89befbf479c06df7554c0af28674fa663aebd8e0d8f400c"
|
checksum = "b3289c6bd14bc60ec34cebb05292f1bbf369eace2674e6def4dc0f031b34e344"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"serde",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -674,15 +711,15 @@ checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "itoa"
|
name = "itoa"
|
||||||
version = "1.0.11"
|
version = "1.0.14"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b"
|
checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "js-sys"
|
name = "js-sys"
|
||||||
version = "0.3.76"
|
version = "0.3.77"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "6717b6b5b077764fb5966237269cb3c64edddde4b14ce42647430a78ced9e7b7"
|
checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
|
@ -696,9 +733,9 @@ checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "linux-raw-sys"
|
name = "linux-raw-sys"
|
||||||
version = "0.4.14"
|
version = "0.4.15"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89"
|
checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "litemap"
|
name = "litemap"
|
||||||
|
@ -708,9 +745,9 @@ checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "log"
|
name = "log"
|
||||||
version = "0.4.22"
|
version = "0.4.25"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
|
checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "memchr"
|
name = "memchr"
|
||||||
|
@ -726,9 +763,9 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "miniz_oxide"
|
name = "miniz_oxide"
|
||||||
version = "0.8.2"
|
version = "0.8.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4ffbe83022cedc1d264172192511ae958937694cd57ce297164951b8b3568394"
|
checksum = "b8402cab7aefae129c6977bb0ff1b8fd9a04eb5b51efc50a70bea51cda0c7924"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"adler2",
|
"adler2",
|
||||||
]
|
]
|
||||||
|
@ -799,7 +836,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.87",
|
"syn",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -827,10 +864,55 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
|
checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pin-project-lite"
|
name = "pest"
|
||||||
version = "0.2.15"
|
version = "2.7.15"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff"
|
checksum = "8b7cafe60d6cf8e62e1b9b2ea516a089c008945bb5a275416789e7db0bc199dc"
|
||||||
|
dependencies = [
|
||||||
|
"memchr",
|
||||||
|
"thiserror",
|
||||||
|
"ucd-trie",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pest_derive"
|
||||||
|
version = "2.7.15"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "816518421cfc6887a0d62bf441b6ffb4536fcc926395a69e1a85852d4363f57e"
|
||||||
|
dependencies = [
|
||||||
|
"pest",
|
||||||
|
"pest_generator",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pest_generator"
|
||||||
|
version = "2.7.15"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "7d1396fd3a870fc7838768d171b4616d5c91f6cc25e377b673d714567d99377b"
|
||||||
|
dependencies = [
|
||||||
|
"pest",
|
||||||
|
"pest_meta",
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"syn",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pest_meta"
|
||||||
|
version = "2.7.15"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "e1e58089ea25d717bfd31fb534e4f3afcc2cc569c70de3e239778991ea3b7dea"
|
||||||
|
dependencies = [
|
||||||
|
"once_cell",
|
||||||
|
"pest",
|
||||||
|
"sha2",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pin-project-lite"
|
||||||
|
version = "0.2.16"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pin-utils"
|
name = "pin-utils"
|
||||||
|
@ -846,27 +928,27 @@ checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "proc-macro2"
|
name = "proc-macro2"
|
||||||
version = "1.0.86"
|
version = "1.0.93"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77"
|
checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"unicode-ident",
|
"unicode-ident",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "quote"
|
name = "quote"
|
||||||
version = "1.0.37"
|
version = "1.0.38"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
|
checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "reqwest"
|
name = "reqwest"
|
||||||
version = "0.12.9"
|
version = "0.12.12"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f"
|
checksum = "43e734407157c3c2034e0258f5e4473ddb361b1e85f95a66690d67264d7cd1da"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64",
|
"base64",
|
||||||
"bytes",
|
"bytes",
|
||||||
|
@ -898,6 +980,7 @@ dependencies = [
|
||||||
"system-configuration",
|
"system-configuration",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tokio-native-tls",
|
"tokio-native-tls",
|
||||||
|
"tower",
|
||||||
"tower-service",
|
"tower-service",
|
||||||
"url",
|
"url",
|
||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
|
@ -929,9 +1012,9 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustix"
|
name = "rustix"
|
||||||
version = "0.38.42"
|
version = "0.38.43"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f93dc38ecbab2eb790ff964bb77fa94faf256fd3e73285fd7ba0903b76bedb85"
|
checksum = "a78891ee6bf2340288408954ac787aa063d8e8817e9f53abb37c695c6d834ef6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"errno",
|
"errno",
|
||||||
|
@ -942,9 +1025,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustls"
|
name = "rustls"
|
||||||
version = "0.23.20"
|
version = "0.23.21"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5065c3f250cbd332cd894be57c40fa52387247659b14a2d6041d121547903b1b"
|
checksum = "8f287924602bf649d949c63dc8ac8b235fa5387d394020705b80c4eb597ce5b8"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"rustls-pki-types",
|
"rustls-pki-types",
|
||||||
|
@ -979,6 +1062,12 @@ dependencies = [
|
||||||
"untrusted",
|
"untrusted",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "rustversion"
|
||||||
|
version = "1.0.19"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ryu"
|
name = "ryu"
|
||||||
version = "1.0.18"
|
version = "1.0.18"
|
||||||
|
@ -1009,9 +1098,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "security-framework-sys"
|
name = "security-framework-sys"
|
||||||
version = "2.13.0"
|
version = "2.14.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1863fd3768cd83c56a7f60faa4dc0d403f1b6df0a38c3c25f44b7894e45370d5"
|
checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"core-foundation-sys",
|
"core-foundation-sys",
|
||||||
"libc",
|
"libc",
|
||||||
|
@ -1019,29 +1108,29 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde"
|
name = "serde"
|
||||||
version = "1.0.210"
|
version = "1.0.217"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a"
|
checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde_derive",
|
"serde_derive",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_derive"
|
name = "serde_derive"
|
||||||
version = "1.0.210"
|
version = "1.0.217"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f"
|
checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.87",
|
"syn",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_json"
|
name = "serde_json"
|
||||||
version = "1.0.128"
|
version = "1.0.135"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8"
|
checksum = "2b0d7ba2887406110130a978386c4e1befb98c674b4fba677954e4db976630d9"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"itoa",
|
"itoa",
|
||||||
"memchr",
|
"memchr",
|
||||||
|
@ -1049,6 +1138,17 @@ dependencies = [
|
||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "serde_json5"
|
||||||
|
version = "0.1.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "32a6b754515e1a7bd79fc2edeaecee526fc80cb3a918607e5ca149225a3a9586"
|
||||||
|
dependencies = [
|
||||||
|
"pest",
|
||||||
|
"pest_derive",
|
||||||
|
"serde",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_urlencoded"
|
name = "serde_urlencoded"
|
||||||
version = "0.7.1"
|
version = "0.7.1"
|
||||||
|
@ -1061,6 +1161,17 @@ dependencies = [
|
||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "sha2"
|
||||||
|
version = "0.10.8"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8"
|
||||||
|
dependencies = [
|
||||||
|
"cfg-if",
|
||||||
|
"cpufeatures",
|
||||||
|
"digest",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "shlex"
|
name = "shlex"
|
||||||
version = "1.3.0"
|
version = "1.3.0"
|
||||||
|
@ -1118,20 +1229,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "syn"
|
name = "syn"
|
||||||
version = "1.0.109"
|
version = "2.0.96"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
|
checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80"
|
||||||
dependencies = [
|
|
||||||
"proc-macro2",
|
|
||||||
"quote",
|
|
||||||
"unicode-ident",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "syn"
|
|
||||||
version = "2.0.87"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d"
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
@ -1155,7 +1255,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.87",
|
"syn",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1181,12 +1281,13 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tempfile"
|
name = "tempfile"
|
||||||
version = "3.14.0"
|
version = "3.15.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c"
|
checksum = "9a8a559c81686f576e8cd0290cd2a24a2a9ad80c98b3478856500fcbd7acd704"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"fastrand",
|
"fastrand",
|
||||||
|
"getrandom",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"rustix",
|
"rustix",
|
||||||
"windows-sys 0.59.0",
|
"windows-sys 0.59.0",
|
||||||
|
@ -1194,22 +1295,22 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "thiserror"
|
name = "thiserror"
|
||||||
version = "1.0.68"
|
version = "2.0.11"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "02dd99dc800bbb97186339685293e1cc5d9df1f8fae2d0aecd9ff1c77efea892"
|
checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"thiserror-impl",
|
"thiserror-impl",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "thiserror-impl"
|
name = "thiserror-impl"
|
||||||
version = "1.0.68"
|
version = "2.0.11"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a7c61ec9a6f64d2793d8a45faba21efbe3ced62a886d44c36a009b2b519b4c7e"
|
checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.87",
|
"syn",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1224,9 +1325,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tokio"
|
name = "tokio"
|
||||||
version = "1.42.0"
|
version = "1.43.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5cec9b21b0450273377fc97bd4c33a8acffc8c996c987a7c5b319a0083707551"
|
checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"backtrace",
|
"backtrace",
|
||||||
"bytes",
|
"bytes",
|
||||||
|
@ -1270,6 +1371,27 @@ dependencies = [
|
||||||
"tokio",
|
"tokio",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "tower"
|
||||||
|
version = "0.5.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9"
|
||||||
|
dependencies = [
|
||||||
|
"futures-core",
|
||||||
|
"futures-util",
|
||||||
|
"pin-project-lite",
|
||||||
|
"sync_wrapper",
|
||||||
|
"tokio",
|
||||||
|
"tower-layer",
|
||||||
|
"tower-service",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "tower-layer"
|
||||||
|
version = "0.3.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tower-service"
|
name = "tower-service"
|
||||||
version = "0.3.3"
|
version = "0.3.3"
|
||||||
|
@ -1295,15 +1417,6 @@ dependencies = [
|
||||||
"once_cell",
|
"once_cell",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "tribool"
|
|
||||||
version = "0.3.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "1e8660361502033a51e119386b47fbb811e5706722f2e91ccf867aa6b2b09f90"
|
|
||||||
dependencies = [
|
|
||||||
"serde",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "try-lock"
|
name = "try-lock"
|
||||||
version = "0.2.5"
|
version = "0.2.5"
|
||||||
|
@ -1311,10 +1424,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
|
checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "unicode-ident"
|
name = "typenum"
|
||||||
version = "1.0.12"
|
version = "1.17.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
|
checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "ucd-trie"
|
||||||
|
version = "0.1.7"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "unicode-ident"
|
||||||
|
version = "1.0.14"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "untrusted"
|
name = "untrusted"
|
||||||
|
@ -1357,6 +1482,12 @@ version = "0.2.15"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
|
checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "version_check"
|
||||||
|
version = "0.9.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "want"
|
name = "want"
|
||||||
version = "0.3.1"
|
version = "0.3.1"
|
||||||
|
@ -1374,34 +1505,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wasm-bindgen"
|
name = "wasm-bindgen"
|
||||||
version = "0.2.99"
|
version = "0.2.100"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396"
|
checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
|
"rustversion",
|
||||||
"wasm-bindgen-macro",
|
"wasm-bindgen-macro",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wasm-bindgen-backend"
|
name = "wasm-bindgen-backend"
|
||||||
version = "0.2.99"
|
version = "0.2.100"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79"
|
checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bumpalo",
|
"bumpalo",
|
||||||
"log",
|
"log",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.87",
|
"syn",
|
||||||
"wasm-bindgen-shared",
|
"wasm-bindgen-shared",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wasm-bindgen-futures"
|
name = "wasm-bindgen-futures"
|
||||||
version = "0.4.49"
|
version = "0.4.50"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "38176d9b44ea84e9184eff0bc34cc167ed044f816accfe5922e54d84cf48eca2"
|
checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"js-sys",
|
"js-sys",
|
||||||
|
@ -1412,9 +1544,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wasm-bindgen-macro"
|
name = "wasm-bindgen-macro"
|
||||||
version = "0.2.99"
|
version = "0.2.100"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe"
|
checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"quote",
|
"quote",
|
||||||
"wasm-bindgen-macro-support",
|
"wasm-bindgen-macro-support",
|
||||||
|
@ -1422,28 +1554,31 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wasm-bindgen-macro-support"
|
name = "wasm-bindgen-macro-support"
|
||||||
version = "0.2.99"
|
version = "0.2.100"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2"
|
checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.87",
|
"syn",
|
||||||
"wasm-bindgen-backend",
|
"wasm-bindgen-backend",
|
||||||
"wasm-bindgen-shared",
|
"wasm-bindgen-shared",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wasm-bindgen-shared"
|
name = "wasm-bindgen-shared"
|
||||||
version = "0.2.99"
|
version = "0.2.100"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6"
|
checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d"
|
||||||
|
dependencies = [
|
||||||
|
"unicode-ident",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "web-sys"
|
name = "web-sys"
|
||||||
version = "0.3.76"
|
version = "0.3.77"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "04dd7223427d52553d3702c004d3b2fe07c148165faa56313cb00211e31c12bc"
|
checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"js-sys",
|
"js-sys",
|
||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
|
@ -1593,7 +1728,7 @@ checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.87",
|
"syn",
|
||||||
"synstructure",
|
"synstructure",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -1614,7 +1749,7 @@ checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.87",
|
"syn",
|
||||||
"synstructure",
|
"synstructure",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -1643,5 +1778,5 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.87",
|
"syn",
|
||||||
]
|
]
|
||||||
|
|
14
Cargo.toml
14
Cargo.toml
|
@ -1,19 +1,17 @@
|
||||||
[package]
|
[package]
|
||||||
name = "idmangler-cli"
|
name = "idmangler-cli"
|
||||||
authors = ["endernon"]
|
authors = ["endernon"]
|
||||||
version = "0.4.1"
|
version = "0.5.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
description = "A cli tool to generate fake wynntils items"
|
description = "A cli tool to generate fake wynntils items"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
base64 = "0.22.1"
|
clap = { version = "4.5.26", features = ["derive"] }
|
||||||
clap = { version = "4.5.20", features = ["derive"] }
|
idmangler-lib = { version = "0.5.0", features = ["serde"] }
|
||||||
derive-deref-rs = "0.1.1"
|
|
||||||
idmangler-lib = "0.4.0"
|
|
||||||
reqwest = { version = "0.12.9", features = ["blocking", "json"] }
|
reqwest = { version = "0.12.9", features = ["blocking", "json"] }
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
serde_json = "1.0"
|
serde_json = "1.0.135"
|
||||||
thiserror = "1.0.68"
|
serde_json5 = "0.1.0"
|
||||||
tribool = { version = "0.3.0", features = ["serde"] }
|
thiserror = "2.0.11"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# idmangler-cli
|
# idmangler-cli
|
||||||
Basically this generates fake items by loading from a json. Effectively a wrapper for [zatzou's idmangler-lib](https://github.com/Zatzou/idmangler-lib).
|
Basically this generates fake items by loading from a json. Effectively a wrapper for [zatzou's idmangler-lib](https://github.com/Zatzou/idmangler-lib).
|
||||||
|
|
||||||
Any bugs? DM endernon on discord.
|
A video guide for Windows users can be found [HERE](https://www.youtube.com/watch?v=AvEUhs_6rEc).
|
||||||
|
|
||||||
|
|
||||||
## How to get the program
|
## How to get the program
|
||||||
|
@ -36,8 +36,8 @@ run `cargo install idmangler-cli`.
|
||||||
- Move the program to some folder along with config.json . Download these three files and place them next to the program:
|
- Move the program to some folder along with config.json . Download these three files and place them next to the program:
|
||||||
- https://raw.githubusercontent.com/Wynntils/Static-Storage/main/Reference/id_keys.json
|
- https://raw.githubusercontent.com/Wynntils/Static-Storage/main/Reference/id_keys.json
|
||||||
- https://raw.githubusercontent.com/Wynntils/Static-Storage/main/Data-Storage/shiny_stats.json
|
- https://raw.githubusercontent.com/Wynntils/Static-Storage/main/Data-Storage/shiny_stats.json
|
||||||
- ### 3) Actually generating an item
|
### 3) Actually generating an item
|
||||||
- Read through the provided `config.md` document. You can get the web version [HERE](https://git.frfrnocap.men/endernon/idmangler-cli/src/branch/main/config.md).
|
- Read through the provided `config.md` document. You can get the web version [HERE](docs/config.md).
|
||||||
- Once you have read through it, use one of the provided json files to create your own json.
|
- Once you have read through it, use one of the provided json files to create your own json.
|
||||||
- Run the program with it.
|
- Run the program with it.
|
||||||
- Windows: run `idmangler-cli.exe --config CONFIG_FILE_PATH`
|
- Windows: run `idmangler-cli.exe --config CONFIG_FILE_PATH`
|
||||||
|
|
|
@ -5,7 +5,7 @@ mkdir -p product
|
||||||
|
|
||||||
cp ./target/x86_64-pc-windows-gnu/release/idmangler-cli.exe ./product/idmangler-cli.exe
|
cp ./target/x86_64-pc-windows-gnu/release/idmangler-cli.exe ./product/idmangler-cli.exe
|
||||||
cp ./target/x86_64-unknown-linux-gnu/release/idmangler-cli ./product/idmangler-cli
|
cp ./target/x86_64-unknown-linux-gnu/release/idmangler-cli ./product/idmangler-cli
|
||||||
cp -u -p ./{config.json,config_hanafupookie.json,config_singu.json,config.md} ./product/
|
cp -r ./example_configs ./product/
|
||||||
|
|
||||||
pkgversion=$(cargo metadata --format-version=1 --no-deps | jq '.packages[] | select(.name == "idmangler-cli") | .version')
|
pkgversion=$(cargo metadata --format-version=1 --no-deps | jq '.packages[] | select(.name == "idmangler-cli") | .version')
|
||||||
echo "package version is:"
|
echo "package version is:"
|
||||||
|
@ -16,5 +16,5 @@ echo "$balls2"
|
||||||
|
|
||||||
cd product
|
cd product
|
||||||
|
|
||||||
zip "idmangler-windows-x64-${balls2}.zip" config.json config_hanafupookie.json config_singu.json config.md idmangler-cli.exe
|
zip "idmangler-windows-x64-${balls2}.zip" ./example_configs/ idmangler-cli.exe
|
||||||
zip "idmangler-linux-x64-${balls2}.zip" config.json config_hanafupookie.json config_singu.json config.md idmangler-cli
|
zip "idmangler-linux-x64-${balls2}.zip" ./example_configs/ idmangler-cli
|
||||||
|
|
282
config.json
282
config.json
|
@ -1,282 +0,0 @@
|
||||||
{
|
|
||||||
"READMEFIRST": [
|
|
||||||
"Refer to config.md to understand how to apply the data shown here.",
|
|
||||||
"There are also some values you cannot increase beyond a limit."
|
|
||||||
],
|
|
||||||
"name":"Singularity",
|
|
||||||
"item_type": "Gear",
|
|
||||||
"shiny": {
|
|
||||||
"key": "playersKilled",
|
|
||||||
"value": 9223372036854775807
|
|
||||||
},
|
|
||||||
"ids": [
|
|
||||||
{"id": "mainAttackDamage","base": 320,"roll": 69},
|
|
||||||
{"id": "healthRegenRaw", "base":250 , "roll":130 },
|
|
||||||
{"id": "rawDexterity", "base":35 },
|
|
||||||
{"id": "walkSpeed", "base":-40 , "roll":69},
|
|
||||||
{"id": "mainAttackDamage", "base":15, "roll":130 },
|
|
||||||
{"id": "rawMainAttackDamage", "base":444 , "roll":130 },
|
|
||||||
{"id": "rawSpellDamage", "base":222 , "roll":130 },
|
|
||||||
{"id": "spellDamage", "base":10 , "roll":130 }
|
|
||||||
],
|
|
||||||
"powder_limit": 255,
|
|
||||||
"powders": [
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6}
|
|
||||||
|
|
||||||
],
|
|
||||||
"rerolls": 255
|
|
||||||
}
|
|
68
config.md
68
config.md
|
@ -1,68 +0,0 @@
|
||||||
# Values Guide
|
|
||||||
## Name
|
|
||||||
**Name** is stored as a String. It must be a valid Wynncraft item for it to display as intended.
|
|
||||||
## Shiny ID
|
|
||||||
Inside the Shiny{} list, there will be two elements: "key" and "value".
|
|
||||||
The potential keys for any shiny value are listed here: https://raw.githubusercontent.com/Wynntils/Static-Storage/main/Data-Storage/shiny_stats.json
|
|
||||||
The value is the shown amount.
|
|
||||||
## Item type
|
|
||||||
WIP. This will support crafteds in the future, but for now you must have this:
|
|
||||||
```
|
|
||||||
"item_type": "Gear"
|
|
||||||
```
|
|
||||||
|
|
||||||
## Powders
|
|
||||||
|
|
||||||
### Powder Limit
|
|
||||||
Powder limit cannot be increased beyond 255. This is because the powder count is stored as a byte.
|
|
||||||
Potential value range: 0<->255.
|
|
||||||
|
|
||||||
### Format
|
|
||||||
Inside the "powders":[ ] array, set it up in the following structure.
|
|
||||||
**{ "type":"$TYPE", "tier":$TIER, "amount": $AMOUNT }**
|
|
||||||
**TYPE** is stored as a single character.
|
|
||||||
Potential Values: "E" "T" "W" "F" "A" . These represent Earth, Thunder, Wind, Fire, Air.
|
|
||||||
**TIER** is stored as a single digit integer.
|
|
||||||
Potential value range: 1<->6.
|
|
||||||
**AMOUNT** is stored as an integer. It is optional. If not provided it falls back to 1.
|
|
||||||
Potential value range: 1<->255.
|
|
||||||
#### Other things about powder format:
|
|
||||||
Each value in the array must have a comma at the end except the last.
|
|
||||||
The use of spaces is optional, as well as letter case for the $TYPE value.
|
|
||||||
The keys ("type" "tier" "amount") must All be lowercase.
|
|
||||||
If type is invalid, it will default back to being Thunder powder.
|
|
||||||
#### Powders Example (yes, this looks wacky to show that this is allowed)
|
|
||||||
```json
|
|
||||||
"powders": [
|
|
||||||
{ "type":"T", "tier":6, "amount":5 },
|
|
||||||
{"type" :"e","tier":1,"amount":5},
|
|
||||||
{"type": "F", "tier": 3,"amount":1},
|
|
||||||
{ "type" : "w" , "tier":6 }
|
|
||||||
]
|
|
||||||
```
|
|
||||||
Note that the last powder block in array has no comma at the end.
|
|
||||||
### Which items can have powders?
|
|
||||||
Powders can only be encoded on an item that originally supported powders in the first place.
|
|
||||||
Unfortunately you can't add powders to an item that didn't originally have them.
|
|
||||||
e.g. can't put powder on depressing shears, as depressing weapons don't have powder slot.
|
|
||||||
|
|
||||||
## Identifications
|
|
||||||
### Format
|
|
||||||
Inside the "ids":[] array, set it up in the following structure.
|
|
||||||
**{"id": "$ID","base": $BASE,"roll": $ROLL}**
|
|
||||||
**ID** is stored as a string corresponding to the Wynntils internal ID string of any roll. See here for a list: https://raw.githubusercontent.com/Wynntils/Static-Storage/main/Reference/id_keys.json .
|
|
||||||
**BASE** is the base roll. The default base data is defined in (WARNING: EXTREMELY MASSIVE TEXT FILE) https://raw.githubusercontent.com/Wynntils/Static-Storage/main/Reference/gear.json .
|
|
||||||
Beautify it then look for `ITEMNAME > identifications > IDENTIFICATIONNAME > raw` for default value. This base value defines the listed ID ranges.
|
|
||||||
**ROLL** defines the actual rolled value for the Identification. The formula is `BASE * ROLL / 100`. Most values are in the range 30-130 due to how Wynncraft handles many Identifications as 30-130 percent of a base stat. Thus, if you are trying to find the ROLL value, try your desired roll **(NOT the roll percentage 1-100)** divided by the BASE then round it to the nearest integer. This value is optional, and you should only exclude it when it is a fixed value e.g. Skill Points.
|
|
||||||
|
|
||||||
## Rerolls
|
|
||||||
Optional single value, i8. Stores number of rerolls. If missing or is 0, rerolls are not encoded.
|
|
||||||
Potential range: 0<->255.
|
|
||||||
|
|
||||||
### Other things about this
|
|
||||||
The format obeys the same json rules as the powders.
|
|
||||||
If you are trying to get the 100% or 0% roll and the value you calculated is close to 130 or 30, change it to 130 or 30 because that is the real value.
|
|
||||||
However, if the value is negative it will be between 70%-130%.
|
|
||||||
|
|
||||||
# Current issues
|
|
||||||
Crafteds are not implemented
|
|
|
@ -1,282 +0,0 @@
|
||||||
{
|
|
||||||
"READMEFIRST": [
|
|
||||||
"Refer to config.md to understand how to apply the data shown here.",
|
|
||||||
"There are also some values you cannot increase beyond a limit."
|
|
||||||
],
|
|
||||||
"name":"Singularity",
|
|
||||||
"item_type": "Gear",
|
|
||||||
"shiny": {
|
|
||||||
"key": "playersKilled",
|
|
||||||
"value": 9223372036854775807
|
|
||||||
},
|
|
||||||
"ids": [
|
|
||||||
{"id": "mainAttackDamage","base": 320,"roll": 69},
|
|
||||||
{"id": "healthRegenRaw", "base":250 , "roll":130 },
|
|
||||||
{"id": "rawDexterity", "base":35 },
|
|
||||||
{"id": "walkSpeed", "base":-40 , "roll":69},
|
|
||||||
{"id": "mainAttackDamage", "base":15, "roll":130 },
|
|
||||||
{"id": "rawMainAttackDamage", "base":444 , "roll":130 },
|
|
||||||
{"id": "rawSpellDamage", "base":222 , "roll":130 },
|
|
||||||
{"id": "spellDamage", "base":10 , "roll":130 }
|
|
||||||
],
|
|
||||||
"powder_limit": 255,
|
|
||||||
"powders": [
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6},
|
|
||||||
{"type":"E", "tier":6},
|
|
||||||
{"type":"T", "tier":6},
|
|
||||||
{"type":"W", "tier":6},
|
|
||||||
{"type":"F", "tier":6},
|
|
||||||
{"type":"A", "tier":6}
|
|
||||||
|
|
||||||
],
|
|
||||||
"rerolls": 255
|
|
||||||
}
|
|
0
docs/blocks/customconsumtype.md
Normal file
0
docs/blocks/customconsumtype.md
Normal file
0
docs/blocks/customgeartype.md
Normal file
0
docs/blocks/customgeartype.md
Normal file
0
docs/blocks/damage.md
Normal file
0
docs/blocks/damage.md
Normal file
0
docs/blocks/defense.md
Normal file
0
docs/blocks/defense.md
Normal file
0
docs/blocks/durability.md
Normal file
0
docs/blocks/durability.md
Normal file
0
docs/blocks/effects.md
Normal file
0
docs/blocks/effects.md
Normal file
44
docs/blocks/identifications.md
Normal file
44
docs/blocks/identifications.md
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
# Identifications
|
||||||
|
- This data block encodes for identifications on Gear-type items.
|
||||||
|
- Not to be confused with [Custom Identifications](identificationscustom.md).
|
||||||
|
- Field name: `ids`
|
||||||
|
- Field type: `Array[id, base, roll]`
|
||||||
|
- Example: `"id":"1stSpellCost","base":69,"roll":30`
|
||||||
|
- # Id
|
||||||
|
- This is the ID that is used. It corresponds to the Wynntils internal name for an identification.
|
||||||
|
- See [HERE](https://raw.githubusercontent.com/Wynntils/Static-Storage/main/Reference/id_keys.json) for a list.
|
||||||
|
- Field name: `id`
|
||||||
|
- Field type: `String`
|
||||||
|
- Example: `"id":"1stSpellCost"`
|
||||||
|
- # Base
|
||||||
|
- This is the base value. This value defines the range for 0% to 100% of any stat on any item.
|
||||||
|
- It is defined for any item in [THIS](https://raw.githubusercontent.com/Wynntils/Static-Storage/main/Reference/gear.json) data file. Use a json beautifier, then look for `ITEMNAME > identifications > IDENTIFICATION_NAME > raw` for the base value.
|
||||||
|
- Field name: `base`
|
||||||
|
- Field type: `Signed 32-bit Integer`
|
||||||
|
- Field range: `–2147483648` to `2147483647`
|
||||||
|
- Example: `"base":69`
|
||||||
|
- # Roll (OPTIONAL)
|
||||||
|
- This is the roll value. It defines the actual roll percent for the identification.
|
||||||
|
- The formula for the final shown percentage on the final item is `BASE * ROLL / 100`.
|
||||||
|
- Positive values are in the range 30-130 due to how Wynncraft handles many Identifications as `(0.3 <-> 1.3) x baseStat`.
|
||||||
|
- If you are trying to find the ROLL value, try your desired roll VALUE **(NOT the roll percentage)** divided by the BASE STAT then round it to the nearest integer.
|
||||||
|
- This value is optional, BUT you should only exclude it when it is a fixed value and not a range, e.g. Skill Points are always fixed.
|
||||||
|
- Field name: `roll`
|
||||||
|
- Field type: `Unsigned 8-bit Integer`
|
||||||
|
- Field range: `0` to `255`
|
||||||
|
- ...But for it to be a valid item, `30` to `130` (positive base stat) and `70` to `130` (negative base stat).
|
||||||
|
- Example: `"roll":30`
|
||||||
|
|
||||||
|
## Example Identifications for a perfect Singularity:
|
||||||
|
```json
|
||||||
|
"ids": [
|
||||||
|
{"id": "mainAttackDamage","base": 320,"roll": 69},
|
||||||
|
{"id": "healthRegenRaw", "base":250 , "roll":130 },
|
||||||
|
{"id": "rawDexterity", "base":35 },
|
||||||
|
{"id": "walkSpeed", "base":-40 , "roll":69},
|
||||||
|
{"id": "mainAttackDamage", "base":15, "roll":130 },
|
||||||
|
{"id": "rawMainAttackDamage", "base":444 , "roll":130 },
|
||||||
|
{"id": "rawSpellDamage", "base":222 , "roll":130 },
|
||||||
|
{"id": "spellDamage", "base":10 , "roll":130 }
|
||||||
|
],
|
||||||
|
```
|
0
docs/blocks/identificationscustom.md
Normal file
0
docs/blocks/identificationscustom.md
Normal file
8
docs/blocks/name.md
Normal file
8
docs/blocks/name.md
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# Name
|
||||||
|
This data block encodes for the name of an item.
|
||||||
|
- Field name: `name`
|
||||||
|
- Field type: `String`
|
||||||
|
- Example: `"name":"Singularity"`
|
||||||
|
- **NOTES FOR GEAR TYPE ITEMS**:
|
||||||
|
- It must be a valid Wynncraft item name for it to display as intended.
|
||||||
|
- in game, the name has a limit of 48 characters. That means that the final tier Legendary Island item, "Outlandish Replica Face Mask of Legendary Victory", only encodes up to "Victor". Thus, it does not work in game. ![frfr.png](../images/outlandish_mask.png)
|
0
docs/blocks/nameafter.md
Normal file
0
docs/blocks/nameafter.md
Normal file
41
docs/blocks/powders.md
Normal file
41
docs/blocks/powders.md
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
# Powders
|
||||||
|
- This data block encodes for powders present on the item.
|
||||||
|
- Field name: `powders`
|
||||||
|
- Field type: `Array[type, tier, amount]`
|
||||||
|
- Field range: `0` to `255` powders total.
|
||||||
|
- ## Type
|
||||||
|
- This is the type of powder that is present.
|
||||||
|
- These values represent Earth, Thunder, Water, Fire, and Air.
|
||||||
|
- Field name: `type`
|
||||||
|
- Field type: `Char`
|
||||||
|
- Field potential values: `E`,`T`,`W`,`F`,`A`
|
||||||
|
- Field fallback value (if invalid): `T`
|
||||||
|
- Example: `"type":"E"`
|
||||||
|
- ## Tier
|
||||||
|
- This is the powder tier, although it really doesn't do anything as by default Wynntils only encodes to and accepts Tier 6.
|
||||||
|
- Field name: `tier`
|
||||||
|
- Field type: `Unsigned 8-bit Integer`
|
||||||
|
- Field range: `1` to `6`
|
||||||
|
- Example: `"tier":6`
|
||||||
|
- ## Amount (OPTIONAL)
|
||||||
|
- For each entry in the `powders` array, this is the amount of powders encoded.
|
||||||
|
- It is optional, as it's just used to make encoding lots of the same powder easier.
|
||||||
|
- For example, you could repeat `{"type":"E", "tier":6}` six times, or just do `{"type":"E", "tier":6, "amount":6}` and both would be the same.
|
||||||
|
- Field name: `amount`
|
||||||
|
- Field type: `Unsigned 8-bit Integer`
|
||||||
|
- Field range: `1` to `255`
|
||||||
|
- Field fallback value (if not provided): `1`
|
||||||
|
- Example: `"amount":6`
|
||||||
|
## EXAMPLE of the Powders array
|
||||||
|
```
|
||||||
|
"powders": [
|
||||||
|
{"type":"T", "tier":6, "amount":5},
|
||||||
|
{"type":"e", "tier":1, "amount":5},
|
||||||
|
{"type":"F", "tier":3, "amount":1},
|
||||||
|
{"type":"w", "tier":6}
|
||||||
|
]
|
||||||
|
```
|
||||||
|
## Which items can have powders?
|
||||||
|
Powders can only be encoded on an item that originally supported powders in the first place.
|
||||||
|
Unfortunately you can't add powders to an item that didn't originally have them.
|
||||||
|
e.g. can't put powder on depressing shears, as depressing weapons don't have powder slot.
|
0
docs/blocks/requirements.md
Normal file
0
docs/blocks/requirements.md
Normal file
6
docs/blocks/reroll.md
Normal file
6
docs/blocks/reroll.md
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
## Rerolls (OPTIONAL)
|
||||||
|
- This data block encodes the number of rerolls.
|
||||||
|
- Field name: `rerolls`
|
||||||
|
- Field type: `Unsigned 8-bit Integer`
|
||||||
|
- Field range: `0` to `255`
|
||||||
|
- Example: `"rerolls":"125"`
|
17
docs/blocks/shiny.md
Normal file
17
docs/blocks/shiny.md
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
# Shiny
|
||||||
|
This data block encodes for Shiny data present on gear items.
|
||||||
|
- Field name: `shiny`
|
||||||
|
- Field type: `{key, value}`
|
||||||
|
- Example: `"shiny": {"key": "playersKilled","value": 20}`
|
||||||
|
- ## Key
|
||||||
|
- This is the type of the shiny stat present.
|
||||||
|
- The potential keys for any shiny value are listed [HERE](https://raw.githubusercontent.com/Wynntils/Static-Storage/main/Data-Storage/shiny_stats.json).
|
||||||
|
- Field name: `key`
|
||||||
|
- Field type: `String`
|
||||||
|
- Example: `"key": "playersKilled"`
|
||||||
|
- ## Value
|
||||||
|
- This is the value of the shiny stat present.
|
||||||
|
- Field name: `value`
|
||||||
|
- Field type: `Signed 64-bit Integer`
|
||||||
|
- Field range: `-9,223,372,036,854,775,808` to `9,223,372,036,854,775,807`
|
||||||
|
- Example: `"value":"20"`
|
8
docs/blocks/type.md
Normal file
8
docs/blocks/type.md
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# Item type
|
||||||
|
- This data block encodes for the type of the item that's being encoded.
|
||||||
|
- This will support crafteds in the future, but for now it only supports non crafted types.
|
||||||
|
- If you input a crafted value, literally nothing will happen, I think.
|
||||||
|
- Field name: `item_type`
|
||||||
|
- Field type: `String`
|
||||||
|
- Field potential values: `"Gear"`, `"Tome"`, `"Charm"`
|
||||||
|
- Example: `"item_type": "Gear"`
|
43
docs/config.md
Normal file
43
docs/config.md
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
# Config Guide
|
||||||
|
|
||||||
|
## The required blocks
|
||||||
|
According to the [Wynntils Artemis encoding proposal Github Issue](https://github.com/Wynntils/Wynntils/issues/2246),
|
||||||
|
the allowed blocks should look like this:
|
||||||
|
|
||||||
|
![An image of the original encoding proposal table, present on GitHub](images/encodingproposaltable.png)
|
||||||
|
|
||||||
|
However, it's inaccurate. This is what it SHOULD look like:
|
||||||
|
|
||||||
|
##### Key to Type Mapping Table
|
||||||
|
|
||||||
|
| Key | Type | Required blocks | Optional blocks |
|
||||||
|
|-----|--------------------------|--------------------------------------------|-------------------------------------------------------------|
|
||||||
|
| `0` | Gear Item | Name | Identifications, Powders, Shiny, Reroll |
|
||||||
|
| `1` | Tome Item | Name | Identifications, Reroll |
|
||||||
|
| `2` | Charm Item | Name | Identifications, Reroll |
|
||||||
|
| `3` | Crafted Gear Item | Custom Gear Type, Durability, Requirements | NameAfter, Damage, Defense, Custom Identifications, Powders |
|
||||||
|
| `4` | Crafted Consumable Item | Custom Consumable Type, Uses, Requirements | Effects, NameAfter, Custom Identifications |
|
||||||
|
| `5` | Crafted Item from Recipe | TODO | TODO |
|
||||||
|
|
||||||
|
|
||||||
|
## Documentation for each block:
|
||||||
|
- [Item type](blocks/type.md)
|
||||||
|
- [Custom Gear Type (NOT IMPLEMENTED YET)](blocks/customgeartype.md)
|
||||||
|
- [Custom Consumable Type (NOT IMPLEMENTED YET)](blocks/customconsumtype.md)
|
||||||
|
- [Durability (NOT IMPLEMENTED YET)](blocks/durability.md)
|
||||||
|
- [Requirements (NOT IMPLEMENTED YET)](blocks/requirements.md)
|
||||||
|
- [Name](blocks/name.md)
|
||||||
|
- [NameAfter (NOT IMPLEMENTED YET)](blocks/nameafter.md)
|
||||||
|
- [Shiny](blocks/shiny.md)
|
||||||
|
- [Identifications](blocks/identifications.md)
|
||||||
|
- [Damage (NOT IMPLEMENTED YET)](blocks/damage.md)
|
||||||
|
- [Defense (NOT IMPLEMENTED YET)](blocks/defense.md)
|
||||||
|
- [Effects (NOT IMPLEMENTED YET)](blocks/effects.md)
|
||||||
|
- [Powders](blocks/powders.md)
|
||||||
|
- [Custom Identifications (NOT IMPLEMENTED YET)](blocks/identifications.md)
|
||||||
|
- [Reroll](blocks/reroll.md)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Current issues
|
||||||
|
Crafteds are not implemented
|
BIN
docs/images/encodingproposaltable.png
Normal file
BIN
docs/images/encodingproposaltable.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 47 KiB |
BIN
docs/images/outlandish_mask.png
Normal file
BIN
docs/images/outlandish_mask.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 32 KiB |
281
example_configs/config.json
Normal file
281
example_configs/config.json
Normal file
|
@ -0,0 +1,281 @@
|
||||||
|
{
|
||||||
|
"READMEFIRST": [
|
||||||
|
"Refer to config.md to understand how to apply the data shown here.",
|
||||||
|
"There are also some values you cannot increase beyond a limit."
|
||||||
|
],
|
||||||
|
"name":"Singularity",
|
||||||
|
"item_type": "Gear",
|
||||||
|
"shiny": {
|
||||||
|
"key": "playersKilled",
|
||||||
|
"value": 9223372036854775807
|
||||||
|
},
|
||||||
|
"ids": [
|
||||||
|
{"id": "mainAttackDamage","base": 320,"roll": 69},
|
||||||
|
{"id": "healthRegenRaw", "base":250 , "roll":130 },
|
||||||
|
{"id": "rawDexterity", "base":35 },
|
||||||
|
{"id": "walkSpeed", "base":-40 , "roll":69},
|
||||||
|
{"id": "mainAttackDamage", "base":15, "roll":130 },
|
||||||
|
{"id": "rawMainAttackDamage", "base":444 , "roll":130 },
|
||||||
|
{"id": "rawSpellDamage", "base":222 , "roll":130 },
|
||||||
|
{"id": "spellDamage", "base":10 , "roll":130 }
|
||||||
|
],
|
||||||
|
"powders": [
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"}
|
||||||
|
|
||||||
|
],
|
||||||
|
"rerolls": 255
|
||||||
|
}
|
277
example_configs/config_crafted.json
Normal file
277
example_configs/config_crafted.json
Normal file
|
@ -0,0 +1,277 @@
|
||||||
|
{
|
||||||
|
"READMEFIRST": [
|
||||||
|
"Refer to config.md to understand how to apply the data shown here.",
|
||||||
|
"There are also some values you cannot increase beyond a limit."
|
||||||
|
],
|
||||||
|
"name":"Singularity",
|
||||||
|
"item_type": "craftedgear",
|
||||||
|
"crafted_type": "spear",
|
||||||
|
"requirements": {
|
||||||
|
"level": 69,
|
||||||
|
"class": "Mage"
|
||||||
|
},
|
||||||
|
"durability": {
|
||||||
|
"effect_strength": 100,
|
||||||
|
"dura_cur": 50,
|
||||||
|
"dura_max": 100
|
||||||
|
},
|
||||||
|
"powders": [
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"}
|
||||||
|
|
||||||
|
],
|
||||||
|
"rerolls": 255
|
||||||
|
}
|
|
@ -4,10 +4,7 @@
|
||||||
"There are also some values you cannot increase beyond a limit."
|
"There are also some values you cannot increase beyond a limit."
|
||||||
],
|
],
|
||||||
"name":"Hanafubuki",
|
"name":"Hanafubuki",
|
||||||
"shiny": {
|
"item_type": "Gear",
|
||||||
"key": "playersKilled",
|
|
||||||
"value": 9223372036854775807
|
|
||||||
},
|
|
||||||
"ids": [
|
"ids": [
|
||||||
{"id": "3rdSpellCost","base": -25,"roll": 70},
|
{"id": "3rdSpellCost","base": -25,"roll": 70},
|
||||||
{"id": "4thSpellCost", "base":-15 , "roll":70 },
|
{"id": "4thSpellCost", "base":-15 , "roll":70 },
|
||||||
|
@ -15,11 +12,6 @@
|
||||||
{"id": "elementalDamage", "base":256 , "roll":130},
|
{"id": "elementalDamage", "base":256 , "roll":130},
|
||||||
{"id": "jumpHeight", "base":3, "roll":130 },
|
{"id": "jumpHeight", "base":3, "roll":130 },
|
||||||
{"id": "rawStrength", "base":15}
|
{"id": "rawStrength", "base":15}
|
||||||
],
|
|
||||||
"powder_limit": 255,
|
|
||||||
"powders": [
|
|
||||||
|
|
||||||
|
|
||||||
],
|
],
|
||||||
"rerolls": 255
|
"rerolls": 255
|
||||||
}
|
}
|
|
@ -11,7 +11,6 @@
|
||||||
},
|
},
|
||||||
"ids": [
|
"ids": [
|
||||||
],
|
],
|
||||||
"powder_limit": 255,
|
|
||||||
"powders": [
|
"powders": [
|
||||||
],
|
],
|
||||||
"rerolls": 255
|
"rerolls": 255
|
281
example_configs/config_singu.json
Normal file
281
example_configs/config_singu.json
Normal file
|
@ -0,0 +1,281 @@
|
||||||
|
{
|
||||||
|
"READMEFIRST": [
|
||||||
|
"Refer to config.md to understand how to apply the data shown here.",
|
||||||
|
"There are also some values you cannot increase beyond a limit."
|
||||||
|
],
|
||||||
|
"name":"Singularity",
|
||||||
|
"item_type": "Gear",
|
||||||
|
"shiny": {
|
||||||
|
"key": "playersKilled",
|
||||||
|
"value": 9223372036854775807
|
||||||
|
},
|
||||||
|
"ids": [
|
||||||
|
{"id": "mainAttackDamage","base": 320,"roll": 69},
|
||||||
|
{"id": "healthRegenRaw", "base":250 , "roll":130 },
|
||||||
|
{"id": "rawDexterity", "base":35 },
|
||||||
|
{"id": "walkSpeed", "base":-40 , "roll":69},
|
||||||
|
{"id": "mainAttackDamage", "base":15, "roll":130 },
|
||||||
|
{"id": "rawMainAttackDamage", "base":444 , "roll":130 },
|
||||||
|
{"id": "rawSpellDamage", "base":222 , "roll":130 },
|
||||||
|
{"id": "spellDamage", "base":10 , "roll":130 }
|
||||||
|
],
|
||||||
|
"powders": [
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"},
|
||||||
|
{"type":"E"},
|
||||||
|
{"type":"T"},
|
||||||
|
{"type":"W"},
|
||||||
|
{"type":"F"},
|
||||||
|
{"type":"A"}
|
||||||
|
|
||||||
|
],
|
||||||
|
"rerolls": 255
|
||||||
|
}
|
9
example_configs/config_tome.json
Normal file
9
example_configs/config_tome.json
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"READMEFIRST": [
|
||||||
|
"Refer to config.md to understand how to apply the data shown here.",
|
||||||
|
"There are also some values you cannot increase beyond a limit."
|
||||||
|
],
|
||||||
|
"name":"Assimilator's Tome of Allegiance",
|
||||||
|
"item_type": "tome",
|
||||||
|
"rerolls": 255
|
||||||
|
}
|
3
rustfmt.toml
Normal file
3
rustfmt.toml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
fn_params_layout = "Compressed"
|
||||||
|
attr_fn_like_width = 210
|
||||||
|
max_width = 220
|
|
@ -1,50 +0,0 @@
|
||||||
[
|
|
||||||
{
|
|
||||||
"id": 1,
|
|
||||||
"key": "mobsKilled",
|
|
||||||
"displayName": "Mobs Killed",
|
|
||||||
"statUnit": "raw"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 2,
|
|
||||||
"key": "raidsWon",
|
|
||||||
"displayName": "Raids Won",
|
|
||||||
"statUnit": "raw"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 3,
|
|
||||||
"key": "chestsOpened",
|
|
||||||
"displayName": "Chests Opened",
|
|
||||||
"statUnit": "raw"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 4,
|
|
||||||
"key": "warsWon",
|
|
||||||
"displayName": "Wars Won",
|
|
||||||
"statUnit": "raw"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 5,
|
|
||||||
"key": "playersKilled",
|
|
||||||
"displayName": "Players Killed",
|
|
||||||
"statUnit": "raw"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 6,
|
|
||||||
"key": "dungeonsWon",
|
|
||||||
"displayName": "Dungeons Won",
|
|
||||||
"statUnit": "raw"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 7,
|
|
||||||
"key": "deaths",
|
|
||||||
"displayName": "Deaths",
|
|
||||||
"statUnit": "raw"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 8,
|
|
||||||
"key": "lootrunsCompleted",
|
|
||||||
"displayName": "Lootruns Completed",
|
|
||||||
"statUnit": "raw"
|
|
||||||
}
|
|
||||||
]
|
|
276
src/encode.rs
Normal file
276
src/encode.rs
Normal file
|
@ -0,0 +1,276 @@
|
||||||
|
use crate::errorfr::Errorfr;
|
||||||
|
use crate::jsonstruct::{CraftedTypesFr, Durability, Identificationer, ItemTypeDeser, PowderFr, RequirementsDeser, Shinyjson, Shinystruct};
|
||||||
|
use idmangler_lib::encoding::DataEncoder;
|
||||||
|
use idmangler_lib::{
|
||||||
|
block::{CraftedConsumableTypeData, CraftedGearTypeData, DurabilityData, EndData, IdentificationData, NameData, PowderData, RequirementsData, RerollData, ShinyData, StartData, TypeData},
|
||||||
|
types::{ClassType, Element, ItemType, Powder, RollType, SkillType, Stat},
|
||||||
|
};
|
||||||
|
use std::collections::HashMap;
|
||||||
|
use idmangler_lib::types::EncodingVersion;
|
||||||
|
|
||||||
|
/// FuncParams struct, used for the three most important parameters for encoding.
|
||||||
|
/// Also, all the encode functions are stored here, seeing as I require these three params most of the time when encoding.
|
||||||
|
#[derive(PartialEq, Eq, Hash, Debug)]
|
||||||
|
pub struct FuncParams<'a> {
|
||||||
|
pub fr_out: &'a mut Vec<u8>,
|
||||||
|
pub fr_debug_mode: &'a bool,
|
||||||
|
pub fr_ver: EncodingVersion,
|
||||||
|
}
|
||||||
|
impl FuncParams<'_> {
|
||||||
|
/// ENCODE: StartData
|
||||||
|
/// (REQUIRED)
|
||||||
|
pub fn encode_startdata(&mut self) -> Result<(), Errorfr> {
|
||||||
|
if *self.fr_debug_mode {
|
||||||
|
println!("Encoding StartData")
|
||||||
|
}
|
||||||
|
StartData(self.fr_ver).encode(self.fr_ver, self.fr_out).unwrap();
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
/// ENCODE: TypeData
|
||||||
|
/// (REQUIRED)
|
||||||
|
pub fn encode_typedata(&mut self, item_type_deser: ItemTypeDeser) -> Result<(), Errorfr> {
|
||||||
|
if *self.fr_debug_mode {
|
||||||
|
println!("Encoding TypeData: {:?}", item_type_deser);
|
||||||
|
}
|
||||||
|
TypeData(ItemType::from(item_type_deser)).encode(self.fr_ver, self.fr_out).unwrap();
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
/// ENCODE: NameData
|
||||||
|
pub fn encode_namedata(&mut self, real_name: &str) -> Result<(), Errorfr> {
|
||||||
|
if *self.fr_debug_mode {
|
||||||
|
println!("Encoding NameData: {:?}", &real_name)
|
||||||
|
}
|
||||||
|
NameData(real_name.trim().to_string()).encode(self.fr_ver, self.fr_out).unwrap();
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
/// ENCODE: IdentificationData
|
||||||
|
pub fn encode_iddata(&mut self, real_ids: &Vec<Identificationer>, idsmap: HashMap<String, u8>) -> Result<(), Errorfr> {
|
||||||
|
let mut idvec = Vec::new();
|
||||||
|
for eachid in real_ids {
|
||||||
|
let id_id = idsmap.get(eachid.id.trim());
|
||||||
|
let id_base = eachid.base;
|
||||||
|
let id_roll = eachid.roll;
|
||||||
|
|
||||||
|
idvec.push(Stat {
|
||||||
|
kind: match id_id {
|
||||||
|
Some(ide) => *ide,
|
||||||
|
None => std::panic!("There is a mismatched ID, and this message has replaced where the line is meant to be"),
|
||||||
|
},
|
||||||
|
base: Some(id_base),
|
||||||
|
roll: match id_roll {
|
||||||
|
Some(rolle) => RollType::Value(rolle),
|
||||||
|
None => RollType::PreIdentified,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if *self.fr_debug_mode {
|
||||||
|
println!("Encoding IdentificationData: {:?}", &idvec)
|
||||||
|
}
|
||||||
|
IdentificationData {
|
||||||
|
identifications: idvec,
|
||||||
|
extended_encoding: true,
|
||||||
|
}
|
||||||
|
.encode(self.fr_ver, self.fr_out)
|
||||||
|
.unwrap();
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
/// ENCODE: PowderData
|
||||||
|
pub fn encode_powderdata(&mut self, real_powders: &Vec<PowderFr>) -> Result<(), Errorfr> {
|
||||||
|
let mut powdervec = Vec::new();
|
||||||
|
for eachpowder in real_powders {
|
||||||
|
let powderamount: u8 = eachpowder.amount.unwrap_or(1);
|
||||||
|
// match for the powder type
|
||||||
|
for _ in 0..powderamount {
|
||||||
|
let eletype = match eachpowder.r#type.to_ascii_lowercase() {
|
||||||
|
'e' => Element::Earth,
|
||||||
|
't' => Element::Thunder,
|
||||||
|
'w' => Element::Water,
|
||||||
|
'f' => Element::Fire,
|
||||||
|
'a' => Element::Air,
|
||||||
|
_ => return Err(Errorfr::JsonUnknownPowderElement),
|
||||||
|
};
|
||||||
|
if *self.fr_debug_mode {
|
||||||
|
dbg!(eletype);
|
||||||
|
}
|
||||||
|
powdervec.push(Powder::new(eletype, 6).map_err(|_| Errorfr::JsonUnknownPowderTier)?);
|
||||||
|
// 6 is the tier. Wynntils ONLY really uses tier 6 so theres no point keeping others.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if *self.fr_debug_mode {
|
||||||
|
dbg!(&powdervec);
|
||||||
|
}
|
||||||
|
|
||||||
|
let powderlimitfr: u8 = powdervec.len() as u8; // min of the current number of powders and 255 (if you have over 255 powders stuff breaks)
|
||||||
|
|
||||||
|
PowderData {
|
||||||
|
powder_slots: powderlimitfr,
|
||||||
|
powders: powdervec,
|
||||||
|
}
|
||||||
|
.encode(self.fr_ver, self.fr_out)
|
||||||
|
.unwrap();
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
/// ENCODE: RerollData
|
||||||
|
pub fn encode_rerolldata(&mut self, rerollcount: u8) -> Result<(), Errorfr> {
|
||||||
|
if rerollcount != 0 {
|
||||||
|
RerollData(rerollcount).encode(self.fr_ver, self.fr_out).unwrap();
|
||||||
|
if *self.fr_debug_mode {
|
||||||
|
dbg!(rerollcount);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
/// ENCODE: ShinyData
|
||||||
|
pub fn encode_shinydata(&mut self, shiny: &Shinyjson, json_shiny: &Vec<Shinystruct>) -> Result<(), Errorfr> {
|
||||||
|
let mut realshinykey: u8;
|
||||||
|
let _shinykey = &shiny.key;
|
||||||
|
let shinyvalue = shiny.value;
|
||||||
|
realshinykey = 1;
|
||||||
|
for i in json_shiny {
|
||||||
|
if i.key == shiny.key {
|
||||||
|
realshinykey = i.id;
|
||||||
|
if *self.fr_debug_mode {
|
||||||
|
dbg!(&shiny.key);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if *self.fr_debug_mode {
|
||||||
|
dbg!(&realshinykey);
|
||||||
|
dbg!(&shinyvalue);
|
||||||
|
}
|
||||||
|
ShinyData { id: realshinykey, val: shinyvalue }.encode(self.fr_ver, self.fr_out).unwrap();
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
/// ENCODE: EndData
|
||||||
|
/// (REQUIRED)
|
||||||
|
pub fn encode_enddata(&mut self) -> Result<(), Errorfr> {
|
||||||
|
if *self.fr_debug_mode {
|
||||||
|
println!("Encoding EndData")
|
||||||
|
}
|
||||||
|
EndData.encode(self.fr_ver, self.fr_out).unwrap();
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
/// ENCODE: CraftedConsumableTypeData or CraftedGearTypeData based on Type
|
||||||
|
pub fn encode_typedata_custom(&mut self, crafted_type: &str) -> Result<(), Errorfr> {
|
||||||
|
let frfr_type = CraftedTypesFr::try_from(crafted_type)?;
|
||||||
|
match frfr_type {
|
||||||
|
CraftedTypesFr::Gear(a) => {
|
||||||
|
if *self.fr_debug_mode {
|
||||||
|
println!("Encoding CustomTypeData: Gear");
|
||||||
|
}
|
||||||
|
CraftedGearTypeData(a).encode(self.fr_ver, self.fr_out).unwrap()
|
||||||
|
}
|
||||||
|
CraftedTypesFr::Consu(a) => {
|
||||||
|
if *self.fr_debug_mode {
|
||||||
|
println!("Encoding CustomTypeData: Consumable");
|
||||||
|
}
|
||||||
|
CraftedConsumableTypeData(a).encode(self.fr_ver, self.fr_out).unwrap()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
/// ENCODE: DamageData
|
||||||
|
/// (CRAFTED ONLY)
|
||||||
|
pub fn encode_damagedata(&mut self) -> Result<(), Errorfr> {
|
||||||
|
unimplemented!();
|
||||||
|
}
|
||||||
|
/// ENCODE: DefenseData
|
||||||
|
/// (CRAFTED ONLY)
|
||||||
|
pub fn encode_defensedata(&mut self) -> Result<(), Errorfr> {
|
||||||
|
unimplemented!();
|
||||||
|
}
|
||||||
|
/// ENCODE: DurabilityData
|
||||||
|
/// (CRAFTED ONLY)
|
||||||
|
pub fn encode_duradata(&mut self, real_dura: &Durability) -> Result<(), Errorfr> {
|
||||||
|
let effect_strength_fr: u8; // but actually it should be 0 to 100, not 0 to 255. But i dunno how to use u7 data type.
|
||||||
|
if let Some(effstr) = real_dura.effect_strength {
|
||||||
|
if *self.fr_debug_mode {
|
||||||
|
println!("Encoding DurabilityData: Defined");
|
||||||
|
}
|
||||||
|
effect_strength_fr = effstr
|
||||||
|
} else {
|
||||||
|
// percentage of max durability
|
||||||
|
let current_percentage = real_dura.dura_cur / real_dura.dura_max;
|
||||||
|
// see this answer from Stackoverflow for transcribing range
|
||||||
|
// https://stackoverflow.com/a/929107
|
||||||
|
match current_percentage {
|
||||||
|
50..=100 => {
|
||||||
|
// dura more than or equal to 50%
|
||||||
|
// dura less than 100%
|
||||||
|
// effectiveness 100%
|
||||||
|
effect_strength_fr = 100
|
||||||
|
}
|
||||||
|
10..50 => {
|
||||||
|
// dura more than or equal to 10%
|
||||||
|
// dura less than 50%
|
||||||
|
// effectiveness scales from 100% to 50%
|
||||||
|
|
||||||
|
// old range is 50-10 = 40
|
||||||
|
let old_range = 40;
|
||||||
|
// new range is 100-50 = 50
|
||||||
|
let new_range = 50;
|
||||||
|
// NewValue = (((OldValue - OldMin) * NewRange) / OldRange) + NewMin
|
||||||
|
effect_strength_fr = ((((current_percentage - 10) * new_range) / old_range) + 50) as u8
|
||||||
|
}
|
||||||
|
0..10 => {
|
||||||
|
// dura more than or equal to 0%
|
||||||
|
// dura less than 10%
|
||||||
|
// effectiveness scales from 50% to 10%
|
||||||
|
|
||||||
|
// old range is 10-0 = 10
|
||||||
|
let old_range = 10;
|
||||||
|
// new range is 50-10 = 40
|
||||||
|
let new_range = 40;
|
||||||
|
// NewValue = (((OldValue - OldMin) * NewRange) / OldRange) + NewMin
|
||||||
|
effect_strength_fr = ((((current_percentage) * new_range) / old_range) + 10) as u8
|
||||||
|
}
|
||||||
|
_ => return Err(Errorfr::JsonDuraOutOfRange), // only get this if current durability is <0 or >100
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if *self.fr_debug_mode {
|
||||||
|
println!("Encoding DurabilityData.effect_strenght: {}", effect_strength_fr);
|
||||||
|
println!("Encoding DurabilityData.current: {}", real_dura.dura_cur);
|
||||||
|
println!("Encoding DurabilityData.current: {}", real_dura.dura_max);
|
||||||
|
}
|
||||||
|
DurabilityData {
|
||||||
|
effect_strenght: effect_strength_fr,
|
||||||
|
current: real_dura.dura_cur,
|
||||||
|
max: real_dura.dura_max,
|
||||||
|
}
|
||||||
|
.encode(self.fr_ver, self.fr_out)
|
||||||
|
.unwrap();
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
/// ENCODE: RequirementsData
|
||||||
|
pub fn encode_reqdata(&mut self, real_reqdata: RequirementsDeser) -> Result<(), Errorfr> {
|
||||||
|
if *self.fr_debug_mode {
|
||||||
|
println!("Encoding RequirementData.Level: {:?}", real_reqdata.level.clone())
|
||||||
|
}
|
||||||
|
let mut fr_class: Option<ClassType> = None;
|
||||||
|
if let Some(actualclass) = real_reqdata.class {
|
||||||
|
fr_class = Some(ClassType::from(actualclass));
|
||||||
|
if *self.fr_debug_mode {
|
||||||
|
println!("Encoding RequirementData.Class: {:?}", actualclass.clone())
|
||||||
|
}
|
||||||
|
} else if *self.fr_debug_mode {
|
||||||
|
println!("Encoding RequirementData.Class: Undefined");
|
||||||
|
}
|
||||||
|
|
||||||
|
let spvec: Vec<(SkillType, i32)> = match real_reqdata.sp {
|
||||||
|
Some(real_sp) => Vec::<(SkillType, i32)>::from(real_sp),
|
||||||
|
None => Vec::new(),
|
||||||
|
};
|
||||||
|
if *self.fr_debug_mode {
|
||||||
|
println!("Encoding RequirementData.Skills: {:?}", spvec.clone())
|
||||||
|
}
|
||||||
|
RequirementsData {
|
||||||
|
level: real_reqdata.level,
|
||||||
|
class: fr_class,
|
||||||
|
skills: spvec,
|
||||||
|
}
|
||||||
|
.encode(self.fr_ver, self.fr_out)
|
||||||
|
.unwrap();
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
102
src/errorfr.rs
Normal file
102
src/errorfr.rs
Normal file
|
@ -0,0 +1,102 @@
|
||||||
|
use thiserror::Error;
|
||||||
|
|
||||||
|
/// Errors yep
|
||||||
|
#[derive(Error, Debug)]
|
||||||
|
pub enum Errorfr {
|
||||||
|
/// item config json is missing
|
||||||
|
#[error("Error 1.1: item config json is missing.")]
|
||||||
|
ItemJsonMissing,
|
||||||
|
|
||||||
|
/// item config json is corrupt
|
||||||
|
#[error("Error 1.2: item config json is invalid. \nReread config.md.\n{0}")]
|
||||||
|
ItemJsonCorrupt(serde_json5::Error),
|
||||||
|
|
||||||
|
/// idmap is missing
|
||||||
|
#[error("Error 2.1: id_keys.json is missing. \nYou should run \"--download id_keys\" or \"--download All\".")]
|
||||||
|
IDMapJsonMissing,
|
||||||
|
|
||||||
|
/// idmap is corrupt
|
||||||
|
#[error("Error 2.2: id_keys.json is corrupt. \nYou should run \"--download id_keys\" or \"--download All\".\n{0}")]
|
||||||
|
IDMapJsonCorrupt(serde_json::Error),
|
||||||
|
|
||||||
|
/// shiny data json is missing
|
||||||
|
#[error("Error 2.3: shiny_stats.json is missing. \nYou should run \"--download ShinyStats\" or \"--download All\".")]
|
||||||
|
ShinyJsonMissing,
|
||||||
|
|
||||||
|
/// shiny data json is corrupt
|
||||||
|
#[error("Error 2.4: shiny_stats.json is corrupt. \nYou should run \"--download ShinyStats\" or \"--download All\".")]
|
||||||
|
ShinyJsonCorrupt,
|
||||||
|
|
||||||
|
/// gear json is missing
|
||||||
|
#[error("Error 2.5: gear.json is missing. It's only required for the \"perfect mode\" item gen. \nYou should run \"--download Gear\" or \"--download All\".")]
|
||||||
|
GearJsonMissing,
|
||||||
|
|
||||||
|
/// gear data json is corrupt
|
||||||
|
#[error("Error 2.6: gear.json is corrupt. It's only required for the \"perfect mode\" item gen. \nYou should run \"--download Gear\" or \"--download All\".\n{0:?}")]
|
||||||
|
GearJsonCorrupt(serde_json::Error),
|
||||||
|
|
||||||
|
/// gear json is missing
|
||||||
|
#[error("Error 2.7: gear_cache.json is missing. It's only required for the \"perfect mode\" item gen. \nYou should run \"--download Gear\" or \"--download All\".")]
|
||||||
|
GearJsonCacheMissing,
|
||||||
|
|
||||||
|
/// gear data json is corrupt
|
||||||
|
#[error("Error 2.8: gear_cache.json is corrupt. It's only required for the \"perfect mode\" item gen. \nYou should run \"--download Gear\" or \"--download All\".\n{0:?}")]
|
||||||
|
GearJsonCacheCorrupt(serde_json::Error),
|
||||||
|
|
||||||
|
/// gear data json cache could not be created
|
||||||
|
#[error("Error 2.8: unable to create file gear_cache.json.")]
|
||||||
|
GearJsonCacheCreateFail,
|
||||||
|
|
||||||
|
|
||||||
|
/// could not download the file
|
||||||
|
#[error("Error 3.1: Download request failed. Check your network settings.")]
|
||||||
|
JsonDlReqFail,
|
||||||
|
|
||||||
|
/// invalid body response after downloading
|
||||||
|
#[error("Error 3.2: Download body is invalid. Something is broken.")]
|
||||||
|
JsonDlReqBodyInvalid,
|
||||||
|
|
||||||
|
/// unable to create file after download
|
||||||
|
#[error("Error 3.3: Download successful, but unable to actually create the file.")]
|
||||||
|
JsonDlReqFileCreateFail,
|
||||||
|
|
||||||
|
/// unable to copy (write in) file content
|
||||||
|
#[error("Error 3.4: Download successful, but unable to write to file.")]
|
||||||
|
JsonDlReqFileWriteFail,
|
||||||
|
|
||||||
|
/// Name value was not found in json
|
||||||
|
#[error("Error 4.1: \"name\" field was not found in the json (required for Gear, Tome, Charm).")]
|
||||||
|
JsonNotFoundName,
|
||||||
|
|
||||||
|
/// unable to find the crafted_type field
|
||||||
|
#[error("Error 4.2: Missing \"crafted_type\" field")]
|
||||||
|
JsonNotFoundCraftedType,
|
||||||
|
|
||||||
|
/// invalid crafted_type field
|
||||||
|
#[error("Error 4.3: Invalid \"crafted_type\" value")]
|
||||||
|
JsonInvalidCraftedType,
|
||||||
|
|
||||||
|
/// Durability is out of allowed range (0 to 100)
|
||||||
|
#[error("Error 4.4: \"durability\" percentage is out of range (Should be between 0 and 100)")]
|
||||||
|
JsonDuraOutOfRange,
|
||||||
|
|
||||||
|
/// Durability was not found but is necessary
|
||||||
|
#[error("Error 4.5: \"durability\" was not found (necessary for Crafted Gear item type)")]
|
||||||
|
JsonNotFoundDura,
|
||||||
|
|
||||||
|
/// Requirements not found but is necessary
|
||||||
|
#[error("Error 4.6: \"requirements\" was not found (necessary for Crafted Gear / Consumable items)")]
|
||||||
|
JsonNotFoundReqs,
|
||||||
|
|
||||||
|
/// Unrecognisable Powder tier
|
||||||
|
#[error("Error 4.7: Unknown powder tier")]
|
||||||
|
JsonUnknownPowderTier,
|
||||||
|
|
||||||
|
/// Unrecognisable Powder element
|
||||||
|
#[error("Error 4.8: Unknown powder element")]
|
||||||
|
JsonUnknownPowderElement,
|
||||||
|
|
||||||
|
/// Unrecognisable item for the Perfect gen function
|
||||||
|
#[error("Error 4.9: Unknown item for perfect gen...")]
|
||||||
|
PerfectItemNotFound,
|
||||||
|
}
|
|
@ -1,45 +0,0 @@
|
||||||
use thiserror::Error;
|
|
||||||
|
|
||||||
/// Errors yep
|
|
||||||
#[derive(Error, Debug)]
|
|
||||||
pub enum Errorfr {
|
|
||||||
/// item config json is missing
|
|
||||||
#[error("Error 1.1: item config json is missing.")]
|
|
||||||
ItemJsonMissing,
|
|
||||||
|
|
||||||
/// item config json is corrupt
|
|
||||||
#[error("Error 1.2: item config json is invalid. \nReread config.md.\n{0}")]
|
|
||||||
ItemJsonCorrupt(serde_json::Error),
|
|
||||||
|
|
||||||
/// idmap is missing
|
|
||||||
#[error("Error 1.3: id_keys.json is missing. \nYou should run \"--download id_keys\" or \"--download All\".")]
|
|
||||||
IDMapJsonMissing,
|
|
||||||
|
|
||||||
/// idmap is corrupt
|
|
||||||
#[error("Error 2.1: id_keys.json is corrupt. \nYou should run \"--download id_keys\" or \"--download All\".")]
|
|
||||||
IDMapJsonCorrupt,
|
|
||||||
|
|
||||||
/// shiny data json is missing
|
|
||||||
#[error("Error 2.2: shiny_stats.json is missing. \nYou should run \"--download ShinyStats\" or \"--download All\".")]
|
|
||||||
ShinyJsonMissing,
|
|
||||||
|
|
||||||
/// shiny data json is corrupt
|
|
||||||
#[error("Error 2.3: shiny_stats.json is corrupt. \nYou should run \"--download ShinyStats\" or \"--download All\".")]
|
|
||||||
ShinyJsonCorrupt,
|
|
||||||
|
|
||||||
/// could not download the file
|
|
||||||
#[error("Error 3.1: Download request failed. Check your network settings.")]
|
|
||||||
JsonDlReqFail,
|
|
||||||
|
|
||||||
/// invalid body response after downloading
|
|
||||||
#[error("Error 3.2: Download body is invalid. Something is broken.")]
|
|
||||||
JsonDlReqBodyInvalid,
|
|
||||||
|
|
||||||
/// unable to create file after download
|
|
||||||
#[error("Error 3.3: Download successful, but unable to actually create the file.")]
|
|
||||||
JsonDlReqFileCreateFail,
|
|
||||||
|
|
||||||
/// unable to copy (write in) file content
|
|
||||||
#[error("Error 9: Download successful, but unable to write to file.")]
|
|
||||||
JsonDlReqFileWriteFail,
|
|
||||||
}
|
|
76
src/gearjson.rs
Normal file
76
src/gearjson.rs
Normal file
|
@ -0,0 +1,76 @@
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
use std::collections::HashMap;
|
||||||
|
use crate::errorfr::Errorfr;
|
||||||
|
use crate::jsonstruct::Identificationer;
|
||||||
|
|
||||||
|
// the struct for the stuff I need in in Hashmap<String, GearJson> gear.json. its a big ass pain
|
||||||
|
#[derive(Deserialize, Serialize, PartialEq, Eq, Debug, Clone)]
|
||||||
|
pub struct GearJsonItem {
|
||||||
|
identifications: Option<
|
||||||
|
HashMap<
|
||||||
|
String, GearJsonItemInner
|
||||||
|
>
|
||||||
|
>
|
||||||
|
}
|
||||||
|
#[derive(Deserialize, Serialize, PartialEq, Eq, Debug, Clone)]
|
||||||
|
#[serde(untagged)]
|
||||||
|
pub enum GearJsonItemInner {
|
||||||
|
r#Struct(GearJsonItemInnerStruct),
|
||||||
|
r#Int(i32)
|
||||||
|
}
|
||||||
|
#[derive(Deserialize, Serialize, PartialEq, Eq, Debug, Clone)]
|
||||||
|
pub struct GearJsonItemInnerStruct {
|
||||||
|
max: i32,
|
||||||
|
min: i32,
|
||||||
|
raw: i32
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Function to generate a perfect item.
|
||||||
|
/// It returns Result\<Vec\<Identificationer\>, Errorfr\>
|
||||||
|
pub fn gen_perfect(name: &str, frjson: &HashMap<String, GearJsonItem>) -> Result<Vec<Identificationer>, Errorfr> {
|
||||||
|
let mut a: Vec<Identificationer> = Vec::new();
|
||||||
|
let name = name.to_lowercase();
|
||||||
|
match frjson.get(&name) {
|
||||||
|
Some(fr_idents) => {
|
||||||
|
if let Some(fr_identmap) = &fr_idents.identifications {
|
||||||
|
for i in fr_identmap {
|
||||||
|
println!("{i:?}");
|
||||||
|
if let &GearJsonItemInner::Struct(e) = &i.1 {
|
||||||
|
|
||||||
|
// hardcoded list of inverts. Don't question why it's like this, blame whatever the fuck wynncraft was smoking.
|
||||||
|
// I'm going to have to update this list manually too... why the fuck, wynncraft?
|
||||||
|
let invert_bool: bool = matches!(i.0.to_lowercase().as_str(),
|
||||||
|
"4thspellcost" |
|
||||||
|
"3rdspellcost" |
|
||||||
|
"2ndspellcost" |
|
||||||
|
"1stspellcost" |
|
||||||
|
"raw4thspellcost" |
|
||||||
|
"raw3rdspellcost" |
|
||||||
|
"raw2ndspellcost" |
|
||||||
|
"raw1stSpellCost");
|
||||||
|
|
||||||
|
let ider: Identificationer = Identificationer {
|
||||||
|
id: i.0.clone(),
|
||||||
|
base: {
|
||||||
|
if invert_bool {-e.clone().raw} // invert value if invert mode true
|
||||||
|
else {e.clone().raw} // else regular value
|
||||||
|
},
|
||||||
|
roll: Some(match &e.clone().raw {
|
||||||
|
fr if fr<&0 => 70,
|
||||||
|
fr if fr>&0 => {
|
||||||
|
if invert_bool {70} // value 70 if invert mode true
|
||||||
|
else {130}// else value 130
|
||||||
|
},
|
||||||
|
_ => 0
|
||||||
|
})
|
||||||
|
};
|
||||||
|
println!("ider: {ider:?}");
|
||||||
|
a.push(ider)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
None => return Err(Errorfr::PerfectItemNotFound)
|
||||||
|
}
|
||||||
|
Ok(a)
|
||||||
|
}
|
134
src/jsondl.rs
Normal file
134
src/jsondl.rs
Normal file
|
@ -0,0 +1,134 @@
|
||||||
|
use crate::{dl_json,
|
||||||
|
errorfr::Errorfr,
|
||||||
|
gearjson,
|
||||||
|
jsonstruct::Shinystruct
|
||||||
|
};
|
||||||
|
use serde::Deserialize;
|
||||||
|
use std::{
|
||||||
|
collections::HashMap,
|
||||||
|
fs,
|
||||||
|
io::{BufReader, Write}
|
||||||
|
};
|
||||||
|
|
||||||
|
pub fn load_idkeys(executable_path: &str) -> Result<HashMap<String, u8>, Errorfr> {
|
||||||
|
// id_keys.json
|
||||||
|
serde_json::from_reader(&mut BufReader::new(
|
||||||
|
&mut fs::File::open(executable_path.to_owned() + "/data/id_keys.json")
|
||||||
|
.map_err(|_| Errorfr::IDMapJsonMissing)?))
|
||||||
|
.map_err(Errorfr::IDMapJsonCorrupt)
|
||||||
|
}
|
||||||
|
pub fn load_shinystats(executable_path: &str) -> Result<Vec<Shinystruct>, Errorfr> {
|
||||||
|
// shiny_stats.json
|
||||||
|
serde_json::from_reader(&mut BufReader::new(
|
||||||
|
fs::File::open(executable_path.to_owned() + "/data/shiny_stats.json")
|
||||||
|
.map_err(|_| Errorfr::ShinyJsonMissing)?))
|
||||||
|
.map_err(|_| Errorfr::ShinyJsonCorrupt)
|
||||||
|
}
|
||||||
|
pub fn load_gear(executable_path: &str) -> Result<HashMap<String, gearjson::GearJsonItem>, Errorfr> {
|
||||||
|
// gear.json parse (ONLY FOR DL gear.json)
|
||||||
|
let a: HashMap<String, gearjson::GearJsonItem> = serde_json::from_reader(&mut BufReader::new(
|
||||||
|
fs::File::open(executable_path.to_owned() + "/data/gear.json")
|
||||||
|
.map_err(|_| Errorfr::GearJsonMissing)?))
|
||||||
|
.map_err(Errorfr::GearJsonCacheCorrupt)?;
|
||||||
|
// parse the original, "a", into lowercase as "b"
|
||||||
|
let mut b: HashMap<String, gearjson::GearJsonItem> = HashMap::new();
|
||||||
|
for i in &a {
|
||||||
|
let frname = i.0.to_lowercase();
|
||||||
|
let frvalue = i.1.clone();
|
||||||
|
b.insert(frname, frvalue);
|
||||||
|
}
|
||||||
|
Ok(b)
|
||||||
|
}
|
||||||
|
pub fn load_gear_cache(executable_path: &str) -> Result<HashMap<String, gearjson::GearJsonItem>, Errorfr> {
|
||||||
|
// gear_cache.json (ONLY FOR PERFECT ITEM FUNCTION GEN)
|
||||||
|
serde_json::from_reader(&mut BufReader::new(
|
||||||
|
fs::File::open(executable_path.to_owned() + "/data/gear_cache.json")
|
||||||
|
.map_err(|_| Errorfr::GearJsonCacheMissing)?))
|
||||||
|
.map_err(Errorfr::GearJsonCorrupt)
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn dl_json_fr(dlvalue: &String, executable_path: &str) {
|
||||||
|
let jsons = DownloadJsons::from(dlvalue.clone());
|
||||||
|
if let Err(e) = fs::create_dir_all(format!("{}{}", executable_path, "/data/")) {
|
||||||
|
println!("Unable to create path. Path: {} ", e)
|
||||||
|
}
|
||||||
|
|
||||||
|
if jsons == DownloadJsons::All || jsons == DownloadJsons::ShinyStats {
|
||||||
|
if let Err(e) = dl_json(
|
||||||
|
"https://raw.githubusercontent.com/Wynntils/Static-Storage/main/Data-Storage/shiny_stats.json".parse().unwrap(),
|
||||||
|
format!("{}{}", executable_path, "/data/shiny_stats.json"),
|
||||||
|
) {
|
||||||
|
// error handling below
|
||||||
|
println!("{} Filename: {}", e, dlvalue)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if jsons == DownloadJsons::All || jsons == DownloadJsons::IdKeys {
|
||||||
|
if let Err(e) = dl_json(
|
||||||
|
"https://raw.githubusercontent.com/Wynntils/Static-Storage/main/Reference/id_keys.json".parse().unwrap(),
|
||||||
|
format!("{}{}", executable_path, "/data/id_keys.json"),
|
||||||
|
) {
|
||||||
|
// error handling below
|
||||||
|
println!("{} Filename: {}", e, dlvalue)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if jsons == DownloadJsons::All || jsons == DownloadJsons::Gear {
|
||||||
|
match dl_json(
|
||||||
|
"https://raw.githubusercontent.com/Wynntils/Static-Storage/main/Reference/gear.json".parse().unwrap(),
|
||||||
|
format!("{}{}", executable_path, "/data/gear.json"),
|
||||||
|
) {
|
||||||
|
Err(e) => {
|
||||||
|
// error handling below
|
||||||
|
println!("{} Filename: {}", e, dlvalue);
|
||||||
|
},
|
||||||
|
Ok(_) => {
|
||||||
|
let frfrnocap = serde_json::to_vec(
|
||||||
|
&load_gear(executable_path)
|
||||||
|
.unwrap()
|
||||||
|
).unwrap();
|
||||||
|
let mut outer = fs::File::create(format!("{}{}",executable_path, "/data/gear_cache.json")).map_err(|_| Errorfr::GearJsonCacheCreateFail).unwrap();
|
||||||
|
outer.write_all(&frfrnocap).unwrap();
|
||||||
|
println!("Making gearcache to {}/data/gear_cache.json", executable_path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// stuff for the bit for downloading data jsons for ease of use
|
||||||
|
#[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Hash, Debug, Deserialize)]
|
||||||
|
pub enum DownloadJsons {
|
||||||
|
None,
|
||||||
|
IdKeys,
|
||||||
|
ShinyStats,
|
||||||
|
Gear,
|
||||||
|
All,
|
||||||
|
}
|
||||||
|
impl From<String> for DownloadJsons {
|
||||||
|
fn from(value: String) -> Self {
|
||||||
|
match value.to_lowercase().as_str().trim() {
|
||||||
|
"none" => {
|
||||||
|
println!("downloading NONE (Why? it's pointless...)");
|
||||||
|
DownloadJsons::None
|
||||||
|
}
|
||||||
|
"id_keys" | "idkeys" | "idkeys.json" | "id_keys.json" => {
|
||||||
|
println!("downloading ID_KEYS");
|
||||||
|
DownloadJsons::IdKeys
|
||||||
|
}
|
||||||
|
"shiny_stats" | "shinystats" | "shiny_stats.json" | "shinystats.json" => {
|
||||||
|
println!("downloading SHINY_STATS");
|
||||||
|
DownloadJsons::ShinyStats
|
||||||
|
}
|
||||||
|
"gear" | "gear.json" => {
|
||||||
|
println!("downloading GEAR");
|
||||||
|
DownloadJsons::Gear
|
||||||
|
}
|
||||||
|
"all" | "everything" | "both" => {
|
||||||
|
println!("downloading ALL jsons");
|
||||||
|
DownloadJsons::All
|
||||||
|
}
|
||||||
|
_ => {
|
||||||
|
println!("downloading NONE (unable to understand prompt)");
|
||||||
|
DownloadJsons::None
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
241
src/jsonstruct.rs
Normal file
241
src/jsonstruct.rs
Normal file
|
@ -0,0 +1,241 @@
|
||||||
|
use crate::errorfr::Errorfr;
|
||||||
|
use crate::jsonstruct::CraftedTypesFr::{Consu, Gear};
|
||||||
|
use idmangler_lib::types::{AttackSpeed, ClassType, ConsumableType, ConsumableType::*, CraftedGearType, CraftedGearType::*, EncodingVersion, ItemType, SkillType};
|
||||||
|
use serde::Deserialize;
|
||||||
|
use std::fs;
|
||||||
|
|
||||||
|
// structs for the json parsing
|
||||||
|
#[derive(Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Clone)]
|
||||||
|
pub struct Jsonconfig {
|
||||||
|
// not a thing to be encoded, this just toggles debug prints. Also settable using --debug
|
||||||
|
#[serde(alias = "Debug", alias = "DEBUG")]
|
||||||
|
pub debug: Option<bool>,
|
||||||
|
|
||||||
|
// Item Types (Gear, Tome, Charm, Crafted Gear, Crafted Consum)
|
||||||
|
#[serde(alias = "itemtype", alias = "ITEM_TYPE", alias = "ITEMTYPE", alias = "Item_Type", alias = "Item_type", alias = "ItemType", alias = "Itemtype")]
|
||||||
|
pub item_type: ItemTypeDeser,
|
||||||
|
|
||||||
|
// Crafted type for Crafted item types
|
||||||
|
#[serde(alias = "craftedtype", alias = "CRAFTED_TYPE", alias = "CRAFTEDTYPE", alias = "Crafted_Type", alias = "Crafted_type", alias = "CraftedType", alias = "Craftedtype")]
|
||||||
|
pub crafted_type: Option<String>,
|
||||||
|
|
||||||
|
// name of item
|
||||||
|
#[serde(alias = "Name", alias = "NAME")]
|
||||||
|
pub name: Option<String>,
|
||||||
|
|
||||||
|
// shiny data
|
||||||
|
#[serde(alias = "Shiny", alias = "SHINY")]
|
||||||
|
pub shiny: Option<Shinyjson>,
|
||||||
|
|
||||||
|
// identifications
|
||||||
|
#[serde(alias = "Ids", alias = "IDS", alias = "identifications", alias = "Identifications", alias = "IDENTIFICATIONS")]
|
||||||
|
pub ids: Option<Vec<Identificationer>>,
|
||||||
|
|
||||||
|
// powders stuff
|
||||||
|
#[serde(alias = "Powders", alias = "POWDERS", alias = "powder", alias = "Powder", alias = "POWDER")]
|
||||||
|
pub powders: Option<Vec<PowderFr>>,
|
||||||
|
|
||||||
|
// rerolls
|
||||||
|
#[serde(alias = "Rerolls", alias = "REROLLS", alias = "reroll", alias = "Reroll", alias = "REROLL")]
|
||||||
|
pub rerolls: Option<u8>,
|
||||||
|
|
||||||
|
// durability data (Crafted Gear)
|
||||||
|
#[serde(alias = "durability", alias = "Durability", alias = "DURABILITY", alias = "dura", alias = "Dura", alias = "DURA")]
|
||||||
|
pub crafted_durability: Option<Durability>,
|
||||||
|
|
||||||
|
// requirements data (Crafted)
|
||||||
|
#[serde(alias = "requirement", alias = "Requirement", alias = "REQUIREMENT", alias = "requirements", alias = "Requirements", alias = "REQUIREMENTS")]
|
||||||
|
pub crafted_requirements: Option<RequirementsDeser>,
|
||||||
|
|
||||||
|
// identifications (Crafted)
|
||||||
|
// to be honest i wish there was a better way instead of too many aliases
|
||||||
|
#[serde(
|
||||||
|
alias = "craftedids",
|
||||||
|
alias = "CRAFTED_IDS",
|
||||||
|
alias = "CRAFTEDIDS",
|
||||||
|
alias = "Crafted_Ids",
|
||||||
|
alias = "Crafted_ids",
|
||||||
|
alias = "CraftedIds",
|
||||||
|
alias = "Craftedids",
|
||||||
|
alias = "craftedidentifications",
|
||||||
|
alias = "CRAFTED_IDENTIFICATIONS",
|
||||||
|
alias = "CRAFTEDIDENTIFICATIONS",
|
||||||
|
alias = "Crafted_Identifications",
|
||||||
|
alias = "Crafted_identifications",
|
||||||
|
alias = "CraftedIdentifications",
|
||||||
|
alias = "Craftedidentifications"
|
||||||
|
)]
|
||||||
|
pub crafted_ids: Option<Vec<IdentificationerCrafted>>,
|
||||||
|
|
||||||
|
pub crafted_damage: Option<DamageDeser>,
|
||||||
|
}
|
||||||
|
// reimplementing this because it doesnt have Deserialize.
|
||||||
|
// Also, changing the SkillPoint stuff into NOT a vec.
|
||||||
|
// This avoids confusing end user.
|
||||||
|
#[derive(Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Clone, Copy)]
|
||||||
|
pub struct RequirementsDeser {
|
||||||
|
pub level: u8,
|
||||||
|
pub class: Option<ClassDeser>,
|
||||||
|
pub sp: Option<SkillPointDeser>,
|
||||||
|
}
|
||||||
|
#[derive(Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Clone, Copy)]
|
||||||
|
pub enum ClassDeser {
|
||||||
|
Archer,
|
||||||
|
Warrior,
|
||||||
|
Assassin,
|
||||||
|
Mage,
|
||||||
|
Shaman,
|
||||||
|
}
|
||||||
|
impl From<ClassDeser> for ClassType {
|
||||||
|
fn from(value: ClassDeser) -> Self {
|
||||||
|
match value {
|
||||||
|
ClassDeser::Archer => ClassType::Archer,
|
||||||
|
ClassDeser::Warrior => ClassType::Warrior,
|
||||||
|
ClassDeser::Assassin => ClassType::Assasin,
|
||||||
|
ClassDeser::Mage => ClassType::Mage,
|
||||||
|
ClassDeser::Shaman => ClassType::Shaman,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#[derive(Deserialize, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Clone)]
|
||||||
|
pub struct SkillPointDeser {
|
||||||
|
#[serde(alias = "Str", alias = "str", alias = "strength")]
|
||||||
|
pub strength: Option<i32>,
|
||||||
|
#[serde(alias = "Dex", alias = "dex", alias = "dexterity")]
|
||||||
|
pub dexterity: Option<i32>,
|
||||||
|
#[serde(alias = "Def", alias = "def", alias = "defense")]
|
||||||
|
pub defense: Option<i32>,
|
||||||
|
#[serde(alias = "Int", alias = "int", alias = "intelligence")]
|
||||||
|
pub intelligence: Option<i32>,
|
||||||
|
#[serde(alias = "Agi", alias = "agi", alias = "agility")]
|
||||||
|
pub agility: Option<i32>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl From<SkillPointDeser> for Vec<(SkillType, i32)> {
|
||||||
|
fn from(value: SkillPointDeser) -> Self {
|
||||||
|
let mut returnedvec: Vec<(SkillType, i32)> = Vec::new();
|
||||||
|
if let Some(fr_str) = value.strength {
|
||||||
|
returnedvec.push((SkillType::Strength, fr_str))
|
||||||
|
}
|
||||||
|
if let Some(fr_dex) = value.dexterity {
|
||||||
|
returnedvec.push((SkillType::Dexterity, fr_dex))
|
||||||
|
}
|
||||||
|
if let Some(fr_int) = value.intelligence {
|
||||||
|
returnedvec.push((SkillType::Intelligence, fr_int))
|
||||||
|
}
|
||||||
|
if let Some(fr_def) = value.defense {
|
||||||
|
returnedvec.push((SkillType::Defence, fr_def))
|
||||||
|
}
|
||||||
|
if let Some(fr_agi) = value.agility {
|
||||||
|
returnedvec.push((SkillType::Agility, fr_agi))
|
||||||
|
}
|
||||||
|
returnedvec
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#[derive(PartialEq, Eq, Hash, Debug)]
|
||||||
|
pub enum CraftedTypesFr {
|
||||||
|
Gear(CraftedGearType),
|
||||||
|
Consu(ConsumableType),
|
||||||
|
}
|
||||||
|
impl TryFrom<&str> for CraftedTypesFr {
|
||||||
|
type Error = Errorfr;
|
||||||
|
|
||||||
|
fn try_from(value: &str) -> Result<Self, Self::Error> {
|
||||||
|
match value.to_lowercase().as_str() {
|
||||||
|
// consu types
|
||||||
|
"potion" | "pot" | "potions" => Ok(Consu(Potion)),
|
||||||
|
"food" | "meal" | "foods" | "meals" => Ok(Consu(Food)),
|
||||||
|
"scroll" | "paper" => Ok(Consu(Scroll)),
|
||||||
|
// 5 weapon types
|
||||||
|
"spear" => Ok(Gear(Spear)),
|
||||||
|
"wand" => Ok(Gear(Wand)),
|
||||||
|
"dagger" => Ok(Gear(Dagger)),
|
||||||
|
"bow" => Ok(Gear(Bow)),
|
||||||
|
"relik" => Ok(Gear(Relik)),
|
||||||
|
// 4 armour types
|
||||||
|
"helmet" | "hat" => Ok(Gear(Helmet)),
|
||||||
|
"chestplate" | "shirt" | "chest" | "cp" => Ok(Gear(Chestplate)),
|
||||||
|
"leggings" | "legs" | "pants" | "trousers" => Ok(Gear(Leggings)),
|
||||||
|
"boots" | "shoes" => Ok(Gear(Boots)),
|
||||||
|
// 4 accessory types
|
||||||
|
"ring" => Ok(Gear(Ring)),
|
||||||
|
"bracelet" | "brace" => Ok(Gear(Bracelet)),
|
||||||
|
"necklace" => Ok(Gear(Necklace)),
|
||||||
|
// General gear types (FALLBACK) (don't use these if not necessary)
|
||||||
|
"weapon" => Ok(Gear(Weapon)),
|
||||||
|
"accessory" => Ok(Gear(Accessory)),
|
||||||
|
// fallback error return
|
||||||
|
_ => Err(Errorfr::JsonInvalidCraftedType),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#[derive(Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Clone)]
|
||||||
|
pub struct Durability {
|
||||||
|
pub effect_strength: Option<u8>,
|
||||||
|
pub dura_cur: i32,
|
||||||
|
pub dura_max: i32,
|
||||||
|
}
|
||||||
|
#[derive(Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
|
||||||
|
pub struct Shinystruct {
|
||||||
|
pub id: u8,
|
||||||
|
pub key: String,
|
||||||
|
}
|
||||||
|
#[derive(Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Clone)]
|
||||||
|
pub struct Identificationer {
|
||||||
|
pub id: String,
|
||||||
|
pub base: i32,
|
||||||
|
pub roll: Option<u8>,
|
||||||
|
}
|
||||||
|
#[derive(Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Clone)]
|
||||||
|
pub struct IdentificationerCrafted {
|
||||||
|
pub name: String,
|
||||||
|
pub max_roll: i32,
|
||||||
|
}
|
||||||
|
#[derive(Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Clone)]
|
||||||
|
pub struct PowderFr {
|
||||||
|
pub r#type: char,
|
||||||
|
pub amount: Option<u8>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Clone)]
|
||||||
|
pub struct Shinyjson {
|
||||||
|
pub key: String,
|
||||||
|
pub value: i64,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Clone)]
|
||||||
|
pub struct DamageDeser {
|
||||||
|
pub attack_speed: AttackSpeed,
|
||||||
|
}
|
||||||
|
// I had to clone this and add Deserialize because the original idmangler_lib::types::ItemType does not
|
||||||
|
#[repr(u8)]
|
||||||
|
#[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Hash, Debug, Deserialize)]
|
||||||
|
pub enum ItemTypeDeser {
|
||||||
|
#[serde(alias = "gear")]
|
||||||
|
Gear = 0,
|
||||||
|
#[serde(alias = "tome")]
|
||||||
|
Tome = 1,
|
||||||
|
#[serde(alias = "charm")]
|
||||||
|
Charm = 2,
|
||||||
|
#[serde(alias = "craftedgear", alias = "cgear", alias = "CGear")]
|
||||||
|
CraftedGear = 3,
|
||||||
|
#[serde(alias = "craftedconsu", alias = "cconsu", alias = "CConsu")]
|
||||||
|
CraftedConsu = 4,
|
||||||
|
}
|
||||||
|
impl From<ItemTypeDeser> for ItemType {
|
||||||
|
fn from(value: ItemTypeDeser) -> ItemType {
|
||||||
|
match value {
|
||||||
|
ItemTypeDeser::Gear => ItemType::Gear,
|
||||||
|
ItemTypeDeser::Tome => ItemType::Tome,
|
||||||
|
ItemTypeDeser::Charm => ItemType::Charm,
|
||||||
|
ItemTypeDeser::CraftedConsu => ItemType::CraftedConsu,
|
||||||
|
ItemTypeDeser::CraftedGear => ItemType::CraftedGear,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn load_jsonconfig(path: &String) -> Result<Jsonconfig, Errorfr> {
|
||||||
|
serde_json5::from_reader(&mut fs::File::open(path)
|
||||||
|
.map_err(|_| Errorfr::ItemJsonMissing)?)
|
||||||
|
.map_err(Errorfr::ItemJsonCorrupt)
|
||||||
|
}
|
409
src/main.rs
409
src/main.rs
|
@ -1,21 +1,21 @@
|
||||||
use idmangler_lib::{
|
#![allow(clippy::single_match)]
|
||||||
encoding::encode_string,
|
#![allow(non_camel_case_types, non_snake_case)]
|
||||||
types::{
|
|
||||||
Element, ItemType, TransformVersion, {RollType, Stat},
|
|
||||||
},
|
|
||||||
DataEncoder, EndData, IdentificationData, NameData, PowderData, RerollData, ShinyData,
|
|
||||||
StartData, TypeData,
|
|
||||||
};
|
|
||||||
|
|
||||||
use std::{collections::HashMap, env, fs, io, panic, path::PathBuf};
|
mod encode;
|
||||||
|
|
||||||
mod structures;
|
|
||||||
use crate::structures::*;
|
|
||||||
mod errorfr;
|
mod errorfr;
|
||||||
|
mod gearjson;
|
||||||
|
mod jsondl;
|
||||||
|
mod jsonstruct;
|
||||||
use crate::errorfr::Errorfr;
|
use crate::errorfr::Errorfr;
|
||||||
|
use crate::encode::FuncParams;
|
||||||
|
use crate::jsondl::*;
|
||||||
|
use crate::jsonstruct::*;
|
||||||
|
use crate::gearjson::gen_perfect;
|
||||||
use clap::Parser;
|
use clap::Parser;
|
||||||
|
use idmangler_lib::{encoding::string::encode_string, types::EncodingVersion};
|
||||||
use reqwest::Url;
|
use reqwest::Url;
|
||||||
|
use std::{collections::HashMap, env, fs, io::Write, path::PathBuf};
|
||||||
|
|
||||||
|
|
||||||
#[derive(Parser, Debug, Clone)]
|
#[derive(Parser, Debug, Clone)]
|
||||||
#[command(version, about, long_about = None, arg_required_else_help(true))]
|
#[command(version, about, long_about = None, arg_required_else_help(true))]
|
||||||
|
@ -24,30 +24,37 @@ struct Args {
|
||||||
#[arg(short, long)]
|
#[arg(short, long)]
|
||||||
config: Option<String>,
|
config: Option<String>,
|
||||||
|
|
||||||
/// Enable debug mode
|
/// Enable debug mode (for now this just prints debug info)
|
||||||
#[arg(long, default_value_t = false)]
|
#[arg(long, default_value_t = false)]
|
||||||
debug: bool,
|
debug: bool,
|
||||||
|
|
||||||
/// Download jsons (for ease of use)
|
/// Download jsons (for ease of use)
|
||||||
#[arg(short, long)]
|
#[arg(short, long)]
|
||||||
download: Option<String>,
|
download: Option<String>,
|
||||||
|
|
||||||
|
/// Function to generate perfect value items
|
||||||
|
#[arg(long)]
|
||||||
|
perfect: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
fn dl_json(
|
|
||||||
url: Url,
|
fn dl_json(url: Url, savename: String) -> Result<(), Errorfr> {
|
||||||
savename: String,
|
|
||||||
) -> Result<(), Errorfr> {
|
|
||||||
let resp = reqwest::blocking::get(url).map_err(|_| Errorfr::JsonDlReqFail)?;
|
let resp = reqwest::blocking::get(url).map_err(|_| Errorfr::JsonDlReqFail)?;
|
||||||
let body = resp.text().map_err(|_| Errorfr::JsonDlReqBodyInvalid)?;
|
let body = resp.text().map_err(|_| Errorfr::JsonDlReqBodyInvalid)?;
|
||||||
let savepath = savename.to_string();
|
let savepath = savename.to_string();
|
||||||
println!("Downloading file to {savepath}");
|
println!("Downloading file to {savepath}");
|
||||||
let mut out = fs::File::create(savepath)
|
let mut out = fs::File::create(savepath).map_err(|_| Errorfr::JsonDlReqFileCreateFail)?;
|
||||||
.map_err(|_| Errorfr::JsonDlReqFileCreateFail)?;
|
out.write_all(body.as_bytes()).map_err(|_| Errorfr::JsonDlReqFileWriteFail)?;
|
||||||
io::copy(&mut body.as_bytes(), &mut out).map_err(|_| Errorfr::JsonDlReqFileWriteFail)?;
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
if let Err(e) = main_2() {
|
||||||
|
println!("{}", e)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main_2() -> Result<(), Errorfr> {
|
||||||
let args = Args::parse();
|
let args = Args::parse();
|
||||||
let mut executable_path = env::current_exe().unwrap();
|
let mut executable_path = env::current_exe().unwrap();
|
||||||
PathBuf::pop(&mut executable_path);
|
PathBuf::pop(&mut executable_path);
|
||||||
|
@ -61,205 +68,203 @@ fn main() {
|
||||||
|
|
||||||
// download jsons if necessary
|
// download jsons if necessary
|
||||||
if let Some(dlvalue) = &args.download {
|
if let Some(dlvalue) = &args.download {
|
||||||
let jsons = DownloadJsons::from(dlvalue.clone());
|
dl_json_fr(dlvalue, executable_path)
|
||||||
if jsons == DownloadJsons::All || jsons == DownloadJsons::ShinyStats {
|
|
||||||
if let Err(e) = dl_json(
|
|
||||||
"https://raw.githubusercontent.com/Wynntils/Static-Storage/main/Data-Storage/shiny_stats.json".parse().unwrap(),
|
|
||||||
format!("{}{}", executable_path, "/shiny_stats.json"),
|
|
||||||
) { // error handling below
|
|
||||||
println!("{} Filename: {}",e,dlvalue)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if jsons == DownloadJsons::All || jsons == DownloadJsons::IdKeys {
|
|
||||||
if let Err(e) = dl_json(
|
|
||||||
"https://raw.githubusercontent.com/Wynntils/Static-Storage/main/Reference/id_keys.json".parse().unwrap(),
|
|
||||||
format!("{}{}", executable_path, "/id_keys.json"),
|
|
||||||
) { // error handling below
|
|
||||||
println!("{} Filename: {}",e,dlvalue)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if let Some(T) = &args.config {
|
// check if files load properly and all that
|
||||||
if let Err(e) = cook(args, executable_path, debug_mode) {
|
|
||||||
println!("{}", e);
|
let loaded_config: Jsonconfig = {
|
||||||
|
if let Some(t) = &args.config {
|
||||||
|
match load_jsonconfig(t) {
|
||||||
|
Ok(fr) => {
|
||||||
|
Ok(fr)
|
||||||
|
}
|
||||||
|
Err(e) => Err(e),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
else {
|
||||||
|
println!("no config path provided, fallback to empty.");
|
||||||
fn cook(args: Args, executable_path: &str, mut debug_mode: bool) -> Result<(), Errorfr> {
|
Ok(
|
||||||
let config = args.config;
|
Jsonconfig {
|
||||||
|
debug: Some(false),
|
||||||
|
item_type: ItemTypeDeser::Gear,
|
||||||
// load configs
|
crafted_type: None,
|
||||||
let json_config: Jsonconfig =
|
name: None,
|
||||||
serde_json::from_reader(fs::File::open(config.unwrap()).map_err(|_| Errorfr::ItemJsonMissing)?)
|
shiny: None,
|
||||||
.map_err(Errorfr::ItemJsonCorrupt)?;
|
ids: None,
|
||||||
let idsmap: HashMap<String, u8> = serde_json::from_reader(
|
powders: None,
|
||||||
fs::File::open(executable_path.to_owned() + "/id_keys.json")
|
rerolls: None,
|
||||||
.map_err(|_| Errorfr::IDMapJsonMissing)?,
|
crafted_durability: None,
|
||||||
|
crafted_requirements: None,
|
||||||
|
crafted_ids: None,
|
||||||
|
crafted_damage: None,
|
||||||
|
}
|
||||||
)
|
)
|
||||||
.map_err(|_| Errorfr::IDMapJsonCorrupt)?;
|
}
|
||||||
let json_shiny: Vec<Shinystruct> = serde_json::from_reader(
|
}?;
|
||||||
fs::File::open(executable_path.to_owned() + "/shiny_stats.json")
|
let loaded_idkeys = load_idkeys(executable_path)?;
|
||||||
.map_err(|_| Errorfr::ShinyJsonMissing)?,
|
let loaded_shinystats = load_shinystats(executable_path)?;
|
||||||
)
|
|
||||||
.map_err(|_| Errorfr::ShinyJsonCorrupt)?;
|
|
||||||
// println!("{:?}",idsmap.get("airDamage"));
|
|
||||||
|
|
||||||
if let Some(debugconfig) = json_config.debug {
|
// check if perfect status and change name if so. otherwise blank yep
|
||||||
|
let mut namefr: String = "".to_string();
|
||||||
|
if let Some(t1) = args.perfect {
|
||||||
|
namefr = t1
|
||||||
|
}
|
||||||
|
|
||||||
|
// debug mode on if in the loaded config
|
||||||
|
if let Some(debugconfig) = loaded_config.debug {
|
||||||
if debugconfig {
|
if debugconfig {
|
||||||
debug_mode = true
|
debug_mode = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// main program everything starts here fr
|
||||||
|
let mut out: Vec<u8> = Vec::new();
|
||||||
|
|
||||||
// create necessary variables
|
// create necessary variables
|
||||||
let mut out = Vec::new();
|
let ver = EncodingVersion::Version1;
|
||||||
let ver = TransformVersion::Version1;
|
|
||||||
|
|
||||||
// ENCODE: StartData
|
let mut loaded_config_clone = loaded_config.clone();
|
||||||
StartData(ver).encode(ver, &mut out).unwrap();
|
|
||||||
|
|
||||||
// ENCODE: TypeData
|
let mut funcparamsfr: FuncParams = FuncParams {
|
||||||
TypeData(ItemType::from(json_config.item_type))
|
fr_out: &mut out,
|
||||||
.encode(ver, &mut out)
|
fr_debug_mode: &debug_mode,
|
||||||
.unwrap();
|
fr_ver: ver,
|
||||||
|
|
||||||
// ENCODE: NameData
|
|
||||||
NameData(json_config.name.trim().to_string())
|
|
||||||
.encode(ver, &mut out)
|
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
// json identification data handling
|
|
||||||
let mut idvec = Vec::new();
|
|
||||||
for eachid in json_config.ids {
|
|
||||||
let id_id = idsmap.get(eachid.id.trim());
|
|
||||||
let id_base = eachid.base;
|
|
||||||
let id_roll = eachid.roll;
|
|
||||||
|
|
||||||
idvec.push(
|
|
||||||
Stat {
|
|
||||||
kind: match id_id {
|
|
||||||
Some(ide) => *ide,
|
|
||||||
None => panic!("There is a mismatched ID, and this message has replaced where the line is meant to be")
|
|
||||||
},
|
|
||||||
base: Some(id_base),
|
|
||||||
roll: match id_roll{
|
|
||||||
Some(rolle) => RollType::Value(rolle),
|
|
||||||
None => RollType::PreIdentified
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
// println!("{:?} {:?} {:?}",id_id,id_base,id_roll)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ENCODE: IdentificationsData
|
|
||||||
IdentificationData {
|
|
||||||
identifications: idvec,
|
|
||||||
extended_encoding: true,
|
|
||||||
}
|
|
||||||
.encode(ver, &mut out)
|
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
// json powder data handling
|
|
||||||
let mut powdervec = Vec::new();
|
|
||||||
for eachpowder in json_config.powders {
|
|
||||||
let powdertier = eachpowder.tier; // get the powder tier
|
|
||||||
let powderamount: u8 = eachpowder.amount.unwrap_or(1);
|
|
||||||
// match for the powder type
|
|
||||||
for _ in 0..powderamount {
|
|
||||||
let eletype = match eachpowder.r#type.to_ascii_lowercase() {
|
|
||||||
'e' => Element::Earth,
|
|
||||||
't' => Element::Thunder,
|
|
||||||
'w' => Element::Water,
|
|
||||||
'f' => Element::Fire,
|
|
||||||
'a' => Element::Air,
|
|
||||||
_ => Element::Thunder,
|
|
||||||
};
|
|
||||||
if debug_mode {
|
|
||||||
dbg!(powdertier);
|
|
||||||
dbg!(eletype);
|
|
||||||
}
|
|
||||||
powdervec.push(Some((eletype, powdertier)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if debug_mode {
|
|
||||||
dbg!(&powdervec);
|
|
||||||
}
|
|
||||||
|
|
||||||
// ENCODE: PowderData
|
|
||||||
PowderData {
|
|
||||||
powder_slots: json_config.powder_limit,
|
|
||||||
powders: powdervec,
|
|
||||||
}
|
|
||||||
.encode(ver, &mut out)
|
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
match json_config.rerolls {
|
|
||||||
Some(rerollcount) => {
|
|
||||||
if rerollcount != 0 {
|
|
||||||
// ENCODE: RerollData if applicable
|
|
||||||
RerollData(rerollcount).encode(ver, &mut out).unwrap();
|
|
||||||
if debug_mode {
|
|
||||||
dbg!(rerollcount);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
None => pass(),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut realshinykey: u8;
|
// ENCODE: A Lot Of Stuff
|
||||||
if let Some(shiny) = json_config.shiny {
|
// Also print any mapped errors
|
||||||
let _shinykey = &shiny.key;
|
let cooking = cook(&mut funcparamsfr, &mut loaded_config_clone, loaded_idkeys, loaded_shinystats, namefr, executable_path);
|
||||||
let shinyvalue = shiny.value;
|
if let Err(e) = cooking {
|
||||||
realshinykey = 1;
|
println!("{}", e); // print error if there is an error
|
||||||
for i in json_shiny {
|
} else {
|
||||||
if i.key == shiny.key {
|
// final string print if there is no error
|
||||||
realshinykey = i.id;
|
println!("{}", cooking?)
|
||||||
if debug_mode {
|
|
||||||
dbg!(&shiny.key);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if debug_mode {
|
|
||||||
dbg!(&realshinykey);
|
|
||||||
dbg!(&shinyvalue);
|
|
||||||
}
|
|
||||||
// ENCODE: ShinyData (if applicable)
|
|
||||||
ShinyData {
|
|
||||||
id: realshinykey,
|
|
||||||
val: shinyvalue, //- 0b0100_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000,
|
|
||||||
// u16::MAX is the max value of unsigned 16bit value
|
|
||||||
}
|
|
||||||
.encode(ver, &mut out)
|
|
||||||
.unwrap();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// prints (Water,6) 255 times
|
|
||||||
// println!("{:?}",vec![(Powders::WATER, 6); 255]);
|
|
||||||
|
|
||||||
// ENCODE: EndData
|
|
||||||
EndData.encode(ver, &mut out).unwrap();
|
|
||||||
|
|
||||||
// final string print
|
|
||||||
println!("{}", encode_string(&out));
|
|
||||||
|
|
||||||
// I don't even know what the fuck this does
|
|
||||||
//for b in out {
|
|
||||||
// print!("{:02X}", b);
|
|
||||||
//}
|
|
||||||
|
|
||||||
// println!();
|
|
||||||
|
|
||||||
// decode test
|
|
||||||
//let input = "";
|
|
||||||
//let bytes = decode_string(&input);
|
|
||||||
//let mut bytes_iter = bytes.into_iter();
|
|
||||||
//let out = decode(&mut bytes_iter).unwrap();
|
|
||||||
|
|
||||||
// println!("{:#?}", out);
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn pass() {}
|
fn cook(fr_params: &mut FuncParams, json_config: &mut Jsonconfig, idsmap: HashMap<String, u8>, json_shiny: Vec<Shinystruct>, namefr: String, executable_path: &str) -> Result<String, Errorfr> {
|
||||||
|
|
||||||
|
|
||||||
|
// ENCODE: StartData and TypeData, ALWAYS
|
||||||
|
fr_params.encode_startdata()?;
|
||||||
|
fr_params.encode_typedata(json_config.item_type)?;
|
||||||
|
|
||||||
|
// ENCODE: CustomGearTypeData / CustomConsumableTypeData
|
||||||
|
match json_config.item_type {
|
||||||
|
ItemTypeDeser::CraftedGear | ItemTypeDeser::CraftedConsu => {
|
||||||
|
if let Some(real_crafted_type) = &json_config.crafted_type {
|
||||||
|
fr_params.encode_typedata_custom(real_crafted_type)?;
|
||||||
|
} else {
|
||||||
|
return Err(Errorfr::JsonNotFoundCraftedType);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_ => {}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ENCODE: NameData, if ItemType is Gear, Tome, Charm
|
||||||
|
match json_config.item_type {
|
||||||
|
ItemTypeDeser::Gear | ItemTypeDeser::Tome | ItemTypeDeser::Charm => {
|
||||||
|
if namefr != *"" {
|
||||||
|
fr_params.encode_namedata(&namefr)?
|
||||||
|
}
|
||||||
|
else if let Some(real_name) = &json_config.name {
|
||||||
|
fr_params.encode_namedata(real_name)?
|
||||||
|
} else {
|
||||||
|
return Err(Errorfr::JsonNotFoundName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_ => {}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ENCODE: IdentificationData
|
||||||
|
match json_config.item_type {
|
||||||
|
ItemTypeDeser::Gear | ItemTypeDeser::Tome | ItemTypeDeser::Charm => {
|
||||||
|
if namefr != *"" {
|
||||||
|
println!("Overriding IDs with perfect ones!");
|
||||||
|
let fr_gear_cache = load_gear_cache(executable_path)?;
|
||||||
|
let resultantvec = gen_perfect(&namefr, &fr_gear_cache)?;
|
||||||
|
fr_params.encode_iddata(&resultantvec, idsmap)?
|
||||||
|
}
|
||||||
|
else if let Some(real_ids) = &json_config.ids {
|
||||||
|
fr_params.encode_iddata(real_ids, idsmap)?
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_ => {}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ENCODE: DurabilityData (REQUIRED for CraftedGear)
|
||||||
|
match json_config.item_type {
|
||||||
|
ItemTypeDeser::CraftedGear => {
|
||||||
|
if let Some(real_dura) = &json_config.crafted_durability {
|
||||||
|
fr_params.encode_duradata(real_dura)?;
|
||||||
|
} else {
|
||||||
|
return Err(Errorfr::JsonNotFoundDura);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_ => {}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ENCODE: RequirementsData if ItemType is CraftedGear, CraftedConsu
|
||||||
|
match json_config.item_type {
|
||||||
|
ItemTypeDeser::CraftedGear | ItemTypeDeser::CraftedConsu => {
|
||||||
|
if let Some(real_reqs) = json_config.crafted_requirements {
|
||||||
|
fr_params.encode_reqdata(real_reqs)?
|
||||||
|
} else {
|
||||||
|
return Err(Errorfr::JsonNotFoundReqs);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_ => {}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ENCODE: PowderData if ItemType is Gear, CraftedGear
|
||||||
|
match json_config.item_type {
|
||||||
|
ItemTypeDeser::Gear | ItemTypeDeser::CraftedGear => {
|
||||||
|
if let Some(real_powders) = &json_config.powders {
|
||||||
|
fr_params.encode_powderdata(real_powders)?
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_ => {}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ENCODE: RerollData if ItemType is Gear, Tome, Charm
|
||||||
|
match json_config.item_type {
|
||||||
|
ItemTypeDeser::Gear | ItemTypeDeser::Tome | ItemTypeDeser::Charm => {
|
||||||
|
if let Some(rerollcount) = json_config.rerolls {
|
||||||
|
// rerolldata
|
||||||
|
fr_params.encode_rerolldata(rerollcount)?
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_ => {}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ENCODE: ShinyData if ItemType is Gear
|
||||||
|
match json_config.item_type {
|
||||||
|
ItemTypeDeser::Gear => {
|
||||||
|
if let Some(shiny) = &json_config.shiny {
|
||||||
|
fr_params.encode_shinydata(shiny, &json_shiny)?
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_ => {}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ENCODE: EndData, ALWAYS
|
||||||
|
fr_params.encode_enddata()?;
|
||||||
|
|
||||||
|
let mut final_string: String = encode_string(fr_params.fr_out);
|
||||||
|
|
||||||
|
// add NameAfter. not actually an encode.
|
||||||
|
match json_config.item_type {
|
||||||
|
ItemTypeDeser::CraftedGear | ItemTypeDeser::CraftedConsu => {
|
||||||
|
if let Some(real_name) = &json_config.name {
|
||||||
|
final_string = format!("{} \"{}\"", final_string, real_name)
|
||||||
|
} else {
|
||||||
|
return Err(Errorfr::JsonNotFoundName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_ => {}
|
||||||
|
}
|
||||||
|
|
||||||
|
Ok(final_string)
|
||||||
|
}
|
|
@ -1,93 +0,0 @@
|
||||||
use idmangler_lib::types::ItemType;
|
|
||||||
use serde::Deserialize;
|
|
||||||
// structs
|
|
||||||
#[derive(Deserialize)]
|
|
||||||
pub struct Powder {
|
|
||||||
pub r#type: char,
|
|
||||||
pub tier: u8,
|
|
||||||
pub amount: Option<u8>,
|
|
||||||
}
|
|
||||||
#[derive(Deserialize)]
|
|
||||||
pub struct Identificationer {
|
|
||||||
pub id: String,
|
|
||||||
pub base: i32,
|
|
||||||
pub roll: Option<u8>,
|
|
||||||
}
|
|
||||||
#[derive(Deserialize)]
|
|
||||||
pub struct Jsonconfig {
|
|
||||||
pub debug: Option<bool>,
|
|
||||||
pub name: String,
|
|
||||||
pub item_type: ItemTypeDeser,
|
|
||||||
pub shiny: Option<Shinyjson>,
|
|
||||||
pub ids: Vec<Identificationer>,
|
|
||||||
pub powder_limit: u8,
|
|
||||||
pub powders: Vec<Powder>,
|
|
||||||
pub rerolls: Option<u8>,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Deserialize)]
|
|
||||||
pub struct Shinystruct {
|
|
||||||
pub id: u8,
|
|
||||||
pub key: String,
|
|
||||||
}
|
|
||||||
#[derive(Deserialize)]
|
|
||||||
pub struct Shinyjson {
|
|
||||||
pub key: String,
|
|
||||||
pub value: i64,
|
|
||||||
}
|
|
||||||
|
|
||||||
// I had to clone this and add Deserialize because the original idmangler_lib::types::ItemType does not
|
|
||||||
#[repr(u8)]
|
|
||||||
#[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Hash, Debug, Deserialize)]
|
|
||||||
pub enum ItemTypeDeser {
|
|
||||||
Gear = 0,
|
|
||||||
Tome = 1,
|
|
||||||
Charm = 2,
|
|
||||||
CraftedGear = 3,
|
|
||||||
CraftedConsu = 4,
|
|
||||||
}
|
|
||||||
impl From<ItemTypeDeser> for ItemType {
|
|
||||||
fn from(value: ItemTypeDeser) -> ItemType {
|
|
||||||
match value {
|
|
||||||
ItemTypeDeser::Gear => ItemType::Gear,
|
|
||||||
ItemTypeDeser::Tome => ItemType::Tome,
|
|
||||||
ItemTypeDeser::Charm => ItemType::Charm,
|
|
||||||
ItemTypeDeser::CraftedConsu => ItemType::CraftedConsu,
|
|
||||||
ItemTypeDeser::CraftedGear => ItemType::CraftedGear,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Hash, Debug, Deserialize)]
|
|
||||||
pub enum DownloadJsons {
|
|
||||||
None,
|
|
||||||
IdKeys,
|
|
||||||
ShinyStats,
|
|
||||||
All,
|
|
||||||
}
|
|
||||||
impl From<String> for DownloadJsons {
|
|
||||||
fn from(value: String) -> Self {
|
|
||||||
match value.to_lowercase().as_str().trim() {
|
|
||||||
"none" => {
|
|
||||||
println!("download NONE");
|
|
||||||
DownloadJsons::None
|
|
||||||
}
|
|
||||||
"id_keys" | "idkeys" | "idkeys.json" | "id_keys.json" => {
|
|
||||||
println!("download ID_KEYS");
|
|
||||||
DownloadJsons::IdKeys
|
|
||||||
}
|
|
||||||
"shiny_stats" | "shinystats" | "shiny_stats.json" | "shinystats.json" => {
|
|
||||||
println!("download SHINY_STATS");
|
|
||||||
DownloadJsons::ShinyStats
|
|
||||||
}
|
|
||||||
"all" | "everything" | "both" => {
|
|
||||||
println!("download BOTH");
|
|
||||||
DownloadJsons::All
|
|
||||||
}
|
|
||||||
_ => {
|
|
||||||
println!("Could not understand what Jsons to download, sorry.");
|
|
||||||
DownloadJsons::None
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Add table
Reference in a new issue