[MOD 0.14] AAI Programmable Vehicles

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

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Earendel »

y.petremann wrote:Hi, got a crash :

Code: Select all

Error while running event aai-programmable-vehicles::on_tick (ID 0)
__aai-programmable-vehicles__/control.lua:1640: attempt to index field 'navigator' (a nil value)
This should be fixed now.
User avatar
sumdawgy
Inserter
Inserter
Posts: 43
Joined: Wed May 11, 2016 1:01 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by sumdawgy »

I have 2 problems....

Error while running event aai-vehicles-miner::on_tick (ID 0)
__aai-vehicles-miner__/control.lua:215: bad argument #1 to 'pairs' (table expected, got nil)


AND

one of my zone scanners IS SCANNING. I give it the zone with a value of 1 so that I can just get #1's X/Y but the dangged thing keeps rotatating thru the zones... I can't figure out why it scans and the others don't?

MY problem is....

This is causing my miner to wander all around the assigned area instead of working id1 of the zone,

( I have it work id1 until the resources reported by tile scanner are 0. then i "del" zone1 and it moves on to the new zone 1 which was zone 2..etc....but wandering the zones...is a problem for my setup....it keeps reissuing X/Y comands to the miner...)

I noticed that if I turn the ticks up it's not as bad....but still....

blueprint follows:::
0eNrtXW2SozgSvQt/11Qg8SFRMb3n2ImNDge2KRdRGByAq9vT4QPsLfZse5IV4E+cKZQYu7qm+8/0lA0PoZfKTD2l5B/WLN3E6yLJKuv5h5XM86y0nv/9wyqTZRal9WfVdh1bz1ZSxStrYmXRqv6rrIrNvLKXcRYXydwu51Gm/s8u46pKsmVp7SZWki3i79Yz20160RbxPFmo2+f5apZkUZUXZwB893VixVmVVEnctq35YzvNNqtZXKgnnFq1itLUTqPVWmGv81Ldkmf1UxWM7U6srfqHObu6RR0MfsSYJUs7TuN5Vb/XOk9jAIo/+S2YfPIhNFf3Zldw/IQ1sRQBVZGn01n8Gr0n6nJ1zR5kqr5bNDeW9acvSVFW056eTYo8s/Mitlros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nzQPb1fT+mEHXTQjDIiGMSWbUnNBnnf9wZRqH4W1G4HZtC1rMZhLmceuaWfxUp+5I6l5saAaPlY+HRBIZ7KSb78su+LuRXyYfrom8YUH7BTcIYwkh6bZNzeR/p1WxIcGNNAQkIWC8iOtEK01JCGCYclDPIx+UM28E5w5+fImeQtGTQ8JeFmGsu2kmNfbjITvF3zBMhMHxYaJN/q9B2EFfulJmMlYdcnSzYCLX1L4dipMuP86/my8M0/4odi5igJ0gglo+sUCxRaQXBIRwlwA44Xyft5r/ns999nVjvcVE2Vweex30p/SAMdrv/A2+MDhM=
User avatar
sumdawgy
Inserter
Inserter
Posts: 43
Joined: Wed May 11, 2016 1:01 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by sumdawgy »

Nightinggale wrote: Great work. In fact I want to praise you for not just some great mods, which adds a lot to the game, but also the way you handle bug reports. Often people take for granted that people who wrote some code also fix the bugs "because they know the code". However speaking from experience bugfixing can be anything from trivial to more difficult than writing the code in the first place. Sometimes even figuring out the cause of a bug can be an issue, which takes skill and time. I have seen modders (not factorio), who wrote decent mods and then fail to fix bugs due to lack of skills while other doesn't care much after they released whatever they made.

I want to take this opportunity to praise your responsiveness to bug reports as well as providing fixes for reported bugs quite fast.
Same here! :!:
User avatar
Earendel
Factorio Staff
Factorio Staff
Posts: 716
Joined: Sun Nov 23, 2014 11:57 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Earendel »

sumdawgy wrote:I have 2 problems....

Error while running event aai-vehicles-miner::on_tick (ID 0)
__aai-vehicles-miner__/control.lua:215: bad argument #1 to 'pairs' (table expected, got nil)
That should be fixed now.
Edit: The upload failed and the mod portal is acting weirdly. If you see a version 0.2.11 that is the fixed one.
sumdawgy wrote: one of my zone scanners IS SCANNING. I give it the zone with a value of 1 so that I can just get #1's X/Y but the dangged thing keeps rotatating thru the zones... I can't figure out why it scans and the others don't?

