OptionValue Dakka_StartMode_Health
{
    0, "No change"
    1, "100 health"
    2, "100 health + green armor"
    3, "200 health + blue armor"
    4, "Megasphere"
    5, "Quake (heal up to 50)"
}

OptionValue Dakka_StartMode_Weapons
{
    0, "Keep them"
    2, "Pistol start"
    3, "Up to shotgun"
    4, "Up to minigun"
    5, "Up to impaler + SSG"
    6, "Up to lancer"
    7, "Up to BFG"
    1, "Custom"
}

OptionValue Dakka_StartMode_Ammo
{
    0, "Keep it"
    1, "Reset ammo (low)"
    2, "Reset ammo (high)"
    3, "Max out ammo"
    4, "Pistol ammo only"
    5, "Custom"
}

OptionValue Dakka_BackpackStart
{
    -1, "Take on new map"
     0, "Keep it"
     1, "Give on new map"
}

OptionValue Dakka_KeepScore
{
    0, "Reset all"
    1, "Reset rewards"
    2, "Reset bar progress"
    3, "Keep all"
}

OptionValue Dakka_IgnoreHubs
{
    0, "Don't reset"
    1, "Do resets"
}

OptionValue Dakka_RewardTypes
{
    0, "Ammo regen, then life"
    1, "Life, then ammo regen"
    2, "Just ammo regen"
    3, "Just lives"
    4, "None"
}


OptionValue Dakka_PowerLevel
{
    -11, "10x weaker"
    -10, "5x weaker"
    -9,  "4x weaker"
    -8,  "3x weaker"
    -7,  "2.5x weaker"
    -6,  "2x weaker"
    -5,  "1.66x weaker"
    -4,  "1.5x weaker"
    -3,  "1.33x weaker"
    -2,  "1.25x weaker"
    -1,  "1.1x weaker"
     0,  "standard"
     1,  "1.1x stronger"
     2,  "1.25x stronger"
     3,  "1.33x stronger"
     4,  "1.5x stronger"
     5,  "1.66x stronger"
     6,  "1.75x stronger"
     7,  "2x stronger"
     8,  "2.5x stronger"
     9,  "3x stronger"
     10, "4x stronger"
     11, "5x stronger"
}

OptionValue Dakka_DefenseLevel
{
    -12, "5x weaker"
    -11, "4x weaker"
    -10, "3x weaker"
     -9, "2.5x weaker"
     -8, "2x weaker"
     -7, "1.75x weaker"
     -6, "1.66x weaker"
     -5, "1.5x weaker"
     -4, "1.33x weaker"
     -3, "1.25x weaker"
     -2, "1.2x weaker"
     -1, "1.1x weaker"
      0, "standard"
      1, "1.1x tougher"
      2, "1.25x tougher"
      3, "1.33x tougher"
      4, "1.5x tougher"
      5, "1.66x tougher"
      6, "2x tougher"
      7, "3x tougher"
      8, "4x tougher"
      9, "5x tougher"
     10, "10x tougher"
}

OptionValue Dakka_VanillaHealthArmor
{
    0, "Off"
    1, "On (strong bonuses)"
    2, "On (vanilla bonuses)"
}

OptionValue Dakka_CustomWep
{
   -1, "Take on new map"
    0, "Leave as is"
    1, "Give on new map"
}

OptionValue Dakka_CanUseAmmoCheck
{
    0, "Check usability"
    1, "Don't check"
}

OptionValue Dakka_NoAmmoClick
{
    0, "Off"
    1, "On"
    2, "On + low ammo"
}

OptionValue Dakka_AutoDetonate
{
    0, "Off"
    1, "On enemies"
    2, "On"
}

OptionValue Dakka_FullerAuto
{
    0, "Fire + Alt-fire"
    1, "Fire + Zoom"
    2, "Fire + Reload"
}

OptionValue Dakka_FlamethrowerStyle
{
    0, "New"
    1, "Old"
}

OptionValue OffOn
{
    0, "On"
    1, "Off"
}

OptionValue Dakka_RecoilMode
{
    0, "Linear"
    1, "Curved"
    2, "Smooth"
}

