[MOD 0.14] Programmable Warfare - command units via signals

Topics and discussion about specific mods
User avatar
Earendel
Factorio Staff
Factorio Staff
Posts: 716
Joined: Sun Nov 23, 2014 11:57 am
Contact:

[MOD 0.14] Programmable Warfare - command units via signals

Post by Earendel »

Type: Mod (Very early proof of concept)
Name: Programmable Warfare
Description: Program and control autonomous units using zones and circuit conditions. Can be used for base navigation, patrols, base assault, and more advanced applications.

Concept/ Main features:
  • There is a 'smart' vehicle unit that you can place, by default it's just a normal vehicle but with a unit controller structure it's movement can be automated.
  • A Unit Scanner structure can get the properties of a smart unit (or the player) such as position, speed, health, etc... these values are returned as circuit network signals.
  • A Unit Controller structure can give a specific unit commands, such as [angle + speed], [x,y offset to set angle and speed], or [x,y tile position which used biter move-to AI]. The biter AI is good out in the wilderness but derps out in the base so using angle + speed is better there.
  • A Zone Planner tool allows you to mark areas with colours and patterns.
  • If a unit is on a zone then the zone is returned as a property, so you can change a unit's behavior based on their zone.
  • A Zone Scanner structure can return the position of a 'nth' zone tile, so you can do things like... direct a unit to the most recently placed red zone tile. (for attacks an such).
  • A Zone Controller structure can add or remove zones at a location based on the circuit input.
  • A Tile Scanner structure can return the entities at a location, including enemies, so you can use it to scan for enemies.
  • A Vehicle Deployer structure can deploy any car-type vehicle (i.e. not a train). This can be used to deploy you programmable smart-vehicle armies.
Things you can do now:
  • Have units move to the player
  • Have units follow complicated paths, like a race track.
  • Have unit move to zones, such as the most recently placed zone of a type, or a specific zone tile.
  • Have a unit follow another unit to make a convoy or squad.
  • Have a unit return to a specific zone if it has low health.
  • Lots of other stuff if you want to get clever with the circuit network.
  • Mark a search or attack zone and removed tiles from the zone as units get there so they can clear it out.
  • Automatically scan tiles for enemy spawners and add zones to those tiles (so units can attack there).
Things planned:
  • A dedicated Enemy scanner / radar to find enemy bases more easily.
  • More zone types.
  • More unit types.
  • Unit Deployment Structure
Other things maybe:
  • Save signal data to units?
  • Save signal data to zone types?
  • Deploy units with preset signal data defined by the deployer?
Current Issues:
  • It's probably buggy and I expect it to have performance issues if you scale things up. Basically I've thrown this together over a few days as a proof of concept so it's far from an alpha state. Also.. I have never made a proper factorio mod before and don't really know LUA. Your save will probably get messed up, you have been warned.
  • The unit component of the unit-vehicles keeps looking around when I don't want it to. I can't seem to find a way or properly controlling things of the 'unit' type so I've had to make a weird hybrid.
  • The units and structures don't have proper costs and aren't tech-locked.
  • The vehicle component is unfinished because i'm having issues maintaining stored energy when swapping vehicles, making the unit component actually use ammo, etc. If anyone can give some advise on how to accomplish these things that would be appreciated.
Feedback:
  • I'd like to know if there's much interest in a mod like this?
  • The amount of control you have is at the cost of ease of use, it's a LOT more complicated than robot army, but the potential for customization is greater than anything else I can thing of.
  • How many people are comfortable enough with the circuit system to be able to actually put something working together?
  • Is there a requirement for preset blueprint or blueprint strings for 'getting-started-setups' ?
UPDATE: The replacement for this mod (AAI Programmable Vehicles) has been released.
viewtopic.php?t=38475
Last edited by Earendel on Sat Dec 10, 2016 11:46 am, edited 7 times in total.
User avatar
Earendel
Factorio Staff
Factorio Staff
Posts: 716
Joined: Sun Nov 23, 2014 11:57 am
Contact:

Re: [MOD 0.14] Programmable Warfare

Post by Earendel »

