[MOD 0.14] AAI Programmable Vehicles

Topics and discussion about specific mods
mrvn
Smart Inserter
Smart Inserter
Posts: 5910
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by mrvn »

Mernom wrote:It looks like my question may have went unseen.
How exactly does the 'work every X tics' function work? Does it inudce a CD starting with the moment you press OK and every time the device works? Or does the CD start only when the device gets a viable signal packet?
There is no "gets a viable signal packet" in the lua API.
User avatar
ShinoHarvest
Long Handed Inserter
Long Handed Inserter
Posts: 50
Joined: Tue May 08, 2018 3:29 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by ShinoHarvest »

possible add operator for make tan(x/y) for calcul angle of move vector and escape stupid path finding betewn 2 point. Because make tangent with factorio operator is realy crazy
Mernom
Fast Inserter
Fast Inserter
Posts: 123
Joined: Sun Jul 15, 2018 10:05 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Mernom »

mrvn wrote:
Mernom wrote:It looks like my question may have went unseen.
How exactly does the 'work every X tics' function work? Does it inudce a CD starting with the moment you press OK and every time the device works? Or does the CD start only when the device gets a viable signal packet?
There is no "gets a viable signal packet" in the lua API.
so it just adds a timer that goes off regardless of when the signals come? This is troubling... I'll have to add a lot more activation ticks.
Mernom
Fast Inserter
Fast Inserter
Posts: 123
Joined: Sun Jul 15, 2018 10:05 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Mernom »

ShinoHarvest wrote:possible add operator for make tan(x/y) for calcul angle of move vector and escape stupid path finding betewn 2 point. Because make tangent with factorio operator is realy crazy
I think that this is what the subtiles are for. If you imput them as a movement command, the vehicle will convert them to speed\angle signals IIRC.
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 »

Mernom wrote:
ShinoHarvest wrote:possible add operator for make tan(x/y) for calcul angle of move vector and escape stupid path finding betewn 2 point. Because make tangent with factorio operator is realy crazy
I think that this is what the subtiles are for. If you imput them as a movement command, the vehicle will convert them to speed\angle signals IIRC.
Originally the subtile XY signals were converted to a pure angle and speed, once set the vehicle would continue with that angle and speed indefinatly.
Now it is treated as a 'direct move to a relative position' so a signal of subtile X 1000 and subtile Y 1000 should make the vehicle move down and right by 10 tiles and then stop with no additional input.
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 »

Paths Update:
Press Y to get out your Unit Remote Controller.
Press Y again to switch the controller mode to Path Remote Controller (PRC)

Paths List View
If the PRC is listing paths, you can click on a path to view and edit it, or create a new path.

Path Detail View
Paths can be set to loop.
If you have a path selected, clicking on the ground with the PRC will create a new position waypoint at the end of the current path.
If you click on a player or vehicle it will create a waypoint that follows the targeted player or vehicle.
Shift-click an area to remove position waypoints in the area.

The path waypoints are listed on the left.
You can remove waypoints, move them up or down in the order, insert a new waypoint in the list, or select a waypoint to expand and edit it.
Removing waypoints does not change the waypoint ID of later waypoints because that would confuse vehicles and make your path combinator setups difficult. Empty waypoint IDs are ignored, but you can close gaps by manually moving layer waypoints up the list if you want.

With a waypoint selected, creating a new waypoint replaces the selected waypoint.
You can also manually change the waypoint details.
You can manually set a Vehicle Depot or Position Beacon ID, meaning the waypoint will go to the Vehicle Depot or Position Beacon with that ID. if multiple structures have the same ID it will go to the first one placed.

Position beacons are things you can place to mark a position. It gives you the GPS coordinates and lets you set the Position Beacon ID (to be used with paths).
The ID is blueprintable so position beacons have that advantage over zones.

Vehicle Depots now have an ID and function like a Position Beacon in addition to their other properties.

If you set a command with a unit controller and you specify a Vehicle Depot or Position Beacon ID, the vehicle will go to the first structure with that ID.

