pub struct Are {Show 81 fields
pub unused_id: i32,
pub creator_id: i32,
pub version: u32,
pub comment: String,
pub name: GffLocalizedString,
pub tag: String,
pub on_heartbeat: ResRef,
pub on_user_defined: ResRef,
pub on_enter: ResRef,
pub on_exit: ResRef,
pub flags: u32,
pub camera_style: i32,
pub default_envmap: ResRef,
pub unescapable: bool,
pub restrict_mode: u8,
pub chance_rain: i32,
pub chance_snow: i32,
pub chance_lightning: i32,
pub wind_power: i32,
pub chance_fog: i32,
pub moon_ambient_color: u32,
pub moon_diffuse_color: u32,
pub moon_fog_color: u32,
pub sun_ambient_color: u32,
pub sun_diffuse_color: u32,
pub sun_fog_color: u32,
pub dynamic_ambient_color: u32,
pub moon_fog_near: f32,
pub moon_fog_far: f32,
pub fog_near: f32,
pub fog_far: f32,
pub moon_fog_enabled: bool,
pub fog_enabled: bool,
pub moon_shadows: bool,
pub shadows: bool,
pub day_night_cycle: u8,
pub is_night: bool,
pub shadow_opacity: u8,
pub lighting_scheme: u8,
pub no_rest: bool,
pub mod_spot_check: i32,
pub mod_listen_check: i32,
pub grass_diffuse_color: u32,
pub grass_ambient_color: u32,
pub grass_density: f32,
pub grass_size: f32,
pub grass_texture: ResRef,
pub grass_prob_ll: f32,
pub grass_prob_lr: f32,
pub grass_prob_ul: f32,
pub grass_prob_ur: f32,
pub alpha_test: f32,
pub stealth_xp_max: u32,
pub stealth_xp_current: u32,
pub stealth_xp_loss: u32,
pub stealth_xp: bool,
pub trans_pending: u8,
pub trans_pend_next_id: u8,
pub trans_pend_curr_id: u8,
pub loadscreen_id: u16,
pub rooms: Vec<AreRoom>,
pub expansion_list: Vec<AreExpansionEntry>,
pub map: AreMap,
pub mini_game: Option<AreMiniGame>,
pub disable_transit: bool,
pub no_hang_back: bool,
pub player_only: bool,
pub player_vs_player: u8,
pub grass_emissive_color: u32,
pub dirty_argb_one: i32,
pub dirty_size_one: i32,
pub dirty_formula_one: i32,
pub dirty_func_one: i32,
pub dirty_argb_two: i32,
pub dirty_size_two: i32,
pub dirty_formula_two: i32,
pub dirty_func_two: i32,
pub dirty_argb_three: i32,
pub dirty_size_three: i32,
pub dirty_formula_three: i32,
pub dirty_func_three: i32,
}Expand description
Typed ARE model built from/to Gff data.
Fields§
§unused_id: i32Legacy area id (ID).
creator_id: i32Legacy creator id (Creator_ID).
version: u32Area format version (Version).
comment: StringToolset/comment field (Comments).
name: GffLocalizedStringLocalized area name (Name).
tag: StringArea tag (Tag). Engine always lowercases this on load.
on_heartbeat: ResRefHeartbeat script resref (OnHeartbeat).
on_user_defined: ResRefUser-defined event script resref (OnUserDefined).
on_enter: ResRefEnter script resref (OnEnter).
on_exit: ResRefExit script resref (OnExit).
flags: u32Area flags (Flags).
camera_style: i32Camera style ID (CameraStyle).
default_envmap: ResRefDefault environment map resref (DefaultEnvMap).
unescapable: boolUnescapable area flag (Unescapable).
restrict_mode: u8Restrict mode (RestrictMode) - triggers UnstealthParty on non-zero change.
chance_rain: i32Chance of rain (ChanceRain, K2). Engine discards if interior. Truncated to byte (0-255) at runtime.
chance_snow: i32Chance of snow (ChanceSnow, K2). Engine discards if interior. Truncated to byte (0-255) at runtime.
chance_lightning: i32Chance of lightning (ChanceLightning, K2). Engine discards if interior. Truncated to byte (0-255) at runtime.
wind_power: i32Wind power (WindPower). Engine discards if interior. Truncated to byte (0-255) at runtime.
chance_fog: i32Chance of fog (ChanceFog).
moon_ambient_color: u32Moon ambient color (MoonAmbientColor).
moon_diffuse_color: u32Moon diffuse color (MoonDiffuseColor).
moon_fog_color: u32Moon fog color (MoonFogColor).
sun_ambient_color: u32Sun ambient color (SunAmbientColor).
sun_diffuse_color: u32Sun diffuse color (SunDiffuseColor).
sun_fog_color: u32Sun fog color (SunFogColor).
dynamic_ambient_color: u32Dynamic ambient color (DynAmbientColor).
moon_fog_near: f32Moon fog near distance (MoonFogNear). Clamped to >= 0.0 by the engine.
The absent value is far enough out that fog is effectively off, which
is a different outcome from the 0.0 a reader reaching for a plain
zero would produce. All four *FogNear/*FogFar reads resolve to it.
moon_fog_far: f32Moon fog far distance (MoonFogFar). Clamped to >= 0.0 by the engine.
fog_near: f32Sun fog near distance (SunFogNear). Clamped to >= 0.0 by the engine.
fog_far: f32Sun fog far distance (SunFogFar). Clamped to >= 0.0 by the engine.
moon_fog_enabled: boolMoon fog enabled (MoonFogOn).
fog_enabled: boolSun fog enabled (SunFogOn).
moon_shadows: boolMoon shadows enabled (MoonShadows).
shadows: boolSun shadows enabled (SunShadows).
day_night_cycle: u8Day/night cycle flag (DayNightCycle).
is_night: boolIs-night flag (IsNight).
shadow_opacity: u8Shadow opacity (ShadowOpacity).
lighting_scheme: u8Lighting scheme (LightingScheme).
no_rest: boolNo-rest flag (NoRest).
mod_spot_check: i32Mod spot-check modifier (ModSpotCheck).
mod_listen_check: i32Mod listen-check modifier (ModListenCheck).
grass_diffuse_color: u32Grass diffuse color (Grass_Diffuse).
grass_ambient_color: u32Grass ambient color (Grass_Ambient).
grass_density: f32Grass density (Grass_Density).
grass_size: f32Grass quad size (Grass_QuadSize).
grass_texture: ResRefGrass texture resref (Grass_TexName).
grass_prob_ll: f32Grass probability lower-left (Grass_Prob_LL).
grass_prob_lr: f32Grass probability lower-right (Grass_Prob_LR).
grass_prob_ul: f32Grass probability upper-left (Grass_Prob_UL).
grass_prob_ur: f32Grass probability upper-right (Grass_Prob_UR).
alpha_test: f32Alpha test threshold (AlphaTest).
stealth_xp_max: u32Stealth XP max (StealthXPMax).
stealth_xp_current: u32Current stealth XP counter (StealthXPCurrent, save-state).
A chained default, not an independent one: the engine’s read falls
back to whatever StealthXPMax just resolved to. A plain zero here
starts an area with no stealth budget where the engine would start it
with the full one, which is why the read is this view’s.
Not clamped to the max afterwards, though the engine does clamp. That happens after the read and is resolution rather than the file’s own content, and this view projects the file.
stealth_xp_loss: u32Stealth XP loss (StealthXPLoss).
stealth_xp: boolStealth XP enabled (StealthXPEnabled).
trans_pending: u8Transition pending flag (TransPending, save-state).
trans_pend_next_id: u8Transition pending next ID (TransPendNextID, save-state).
trans_pend_curr_id: u8Transition pending current ID (TransPendCurrID, save-state).
loadscreen_id: u16Load screen ID (LoadScreenID).
rooms: Vec<AreRoom>Embedded room metadata (Rooms list).
expansion_list: Vec<AreExpansionEntry>Area expansion entries (Expansion_List list).
map: AreMapEmbedded map metadata (Map struct).
mini_game: Option<AreMiniGame>MiniGame struct (MiniGame).
disable_transit: boolDisable transit flag (DisableTransit). Toolset/K2-specific, ignored by K1 engine.
no_hang_back: boolNo-hang-back flag (NoHangBack). Toolset/K2-specific, ignored by K1 engine.
player_only: boolPlayer-only flag (PlayerOnly). Toolset/K2-specific, ignored by K1 engine.
player_vs_player: u8Player-vs-player mode (PlayerVsPlayer). Toolset/K2-specific, ignored by K1 engine.
grass_emissive_color: u32Grass emissive color (Grass_Emissive).
dirty_argb_one: i32Dirty overlay color one (DirtyARGBOne).
dirty_size_one: i32Dirty overlay size one (DirtySizeOne).
dirty_formula_one: i32Dirty overlay formula one (DirtyFormulaOne).
dirty_func_one: i32Dirty overlay func one (DirtyFuncOne).
dirty_argb_two: i32Dirty overlay color two (DirtyARGBTwo).
dirty_size_two: i32Dirty overlay size two (DirtySizeTwo).
dirty_formula_two: i32Dirty overlay formula two (DirtyFormulaTwo).
dirty_func_two: i32Dirty overlay func two (DirtyFuncTwo).
dirty_argb_three: i32Dirty overlay color three (DirtyARGBThree).
dirty_size_three: i32Dirty overlay size three (DirtySizeThree).
dirty_formula_three: i32Dirty overlay formula three (DirtyFormulaThre).
dirty_func_three: i32Dirty overlay func three (DirtyFuncThree).
Implementations§
Source§impl Are
impl Are
Sourcepub const PARTS: &'static [&'static [Field]]
pub const PARTS: &'static [&'static [Field]]
This type’s schema in parts, which is what a container holding it references.
Own fields first, then one part per flattened child in the order they are declared.
Sourcepub fn read_declared(root: &GffStruct) -> Self
pub fn read_declared(root: &GffStruct) -> Self
Reads every declared field off root.
Absent fields take the entry’s own answer, so a fallback is derived from the declaration rather than restated beside it.
A field declaring a hand-written read is left at that answer for the view to overwrite.
Sourcepub fn write_declared(&self, root: &mut GffStruct)
pub fn write_declared(&self, root: &mut GffStruct)
Writes every declared field onto root, leaving out the ones
their entry says the engine’s own writer leaves out.
A field declaring a hand-written write is not touched here.