OptionValue Dakka_TracerMode
{
    0, "Off"
    1, "Only mine"
    2, "For everyone"
}

OptionValue Dakka_TracerSpeed
{
    64,   "Snail"
    128,  "Slow"
    256,  "Medium"
    512,  "Fast"
    2048, "Lightning"
}

OptionValue Dakka_BonusTime
{
    0,   "0 seconds"
    35,  "0.5 seconds"
    53,  "1 second"
    70,  "1.5 seconds"
    88,  "2 seconds"
    105, "2.5 seconds"
    123, "3 seconds"
}

OptionValue Dakka_TracerDensity
{
    -4, "200% sparser"
    -3, "150% sparser"
    -2, "100% sparser"
    -1, "50% sparser"
     0, "Default"
     1, "50% denser"
     2, "100% denser"
     3, "150% denser"
     4, "200% denser"
}



OptionMenu Dakka_GameOptions
{
    Title "DAKKA (Game options)"

    StaticText "General options", 1

    Slider "Scrap factor",          "dakka_scrapfactor",          0, 1000, 10, 0
    Option "Infinite pistol ammo",  "dakka_infinitepistol",       "OnOff"
    Option "Damage multiplier",     "dakka_powerlevel",           "Dakka_PowerLevel"
    Option "Defense multiplier",    "dakka_defenselevel",         "Dakka_DefenseLevel"
    Option "Score rewards",         "dakka_score_rewardtypes",    "Dakka_RewardTypes"
    Option "Vanilla health/armor",  "dakka_vanillahealtharmor",   "Dakka_VanillaHealthArmor"

    StaticText ""
    StaticText "Level start options", 1

    Option "Health+armor mode", "dakka_startmode_health",    "Dakka_StartMode_Health"
    Option "Ammo mode",         "dakka_startmode_ammo",      "Dakka_StartMode_Ammo"
    Option "Weapon mode",       "dakka_startmode_weapons",   "Dakka_StartMode_Weapons"
    Option "Backpack mode",     "dakka_startmode_backpack",  "Dakka_BackpackStart"
    Option "Score mode",        "dakka_startmode_score",     "Dakka_KeepScore"
    Option "When in a hub",     "dakka_ignorehubs",          "Dakka_IgnoreHubs"

    StaticText ""
    StaticText "Shotgun to SSG", 1
    StaticText "Carry a shotgun around for X maps,"
    StaticText "and you find super shotguns instead."
    StaticText "(This is mainly for Doom 1 maps)"
    StaticText ""

    Slider "Maps needed",       "dakka_shotgun2ssg",      0, 8, 1, 0
    
    StaticText ""
    
    Submenu "Score fine-tuning", "Dakka_ScoreOptions"
    Submenu "Custom start options", "Dakka_CustomStartValues"
}


OptionMenu Dakka_ScoreOptions
{
    Title "DAKKA (Score fine-tuning)"
    
    StaticText "These options tweak how DAKKA calculates", 1
    StaticText "reward thresholds. The defaults are given", 1
    StaticText "just in case.", 1
    StaticText ""
    StaticText "You probably don't need to touch this.", 1
    StaticText ""
    
    Slider "Lower enemy bound (140)",   "dakka_score_monstermin",         0,  2000,   10, 0
    Slider "Upper enemy bound (800)",   "dakka_score_monstermax",         0,  2000,   10, 0
    Slider "Enemy count scalar (50%)",  "dakka_score_monsterscalar",      5,   400,    5, 0
    Slider "Rounding interval (5000)",  "dakka_score_interval",        1000, 20000, 1000, 0
    
    StaticText ""
    
    Option "Debug info",                "dakka_debug_score",    "OnOff"
}


