Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2026,6 +2026,37 @@ a message that says so; none is passed over in silence:
| Writing a unit's position, cloak or tint | the game refuses these itself (*Units*) |
| Playing on the classic game (1.16.1) | `trigger()` only |

### Coming from 3.12

A 3.12 script builds into the same map, and its programs now build *without eudplib*:
TrigScript lays them out itself when you save, in under a second, with nothing to install
and no Build step. The eudplib plugin is no longer required, and a map that used it keeps
working. What 4.0 changed around that:

- **What the build refuses, it says.** A script with something TrigScript does not take is
not built; Problems marks the line, and Save offers to save without it. Nothing is built
through another compiler behind your back.
- **Tests run in the game as well.** With the lifted game installed, *Run all tests in the
game* judges each test twice, and a test's frames carry a cost in milliseconds of
Remastered's time. Every address a build touches is checked against what Remastered
allows, line by line, before a map is written.
- **The language grew**: [functions as values](#functions-as-values) and closures, [`try`
/ `catch` / `throw`](#errors), `async` functions, tasks and `Promise.*` ([Waiting and
tasks](#waiting-and-tasks)), [`on.*` events](#events), [numbers with a
fraction](#numbers-with-a-fraction), [the game's tables and `memory`](#the-games-tables-and-memory),
[`local` reads and `sync()`](#keys-the-mouse-and-chat), programs of a force or a list
of players ([Owners](#owners-and-per-player-programs)), [sounds](#sounds), pictures and
videos the script imports, and a [standard library](#the-standard-library) of nine
modules.
- **Input is the build's own.** Keys, clicks, the mouse and typed lines reach every
player's computer in step without MSQC or a chat plugin: `keyPressed`, `keyHeld`,
`clicked`, `mouse`, `chatted`, `on.key`, `on.chat`.
- **Units** gained `buildTime`, `rank`, `matrix`, `speed`, `speedUpgrade`, `hasTarget`,
`inTransport` and a writable `hallucinated`, and `bounds(location)` reads a location
where it is now. `underAttack` is the game's own alert: a hit out of the player's view.
- **Other plugins build with TrigScript** through the `trigscript.build` service ([For
other plugins](#for-other-plugins)); Magenta 0.12 is the first.

### Coming from 3.9

Nothing of the language has changed; a 3.9 script builds into the same map. What is new is
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "scmjs-plugin-trigscript",
"version": "3.12.0",
"version": "4.0.0",
"private": true,
"description": "TrigScript — TypeScript that builds into triggers; a plugin for the scmJS StarCraft map editor.",
"author": "Jeany",
Expand Down
2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "TrigScript",
"id": "trigscript",
"version": "3.12.0",
"version": "4.0.0",
"description": "TypeScript kept inside the map. Ordinary TypeScript — files, imports, helpers, loops — runs when the script is applied and records one trigger per trigger() call: ordinary triggers that play on every version. Code inside program(() => { … }) runs in the game — variables, loops, functions, sleep — and is built into the map by TrigScript itself when you save; a map with a program needs StarCraft: Remastered. Checked as you type against the map's own names, with a built-in simulator.",
"author": "Jeany",
"homepage": "https://github.com/scm-js/plugin-trigscript",
Expand Down
2 changes: 1 addition & 1 deletion version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
* has been compiled into the editor (`compile.ts`). `tests/script.test.ts` keeps this
* equal to the manifest's.
*/
export const VERSION = "3.12.0";
export const VERSION = "4.0.0";
Loading