@idajs/create-mod 0.2.10 → 0.2.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
## What is IdaJS
|
|
4
|
+
|
|
5
|
+
IdaJS is a JavaScript-powered modding engine for Little Big Adventure 2 (LBA2). It lets you create mods for the classic LBA2 game using JavaScript or TypeScript — modifying scenes, characters, behaviors, dialogs, and more through a modern scripting API.
|
|
6
|
+
|
|
7
|
+
## API Reference
|
|
8
|
+
|
|
9
|
+
The full IdaJS TypeScript API with JSDoc documentation is available in `./node_modules/@idajs/types/`, structured by entities. The global objects (such as `scene`, `ida`, `text`, `object`, etc.) are defined in `global.d.ts`. Always consult these type definitions when implementing any feature.
|
|
10
|
+
|
|
11
|
+
## Mod Execution Phases
|
|
12
|
+
|
|
13
|
+
Different phases of mod execution allow different APIs. Be aware which phase you are in:
|
|
14
|
+
|
|
15
|
+
- **Scene setup phase** (`scene.Events.afterLoadScene` handler): Configure the scene before gameplay starts. Use `scene`, `object`, `text`, zone and waypoint APIs to add/modify objects, zones, waypoints, register life script handlers, register coroutines, and set initial state. Do **not** call life or move script commands here.
|
|
16
|
+
- **Life script handler** (`handleLifeScript`): Runs every frame per actor. Use `ida.life()` and `ida.lifef()` for life script commands/functions (conditions, dialogs, state changes). Can start/pause/stop coroutines from here.
|
|
17
|
+
- **Coroutine (move script)** (generator function registered via `registerCoroutine`): Runs across multiple frames. Use `yield doMove()` for move commands (animations, movement, timing) and other `yield do...()` helpers (`doSceneStore`, `doGameStore`, etc.). Cannot check game conditions directly — that logic belongs in life scripts.
|
|
18
|
+
|
|
19
|
+
## Mod Examples
|
|
20
|
+
|
|
21
|
+
For examples of working mods, look at `Ida/Samples` in the IdaJS installation folder. The path to the installation folder is written in a JSON file either in the user's home directory: `~/.idajs.json` or in the root directory of this project.
|
|
22
|
+
|
|
23
|
+
## Web Documentation
|
|
24
|
+
|
|
25
|
+
Full readme, API reference, and guides are available at: https://ida.innerbytes.com
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@AGENTS.md
|
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
"*.ts": "typescript"
|
|
8
8
|
},
|
|
9
9
|
"[javascript]": {
|
|
10
|
-
"editor.defaultFormatter": "
|
|
10
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
11
11
|
"editor.tabSize": 2,
|
|
12
12
|
"editor.wordWrap": "wordWrapColumn",
|
|
13
13
|
"editor.wordWrapColumn": 100,
|
|
14
14
|
"editor.rulers": [100]
|
|
15
15
|
},
|
|
16
16
|
"[typescript]": {
|
|
17
|
-
"editor.defaultFormatter": "
|
|
17
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
18
18
|
"editor.tabSize": 2,
|
|
19
19
|
"editor.wordWrap": "wordWrapColumn",
|
|
20
20
|
"editor.wordWrapColumn": 100,
|
package/install.js
CHANGED
|
@@ -145,6 +145,8 @@ function copyFiles() {
|
|
|
145
145
|
{ source: "watch.js" },
|
|
146
146
|
{ source: "sync.js" },
|
|
147
147
|
{ source: "build.js" },
|
|
148
|
+
{ source: "AGENTS.md" },
|
|
149
|
+
{ source: "CLAUDE.md" },
|
|
148
150
|
{ source: isTypeScriptProject ? "tsconfig.json" : "jsconfig.json" },
|
|
149
151
|
{ source: "settings.json", target: ".vscode/settings.json" },
|
|
150
152
|
{ source: "extensions.json", target: ".vscode/extensions.json" },
|
package/package.json
CHANGED