DocsMegalithLanguage

Players in other bodies

A script can create a character and hand a player's control over to it, with every character in Halo 3's maps and, with them installed, other games', and the last argument of place_at_me picks the character's look. The Grunts example does it each time a player spawns:

megalo-player-bipeds.rmeg
for each player do
    if current_player.is_not_respawning() then
        if current_player.object[0] != current_player.biped then
            global.object[0] = current_player.biped
            global.object[1] = current_player.biped.place_at_me(grunt, "player_body", none, 0, 0, 0, none)
            current_player.set_biped(global.object[1])
            global.object[0].delete()
            current_player.object[0] = current_player.biped
        end
    end
end

Name the body in place_at_me, then hand the new object to current_player.set_biped. set_biped takes the object the call returns, not a character name.

Every body

Each body comes from one of Halo 3's maps, named below with its file. Only Floodgate's female civilian is missing: the one map that has her keeps her without her model, textures or shaders, so she can't be drawn.

NameCharacterComes fromModel variants (looks)
spartanSpartan (multiplayer)Every multiplayer mapdefault, blue, red, green, orange, purple, gold, brown, pink
eliteElite (multiplayer)Every multiplayer mapdefault
forge_monitorForge's monitorEvery multiplayer mapmonitor
master_chiefMaster Chief (campaign)The Storm (040_voi)default, cinematic
arbiterArbiter (co-op player)The Storm (040_voi)default_arb
arbiter_aiArbiter (campaign AI)The Storm (040_voi)default_arb, nude, nude_branded
elite_coopElite (co-op players 3 and 4)The Storm (040_voi)default, player4
marineMarineThe Storm (040_voi)default, ma1…ma6, sg1, sg2, pilot, wounded, blind, dead, sarge_lehto, johnson, johnson_combat, johnson_dress, johnson_beatup, johnson_dead, cinem1…cinem7, cinem8a…cinem8j
marine_femaleMarine (female)The Storm (040_voi)default, fem1, fem2, fem3, no_helmet, anete, chan, hartmann, michelle, cinef1, cinef2
odstODSTThe Ark (070_waste)default, captain
johnsonSergeant Johnson (Halo)Halo (120_halo)As marine
crewmanNaval crewmanCrow's Nest (020_base)ethnic, lessethnic
lord_hoodLord HoodCrow's Nest (020_base)default, no_hat, dress, dress_no_hat
mirandaMiranda KeyesCrow's Nest (020_base)default, combat, dress, dead
workerCivilian workerThe Storm (040_voi)default, cv1, cv2, dead
cortanaCortanaCortana (110_hc)default
cortana_near_deathCortana (High Charity)Cortana (110_hc)default
gruntGruntThe Storm (040_voi)minor, major, ultra, spec_ops, heavy
jackalJackalThe Storm (040_voi)minor, major, shieldless, sniper
droneDroneThe Storm (040_voi)minor
elite_warriorElite (campaign)The Storm (040_voi)minor_scl, minor_dog, major_scl, major_dog, spec_ops_scl, spec_ops_dog, stealth_scl, stealth_dog, stealth_major_scl, stealth_major_dog, soc, soc_cinematic
bruteBruteThe Storm (040_voi)minor, major, ultra, captain, captain_major, captain_ultra, bodyguard, jumppack, stalker, tracker, chieftain_armor, chieftain_weapon
brute_chieftainBrute ChieftainThe Storm (040_voi)As brute
brute_jumppackBrute (jump pack)The Ark (070_waste)As brute, without ultra and captain_ultra
hunterHunterThe Storm (040_voi)minor
truthProphet of TruthCrow's Nest (020_base)default, floodified
truth_hologramProphet of Truth (hologram)The Storm (040_voi)None to choose: use none
guilty_spark343 Guilty SparkThe Ark (070_waste)monitor, monitor_combat
sentinelSentinelThe Ark (070_waste)default
sentinel_constructorSentinel constructorThe Ark (070_waste)default
flood_infectionFlood Infection formThe Covenant (100_citadel)default
flood_humanFlood combat form (Human)Floodgate (050_floodvoi)standard_fch
flood_eliteFlood combat form (Elite)Floodgate (050_floodvoi)standard_fce
flood_bruteFlood combat form (Brute)Floodgate (050_floodvoi)default
flood_carrierFlood carrier formFloodgate (050_floodvoi)default, shielded
flood_rangedFlood pure form (ranged)Floodgate (050_floodvoi)None to choose: use none
flood_stalkerFlood pure form (stalker)Floodgate (050_floodvoi)None to choose: use none
flood_tankFlood pure form (tank)Floodgate (050_floodvoi)default

Halo 3 has no Zealot: Elites come in the ranks above, and elite_warrior's soc is the spec ops commander.

A player in a body keeps its abilities: the Sentinel fires its beam and the ranged form its spines, the Flood forms and the Hunter melee with their own body, a carrier's melee bursts it into infection forms that fight for its player (their kills are the player's), and the jump-pack Brute flies while jump is held in the air.

