[MOD 0.14] AAI Programmable Vehicles

Topics and discussion about specific mods
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)
Sadly I still have this error with v0.3.20 when flame tumblers tries to attack. I tried mining a vehicle and place it again to get around possible migration issues. Same result. I'm using flamethrower ammo.

Bullets (cars and chain gunners) have been fixed and works fine. 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.
HalfDead
Manual Inserter
Manual Inserter
Posts: 2
Joined: Mon Apr 03, 2017 10:05 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by HalfDead »

Nightinggale wrote:
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)
Sadly I still have this error with v0.3.20 when flame tumblers tries to attack. I tried mining a vehicle and place it again to get around possible migration issues. Same result. I'm using flamethrower ammo.

Bullets (cars and chain gunners) have been fixed and works fine. 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.
I'm having this issue on 0.3.20 also. Same trigger of when flame tumbler tries to attack. Chain gunners appear to be fine.

Edit: further testing, I can manually drive and and fire the flame tumbler with no issues, the error only happens when it tries to fire autonomously. Also it doesn't matter if I use Flamethrower ammo or Flamejet ammo.
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 »

A new update is out. The inventory transfer system now considers fuel and ammo slots, so those are included in the current count but you can also remove items from those slots. The transfer particle effects now work properly with ammo items. Multi-layered item icons now also have particles, but the layers don't tend to line up all that well in all cases. There doesn't seem to be much I can do about that but it's all a bit of a blur once it's moving anyway. I also fixed an issue where vehicles would get stuck if the navigator has to path around the vehicle's original position.
Nightinggale wrote:
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)
Sadly I still have this error with v0.3.20 when flame tumblers tries to attack. I tried mining a vehicle and place it again to get around possible migration issues. Same result. I'm using flamethrower ammo.

Bullets (cars and chain gunners) have been fixed and works fine. 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.
This issue should be fixed in the new version too. Also thanks for the comments. Bugfixing is tedious and demotivating so it's nice that it doesn't go unnoticed.
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 »

This probably isn't directly your fault but the base AAI vehicles mod seems to hog a lot of CPU time even idling around. I had around 20 or so tanks following me in a warden and the base vehicles mod was using about 5 cpu time per frame while the warden was taking about 6 due to random damage and shit flying around

even if there isn't anything going on I still think the warden is trying to stay on top of every entity every tick to see if it needs a repair
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 »

A wild guess is that the warden scans the area every tick and scans each vehicle it finds for damage and low ammo/fuel. It should be enough to do so every 5 or 10 seconds when idle and by idle I mean a scan with no vehicles needing repairs, no combat etc. Providing 1-5 units of fuel should still be considered idle as it would otherwise go out of idle for no good reason while driving around.
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 »

The warden scans once every 60 ticks, if it finds something to do the next scan is 10 tick later instead of 60. That's already quite optimised without sacrificing usefulness as a healer.

I've had a battle squad of 30 units with no problems. Maybe other things are cluttering up the found entities list, like smoke particles. If you could post a screenshot with the F5 info on that would be useful.
User avatar
y.petremann
Filter Inserter
Filter Inserter
Posts: 421
Joined: Mon Mar 17, 2014 4:24 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by y.petremann »

I've got a situation, I use coal as fuel and I have 4 depots for iron, copper, stone and coal, the fact is that my hauler is set to follow task with priority :
  1. Hauler(coal<1000) & Coal Miner(coal>0) : go to CoalMiner
  2. Depot(Iron<10k) & Hauler(Iron<1000) & IronMiner( Coal<100 | Iron>1000 ) : go to IronMiner
  3. Depot(Iron<10k) & Hauler(Iron>=1000) : go to IronDepot
  4. Depot(Copper<10k) & Hauler(Copper<1000) & Copper Miner( Coal<100 | Copper>1000 ) : go to CopperMiner
  5. Depot(Copper<10k) & Hauler(Copper>=1000) : go to CopperDepot
  6. Depot(Stone<10k) & Hauler(Stone<1000) & StoneMiner( Coal<100 | Stone>1000 ) : go to StoneMiner
  7. Depot(Stone<10k) & Hauler(Stone>=1000) : go to Stone Depot
  8. Depot(Coal<10k) & Hauler(Coal>=1000) : go to Coal Depot
CoalDepot is set with Coal=10k
Hauler is set with Coal = 1500
Miners are set with Coal = 600

