OptionMenu "RuneMenu"
{
    Title "Multi Runes Configuration"
	
    StaticText "Server Settings", 1
    StaticText ""
    TextField "Rune Drop Percent Chance", "drop_chance"
    Option "Rune Handling On Death", "runes_on_death", "RunePersistence"
    TextField "Strength Rune Damage Factor", "StrengthRuneDamageFactor"
    TextField "Resistance Rune Damage Factor", "ResistanceRuneDamageFactor"
    TextField "Prosperity Max Health Setting", "prosperity_max_health"
    TextField "Ammo Regeneration Rune Multiplier", "AmmoRegenerationMultiplier"
    TextField "Armor Regeneration Rune Multiplier", "ArmorRegenerationMultiplier"
    TextField "Ammo Regeneration Rune Speed Interval", "AmmoRegenerationSpeed"
    TextField "Armor Regeneration Rune Speed Interval", "ArmorRegenerationSpeed"
    Option "Disable High Jump Rune Height Adjustment", "LockHighJumpHeightChanges", "OnOff"
    TextField "Backpack Rune Speed Interval - In Seconds", "BackpackGiveSpeed"
    Option "Permit client database uploads to the server", "AllowDatabaseUpload", "OnOff"
    Option "Permit client database downloads from the server", "AllowDatabaseDownload", "OnOff"
    StaticText ""
    StaticText "Database Instructions", 1
    StaticText ""
    SubMenu "How To Download Or Upload A Database", "DBINSTRUCTIONS"
    StaticText ""
    StaticText "Database Actions", 1
    StaticText ""
    SubMenu "Manage Ammo & Armor Database", "DBMANAGE"
    Command "Download Database", "pukename DatabaseDownloadRequest"
    Command "Upload Database", "pukename DatabaseUploadRequest"
    Command "Show Server Ammo Names in Console (RCON Required)", "rcon pukename ListAmmoDB"
    Command "Show Server Armor Names in Console (RCON Required)", "rcon pukename ListArmorDB"
    StaticText ""
    StaticText  "Rune Status", 1
    StaticText ""
    Option "Blue Strength Rune", "BlueStrengthRuneStatus", "OnOff", "PowerStrength1Token"
    Option "Red Strength Rune", "RedStrengthRuneStatus", "OnOff", "PowerStrength2Token"
    Option "Green Strength Rune", "GreenStrengthRuneStatus", "OnOff", "PowerStrength3Token"
    Option "Blue Resistance Rune", "BlueResistanceRuneStatus", "OnOff", "PowerResistance1Token"
    Option "Red Resistance Rune", "RedResistanceRuneStatus", "OnOff", "PowerResistance2Token"
    Option "Green Resistance Rune", "GreenResistanceRuneStatus", "OnOff", "PowerResistance3Token"
    Option "Blue Regeneration Rune", "BlueRegenerationRuneStatus", "OnOff", "PowerRegeneration1Token"
    Option "Red Regeneration Rune", "RedRegenerationRuneStatus", "OnOff", "PowerRegeneration2Token"
    Option "Green Regeneration Rune", "GreenRegenerationRuneStatus", "OnOff", "PowerRegeneration3Token"
    Option "Rage Rune", "RageRuneStatus", "OnOff", "PowerRage1Token"
    Option "Prosperity Rune", "ProsperityRuneStatus", "OnOff", "PowerProsperity1Token"
    Option "Spread Rune", "SpreadRuneStatus", "OnOff", "PowerSpread1Token"
    Option "Reflection Rune", "ReflectionRuneStatus", "OnOff", "PowerReflection1Token"
    Option "Drain Rune", "DrainRuneStatus", "OnOff", "PowerDrain1Token"
    Option "High Jump Rune", "HighJumpRuneStatus", "OnOff", "PowerHighJump1Token"
    Option "Haste Rune", "HasteRuneStatus", "OnOff", "PowerHaste1Token"
    Option "Ammo Regeneration Rune", "AmmoRegenerationRuneStatus", "OnOff", "PowerAmmoRegeneration1Token"
    Option "Armor Regeneration Rune", "ArmorRegenerationRuneStatus", "OnOff", "PowerArmorRegeneration1Token"
    Option "Invulnerability Piercing Rune", "InvulnerabilityPiercingRuneStatus", "OnOff", "PowerInvulnerabilityPiercing1Token"
    Option "Backpack Rune", "BackpackRuneStatus", "OnOff", "PowerBackpack1Token"
    StaticText ""
    StaticText "High Jump Rune Setting", 1
    NumberField "High Jump Rune Height", "HighJumpRuneHeight", 0, 32768, 2, "PowerHighJump1Token"
    Command "Reset High Jump Rune Setting", "pukename ResetHighJumpSetting"
    StaticText ""
    StaticText "On-Screen Rune Position", 1
    NumberField "Horizontal Position", "horizontal_position", -2175, 2175, 25
    NumberField "Vertical Position", "vertical_position", -3850, 3850, 25
    Command "Reset Rune Position", "pukename ResetRuneScreenPosition"
}