The Path Scanner can scan Paths and Waypoints.
The Path Controller can set Path waypoints.
Berkys32
Fast Inserter
Fast Inserter
Posts: 113
Joined: Mon Mar 07, 2016 9:17 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Berkys32 »

Wow, that sounds amazing!
mrvn
Smart Inserter
Smart Inserter
Posts: 5910
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by mrvn »

Mernom wrote: Fri Aug 31, 2018 9:50 am
mrvn wrote:
Mernom wrote:It looks like my question may have went unseen.
How exactly does the 'work every X tics' function work? Does it inudce a CD starting with the moment you press OK and every time the device works? Or does the CD start only when the device gets a viable signal packet?
There is no "gets a viable signal packet" in the lua API.
so it just adds a timer that goes off regardless of when the signals come? This is troubling... I'll have to add a lot more activation ticks.
My preference is to have the AAI structures work every tick but multiplex many jobs into a single structure. So I have only one complex that drives all haulers. Every tick a different hauler ID is input and some ticks later a signals arrives at the vehicle controller and tells that hauler what to do, So while the structures work every tick their number remains constant as more and more hauler are added. The drawback is that as more haulers are used they are checked less and less often. But at 60 haulers that's still once a second. Plenty often enough.
User avatar
ShinoHarvest
Long Handed Inserter
Long Handed Inserter
Posts: 50
Joined: Tue May 08, 2018 3:29 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by ShinoHarvest »

bug / mod conflict
effect: bug make save and load game crazy long 2min+

mod pack: https://mega.nz/#!8oQj0KwL!0sydGZlpD_ct ... V5HCVzm3GQ
savegame: https://mega.nz/#!rCBRHIRQ!LTltfECFyEjt ... ln0fqsUIvs

if you load only aai signal & aai prog vehi, remove all other mod bug persist but if you just remove aai prog vehi bug is removed

detailed info on game & mod vers:
game begin with AAI Programmable Vehicles 0.4.4 bug begin probably after logicar technologie aquired after game update AAI Programmable Vehicles 0.4.6

theori:
bug probably conflict with logicar mod (https://mods.factorio.com/mod/logicarts) and need unactive aai for this vehicule / retroactive corectif if posible for delete buged data in save
Mernom
Fast Inserter
Fast Inserter
Posts: 123
Joined: Sun Jul 15, 2018 10:05 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Mernom »

mrvn wrote: Mon Sep 17, 2018 7:53 am
Mernom wrote: Fri Aug 31, 2018 9:50 am
mrvn wrote:
Mernom wrote:It looks like my question may have went unseen.
How exactly does the 'work every X tics' function work? Does it inudce a CD starting with the moment you press OK and every time the device works? Or does the CD start only when the device gets a viable signal packet?
There is no "gets a viable signal packet" in the lua API.
so it just adds a timer that goes off regardless of when the signals come? This is troubling... I'll have to add a lot more activation ticks.
My preference is to have the AAI structures work every tick but multiplex many jobs into a single structure. So I have only one complex that drives all haulers. Every tick a different hauler ID is input and some ticks later a signals arrives at the vehicle controller and tells that hauler what to do, So while the structures work every tick their number remains constant as more and more hauler are added. The drawback is that as more haulers are used they are checked less and less often. But at 60 haulers that's still once a second. Plenty often enough.
This is basically what I do too, but it takes time to calculate the command for the vehicle, and sending a command while it's not ready can result with leftovers from the previous vehicle's command contaminating it. This is why I work with 30 tick cycles, to give it time to compute everything.

My circuit also controls the miners, and has a section that extracts the miner's X\Y position to be given to the hauler later so that it can go to it when needed. Works better than the follow command, because that one doesn't account for obstecles.
Raywell
Manual Inserter
Manual Inserter
Posts: 2
Joined: Fri Jun 01, 2018 12:51 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Raywell »

Keep up good job.
Reporting some type check errors
- If Path scanner receives table type signal data (without going through arithmetic combinator +0 trick) the game crashes
- If I click on Gui "Path 1 Waypoints 2"(After setting them with Path Controller using the following input : MinerID + Path ID (1) + Waypoint ID (1) and a second path controller with DepotID + Path ID (1) + Waypoint ID (2) ), I have the same format error : (Screenshot) and the game crashes

Cheers, waiting for updates !
Berkys32
Fast Inserter
Fast Inserter
Posts: 113
Joined: Mon Mar 07, 2016 9:17 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Berkys32 »

I couldnt get my PRC. I had binded Y to enter/leave vehicle before, so I changed it and reinstalled main AAI mods to get it work. Also could you add option to change that key in settings?
Last edited by Berkys32 on Wed Sep 19, 2018 8:15 am, edited 1 time in total.
Berkys32
Fast Inserter
Fast Inserter
Posts: 113
Joined: Mon Mar 07, 2016 9:17 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Berkys32 »

Suggestions:
1) Button to cancel select single vehicle when selected multiple ones
2) Vehicle groups
3) Option to follow waypoints using pathfinding. Now it goes directly towards waypoint, regardless whats in between. Its useless in non-clear area, as any rock can stop vehicle following path
Berkys32
Fast Inserter
Fast Inserter
Posts: 113
Joined: Mon Mar 07, 2016 9:17 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Berkys32 »

