Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

ss14-virtual-controller-api

БесплатноБез исполняемых скриптовНе проверен

Gives a practical catalog of APIs around the VirtualController in Space Station 14: selection of hooks and order, physics mutators, relay/movement/climb…

makura-gamesот makura-games★ 74 звезды на GitHub

Об этом скилле

VirtualController: API Practice

Use this skill when you need to quickly choose the correct method and avoid getting physics/prediction regression 😎 Freshness reference: git log/blame with cutoff 2024-02-20.

What to download

  1. references/fresh-pattern-catalog.md - register of methods with freshness marking (Use / Limited).
  2. references/rejected-snippets.md - risky places and misuse practices.
  3. references/docs-context.md - how to read docs without conflicting with the code.

Quick API selection

  1. You need a controller for the physics step: inherit from VirtualController and implement UpdateBeforeSolve/UpdateAfterSolve.
  2. You need order between controllers: add UpdatesBefore/UpdatesAfter to base.Initialize().
  3. You need control over velocity/impulse: use SetLinearVelocity, ApplyLinearImpulse, SetBodyStatus, damping setters.
  4. You need an entity management relay: use SetRelay/RemoveRelay.
  5. You need manual mobility mathematics: Friction, Accelerate, GetWishDir/SetWishDir.
  6. You need a container/movement link through “climbing out”: ForciblySetClimbing.
  7. We need a safe climb pipeline: CanVault -> TryClimb.
  8. We need predicted control on the client: UpdateIsPredictedEvent handlers.

API by group

1) VirtualController contract

  1. Initialize() - registers before/after solve hooks and metrics.
  2. UpdateBeforeSolve(bool prediction, float frameTime) - pre-solver logic.
  3. UpdateAfterSolve(bool prediction, float frameTime) - post-solver logic.
  4. BeforeMonitor / AfterMonitor - measurement of the cost of a specific controller.

2) Ordering API

  1. UpdatesBefore.Add(typeof(...)) - this controller goes before the target.
  2. UpdatesAfter.Add(typeof(...)) - this controller comes later than the target.
  3. Both lists must be configured to base.Initialize().

3) Physics mutators

  1. SetLinearVelocity(...) - safe setting of linear speed.
  2. ApplyLinearImpulse(...) - impulse for dynamics/pulling.
  3. SetBodyStatus(..., BodyStatus.InAir/OnGround) — body mode for special mechanics.
  4. SetLinearDamping(...) / SetAngularDamping(...) — runtime damping.
  5. SetBodyType(...) - conscious change of body mode.

4) Relay API

  1. SetRelay(uid, relayEntity) — create/update a relay link.
  2. RemoveRelay(uid) — remove the relay and bring the prediction state to a consistent state.
  3. Client prediction hooks (UpdateIsPredictedEvent) must take into account the relay chain.

5) Movement helper API

  1. GetWishDir(...) / SetWishDir(...) - control of the desired direction.
  2. Friction(...) (vector/scalar) - controlled speed decay.
  3. Accelerate(...) - limited acceleration to the wish direction.
  4. ResetCamera(...) / GetParentGridAngle(...) - correct operation of the angle/orientation.

6) Climb API

  1. CanVault(...) — climb/vault pre-validation.
  2. TryClimb(...) — launching the climb procedure with do-after and checks.
  3. ForciblySetClimbing(...) - forced safe exit to the surface.

7) Conveyor and Pull practical points

  1. Conveyor: CanRun(...), UpdateBeforeSolve(...), combination of conveyor vector with wishDir.
  2. Pull: impulse towards the target + settle shutdown + reverse impulse in special conditions.

Unusual use cases

  1. Relay piloting: mechs, station-eye, manned clothing, proxy-control objects in special modes.
  2. Container-eject pipeline: after extracting the entity, use ForciblySetClimbing to avoid sticking.
  3. Client prediction gating: for relay target and pullable via UpdateIsPredictedEvent.

Patterns

  1. Set up the controller order (UpdatesBefore/After) to base.Initialize().
  2. In UpdateBeforeSolve filter unsuitable bodies (prediction, body.Predict, static/sleeping cases).
  3. For KinematicController use helper friction + explicit setting of speeds.
  4. For relay scripts, use only SetRelay/RemoveRelay.
  5. For gravity/space pull scenarios, take into account the pair impulse if required by the mechanics.
  6. For climb-flow, always do CanVault before TryClimb.
  7. For ejection from a container/cryo/scanner, use ForciblySetClimbing as a post-action step.
  8. For conveyor logic, calculate the direction separately, apply the result after the parallel part.
  9. For client prediction, adjust IsPredicted/BlockPrediction through the appropriate events.
  10. Use SetBodyStatus only in clearly justified special mechanics.
  11. For APIs that are called frequently, cache queries and avoid unnecessary allocations.
  12. Check the actual freshness of the example before reusing it.

Anti-patterns

  1. Add order dependencies after base.Initialize().
  2. Pull SetBodyStatus(InAir) as a universal “patch”.
  3. Change relay manually through direct RemComp/EnsureComp without lifecycle methods.
  4. In the predicted controller, use nondeterministic logic without protections.
  5. Copy TODO-heavy pieces from pull/contact/solver as “best practice”.
  6. Rely on the empty cl
Полный SKILL.md на GitHub

Установить ss14-virtual-controller-api в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/docs-context.mdreferences/fresh-pattern-catalog.mdreferences/rejected-snippets.md

FAQ

Что делает скилл ss14-virtual-controller-api?

Gives a practical catalog of APIs around the VirtualController in Space Station 14: selection of hooks and order, physics mutators, relay/movement/climb scripts, prediction constraints and safe application patterns.

Как установить скилл ss14-virtual-controller-api?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл ss14-virtual-controller-api запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить ss14-virtual-controller-api с