Now comes the offending part, The hauler empty itself including his fuel slots and so run out of fuel near the Depots while going to the Coal Miner ...
From that Point I have a lot of questions :
  1. Why does fuel slot have higher priority over storage when giving ?
  2. Why does he never refill the fuel slot itself (while miner to it) ?
  3. Why does the hauler give his fuel from the fuel slot to depots and miners risking to run out of fuel ? Which is a situation that can occur if the vehicle is nearly out of fuel (on the fuel bar) and another vehicle or depot ask 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 »

Earendel wrote:The warden scans once every 60 ticks, if it finds something to do the next scan is 10 tick later instead of 60. That's already quite optimised without sacrificing usefulness as a healer.

I've had a battle squad of 30 units with no problems. Maybe other things are cluttering up the found entities list, like smoke particles. If you could post a screenshot with the F5 info on that would be useful.
I dont think I was using the latest version of the mod, it still shows a lot of CPU time but performance isn't nearly as bad must have been something else. Interfacing directly with the slots on vehicles is very nice, much easier to keep tabs on supplies now, thanks.
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:I've got a situation, I use coal as fuel and I have 4 depots for iron, copper, stone and coal, the fact is that my hauler is set to follow task with priority :
  1. Hauler(coal<1000) & Coal Miner(coal>0) : go to CoalMiner
  2. Depot(Iron<10k) & Hauler(Iron<1000) & IronMiner( Coal<100 | Iron>1000 ) : go to IronMiner
  3. Depot(Iron<10k) & Hauler(Iron>=1000) : go to IronDepot
  4. Depot(Copper<10k) & Hauler(Copper<1000) & Copper Miner( Coal<100 | Copper>1000 ) : go to CopperMiner
  5. Depot(Copper<10k) & Hauler(Copper>=1000) : go to CopperDepot
  6. Depot(Stone<10k) & Hauler(Stone<1000) & StoneMiner( Coal<100 | Stone>1000 ) : go to StoneMiner
  7. Depot(Stone<10k) & Hauler(Stone>=1000) : go to Stone Depot
  8. Depot(Coal<10k) & Hauler(Coal>=1000) : go to Coal Depot
CoalDepot is set with Coal=10k
Hauler is set with Coal = 1500
Miners are set with Coal = 600

Now comes the offending part, The hauler empty itself including his fuel slots and so run out of fuel near the Depots while going to the Coal Miner ...
From that Point I have a lot of questions :
  1. Why does fuel slot have higher priority over storage when giving ?
  2. Why does he never refill the fuel slot itself (while miner to it) ?
  3. Why does the hauler give his fuel from the fuel slot to depots and miners risking to run out of fuel ? Which is a situation that can occur if the vehicle is nearly out of fuel (on the fuel bar) and another vehicle or depot ask for fuel.
That's because all slots are now considered for transfer and there's no mechanic for a hauler to set anything as 'reserved' which you'd want to do for fuel usually.

I'm changing it so that units acting as a hauler won't consider fuel slots when giving items. I don't like this because it's another special rule that makes the whole system less consistent and harder to understand.

Ideally there would be a way to set a minimum value to keep for each item, but how would that work when sending signals in to unit data?

There could be dedicated signals for fuel management, but anything that has a fuel value is considered fuel so that could mess up all kinds of things.

I guess I could add an AAI Vehicles specific fuel block like solid fuel that could have special rules attached for these sorts of situations. That way there can be improved fuel handling while maintaining control over what gets used as fuel (i.e. anything you actually turn into these fuel items).
buggy123
Long Handed Inserter
Long Handed Inserter
Posts: 64
Joined: Sat May 13, 2017 11:53 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by buggy123 »

Is it possible to disable the 1-weapon limit for some vehicles? I use Bob's mods with AAI and AAI limits the tier-3 tank to only the first weapon, which is very annoying because the first weapon on the tier-2 tank is a amazing artillery gun, and the first weapon on the tier-3 tank is a meh laser gun. It effectively makes the tier-3 tank a downgrade.

I don't mind if the AI can't handle more than 1 weapon; I'm only planning to drive the tank manually.


Edit: Figured it out. For anyone else who wants to fix this, open aai-programmable-vehicles_0.3.22.zip\aai-programmable-vehicles_0.3.22\prototypes\entity\entity-update-externals.lua with a compatible text editor (i recommend notepad++ to ensure it preserves the formatting), and delete this bit near line 100:

