Scoop of Oatmeal, July '25

StellarMaps without Stellaris progress

StellarMaps

It's been a relatively slow month for StellarMaps. I continue to make progress on the Stellaris-independent data format. Most notably, unions mode (federations and subjects) is now working. In the new data format, unions are represented as factions that have other factions as members, which can be deeply nested. Although data imported from Stellaris won't make use of that, in the future when map editing is supported, it could be used for complex feudal structures.

Stellaris map in unions mode

Even more behind-the-scenes, I've pulled in the library Effect to help with data processing. This provides robust type checking and error handling. Currently, I'm mostly using it to define the Snapshot data structures with validators and helper methods. For example, here's the Faction class:

export class Faction extends Schema.Class<Faction>('Faction')({
id: FactionId,
name: Schema.String,
flag: Flag,
capitalId: Schema.NullOr(SystemObjectId),
}) {
#ctxRef: WeakRef<Snapshot> | null = null;
set ctx(ctx: Snapshot) {
this.#ctxRef = new WeakRef(ctx);
}
get ctx(): Snapshot {
const ctx = this.#ctxRef?.deref();
if (ctx == null) throw new Error('Context not set');
return ctx;
}
get capital(): SystemObject | null {
if (this.capitalId != null) {
return this.ctx.systemObjects[this.capitalId] ?? null;
} else {
return null;
}
}
get sectors(): Sector[] {
return this.ctx.getSectorsWithFaction(this);
}
get systems(): System[] {
return this.ctx.getSystemsWithFaction(this);
}
get members(): Membership[] {
return this.ctx.getMembershipsWithOrganization(this);
}
get organizations(): Membership[] {
return this.ctx.getMembershipsWithMember(this);
}
}

The methods simplify a lot of later data processing (previously, these were all plain objects with no methods). In the future I'll also use Effect for the data processing pipelines, and for automatic data migration between StellarMaps versions.

Beyond Development

Where's all my time gone otherwise this month?