galaxy-language-fundamentals

Explain Galaxy language fundamentals for StarCraft II maps and mods.

3|2|Updated Mar 3, 2026
One-click install
npx skills add https://github.com/ShadowDragonSC2/Base.SC2Data --skill galaxy-language-fundamentals-shadowdragonsc2
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: galaxy-language-fundamentals
Source: https://github.com/ShadowDragonSC2/Base.SC2Data/tree/main/.koda/skills/galaxy-language-fundamentals
Command: npx skills add https://github.com/ShadowDragonSC2/Base.SC2Data --skill galaxy-language-fundamentals-shadowdragonsc2

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Galaxy language fundamentals are essential for StarCraft II map and mod developers who need a solid, consistent understanding of the scripting language, its type system, and project structure.

Core Features & Use Cases

  • Clear explanation of Galaxy syntax, primitive types, and engine handle types (including funcref/structref/arrayref) to remove ambiguity.
  • Guidance on file organization, include/file structure, and the MapScript bootstrap sequence used by SC2 editors.
  • Real-world examples showing how to scaffold maps, organize scripts, and reference generated files like MapScript.galaxy and LibHASH.galaxy.

Quick Start

Open MapScript.galaxy to review the initialization flow and start organizing your Galaxy scripts under the recommended include hierarchy.

Frequently Asked Questions about galaxy-language-fundamentals

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure includes in MapScript.galaxy for StarCraft II?

To use funcref and structref types in Galaxy scripts, you apply them to remove ambiguity around engine handle types, allowing you to safely manage references to functions and structures within your StarCraft II map code.

How does the MapScript bootstrap sequence work in Galaxy?

To organize generated library files like LibHASH.galaxy, you reference them within your MapScript.galaxy include hierarchy, ensuring that your SC2 map scripts correctly load and initialize required library functions.

Can I use Galaxy script types for custom structs in StarCraft II mods?

Yes, you can use Galaxy script types for custom structs in StarCraft II mods. The Galaxy language features a type system that supports struct definitions and engine handle types, enabling complex data organization for your modding projects.

What is the best way to organize Galaxy scripts for an SC2 map?

The best way to organize Galaxy scripts for an SC2 map is to establish a consistent include hierarchy starting from MapScript.galaxy, separating your custom logic from generated library files to maintain a clean project structure.

Does Galaxy language support arrayref and structref types?

Yes, Galaxy language supports arrayref and structref types. These engine handle types are part of the Galaxy type system, providing mechanisms to manage references to arrays and structures within your StarCraft II scripts.

Why does my Galaxy script fail when including LibHASH.galaxy?

Your Galaxy script may fail when including LibHASH.galaxy if the include hierarchy in MapScript.galaxy is incorrect. Galaxy requires specific ordering and bootstrap sequences to properly load generated library files without circular dependencies.