scmJS docs

The game's tables and memory

stats() reaches the game's own tables: what a unit type costs, what a weapon does, a player's upgrades. A field reads as a number (or true or false) and takes = and +=.

program(() => {
  stats(units.TerranMarine).minerals = 25;
  stats(units.TerranMarine).speed = 6.5;            // pixels a frame: a fraction is fine when it is known when the script is built
  stats(units.ZergZergling).name = "Dog";
  stats(weapons.GaussRifle).damage += 2;
  stats(upgrades.TerranInfantryArmor).minerals = 50;
  stats(units.TerranGhost).permanentCloak = true;
  stats(P3).color = "teal";                         // or colors.teal
  stats(P1).upgrades[upgrades.TerranInfantryWeapons] = 3;
  stats(P1).researched[techs.Lockdown] = true;
  if (stats(units.TerranMarine).minerals > minerals(CurrentPlayer)) print("too dear");
});
Of Fields
A unit type maxHp, maxShields, armor, minerals, gas, buildTime (seconds on the game's clock), supplyUsed, supplyProvided, sight, groundWeapon, airWeapon, size, speed, name, and the flags detector, permanentCloak, cloakable, burrowable, regenerates, invincible, hero, organic, mechanical, robotic
A weapon (weapons.) damage, bonus, cooldown, factor, range, minRange
An upgrade (upgrades.) minerals, gas, time, and maxLevel to read
A technology (techs.) minerals, gas, time, energy
A player color, upgrades[…], researched[…]

Only what has been played and seen working in StarCraft: Remastered is there, and hovering a field says what it affects. Most unit-type fields apply to units made after the write, and a weapon's to every unit using it at once. speed and name can be set but not read. A write lasts for the rest of the game.

memory is the game's other values that have no word of their own, each with a hover that says what Remastered does with it: memory.game.frame (frames since the game began), memory.map.width and memory.map.height (in tiles), and memory.vision.countdown (set to 1, the next frame puts every tile back in fog, and each unit reveals what it sees again).

program(() => {
  if (memory.game.frame % 24 == 0) print(`${memory.map.width} by ${memory.map.height}`);
  memory.vision.countdown = 1;
});

memory(address, comparison, value) and setMemory(address, modifier, value) reach any value of the game's memory by its address (EUD), in a trigger or a program.