A downloadable mod for Windows

🎮 AssaultCube Mod Development Guide

A comprehensive guide for developing AssaultCube mods using Lua


📋 Table of Contents


🌍 Languages / Idiomas / Языки

🇺🇸 English 🇪🇸 Español 🇷🇺 Русский

🇺🇸 English Version

⚡ Quick Start

TL;DR: Create .lua file → Write mod → COMPILE → Distribute

⚠️ CRITICAL: Only compiled mods work! Raw .lua files are ignored.

📋 Requirements

🔴 MANDATORY Compilation

❌ Raw .lua files → WILL NOT WORK
✅ Compiled mods → WILL WORK
The mod manager will ONLY load compiled mods. No exceptions.

📁 File Structure

  • Single .lua source file
  • File name = mod name (e.g., regenerative_health.lua)
  • Must be compiled before distribution

🧩 Required Code Components

Every mod MUST include:

1. Mod Information (Global variables):
modName = "Your Mod Name"
modDescription = "What your mod does"
2. Core Functions (Global functions):
function onEnable()  -- Called when enabled
    return true      -- Return true for success
end
function onDisable() -- Called when disabled
end
function update()    -- Called every game tick
    -- Your mod logic here
end

🔧 Available APIs

👤 Player Functions

Function Description Parameters/Returns
natives.safeGetHealth() Get current health Returns: number (0-100)
natives.safeSetHealth(value) Set player health Parameter: number (0-100)
natives.safeGetAmmo() Get primary weapon ammo Returns: number
natives.safeSetAmmo(value) Set primary weapon ammo Parameter: number
natives.resetPlayer() Reset to default state Health=100, Ammo=30
natives.getArmor() Get current armor Returns: number (0-100)
natives.setArmor(value) Set player armor value Parameter: number (0-100)
natives.safeGetArmor() Get current armor Returns: number (0-100)
natives.safeSetArmor(value) Set player armor value Parameter: number (0-100)

📖 Complete Example

Regenerative Health Mod - Heals player up to 50 health when below 50:

-- Mod Information
modName = "Regenerative Health"
modDescription = "Regenerates health up to 50 maximum at 5 health per second whenever below 50%"
-- Settings
local isRegenerating = false
local lastRegenerationTime = 0
local regenerationRate = 5
local maxHealthLimit = 50
local regenerationInterval = 1.0
-- Called when mod is enabled
function onEnable()
    isRegenerating = false
    lastRegenerationTime = os.clock()
    print("Regenerative Health Mod enabled!")
    return true
end
-- Called when mod is disabled
function onDisable()
    isRegenerating = false
    print("Regenerative Health Mod disabled!")
end
-- Called every tick while enabled
function update()
    local currentHealth = natives.safeGetHealth()
    if not currentHealth then return end
    processHealthRegeneration(currentHealth)
end
-- Regeneration logic
function processHealthRegeneration(currentHealth)
    local currentTime = os.clock()
    
    if currentHealth < maxHealthLimit and not isRegenerating then
        isRegenerating = true
        lastRegenerationTime = currentTime
        print("Health regeneration started at " .. currentHealth .. " health")
        
    elseif isRegenerating and currentHealth < maxHealthLimit then
        if currentTime - lastRegenerationTime >= regenerationInterval then
            local newHealth = math.min(currentHealth + regenerationRate, maxHealthLimit)
            natives.safeSetHealth(newHealth)
            lastRegenerationTime = currentTime
            print("Health regenerated: " .. currentHealth .. " -> " .. newHealth)
            
            if newHealth >= maxHealthLimit then
                isRegenerating = false
                print("Health regeneration completed")
            end
        end
        
    elseif isRegenerating and currentHealth >= maxHealthLimit then
        isRegenerating = false
        print("Health regeneration stopped")
    end
end

📦 Installation & Distribution

🔨 For Developers:

  1. ✍️ Write your .lua mod
  2. 🧪 Test your logic
  3. ⚙️ COMPILE using mod compiler tool
  4. 📤 Distribute compiled mod

👥 For Users:

  1. 📥 Download compiled mod
  2. 📂 Place in AssaultCube Mod Manager Mods directory
  3. ▶️ Load through mod manager
  4. ✅ Enable to use
⚠️ Important: Only compiled mods appear in mod manager!

⚖️ Legal Notice - Source Code Rights

🚨 CRITICAL LEGAL INFORMATION

📜 NO REQUIREMENT to release source code
🆓 VOLUNTARY ONLY - your choice
✅ NO VIOLATION keeping source private
🏆 FULL OWNERSHIP of your code
❌ NO OBLIGATION to share anything
👑 CREATOR'S CHOICE always respected

You control your source code completely. Sharing is optional, not required.

💡 Best Practices

⏰ Timing

  • Use os.clock() for timing
  • Store timing variables as local
  • Check intervals before expensive operations

