[MOD 0.14] AAI Programmable Vehicles

Topics and discussion about specific mods
User avatar
Alien_Squasher
Long Handed Inserter
Long Handed Inserter
Posts: 83
Joined: Wed Oct 12, 2016 9:18 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Alien_Squasher »

Can someone place these blueprints for me in their 0.14 world then update to 0.15 and scan them again? These don't work in .15 and I can't run 0.14 because I have modified too much of the games cache because I've ported a bunch of 0.12 mods and integrated new graphics for them.
Hi. I kill Aliens :D

The Hitchiker's Guide to the Galaxy states that when dealing with complex machinery of any sort the first step is: do not panic. If you can do this you're well on your way to being a grade A excuse for an engineer.

Mr_Waffle
Manual Inserter
Manual Inserter
Posts: 2
Joined: Wed Oct 12, 2016 5:59 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Mr_Waffle »

Fellas, I'm stumped similar to the below quoted issue. I've tried I believe to correctly emulate the setup per the sample, setting wood=0 and output as input count. After 2 hours, I give up, I can't seem to debug this correctly.

I'd be grateful if anyone can look at my blueprint below and let me know where I've messed up. I also made a screenshot, showing the green dot. I think an hour passed while I researched/googled this, and it was still there marked despite the sample setup that should have removed the 2 green dots.

Thanks for looking in advance !
My failed Clear Empty Resource Zone
Screenshot of Setup
Decider Setting
Mobius1 wrote:
Bushdoctor wrote:Hello,

This mod is absolutely amazing and even though I'm a complete Combinator illiterate, I managed to get a few things working by blindly copying the examples given in the original post.
However, the example for 'Clear Empty Resource Zone' confused me. The description for the settings for the top two Decider Combinators are different from previous descriptions
and do not match up with the options that the combinator gives me.
As shown here:
image
Why is there a double equals-to sign, and why is there no mention of what to set for the X and the Y?
I have made the following setting: Wood = 0 and for both X and Y i set 'Input Count'. Is that correct?
That double = sign is often used in programming languages to determinate that one side is "equal" to the other side, because just one = sign means "set" where the left side would receive the value of the right side. For combinator you read it as just 1 = sign and it'll be fine.

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 »

Mr_Waffle wrote:Fellas, I'm stumped similar to the below quoted issue. I've tried I believe to correctly emulate the setup per the sample, setting wood=0 and output as input count. After 2 hours, I give up, I can't seem to debug this correctly.

I'd be grateful if anyone can look at my blueprint below and let me know where I've messed up. I also made a screenshot, showing the green dot. I think an hour passed while I researched/googled this, and it was still there marked despite the sample setup that should have removed the 2 green dots.

Thanks for looking in advance !
The Zone Controller needs to have an X and Y coordinate input into it only so it will delete the zone. Your scanner finds zones and broadcasts out their X and Y coordinates. Then, you pass those coordinates through to your decider combinator to set a condition in which the X and Y coordinates are allowed to pass through.

The decider is only checking a particular value, it does not actually have to operate on the X and Y value. In this case, your decider is not allowing the X or Y values to pass through after checking if it is receiving a wood signal. You need to set your deciders to output X and Y, and tick the "input count" box. This way, you feed the combinators the X, Y, and wether or not the tile has wood. The decider checks to see if the tile has wood on it, and if it doesn't, will output (essentially, allow passage) of the X and Y coordinates to the other side of the decider, which then hook up to the zone controller. Then the zone controller reads the X and Y coordinates provided to it and clears the zone.

Mr_Waffle
Manual Inserter
Manual Inserter
Posts: 2
Joined: Wed Oct 12, 2016 5:59 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Mr_Waffle »

Ah, the devil in the details..... Thanks for that push in the right direction. That cured I think the problem. Now, I get to wrap my befuddled head around the hauler to miner challenge.

Again, thank you very much.
The decider is only checking a particular value, it does not actually have to operate on the X and Y value. In this case, your decider is not allowing the X or Y values to pass through after checking if it is receiving a wood signal. You need to set your deciders to output X and Y, and tick the "input count" box. This way, you feed the combinators the X, Y, and wether or not the tile has wood. The decider checks to see if the tile has wood on it, and if it doesn't, will output (essentially, allow passage) of the X and Y coordinates to the other side of the decider, which then hook up to the zone controller. Then the zone controller reads the X and Y coordinates provided to it and clears the zone.

User avatar
Earendel
Factorio Staff
Factorio Staff
Posts: 711
Joined: Sun Nov 23, 2014 11:57 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Earendel »

Version 0.2.17 has been released.

This is notable because there's is a new feature involving basic automation without combinators. If you have a unit selected with the Unit Remote Controller and you shift-click on a player or on another vehicle, the selected vehicle will follow the vehicle you clicked on. If you have multiple units selected then instead of following directly they will try to follow in a circle around the target.