And a issue - your mods are somehow confusing bots from vehicle. If I try to use vehicles with roboports in their grids (doesnt matter which combination, but for example Bobs Crawler), every now and then bots get confused and stay in place, not returning to vehicle or bot grid. If I remove your mods, they start working again...

EDIT: It seems it happens only when AI is turned to AUTO or ON. When turned OFF and riding, its working great...
Mernom
Fast Inserter
Fast Inserter
Posts: 123
Joined: Sun Jul 15, 2018 10:05 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Mernom »

Berkys32 wrote: Wed Sep 19, 2018 8:15 am Suggestions:
1) Button to cancel select single vehicle when selected multiple ones
2) Vehicle groups
3) Option to follow waypoints using pathfinding. Now it goes directly towards waypoint, regardless whats in between. Its useless in non-clear area, as any rock can stop vehicle following path
AFAIK it uses bulldozer methology because it does it the same way it does 'follow X' commands.
Granted, you can just plot the path to avoid obstucles.

BTW, is it possible to code it so that the path reverses when you reach the end, and reverses again when you're back at the start?
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 »

Raywell wrote: Tue Sep 18, 2018 3:35 pm Keep up good job.
Reporting some type check errors
- If Path scanner receives table type signal data (without going through arithmetic combinator +0 trick) the game crashes
- If I click on Gui "Path 1 Waypoints 2"(After setting them with Path Controller using the following input : MinerID + Path ID (1) + Waypoint ID (1) and a second path controller with DepotID + Path ID (1) + Waypoint ID (2) ), I have the same format error : (Screenshot) and the game crashes

Cheers, waiting for updates !
I'll fix that asap, I should have some time on Firday.
Berkys32 wrote: Wed Sep 19, 2018 7:12 am I couldnt get my PRC. I had binded Y to enter/leave vehicle before, so I changed it and reinstalled main AAI mods to get it work. Also could you add option to change that key in settings?
If you go to control settings there's a tab for mods. You can change the key binding there.

The confused robots issue - The mod doesn't 100% support vehicle grids. They work for a lot of cases, but with internal roboports there's a problem, any time a vehicle goes to or from pathfinding mode the original vehicle is deleted and a version without collision is created to not block the navigator (biter). The robots origin vehicle is gone so they won't know where to go. If you can get those vehicles to work without ever going into pathfinding (using paths or something) then you can avoid the problem. I don't see there being a solution to that anytime because of some of the base game limitations.

1) Button to cancel select single vehicle when selected multiple ones - With the vehicles selected, click on the id icon of the 1 you want to deselect

2) Vehicle groups - as in hotkeys to groups?

