mcpField
T
terrain-integration

terrain-integration

github.com/bbeierle12Development963 installsUpdated today
Repository

About terrain-integration

A skill for integrating terrain analysis and modification into building systems. It provides slope checks, foundation placement modes, terrain shaping, and support-pillar generation, with an integration path to `structural-physics`.

Key features

  1. 01Analyze slopes and buildability
  2. 02Place foundations in Valheim, Rust, and ARK modes
  3. 03Flatten, raise, or lower terrain
  4. 04Generate pillars for uneven slopes
  5. 05Connect grounded foundations to stability calculations

Use cases

  1. 01Check whether a terrain location can support a build
  2. 02Place foundations using game-specific terrain rules
  3. 03Adjust terrain around a building site
  4. 04Add support pillars on uneven ground

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/bbeierle12/skill-mcp-claude --skill terrain-integration

After installing, type/terrain-integrationin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

_meta.json
references/
terrain-integration-advanced.md
scripts/
foundation-placer.js
pillar-generator.js
terrain-analyzer.js
terrain-modifier.js

Details

From the project README

Terrain Integration

Foundation placement, slope handling, and terrain modification for building systems.

Quick Start

import { TerrainAnalyzer } from './scripts/terrain-analyzer.js';
import { FoundationPlacer } from './scripts/foundation-placer.js';

// Analyze terrain at build location
const analyzer = new TerrainAnalyzer(terrainMesh);
const slopeData = analyzer.analyzeSlope(position, { radius: 4 });
// slopeData: { angle: 15, normal: Vector3, canBuild: true }

// Place foundation with auto-leveling
const placer = new FoundationPlacer({ 
  mode: 'valheim', // or 'rust', 'ark'
  maxSlope: 30,
  autoLevel: true 
});
const result = placer.place(foundationPiece, position, analyzer);
// result: { valid: true, height: 2.3, pillarsNeeded: 2 }

Reference

See references/terrain-integration-advanced.md for:

  • Slope analysis algorithms and thresholds
  • Foundation anchoring patterns (Valheim ground contact rule)
  • Auto-leveling strategies
  • Terrain modification networking
  • Pillar generation for uneven terrain

Scripts

  • scripts/terrain-analyzer.js - Slope detection, buildability checks, terrain sampling
  • scripts/foundation-placer.js - Foundation placement with Valheim/Rust/ARK modes
  • scripts/terrain-modifier.js - Flatten, raise, lower terrain operations
  • scripts/pillar-generator.js - Auto-generate support pillars for slopes

Foundation Modes

  • Valheim: Ground contact = 100% stability, foundations must touch terrain
  • Rust: Foundations snap to grid, terrain ignored after placement
  • ARK: Flexible placement with auto-pillars, moderate slope tolerance

Integration

Works with structural-physics for stability calculations. Grounded foundations feed into the support graph as root nodes with maximum stability.

// Integration example
const grounded = placer.place(foundation, pos, analyzer);
if (grounded.valid) {
  foundation.isGrounded = true;
  foundation.stability = 1.0; // Feed to structural-physics
  validator.addPiece(foundation);
}

Comments

Markdown supported