🔒 State Management

  • Use local variables for state
  • Reset state in onEnable()/onDisable()
  • Always check if values exist

⚡ Performance

  • Keep update() lightweight
  • Use timing intervals for periodic tasks
  • Avoid unnecessary calculations

🇪🇸 Versión en Español

⚡ Inicio Rápido

Resumen: Crear archivo .lua → Escribir mod → COMPILAR → Distribuir

⚠️ CRÍTICO: ¡Solo los mods compilados funcionan! Los archivos .lua sin compilar son ignorados.

📋 Requisitos

🔴 Compilación OBLIGATORIA

❌ Archivos .lua sin compilar → NO FUNCIONARÁN
✅ Mods compilados → FUNCIONARÁN
El gestor de mods SOLO cargará mods compilados. Sin excepciones.

🔧 APIs Disponibles

👤 Funciones del Jugador

Función Descripción Parámetros/Retorna
natives.safeGetHealth() Obtener salud actual Retorna: número (0-100)
natives.safeSetHealth(value) Establecer salud del jugador Parámetro: número (0-100)
natives.safeGetAmmo() Obtener munición del arma principal Retorna: número
natives.safeSetAmmo(value) Establecer munición del arma principal Parámetro: número
natives.resetPlayer() Resetear a estado por defecto Salud=100, Munición=30
natives.getArmor() Obtener armadura actual Retorna: número (0-100)
natives.setArmor(value) Establecer valor de armadura del jugador Parámetro: número (0-100)
natives.safeGetArmor() Obtener armadura actual Retorna: número (0-100)
natives.safeSetArmor(value) Establecer valor de armadura del jugador Parámetro: número (0-100)

INFORMACIÓN LEGAL CRÍTICA

📜 NO ES OBLIGATORIO liberar código fuente
🆓 SOLO VOLUNTARIO - tu elección
✅ NO ES VIOLACIÓN mantener el código privado
🏆 PROPIEDAD COMPLETA de tu código
❌ NO HAY OBLIGACIÓN de compartir nada
👑 ELECCIÓN DEL CREADOR siempre respetada

Tú controlas tu código fuente completamente. Compartir es opcional, no obligatorio.


🇷🇺 Русская версия

⚡ Быстрый старт

Коротко: Создать файл .lua → Написать мод → СКОМПИЛИРОВАТЬ → Распространить

⚠️ КРИТИЧНО: Работают только скомпилированные моды! Сырые файлы .lua игнорируются.

📋 Требования

🔴 ОБЯЗАТЕЛЬНАЯ компиляция

❌ Сырые .lua файлы → НЕ БУДУТ РАБОТАТЬ
✅ Скомпилированные моды → БУДУТ РАБОТАТЬ
Менеджер модов загружает ТОЛЬКО скомпилированные моды. Без исключений.

🔧 Доступные API

👤 Функции игрока

Функция Описание Параметры/Возвращает
natives.safeGetHealth() Получить текущее здоровье Возвращает: число (0-100)
natives.safeSetHealth(value) Установить здоровье игрока Параметр: число (0-100)
natives.safeGetAmmo() Получить патроны основного оружия Возвращает: число
natives.safeSetAmmo(value) Установить патроны основного оружия Параметр: число
natives.resetPlayer() Сбросить к состоянию по умолчанию Здоровье=100, Патроны=30
natives.getArmor() Получить текущую броню Возвращает: число (0-100)
natives.setArmor(value) Установить значение брони игрока Параметр: число (0-100)
natives.safeGetArmor() Получить текущую броню Возвращает: число (0-100)
natives.safeSetArmor(value) Установить значение брони игрока Параметр: число (0-100)

КРИТИЧЕСКАЯ ПРАВОВАЯ ИНФОРМАЦИЯ

📜 НЕ ТРЕБУЕТСЯ публиковать исходный код
🆓 ТОЛЬКО ДОБРОВОЛЬНО - ваш выбор
✅ НЕ НАРУШЕНИЕ держать код приватным
🏆 ПОЛНАЯ СОБСТВЕННОСТЬ на ваш код
❌ НЕТ ОБЯЗАТЕЛЬСТВ делиться чем-либо
👑 ВЫБОР СОЗДАТЕЛЯ всегда уважается

Вы полностью контролируете свой исходный код. Делиться необязательно, это ваш выбор.


📄 License

This guide and example code are provided as-is for educational and development purposes.

Complete intellectual property protection for mod creators. Source code sharing is entirely optional and voluntary.

Published 7 days ago
StatusIn development
CategoryGame mod
PlatformsWindows
AuthorPlayDoughsGames
TagsModdable

Download