MY problem is....

This is causing my miner to wander all around the assigned area instead of working id1 of the zone,

( I have it work id1 until the resources reported by tile scanner are 0. then i "del" zone1 and it moves on to the new zone 1 which was zone 2..etc....but wandering the zones...is a problem for my setup....it keeps reissuing X/Y comands to the miner...)

I noticed that if I turn the ticks up it's not as bad....but still....

blueprint follows:::
0eNrtXW2SozgSvQt/11Qg8SFRMb3n2ImNDge2KRdRGByAq9vT4QPsLfZse5IV4E+cKZQYu7qm+8/0lA0PoZfKTD2l5B/WLN3E6yLJKuv5h5XM86y0nv/9wyqTZRal9WfVdh1bz1ZSxStrYmXRqv6rrIrNvLKXcRYXydwu51Gm/s8u46pKsmVp7SZWki3i79Yz20160RbxPFmo2+f5apZkUZUXZwB893VixVmVVEnctq35YzvNNqtZXKgnnFq1itLUTqPVWmGv81Ldkmf1UxWM7U6srfqHObu6RR0MfsSYJUs7TuN5Vb/XOk9jAIo/+S2YfPIhNFf3Zldw/IQ1sRQBVZGn01n8Gr0n6nJ1zR5kqr5bNDeW9acvSVFW056eTYo8s/Mitlrosopqop36j9U6KpoGPVv/VDfkm2q9AfDek6LaqE+OkH/lWWwvknJuL4s4zlrk9Va1bpNV05ciX02TTEFZzy9RWsa79smZ6tFDy1n9n/bmMzqThfXsqWuTYr5JquZPtvuq7ub15UW86Lm4sRMTVHXhDmLNI7Hm3pG1ea6+/ByMuV3GJhdf+xRC3S5PWiycbzIOaA4+yRy8u5rDeq0e/4mH8SUB4qZRrsUiOIE+HNAogmP/reJFsln1hYpAF3QEycL832EC9SqXXEqKffl6u5Cm9kXGAe1LkkwiuKNJlJUi8JPYg9DbgxdoLUD0eAZ2ZU4To2ZgHIfHPomKpHpdxZVyHzqa5SHdVG5kYi2Sou2UJnOEWD/BDiJ+k75siivmcxWCovax1j80xF+CfcvzhbUjkckcdPgaXd/lj/kID/WNA4kIH8EDOAAfRkOoH1Nc0FgK9SRxw7HDTpO9LPmexHa1mQFht6a24QmenzFuhsL0KK4ZCtejeGYorh7FN0PxTiiwzR5IOBqssb22NnZurtxlnYjxxbrFBlGjCM5S5fbh2mFss/0wFkgnvCR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E2ci2baaXgQkZRGJuOf0XyvcaNbfbmublRfb8pYPTDN69DUEENbOAG7IxxwmuHPZv1ffhLrl/i5g7JnXy9zesy7pxCRMcxHhkiZXlQU+bdphgUMUPcMPfPtgg2KC6IghXobrC0wSmC8UdTVoAhjFE+DIo1RAg1KqGPqG5Dk4kwxxzGuqhR4k5RZQolGa+IIEP/YVIN4fp1pCsscpGw2wnhBOhQZjkDmFupgvNsKv1tj/lnqvpnjX563ghd+nxp+z7pvxg3r/5gTEg82FNoXGHnrI2FyhxeysLNTWClSmU94uBN2pTLXOMIxxgYd+U1onwz7wq/Tp9xd39JT0Mo4/sKcdvDDfpULPpb07FxSyg9rBMgpp4x8yMsR8S4HiRAVcNNDRTDYP/GzReC8vGsVpJP3GWN9APgxvWIoUeKhRH2/D1H/IhEFCvE6XgJTFuSgUoJHbL+76v8yroFIXXzbktJeWo2WeXO6V/xS2bM0mr+NuLgNjCBOEh4Y7wXAyafNvpnzQPb1fT+mEHXTQjDIiGMSWbUnNBnnf9wZRqH4W1G4HZtC1rMZhLmceuaWfxUp+5I6l5saAaPlY+HRBIZ7KSb78su+LuRXyYfrom8YUH7BTcIYwkh6bZNzeR/p1WxIcGNNAQkIWC8iOtEK01JCGCYclDPIx+UM28E5w5+fImeQtGTQ8JeFmGsu2kmNfbjITvF3zBMhMHxYaJN/q9B2EFfulJmMlYdcnSzYCLX1L4dipMuP86/my8M0/4odi5igJ0gglo+sUCxRaQXBIRwlwA44Xyft5r/ns999nVjvcVE2Vweex30p/SAMdrv/A2+MDhM=
I won't have time to look at the blueprint today but it sounds like the zone 1 is being removed. If the zone is not visually disappearing then it it probably being overwritten with a new zone of the same type, but the new one will have the last id not the first.
User avatar
sumdawgy
Inserter
Inserter
Posts: 43
Joined: Wed May 11, 2016 1:01 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by sumdawgy »

