Fetches all items available on Warframe's mobile API endpoints while also adding images, drop rates, patch logs and related rivens.
The aim of this library is to create a complete collection of data for every item in Warframe based on the game's own data. This repo will be automatically updated on every new release, drop rate change or image change.
Because this gives you literally every item in Warframe, many of which can't even be found on the wikia. We also make sure to include every other data aspect that you could possibly need. To give you some idea:
- Unique ingame name - (/Lotus/Weapons/Tenno/...) - Especially useful when working with worldState
- Drop rates
- Patchlogs for each item
- Minified source images
- Rivens
- Whether items are tradable
And tons more item specific data. Check out /data/json to get an idea.
npm install @wfcd/items
// CommonJS
const Items = require('@wfcd/items');
const items = new Items(options, ...oldItems);
// ESM
import Items from '@wfcd/items';
const items = new Items(options, ...oldItems);
// Utilities - Only works in import
import { find, colors } from '@wfcd/items/utilities';
const excalPrime = find.findItem('/Lotus/Powersuits/Excalibur/ExcaliburPrime');
// normal items operations nowIn this example, items is an Array with all items. The ...oldItems param
allows you to add your own items before our gathered ones.
| Option | Default | Description |
|---|---|---|
| category | ['All'] |
Array of item categories to retrieve. Parallel to file names in /data/json. Useful if you don't wanna load lots and lots of MB of data into memory. |
| i18n | false |
If false (default), no internationalization data is loaded. If true, all locales under /data/json/i18n/{locale}.json are loaded. If set to an array of language codes (e.g., ['zh', 'de']), only those locale files are loaded. Translations are accessible via the main instance's i18n field.Supported language codes: de, es, fr, it, ja, ko, pl, pt, ru, th, tr, uk, zh. |
| i18nOnObject | false |
When true and i18n is an array, translation data is attached directly to each item's own i18n field instead of being stored centrally. This causes the main instance's i18n field to be undefined. |
| resolveComponents | true |
When true (default), expand parent components refs into full objects from the Components catalog at construction (compat with the pre-catalog shape). Set false to keep { uniqueName, itemCount } refs and call Items.resolveComponents(item) (or import resolveComponents) when needed. |
| Categories | Description |
|---|---|
| All | All categories in one file |
| Arcanes | Operator, Zaw, and some Warframe Arcanes |
| Archwing | Archwings.... nuff said |
| Arch-Gun | Archwing Guns |
| Arch-Melee | Archwing Melee weapons |
| Components | Crafting components catalog (deduped); parents store refs into this list |
| Enemy | NPCs |
| Fish | Fish that you fish |
| Gear | Things you equip in your gear wheel |
| Glyphs | Glyphs from partners, etc. |
| Melee | Melee weapons |
| Misc | Uncategorized items |
| Mods | Modifications for weapons, warframes, archwings, etc. |
| Node | Mission nodes |
| Pets | Companions, just the beasts |
| Primary | Primary slot weapons |
| Quests | Quests that you adventure on |
| Relics | Things you get prime parts from |
| Resources | For building stuff |
| Secondary | Secondary slot weapons |
| Sentinels | Mechanical companions |
| SentinelWeapons | Specialized weapons for sentinels |
| Sigils | Chest & back art |
| Skins | Henna for your frame |
| Warframes | Warframes... |
On disk, buildable items store lightweight component refs:
"components": [{ "uniqueName": "/Lotus/.../AshChassisComponent", "itemCount": 1 }]Full component payloads (name, drops, imageName, parentUniqueNames, β¦) live in Components.json.
With default resolveComponents: true, the constructor expands refs in memory. For refs-only loads:
const Items = require('@wfcd/items');
const items = new Items({ category: ['Warframes'], resolveComponents: false });
const ash = items.find((i) => i.name === 'Ash');
Items.resolveComponents(ash); // expands ash.components from the catalogComponent name values stay stripped in all locales for catalog components (e.g. Chassis, not Ash Chassis); use the parent name when you need a fully qualified label.
Components.json holds crafting-only parts (recipe pieces, blueprints). Standalone ingredients (Orokin Cell, Amphis, β¦) stay in their own categories; parents still ref them by uniqueName, and resolve looks them up there. Those standalone items may gain parentUniqueNames for reverse lookup.
You can find all automatically compiled data in /data/json. Images are stored
in /data/img. You can find every item's image name stored in item.imageName.
Since there are so many images, and we can't publish them on npm due to the size, we've set up a CDN to get you images at https://cdn.warframestat.us/img/${item.imageName} that provides a linkable resource for you.
https://runkit.com/tobitenno/615e52157b2af60008dce1f5
We're always happy to see contributions to this project, so here's some basic setup information to get you started.
- Node.js > 10
- Build Tools (
build-essentialson linux should be enough, on windows runnpm i -g windows-build-tools) - libpng-dev12 (linux only)
All relevant scripts are found in /build/ with
build.ts
The entrypoint for the build script. Here we also save JSON, image and cache data.
scraper.ts
Fetches all external data and returns it to the parser.
parser.ts
Parses the external data to match our schema and returns it to the build script.
You can run the build script with npm run build.
Once built, you can verify the data with npm test.
To verify the TypeScript typings are up to date, you can run npm run typings.
In case you want to skip hash checking in the build process run:
npm run build -- --force or npm run build -- -f.
It's also possible to set the environment variable FORCE='true'.
A normal build runs extractComponentCatalog then applyI18n, so Components.json, parent refs, and stripped component locale names are produced together β no separate migrate step.
