Idea has come up before (I know, I brought it up), but the game has changed since then in ways that invalidated some of the stuff, so I'd like to bring it up again refined for how the game is now.
In the game Final Fantasy 12, they had an AI driven system for combat where you had to build the AI yourself. It was a kind of a mini game crossed with item collection to find/buy the commands you needed to then build the perfect AI, but I think the general way it worked would lend itself to Starmade block logic quite well.
In FFXII, the system was set up as a two part list.
On the left hand side of any given entry was the conditional. On the right hand side was the action. Items higher on the list took priority to the items lower on the list.
So a basic setup would look like:
"Health < 25%" "Use Healing Magic: Self"
"Ally Health < 10%" "Use Healing Magic: Ally"
"Enemy Health > 0%" "Attack: Enemy"
So "Attack Enemy" being at the bottom would make it the lowest priority, its the "If there's nothing more important to do, attack something" command. Above that in priority is the "Your buddy is critically injured, heal him" command, so that the AI considers healing someone about to die on your side to be more important than just making another attack. Highest priority is healing yourself to keep yourself alive, which takes precedence over everything else.
We could very easily turn that into a block based setup in order to build fire priorities for the Bobby AI's to follow.
We could have a number of target blocks (Target: Ship, Target: Missile, Target: Astronaut), a number of conditional type blocks (shields, distance, armor hp, system hp, mass), and then use activators to set thresholds the way we do on the current sensor blocks.
Here's a quick visual for a primary DPS Cannon/Cannon turret:
Bobby AI is the main master.
Slaved to it is a Target:Ship block. Slaved to the Target:Ship is a Shield block, and slaved to the Shield block is an Activator set to off. This would equate to "Target a ship who's shields are at 0%".
Slaved to that first Target:Ship is also a Target: Missile, which then has slaves for Distance and the activators for 1/3rd, meaning "Fire at any missile that is within 1/3rd of your maximum range".
Then comes a simple "Fire at Astronauts".
Then "Fire at Ships within 1/3rd of maximum range".
And finally "Fire at Ships".
So we now have a priority fire list. If there's a target with no shields, shoot at that. If there's a missile at close range, shoot at it as long as there's no shieldless ships around. If there are no shieldless ships and no missiles to shoot at, shoot at any astronauts you see. If none of the above, shoot at any ships within 1/3rd of your range (aka, prioritize anything in your face). And finally if you've got nothing else to do, just shoot at any enemy ship you can see.
If you wanted, you could do something like move the Missile row down below the "Ships within 1/3rd range" since its a primary DPS turret, or leave it where it is for a "Oh crap, that one made it through the dedicated PDT!"
Could even have a Target:Ship -> Mass -> 100% to tell it to give priority to the largest ship it can see, or Target:Ship -> Mass -> 25% to tell it to give priority to anything in the bottom 25% of mass ships it can see (aka, aim for drones and fighters over the carrier).
This would increase the size of turrets and attack drones, but the amount of increase would depend on how complex you wanted their logic to be. At a minimum, you could completely replicate the current AI with at most a single block. Instead of going into the Bobby and telling to "Aim at Ships", you slave a single Target:Ship block to it. "Aim at Missiles" would add a single Target:Missile block. And "Target Any" would be simply not slaving anything at all.
The AI would simply run down the list of priorities each time it fired. That way our hypothetical chaingun here could be wailing on a target, switch to fire a few shots off at a missile that broke through the dedicated PDT, and then switch back to it's original unshielded target without any input from you (other than having build the AI that way).
Would give us a lot more in-depth build options, and would take a lot of the AI programming weight off the dev's shoulders. If you want a dumb as a box of rocks AI, then don't do any extra work. If you want a precision scalpel to go in and do exactly what you want, better be prepared to suss out that logic!
In the game Final Fantasy 12, they had an AI driven system for combat where you had to build the AI yourself. It was a kind of a mini game crossed with item collection to find/buy the commands you needed to then build the perfect AI, but I think the general way it worked would lend itself to Starmade block logic quite well.
In FFXII, the system was set up as a two part list.
On the left hand side of any given entry was the conditional. On the right hand side was the action. Items higher on the list took priority to the items lower on the list.
So a basic setup would look like:
"Health < 25%" "Use Healing Magic: Self"
"Ally Health < 10%" "Use Healing Magic: Ally"
"Enemy Health > 0%" "Attack: Enemy"
So "Attack Enemy" being at the bottom would make it the lowest priority, its the "If there's nothing more important to do, attack something" command. Above that in priority is the "Your buddy is critically injured, heal him" command, so that the AI considers healing someone about to die on your side to be more important than just making another attack. Highest priority is healing yourself to keep yourself alive, which takes precedence over everything else.
We could very easily turn that into a block based setup in order to build fire priorities for the Bobby AI's to follow.
We could have a number of target blocks (Target: Ship, Target: Missile, Target: Astronaut), a number of conditional type blocks (shields, distance, armor hp, system hp, mass), and then use activators to set thresholds the way we do on the current sensor blocks.
Here's a quick visual for a primary DPS Cannon/Cannon turret:
Bobby AI is the main master.
Slaved to it is a Target:Ship block. Slaved to the Target:Ship is a Shield block, and slaved to the Shield block is an Activator set to off. This would equate to "Target a ship who's shields are at 0%".
Slaved to that first Target:Ship is also a Target: Missile, which then has slaves for Distance and the activators for 1/3rd, meaning "Fire at any missile that is within 1/3rd of your maximum range".
Then comes a simple "Fire at Astronauts".
Then "Fire at Ships within 1/3rd of maximum range".
And finally "Fire at Ships".
So we now have a priority fire list. If there's a target with no shields, shoot at that. If there's a missile at close range, shoot at it as long as there's no shieldless ships around. If there are no shieldless ships and no missiles to shoot at, shoot at any astronauts you see. If none of the above, shoot at any ships within 1/3rd of your range (aka, prioritize anything in your face). And finally if you've got nothing else to do, just shoot at any enemy ship you can see.
If you wanted, you could do something like move the Missile row down below the "Ships within 1/3rd range" since its a primary DPS turret, or leave it where it is for a "Oh crap, that one made it through the dedicated PDT!"
Could even have a Target:Ship -> Mass -> 100% to tell it to give priority to the largest ship it can see, or Target:Ship -> Mass -> 25% to tell it to give priority to anything in the bottom 25% of mass ships it can see (aka, aim for drones and fighters over the carrier).
This would increase the size of turrets and attack drones, but the amount of increase would depend on how complex you wanted their logic to be. At a minimum, you could completely replicate the current AI with at most a single block. Instead of going into the Bobby and telling to "Aim at Ships", you slave a single Target:Ship block to it. "Aim at Missiles" would add a single Target:Missile block. And "Target Any" would be simply not slaving anything at all.
The AI would simply run down the list of priorities each time it fired. That way our hypothetical chaingun here could be wailing on a target, switch to fire a few shots off at a missile that broke through the dedicated PDT, and then switch back to it's original unshielded target without any input from you (other than having build the AI that way).
Would give us a lot more in-depth build options, and would take a lot of the AI programming weight off the dev's shoulders. If you want a dumb as a box of rocks AI, then don't do any extra work. If you want a precision scalpel to go in and do exactly what you want, better be prepared to suss out that logic!