Earendel wrote:I won't have time to look at the blueprint today but it sounds like the zone 1 is being removed. If the zone is not visually disappearing then it it probably being overwritten with a new zone of the same type, but the new one will have the last id not the first.
It's wierd...
I have 2 miners running off 2 systems and only one of them is scanning.
The blueprint i posted is different from the other in only one way...

I have a combinator feeding the zone scanner with a caulculated zone setting.
I did this to avoid having to reset all the deciders that scan the tile...

As soon as the mod updates 'll look harder at that section.... I can't play that save w/o crashing yet.
User avatar
sumdawgy
Inserter
Inserter
Posts: 43
Joined: Wed May 11, 2016 1:01 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by sumdawgy »

:?: ....What triggers zone "scanning" in a zone scanner?

AFAIK...
negative #s should trigger reverse scanning?
and a pos number should return the zone indicated..

If I give zone scanner zone#0 what is it supposed to do?
I assumed it scanned...but i don't get that.

I've imported the bluprint into another game w/o a miner running....to work this.
Nightinggale
Fast Inserter
Fast Inserter
Posts: 120
Joined: Sun May 14, 2017 12:01 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Nightinggale »

sumdawgy wrote::?: ....What triggers zone "scanning" in a zone scanner?

AFAIK...
negative #s should trigger reverse scanning?
and a pos number should return the zone indicated..
You can do anything other than scanning specific zone IDs??? :shock:

If I remember correctly scanning a zone with a non-existing ID gives the scanned ID and the total number of zones of the type in question. This goes for too high as well as negative.

Looping is fairly simple btw. Set a constant combinator to the input, which outputs X = 1 (X being the zone to scan). Take scanner output to a decider combinator, which outputs X if X < total zone. Set output of the decider combinator to scanner input. The scanner will then add 1 to X each time it scans and on the last tile, it will not use the decider combinator and the constant combinator will give it the first entry and it starts over.

If you want to count down, then set the constant combinator to -1 and it will count down. You then need to make another loopback to restart it. Something like if X = -1, output total zone count. Set up another decider combinator in parallel with the same trigger, but outputs 1. Output that to a arithmetic combinator, which adds 0 and change the signal to X (converter combinator from useful combinators should work as well). The total for X on the input will then be "last zone tile" + 1 - 1 (-1 from constant combinator) and the last zone tile should be scanned and the loop restarts.

Counting down seems to be a good idea if you want to remove zones from tiles, which has been mined because if you remove it, then the next zone takes the ID and when you increase the ID, you skip a zone. If you pipeline, then you might even remove the zone on the wrong tile. Going down means removing change the ID of zones you just scanned, not those you are about to scan.

It's my impression that you can get the scanners/controllers to do whatever you want if you are creative enough with combinator setups. I'm not saying it's always easy, just that it can be done. Often combinator setup is easier if you draw a plan on paper first because getting an overview ingame is really tricky. Putting up Sticky Notes to tell what is in the wires seems like a must when combinators get complex (there is a 0.15 version in the forum thread).
Nightinggale
Fast Inserter
Fast Inserter
Posts: 120
Joined: Sun May 14, 2017 12:01 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Nightinggale »

I'm having a huge problem regarding friendly fire when attacking alien bases.

Attacking with chaingunners and cars works fine.

