modname "mod_aio_goldfinger"
modversion "6.0.0"
modauthor "Jonaeru / Atari-Dude"

# ==========================================================================
# mod_aio_goldfinger
#
# DERIVED WORK - NOT ORIGINAL. Generated by tools/aio/layout.py from
# the Perfect Dark All in One 6.0 distribution (pd-aio-6.0), for the fojo
# modloader. It carries mod_goldfinger_64's level data and textures.
#
# Left out of this mod: the 166 C* / 68 G* models and 3 sequences every pack ships (see mod_aio_characters).
#
# Every credit and revision-history line from the source modconfig(s) is
# reproduced below unaltered. The level, model and texture work is the
# original authors'.
# ==========================================================================

# --- begin text carried over verbatim from pd-aio-6.0/mod_goldfinger_64/modconfig.txt ---
# Goldfinger 64 Mod for All in One Mod v1
# Author: Jonaeru / Atari-Dude

# Goldfinger 64
# http://n64vault.com/ge-campaigns:goldfinger-64

# Mall by MRKane
# Steel Mill by Garabuyo & Sogun
# Tunnels by Trevor
# Junkyard by Comet
# --- end carried-over text ---

# --- stage declarations from tools/aio/stages/mod_aio_goldfinger.txt (fojo-authored), re-slugged by slugmod ---
# ==========================================================================
# mod_goldfinger_stages
#
# DERIVED WORK - NOT ORIGINAL. This mod is a repackaging of
# PD_AIO_March_2026/mod_goldfinger_64 for the pd-fojo modloader. It carries
# the four Goldfinger 64 multiplayer arenas:
#   - the stage declarations below
#   - level data: bgdata/, Ump_setup*Z, P* props
#   - the textures those stages use
#
# Deliberately left out of this mod:
#   - 127 C* character models -> see mod_aio_characters / mod_gex_characters
#   - 38 G* gun and hand models -> byte-identical AIO baseline, not stage content
# Both sets are byte-identical to mod_allinone's copies; every mod in the
# distribution ships the same 165 files.
#
# The source modconfig declares NOTHING - it is comments only. Upstream runs
# these levels by shipping bg files under plain vanilla names and letting
# roster order settle the collision. Every file here has been through slugmod,
# so the names are this mod's alone and the stage blocks below are what makes
# the levels reachable.
#
# The blocks name their levels rather than picking a stage row. A name with no
# stage table row is allocated a free STAGE_EXTRA row and the choice is
# recorded under [MpStageSlots] in pd.ini, so it survives roster changes.
# constants.h labels STAGE_EXTRA20..23 Junkyard, Steel Mill, Mall and Tunnels -
# these four levels, by name - but two of those rows are already claimed by
# mod_aio_stages, so the labels are left as the historical note they are.
#
# Every credit line in the source modconfig.txt is reproduced below
# unaltered. The level work is the original authors'.
# ==========================================================================

# --- begin credits carried over from
# --- PD_AIO_March_2026/mod_goldfinger_64/modconfig.txt, verbatim ---
# Goldfinger 64 Mod for All in One Mod v1
# Author: Jonaeru / Atari-Dude

# Goldfinger 64
# http://n64vault.com/ge-campaigns:goldfinger-64

# Mall by MRKane
# Steel Mill by Garabuyo & Sogun
# Tunnels by Trevor
# Junkyard by Comet
# --- end carried-over credits ---

# Per-mod model scale overrides, lifted from the canonical AIO source
# 2026-09-20. jonaeru/perfect_dark @ allinone-latest carries a whole
# g_Goldfinger64ModelStates[NUM_MODELS] beside the vanilla table in
# src/game/modeldata/general.c, selected at src/game/propobj.c:2091 on
# g_ModNum == MOD_GOLDFINGER_64. It differs from vanilla in exactly two rows,
# and they are the two props this mod ships its own models for:
#   0x00c1 -> Pmulti_ammo_crate_goldfingerZ
#   0x00e2 -> Pbarrel_goldfingerZ
# Without these the pack's crates and barrels load at the vanilla 1.0 and
# render ten times the size they were authored at. 0x0199 / 4096 is
# 0.099853515625 exactly - the same figure the GE:X block uses.
ModelStates {
  0x00c1 { Scale 0.099853515625 }   # PMULTI_AMMO_CRATE -> Pmulti_ammo_crate_goldfingerZ
  0x00e2 { Scale 0.099853515625 }   # PBARREL           -> Pbarrel_goldfingerZ
}