OptionMenu Dakka_CustomStartValues
{
    Title "DAKKA (Custom start options)"
    
    StaticText "Custom weapon start mode", 1
    
    Option "Scrappers",         "dakka_startwep_scrappers",     "Dakka_CustomWep"
    Option "Pistols",           "dakka_startwep_pistols",       "Dakka_CustomWep"
    Option "Shotgun",           "dakka_startwep_shotgun",       "Dakka_CustomWep"
    Option "Super shotgun",     "dakka_startwep_supershotgun",  "Dakka_CustomWep"
    Option "Minigun",           "dakka_startwep_minigun",       "Dakka_CustomWep"
    Option "Impaler",           "dakka_startwep_impaler",       "Dakka_CustomWep"
    Option "Lancer",            "dakka_startwep_lancer",        "Dakka_CustomWep"
    Option "BFG9000",           "dakka_startwep_bfg9000",       "Dakka_CustomWep"
    
    StaticText ""
    StaticText "Custom ammo start mode", 1
    StaticText "Negative values mean \"leave alone\"."
    StaticText ""
    
    Slider "Scrap",             "dakka_startammo_scrap",       -12,  480, 12, 0
    Slider ".50AE (pistols)",   "dakka_startammo_50ae",        -14,  420, 14, 0
    Slider "Shells",            "dakka_startammo_shells",       -4,  200,  4, 0
    Slider "Grenades",          "dakka_startammo_grenades",     -2,   60,  2, 0
    Slider "5mm (minigun)",     "dakka_startammo_5mm",         -20, 1000, 20, 0
    Slider "Flamer fuel",       "dakka_startammo_flamer",       -4,   80,  4, 0
    Slider "Rockets",           "dakka_startammo_rockets",      -6,  240,  6, 0
    Slider "Cells",             "dakka_startammo_cells",       -20,  800, 20, 0
    
    StaticText ""
    StaticText "Check ammo usability", 1
    StaticText "Normally, you only keep ammo"
    StaticText "that you have a weapon for."
    StaticText ""
    
    Option "Scrap",             "dakka_startammo_scrap_always",     "Dakka_CanUseAmmoCheck"
    Option ".50AE (pistols)",   "dakka_startammo_50ae_always",      "Dakka_CanUseAmmoCheck"
    Option "Shells",            "dakka_startammo_shells_always",    "Dakka_CanUseAmmoCheck"
    Option "Grenades",          "dakka_startammo_grenades_always",  "Dakka_CanUseAmmoCheck"
    Option "5mm (minigun)",     "dakka_startammo_5mm_always",       "Dakka_CanUseAmmoCheck"
    Option "Flamer fuel",       "dakka_startammo_flamer_always",    "Dakka_CanUseAmmoCheck"
    Option "Rockets",           "dakka_startammo_rockets_always",   "Dakka_CanUseAmmoCheck"
    Option "Cells",             "dakka_startammo_cells_always",     "Dakka_CanUseAmmoCheck"
}



OptionMenu "Dakka_UserOptions"
{
    Title "DAKKA (User options)"
    
    Submenu "Weapon bindings", "Dakka_WeaponBinds"
    
    StaticText ""

    Slider "Recoil factor",         "dakka_cl_recoil",     0, 200, 10, 0
    Slider "Recoil reset factor",   "dakka_cl_recoildown", 0, 100,  5, 0
    Option "Recoil reset mode",     "dakka_cl_recoilmodedown", "Dakka_RecoilMode"
    Option "Interpolate recoil",    "dakka_cl_norecoilinterp", "OffOn"

    StaticText ""

    Option "Bullet tracers",        "dakka_cl_tracermode",         "Dakka_TracerMode"
    Option "Particle tracers",      "dakka_cl_particletracers",    "OnOff"
    Option "Tracer speed",          "dakka_cl_tracerspeed",        "Dakka_TracerSpeed"
    Option "Tracer density",        "dakka_cl_tracerdensity",      "Dakka_TracerDensity"

    StaticText ""
    
    Slider "Score scale",           "dakka_cl_scorescale", 25, 400, 25, 0
    Slider "Score position (X)",    "dakka_cl_scorex",     0,  100,  5, 0
    Slider "Score position (Y)",    "dakka_cl_scorey",     0,  100,  5, 0
    
    StaticText ""

    Option "Hide score",            "dakka_cl_hidescore",          "OnOff"
    Option "Flash score on kill",   "dakka_cl_flashscore",         "OnOff"
    Option "Bonus display time",    "dakka_cl_bonustime",          "Dakka_BonusTime"

    StaticText ""
    
    Option "No score rewards",      "dakka_cl_noscorerewards",     "OnOff"
    Option "Grenades auto-explode", "dakka_cl_autodetonate",       "Dakka_AutoDetonate"
    Option "Minigun RPM boost",     "dakka_cl_fullerautostyle",    "Dakka_FullerAuto"
    Option "SSG double tap",        "dakka_cl_ssgrollfire",        "OnOff"

    StaticText ""

    Option "Out-of-ammo sound",     "dakka_cl_noammoclick",        "Dakka_NoAmmoClick"
    Option "Flamethrower style",    "dakka_cl_flamethrowerstyle",  "Dakka_FlamethrowerStyle"
    Option "Less intensive effects","dakka_cl_lesseffects",        "OnOff"
    Option "Dumb pickup messages",  "dakka_cl_moremessages",       "OnOff"
    
    StaticText ""
    StaticText "SSG double tap: Use one fire mode twice,", 1
    StaticText "by pulling both triggers almost at once", 1
    StaticText ""
    StaticText "Particle tracers do not work in Zandronum!", 1
}


