Skip to content

Commit

Permalink
updated regions.txt and the documentation on how to format it
Browse files Browse the repository at this point in the history
  • Loading branch information
fudgepop01 committed Jun 16, 2020
1 parent c8291e5 commit fbdadeb
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 240 deletions.
220 changes: 0 additions & 220 deletions regions.txt

This file was deleted.

2 changes: 1 addition & 1 deletion src/components/Overview.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
on:change={(evt) => checkBoundsAndSet(evt, param)}
placeholder="value..."/>
</div>
({(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}
<div class="ui transparent input">
<input type="number"
Expand Down
93 changes: 85 additions & 8 deletions static/amiibo/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,93 @@
# Formatting `regions.csv`
# Formatting `regions.txt`

> _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
<next entry here>
{
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 "
Unlike typical input boxes, this will *always* have the binary display
beside it for ease of understanding.
22 changes: 11 additions & 11 deletions static/amiibo/regions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit fbdadeb

Please sign in to comment.