RTS - Command Units Mod
Posted: Thu May 07, 2015 11:19 pm
I'm thinking about making a mod to add a few RTS aspects to the game. The key feature is:
Automated ground units that you can command.
I'm envisioning that vehicle commands would mainly be managed by assigning the vehicle to a number of named regions. Regions would be created with a blueprint-like tool, and vehicles would have assigned regions in the same way trains have stations. The vehicle travels to the region, patrols within it, and auto-attacks enemies in range. You would set up your base to mass-produce vehicles, deploy them, fuel them, and assign them a default region - like 'Rally 1'. 'Rally 1' could be a set or rectangles that circles your base for patrols, or it could be a single rectangle that you keep moving over the next enemy base.
From a style and diversity point of view, the main sources of inspiration add are Dark Reign, and Planetary Annihilation, but everything would be done with a focus on logistics and automation.
Nice-to-have features would be things like:
Garage building places / deploys the vehicle object (not as an item) so it can drive itself out of the garage.
Modularise chassis /weapons, so make them separately and combine for dedicated vehicle roles. Attach any weapon to a chassis - certain combinations boost and reduce certain stats to match the weapon role. (Rocket tank weaker than a flame tank or shotgun 'flak' tank).
Aircraft that can be automated and piloted.
Order units to attack specific targets.
Rally points.
Behaviours - like damage threshold before retreat, follow distance
Automated vehicles could be commandeered for manual control.
Vehicles could have logic: move here if cargo is less than, else move here...
Electrical vehicles, need to recharge instead of refuel.
Modularise turrets based on vehicle system.
Overhaul biter classes to make weapon diversity more important.
Utility vehicles for hauling, mining, roboports, repairs, mobile logistics chests, mobile refuelling platforms, mobile recharging platforms, etc.
So my first question is:
Has anyone done anything like this?
If so, I'd prefer to help with their project than start from scratch.
If not, then I would like a few tips on the best way to approach the core unit functionality. Here are a few thoughts that I'm not sure about:
From what I've seen so far, there are a number of entity types, but there's no way to add new types in the same way that the core ones are added?
I'll have to add lua scripts to an existing type that's the closest match to add on the missing functionality.
The starting types that might be useful seem to be:
Unit (Enemy) - Has existing Ai, pathfinding, auto-attack, order / behaviour system. Lacks vehicle physics, turning rate. Cannot be possessed (manually driven). No inventory, fuel burning. Seems to randomly decide to go on a killing spree even when part of the player faction. Overriding existing behaviour might be more work than adding to a different type.
Car - Has vehicle physics, attacks, inventory / storage, burns fuel, can be possessed (manually driven). Lacks AI, Pathfinding, auto-attack.
Combat Robot - Has auto-attack.
Turret - Has auto-attack, inventory (ammo only).
Initially I thought that 'Enemy' would be the best starting point, but maybe extending the car type would be the best option in the long run?
Automated ground units that you can command.
I'm envisioning that vehicle commands would mainly be managed by assigning the vehicle to a number of named regions. Regions would be created with a blueprint-like tool, and vehicles would have assigned regions in the same way trains have stations. The vehicle travels to the region, patrols within it, and auto-attacks enemies in range. You would set up your base to mass-produce vehicles, deploy them, fuel them, and assign them a default region - like 'Rally 1'. 'Rally 1' could be a set or rectangles that circles your base for patrols, or it could be a single rectangle that you keep moving over the next enemy base.
From a style and diversity point of view, the main sources of inspiration add are Dark Reign, and Planetary Annihilation, but everything would be done with a focus on logistics and automation.
Nice-to-have features would be things like:
Garage building places / deploys the vehicle object (not as an item) so it can drive itself out of the garage.
Modularise chassis /weapons, so make them separately and combine for dedicated vehicle roles. Attach any weapon to a chassis - certain combinations boost and reduce certain stats to match the weapon role. (Rocket tank weaker than a flame tank or shotgun 'flak' tank).
Aircraft that can be automated and piloted.
Order units to attack specific targets.
Rally points.
Behaviours - like damage threshold before retreat, follow distance
Automated vehicles could be commandeered for manual control.
Vehicles could have logic: move here if cargo is less than, else move here...
Electrical vehicles, need to recharge instead of refuel.
Modularise turrets based on vehicle system.
Overhaul biter classes to make weapon diversity more important.
Utility vehicles for hauling, mining, roboports, repairs, mobile logistics chests, mobile refuelling platforms, mobile recharging platforms, etc.
So my first question is:
Has anyone done anything like this?
If so, I'd prefer to help with their project than start from scratch.
If not, then I would like a few tips on the best way to approach the core unit functionality. Here are a few thoughts that I'm not sure about:
From what I've seen so far, there are a number of entity types, but there's no way to add new types in the same way that the core ones are added?
I'll have to add lua scripts to an existing type that's the closest match to add on the missing functionality.
The starting types that might be useful seem to be:
Unit (Enemy) - Has existing Ai, pathfinding, auto-attack, order / behaviour system. Lacks vehicle physics, turning rate. Cannot be possessed (manually driven). No inventory, fuel burning. Seems to randomly decide to go on a killing spree even when part of the player faction. Overriding existing behaviour might be more work than adding to a different type.
Car - Has vehicle physics, attacks, inventory / storage, burns fuel, can be possessed (manually driven). Lacks AI, Pathfinding, auto-attack.
Combat Robot - Has auto-attack.
Turret - Has auto-attack, inventory (ammo only).
Initially I thought that 'Enemy' would be the best starting point, but maybe extending the car type would be the best option in the long run?