OptionMenu "Dakka_WeaponBinds"
{
    Title "DAKKA (Weapon bindings)"
    
    StaticText "Take full advantage of the quick swapping!", 1
    StaticText "These binds only apply when DAKKA is loaded.", 1
    StaticText ""
    StaticText "For two-weapon binds, the second weapon is", 1
    StaticText "used if the first weapon is either in your", 1
    StaticText "hands, or missing from your inventory.", 1
    StaticText ""
    
    Control "Fists",               "dakka_wep_fists"
    Control "Scrappers",           "dakka_wep_scrappers"
    Control "Fists or scrappers",  "dakka_wep_fists_scrappers"
    Control "Scrappers or fists",  "dakka_wep_scrappers_fists"
    Control "Pistols",             "dakka_wep_pistols"
    Control "Shotgun",             "dakka_wep_shotgun"
    Control "SSG",                 "dakka_wep_ssg"
    Control "Shotgun or SSG",      "dakka_wep_shotgun_ssg"
    Control "SSG or shotgun",      "dakka_wep_ssg_shotgun"
    Control "Minigun",             "dakka_wep_minigun"
    Control "Impaler",             "dakka_wep_impaler"
    Control "Lancer",              "dakka_wep_lancer"
    Control "BFG9000",             "dakka_wep_bfg9000"
}


ListMenu Dakka_Options
{
    IfGame(Doom, Chex)
    {
        StaticPatch 94, 2, "M_DOOM"
        Position 75, 72

        IfOption(ReadThis)
        {
            Position 75, 64
        }
    }

    IfGame(Strife)
    {
        StaticPatch 84, 2, "M_STRIFE"
        Position 73, 45
    }

    IfGame(Heretic)
    {
        StaticPatch 88, 0, "M_HTIC"
        StaticPatch 40, 10, "M_SKL01"
        StaticPatch 232, 10, "M_SKL00"
        Position 98, 56
    }

    IfGame(Hexen)
    {
        StaticPatch 88, 0, "M_HTIC"
        StaticPatch 37, 80, "FBULB0"
        StaticPatch 278, 80, "FBULA0"
        Position 98, 56
    }

    //Font "CONFONT", "White"
    //StaticTextCentered 160, 70, "NOTE! Only user options"
    //StaticTextCentered 160, 78, "are saved between sessions."

    IfGame(Doom)
    {
        Font "DBIGFON2", "Grey"
        TextItem "Game Options", "g", "Dakka_GameOptions"
        TextItem "User Options", "u", "Dakka_UserOptions"

        Font "DBIGFON2", "Brick"
        TextItem "Read This!",   "h", "ReadThisMenu"
    }

    IfGame(Chex,Strife)
    {
        Font "BIGFONT", "Untranslated"
        TextItem "Game Options", "g", "Dakka_GameOptions"
        TextItem "User Options", "u", "Dakka_UserOptions"

        Font "BIGFONT", "Brick"
        TextItem "Read This!",   "h", "ReadThisMenu"
    }

    IfGame(Heretic)
    {
        Font "BIGFONT", "Untranslated"
        TextItem "Game Options", "g", "Dakka_GameOptions"
        TextItem "User Options", "u", "Dakka_UserOptions"

        Font "BIGFONT", "Dakka_HereticMenu"
        TextItem "Read This",    "h", "ReadThisMenu"
    }

    IfGame(Hexen)
    {
        Font "BIGFONT", "Untranslated"
        TextItem "Game Options", "g", "Dakka_GameOptions"
        TextItem "User Options", "u", "Dakka_UserOptions"

        Font "BIGFONT", "Dakka_HexenMenu"
        TextItem "Read This",    "h", "ReadThisMenu"
    }
}


