BingBong Airlines FLIGHT TFA · TRUE FINAL ASCENT
PEAK

True Final Ascent Mod

For moddersTFA Biome API
APIv3

Add your biome to FINAL ASCENT

With the TFA biome API your mod can add its own biome to the FINAL ASCENT island. In the classic climb it replaces one stage - say, the Tropics; in the Builder it is a block that players stack into their own mountain. Players pick it in the map setup, in the list at the biome's heading, or add it as a block in the Builder. The stage then carries your biome's name. Your biome can also tell TFA what its stage needs: which weather of its frame to drop, how fast the fog closes in, which of TFA's weathers roll there, and how much taller or lower the stage is. As the first block of a Builder mountain it can also dress the start plateau the players wake up on.

  • Frames your biome can fill: Tropics, Roots, Alpine, Mesa - the PEAK biome whose length, height and campfires your stage uses. In the classic climb your biome replaces that stage; in the Builder players put it anywhere in their own mountain, also more than once (up to MaxPerRun), in one of its frames.
  • Never on the daily map - its times have to stay comparable.
  • Everyone in the lobby needs your mod in the same version. Otherwise the host can't start with your biome.
  • Normal PEAK runs stay yours: TFA only calls your mod when a FINAL ASCENT island is built.

Quick start

1. Reference True Final Ascent

Install True Final Ascent with r2modman and reference its DLL from your profile. Don't ship it in your package.

<Reference Include="TrueFinalAscent">
  <HintPath>...\BepInEx\plugins\CptPICHU-TrueFinalAscent\TrueFinalAscent.dll</HintPath>
  <Private>false</Private>
</Reference>
<Reference Include="Assembly-CSharp">
  <HintPath>...\steamapps\common\PEAK\PEAK_Data\Managed\Assembly-CSharp.dll</HintPath>
  <Private>false</Private>
</Reference>

The second reference is PEAK's own Assembly-CSharp.dll (plus the UnityEngine modules you use, all in PEAK_Data/Managed). TfaBiomeSlot exposes PEAK types such as Campfire (slot.EndCampfire) and DayNightProfile (slot.Sky); without it the compiler stops with CS0012 as soon as you touch them.

2. Make it an optional dependency

Your mod should still run without TFA. Declare a soft dependency and only touch TFA's types when TFA 3.0.0 or newer is there - in a separate class, so .NET never loads them otherwise. TFA's API types first exist in 3.0.0; on an older TFA they are missing, and the first touch throws.

using System;
using BepInEx;
using BepInEx.Bootstrap;

[BepInPlugin("you.crystalcaves", "Crystal Caves", "1.0.0")]
[BepInDependency("com.CptPICHU.peak.truefinalascent", BepInDependency.DependencyFlags.SoftDependency)]
public class CrystalCavesPlugin : BaseUnityPlugin
{
    private void Awake()
    {
        // Touch TFA's types only when TFA 3.0.0 or newer is installed: on an older one they are missing and the first touch
        // throws. Without TFA your mod keeps working as before.
        if (Chainloader.PluginInfos.TryGetValue("com.CptPICHU.peak.truefinalascent", out PluginInfo tfa)
            && tfa.Metadata.Version >= new Version(2, 10, 0))
        {
            TfaBridge.Register();
        }
    }
}

Check TfaBiomes.ApiVersion (3 in TFA 3.0.0) before you use anything newer than your minimum: members of a higher API exist only when it says so. Set them in a separate method marked [MethodImpl(MethodImplOptions.NoInlining)] - .NET resolves a method's members when it first runs, so one unknown member in your registration method would fail the whole registration (MissingMethodException). This page is API 2, except the chapter Your start plateau, which is API 3.

3. Register your biome

Once, in Awake. Id is short and unique, Version must match on every player, Names needs at least English. The API 2 fields at the end are optional.

using System.Collections;
using System.Collections.Generic;
using TrueFinalAscent.Api;
using UnityEngine;

internal static class TfaBridge
{
    public static void Register()
    {
        TfaBiomes.Register(new TfaBiome
        {
            Id = "crystalcaves",
            Version = "1.0.0",                      // raise it whenever your generation changes
            Replaces = new[] { "Tropics", "Roots" },
            Names = new Dictionary<string, string>
            {
                ["en"] = "Crystal Caves",
                ["de"] = "Kristallhöhlen",
                ["cn"] = "水晶洞穴",
            },
            Ink = new Color(0.55f, 0.85f, 1f),
            Build = Build,
            PlayersHere = OnPlayersHere,

            // API 2 - all optional, each one is explained below
            ApiLevel = 2,                           // may also stand first in the climb (Builder)
            DropFromFrame = TfaFrameParts.Weather,  // underground: no rain, no gusts
            FogPace = 0.8f,                         // a twistier way up - a little more time
            Weathers = new Dictionary<string, int> { ["*"] = 0, ["quake"] = 2, ["dark"] = 1, ["poison"] = 1 },
        });
    }

    // Build and OnPlayersHere: see below.
}

4. Build it

TFA calls Build on every player while the island loads. This example lays a rough ramp of rock from the start campfire up to the end campfire:

private static IEnumerator Build(TfaBiomeSlot slot)
{
    // Root sits at the start campfire, +Z points towards the end campfire, +Y is up.
    Transform root = slot.Root.transform;
    Vector3 goal = root.InverseTransformPoint(slot.EndCampfire.transform.position);

    // Borrow a material from PEAK's terrain of the stage you replace.
    Material rock = slot.VanillaTerrain.GetComponentInChildren<MeshRenderer>(true).sharedMaterial;
    int ground = LayerMask.NameToLayer("Terrain");

    const int steps = 60;
    for (int i = 0; i <= steps; i++)
    {
        float t = i / (float)steps;
        GameObject step = GameObject.CreatePrimitive(PrimitiveType.Cube);
        step.layer = ground;
        step.GetComponent<MeshRenderer>().sharedMaterial = rock;
        step.transform.SetParent(root, false);
        step.transform.localPosition = Vector3.Lerp(Vector3.zero, goal, t)
            + Vector3.right * Random.Range(-4f, 4f);   // seeded by TFA: the same on every player
        step.transform.localScale = new Vector3(10f, 1f, 9f);

        if (i % 15 == 0)
        {
            yield return null;   // spread the work, the loading screen stays smooth
        }
    }
}

Where you build