Code: Select all

  -- bobs
if data.raw.car["bob-tank-2"] and data.raw.gun["tank-artillery-1"] then data.raw.car["bob-tank-2"].guns = {"tank-artillery-1"} end
if data.raw.car["bob-tank-3"] and data.raw.gun["tank-laser"] then data.raw.car["bob-tank-3"].guns = {"tank-laser"} end
Note: I haven't tested this extensively, it may break things. I only tested it as far as placing the tank and checking to see if all the guns were there.
User avatar
y.petremann
Filter Inserter
Filter Inserter
Posts: 421
Joined: Mon Mar 17, 2014 4:24 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by y.petremann »

Earendel wrote:
y.petremann wrote:I've got a situation, I use coal as fuel and I have 4 depots for iron, copper, stone and coal, the fact is that my hauler is set to follow task with priority :
  1. Hauler(coal<1000) & Coal Miner(coal>0) : go to CoalMiner
  2. Depot(Iron<10k) & Hauler(Iron<1000) & IronMiner( Coal<100 | Iron>1000 ) : go to IronMiner
  3. Depot(Iron<10k) & Hauler(Iron>=1000) : go to IronDepot
  4. Depot(Copper<10k) & Hauler(Copper<1000) & Copper Miner( Coal<100 | Copper>1000 ) : go to CopperMiner
  5. Depot(Copper<10k) & Hauler(Copper>=1000) : go to CopperDepot
  6. Depot(Stone<10k) & Hauler(Stone<1000) & StoneMiner( Coal<100 | Stone>1000 ) : go to StoneMiner
  7. Depot(Stone<10k) & Hauler(Stone>=1000) : go to Stone Depot
  8. Depot(Coal<10k) & Hauler(Coal>=1000) : go to Coal Depot
CoalDepot is set with Coal=10k
Hauler is set with Coal = 1500
Miners are set with Coal = 600

Now comes the offending part, The hauler empty itself including his fuel slots and so run out of fuel near the Depots while going to the Coal Miner ...
From that Point I have a lot of questions :
  1. Why does fuel slot have higher priority over storage when giving ?
  2. Why does he never refill the fuel slot itself (while miner to it) ?
  3. Why does the hauler give his fuel from the fuel slot to depots and miners risking to run out of fuel ? Which is a situation that can occur if the vehicle is nearly out of fuel (on the fuel bar) and another vehicle or depot ask for fuel.
That's because all slots are now considered for transfer and there's no mechanic for a hauler to set anything as 'reserved' which you'd want to do for fuel usually.

I'm changing it so that units acting as a hauler won't consider fuel slots when giving items. I don't like this because it's another special rule that makes the whole system less consistent and harder to understand.

Ideally there would be a way to set a minimum value to keep for each item, but how would that work when sending signals in to unit data?

There could be dedicated signals for fuel management, but anything that has a fuel value is considered fuel so that could mess up all kinds of things.

I guess I could add an AAI Vehicles specific fuel block like solid fuel that could have special rules attached for these sorts of situations. That way there can be improved fuel handling while maintaining control over what gets used as fuel (i.e. anything you actually turn into these fuel items).
I think that adding another fuel is not quite right, maybe adding a fuel signal that indicate how much fuel is reserved and not transferable, so for standard 2 fuel slot on coal and solid fuel it would mean 100 and when a transfer occur, it will indicate that it need a minimum of 100 items acting as fuel (whatever they are).
Last edited by y.petremann on Mon Jun 12, 2017 1:28 pm, edited 1 time in total.
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 »

I recall there being mention of not being able to get dummy ammunition to terminate itself after a distance
seemingly random things at my base were blowing up and I was wondering why, thought it was an issue having to do with rampant or something
turns it it was standard cannon shells piercing their targets and happening to be on a vector that would hit something at my base as they sailed across the ocean

gets me thinking about a command to force a vehicle to fire at a particular vector or tile for ghetto long range artillery
User avatar
y.petremann
Filter Inserter
Filter Inserter
Posts: 421
Joined: Mon Mar 17, 2014 4:24 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by y.petremann »

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)
swatti
Burner Inserter
Burner Inserter
Posts: 9
Joined: Sun Jul 17, 2016 6:27 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by swatti »

