Skip to content
This repository has been archived by the owner on Feb 9, 2020. It is now read-only.

EE1 and EEAOC Format

coderbot16 edited this page Oct 12, 2016 · 9 revisions

Introduction

The SCN format used in Empire Earth 1 differs greatly from the one used in Age of Empires. The new format introduces Lumps, which is basically a fancy word for sections of the file. This allows unrelated data to be divided up into sections. It also makes loading errors less severe, as an error in one lump usually cannot effect another lump. Still, a lot of data is still stored outside of the lumps in the scenario_header.

Part 0: The Main File (scenario)

There are two parts to a scenario: the header, and the lump data.

Structure

Name Type Description
header scenario_header Header of the scenario
lumps stream<lump> Lumps contained in scenario (length determined from length of lump_types in header)

Part 1: The Header (scenario_header)

The header stores much of the initial settings of the file when it was created, like the map size.

Structure

Name Type Description
scenario_size u32 Size of the following scenario. Usually the size of the file minus 4.
name latin_string Name this file was saved as. Includes the file extension.
description latin_string Description of the scenario. Defaults to "No description provided."
version version Header version, usually the same as the lump version.
player_list latin_string A string containing the names of all players, separated by spaces. Spaces already existing in player names are not escaped.
date latin_string A formatted date, containing the time this file was saved at.
unknown_0 u8 Unknown
players array<header_player> Initial settings for the players, like color and starting_citizens.
settings settings Initial settings for the scenario.
campaign_name latin_string Name of the campaign this save file is from, for example EETheGreeks.
scenario_name latin_string Name of the scenario file in the campaign.
unknown_1 u32 Unknown
unknown_2 u8 Unknown
forced_name latin_string The name the player must be when playing a scenario.
unknown_3 u32 Unknown
lump_types array<u32> The lump types that will appear, in order. Length determines count of lumps.
text scenario_text Scenario text (history, instructions, hints, etc.)
sys_uptime u32 System uptime when this file was saved, in milliseconds.

Part 1.1: Header Player Settings (header_player)

This is a limited subset of player information containing the initial player settings.

Structure

Name Type Description
unknown_0 u8 Unknown
unknown_1 u8 Unknown
shared_los bool Whether other players on the same team as this player can see what this player can see (shared line of sight)
flags u32 See Part 1.1.1: Header Player Flags
name latin_string The username of this player. The scenario editor defaults to "Human" and "Computer".
unknown_2 f32 Unknown
id u32 Id of the player
color u32 Color index of the player (0-16)
team u32 Team the player is on
starting_citizens u32 Amount of citizens the player started with

Part 1.1.1: Header Player Flags

Some simple flags about players. THIS IS NOT VERIFIED.

Bit mappings

Name Bit mask Description
human 0x1 Is this player a human (non-AI) player?
inactive 0x2 Is this player inactive?
defeated 0x4 Has this player been defeated?

Part 1.2: Scenario settings (settings)

Settings used initially in the scenario. These are usually overridden by values stored in lumps.

Structure

Name Type Description
unknown_0 u8 Unknown
unknown_1 u8 Unknown
unknown_2 u8 Unknown
game_speed u32 Enumeration representing the game speed
unknown_3 u32 Unknown
game_variant u32 Link to an entry in dbgamevariant
map_size u32 Enumeration representing the map size
start_epoch u32 Link to a dbtechtree epoch id
end_epoch u32 Link to a dbtechtree epoch id
resources u32 Link to a dbstartingresources entry
max_units u32 Maximum units for the game, this is divided
wonders_for_victory u32 Number of wonders a player must own to start the victory countdown timer.
ai_difficulty u32 Difficulty of the AI: Easy, Medium, or Hard
victory_allowed bool Can victory be attained through eliminating all opposing players, or a wonder victory?
lock_teams bool Can players switch thier diplomacy while in game?
lock_speed bool Can the speed by changed while in game?
reveal_map bool Is the initial map revealed to all players at the start of the game?
cheats bool Are cheats enabled (cheat codes)
unknown_4 u8 Unknown
custom_civs bool Do players choose custom civilizations or predefined ones?
unknown_6 u8 Unknown

Part 1.3: Scenario Text (scenario_text)

This is the scenario text. It also appears in the Triggers lump. The version here is the initial version, the version in the Triggers lump can be modified.

Structure

Name Type Description
unknown latin_string Unknown
hints latin_string Hints for the scenario for things that are not easy to figure out (gotchas)
history latin_string Historical background of the scenario
movie latin_string VFS path to a video file.
map latin_string VFS path to an image to be displayed in the background.
instructions latin_string Instructions for completion of the scenario.
soundover latin_string VFS path to an audio file to be played during the scenario briefing.

Part 2: Lump data (lump)

Lumps store the bulk of the data and are commonly compressed. When compressed, they start with PK01 and have a compression header. There is no other known way to determine lump compression.

Structure

Name Type Description
version version Version of this lump, should match the header version.
type lump_type Type ID of this lump
data array<u8> The data in this lump. It may be compressed with DCL Implode.

Part 2.1: Lump types enumeration (lump_type)

A u32 representing the following enumeration.

Enumeration

Name Id Description
Unknown 1 Unknown
Seed 2 A single u32 containing the seed of the scenario.
CameraPosition 3 3 f32s representing the position of the camera.
Terrain 4 The terrain of the map. Unknown structure
PlayerData 5 Player-local data like the techtree, units, civilization, etc.
Triggers 6 Trigger data and the current state of the scenario text.
[Misc](EE1 and EEAOC Format Misc Lump) 7 Miscellaneous data that does not belong in other places.
Unknown 8 Unknown
GfxEffects 10 All of the currently active GfxEffects.
Calamities 11 All of the currently active Calamities.
Unknown 12 Unknown