[MOD 0.14] AAI Programmable Vehicles

Topics and discussion about specific mods
Ender_Invader
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sun Mar 12, 2017 10:43 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Ender_Invader »

Ok, I will have to try my setup using the deployer. I have been olacing the convoy vehicle by hand so I have have to see if using the deployed works.

Exavier724
Burner Inserter
Burner Inserter
Posts: 18
Joined: Sat Apr 09, 2016 5:53 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Exavier724 »

Haha ok.

Here is what I have been working on for most of this afternoon....
Image
Description
I removed the Nixie Tubes from the blueprint in case you don't use that mod. If you do use them then they connect to the combinator directly above them to output the current Vehicle & Zone IDs. Because I like to see things working :)
Blueprint Code without Nixie Tubes
Now I just need to do the same thing with my Patrol array and I will be set on automated vehicles for now. Luckily I made this thing modular so I can reuse most of it for other arrays. Now if only I could keep the things from trying to kamikaze me every time I am in the area. I swear the biter movement AI these things use has an aggressor algorithm built into it that my haulers are adopting lol

British_Petroleum
Filter Inserter
Filter Inserter
Posts: 321
Joined: Tue Dec 23, 2014 7:21 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by British_Petroleum »

Hello,

Really enjoying the mod so far. I have a problem though. I can't get the depot to load ammo into my chaingunner. I have ammo in the depot, and i'm sending a negative ammo signal to the depot, but there is still no ammo in my chaingunner :( please help. Picture attached
Attachments
Untitled.jpg
Untitled.jpg (141.68 KiB) Viewed 10313 times

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 »

Exavier724 wrote:@Earendel: Found a crash for you to look at.

Situation:
- Deployment Structure with a Chaingunner rolling off the line
- Tile Scanner configured to continuously scan the the spot where the unit comes to rest
- Long arm inserter placed to provide initial fuel to the new vehicle & linked to the scanner with condition "Unit ID Signal > 0" to turn it on.

If you accidentally or deliberately remove the vehicle (pick it back up) while the inserter is trying to fill it, you will get a game crash.

Error:
Error while running event on_tick (ID 0)
__aai-programable-structures__/control.lua:901:attempt to index field "vehicle" (a nil value)

Probably just needs a callback check to keep it from crashing out.


EDIT: Otherwise I am finally getting the hang of this I think. Just finished getting a controller working for my haulers that won't require me to touch it for a very long time even if I deploy more miners or haulers... though the randomness of it might get obnoxious when i get too many, for now with 4/2 it keeps the haulers randomly bouncing between potential pickup points and recalls them back to the depot when their inventory is full lol. Only used 3 scanners (zone scanner to mark the depot & 2 unit scanners) using a combination of the Miner & Patrol examples from the first page :)
Thanks for a good description of the problem, it should be fairly easy to fix.
British_Petroleum wrote:Hello,

Really enjoying the mod so far. I have a problem though. I can't get the depot to load ammo into my chaingunner. I have ammo in the depot, and i'm sending a negative ammo signal to the depot, but there is still no ammo in my chaingunner :( please help. Picture attached
The problem is that the chaingunner is not requesting ammo. You can change that with the Vehicle Deployer or Unit Data Controller, send in signals of what you want it to request (magazines & fuel).

At some point I might try to get military units by default to request all of the ammo types they can use, but it's not as simple as it sounds.

British_Petroleum
Filter Inserter
Filter Inserter
Posts: 321
Joined: Tue Dec 23, 2014 7:21 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by British_Petroleum »

British_Petroleum wrote:Hello,

Really enjoying the mod so far. I have a problem though. I can't get the depot to load ammo into my chaingunner. I have ammo in the depot, and i'm sending a negative ammo signal to the depot, but there is still no ammo in my chaingunner :( please help. Picture attached
Earendel wrote: The problem is that the chaingunner is not requesting ammo. You can change that with the Vehicle Deployer or Unit Data Controller, send in signals of what you want it to request (magazines & fuel).

At some point I might try to get military units by default to request all of the ammo types they can use, but it's not as simple as it sounds.
Thanks, I got it working now. The description of the depot is a bit misleading.

I have another problem. When i try to manually repair scanners or controllers it says "This cannot be mined" and i can't repair.

BlooSkies
Burner Inserter
Burner Inserter
Posts: 15
Joined: Thu Mar 16, 2017 3:14 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by BlooSkies »

Construction robots can repair them fine, mind.

Also, got an errant desync to report. I started a new MP save including the AAI mods. It worked fine at first, but after I started some basic automation using the examples from the OP, my clients could no longer connect, as it desynced immediately at the catch-up phase. I'd provide more info if I had any, but guesswork was the only way I even determined it was these mods causing the problem.

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 »

British_Petroleum wrote:
British_Petroleum wrote:Hello,

Really enjoying the mod so far. I have a problem though. I can't get the depot to load ammo into my chaingunner. I have ammo in the depot, and i'm sending a negative ammo signal to the depot, but there is still no ammo in my chaingunner :( please help. Picture attached
Earendel wrote: The problem is that the chaingunner is not requesting ammo. You can change that with the Vehicle Deployer or Unit Data Controller, send in signals of what you want it to request (magazines & fuel).

At some point I might try to get military units by default to request all of the ammo types they can use, but it's not as simple as it sounds.
Thanks, I got it working now. The description of the depot is a bit misleading.
It's difficult to explain. Feel free to suggest an improved description.
British_Petroleum wrote: I have another problem. When i try to manually repair scanners or controllers it says "This cannot be mined" and i can't repair.
Yeah I'm working on that, it's a weird one.
BlooSkies wrote:Construction robots can repair them fine, mind.

Also, got an errant desync to report. I started a new MP save including the AAI mods. It worked fine at first, but after I started some basic automation using the examples from the OP, my clients could no longer connect, as it desynced immediately at the catch-up phase. I'd provide more info if I had any, but guesswork was the only way I even determined it was these mods causing the problem.
There was a similar report a while ago but it just started working again and I never managed to find what caused the problem. The most helpful thing you can do is try to narrow down what changed between a working and desyncing version. Also you could send me the map, that might be useful.

Zarnoo
Long Handed Inserter
Long Handed Inserter
Posts: 57
Joined: Thu Mar 31, 2016 6:01 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Zarnoo »

I love the look of this, and have tried a few of the original example (using the blueprirnt codes) to get a miner, and then a hauler to go pick up the ore.. my miner gathers coal, but the hauler just sits there. I'm gonna have a tinker, but is there a gamesave I can look at which has this configured as an example ?
Z

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 »

Zarnoo wrote:I love the look of this, and have tried a few of the original example (using the blueprirnt codes) to get a miner, and then a hauler to go pick up the ore.. my miner gathers coal, but the hauler just sits there. I'm gonna have a tinker, but is there a gamesave I can look at which has this configured as an example ?
Z
I don't have one that's good for sharing right now but that's a good idea to help get people started.

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 »

Announcement

I'm giving kyranzor (Robot Army mod) permission to copy and modify the Unit Remote Controller section of code so that he can add some RTS control functionality to the Robot Army mod.

pato
Long Handed Inserter
Long Handed Inserter
Posts: 64
Joined: Wed Oct 12, 2016 5:08 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by pato »

Hi,

there seems to be an issue with your lazer tank piercing batteries.
They always target the nearest enemy, which is making them a bit pointless, as they will never hit the targets behind.

Can you change the piercing as a fixed range, so that it doesn´t matter where the tank is firing to?

User avatar
Philip017
Filter Inserter
Filter Inserter
Posts: 360
Joined: Thu Sep 01, 2016 11:21 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Philip017 »

hi thanks for this very interesting mod

hope to have a look at your tutorial video when it's ready to help me understand this intriguing mod

suggest rolling up all your AAI mods and dependencys into one mod instead of having to download 10+ different mods to get it all working together.

User avatar
jackd23
Burner Inserter
Burner Inserter
Posts: 8
Joined: Tue Feb 21, 2017 12:23 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by jackd23 »

When you try and use a repair pack on some of the buildings (e.g. zone scanner, tile scanner, zone controller, unit controller), it'll say "This cannot be mined.", and you cannot repair the structures *coughs*hidesshotgunbehindback*.
Doctor, doctor, I have a condition, it's TRUE!

User avatar
Philip017
Filter Inserter
Filter Inserter
Posts: 360
Joined: Thu Sep 01, 2016 11:21 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Philip017 »

ok i have played a little (20hrs) with this mod and still have yet to figure out how to get the vehicles to move themselves.
ex - miners to mine the entire field of coal instead of only sitting where i last drove it
- haulers to take from the miners to the silo requesting the ores

suggest:

simplify the process for drop down usage,

example
when you drop a miner down on a coal patch it will automatically begin mining that coal and will move when it's patch is empty to the next nearest patch, but will not leave the ore field.
if you place a hauler down next to the miner it will begin hauling that coal to the nearest silo (in range) that is requesting coal if you set the silo next to the coal field it could automatically begin requesting coal.
silos can be hooked to the circuit network OR has a icon that you can click that silo will simply hold only that ore like coal
with out further programming, haulers (in range) will take coal from the silo to fuel other miners and themselves.
you can limit the range of automatic movement so that with out using the circuit network your vehicles can be used with out needing to program other structures.

hebeldark
Burner Inserter
Burner Inserter
Posts: 8
Joined: Fri Mar 31, 2017 7:06 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by hebeldark »

Hi

i discover your mod and i tell you awesome !!

but i have a trouble to use your sample with miner and hauler loop

i create the structure with scanner/controller...

when i fill the hauler, this unit go to depot but i don t have automatic transfert into the depot
=> i put a black circle on the depot.the hauler move right on the depot
and when the hauler is empty, this unit go to the location of id miner but same trouble, no transfert automatic

once, i see the message but that's all

i tried to play with Y coordonate to place hauler more higher or more below the miner but no effect...
do you have any idea ?

update: i found two things
1: depot must to have the ressource with set actif to transfert ressource
2: transfert auto work with MK2 miner...

thx

Eugenii10
Burner Inserter
Burner Inserter
Posts: 5
Joined: Tue Mar 07, 2017 1:30 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Eugenii10 »

Earendel wrote: What I could do is make some alternate tank ammo that is single target instead of direction-based with collision, so the only risk of collateral damage would the explosion radius of the explosive variant.
Hello and thanks for another great mod!
Is there any chance that AI turret behaviour for vehicles could be disable through "Unit Data" in future versions? It is a real problem when you left your tank with custom ammo and it starts to destroy your buildings (at a line of fire).
Thanks!

Knell
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sun Apr 02, 2017 11:09 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Knell »

Hello! love the mod,


need a quick helping hand,


Trying to setup a hauler to go from Depot to Depot transporting Iron plates, i have the correct setup for when it has iron plates but when it empties its inventory it just stays there and doesn't return to the pickup depot could you help me out?

I would also like it on a 1 minute timer to go back to the orignal pick up depot

Here is a screenshot of the setup.

Image

Image

I appreciate the help!

Eugenii10
Burner Inserter
Burner Inserter
Posts: 5
Joined: Tue Mar 07, 2017 1:30 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Eugenii10 »

Knell wrote:when it empties its inventory it just stays there and doesn't return to the pickup depot
In order to make a depot pick items from Hauler, you must set output signal at the "Vehicle Depot Exchange Data" (brown board at the top right corner with red & green wires) with the item signal of desired amount. And depot will take items from the Hauler like Hauler do it with the Miner.
Screenshot

Knell
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sun Apr 02, 2017 11:09 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Knell »

Eugenii10 wrote:
Knell wrote:when it empties its inventory it just stays there and doesn't return to the pickup depot
In order to make a depot pick items from Hauler, you must set output signal at the "Vehicle Depot Exchange Data" (brown board at the top right corner with red & green wires) with the item signal of desired amount. And depot will take items from the Hauler like Hauler do it with the Miner.
Screenshot
I have the depots sets they transfer items and such my problem is, the hauler after dropping off what it picks up doesnt return to the depot it picked up the items from to pick up again

Eugenii10
Burner Inserter
Burner Inserter
Posts: 5
Joined: Tue Mar 07, 2017 1:30 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Eugenii10 »

Sorry, I didn't understand your question right first time.
If I wanted to deliver products by Hauler from one Vehicle depot to another, I would use something like this (Green Zone - it is Departure Depot, where Hauler is filled up; Red Zone - it is Arrival Depot, where Hauler is emptied):
It seems that "Time Since Moved Locked Signal" is not very reliable to contol unit waiting time in these conditions, so I used "Time Since Last Command Signal" instead.
Scheme
As I understand it is also not very good to send some command constantly even under some condition. So you just need to send "Move command" just once, wait until Hauler is filled/emptied, and send another "Move command" just once (not constantly while some condition true, for example it is not very good to send "Move to Departure" command constantly until Hauler didn't came to Departure Depot). The simple way to interval command is using Decider Combinator, in my scheme it will send "Move command" every 61 tick (less than 1 time in a second). But the best way (in my opinion) is to use more complex scheme like this:
It will send "Move command" only once and idle until all conditions will met another time.
IMPORTANT NOTE: when control signal "0" dissapeared, this scheme will send signal "0" with a value "-1" once. So you need a one more Decider Combinator to check value of "0" signal and resend it further only if it is positive (if you use Arithmetic Combinator like EVERYTHING x "0" => SEND EVERYTHING), or use Decider Combinator like "0" > 0 => SEND EVERYTHING .
One tact impulse scheme

Post Reply

Return to “Mods”