QUESTION: How hard would it be to make the miner move/patrol between two points?

I have infinite resources mod so patrol between depot and ore-field. Just two points.
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 »

swatti wrote:QUESTION: How hard would it be to make the miner move/patrol between two points?

I have infinite resources mod so patrol between depot and ore-field. Just two points.
If you want something really basic and easy to build, do this:
  1. Set up two zones. I will call them A and B, but they can be whatever you want from zones, even two numbers from the same type.
  2. Make a unit scanner and input the miner. Output is just the zone and unit ID (nothing else is needed)
  3. Set up a zone scanner to get X and Y for B
  4. Output to a decider combinator, which triggers if zone A (zone type = the index) and outputs everything by value (green wire)
  5. Connect the output from the unit scanner to the decider combinator (red wire)
  6. Connect the output of the decider combinator to a unit controller
Now if the unit is on zone A, the unit controller will get the unit ID and X,Y for B and it will go there. To go the other way as well, do:
  1. Zone scanner with A as input. Output X and Y
  2. Connect output to a new decider combinator, which triggers if zone B (zone type = the index) and outputs everything by value (green wire)
  3. Connect output from this decider combinator to the same unit controller
  4. Connect output from unit scanner to the new decider combinator (red wire)
Now the setup is complete, but it will order the miner every tick, which is CPU heavy and might jam it because the constant new orders can freeze it. Click on output of both unit scanner and controller and set the tick count high, like 300, if not higher. That should reduce CPU load and give the miner time to respond to orders. Zone scanners can be set to extremely high tick counts as their output will not change anyway. Give it say 100k once the output has been set.

I can think of better layouts than this, but to explain/show how the system works, this is likely the best. It doesn't confuse with optimization and it should work.

Possible expansion: if you set the output of one decider combinator to the input of another one and both output everything by value, then the output will only reach the end (unit controller) if both conditions are met. This means you can add a condition like miner has less than 10 slots free, preventing the constant drive. I really recommend getting the base up and running first though. Next step would be to make it trigger on either full cargo or low fuel and that way it can be made more and more advanced one step at a time.

One tip though. It would be more efficient if you place a miner and never move it. Move a hauler instead between the unload point and a zone next to the miner. Also do note that you can place a zone in the middle of the cargo load/unload building, but the game will draw the zone icon below the building, meaning you can't actually see i, but it's there and you can use zone scanners to get the coordinates.
waduk
Filter Inserter
Filter Inserter
Posts: 372
Joined: Tue Feb 10, 2015 5:44 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by waduk »

Crash when try to install, already install all the dependencies.:
Image

I just want to try Programmable vehicle, do i really need to install all the dependencies ?

I just want to use vanilla vehicle.
swatti
Burner Inserter
Burner Inserter
Posts: 9
Joined: Sun Jul 17, 2016 6:27 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by swatti »

Nightinggale wrote:
swatti wrote:QUESTION: How hard would it be to make the miner move/patrol between two points?

I have infinite resources mod so patrol between depot and ore-field. Just two points.
If you want something really basic and easy to build, do this:
  1. Set up two zones. I will call them A and B, but they can be whatever you want from zones, even two numbers from the same type.
  2. Make a unit scanner and input the miner. Output is just the zone and unit ID (nothing else is needed)
  3. Set up a zone scanner to get X and Y for B
  4. Output to a decider combinator, which triggers if zone A (zone type = the index) and outputs everything by value (green wire)
  5. Connect the output from the unit scanner to the decider combinator (red wire)
  6. Connect the output of the decider combinator to a unit controller
Now if the unit is on zone A, the unit controller will get the unit ID and X,Y for B and it will go there. To go the other way as well, do:
  1. Zone scanner with A as input. Output X and Y
  2. Connect output to a new decider combinator, which triggers if zone B (zone type = the index) and outputs everything by value (green wire)
  3. Connect output from this decider combinator to the same unit controller
  4. Connect output from unit scanner to the new decider combinator (red wire)
Now the setup is complete, but it will order the miner every tick, which is CPU heavy and might jam it because the constant new orders can freeze it. Click on output of both unit scanner and controller and set the tick count high, like 300, if not higher. That should reduce CPU load and give the miner time to respond to orders. Zone scanners can be set to extremely high tick counts as their output will not change anyway. Give it say 100k once the output has been set.