Here's a little setup that makes all units of a type follow the player using the angle & speed via xy offset method.
Attachments
ProgrammableWarefare_0.1.3_follow.jpg
ProgrammableWarefare_0.1.3_follow.jpg (145.49 KiB) Viewed 7984 times
Last edited by Earendel on Sat Oct 15, 2016 3:37 pm, edited 1 time in total.
vipm23
Long Handed Inserter
Long Handed Inserter
Posts: 62
Joined: Fri Aug 12, 2016 4:05 pm
Contact:

Re: [MOD 0.14] Programmable Warefare - command units via signals

Post by vipm23 »

Could you make a scanner that reads a player's mouse input, or the chat?

So we can command units in the field.

Wish I could help...but I don't know the first thing about LUA either.
User avatar
Earendel
Factorio Staff
Factorio Staff
Posts: 716
Joined: Sun Nov 23, 2014 11:57 am
Contact:

Re: [MOD 0.14] Programmable Warefare - command units via signals

Post by Earendel »

vipm23 wrote:Could you make a scanner that reads a player's mouse input, or the chat?

So we can command units in the field.

Wish I could help...but I don't know the first thing about LUA either.
I think that's possible, but I'm assuming that the idea is that you point where you want the units to go. The problem with that is when you go back to the base you'd have unity trying to get to whatever you're trying to interact with.

You can already do a setup where you tell units to go the the most recently placed tile in [zone red] so you can run round with the zone planner and just mark where you want the units to go next.
User avatar
Earendel
Factorio Staff
Factorio Staff
Posts: 716
Joined: Sun Nov 23, 2014 11:57 am
Contact:

Re: [MOD 0.14] Programmable Warfare - command units via signals

Post by Earendel »

Version 0.1.4 update:

Added a vehicle deployer so you can automatically deploy vehicles and smart vehicles.

Added a Zone Controller so you can programmatically add or remove zones.

Changed zone tiles from 'decoration' to 'simple-entity'. This has the side-effect of removing ground decoration which I don't like - zones are supposed to be more like a digital overlay than flooring. The advantage is that it fixes the issue where zones were removed by concrete.

Unit and zone scanners now return the count of the scanned type in addition to other data, this can be used to do things like select the most recently placed zone tile of a type, i.e. the one equaling the count.

Added a Tile Scanner. It returns entities at an XY position based on the item required to place it. A few entities where there is no item to place (biters, spawners, worms) it returns an enemy signal of the correct type (unit, spawner, turret). Future plans include returning land-vs-water data for the tile.
Attachments
Vehicle Deployer
Vehicle Deployer
vehicle-deployer.png (163.96 KiB) Viewed 7849 times
vipm23
Long Handed Inserter
Long Handed Inserter
Posts: 62
Joined: Fri Aug 12, 2016 4:05 pm
Contact:

Re: [MOD 0.14] Programmable Warfare - command units via signals

Post by vipm23 »

You could have it be tied to an item-call it a Remote- that a scanner can read mouse input from. Say, it outputs the X,Y position of the last click.
When you want to do other stuff, just put the Remote away.
User avatar
Earendel
Factorio Staff
Factorio Staff
Posts: 716
Joined: Sun Nov 23, 2014 11:57 am
Contact:

Re: [MOD 0.14] Programmable Warfare - command units via signals

Post by Earendel »

Just a quick update. I've got the scanners working within blueprints now. I've also managed to get the automated vehicle turret working using scripts instead of turret or unit entity, this also has a number of advantages in terms of state awareness. There will be a big update in a week or two which will break compatibility with the current version.

Original new entity graphics are going well.
Attachments
Unit Scanner
Unit Scanner
unit-scanner.gif (576.38 KiB) Viewed 7706 times
User avatar
Earendel
Factorio Staff
Factorio Staff
Posts: 716
Joined: Sun Nov 23, 2014 11:57 am
Contact:

Re: [MOD 0.14] Programmable Warfare - command units via signals

Post by Earendel »

I had a number off issues recreating weapons fire using lua which has caused a delay but the basics are taken care of, unit weapons use ammo and fire their fake weapons properly. I'm now importing the raw prototypes of vehicles, guns, ammo, and projectiles in order to figure out what shell particles and gun flashes need to be spawned and where. I've also simplified the unit definitions so the while process works by processing a single vehicle definition.

