From per-aspera-modding
Per Aspera SDK Climate system. Use when controlling atmosphere, temperature or gas pressures, using ClimateController, AtmosphereGrid, TerraformingEffectsController, SetTemperature, SetGasPressure, AddTerraformingEffect, or reading regional climate data (poles, equator). Covers bidirectional Harmony climate control and resource-based atmosphere mode.
How this skill is triggered — by the user, by Claude, or both
Slash command
/per-aspera-modding:per-aspera-climate-sdkThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
```
PerAspera.GameAPI.Climate
├── ClimateController — Contrôleur principal (instancier, pas statique)
│ ├── ClimateSimulator — Simulation sous-jacente
│ ├── AtmosphereGrid — Grille atmosphérique cellulaire
│ ├── TerraformingEffectsController — Effets dynamiques (heatwaves, boosts)
│ └── ResourceBasedClimate — Mode basé sur les ressources du jeu
├── Domain/Cell/AtmosphereCell — Cellule atmosphérique individuelle
├── Domain/Gas/AtmosphericGas — Définition de gaz
└── Configuration/ClimateConfig — Paramètres de simulation
Note : L'API climate est basée sur instances (
ClimateController), PAS des classes statiques. LesAtmosphereSimulator,TemperatureCalculatoretc. sont des détails internes.
using PerAspera.GameAPI.Climate;
using PerAspera.GameAPI.Events.Integration;
using PerAspera.GameAPI.Wrappers;
[BepInPlugin("com.mymod.climate", "Climate Mod", "1.0.0")]
public class ClimateModPlugin : BasePlugin
{
private ClimateController? _climate;
public override void Load()
{
LogAspera.Initialize(Log, "ClimateMod");
EnhancedEventBus.SubscribeToGameFullyLoaded(OnGameFullyLoaded);
}
private void OnGameFullyLoaded(GameFullyLoadedEvent e)
{
var planet = PlanetWrapper.GetCurrent();
if (planet == null) return;
_climate = new ClimateController(); // config par défaut
_climate.EnableClimateControl(planet); // active les patches Harmony
LogAspera.Info($"Climate active — cells: {_climate.GetActiveCellsCount()}");
}
}
// Modifier la température directement (en Kelvin)
_climate.SetTemperature(283.15f); // ~10°C
// Modifier la pression d'un gaz (en kPa)
_climate.SetGasPressure("CO2", 0.5f);
_climate.SetGasPressure("O2", 0.02f);
_climate.SetGasPressure("N2", 1.0f);
// Boost de terraformation temporaire
_climate.BoostTerraforming(boostFactor: 2.0f, durationMinutes: 30);
string status = _climate.GetStatus(); // état court
string detail = _climate.GetDetailedClimateStatus(); // avec régions
// Données régionales
ClimateRegionData regional = _climate.GetRegionalClimateData();
GlobalClimateAverages global = _climate.GetGlobalClimateAverages();
Pole northPole = _climate.GetPolarRegionData(isNorthern: true);
Pole southPole = _climate.GetPolarRegionData(isNorthern: false);
EquatorialRegion equator = _climate.GetEquatorialRegionData();
// Températures rapides (avec fallback)
float north = _climate.GetNorthPoleTemperature(); // Kelvin
float south = _climate.GetSouthPoleTemperature();
float equat = _climate.GetEquatorTemperature();
// Ajouter un effet temporaire
_climate.AddTerraformingEffect("heatwave", temperatureChange: +5f, source: "Twitch");
_climate.AddTerraformingEffect("cold_snap", temperatureChange: -10f, source: "Gameplay");
// Les pressions atmosphériques sont calculées depuis les stocks de ressources du jeu
_climate.EnableResourceBasedMode();
float co2Pressure = _climate.GetAtmosphericPressure("co2Pressure");
float o2Pressure = _climate.GetAtmosphericPressure("o2Pressure");
_climate.DisableResourceBasedMode(); // retour au mode simulation
// Activer/désactiver des cellules individuelles
_climate.ActivateAtmosphereCell(latIndex: 0, lonIndex: 0); // pôle nord
_climate.DeactivateAtmosphereCell(latIndex: 5, lonIndex: 5);
// Accès direct à la grille
AtmosphereGrid? grid = _climate.AtmosphereGrid;
int activeCells = _climate.GetActiveCellsCount();
_climate.RegisterAtmosphericGas("CH4", "Méthane", "mbar");
_climate.RegisterAtmosphericGas("Ar", "Argon", "mbar");
// Appeler depuis un MonoBehaviour Update() ou coroutine
[RegisterInIl2Cpp]
public class ClimateUpdater : MonoBehaviour
{
public ClimateUpdater(IntPtr ptr) : base(ptr) { }
private ClimateController? _climate;
public void Init(ClimateController c) => _climate = c;
private void Update() => _climate?.UpdateClimate(Time.deltaTime);
}
// Dans Load() après EnableClimateControl :
var updater = AddComponent<ClimateUpdater>();
updater.Init(_climate);
// Créer une config équilibrée (défaut)
var config = ClimateConfig.CreateGameBalanced();
// Ou instancier directement avec paramètres custom
// (voir SDK\PerAspera.GameAPI\Climate\Configuration\ClimateConfig.cs)
var controller = new ClimateController(config);
public override void Unload()
{
_climate?.DisableClimateControl(); // retire les patches Harmony
}
| Propriété | Valeur | Notes |
|---|---|---|
| Température de base | ~210 K (-63°C) | Mars non terraformé |
| Pression atmosphérique | 0.636 kPa | ~0.6% de la Terre |
| CO₂ | 95.32% | Gaz à effet de serre dominant |
| Intensité solaire | ~590 W/m² | Orbite Mars |
| Cible habitabilité | ~293 K (20°C) | Seuil minimal |
| Pôle nord défaut | 200 K | Valeur fallback |
| Pôle sud défaut | 195 K | Légèrement plus froid |
| Équateur défaut | 250 K | Plus chaud |
npx claudepluginhub perasperamods/per-aspera-skills --plugin per-aspera-moddingProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.