Attacking with flamethrower cars turned out to be a huge no-no, because they set the ground on fire and then I lose lots of vehicles because they drive into the flames. Seems near impossible to avoid when controlling multiple vehicles.

Using tanks with normal shells also destroys my own vehicles. I have seen multiple times that a few biters charge and they are killed before making contact, but chaingunners have yellow health afterwards because they got hit by tanks.

Am I missing something? It seems to me the best strategy is to build a swarm of chaingunners and then make them move strait through an alien base. Sure the aliens kill some of them because they are weak, but if I have 1/3 tanks in the attack, my losses grows significantly due to friendly fire.
User avatar
sumdawgy
Inserter
Inserter
Posts: 43
Joined: Wed May 11, 2016 1:01 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by sumdawgy »

Nightinggale wrote: Looping is fairly simple btw. Set a constant combinator to the input, which outputs X = 1 (X being the zone to scan). Take scanner output to a decider combinator, which outputs X if X < total zone. Set output of the decider combinator to scanner input. The scanner will then add 1 to X each time it scans and on the last tile, it will not use the decider combinator and the constant combinator will give it the first entry and it starts over.
thing is...I don't need all that. IT seems if I simply connect it to a decider.... it scans and loops on it's own..still working this out.
Nightinggale wrote: Counting down seems to be a good idea if you want to remove zones from tiles, which has been mined because if you remove it, then the next zone takes the ID and when you increase the ID, you skip a zone. If you pipeline, then you might even remove the zone on the wrong tile. Going down means removing change the ID of zones you just scanned, not those you are about to scan.
My logic system is easier/simpler than that...I just have the tile scanner work the x/y of "RED CIRCLE ID1" as long as a mine-able resource is there, it stays Red circle. IF not, then it get's cleared. and ID2 becomes ID1 (works great) also....as long as the miner is at that x/y no movement commands are sent. (unless the free space is <?7? ((it was 5. )) low free space sends it to RED X ID1...at the depot assigned to the miner. then it reverts back to the /y of RED CIRCLE ID1. At the time Haulers weren't working.)

One other thing...instead of zone scanning by distance for res.. example..
I manually set a target area to RED TARGET. There's a zone scanner that looks at id1 of that and feeds it to tile scanner connected to diciders that either clear it or turn it into RED CIRCLE. This continues until RED TARGET is gone. Voila....the miner's system gets up and running. For multiple miners...I just change vehicle ID and zones...

That blueprint I posted is this exact system..and it uses nixie tubes, copper plates and lights to indicate modes/actions.

IT worked fine before i got a decider connected to it....hm. :ugeek:
Skeleton Man
Inserter
Inserter
Posts: 23
Joined: Fri Jun 02, 2017 1:21 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Skeleton Man »

Nightinggale wrote:I'm having a huge problem regarding friendly fire when attacking alien bases.

Attacking with chaingunners and cars works fine.

Attacking with flamethrower cars turned out to be a huge no-no, because they set the ground on fire and then I lose lots of vehicles because they drive into the flames. Seems near impossible to avoid when controlling multiple vehicles.

Using tanks with normal shells also destroys my own vehicles. I have seen multiple times that a few biters charge and they are killed before making contact, but chaingunners have yellow health afterwards because they got hit by tanks.

Am I missing something? It seems to me the best strategy is to build a swarm of chaingunners and then make them move strait through an alien base. Sure the aliens kill some of them because they are weak, but if I have 1/3 tanks in the attack, my losses grows significantly due to friendly fire.
The author is aware of this. Due to how piercing projectiles are coded its not possible to make a projectile pierce entities but not damage friendly ones in the process. As such, single-target ammunition was made for vehicles that normally using piercing rounds.
>Flame Tumbler
Flamejet ammo is provided which causes an area of effect of damage at a location when fired, but doesn't leave the ground on fire. I don't know for sure if it damages friendly entities.
>Tank
Precision Cannon Shell and its explosive version are provided. They only target (and home in on) one entity, and thus only do damage to one entity. They're not as effective against groups as normal shells but they can safely be used in number as they won't damage friendly entities. Explosive shells can still do some damage to friendly entities if the shell hits an enemy very close to a friendly unit (I.e shooting biters off of another tank), though this damage can usually be repaired off easily.
>Laser Tank
Precision Laser Cannon Shell is provided. Same principal as Precision cannon shell.