OptionMenu "DBManage"
{
	Title "Database Management"

    StaticText "RCON access is required to use this menu."
    StaticText ""
    StaticText "Manage the item database for the Ammo and Armor"
    StaticText "Regeneration Runes. These runes require items to"
    StaticText "be registered here to function."
    StaticText ""
    StaticText "To add or remove an item, type its item name below"
    StaticText "and press enter. Then select the appropriate option"
    StaticText "to add or remove the item from the database."
	StaticText ""
	StaticText "Add Ammo", 1
	Textfield "Actor Name to Add: ", AddAmmo
	Command "Add Ammo to Database", "rcon pukename AddAmmoDB"
	StaticText ""
	StaticText "Remove Ammo", 1
	Textfield "Actor Name to Remove: ", RemoveAmmo
	Command "Remove Ammo from Database", "rcon pukename RemoveAmmoDB"
	StaticText ""
	StaticText "Add Armor", 1
	Textfield "Actor Name to Add: ", AddArmor
	Command "Add Armor to Database", "rcon pukename AddArmorDB"
	StaticText ""
	StaticText "Remove Armor", 1
	Textfield "Actor Name to Remove: ", RemoveArmor
	Command "Remove Armor from Database", "rcon pukename RemoveArmorDB"
}

OptionMenu "DBINSTRUCTIONS"
{
    Title "Database Transfer"

    StaticText "The Ammo and Armor Regeneration runes use a"
    StaticText "database file (if setup) in order to know"
    StaticText "which ammo and armor to regenerate."
    StaticText ""
    StaticText "Follow these steps to download or upload a database:"
    StaticText ""

    // Step 1: Prerequisite
    StaticText "1. Log into RCON."
    StaticText ""

    // Step 2: Client-side command
    StaticText "2. Set your local filename in the console:"
    StaticText "'databasefile FILENAME'."
    StaticText ""

    // Step 3: Server-side command
    StaticText "3. Set the server's filename using RCON:"
    StaticText "'rcon databasefile FILENAME'."
    StaticText ""

    // Step 4: Server setting
    StaticText "4. Ensure the server is configured to allow"
    StaticText "database transfers by enabling the chosen option"
    StaticText "within the 'Server Settings' section of the"
    StaticText "Rune Menu."
    StaticText ""

    // Step 5: Action
    StaticText "5. Go to the 'Database Actions' menu section and select"
    StaticText "'Download Database' or 'Upload Database'."
    StaticText ""

    // Confirmation messages
    StaticText "You will see messages when the transfer"
    StaticText "starts and when it is complete."
}

OptionValue "RunePersistence"
{
	0, "Lose"
	1, "Drop"
	2, "Keep"
}