From fbdadeb90efe580350c5089a6288abdf411c6ea4 Mon Sep 17 00:00:00 2001 From: fudgepop01 Date: Tue, 16 Jun 2020 11:12:28 -0400 Subject: [PATCH] updated regions.txt and the documentation on how to format it --- regions.txt | 220 --------------------------------- src/components/Overview.svelte | 2 +- static/amiibo/README.md | 93 ++++++++++++-- static/amiibo/regions.txt | 22 ++-- 4 files changed, 97 insertions(+), 240 deletions(-) delete mode 100644 regions.txt diff --git a/regions.txt b/regions.txt deleted file mode 100644 index a2df496e..00000000 --- a/regions.txt +++ /dev/null @@ -1,220 +0,0 @@ -ability 1: ABILITY -0xEC -0xED -stats -one of the amiibo`s abilities - -ability 2: ABILITY -0xED -0xEE -stats -one of the amiibo`s abilities - -ability 3: ABILITY -0xEE -0xEF -stats -one of the amiibo`s abilities - -type: ENUM -0xE3b0 -0xE3b2 -stats -{ - neutral: 0b00 - attack: 0b01 - defense: 0b10 - grab: 0b11 -} -the amiibo`s `typing` - -level exp: u16 -0x14C -0x14E -stats -controlls the amiibo`s visible level. This only affects buffs. - -cpu exp: u16 -0x14E -0x150 -behavior -controlls the `skill` of the amiibo`s underlying `Default AI.` -Mainly affects movement. - -attack: i16 -0x150 -0x152 -stats -the amiibo`s attack stat - -defense: i16 -0x152 -0x154 -stats -the amiibo`s defense stat - -gift: u16 -0x156 -0x158 -misc -whether or not the amiibo will give you gifts upon scanning -it in. Can be used to farm stuff. - -personality: HEX -0x168 -0x1A2 -behavior -determines how the amiibo behaves in-battle. Still being researched - -taunt: u8 -0x181 -0x182 -moveset -the chance of the amiibo running the taunt routine - -jab: u8 -0x188 -0x189 -moveset -the chance of the amiibo running the jab routine - -forward tilt: u8 -0x189 -0x18a -moveset -the chance of the amiibo running the fTilt routine - -up tilt 1: u8 -0x18a -0x18b -moveset -the chance of the amiibo running the uTilt routine - -up tilt 2: u8 -0x18b -0x18c -moveset -the chance of the amiibo running the uTilt routine - -down tilt: u8 -0x18c -0x18d -moveset -the chance of the amiibo running the dTilt routine - -forward smash: u8 -0x18d -0x18e -moveset -the chance of the amiibo running the fSmash routine - -up smash: u8 -0x18e -0x18f -moveset -the chance of the amiibo running the uSmash routine - -down smash: u8 -0x18f -0x190 -moveset -the chance of the amiibo running the dSmash routine - -down smash neutral special: u8 -0x190 -0x191 -moveset -an odd one that needs more research - -grounded neutral special: u8 -0x191 -0x192 -moveset -the chance of the amiibo running the neutral special routine while -on the ground - -grounded side special: u8 -0x192 -0x193 -moveset -the chance of the amiibo running the side special routine while -on the ground - -grounded up special: u8 -0x193 -0x194 -moveset -the chance of the amiibo running the up special routine while -on the ground - -grounded down special: u8 -0x194 -0x195 -moveset -the chance of the amiibo running the down special routine while -on the ground - -up speical ambiguous: u8 -0x195 -0x196 -moveset -the chance of the amiibo running the up speical routine. More -research is needed - -forward air: u8 -0x196 -0x197 -moveset -the chance of the amiibo running the forward air routine - -back air: u8 -0x197 -0x198 -moveset -the chance of the amiibo running the back air routine - -up air: u8 -0x198 -0x199 -moveset -the chance of the amiibo running the up air routine - -down air: u8 -0x199 -0x19a -moveset -the chance of the amiibo running the down air routine - -aerial neutral special: u8 -0x19a -0x19b -moveset -the chance of the amiibo running the neutral special routine while -in the air - -aerial side special: u8 -0x19b -0x19c -moveset -the chance of the amiibo running the side special routine while -in the air - -aerial up special: u8 -0x19c -0x19d -moveset -the chance of the amiibo running the up special routine while -in the air - -aerial down special: u8 -0x19d -0x19e -moveset -the chance of the amiibo running the down special routine while -in the air - -costume: u8 -0x1A3 -0x1A4 -misc -the skin the amiibo has diff --git a/src/components/Overview.svelte b/src/components/Overview.svelte index 7afd1cc1..16971938 100644 --- a/src/components/Overview.svelte +++ b/src/components/Overview.svelte @@ -195,7 +195,7 @@ on:change={(evt) => checkBoundsAndSet(evt, param)} placeholder="value..."/> - ({(param.value !== undefined) ? param.value.toString(2).padStart(param.bitCount, '0') : ''}) + ({(param.value !== undefined) ? (param.value >>> 0).toString(2).substr(-param.bitCount).padStart(param.bitCount, '0') : ''}) {:else}
_NOTE_: USE ` INSTEAD OF ' OR " + +## Here is how each of the types should be setup in regions.txt: + +### standard types + +> this includes: +> - `u8`, `u16`, `u32` +> - for positive-only numbers +> - `i8`, `i16`, `i32` +> - for numbers that can be negative + +these are just the typical integer-based number formats. ```txt name: type start offset -end offset (exclusive) +end offset +section +description +``` + +### ABILITIES + +abilities are a built-in special type that just create a drop down +of each spirit ability automatically. +These should be taken care of already, so no need to change +or modify them further. + +```txt +name: ABILITY +start offset +end offset +section +description +``` + +### HEX + +a type used when not much is known about a region other than the bounds. +this indicates that you'll need to edit the value in the hex editor. + +```txt +name: HEX +start offset +end offset +section +description +``` + +### ENUM + +a type used when you want to only provide known sets of values for one +entry in the form of a drop-down. + +**THIS CAN BE SET TO AFFECT INDIVIDUAL BITS TOO** + +```txt +name: ENUM +0xHEX b(0-7) +0xHEX b(0-7) section -documentation -| <-- LINE BREAK - +{ + entry 1: value 1 + entry 2: value 2 + etc: etc +} +description ``` -start and end offsets should be represented as hex. -line breaks signify the next entry. +it should be noted that `value`s can take the form of: +- numbers (`69`, `234234`, `646345`, ...) +- hex (`0x56`, `0x04`, ...) +- binary (`0b00001`, `0b100101`, `0b0101`) + +### bits + +a type used when you want to affect **bits** *instead* of full bytes. +While as of 6/16/2020 it is currently unused, I have a feeling that will change +once a greater understanding of stuff is reached. + +```txt +name: bits +0xHEX b(0-7) +0xHEX b(0-7) +section +description +``` -> _NOTE_: USE ` INSTEAD OF ' OR " \ No newline at end of file +Unlike typical input boxes, this will *always* have the binary display +beside it for ease of understanding. \ No newline at end of file diff --git a/static/amiibo/regions.txt b/static/amiibo/regions.txt index fdf69928..48f5de5f 100644 --- a/static/amiibo/regions.txt +++ b/static/amiibo/regions.txt @@ -66,12 +66,6 @@ misc whether or not the amiibo will give you gifts upon scanning it in. Can be used to farm stuff. -personality: HEX -0x168 -0x1A2 -behavior -determines how the amiibo behaves in-battle. Still being researched - aggression: u16 0x168 0x16A @@ -133,6 +127,12 @@ jab: u8 moveset the chance of the amiibo running the jab routine +dash attack: u8 +0x175 +0x176 +moveset +the chance of the amiibo running the dash attack routine + forward tilt: u8 0x189 0x18a @@ -280,15 +280,15 @@ custom moves: u8 misc the custom move the amiibo has (stored as binary) -hat: u8 -0x100 -0x101 +hat: u16 +0xf0 +0xf2 misc the hat the amiibo has outfit: u8 -0x102 -0x103 +0xf2 +0xf3 misc the outfit the amiibo has