Your chaingunners and to an extent, cars, can be used to help surgically remove enemies that are close to your formation, but they're too squishy late game too provide much support in light of behemoths soaking their fire and spitters destroying them quickly without huge amounts of repairs to back them up.
If you're using flame units, avoid mixing them with other units that don't resist fire. That will cause huge issues unless you can make some better combat logic via combinatiors for the vehicles, which is a project in itself.

Due to how the turrets on vehicles are coded the author has had to make "dummy ammo" of sorts from what I understand, so the vehicle imitates firing but code-wise is actually copying variables over from the code and creating a new projectile that may not be able to have all the properties a normal projectile does (damage bonuses are one thing that appears to have been a challenge). I'm fairly sure things like normal cannon shells will continue on indefinitely until they strike enough objects to slow them down, which can lead to odd friendly fire occurring at your base if you happen to shoot a bug in that direction.
TcTp
Manual Inserter
Manual Inserter
Posts: 1
Joined: Mon Oct 24, 2016 12:03 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by TcTp »

After i updated from 3 moths ago version cargo planes gone mad. Now they pretends to be a vehicles, trying to bypass building, trees, etc. And the worst thing is that they got collisions withs belts now.
whitecold
Inserter
Inserter
Posts: 46
Joined: Fri May 19, 2017 6:48 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by whitecold »

Is it possible to somehow get vehicles with multiple weapons back? I'd like to use tanks with all three vanilla weapons, as I haven't found a good way to loop over multiple vehicle ID's
solntcev
Long Handed Inserter
Long Handed Inserter
Posts: 81
Joined: Tue Jun 21, 2016 8:37 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by solntcev »

About multiple weapons: why not restrict autonomous weapons programmaticaly to one (also select weapon with ammo, so you can have for example half of tanks with bullet ammo and half with cannons), but leave all available for player when he is riding vehicle.
Right now Bobs Tank Mk3 is useless: AAI leaves it with singe laser turret instead, that is least powerfull compared to cannon, artillery and chaingun with high tier ammo.
Nightinggale
Fast Inserter
Fast Inserter
Posts: 120
Joined: Sun May 14, 2017 12:01 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Nightinggale »

solntcev wrote:About multiple weapons: why not restrict autonomous weapons programmaticaly to one (also select weapon with ammo, so you can have for example half of tanks with bullet ammo and half with cannons), but leave all available for player when he is riding vehicle.
Assigning ammo and weapon as signals sounds interesting. To make it even more interesting, we can add a radar vehicle, which counts the number of enemies of each type within a certain range. This will allow using light ammo against biters while circuits can cause vehicles to use heavy ammo/guns when big enemies shows up.
Skeleton Man
Inserter
Inserter
Posts: 23
Joined: Fri Jun 02, 2017 1:21 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Skeleton Man »

Nightinggale wrote:
solntcev wrote:About multiple weapons: why not restrict autonomous weapons programmaticaly to one (also select weapon with ammo, so you can have for example half of tanks with bullet ammo and half with cannons), but leave all available for player when he is riding vehicle.
Assigning ammo and weapon as signals sounds interesting. To make it even more interesting, we can add a radar vehicle, which counts the number of enemies of each type within a certain range. This will allow using light ammo against biters while circuits can cause vehicles to use heavy ammo/guns when big enemies shows up.
In what case would there be only light enemies such that you'd want to conserve stronger ammo?
Unless you're using some kind of mod that makes small/medium biters far more frequent later game where there might even be a choice between two ammo types, there's no point in using any different ammo since every wave is evenly composed of heavy and light units, and the heavy units necessitate the stronger ammo automatically. That, and stronger ammo is flatly stronger than its predecessor. The only saving grace is that standard magazines compared to piercing is standard is dirt cheap to manufacture, but with proper infrastructure you can pump out far more effective piercing rounds anyways.

It might make more sense for using explosive rounds against further away clusters of enemies as an opening volley, then switching to standard rounds, but that would still be a massive amount of combinator logic to determine the number of enemies in an area, the relative spacing of them, and the distance between the units and the enemies, which all of those calculations would need to take place very shortly to engage the enemy over the short distance the game currently allows with any kind of precision.