A body that flies does so for its player: jump climbs and crouch descends, at the body's own speeds. The Sentinel and Reach's Engineer are always in the air and move where their player looks. The Drones, Halo 3's and Reach's, take wing when jump is held, hover and fly while in the air, and walk again once back on the ground.

Other games' bodies

With Halo: Reach, Halo: Combat Evolved or Halo 2 installed, a mode can name their characters too, in place_at_me, set_biped and a class's biped, on its own game's maps and on the classic games' maps too. Each keeps its own game's health, shields, movement and animations, and a class's traits and health go over them. Players who join then need that game.

GameNamesWhere
Halo: Reachreach_spartan, reach_eliteReach's maps; Halo 3's and ODST's with every armor piece; Combat Evolved's and Halo 2's. On another game's map only while the host's Halo: Reach Spartans and Elites is on
Halo: Reach's missions and Firefightreach_trooper, skirmisher, reach_grunt, reach_jackal, reach_brute, reach_brute_chieftain, reach_hunter, reach_drone, reach_engineer, reach_gutaReach's maps only, with one of Reach's missions or Firefight maps that holds the character installed. The Drone and the Engineer fly; the Gúta, five meters tall, is for open ground. A class's model_variant picks a look: trooper_heavy, odst_light, jackal_sniper, skirmisher_major, a Grunt's heavy and so on
Halo: Combat Evolvedhalo1_chief, halo1_marine, halo1_elite, halo1_grunt, halo1_jackal, halo1_hunter, halo1_flood_human, halo1_flood_elite, halo1_flood_carrier, halo1_flood_infectionHalo 3's, ODST's, Reach's and Halo 2's maps; on Combat Evolved's own, halo1_chief alone
Halo 2halo2_spartan, halo2_elite, halo2_master_chief, halo2_marine, halo2_arbiter, halo2_brute, halo2_grunt, halo2_jackal, halo2_drone, halo2_hunter, halo2_flood_human, halo2_flood_elite, halo2_flood_carrier, halo2_flood_infectionHalo 3's, ODST's, Reach's and Combat Evolved's maps; on Halo 2's own, halo2_spartan and halo2_elite alone

A character a map can't have makes nothing: place_at_me gives no_object, and a class of it is left out of the picker. Host Settings' Other games' characters, on by default, and a server's other_game_characters turn them off, so anyone with the map's game may join. Reach's Spartan and Elite also follow the host's Halo: Reach Spartans and Elites permission (a server's reach_characters), on Halo 3's, ODST's, Combat Evolved's and Halo 2's maps alike. Halo 3's and ODST's own characters come onto Reach's, Combat Evolved's and Halo 2's maps as they do onto Halo 3's.

Choosing a look

The last argument of place_at_me picks one of the body's model variants from the table, as a plain name or as text. none gives the body its default look, as Halo 3's own spawns do:

Part of a script
global.object[1] = current_player.biped.place_at_me(brute, "boss", none, 0, 0, 0, chieftain_armor)
global.object[2] = current_player.biped.place_at_me(grunt, "heavy", none, 0, 0, 0, "heavy")
  • Other examples: spec_ops_scl for elite_warrior, johnson for marine, captain for odst.
  • Only bodies take a variant. A variant name is ASCII letters, digits and underscores, at most 32 bytes.
  • The name is checked against the body when the body is created: a variant that body doesn't have stops the script, and the host's log says why.

What changes and what stays

  • What changes: the player plays as that character, with its animations, weapon handling, camera and vehicle seats as Halo 3 made them. They start unarmed: weapons aren't carried over, but set_weapon and ammo effects follow the new body. There are no new first-person arms.
  • Characters players never controlled: Cortana, the Prophet of Truth, Guilty Spark and the like move and attack only as far as their own animations and physics allow.
  • What stays: their variables, team and score. current_player.biped is the new body at once.
  • The old body stays where it was until the script deletes it, as the example does, or the game cleans it up.
  • Death: players respawn as usual, in their normal body. Keep the body you gave them in a player variable and compare it with current_player.biped, as the example does, to change each new life once. Creating a body on every tick runs out of objects.
  • Refused: a dead player, a target that isn't a living, unattached character, or one another player controls stops the script. A no_object target does nothing.
  • Classes take the same names in their biped and the same looks in model_variant; see classes and class pickers.

Files the host needs

  • The host needs the Halo 3 campaign map each body comes from, as named in the table. The game adds the characters the mode names to the map when the game starts, for any map the mode plays on. spartan, elite and forge_monitor need nothing extra.
  • A body no installed map has falls back to the game's own Spartan or Elite, and the host's log says so.
  • Players who join make the same map from their own files, mid-game too, and download what they lack from the host.
  • Dedicated servers: copy the campaign maps with dedicated init --from --maps campaign. See campaign files.
  • Forge's AI spawners are unchanged: these bodies are for scripts, and Forge's palette keeps its own characters.

Carrier melee sets off its native self-destruct; the other forms use their native unarmed attacks. These body types don't turn on the Infection game type's rules.