Calculator Tools Calculator Tools
Create

Warhammer 40K Army Generator

Aug 12, 2026

About this app

Generate a Warhammer 40K army list based on a given point limit for Imperial Knight and Ork factions.

Warhammer 40K Army Generator Warhammer 40K Army Generator Select your faction: Imperial Knight Ork Enter the point limit for your army: Generate Army

Related apps

Put this on your site

Source

                    <!DOCTYPE html>
<html>
<head>
<title>Warhammer 40K Army Generator</title>
<meta name='description' content='Generate a Warhammer 40K army list based on a given point limit for Imperial Knight and Ork factions.'>
<meta name='keywords' content='Warhammer 40K, Imperial Knight, Ork, Army Generator'>
<script>
function generateArmy(faction) {
const pointLimit = parseInt(document.getElementById('pointLimit').value);
let units = faction === 'Imperial Knight' ? imperialKnightUnits : orkUnits;
units = units.sort((a, b) => b.points - a.points);
let remainingPoints = pointLimit;
const armyList = [];
for (const unit of units) {
while (remainingPoints >= unit.points) {
armyList.push(unit.name);
remainingPoints -= unit.points;
}
}
const armyListElement = document.getElementById('armyList');
armyListElement.innerHTML = '';
for (const unitName of armyList) {
const listItem = document.createElement('li');
listItem.textContent = unitName;
armyListElement.appendChild(listItem);
}
}
</script>
</head>
<body>
<h1>Warhammer 40K Army Generator</h1>
<p>Select your faction:</p>
<select id='faction'>
<option value='Imperial Knight'>Imperial Knight</option>
<option value='Ork'>Ork</option>
</select>
<p>Enter the point limit for your army:</p>
<input type='number' id='pointLimit' placeholder='Enter point limit'>
<button onclick='generateArmy(document.getElementById("faction").value)'>Generate Army</button>
<ul id='armyList'></ul>
</body>
</html>