3) Option to follow waypoints using pathfinding. - Yeah I guess with the option to have dynamic waypoints pathfinding can be necessary in those siturations. I think I'll add it as a per-waypoint option.
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 »

Mernom wrote: Wed Sep 19, 2018 4:09 pm BTW, is it possible to code it so that the path reverses when you reach the end, and reverses again when you're back at the start?
No, what I do is just have the path on loop and add points goin in reverse. It's good to offset the reverse path a bit so that if you have multiple units on it they don't crash into each other when going in opposite directions.
mrvn
Smart Inserter
Smart Inserter
Posts: 5910
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by mrvn »

Mernom wrote: Tue Sep 18, 2018 11:01 am
mrvn wrote: Mon Sep 17, 2018 7:53 am
Mernom wrote: Fri Aug 31, 2018 9:50 am
mrvn wrote:
Mernom wrote:It looks like my question may have went unseen.
How exactly does the 'work every X tics' function work? Does it inudce a CD starting with the moment you press OK and every time the device works? Or does the CD start only when the device gets a viable signal packet?
There is no "gets a viable signal packet" in the lua API.
so it just adds a timer that goes off regardless of when the signals come? This is troubling... I'll have to add a lot more activation ticks.
My preference is to have the AAI structures work every tick but multiplex many jobs into a single structure. So I have only one complex that drives all haulers. Every tick a different hauler ID is input and some ticks later a signals arrives at the vehicle controller and tells that hauler what to do, So while the structures work every tick their number remains constant as more and more hauler are added. The drawback is that as more haulers are used they are checked less and less often. But at 60 haulers that's still once a second. Plenty often enough.
This is basically what I do too, but it takes time to calculate the command for the vehicle, and sending a command while it's not ready can result with leftovers from the previous vehicle's command contaminating it. This is why I work with 30 tick cycles, to give it time to compute everything.

My circuit also controls the miners, and has a section that extracts the miner's X\Y position to be given to the hauler later so that it can go to it when needed. Works better than the follow command, because that one doesn't account for obstecles.
It takes time to compute everything. But it is easy to design your computations so that for every step all inputs arrive at the same time. One step later the result propagates. You will have to add a bunch of "each + 0 = each" combinators to delay signals where different paths of the computations take different amounts of time. For this it's best to setup your circuit network to go strictly from left to right (or top to bottom or whatever direction you prefer) in rows. Every row means 1 tick has passed. No wire may skip a row.
Berkys32
Fast Inserter
Fast Inserter
Posts: 113
Joined: Mon Mar 07, 2016 9:17 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Berkys32 »

Thank you for your answers. Sadly there was no option to change Y key until I reinstalled your mod. I just wanted you to know ;)

Confused robots - I saw in some mod option to disable roboports when moving. Maybe that could help a little, so I can send vehicle somewhere, than wait until job is done and recall it. I wouldnt mind if confused bot return to logistic network, but now they are sitting in place forewer - until I pick them up manually or remove your mod...

vehicle groups - keys or buttons somewhere. I like using more vehicles and commanding them RTS style, but sometimes you want to control group of specific vehicles...

New pathfinding is really great, even in its "bulldozing" form. Spent few hours setting it up, and finally Im able to have proper setup where I dont need trains :)

Only thing I cannot solve is different vehicles in same path. Sooner or later faster vehicle catch slower one, and on next waypoint they usually end bumping into each other trying to get to waypoint. Maybe if they dont have to get so close to waypoint, it could help it a little.

And another suggestion - speed limit on paths. I wanted to have haulers on path, followed by chaingunners, but it was a mess, because hauler is much faster, so after a while chaingunners ended stuck somewhere, trying to follow hauler on the other side of base. I know there is SPEED signal, but didnt find way how to use it with Paths...
User avatar
ShinoHarvest
Long Handed Inserter
Long Handed Inserter
Posts: 50
Joined: Tue May 08, 2018 3:29 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by ShinoHarvest »

corection conflict with logicar is planed ?
Post Reply

Return to “Mods”