You can give follow commands with the Unit Controller tower too, send it a "Follow ID Signal" or "Follow Player Signal", it will keep at a default distance. Add a distance signal to change the follow distance, add an angle signal to keep a fixed angle. Use X and Y tiles to specify an absolute offset from the target instead. Use X and Y Subtiles to speify an orientation offset, based on the direction the player or vehicle is facing.

This makes formations much easier to do.
Alien_Squasher wrote:Can someone place these blueprints for me in their 0.14 world then update to 0.15 and scan them again? These don't work in .15 and I can't run 0.14 because I have modified too much of the games cache because I've ported a bunch of 0.12 mods and integrated new graphics for them.
I need to update the demo map and the examples, then I will update the blueprint strings. It's next on my list.

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:Version 0.2.17 has been released.

This is notable because .

This makes formations much easier to do.

thank you!!

One other thing tho...
15.17 I can't use vehicle automation... Factorio is upset over "basic vehicles" not defined or some such i didn't screen shot.. )late nite) have you seen this yet?

User avatar
Earendel
Factorio Staff
Factorio Staff
Posts: 711
Joined: Sun Nov 23, 2014 11:57 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Earendel »

sumdawgy wrote:
Earendel wrote:Version 0.2.17 has been released.

This is notable because .

This makes formations much easier to do.

thank you!!

One other thing tho...
15.17 I can't use vehicle automation... Factorio is upset over "basic vehicles" not defined or some such i didn't screen shot.. )late nite) have you seen this yet?
Oh, that's probably because I made the hauler mod optional... but maybe it's not so optional yet. I will fix that.

Pandemoneus
Fast Inserter
Fast Inserter
Posts: 127
Joined: Fri May 08, 2015 2:25 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Pandemoneus »

Looking forward to the updated example files! Honestly, I'm having some trouble properly programming the vehicles without them going all over the map in random directions. :(
My RSO+Bob's+Angel's modpack: Farlands (outdated)
Mods (current): Resource Labels
Mods (old): Biter Spires

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 »

Is there a way to set the unit data on a vehicle such that it can void items in its fuel/ammunition slots, or do I have to unload them manually? Setting them to -1 only voids their cargo contents.

Having expendable vehicles like chaingunners or cars suck up 50 of a fuel item or 200 magazines if they're left nearby a depot is a downer, but having to unload the vehicles by hand when I recall them to deploy them somewhere else is probably worse.

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 »

Speaking of (un)loading ammo, could the loading include the count in fuel and ammo slots? Right now if you set a vehicle to load 200 bullets, it loads 200, puts them into an ammo slot and then load another 200, meaning unitdata of 200 actually gives 400. Even worse if the ammo slot has one bullet left, it will not load and it will just load 200 into cargo, meaning it has only 201. In other words setting unit data to loading 200 bullets will give 201-400 bullets.

It would be nice if you could set it to 400 bullets (or whatever you want) and then be sure that's what they all have on loading between combat. The same goes for fuel.

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:Speaking of (un)loading ammo, could the loading include the count in fuel and ammo slots? Right now if you set a vehicle to load 200 bullets, it loads 200, puts them into an ammo slot and then load another 200, meaning unitdata of 200 actually gives 400. Even worse if the ammo slot has one bullet left, it will not load and it will just load 200 into cargo, meaning it has only 201. In other words setting unit data to loading 200 bullets will give 201-400 bullets.

It would be nice if you could set it to 400 bullets (or whatever you want) and then be sure that's what they all have on loading between combat. The same goes for fuel.
Unfortunately I believe fuel and ammunition slots are both separate and distinct inventories from cargo. Unit data as it is now seems to only take into account cargo inventories, but when transferring inventories between depots and vehicles, it automatically tries to load ammo and fuel into the correct slots.

The only way i've been vaguely able to combat this is to use conveyor belts to pass newly deployed vehicles by a number of depots. Vehicles are set to only grab, for instance, 20 fuel and 40 magazines at a time. They're still inconsistent and will grab two or three times depending on the timing, but it gets the job done at the least.

User avatar
Earendel
Factorio Staff
Factorio Staff
Posts: 711
Joined: Sun Nov 23, 2014 11:57 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Earendel »

Skeleton Man wrote:Is there a way to set the unit data on a vehicle such that it can void items in its fuel/ammunition slots, or do I have to unload them manually? Setting them to -1 only voids their cargo contents.

Having expendable vehicles like chaingunners or cars suck up 50 of a fuel item or 200 magazines if they're left nearby a depot is a downer, but having to unload the vehicles by hand when I recall them to deploy them somewhere else is probably worse.
Nightinggale wrote:Speaking of (un)loading ammo, could the loading include the count in fuel and ammo slots? Right now if you set a vehicle to load 200 bullets, it loads 200, puts them into an ammo slot and then load another 200, meaning unitdata of 200 actually gives 400. Even worse if the ammo slot has one bullet left, it will not load and it will just load 200 into cargo, meaning it has only 201. In other words setting unit data to loading 200 bullets will give 201-400 bullets.

