-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
4 changed files
with
43 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,17 @@ | ||
## Fire Emblem: Heroes Skill Inheritance Tool | ||
|
||
This project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app). | ||
This project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app). | ||
|
||
|
||
### Data Entry | ||
Scripts are provided to simplify data entry: | ||
* `npm run stats` - Sends web requests to https://feh-stat-pull.herokuapp.com/, which hosts my [stats API](https://github.com/arghblargh/feh-stat-pull). | ||
* `npm run templates` - Generates blank entries in the JSON files for missing data (currently only unit templates). | ||
* `npm run portraits` - Sends web requests to the [Fire Emblem Heroes Wiki](https://feheroes.gamepedia.com/) to retrieve and convert missing unit portrait images. Requires [ImageMagick](https://imagemagick.org/) installed with `magick convert` available from the command line. | ||
|
||
To add new units from the wiki: | ||
1. Run the `stats` script. | ||
2. Run the `templates` script. | ||
2a. If units were missed by the script (usually some wiki data is incorrect/missing), add those manually. | ||
3. Run the `portraits` script. | ||
4. Manually fill in data in the JSON files: `units`, `weapons`, `passives`, `specials`, `assists`, `seals`, `upgrades` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 | ||
|
||
# function Remove-StringNormalize | ||
# { | ||
# PARAM ([string]$String) | ||
# $String = $String -Replace ":","" -Replace " ","_" -Replace '"',"" -Replace "'","" | ||
# [Text.Encoding]::ASCII.GetString([Text.Encoding]::GetEncoding("Cyrillic").GetBytes($String)) | ||
# } | ||
$weapon = @([psobject][ordered]@{name="";unlock=1},[psobject][ordered]@{name="";unlock=2},[psobject][ordered]@{name="";unlock=3},[psobject][ordered]@{name=""}) | ||
$skill = @([psobject][ordered]@{name="";unlock=1}) | ||
|
||
$Units = Get-Content src/data/units.json -raw | ConvertFrom-Json | ||
$FullList = Get-Content src/data/stats/rarity.json -raw | ConvertFrom-Json | ForEach-Object { $_.PSObject.Properties | Select-Object -Expand Name } | ||
$CurrentList = $Units | ForEach-Object { $_.PSObject.Properties | Select-Object -Expand Name } | ||
$DiffList = $FullList | Where-Object { $CurrentList -notcontains $_ } | ||
|
||
$DiffList.foreach({ | ||
$name = $_.Split(": ") | ||
$unit = [psobject][ordered]@{name=$name[0];title=$name[1];color="";wpnType="";movType="";skills=[psobject][ordered]@{weapon=$weapon;assist=$skill;special=$skill;passiveA=$skill;passiveB=$skill;passiveC=$skill}} | ||
$Units | Add-Member -TypeName PSObject -NotePropertyName $_ -NotePropertyValue $unit | ||
}) | ||
$Units | ConvertTo-Json -depth 32 | Set-Content src/data/units.json |