Skip to content

Instantly share code, notes, and snippets.

// design-stats-panel - extends arcon-ui's design-mode unit info panel
// with per-system energy breakdown, weapon-burst totals, cloak timing, and
// a 5-segment power bar in place of the stock 3-segment one.
//
// instead of overlaying a full panel, this mod plugs into arcon-ui's
// named unit-info slots:
// stats_extra -> total weapon burst cell
// power_bar -> 5-segment (replaces default)
// energy -> detailed per-system rows (replaces default 4 cells)
//
@vaakx-dev
vaakx-dev / arcon-sandbox.js
Last active June 17, 2026 05:50
proof of concept
// arcon-sandbox - SES-based isolation for arcon mods. opt-in extension parallel
// to arcon-ui. loading this file:
// 1. fetches the SES shim from a CDN (cached after first load)
// 2. snapshots non-standard prototype extensions istrolid relies on
// (e.g. Array.prototype.last, .first, etc.) BEFORE lockdown
// 3. calls repairIntrinsics (strips them as "unpermitted")
// 4. restores them so the game keeps working
// 5. calls hardenIntrinsics (freezes everything, including the restored
// extensions, so a sandboxed mod can't tamper with Array.prototype.last)
// 6. installs arcon.sandbox.load(name, source) which evaluates mod source
// arcon-ui - ports of the game's render functions, with extension registries.
// loaded on top of arcon.js. once installed, mods extend the game UI through
// real registries instead of monkey-patching closure-private helpers.
//
// surfaces ported in this module:
// - player_chip (was: battleroom.js ui.playerChip)
// - chat (was: chat.js chat.draw + chat.room)
// - top_bar (was: buildbar.js buildBar.draw top strip)
// - build_bar (was: buildbar.js buildBar.draw bottom strip)
// - action_bar (was: buildbar.js #action-bar)
// arcon - modding api for istrolid client mods
// sub-namespaces: hud, ui, chat, net, storage, util
// each is independent and lazily installs its own game-side hooks
//
// versioning: semver-style { major, minor, patch }
// - major bump: breaking changes (mods built against older major must update)
// - minor bump: additive features (older mods keep working, newer mods need >= this minor)
// - patch bump: bugfixes only, fully compatible both directions
// mods declare their requirement via arcon.require({ major, minor }).
// if arcon isn't compatible, require returns false and logs an error;
@vaakx-dev
vaakx-dev / flip-ship.js
Last active May 7, 2026 09:33
Adds vertical and horizontal flip buttons to the design mode toolbar. Mirrors all part positions across the X or Y axis with one click.
(function () {
if (!window.arcon) {
console.error("flip_buttons: arcon not found, load arcon.js first");
return;
}
if (!arcon.require({ major: 1, minor: 2 })) return;
if (!arcon.ui_module || !arcon.ui_module.design_toolbar) {
console.error("flip_buttons: arcon-ui not loaded");
return;
}
@vaakx-dev
vaakx-dev / rhythm-aoe-indicators.js
Last active May 12, 2026 11:48
Replaces the default artillery and phase bomb AOE indicators with a rhythm-game style impact ring that grows toward the target on arrival. Includes a toggleable button on the action bar to switch between team and player colors.
// arcon-manifest:
// name: rhythm-aoe-indicators
// permissions: [game, draw, util, hud, ui.action_bar]
(function () {
if (!window.arcon) {
console.error("aoe_indicators: arcon not found, load arcon.js first");
return;
}
if (!arcon.require({ major: 1, minor: 4 })) return;
@vaakx-dev
vaakx-dev / minimap.js
Created December 24, 2025 00:03
Renders tactical minimap showing ships, spawns, and command points with configurable sizing modes
(function () {
eval(onecup['import']());
// Minimap configuration
var minimapConfig = {
mode: "radius", // "radius", "cost", or "dps"
mapScale: 1.5
};
function colorArrayToRGB(array) {
@vaakx-dev
vaakx-dev / timer_ecotracker.js
Created December 24, 2025 00:02
Shows match timer, team stats (eco/money/value)
(function () {
eval(onecup["import"]());
environment = {
hud_size: 1.0,
hud_width: 320,
hud_opacity: 0.4,
hud_padding: 12,
row_padding_vertical: 4,
row_padding_horizontal: 8,
@vaakx-dev
vaakx-dev / trade_tracker.js
Created December 24, 2025 00:00
Tracks combat trades between teams and displays efficiency metrics with fade-out animations
(function () {
eval(onecup["import"]());
// Configuration
tradeTracker = {
enabled: true,
// Detection settings
updateInterval: 8,
minTradeValue: 2,
@vaakx-dev
vaakx-dev / HUDManager.js
Last active December 23, 2025 23:59
Core manager that hooks window.body and orchestrates all HUD mods with priority-based rendering
(function () {
eval(onecup["import"]());
if (!window.HUDManager) {
window.HUDManager = {
mods: [],
bodyHooked: false,
register: function(name, func, priority) {
this.mods.push({