It would be nice if you could set it to 400 bullets (or whatever you want) and then be sure that's what they all have on loading between combat. The same goes for fuel.
I'll add those to the todo list.

Bortos
Burner Inserter
Burner Inserter
Posts: 18
Joined: Sun Aug 28, 2016 11:07 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Bortos »

Getting the following error:

Image

Keeps occurring when I drive near a nest in my car. No AAI vehicles are doing anything.

Save uploaded that has the error occur within 2 seconds after loading. Error is thrown 100% of the time
Attachments
_autosave2.zip
(10.21 MiB) Downloaded 92 times

Pandemoneus
Fast Inserter
Fast Inserter
Posts: 127
Joined: Fri May 08, 2015 2:25 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Pandemoneus »

By the way, there seems to be a dupe. When I insert fuel into a flame tumbler (like 5 rocket fuel for example), drive 1 meter and then mine the tumbler, I get a full stack of fuel back instead of just 4.
My RSO+Bob's+Angel's modpack: Farlands (outdated)
Mods (current): Resource Labels
Mods (old): Biter Spires

User avatar
Earendel
Factorio Staff
Factorio Staff
Posts: 711
Joined: Sun Nov 23, 2014 11:57 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Earendel »

Bortos wrote:Save uploaded that has the error occur within 2 seconds after loading. Error is thrown 100% of the time
Thanks for uploading the save, that is extremely useful for debugging.

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 »

Error while running event aai-programmable-vehicles::on_tick (ID 0)
__aai-programmable-vehicles__/util.lua:182: attempt to perform arithmetic on field 'x' (a nil value)
I'm not really sure how this happened. I was driving in a car while controlling the rest of my vehicles, which consists of two more cars, some chaingunners, some flame thrower cars and one hauler with fuel and ammo supplies. No enemies in sight. I'm moving directly east and the last order was going north of a mining colony, which may have affected pathfinding if they decide not to go in a strait line. I have no idea if any of the vehicles might request fuel from the hauler, but it's possible since I had driven quite a distance. I have no vehicles not in this group (no miners etc).

Found the cause. There are some biters I didn't spot and the crash appears to be when the flame throwers tries to activate. Attached a savegame, which triggers within seconds after loading without any player inputs.
Attachments
aai vehicle crash savegame.zip
(7.07 MiB) Downloaded 101 times

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 »

Some structure of mine seems to be trying to query ID 0 on a vehicle and keeps crashing the game when it tries to perform an operation on "x" which is a nil value. Only seems to happen in very particular instances and I can't pin it down to what.

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 »

Error while running event aai-programmable-vehicles::on_tick (ID 0)
__aai-programmable-vehicles__/control.lua:911 bad argument #-1 to 'get_ammo_damage_modifier' (string expected, got nil)
Same savegame. This time I stopped the flame tumblers and tried to use chain gunners and cars. Both of those trigger this error. I'm not sure when or how it broke, but I used both cars and chain gunners earlier in this game without issues, meaning it broke very recently.

Manual control and attack using any of those vehicles seems to work just fine, which is likely to be expected considering the problem is in on_tick.

User avatar
y.petremann
Filter Inserter
Filter Inserter
Posts: 407
Joined: Mon Mar 17, 2014 4:24 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by y.petremann »

Got an error :
Error while running event aai-programmable-vehicles::on_tick (ID 0)
__aai-programmable-vehicles__/util.lua:135: attempt to index local 'b' (a nil value)
The structure that caused the crash :
Blueprint
Don't mind about the uglyness of this circuit ... It's mainly a work in progress for an automatic hauler (The hauler only move when needed and don't follow mining vehicles when they are not ready to give sufficient resources.)...

User avatar
Earendel
Factorio Staff
Factorio Staff
Posts: 711
Joined: Sun Nov 23, 2014 11:57 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Earendel »

y.petremann wrote:Got an error :
Error while running event aai-programmable-vehicles::on_tick (ID 0)
__aai-programmable-vehicles__/util.lua:135: attempt to index local 'b' (a nil value)
Nightinggale wrote:
Error while running event aai-programmable-vehicles::on_tick (ID 0)
__aai-programmable-vehicles__/control.lua:911 bad argument #-1 to 'get_ammo_damage_modifier' (string expected, got nil)
Same savegame. This time I stopped the flame tumblers and tried to use chain gunners and cars. Both of those trigger this error. I'm not sure when or how it broke, but I used both cars and chain gunners earlier in this game without issues, meaning it broke very recently.
Both issues should be fixed in v0.3.20.

Post Reply

Return to “Mods”