aoemods / AOE4-TSTL

Very experimental project to allow writing TypeScript for Age of Empires 4 modding using TypeScriptToLua

Home Page:https://aoemods.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Age of Empires 4 - TypeScript to Lua

Use the new AoE4 TypeScript template instead

Very experimental project to allow writing TypeScript for Age of Empires 4 modding using TypeScriptToLua.

The type definitions are partially autogenerated from the scardocs contained in the AOE4 directory. The rest are either automatically obtained from this older template or added by hand.

It is likely you will need to change some of the definitions because they are not very accurate. Almost all functions also only have any for return type since the scardocs don't tell the return type.

Setup

  • Change the outPath in deploy.js to your own project directory

Usage

  • npm run build: Converts the scripts in scripts/ to a single Lua file
  • npm run dev: Automatically converts the scripts in scripts/ to a single Lua file whenever any scripts change
  • npm run deploy <scar directory>: Copies the Lua file to the project directory and does some necessary post-processing, scar directory is eg. C:\Users\username\Documents\projectname\assets\scar

About

Very experimental project to allow writing TypeScript for Age of Empires 4 modding using TypeScriptToLua

https://aoemods.com


Languages

Language:TypeScript 96.5%Language:JavaScript 3.5%