Skip to content

king8fisher/aoe2card

Repository files navigation

AoE2 Card

Playground for a future app that digs into AoE2 data and presents it in a user friendly way.

Temporary link for the project using vercel: https://aoe2card.vercel.app/

Inspirations

Requirements

  • node v18.*
    • It's possible to use node v14.*, but then pnpm v7.* is required.
  • pnpm
  • Optional (if tsx desired):
    • pnpm install -g tsx (Will tell if environment PATH lacks an entry, fix accordingly).
  • Compile project for development:
    • pnpm i - install dependencies.
    • pnpm dev - start server in development mode.
  • pnpm install -g prettier for:
    • prettier -w . (which can be run with pnpm format as well, being a task in package.json)

VSCode Extensions

Data Sources

SiegeEngineers combine/copy those:

Data Update

  • Pull current data from SeigeEngineers and HSZemi:
    • Windows:
      > iwr -outf ./src/data/json/data.json https://raw.githubusercontent.com/SiegeEngineers/aoe2techtree/master/data/data.json
      > iwr -outf ./src/data/json/strings.json https://raw.githubusercontent.com/SiegeEngineers/aoe2techtree/master/data/locales/en/strings.json
      > iwr -outf ./src/data/json/units_buildings_techs.json https://raw.githubusercontent.com/HSZemi/aoe2dat/master/data/units_buildings_techs.json
    • Linux / Mac:
      $ wget -P ./src/data/json/data.json https://raw.githubusercontent.com/SiegeEngineers/aoe2techtree/master/data/data.json
      $ wget -P ./src/data/json/strings.json https://raw.githubusercontent.com/SiegeEngineers/aoe2techtree/master/data/locales/en/strings.json
      $ wget -P ./src/data/json/units_buildings_techs.json https://raw.githubusercontent.com/HSZemi/aoe2dat/master/data/units_buildings_techs.json
  • Format json files for uniformness in searches with the fmt task defined in package.json: pnpm fmt.
  • Update current DE build in ./src/data/json/patch.json (See https://github.com/SiegeEngineers/aoe2techtree/commits/master for the number).

Assets Sources

  • \Steam\steamapps\common\AoE2DE\widgetui\textures\ingame\staticons\

Existing APIs

Intricacies

  • Sicilians. Several "same" units can be produced from different buildings: Castle & Donjon
    • Pikeman shows as 2 IDs: 358 & 1787.
    • Spearman shows as 2 IDs: 93 & 1786.
    • Halberdier shows as 2 IDs: 359 & 1788.
    • Serjeant shows as 2 IDs: 1660 & 1658.
      • Elite Serjeant shows as 2 IDs: 1659 & 1661.
  • Huns. Castle upgrade "Marauders" "Enables you to create Tarkans at Stables".
  • Goths. Castle upgrade "Anarchy" "Allows Huskarls to be created at the Barracks.".

From Vite Template

React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

  • Configure the top-level parserOptions property like this:
parserOptions: {
 ecmaVersion: 'latest',
 sourceType: 'module',
 project: ['./tsconfig.json', './tsconfig.node.json'],
 tsconfigRootDir: __dirname,
},
  • Replace plugin:@typescript-eslint/recommended to plugin:@typescript-eslint/recommended-type-checked or plugin:@typescript-eslint/strict-type-checked
  • Optionally add plugin:@typescript-eslint/stylistic-type-checked
  • Install eslint-plugin-react and add plugin:react/recommended & plugin:react/jsx-runtime to the extends list