ListMenu MainMenu
{
    IfGame(Doom, Chex)
    {
        StaticPatch 94, 2, "M_DOOM"
        Position 97, 72

        IfOption(ReadThis)
        {
            Position 97, 64
        }
    }

    IfGame(Strife)
    {
        StaticPatch 84, 2, "M_STRIFE"
        Position 97, 45
    }

    IfGame(Heretic)
    {
        StaticPatch 88, 0, "M_HTIC"
        StaticPatch 40, 10, "M_SKL01"
        StaticPatch 232, 10, "M_SKL00"
        Position 110, 56
    }

    IfGame(Hexen)
    {
        StaticPatch 88, 0, "M_HTIC"
        StaticPatch 37, 80, "FBULB0"
        StaticPatch 278, 80, "FBULA0"
        Position 110, 56
    }

    IfGame(Doom)
    {
        PatchItem "M_NGAME", "n", "PlayerclassMenu"
        ifOption(SwapMenu)
        {
            PatchItem "M_LOADG", "l", "LoadGameMenu"
            PatchItem "M_SAVEG", "s", "SaveGameMenu"
            PatchItem "M_OPTION","o", "OptionsMenu"
        }
        else
        {
            PatchItem "M_OPTION","o", "OptionsMenu"
            PatchItem "M_LOADG", "l", "LoadGameMenu"
            PatchItem "M_SAVEG", "s", "SaveGameMenu"
        }


        Font "DBIGFON2", "Brick"
        TextItem "Dakka", "d", "Dakka_Options"

        Font "BIGFONT", "Red"
        PatchItem "M_QUITG", "q", "QuitMenu"
    }

    IfGame(Strife, Chex)
    {
        PatchItem "M_NGAME", "n", "PlayerclassMenu"
        ifOption(SwapMenu)
        {
            PatchItem "M_LOADG", "l", "LoadGameMenu"
            PatchItem "M_SAVEG", "s", "SaveGameMenu"
            PatchItem "M_OPTION","o", "OptionsMenu"
        }
        else
        {
            PatchItem "M_OPTION","o", "OptionsMenu"
            PatchItem "M_LOADG", "l", "LoadGameMenu"
            PatchItem "M_SAVEG", "s", "SaveGameMenu"
        }


        Font "BIGFONT", "Brick"
        TextItem "Dakka", "d", "Dakka_Options"

        Font "BIGFONT", "Untranslated"
        PatchItem "M_QUITG", "q", "QuitMenu"
    }

    IfGame(Heretic)
    {
        TextItem "$MNU_NEWGAME", "n", "PlayerclassMenu"
        TextItem "$MNU_OPTIONS", "o", "OptionsMenu"
        TextItem "$MNU_GAMEFILES", "g", "GameFilesMenu"
        Font "BIGFONT", "Dakka_HereticMenu"
        TextItem "Dakka", "d", "Dakka_Options"
        Font "BIGFONT", "Untranslated"
        TextItem "$MNU_QUITGAME", "q", "QuitMenu"
    }

    IfGame(Hexen)
    {
        TextItem "$MNU_NEWGAME", "n", "PlayerclassMenu"
        TextItem "$MNU_OPTIONS", "o", "OptionsMenu"
        TextItem "$MNU_GAMEFILES", "g", "GameFilesMenu"
        Font "BIGFONT", "Dakka_HexenMenu"
        TextItem "Dakka", "d", "Dakka_Options"
        Font "BIGFONT", "Untranslated"
        TextItem "$MNU_QUITGAME", "q", "QuitMenu"
    }
}
