Hostile human enemies (Raiders) that hunt in coordinated packs. Adds a new threat to your factory!
Mods introducing new content into the game.
Version: 0.1.0
Date: 2025-12-01
Features:
- Initial release of Jungle Raiders mod for Factorio 2.0
Phase 1 - Core Foundation:
- Created mod structure (info.json, data.lua, control.lua, settings.lua)
- Implemented custom "raiders" force hostile to players and biters
- Basic raider unit prototype using base game character graphics
- Periodic spawn system with configurable intervals and distances
- Raiders automatically hunt nearby players
Phase 2 - Unit Variety:
- Added 10 distinct raider classes:
- Scout (flanker) - Fast, light armor, wide flanking angles
- Assault (assault) - Balanced stats, backbone of squads
- Heavy (tank) - Slow, high HP and damage
- Sniper (sniper) - Long range specialist
- Support (support) - Combat medic role
- Thief (thief) - Fastest unit, dedicated to stealing
- Commander (commander) - Elite leader in modular armor (~3% spawn)
- Enforcer (tank) - Elite soldier in power armor (~2% spawn)
- Juggernaut (juggernaut) - Ultimate threat in power armor MK2 (~1% spawn)
- Warlord (warlord) - Final boss in mech armor (Space Age, manual spawn only)
- Weighted spawn system (Assault most common, elite units rare, boss manual only)
- Units use different armor level graphics (including power armor and mech armor)
- Role-based AI behavior preparation
Phase 3 - Pack AI:
- Pack data structure with Alpha leader system
- Alpha units are Heavy, Assault, or Elite class
- Pack state machine:
- hunting: Actively seeking targets
- flanking: Coordinated attack positioning
- regrouping: Gathering around Alpha
- fleeing: Retreat after Alpha death
- berserk: Aggressive scatter after Alpha death
- Members follow Alpha within radius
- Alpha death triggers morale effects (50% flee, 50% berserk)
Phase 5 - Advanced AI (implemented before Phase 4):
- Ambush mechanics - 30% of packs spawn in ambush mode
- Ambush trigger radius of 25 tiles
- Pack communication - packs alert nearby packs within 80 tiles
- Retreat behavior - units below 30% HP retreat toward Alpha
- Retreat recovery - units rejoin combat when healed above 50%
- Role-based combat positioning:
- Snipers maintain 25 tile distance
- Heavies close to 6 tiles
- Scouts flank at 90-degree angles
- Support stays 15 tiles behind front line
- Assault takes medium-range flanking positions
Phase 4 - Camps & Spawning:
- Camp structure prototypes:
- Command Tent (500 HP) - Main structure, drops loot on destruction
- Barracks (300 HP) - Two per camp
- Watchtower (200 HP) - Lookout post
- Barricade walls - Defensive perimeter
- Loot Chest - Spawns with random valuable items
- Camp placement system:
- Spawns 300-600 tiles from player spawn
- Minimum 200 tile spacing between camps
- Maximum 5 camps on map
- Patrol spawning every 2 minutes (max 2 patrols per camp)
- Initial garrison of 4 raiders in ambush mode
- Loot drops: plates, ammo, grenades
Special Behaviors:
- Saboteur (Assault/Heavy):
- Can target and destroy player power poles
- 30 tile search radius
- 30% chance to seek sabotage targets
- Persists attack until target destroyed
- Belt Raider:
- Thieves prioritize stealing items from transport belts
- Valuable items list: ores, plates, circuits, gears, ammo, science
- Stolen items tracked in mod storage (max 20 items per thief)
- Items drop on raider death via surface.spill_item_stack()
- 5-tile steal radius for responsive belt detection
- Performance Optimization:
- Staggered update system across 60 ticks
- Only fraction of raiders processed per tick
- Thieves update every 10 ticks (staggered) instead of every tick
- Command refresh interval prevents redundant command spam
- Reduced thief search radius from 40 to 25 tiles
- Smart Base Targeting:
- Raiders now head toward player base center instead of map origin
- Base center calculated from player structures (assemblers, furnaces, labs, etc.)
- Cached and updated every 2 minutes for minimal performance impact
Force System:
- "raiders" force - Hostile to players and biters
- "raider-thieves" force - Neutral to players for non-combat thieves
- Forces must be initialized on existing saves via remote.call
Console Commands:
- init_forces: Initialize forces on existing saves
- spawn_pack: Spawn random raider pack
- spawn_ambush: Spawn pack in ambush mode
- spawn_unit: Spawn specific unit type
- spawn_camp: Spawn camp near player
- get_packs: View all pack info
- get_camps: View all camp info
- get_raider_count: Count active raiders
- get_thieves: View raiders with stolen items
- get_saboteurs: View active saboteurs
- get_unit_info: Detailed unit information
- set_pack_state: Force all packs to a state
- debug_belts: Debug belt detection
- debug_force_steal: Debug thief behavior
- debug_thieves: Check thief tracking
- get_base_center: View current base center target
- recalculate_base_center: Force recalculate base center
Localization:
- English locale file with all entity names and descriptions
- Mod setting descriptions
Bugfixes:
- Fixed Factorio 2.0 API compatibility (storage vs global)
- Fixed ammo_category requirement in attack_parameters
- Fixed pollution_to_join_attack renamed to absorptions_to_join_attack
- Fixed character sprite animation loading
- Fixed Factorio 2.0 set_command API change (moved to entity.commandable.set_command)
- Fixed max_health read-only at runtime issue
- Fixed spawn position collision with find_non_colliding_position
- Fixed unknown collision layer errors
- Fixed missing icon file references (used existing base game icons)
- Fixed Factorio 2.0 get_contents() API change (now returns array of objects)
- Fixed Factorio 2.0 game.get_entity_by_unit_number() not finding entities (store entity refs directly)
- Fixed thief belt stealing by increasing steal radius from 3 to 5 tiles
- Fixed belt target tracking using entity references instead of unit_number lookups
- Fixed Factorio 2.0 spill_item_stack API change (now takes single table argument)
- Fixed raiders attacking entity-ghosts (blueprinted structures) by filtering targets to entities with health
- Fixed mech armor animations via data-final-fixes.lua (runs after Space Age loads)
- Fixed mech armor using running_with_gun instead of standard running animation
Known Issues:
- None currently known