An Animal Crossing: New Horizons database for npm, the data available through this module is made from various public Google Spreadsheets for Animal Crossing: New Horizons, which is referenced below.
In addition to the spreadsheets converted to JSON, the data have been sanitized and modified so working with them can be more friendly and easier, for example, recipes and translations have been merged into their relevant item.
If you're just looking for the JSON files, they can be viewed in this directory. For a guide on how to run the converter locally, look at this README.
npm install animal-crossing
Documentation is generated using typedoc with the typedoc-plugin-markdown plugin, and can be viewed here.
The following items are available from this module:
achievements
construction
creatures
items
reactions
recipes
seasonsAndEvents
translations
villagers
npcs
Along with types, for those using TypeScript:
IAchievement
IConstruction
ICreature
IEvent
IItem
IReaction
IRecipe
ISeasonsAndEvents
ITranslation
IVillager
INPC
The names of all items are changed into camelCase, so they won't be same as shown on the spreadsheets. As for values, they're all changed in favor of JavaScript values, for example, NA
is changed to null
, Yes
/No
is changed to true
/false
, etc. If a value represents that the key does not relate to the item, an example being the key Lighting Type
for the item Acoustic Guitar
, the value will be changed to null
. In addition, if a key can have multiple values, the values will be split and changed into an array.
As for the rest of the values, they're the same as they appear on the spreadsheets. To view how the keys/values are represented, you can look at the documentation or the JSON files here.
Note that all entries are arrays, so to find a certain item, you can use the find
method.
// Node.js
const { villagers } = require('animal-crossing');
// TypeScript
import { villagers } from 'animal-crossing';
const freya = villagers.find(villager => villager.name === 'Freya');
// Once you have found the item you're looking for, you can view
// information for said item. For villagers, for example, some
// properties you can view are translations of their name and catchphrase.
console.log(freya.translations.uSes); // Freya's name translated to Spanish,
console.log(freya.catchphrases.uSes); // and her catchphrase translated as well.
// To view the properties of all items, take a look at the documentation or the JSON files itself.
The spreadsheets that were converted and is available through this module are:
- the Animal Crossing: New Horizons spreadsheet, specifically the editor's copy, and
- the Translations spreadsheet.
If you use any JSON file and/or this module for a project, please credit and link these spreadsheets somewhere in your project.
And thanks to the acdb-team, as I took inspiration from their repo, google-sheets-to-json.