I can think of better layouts than this, but to explain/show how the system works, this is likely the best. It doesn't confuse with optimization and it should work.

Possible expansion: if you set the output of one decider combinator to the input of another one and both output everything by value, then the output will only reach the end (unit controller) if both conditions are met. This means you can add a condition like miner has less than 10 slots free, preventing the constant drive. I really recommend getting the base up and running first though. Next step would be to make it trigger on either full cargo or low fuel and that way it can be made more and more advanced one step at a time.

One tip though. It would be more efficient if you place a miner and never move it. Move a hauler instead between the unload point and a zone next to the miner. Also do note that you can place a zone in the middle of the cargo load/unload building, but the game will draw the zone icon below the building, meaning you can't actually see i, but it's there and you can use zone scanners to get the coordinates.
I need a screenshot as an example... Nothing it try seems to do what its supposed to do.

EDIT: my unit-scanner cant seem to find ANY of my units. No matter what ID i use on the slider, nothing is visible at the scanner "output"
Mobius1
Fast Inserter
Fast Inserter
Posts: 191
Joined: Thu Feb 09, 2017 12:05 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Mobius1 »

waduk wrote:Crash when try to install, already install all the dependencies.:
Image

I just want to try Programmable vehicle, do i really need to install all the dependencies ?

I just want to use vanilla vehicle.
Yes You need.
waduk
Filter Inserter
Filter Inserter
Posts: 372
Joined: Tue Feb 10, 2015 5:44 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by waduk »

Mobius1 wrote:
waduk wrote:Crash when try to install, already install all the dependencies.:
Image

I just want to try Programmable vehicle, do i really need to install all the dependencies ?

I just want to use vanilla vehicle.
Yes You need.
That's what i did, install all the dependencies yet that crash/error pop-up.
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 »

swatti wrote:
Nightinggale wrote:
swatti wrote:QUESTION: How hard would it be to make the miner move/patrol between two points?

I have infinite resources mod so patrol between depot and ore-field. Just two points.
If you want something really basic and easy to build, do this:
  1. Set up two zones. I will call them A and B, but they can be whatever you want from zones, even two numbers from the same type.
  2. Make a unit scanner and input the miner. Output is just the zone and unit ID (nothing else is needed)
  3. Set up a zone scanner to get X and Y for B
  4. Output to a decider combinator, which triggers if zone A (zone type = the index) and outputs everything by value (green wire)
  5. Connect the output from the unit scanner to the decider combinator (red wire)
  6. Connect the output of the decider combinator to a unit controller
Now if the unit is on zone A, the unit controller will get the unit ID and X,Y for B and it will go there. To go the other way as well, do:
  1. Zone scanner with A as input. Output X and Y
  2. Connect output to a new decider combinator, which triggers if zone B (zone type = the index) and outputs everything by value (green wire)
  3. Connect output from this decider combinator to the same unit controller
  4. Connect output from unit scanner to the new decider combinator (red wire)
Now the setup is complete, but it will order the miner every tick, which is CPU heavy and might jam it because the constant new orders can freeze it. Click on output of both unit scanner and controller and set the tick count high, like 300, if not higher. That should reduce CPU load and give the miner time to respond to orders. Zone scanners can be set to extremely high tick counts as their output will not change anyway. Give it say 100k once the output has been set.

I can think of better layouts than this, but to explain/show how the system works, this is likely the best. It doesn't confuse with optimization and it should work.

Possible expansion: if you set the output of one decider combinator to the input of another one and both output everything by value, then the output will only reach the end (unit controller) if both conditions are met. This means you can add a condition like miner has less than 10 slots free, preventing the constant drive. I really recommend getting the base up and running first though. Next step would be to make it trigger on either full cargo or low fuel and that way it can be made more and more advanced one step at a time.

One tip though. It would be more efficient if you place a miner and never move it. Move a hauler instead between the unload point and a zone next to the miner. Also do note that you can place a zone in the middle of the cargo load/unload building, but the game will draw the zone icon below the building, meaning you can't actually see i, but it's there and you can use zone scanners to get the coordinates.
I need a screenshot as an example... Nothing it try seems to do what its supposed to do.

EDIT: my unit-scanner cant seem to find ANY of my units. No matter what ID i use on the slider, nothing is visible at the scanner "output"
Are you using the vehicle ID signals and not the vehicle item signals?
Post Reply

Return to “Mods”