This means that the vanilla car and tank can be ordered around.

The new vehicles are coming along nicely. These are still early WIP versions just so I can get something in game. I'f still trying to figure out a transfer mechanism for the miner to give ore to the hauler without the need for an inserter-based transfer station. My current thinking is that the miner will have a setting to automatically push it's inventory to any haulers in a small range.
Attachments
WIP Hauler
WIP Hauler
hauler.gif (988.78 KiB) Viewed 7646 times
WIP Miner
WIP Miner
miner.gif (1.08 MiB) Viewed 7646 times
Wildejackson
Long Handed Inserter
Long Handed Inserter
Posts: 54
Joined: Sun Jul 31, 2016 2:40 am
Contact:

Re: [MOD 0.14] Programmable Warfare - command units via signals

Post by Wildejackson »

Earendel, you have no idea how amazing all this is, if this pans out...wow. This is the kind of thing this game needs. The next tier of automation. Well done!

The only thing I can think to improve the mod is to copy the vehicle wagon mods idea and allow for a special train car to collect vehicles and deposit them off somewhere else automatically, so we can ship them to the front lines.
viewtopic.php?f=93&t=31489
User avatar
Earendel
Factorio Staff
Factorio Staff
Posts: 716
Joined: Sun Nov 23, 2014 11:57 am
Contact:

Re: [MOD 0.14] Programmable Warfare - command units via signals

Post by Earendel »

Thanks Wildejackson. I will be releasing this stuff soon. It will be a collection of mods instead of a single mod so watch out for them.

I will be splitting this mod into a collection of mods:

Utility mods:
Bullet Trails
Gun Sounds
Off-Grid Effects
Data Raw Prototypes
Signals

Vehicle Mods:
Vehicle - Miner
Vehicle - Hauler
Vehicle - Gatling Gunner
Vehicle - Flame Tumbler
Vehicle - Laser Tank

Main Mods
Zones
Programmable Structures
Programmable Vehicles
suavestwolf1
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sat Aug 15, 2015 8:00 pm
Contact:

Re: [MOD 0.14] Programmable Warfare - command units via signals

Post by suavestwolf1 »

That a insane cool idea! But for people like me who don't fulli undertand logistics, try to do something is hard as hell. Maby guide help little bit. I don't understand how the "Zone controller" and "Zone canner" work - where i put wut?
Sorry if this so easy butt i don't get it.
User avatar
Earendel
Factorio Staff
Factorio Staff
Posts: 716
Joined: Sun Nov 23, 2014 11:57 am
Contact:

Re: [MOD 0.14] Programmable Warfare - command units via signals

Post by Earendel »

Zone Controller requires the signals: X-tile, Y-tile, and zone type. A zone tile is placed at the XY location.

Zone Scanner requires a zone type to scan. The input count of the zone type selects the nth zone tile in order of placement. It returns the XY location of the zone tile (if found).

So for example you could use a unit scanner to get the player XY and use the zone controller to place a zone tile under the player.

FYI the next version breaks save compatibility.

I am planning on having some basic setup instructions on the individual mod pages when they are released. I need to try and fix some composite unit pathfinding issues first.
suavestwolf1
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sat Aug 15, 2015 8:00 pm
Contact:

Re: [MOD 0.14] Programmable Warfare - command units via signals

Post by suavestwolf1 »

Earendel wrote: FYI the next version breaks save compatibility.

I am planning on having some basic setup instructions on the individual mod pages when they are released. I need to try and fix some composite unit pathfinding issues first.
I hope release date soon.
User avatar
Earendel
Factorio Staff
Factorio Staff
Posts: 716
Joined: Sun Nov 23, 2014 11:57 am
Contact:

Re: [MOD 0.14] Programmable Warfare - command units via signals

Post by Earendel »

The replacement mods have been released now. viewtopic.php?t=38475

Downloads will not be available from this thread, but it can still be used for discussion about new features that might be part of the other mods, such as new units (Shotgun Tank), new programmable structures, etc.
Post Reply

Return to “Mods”