Download
AssualtCube Mod Compiler v1.0.0 9.8 MB
Download
AssaultCube Mod Manager v1.5.0 Installer 13 MB
Download
Low Ammo Health Boost Mod 1.4 kB
Download
Enhanced Survival Mod 8.7 kB
Download
Health Regen Mod 1.6 kB
Download
Mod Base v1.5.1 1.3 kB
Download
Developer Guide 14 kB
Download
Armor Regen Mod 3.9 kB

Install instructions

🚀 AssaultCube Mod Manager Installation Guide

Complete installation instructions for AssaultCube Mod Manager v1.5.0


ℹ️ Important: This guide will help you install and set up the AssaultCube Mod Manager to use mods with AssaultCube.

📋 What You'll Need

🎮 AssaultCube Game

The base AssaultCube game must be installed on your system first.

  • Download from: https://assault.cubers.net/
  • Install and verify it runs correctly
💻 System Requirements
  • Windows operating system
  • Administrator privileges for installation
  • At least 100MB free disk space

📥 Step 1: Download Required Files

🔽 Download Everything You Need

Make sure to download ALL the following files:

  • AssaultCube Mod Manager v1.5.0 Installer
  • Any mod files you want to use (usually .acm files)
  • This installation guide (for reference)
⚠️ Critical: Do NOT run AssaultCube directly after installing the mod manager. You MUST use the mod manager to launch AssaultCube with mods!

⚙️ Step 2: Install AssaultCube Mod Manager

1. Run the Installer
  • Locate the ACMM v1.5.0 installer file you downloaded
  • Right-click and select "Run as administrator"
  • Follow the installation wizard prompts
2. Choose Installation Location
  • Default location: C:\Program Files (x86)\AssaultCube Mod Manager\
  • You can change this if needed, but remember the location
  • Click "Install" to complete installation
Installation Complete! The AssaultCube Mod Manager is now installed on your system.

📂 Step 3: Install Your Mods

1. Locate the Mods Folder
  • Navigate to: C:\Program Files (x86)\AssaultCube Mod Manager\Mods\
  • This is where all mod files must be placed
2. Copy Mod Files
  • Copy all your downloaded .acm mod files
  • Paste them into the Mods folder
  • Do NOT create subfolders - place files directly in Mods
💡 Tip: Only compiled mod files (.acm) will work. Raw .lua files are ignored.

🎮 Step 4: Launch AssaultCube with Mods

⚠️ IMPORTANT: Do NOT launch AssaultCube directly! Always use the Mod Manager!
1. Open AssaultCube Mod Manager
  • Find "AssaultCube Mod Manager" in your Start Menu
  • Or navigate to the installation folder and run AssaultCube Mod Manager.exe
  • Run as administrator if prompted
2. Select Your Mods
  • You'll see a list of available mods in the manager
  • Check the boxes next to the mods you want to enable
  • You can enable multiple mods at once
  • Leave unchecked any mods you don't want to use
3. Launch AssaultCube
  • Click the "Launch AssaultCube" button in the mod manager
  • AssaultCube will start with your selected mods enabled
  • The game will run normally with enhanced functionality
🎉 Success! You're now playing AssaultCube with mods enabled!

🔧 Managing Your Mods

🔄 Changing Active Mods

  • Close AssaultCube completely
  • Open the Mod Manager again
  • Change which mods are checked/unchecked
  • Launch AssaultCube again with new mod selection

➕ Adding New Mods

  • Download new .acm mod files
  • Copy them to the Mods folder
  • Restart the Mod Manager to see new mods
  • Enable and launch as normal

🗑️ Removing Mods

  • Simply delete .acm files from the Mods folder
  • Restart the Mod Manager
  • Removed mods will no longer appear in the list

❓ Troubleshooting

🚫 Mods Not Appearing in Manager

Solution:
  • Verify files are .acm format (compiled mods)
  • Check files are in correct folder: ...\AssaultCube Mod Manager\Mods\
  • Restart the Mod Manager application
  • Run Mod Manager as administrator

🎮 AssaultCube Won't Start

Solution:
  • Ensure AssaultCube is properly installed first
  • Try disabling all mods and launching
  • Run Mod Manager as administrator
  • Check Windows firewall/antivirus isn't blocking

⚡ Mods Not Working in Game

Solution:
  • Verify mods are checked/enabled in Mod Manager
  • Ensure you launched through Mod Manager, not directly
  • Try enabling one mod at a time to isolate issues
  • Check mod compatibility with your AssaultCube version

📞 Support

Need Help?
  • Check the mod documentation for specific mod issues
  • Verify you followed all installation steps correctly
  • Make sure AssaultCube base game works without mods first
  • Try running everything as administrator

🎯 Quick Summary

Remember the key steps:

  1. Install AssaultCube base game
  2. Install ACMM v1.5.0 as administrator
  3. Copy .acm mod files to Mods folder
  4. Use Mod Manager to select and enable mods
  5. Launch AssaultCube through Mod Manager only

Enjoy your enhanced AssaultCube experience! 🚀