# NOTE: the four block names below were assigned to the wrong geometry at
# import. AIO's own arena table (jonaeru setup.c g_MpArenas + LmpmenuE) says
# bg_arec = Tunnels, bg_crad = Mall, bg_mp11 = Junkyard, bg_ref = Steel Mill,
# and the arenanames now say so. The block names are kept because they are
# the [MpStageSlots] keys: renaming them would move the levels' rows.
stage "goldfinger_tunnels" {
  bgfile "bgdata/bg_arec_aio_goldfinger.seg"
  tilesfile "bgdata/bg_arec_tiles_aio_goldfingerZ"
  padsfile "bgdata/bg_arec_pads_aio_goldfingerZ"
  mpsetupfile "Ump_setuparec_aio_goldfingerZ"
  kind mp
  arenaname "Tunnels"
  author "Trevor"
  # lifted 2026-09-20 (lift-out/lift.py rule 3a): langbank lang.c:240 (STAGE_EXTRA23 -> LANGBANK_AREC); allocation pdmain.c:204 (STAGE_EXTRA23)
  langbank AREC
  allocation "-ml0 -me0 -mgfx200 -mvtx200 -ma400"
}

stage "goldfinger_mall" {
  bgfile "bgdata/bg_crad_aio_goldfinger.seg"
  tilesfile "bgdata/bg_crad_tiles_aio_goldfingerZ"
  padsfile "bgdata/bg_crad_pads_aio_goldfingerZ"
  mpsetupfile "Ump_setupcrad_aio_goldfingerZ"
  kind mp
  arenaname "Mall"
  author "MRKane"
  # lifted 2026-09-20 (lift-out/lift.py rule 3a): langbank lang.c:239 (STAGE_EXTRA22 -> LANGBANK_CRAD); allocation pdmain.c:203 (STAGE_EXTRA22)
  langbank CRAD
  allocation "-ml0 -me0 -mgfx200 -mvtx200 -ma400"
}

stage "goldfinger_junkyard" {
  bgfile "bgdata/bg_mp11_aio_goldfinger.seg"
  tilesfile "bgdata/bg_mp11_tiles_aio_goldfingerZ"
  padsfile "bgdata/bg_mp11_pads_aio_goldfingerZ"
  mpsetupfile "Ump_setupmp11_aio_goldfingerZ"
  kind mp
  arenaname "Junkyard"
  author "Comet"
  # lifted 2026-09-20 (lift-out/lift.py rule 3a): langbank lang.c:237 (STAGE_EXTRA20 -> LANGBANK_MP11); allocation pdmain.c:201 (STAGE_EXTRA20); env env.c:83 (STAGE_EXTRA20 fog, 'Junkyard (Same as Egyptian)')
  langbank MP11
  allocation "-ml0 -me0 -mgfx200 -mvtx200 -ma400"
  env {
    fog 996 1000
    near 10
    far 20000
    distfade 3000 10000 1500
    sky 0x103060
    suns none
    clouds 1 5000 0 0xffffff
    water 0 -5000 0 0x000000
    cloudsheight 0
  }
}

stage "goldfinger_steelmill" {
  bgfile "bgdata/bg_ref_aio_goldfinger.seg"
  tilesfile "bgdata/bg_ref_tiles_aio_goldfingerZ"
  padsfile "bgdata/bg_ref_pads_aio_goldfingerZ"
  mpsetupfile "Ump_setupref_aio_goldfingerZ"
  kind mp
  arenaname "Steel Mill"
  author "Garabuyo & Sogun"
  # lifted 2026-09-20 (lift-out/lift.py rule 3a): langbank lang.c:238 (STAGE_EXTRA21 -> LANGBANK_REF); allocation pdmain.c:202 (STAGE_EXTRA21); env env.c:84 (STAGE_EXTRA21 fog, 'Steel Mill (Same as Complex)')
  langbank REF
  allocation "-ml0 -me0 -mgfx200 -mvtx200 -ma400"
  env {
    fog 996 1000
    near 10
    far 5000
    distfade 0 0 0
    sky 0x280000
    suns none
    clouds 1 10000 0 0xdc0014
    water 0 -1000 0 0x000000
    cloudsheight 0
  }
}