As for multiple weapons per vehicle theory the author's stated somewhere before that one weapon per vehicle encourages mixed unit assignments (for better or for worse, I don't have any reason to send out units with magazine-based weapons because chaingunners and cars are far too weak on their own against rampant AI swarms of big/behemoth biters, and fixing them into a squad is cumbersome and having mixed results). Its also been suggested as a client-made mod that you could split the weapons on a vehicle between three separate vehicles and have all three weapons available that way. Flamethrower/MG tanks come to mind which would be very effective on frontlines.
Nightinggale
Fast Inserter
Fast Inserter
Posts: 120
Joined: Sun May 14, 2017 12:01 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Nightinggale »

Skeleton Man wrote:In what case would there be only light enemies such that you'd want to conserve stronger ammo?
Unless you're using some kind of mod that makes small/medium biters far more frequent later game where there might even be a choice between two ammo types, there's no point in using any different ammo since every wave is evenly composed of heavy and light units, and the heavy units necessitate the stronger ammo automatically. That, and stronger ammo is flatly stronger than its predecessor. The only saving grace is that standard magazines compared to piercing is standard is dirt cheap to manufacture, but with proper infrastructure you can pump out far more effective piercing rounds anyways.
Good point.

Maybe the real answer is to in addition to selecting ammo/gun, it also select target. Something like a signal for each enemy type and it will shoot at the type with the highest value first. A negative value means never. This allows the player to set up units with high damage, but now fire rate to shoot big enemies exclusively while other vehicles can use weapons optimized to take out swarms of low health enemies. If a radar vehicle is introduced, you can change the role of a multi gun/ammo vehicle according to the enemies encountered, but at the same time it should be possible to set the data manually or with a vehicle deployer, meaning you can use vehicle roles without messing with circuit networks.
whitecold
Inserter
Inserter
Posts: 46
Joined: Fri May 19, 2017 6:48 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by whitecold »

Very sad to hear that multiple weapons don't work. I really wanted to deploy those flamethrowers on my tanks. Is there any way on how to use the global vehicle ID instead of the ones by type on the various sensors/commands, or any quick fix to stick the flamer back into the tank? The main nuisance of the by type is that I can't loop over all my vehicles.
User avatar
Earendel
Factorio Staff
Factorio Staff
Posts: 716
Joined: Sun Nov 23, 2014 11:57 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Earendel »