Your Build gets a TfaBiomeSlot:

  • Root stands at the start campfire and faces the end campfire (+Z forward, +Y up). Build everything under it - TFA shows and hides it together with the stage.
  • StartCampfire is where players come from, EndCampfire is where they have to get to. Both stay as they are. Your way up must reach the end campfire. In the Builder StartCampfire can be null (see below).
  • StartPoint is where players enter your stage (the start campfire's fire, where there is one), EndPoint the fire of the end campfire, where your way up must arrive. Build from one to the other and your biome works everywhere.
  • EndCampfireGroup is the whole campfire with its rock. Things you put under it appear and disappear with the campfire - good for a gate or a shrine right at the goal.
  • VanillaTerrain is PEAK's terrain of the stage. TFA hides it after your build. Read it for templates (rocks, luggage, materials), never change it.

Same world for everyone

There is no download of your biome: every player builds it. So the build has to give exactly the same result everywhere.

  • Randomness: inside Build, TFA seeds UnityEngine.Random from slot.Seed - use it freely. Never time, frame counts or randomness from other places.
  • Raycasts: physics can round differently from CPU to CPU. Measure the world only in Measure - it runs on the host, and every player gets its text in slot.Measured.
  • Networking: PhotonViews under Root get their view ids from TFA. Leave them at 0.
  • Version: raise Version whenever your generation changes. Players with another version can't start with your biome together.
Measure = slot =>
{
    // Host only. Raycasts can differ by a hair between CPUs - TFA ships this text to every player.
    Vector3 above = slot.EndCampfire.transform.position + Vector3.up * 3f;
    Physics.Raycast(above, Vector3.down, out RaycastHit hit, 20f);
    return hit.point.y.ToString(System.Globalization.CultureInfo.InvariantCulture);
},

// ...and in Build, on every player - null if no host value arrived:
float endGround = slot.Measured != null
    ? float.Parse(slot.Measured, System.Globalization.CultureInfo.InvariantCulture)
    : slot.EndCampfire.transform.position.y;

Your biome in the Builder

In the Builder players stack their own mountain from biome blocks. Your biome is a block too: it is built in one of its Replaces frames (the host picks which one per block, the first is the default), wherever the player puts it - also more than once, up to MaxPerRun.

  • slot.InBuilder is true there. slot.Position is the place in the chain, the frame may be a copy, and Previous and Next can be any biome, mod: plus an id, "" (first) or Peak (last).
  • First in the climb, or right after the Kiln, the Citadel or the Nadir, no campfire leads into your stage: StartCampfire is null. Start at slot.StartPoint instead. TFA only puts your biome there if you set ApiLevel to 2 or higher. First in the climb the players wake up on a start plateau in front of your ground - Your start plateau shows how to dress it.
  • slot.StartPoint and slot.EndPoint are where players enter and where your way up must arrive (the end campfire's fire). They are set in the classic FINAL ASCENT too - build from one to the other and your biome works everywhere.
  • Last block: when Next is Peak, TFA takes fire, luggage and statue off your end campfire after your build. The rock stays, and the bridge to the PEAK starts right behind it (+Z) - keep that side free.
  • InBuilder = false keeps your biome out of the Builder, for builds that only work at their classic place.
  • Fits(frame, previous, next) is optional: return false where your biome can't stand. It is asked while the host edits the chain, so it must be quick and answer the same on every player. If it throws, TFA treats it as true.
biome.ApiLevel = 2;
biome.Fits = (frame, previous, next) => previous != "Kiln";   // our entrance needs solid ground, not a lava rim

Your start plateau (API 3)

When a Builder mountain doesn't begin at the Shore, the players wake up after the plane crash on a start plateau: a wide, flat piece of ground that TFA lays in front of the first biome, with the wreck, the spawn spots, two luggage cases, a path to the way up and a fog wall behind. If the first block is yours, the plateau wears your biome. It already does without any work from you (see Automatic dressing); with API 3 you describe the look yourself, as data in Start and, for set pieces, as code in DressStart.

  • Builder, first block only. The classic FINAL ASCENT, the daily map and a Shore start get no plateau; API 3 changes nothing there.
  • Needs ApiLevel 2 or 3. Both place your biome first; set 3 once your code uses Start or DressStart, so the registration line shows it. Start with ApiLevel 1 is never used, and TFA says so in the log.
  • Same world for everyone applies. Every player builds the plateau from the same numbers and the same seed. The host's fingerprint of it travels with the island, and every guest compares its own (see Testing).

What stays TFA's

Whatever you declare, these parts are TFA's. Your layers and your DressStart keep out of them. The numbers point into the drawing under Zones.

7 Wreck and bedThe crashed plane lies on its bed at slot.Anchor. In the bed (30 m around the wreck) only ground cover grows; cover keeps 6 m off the hull, solid copies 14 m.
8 Spawn spotsA fan of 19 extra spots 8 to 20 m in front of the wreck (16 in Mega runs), besides the plane's own four. Everything within 3 m of a possible spot stays free.
TitleThe biome title shows 24 m in front of the wreck.
Kit luggageTwo luggage cases beside the wreck, with loot from the pool of your frame, and the rock stack of the climbing practice with a case on top.
9 PathA shallow, slightly winding trough about 8 m wide leads from the wreck to your way up (slot.PathX). The trough stays free, nothing taller than 1.5 m stands within 12 m of its axis, and up to 18 m only low things.
EdgesTFA shapes the seam between the plateau and your ground itself (rim, edge noise). Your ground stays as you built it.
BehindThe plateau ends at its back edge in TFA's fog wall.
10 Landmark slotTFA sets your landmark in its own slot, 35 to 50 m beside the path shortly before the front, and the small grove opposite (60 to 90 m).

Standing first: your ground

TFA lays the plateau in front of the first row of your ground. To find that row, the host looks from slot.StartPoint for walkable ground on layer Terrain under your Root:

  • from 40 m behind to 160 m ahead of StartPoint, and between 30 m above and 160 m below it;
  • the first row where at least 8 of 25 sample points across a strip 96 m wide (one every 4 m) have such ground is the front. For a mod, rocks on layer Map don't count as ground;
  • without such ground TFA lays a flat plateau at StartPoint and says so in the log - your biome never fails because of it.

The plateau reaches up to 124 m behind the front (more where your ground lies lower). Keep that strip empty: anything of yours there lies under the wreck and the spawn spots.

Automatic dressing

Without a Start - or with a Start whose Layers is null - TFA dresses the plateau itself from what your biome carries:

  • It reads the PEAK spawners under slot.Root (PropSpawner, DecorSpawner and SpawnList, inactive variants too) and sorts their prefabs by size and shape into rocks, tall things, plants and ground cover. Everything is scattered at TFA's usual density.
  • Rocks come from your spawners first, then from the boulders you built on layer Map, then from the camp of your frame. TFA never uses the plants of your frame.
  • The plateau takes the ground material of your biome and your frame's relief. It gets none of the frame's landmark, light marks or ponds. Your own ground in front of the plateau stays untouched.
  • A biome made entirely in code, without PEAK spawners, gets relief and rocks only. Give it layers.

Describing the look: TfaStartStyle

Set Start on your TfaBiome and TFA turns it into the plateau. It is plain data - no code runs per object - so it is the same on every player. TFA clamps every number to its range and skips what it can't use, with one log line each. As for every newer API, put the API 3 members in a method of their own (quick start, step 2):

using System.Runtime.CompilerServices;
using TrueFinalAscent.Api;

internal static class TfaBridge
{
    public static void Register()
    {
        TfaBiome biome = new TfaBiome
        {
            Id = "crystalcaves",
            Version = "1.1.0",                      // Start and DressStart are content: raise it when you change them
            Replaces = new[] { "Tropics", "Roots" },
            // ... Names, Ink, Build, ApiLevel = 2 and the rest, as in step 3 ...
        };

        // API 3 members exist only in a TFA whose ApiVersion says so - keep them out of this method.
        if (TfaBiomes.ApiVersion >= 3)
        {
            AddStart(biome);
        }
        TfaBiomes.Register(biome);
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    private static void AddStart(TfaBiome biome)
    {
        biome.ApiLevel = 3;                         // placed like 2; 3 says your code knows the start plateau
        biome.Start = CrystalStart.Style();         // the look as data
        biome.DressStart = CrystalStart.Dress;      // set pieces as code (optional)
    }
}

This is the style of the example biome: a ground material, a gentle relief, three layers, a landmark with a light and a sound, and an ambience. Two layers and the landmark name templates your Build makes (next section); the third layer takes a PEAK plant.

using System.Collections.Generic;
using TrueFinalAscent.Api;
using UnityEngine;

internal static partial class CrystalStart
{
    // Loaded from your asset bundle in Awake.
    public static Material Floor, Glass;
    public static AudioClip Hum, Chime;

    // Plain data: TFA clamps it and builds the same plateau on every player.
    public static TfaStartStyle Style()
    {
        return new TfaStartStyle
        {
            Ground = Floor,                                   // null = the largest ground material under your Root
            Relief = new TfaStartRelief { Hill = 2.5f, Rough = 0.6f, Mounds = 18 },   // fields left at -1 keep the frame's value
            Layers = new List<TfaStartLayer>
            {
                // Tall crystals as the plateau's walls, from templates your Build makes (next section).
                new TfaStartLayer
                {
                    Find = "Props/T_crystal_tall", Kind = TfaStartKind.Tall,
                    Zones = TfaStartZone.Back | TfaStartZone.Sides, Density = 12f, ScaleMin = 0.9f, ScaleMax = 1.5f,
                },
                // Boulders in loose groups across the field; they keep your own glow script.
                new TfaStartLayer
                {
                    Find = "Props/T_boulder", Kind = TfaStartKind.Rock, Zones = TfaStartZone.Field,
                    Density = 8f, Cluster = 0.7f, Keep = new[] { "CrystalGlow" },
                },
                // Ground cover from PEAK's own Roots pool: nothing to ship.
                new TfaStartLayer
                {
                    Vanilla = "Roots:Fern", Kind = TfaStartKind.Cover,
                    Zones = TfaStartZone.Field | TfaStartZone.Path | TfaStartZone.Bed, Density = 40f,
                },
            },
            Landmark = new TfaStartLandmark
            {
                Find = "Props/T_crystal_spire", Scale = 1.2f, Radius = 9f, Sink = 1.5f, Sound = Chime,
                Glow = new Color(0.45f, 0.8f, 1f, 1f),      // alpha above 0: a light marker, like TFA's darkness lamps
            },
            RockMax = 6f,
            Ambience = Hum,
            AmbienceVolume = 0.4f,
            ClimbPractice = true,                            // two stacked rocks with a luggage case on top
        };
    }
}
  • Layers grow in the zones you name at the density you give. Several small layers read better than one big one; at most 16 count. Once you give a list - even an empty one - it replaces the automatic dressing: TFA adds no rocks or plants of its own, so bring your rocks as a Rock layer. TFA keeps the view from the wreck to the end of the path open: nothing taller than 6 m stands within 25 degrees of that line, and a copy that would is moved sideways or skipped.
  • The landmark stands in TFA's slot on a flat podium that blends into the ground, so it never floats. Choose a model with a clear silhouette: players see it from the wreck. TFA sets its mesh bottom on the podium, wherever its pivot is; the side grove adds 3 to 7 copies of your plants.
  • The two kit cases and the climbing practice are TFA's, with the loot of your frame; you choose only whether the practice is built (ClimbPractice).
  • Ponds need AllowWater and a Water material; TFA lays them and gives them a real water zone.
  • Sound: without Ambience TFA lends a looping ambience bed it finds under your root.

Templates: Template, Find, Vanilla

Every layer and the landmark names exactly one model:

  • Template - a prefab from your asset bundle, or a scene object (inactive is fine).
  • Find - a path under your Root, resolved after Build. For models your Build makes itself: make them once, inactive, under a "Props" object and give them plain names.
  • Vanilla - a PEAK prefab named by that biome's spawners, such as "Tropics:Jungle_Willow_Big". Nothing to ship. Copies start at the size and turn its spawner gives it, and your scale works on top.
// In your Build (every player): make the templates once, inactive, under your Root. Find reads them after Build.
private static IEnumerator Build(TfaBiomeSlot slot)
{
    Transform props = new GameObject("Props").transform;
    props.SetParent(slot.Root.transform, false);
    props.gameObject.SetActive(false);   // templates only: never seen, never walked on themselves

    Template(props, "T_crystal_tall", PrimitiveType.Capsule, new Vector3(2.5f, 8f, 2.5f));
    Template(props, "T_crystal_spire", PrimitiveType.Capsule, new Vector3(5f, 21f, 5f));
    Template(props, "T_boulder", PrimitiveType.Sphere, new Vector3(3f, 2f, 3f));

    // ... then the ground and the way up, as in the quick start ...
    yield return null;
}

private static void Template(Transform parent, string name, PrimitiveType shape, Vector3 size)
{
    GameObject model = GameObject.CreatePrimitive(shape);
    model.name = name;                                  // plain name: "Props/T_crystal_tall" finds it
    model.layer = LayerMask.NameToLayer("Map");         // props on Map, walkable ground on Terrain
    model.transform.SetParent(parent, false);
    model.transform.localScale = size;
    model.GetComponent<Renderer>().sharedMaterial = CrystalStart.Glass;
}

TFA measures a model from its meshes, not from Renderer.bounds (which is zero for inactive objects). Every copy is made by TFA: it keeps meshes, materials, colliders and the scripts you list in Keep, and strips the rest (see What TFA removes). LOD groups on the root stay.

Zones

A layer says in which zones it grows. The drawing shows the plateau from above, your ground at the top; numbers 1 to 6 are the zones in the table, 7 to 10 are TFA's own parts from the table above. How a copy sits on the ground, and which kind may stand where, is the TfaStartKind of the layer (see the Reference).

+z12234567891010
No.ValueWhereAllowed kinds
1TfaStartZone.BackThe strip along the back edge, 36 m deep, in front of the fog wall - the place for a skyline.Rock, Plant, Cover, Tall
2TfaStartZone.SidesThe outer 42 m of each side, on the berms - your biome's walls.Rock, Plant, Cover, Tall
3TfaStartZone.FieldThe open middle: the ring around the wreck, the band before the front and everything between the berms and the back.Rock, Plant, Cover
4TfaStartZone.BedWithin 30 m of the wreck. Ground cover only, and never closer than 6 m to the hull.Cover
5TfaStartZone.PathBeside the path, 4 to 18 m from its axis, from 20 m ahead of the wreck to the front: up to 1.5 m high within 12 m of the axis, up to 6 m beyond. The trough itself always stays free.Plant, Cover
6TfaStartZone.FrontOn your own ground in front of the plateau, up to 72 m past its first row, where the host measured it; a lane 12 m wide to each side of the path end stays free. Off unless a layer asks for it: TFA does not decorate your own ground otherwise.Rock, Plant, Cover

Set pieces: DressStart

For what data can't say - a ring of crystals round the landmark, a bridge, a signpost - DressStart runs your code once on every player. It runs after TFA has laid the plateau and its own parts (wreck, spawn fan, kit, path, landmark) and before TFA scatters your layers, so your set pieces get the first claim on the ground and TFA fills the space around them. With Layers null, TFA's automatic layers already stand when it runs.

using TrueFinalAscent.Api;
using UnityEngine;

internal static partial class CrystalStart
{
    // Loaded from your asset bundle in Awake: content bound to your Version, the same on every player.
    public static GameObject CrystalPrefab;

    // A ring of 8 spots as literal numbers: Sin and Cos may round differently per CPU, a table cannot.
    private static readonly Vector2[] Ring =
    {
        new Vector2(16f, 0f), new Vector2(11.3f, 11.3f), new Vector2(0f, 16f), new Vector2(-11.3f, 11.3f),
        new Vector2(-16f, 0f), new Vector2(-11.3f, -11.3f), new Vector2(0f, -16f), new Vector2(11.3f, -11.3f),
    };

    // Every player, after TFA laid the plateau and its own parts, before TFA scatters. Pure: only the slot and Random.
    public static void Dress(TfaStartSlot slot)
    {
        if (CrystalPrefab == null || float.IsNaN(slot.Landmark.x))
        {
            return;   // nothing to copy, or this style has no landmark to put a ring around
        }
        foreach (Vector2 offset in Ring)
        {
            // UnityEngine.Random is seeded from slot.Seed in here: the same numbers on every player.
            float x = slot.Landmark.x + offset.x + Random.Range(-1.5f, 1.5f);
            float z = slot.Landmark.z + offset.y + Random.Range(-1.5f, 1.5f);
            float y = slot.Height(x, z);
            if (float.IsNaN(y) || !slot.IsFree(x, z, 2.5f))
            {
                continue;   // off the plateau, or TFA's wreck, fan, path or landmark is there
            }
            GameObject crystal = slot.Copy(CrystalPrefab, "ring crystal");   // TFA's stripped copy under slot.Holder
            if (crystal == null)
            {
                continue;
            }
            crystal.transform.position = new Vector3(x, y - 0.4f, z);
            crystal.transform.rotation = Quaternion.Euler(0f, Random.Range(0f, 360f), 0f);
            crystal.transform.localScale *= Random.Range(0.8f, 1.3f);
            slot.Reserve(x, z, 2.5f);   // TFA's own scatter keeps out of the disc
        }
    }
}

The contract is that of Build, but stricter, because TFA compares the result (see Testing):

  • Pure. Compute only from the TfaStartSlot - its seed, its samplers, the host's text in slot.Measured - and from content bound to your Version. Your own configuration, the scene, the time and frame counts differ from player to player and make the plateau differ.
  • Randomness. UnityEngine.Random is seeded from slot.Seed inside DressStart; TFA restores its own state afterwards. Use no other source, no iteration over sets keyed by Unity objects, nothing that depends on the order of FindObjectsByType.
  • No physics. The plateau is inactive while you run, so a raycast can't hit it. Use Height, Normal and Lowest: they are the same on every player.
  • Only under Holder (slot.Copy puts its copies there). No PhotonViews, rigidbodies, items or spawners; walkable colliders on layer Terrain, props on Map.
  • Scripts you keep or add wake when the whole plateau stands. They run on every player, must be local and must not move colliders.
  • Maths. TFA compares positions to 1/16 m. Prefer + - * /, Sqrt, Floor and Abs; avoid Sin, Cos, Pow and Perlin noise for positions, or a CPU that rounds differently shows up as a mismatch. A literal table, as in the example, is the safest.
  • Quick. It runs inside the loading screen without yielding. Stay under 250 ms; at most 400 objects with renderers count.
  • Fail together. If it throws, everything it made is removed on that player. Make it fail everywhere or nowhere.

Does your set piece need the real shape of the world, such as your ground ahead of the plateau? Raycasts are the host's job, as for Measure: set MeasureStart. It runs once on the host before the plateau is shaped (slot.Measuring is true, the samplers answer NaN) and returns text; every player reads that text in slot.Measured. Keep it short: over 2 KB as Base64 TFA drops it, and Measured is null.

What TFA removes, clamps and refuses

TFA can't stop a raycast from your code, so it makes the result safe and the same on every player instead. This happens after your style and after DressStart, before the plateau wakes:

Network and physics partsPhotonView and Item (together with the part they sit on), Rigidbody, every Joint, ConstantForce, Cloth, every particle system and every Animator or Animation are removed from every copy and from everything under your DressStart group, before anything wakes. A script of yours that requires one of them ([RequireComponent]) is removed first. The log counts them.
PEAK's scriptsScripts of PEAK and Photon (spawners, luggage, campfires, lava, damage zones, harmful CollisionModifier, ...) are removed. Only harmless local ones stay: ClimbModifierSurface without status or petrify, WaterZone, AudioLoop, BakedVolumeLight, WobbleSpinBounce, cooling StatusEmitter and StatusField, and a CollisionModifier that hurts and pushes nobody. Your own scripts stay on Copy copies; on a layer's copies only those named in Keep stay, and triggers, lights and sounds are stripped there.
TFA's own areasA piece of your DressStart whose footprint reaches the spawn fan, the wreck (with a margin of 6 m), the path trough or a disc TFA planned (kit, landmark, ponds) is hidden with everything under it. The same on every player.
BudgetAt most 400 objects with renderers in your set pieces: the first 400 in hierarchy order stay, the rest is hidden. At most 2 lights and 2 audio sources stay on; the others are switched off.
Your share of the budgetYour set pieces count against the plateau's caps (copies, LOD0 renderers and triangles, colliders): a top-level piece that no longer fits is hidden, and your layers get what is left. With Layers null, TFA's automatic layers already stand when DressStart runs and count first.
ReservationsThe footprint of every piece that stays (from its mesh and collider bounds) is reserved automatically, so TFA's scenery keeps off it. Reserve is for the room around your objects; its discs count only if DressStart returns.
TamperingTFA compares the wreck, its own groups and the taken spots before and after DressStart. A difference is logged as an error and left as it is: nothing is undone.
An exceptionIf DressStart throws, everything it made is removed - its pieces and its reservations - and the plateau stays as if you had no DressStart. Your style's layers and landmark stay. TFA logs the error and its stack. Make it fail everywhere or nowhere.
A different resultIf a guest's plateau differs from the host's in your part (print section m), the guest switches every collider under FA_StartMod off - your layers and your set pieces - so there are no invisible walls and no holes at the spawn, and logs it. The look may still differ, so make it identical.
ValuesNumbers outside their range are clamped, unknown names and illegal kinds or zones are dropped. Each is logged once and never rejects your biome.

All together the plateau keeps to this budget. What is counted comes from the finished copies, so every player refuses the same copy.

LimitCapBeyond it
Copies on the plateau1000The next copies are refused, in placement order - the same copies on every player.
Rocks / big plants / ground cover320 / 420 / 480Per kind, as above.
Landmark, side grovelandmark 1 copy, side grove 3 to 7Both count in the copies above.
Shadow draws600Casting renderers x material slots. Beyond it shadows are switched off, nothing is hidden: the landmark keeps its shadows longest, then the biggest shadows nearest the way from the wreck along the trough and on past the front; ground cover never casts.
LOD0 renderers2500Ground cover, then plants, then rocks are refused.
LOD0 triangles2.5 millionSame order.
Colliders1500Same order; ground cover has none.
Glow marks4From the fifth on the light marker is removed. Yours and TFA's count together.
Water surfaces3No further ponds.
New sound sources4No further sources.
Particle systemsnone for modsRemoved from every template and from DressStart.
Your DressStart400 objects, 2 lights, 2 audio sourcesThe rest is hidden or switched off, the last first. Your set pieces also count in the plateau's copies, LOD0 renderers, triangles and colliders above: a top-level piece that no longer fits is hidden. Over 250 ms TFA warns in the log.
Placing the whole plateauabout 1 sTFA's own time goal; it logs the time next to the numbers.

Your stage, your rules

Your biome is built in a frame and inherits what the frame brings: its length and height, its campfires, its weather, its cold nights. With API 2 you can tell TFA what to drop from that frame, how fast the fog closes in, which of TFA's weathers roll in your stage in Apocalypse mode, and how tall your stage is. Everything is optional; a biome that sets none of it behaves exactly as before.

  • Declare, don't patch. Tell TFA what your stage needs. TFA does it the same way on every player, for late joiners and after a host change. Don't switch PEAK's weather zones, the fog or the cold off yourself.
  • Everyone needs your biome. A player who joins a run later without it is removed from the run: always in the Builder, and in the classic climb as soon as your biome uses Rise or any stage rule (DropFromFrame, FogPace or Weathers). A biome that sets none of these keeps the old behaviour: a player without it climbs PEAK's own stage, the vanilla frame.
  • Weather at runtime - a storm when the group arrives - is TFA's Weather API (the Weather tab) or your own code, see Starting weather yourself. This part covers what your biome declares.
  • Check the version before you touch anything newer than your minimum (quick start, step 2).

What you drop from the frame: DropFromFrame

By default your stage keeps what its PEAK biome brings. DropFromFrame names what it should not keep. Default TfaFrameParts.None; combine parts with |.

WeatherPEAK's weather of the frame in normal FINAL ASCENT runs: rain in the Tropics, gusts in the Roots, the blizzard on the Alpine, the hot sun on the Mesa. In Apocalypse mode PEAK's zones are silent anyway; there it is TFA's permanent Mesa sun. Dropped, TFA holds that weather still in your stage, on every player.
ColdNightCold nights, as from the shore up to the Mesa. Dropped, nights in your stage are mild, as from the Caldera on.
biome.DropFromFrame = TfaFrameParts.Weather | TfaFrameParts.ColdNight;   // a warm, sheltered valley

Don't switch PEAK's weather objects off yourself: TFA's rain borrows parts of them, and a zone switched off on one player still blows on the others. When the group leaves your stage, PEAK's weather simply carries on. New parts may join this list later; a biome only ever drops what it names.

Fog pace: FogPace

TFA gives every stage its own fog. It starts behind the campfire players come from and closes in at PEAK's pace. A bigger or harder biome may need more time: FogPace multiplies the fog's speed while your stage is the one the group is in. 1 is PEAK's pace, 0.5 half as fast, 2 twice as fast; TFA keeps it between 0.25 and 2 and logs a value outside that range. If your stage is the last one, your pace holds until the fog ends at the PEAK.

biome.FogPace = 0.75f;   // a third more time than PEAK's fog gives

Never change OrbFogHandler.speed yourself - your pace and TFA's would multiply.

TFA weather in your stage: Weathers

In Apocalypse mode the host rolls TFA's weather every few minutes from a table that says which weather can come in which biome. Your stage uses the column of its frame. Weathers replaces it for your stage:

  • The key is a TFA weather (list below), the value how likely it is: 0 never, 1 the base likelihood (TFA's own table mostly uses 1, in a few places 2 or 3), 2-5 that many times as likely as a 1. Values outside 0-5 are clamped and logged. TFA first rolls how rare the next weather is (common, rare or special), then picks among those that can come here. If none of that kind can, it tries the more common kinds first, then the rarer ones - so a list that allows only rare or special weathers makes every roll end up with one of them.
  • A weather you don't list keeps the frame's likelihood. "*" sets every weather you don't list: ["*"] = 0 plus a few keys means "only these"; ["*"] = 0 alone means no TFA weather in your stage - the cycle rests there, as it does in the Nadir.
  • null (default) keeps the frame's column.
// A desert in a Tropics frame: sand instead of rain, no snow, no tsunami.
biome.Weathers = new Dictionary<string, int> { ["sand"] = 3, ["rain"] = 0, ["snow"] = 0, ["tsunami"] = 0 };

// Or only the weathers you name, nothing else (these are rare or special ones, so every roll ends at one of them):
// biome.Weathers = new Dictionary<string, int> { ["*"] = 0, ["quake"] = 2, ["dark"] = 1 };

// Or no TFA weather at all - the cycle rests in your stage:
// biome.Weathers = new Dictionary<string, int> { ["*"] = 0 };
  • The dice and the ghosts' vote follow it. A perma weather and the host's manual menu don't.
  • What the host switched off in the weather setup stays off, and a weather's own conditions still apply: moons only at night, the eruption only with a Kiln in the mountain, the Scoutmaster's Watch only with the Scoutmaster.
  • In Chaos every weather is equally likely everywhere - but your 0 stays 0. Use it for weather that would break your stage, not for taste.
  • An unknown key is logged once and ignored, so a key from a newer TFA does no harm in an older one.

Outside Apocalypse mode TFA rolls no weather; there your stage gets the weather you start yourself (below), for example with the Weather API.

A taller or lower stage: Rise

Your stage is built in a frame: the length, height and campfires of a PEAK biome. Rise changes its height. TFA raises (or lowers) the end campfire with its rock by that much, and every stage after yours moves along - nothing hangs in the air, nothing has to climb down. It works in the classic climb and in the Builder.

// Registration: 40-60 units taller than the frame, a different height per run.
biome.Rise = seed => 40 + (int)(seed % 21);

// In Build: EndCampfire already stands at its new height, slot.Rise says by how much (after clamping).
int steps = 60 + slot.Rise;   // a taller stage gets a longer ramp
  • seed is the seed your Build gets in slot.Seed, so your generator can work out its own summit from it.
  • World units, like transform positions - not metres. PEAK's altimeter shows about 1.6 m per unit.
  • Range -30 to +100. TFA clamps anything else and writes a log line.
  • Asked once, on the host, when the run starts - in the airport, before any island exists. Pure arithmetic only: no scene, no physics, no UnityEngine.Random. If it throws, the rise is 0.
  • The result travels with the run: every player builds the same mountain. slot.Rise tells your Build the value TFA used, after clamping - read it there instead of calling your function again.
  • When Build runs, EndCampfire already sits at its new height. Build from slot.StartPoint up to slot.EndPoint as always. The stage's fog grows with it by itself.
  • Every player needs your biome in the same version to join a run that uses it. A player who joins later without it is removed from the run - also in the classic climb, because a rise changes the mountain (see Your stage, your rules).

The length of the frame stays. A longer way up is yours to wind inside it.

Starting weather yourself

PlayersHere runs on every player and tells you when the group enters (true) and leaves (false) your stage - the moment to start and stop sounds, wind or storms. true comes when the campfire before your stage is lit, or at the start of the run if your stage comes first. Your weather runs on every player, so start and stop it the same way everywhere.

To use TFA's own 28 weathers - with a tier, single values, a lake to swim in - call the TFA Weather API from here; it has its own tab. slot.OwnWeatherAllowed is true in every run except the daily map, where mod biomes never appear anyway - Apocalypse mode included: TFA's dice and your weather run side by side, and a weather you start through the Weather API takes over a colliding dice weather. Steer the dice themselves in your stage with Weathers.

private static void OnPlayersHere(TfaBiomeSlot slot, bool here)
{
    // Your own wind, sounds or storms: start with the group, stop when it leaves.
    // To use one of TFA's 28 weathers instead, call TfaWeather.Start / Stop from here (Weather tab).
    CrystalStorms.Running = here && slot.OwnWeatherAllowed;
}

Is your own weather or water part of the way up - a route players must swim? In Apocalypse mode other weather may run next to it, and if another mod's weather holds TFA's weather slot, your start answers Busy - ask again every few seconds (see the lake example on the Weather tab).

Want your own sky and light? Change slot.Sky during Build:

// In Build: start from PEAK's profile of this stage and make it your own.
DayNightProfile sky = UnityEngine.Object.Instantiate(slot.Sky);
// ... change colours and fog ...
slot.Sky = sky;

Rules of thumb

  • Build only under Root (or EndCampfireGroup). Don't touch MapHandler, its segments or PEAK's terrain - TFA wires the stage itself.
  • Walkable colliders on layer Terrain, props on Map - TFA's rain, lightning and lava look for those.
  • Yield regularly. A build of several seconds in one frame freezes the loading screen.
  • If Build throws, TFA keeps PEAK's stage on that player and tells them - loading never hangs. Make sure Build fails everywhere or nowhere, or that player climbs a different stage.
  • Build only relative to the slot, from slot.StartPoint to slot.EndPoint. StartCampfire can be null in the Builder (ApiLevel 2 or 3). Your biome may fill different stages of a climb (in the Builder any place), and with MaxPerRun above 1 more than once - keep everything that depends on the run in the slot, not in static fields: TFA asks Rise, Fits and Measure per slot.
  • DropFromFrame, FogPace, Weathers, Rise, Start and DressStart are part of your content: every player needs the same, so raise Version when you change them.
  • Start plateau (API 3): describe it as data first and add DressStart only for what data can't say. DressStart is pure - it computes from the slot and the seed, never from your configuration or the scene - or the guests' plateau differs from the host's.
  • Heights are world units (about 1.6 m on PEAK's altimeter): Rise, StartPoint, EndPoint.
  • Has your mod its own fog pace, cold or weather switches for normal PEAK runs? Keep them for normal runs, turn them off in FINAL ASCENT (TfaBiomes.IsFinalAscentRun) and declare the FINAL ASCENT values instead.
  • Does your mod normally replace a biome on its own? Keep doing that in normal runs and step aside in FINAL ASCENT:
// Your mod normally replaces a biome by itself? Step aside in FINAL ASCENT runs only:
if (TfaBiomes.IsFinalAscentRun)
{
    return;   // TFA calls your Build if the host picked your biome
}

Reference

Everything below is API 2 or API 3 (TfaBiomes.ApiVersion is 3), there since True Final Ascent 3.0.0. API 3 is the start plateau: Start, DressStart, MeasureStart and the types TfaStartStyle to TfaStartSlot.

TfaBiome - what you register

IdUnique id, 2-24 lowercase letters or digits.
VersionContent version; must be the same on every player. No | or @.
ReplacesFrames it fits: Tropics, Roots, Alpine, Mesa. In the Builder the host picks the frame per block, the first one is the default.
MaxPerRunHow many copies one run may contain (default 1). Above 1, keep your state per slot.
NamesName per language: en (required), de, cn.
InkColour of your biome in the map setup and in the climb graph on this website.
MeasureOptional, host only: measure the world, return text.
BuildRequired: build under slot.Root; yield return null (or your own IEnumerator) to spread the work, never StartCoroutine.
PlayersHereOptional: the group entered (true) or left (false) your stage.
ApiLevelPlacement you accept: 1 (default) only after a campfire, 2 also first in the climb and right after the Kiln, Citadel or Nadir (Builder), 3 the same and your code knows the start plateau (API 3). Higher than ApiVersion is refused.
InBuilderFalse keeps your biome out of the Builder (default true).
FitsOptional (frame, previous, next) => bool: false where your biome can't stand in the Builder. Quick, the same on every player; if it throws, TFA treats it as true.
DropFromFrameWhat your stage doesn't take from its frame: Weather, ColdNight (default None).
FogPaceFog speed in your stage, 0.25-2 (default 1).
WeathersOptional: TFA weather key to likelihood 0-5, "*" for the rest. Apocalypse dice and ghosts' vote only.
RiseOptional seed => units: extra height of your stage, -30 to +100. Host only, once, at run start.
StartOptional, API 3: TfaStartStyle, the look of the start plateau as data. Read after your Build, on every player, only when your biome stands first in a Builder mountain.
DressStartOptional, API 3: Action<TfaStartSlot>, set pieces for the start plateau as code. On every player, pure, after TFA's own parts and before its scatter.
MeasureStartOptional, API 3, host only: Func<TfaStartSlot, string>, measure what DressStart needs (raycasts) before the plateau is shaped and return it as text. Every player gets it in slot.Measured; over 2 KB as Base64 it is dropped.

TfaBiomeSlot - what TFA gives you

RootBuild here. At the start campfire (or StartPoint), facing the end campfire.
StartCampfire, EndCampfireThe campfires before and after your stage. StartCampfire is null where no campfire leads in (Builder, from ApiLevel 2 on).
StartPointWhere players enter your stage: the start campfire's fire, else the summit camp of the Kiln or Citadel, the Nadir's bridge camp or the foot of the climb. First in the climb TFA lays the crash site just in front of it after your build (start plateau).
EndPointThe fire of EndCampfire - where your way up must arrive.
EndCampfireGroupThe whole end campfire with its rock.
VanillaTerrainPEAK's terrain of the stage - templates only, hidden after your build.
SeedSeed for this run, stage and biome, the same everywhere.
MeasuredThe host's Measure result, or null.
SkyLight and sky profile of the stage - replace it to change it.
OwnWeatherAllowedFalse only on the daily map (which never has mod biomes); true in every other run, Apocalypse mode too, where TFA's dice and your weather run side by side. See the Weather API.
InBuilderTrue in a Builder mountain: Position is the place in the chain, the frame may be a copy.
RiseThe rise TFA used for this slot, after clamping; 0 without Rise.
PositionPlace in the climb, 0 = first stage; in the Builder the place in the chain.
OccurrenceWhich copy of your biome this is, from 1.
Previous, NextThe stages around yours: Shore, Tropics, ... or mod: plus an id; "" at the start, Peak at the end. In the Builder Caldera, Kiln, Gloom and Citadel are separate blocks: Kiln or Citadel can be your neighbour with no Caldera or Gloom before it, and Caldera or Gloom with no Kiln or Citadel after it.
Replaces, BiomeThe frame you build in, your registration.

TfaFrameParts

None, Weather, ColdNightFlags for DropFromFrame: combine with |. A biome only drops what it names; new parts may join later.

TfaStartStyle - your start plateau as data (API 3)

Set it as TfaBiome.Start. Every field is optional.

GroundMaterial. The plateau's ground. null = the largest material of your Terrain ground under slot.Root. It is projected from above (world x and z), so triplanar or world-space shaders look best.
ReliefTfaStartRelief. Hills, roughness and mounds of the plateau ground. null = your frame's relief.
LayersList<TfaStartLayer>. What grows on the plateau; at most 16 layers, more are ignored. null = TFA dresses the plateau itself from the spawners on your root. Any list, even an empty one, means only your layers: TFA then scatters no rocks or plants of its own.
LandmarkTfaStartLandmark. One landmark in TFA's slot beside the path, optionally with a small grove opposite. null = none.
RockMaxfloat, metres, 1.5 to 16. Largest radius of a rock in the field. -1 (default) = your frame's. Smaller makes a calmer plateau.
AmbienceAudioClip. Your own ambience bed: a looping 3D sound at the wreck, full volume within 80 m, fading to nothing at 220 m. Replaces what TFA otherwise lends from a looping ambience bed under your root.
AmbienceVolumefloat, 0 to 1 (default 0.5). Volume of Ambience; PEAK's ambience volume setting applies on top.
AllowWaterbool (default false). TFA may lay 1 to 2 ponds of real water on the plateau (radius 6 to 10 m, 0.8 m deep) - water that slows swimmers. Needs Water; without it the setting is ignored (log line).
WaterMaterial. Look of the pond surface. TFA finds it by name on a renderer under your Root, so a renderer there must carry this material.
ClimbPracticebool (default true). TFA builds the climbing practice of your frame: two stacked rocks with a luggage case on top. Skipped when the frame's rocks can't be found on your plateau.

TfaStartLayer

One layer of copies in TfaStartStyle.Layers. Numbers outside their range are clamped and logged.

TemplateGameObject. A prefab or scene object as the model (inactive is fine). Exactly one of Template, Find and Vanilla per layer; a layer with none or several is skipped, with a log line.
Findstring. Path under your slot.Root in plain names ("Props/T_crystal"), resolved after your Build. For templates your Build makes itself.
Vanillastring. A PEAK prefab that a PEAK biome's spawners name: "Tropics:Jungle_Willow_Big" = biome (Tropics, Roots, Alpine, Mesa, Caldera, Kiln, Gloom, Citadel), colon, plain prefab name. Lets you dress with PEAK's own plants and rocks without shipping them. A name TFA doesn't find skips the layer.
KindTfaStartKind (default Plant). How the copies sit on the ground; see the kinds below.
ZonesTfaStartZone (default Field | Sides). Where the layer may grow; combine with |. Kinds that are not allowed in a zone lose that bit, with one log line.
Densityfloat, copies per hectare in its zones, 0 to 400. -1 (default) = TFA's density for the kind (rock 12, plant 25, cover 60, tall 40).
Clusterfloat, 0 to 1 (default 0.5). 0 spreads the copies evenly, 1 gathers them into tight groups of 3 to 7.
ScaleMin, ScaleMaxfloat, 0.25 to 4 (default 0.85 and 1.2). Scale range of the copies.
Radiusfloat, metres. Footprint TFA keeps clear around a copy. -1 (default) = from the model's mesh bounds.
Tiltfloat, degrees, 0 to 20. Largest tilt. -1 (default) = 8 for Rock, 0 for the rest.
Sinkfloat, 0 to 0.8. Share of the height that sits in the ground. -1 (default) = the kind's own.
ShadowsTfaShadow (default Auto). See below.
Keepstring[]. Type names of your own scripts that survive the copy. Everything else on the template is stripped (see "What TFA removes").

TfaStartLandmark

Template, Find, VanillaAs for a layer: exactly one source.
Radiusfloat, 4 to 25 m. Footprint for the flat podium under the landmark and for the clearance around it. -1 (default) = measured from the model. A landmark never floats: TFA blends the ground up to it.
Scalefloat, 0.05 to 20 (default 1). Scale on the template as authored.
Sinkfloat, 0 to 5 m (default 0). How deep the landmark stands in the ground.
SoundAudioClip. Optional looping 3D sound at the landmark, audible from 4 to 60 m.
GlowColor. Alpha above 0 adds a light marker (BakedVolumeLight) at the landmark, like the lamps TFA uses in darkness. Default Color.clear = none.
SideGrovebool (default true). A small grove opposite the landmark (60 to 90 m from the path), made from your Plant and Tall layers.

TfaStartRelief

Every value defaults to -1: the relief of your frame. Terraces and dunes are not part of API 3.

Hillfloat, 0 to 8 m. Height of the broad hills.
Roughfloat, 0 to 3 m. Height of the fine roughness.
Moundsint, 0 to 40. Number of mounds.

TfaStartZone

None, Back, Sides, Field, Bed, Path, FrontFlags 0, 1, 2, 4, 8, 16, 32: combine with |. The zones are drawn and described in "Zones" above.

TfaStartKind

RockSunk 35 to 55 % into the ground and tilted. Rocks in the field are scaled down to RockMax. Not allowed in Bed and Path.
PlantStands upright on the ground (sunk 0.15 m), keeps its colliders as authored. Not allowed in Bed.
CoverGround cover: colliders removed, never casts a shadow; the only kind in the bed, where it may come to 6 m from the hull.
TallSkyline: only in Back and Sides; casts no shadows unless the layer asks (TfaShadow.On).

TfaShadow

Auto, On, OffAuto: big rocks and plants cast shadows, ground cover and skyline do not. On: always (never for ground cover). Off: never. TFA's budget of 600 shadow draws for the whole plateau applies on top.

TfaStartSlot - what DressStart gets (API 3)

World coordinates; +z points towards your biome. The samplers (Height, Normal, Lowest, ZoneAt, IsFree) are pure functions of the start line and the seed: the same numbers on every player.

Idstring. Your biome's id.
Seedulong. The seed of your start, the same on every player. UnityEngine.Random is seeded from it inside DressStart; TFA restores its own random state afterwards.
Measuredstring. The text the host's MeasureStart returned, or null (none, or over 2 KB as Base64). Read it here instead of measuring.
Measuringbool. True inside MeasureStart: the plateau is not shaped yet, the samplers answer NaN and Holder is null.
HolderTransform. The inactive group for your set pieces under FA_StartMod on the plateau. Build only here; it wakes together with the finished plateau. Null while measuring.
BoundsBounds. The plateau plus the measured band ahead of it (up to 72 m past Front).
AnchorVector3. Centre of the wreck's bed.
Floorfloat. Height of the plateau floor at the wreck.
Frontfloat. The z of the first row of your own ground.
LandmarkVector3. Where your landmark stands (the ground under its centre); NaN in every component without one.
PathX(z)float. The x of the path axis at z.
FrontAt(x)float. The z where the plateau meets your ground at x.
Height(x, z)float. Height of the built ground (the plateau mesh, else your measured ground ahead of it), NaN outside.
Normal(x, z)Vector3. Ground normal at the point; up where unknown.
Lowest(x, z, r)float. The lowest ground of the centre and four points r away - the seat for a boulder. NaN outside.
ZoneAt(x, z)TfaStartZone. The zone of a point; None on TFA's own ground and outside.
IsFree(x, z, r)bool. Is the disc on ground and clear of TFA's ground, its copies and your reservations?
Reserve(x, z, r)bool. Claims a free disc inside DressStart: TFA's scenery keeps off it. False if the disc was not free.
Copy(template, name)GameObject. TFA's copy of a template under Holder, without network, physics, particle and animator parts and without PEAK's gameplay scripts (harmless local ones stay); your own scripts stay. Null if refused (a root with a PhotonView, rigidbody or item), and null outside DressStart. You place and turn it.

TFA weather keys

The keys for Weathers. New weathers join this list; a key never changes.

stormWindstorm
rainRain
snowBlizzard
sandSandstorm
sunBurning Sun
sleepfogSleeping Fog
sporesSpore Cloud
poisonPoison Fog
shroomrainShroom Rain
cactusrainCactus Rain
foodfrenzyFood Fiesta
floorlavaThe Floor Is Lava
darkDarkness
quakeEarthquake
moonBlue Moon
bloodBlood Moon
wispsWill-o'-Wisps
antigravAntigravity
thunderThunderstorm
icefogFreezing fog
petrifyPetrifying Sun
watchScoutmaster's Watch
tsunamiTsunami
floodFlash Flood
avalancheAvalanche
volcanoVolcanic Eruption
shockfrostFlash Freeze
hayfeverPollen Season

TfaBiomes

Register(biome)Registers your biome; false (with a log line) if something is missing.
IsFinalAscentRunAsk it when an island scene loads: true if that island is a FINAL ASCENT island.
ApiVersion3 since True Final Ascent 3.0.0 (2 was the API before the start plateau). Raised when the API changes in a way your code must follow; members of a higher API exist only when it says so.

Testing

Set your fields, open the FINAL ASCENT map setup, pick your biome in the list at the stage's heading (or put it into a Builder mountain), and start. TFA's log lines are in English. In BepInEx/LogOutput.log look for:

  • Mod biome registered: 'yourid' 1.0.0 for Tropics, Roots (API 2, without frame weather, fog pace x0.80, own weather weights, with rise). at game start. The API number is the ApiLevel you set; after it only what you set appears: DropFromFrame, FogPace, Weathers, Rise. A DropFromFrame, FogPace or Weathers value TFA had to clamp, or an unknown weather key, is warned about right there. Rise is not checked at registration (see the next point).
  • Mod biome 'yourid' 1.0.0 replaces Tropics (0.4s, seed 12345, rise +40). while the island builds, in the TFA Builder Mod biome 'yourid' 1.0.0 at place 3 in frame Tropics (0.4s, seed 12345, rise +40). It names the rise (rise +40), and on the host Mod biome 'yourid' raises Tropics by +40 (seed 12345). comes when the run starts. That is where Rise is checked: a value outside -30..100 is warned about right before it (Mod biome 'yourid': rise 150 outside -30..100 - clamped to 100.), a Rise that throws is logged as Mod biome 'yourid': Rise threw (...) and counts as 0. Errors from your Build show up there in full.
  • Mod biome 'yourid' in Tropics: frame weather held, mild nights, fog pace x0.80, own weather weights, rise +40. when the group enters your stage (in the Builder in place 3 (Tropics)), once per player and only with the parts you set.
  • In Apocalypse mode the host logs every roll, such as Cycle rolls: quake (Rare) 12 s, Tropics, mod biome 'yourid', day, level Normal. Your id appears when Weathers decided the pot.

A start plateau (API 3) adds these lines. Put your biome first in a Builder mountain, with ApiLevel 2 or 3, and start:

  • Mod biome registered: 'yourid' 1.0.0 for Tropics, Roots (API 3, ..., own start: 3 layers, landmark, ambience, dress). at game start. The API number is your ApiLevel; after own start: only what you set appears (3 layers or automatic layers, landmark, ambience, water, dress, start measure). With ApiLevel 1 TFA warns instead: Mod biome 'yourid': Start, DressStart and MeasureStart are never used - ApiLevel 1 never stands first.
  • Start style of mod 'yourid': 3 layers, landmark 'Props/T_crystal_spire', ground Floor. while the island builds, on every player: what TFA read from your Start. Problems are warned about once each, for example Start style 'yourid': layer 2 has no template - skipped., Start style 'yourid': layer 1 template 'Props/T_x' not found - skipped., Start style 'yourid': layer 3 zones Bed not allowed for Rock - using Field. or Start style 'yourid': AllowWater without Water - no ponds.
  • Start measure 'yourid': 412 characters, 552 as Base64. on the host, when your MeasureStart returned text. Over 2 KB as Base64 TFA drops it with Start line key 'mod.yourid' over 2 KB - dropped, and slot.Measured is null on every player. If MeasureStart throws: Start measure 'yourid' threw: ... - no measurement.
  • Builder: start spot in front of Tropics (mod 'yourid'): ..., style 3 layers (412 copies), landmark at left, dress 37 objects in 4 ms, ..., as on the host. while the island builds, on every player. The numbers name your layers and their copies, the landmark's side and the objects of your DressStart with the time it took. Instead you may read style automatic layers, no landmark, landmark not planned, landmark refused by the budget, no dress or dress removed (threw). On a guest the line ends with as on the host when the plateau matches the host's; on the host nothing follows.
  • Start mod 'yourid': style 3 layers (412 copies), landmark at left, dress 37 objects in 4 ms, side grove 5, own ambience hum, ground Floor on 38 renderers, host measure 412 characters; FA_StartMod: 0 rigidbodies, 0 joints, 0 PhotonViews. a few lines before the Builder: start spot line, with the same numbers and what else TFA placed for you: the side grove, your ambience, the ground swap and the length of the host's measure text. Only the parts you set appear. After the semicolon: what is left of the network and physics parts under FA_StartMod - it should be 0 everywhere.
  • Start dress 'yourid': 2 PhotonViews removed, 1 object in the spawn fan hidden, 120 over the budget hidden, 37 footprints reserved, 5 reservations by the mod. what TFA removed, hid or switched off after your DressStart (nothing removed when it did nothing) and how many footprints it reserved. A script of yours that requires a removed part ([RequireComponent]) goes with it: 1 script that required a removed part removed. A template whose root carries a PhotonView, a rigidbody or an item can't be copied: Start dress 'yourid': template 'x' has a network, body or item root - not copied. (for a layer or the landmark Start style 'yourid': ...).
  • Start dress 'yourid' threw: ... - removed, the plateau stays. your DressStart threw an exception (a stack follows as a warning). TFA removed what it made on that player. Slow runs are reported too: Start dress 'yourid' took 312 ms (over 250 ms).
  • ..., MISMATCH (host 1A2B3C4D) in m the end of the Builder: start spot line on a guest whose plateau differs from the host's. The letters name the parts that differ: m is your style and your DressStart, the others are TFA's. A few lines before the Builder: start spot line comes Start dress 'yourid' differs from the host - 37 colliders under FA_StartMod off.

Test once with a second player and once with a late joiner.

Questions or ideas for the API? Write to CptPICHU on the PEAK Modding Discord.

All time
1607times submitted
41898deaths
5841Apocalypse runs
394Builder runs