LegacyShell WikiLegacyShell Wiki
Back to LegacyShell
Home
Wiki
Plugins
Docs
Back to LegacyShell
Home
Wiki
Plugins
Docs
  • Plugins

    • Plugin Docs

      • Default

        • Crackshot
        • Auto Restart Notifications
        • Auto Shop Notifications
        • Block Viewer
        • Burnt Block Sets
        • Christmas Event
        • Classic Skybox
        • DeadInternet
        • Debug F3
        • Discord Playtest
        • dynamicmapblocks
        • FancyGraphics
        • Francium
        • Health Pack Item
        • Item ToolTips
        • LagCompensation
        • LegacyAchievements
        • LegacyAdmin
        • LegacyAnalytics
        • LegacyLightmaps
        • LegacyProfiles
        • LegacyReplay
        • LegacySettings
        • LegacyShellCore
        • LegacyThemes
        • LegacyWeather
        • Map Editor Saving
        • Modern Map Blocks
        • Modern Shell Guns
        • Modern Shell Hats
        • Modern Shell Stamps
        • Minerva
        • ParkourMode
        • Player Count Notifications
        • TimeMachine
        • Vaporwave Map Blocks
        • WhatsAppTheme
        • Wiki Only Mode
        • Zaxonius Custom Guns
        • ZombiesMode
      • Examples

        • Modern Shell Maps
    • List of plugins

Canonical source: plugins_default/classicskybox/README.md - edit that file, not this page (this page is built live from it, nothing here is a tracked copy).

Classic Skybox

Readds the skyboxes from Shell Shockers' earliest versions, built in code from the original game's own source: classic (0.1.0 - sky, clouds, dark ocean and hazy mountains) and classic-alpha (0.0.4 - the same sky without the mountains, over a bright blue ocean that fades pale toward the horizon). Client-only in practice; the server side just merges its two models.

Using it

A map picks one by setting its skybox to classic or classic-alpha (see Maps) - both names are added to the map editor's skybox dropdown. TimeMachine's "Map Skybox" setting can also put either one on every map for that player, by setting ClassicSkyboxPlugin.override.

What it actually does

  • Ships sky.babylon and mountains.babylon (models/), merged into the build like any content pack (prepareBabylonBefore/prepareBabylon - see Content Packs), and adds both to the game scene's model list on game:afterBullshit.
  • Splices Babylon's old SkyMaterial, WaterMaterial and CloudProceduralTexture (src/babylonExtensions.js, from the 2017 babylon.custom.js - see src/references.txt) into the browser bundle at after, since the bundled Babylon doesn't have them.
  • On game:onMapComplete, if the map's skybox (or the override) is one of its variants, it hides the map's cubemap skybox, raises the camera's far plane to 2000 and builds the scene: a SkyMaterial box, a procedural cloud dome on the sky mesh, the ocean plane and, for classic, three rings of mountains drawn with the map shader so the map's fog hazes them the way it did when they were part of the map. Everything it made is disposed on the next map load.
  • On client:doReplacements, adds every variant name to the editor's LEGACYSHELLSKYBOXES list.

test.js is the original 0.1.0 code this was rebuilt from, kept for reference - it isn't loaded.

Adding a variant

Add a function to ClassicSkyboxPlugin.variants in shared.js, keyed by the skybox name. It gets (gameScene, centreX, centreZ), should pass every mesh it makes through this.add(mesh) so it's cleaned up on the next map, and the name shows up in the editor automatically.

Prev
Christmas Event
Next
DeadInternet