Right now the targeting system uses the highly optimised find_nearest_enemy api call, which seems to have the same logic as turrets. It is very fast, but lacks the ability to customise target selection which would be a nice feature at the cost of performance, not just in battle but out of battle too (as it's used for enemy detection). That is an option I will consider later depending on what the performance loss would be.

If I did add alternate target selection it would probably use some preset target selection modes. Suggestions on what those mods could be, and how you specify them are welcome even though I can't promise it will ever be a feature. My current thinking is that each selection mode would be a signal, and the selection priority would be weighted based on the signal input count:
Eg:
Enemy Armour 100
Enemy Health 1
Enemy Distance -10
Would have the effect:
Each enemy Armour adds 100
Each enemy Health adds 1
Each enemy Distance subtracts -10
So the unit would attack high armour units with high health that are closer.
Where as Health -10000, Distance -1 would mean go for the most damaged enemy, and in the case of a draw target the closer one.

Also, with bobs tank mk3, I can split it into multiple versions. It has the laser gun because that's unique to that tier but I can allow another variant though. This is the most important weapon for people?

I will be fixing the cargo plane problem, I haven't been able to do much the last few days, a lot has been going on.

There will be some new vehicles soon, I might rush them out with temporary graphics just to fill the current role gaps (flame and gatling tanks).
Skeleton Man
Inserter
Inserter
Posts: 23
Joined: Fri Jun 02, 2017 1:21 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Skeleton Man »

Earendel wrote:
There will be some new vehicles soon, I might rush them out with temporary graphics just to fill the current role gaps (flame and gatling tanks).
Would be nice to have some kind of artillery-type vehicle. Poor manuvering and speed making it difficult to get into position after deployment, but able to attack over long range, maybe a screen or two, slow turret traverse speed. The only problem would be making ammo for it. Probably slow moving, targets-the-ground kind of ammo with modest damage and blast radius. Shells could have a low stack size making infrastructure for delivering and producing ammo to your artillery emplacements required. Different kinds of shells based on existing types of ammo would probably be easy to scale up too, like explosive, poison, slowing, or napalm. Obviously it would be weak on its own without protection provided by turrets or other vehicles capable of wiping bugs close by.

Could work well as a damage-support vehicle, but I can see problems with them simply being deployed next to huge chests in base as a solution to fairly wide-area base defense. You'd probably have to give it a minimum firing distance too.
Nightinggale
Fast Inserter
Fast Inserter
Posts: 120
Joined: Sun May 14, 2017 12:01 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Nightinggale »

It looks to me like if vehicles are assigned to follow a certain vehicle, they will form a circle around it. If some are killed afterwards, they will not move to fill the gap. Apparently vehicles are assigned an angle and a distance when assigned and it moves to always meet "target vehicle x,y + (distance, direction). This made me wonder. What if the unit controller can assign angle and distance? Clearly there is code in place to handle this once assigned, meaning it's just a matter of figuring out how to assign based on signals. That would allow the freedom of making more complex setups like strait lines of the width of the alien base you plan to attack, or simply to add combinators to remake the circle once it starts to contain holes. Allowing unit scanners to scan vehicle followed, angle and distance would be a nice addition and perhaps also get a count of vehicles following the scanned one, preferably as count of each type. Perhaps it would be good to get a signal of time since last combat or something to be able for a scanner to tell if combat is taking place.

It would likely need a new unit controller, or it would require using the two wires differently, like vehicle on green wire follows vehicle on red wire. It would also benefit from what I proposed a while ago where scanners and controllers would have an input like a decider combinator (true false statement) and then have a selector to either active on true condition, true if false last tick (raising edge triggering), or current code where it's every X ticks. This will allow setting up controllers to sleep and then wake up and do a lot of fast work and then go into sleep mode again.

The way I see sleeping controllers and scanners is that it allows lower overall CPU usage, fast when needed (fewer ticks between activation) and low latency (no wait for next activation) and support for variable latency (say it takes up to 10 ticks from scanner output to controller input is ready, but it can activate after 4 ticks if input is ready). Sure it may require more complex combinator setup, but if it defaults to current behavior it becomes an optional addition for people who wants to use it.
Skeleton Man wrote:Would be nice to have some kind of artillery-type vehicle.
Artillery would be a nice addition, though it would depend on having control of target priority. It would be sort of useless if it always attacks the nearest. Most likely the current code would make them fire once before the aliens start to move to attack. However since the aliens will charge once hit, by the time the artillery is ready to fire again, the tanks are in combat and will be far superior combat units due to the close distance. To make artillery useful, it would keep firing at ranged aliens, preventing the case ranged aliens are not fired upon because they have melee aliens in front.
Skeleton Man wrote:able to attack over long range, maybe a screen or two
This is a really poor way of telling distance as you can zoom in and out and it likely depends on screen resolution as well. Also is "a screen" vertical or horizontal? To use a metric common to all, we would need something like number of tiles, row of X assembly machines or X times the range of some other unit. Luckily the precise number isn't important as all we need right now is "noteworthy longer than other units".
Earendel wrote: My current thinking is that each selection mode would be a signal, and the selection priority would be weighted based on the signal input count:
Sounds better than what I proposed. It doesn't require knowledge of each type of alien and doesn't require updating to handle new alien units. Just remember that people might want to assign priority to buildings and that turrets should be possible to have a different priority than non-combat buildings.
Earendel wrote:Right now the targeting system uses the highly optimised find_nearest_enemy api call, which seems to have the same logic as turrets. It is very fast, but lacks the ability to customise target selection which would be a nice feature at the cost of performance, not just in battle but out of battle too (as it's used for enemy detection). That is an option I will consider later depending on what the performance loss would be.
It should have a cooldown timer and if it haven't been shooting for X ticks, it will switch to standby mode, in which case it will use the current fast code. Once something gets into range, it will switch back to high CPU mode. That should remove the issue with performance issues when out of combat.

Another thing to consider is that acceptable performance tradeoff differs between people and hardware. If the current code is kept for out of combat it shouldn't be difficult to make a mod setting to allow keep using the current setup on low end systems while high end gaming rigs can make use of the higher CPU power.
Post Reply

Return to “Mods”