I think it is a little imba in the beginning of game:
#1.The miner has a mining speed of 4 and mining power of 3.Which is much high than other mod and the vanlid miner. As it is made of 4 burner, I think its mining speed must be near 1.5.
#2.The miner and hauler are car-type but do not need an engine.
#3.Player will get a free miner at the start of game.
(I am Chinese and my English is very poor, so some of my thought is too difficult for me to say in English.So...Can you understand Chinese?)
Re: [MOD 0.14] AAI Programmable Vehicles
Posted: Wed Feb 15, 2017 11:38 pm
by wormzjl
I'm getting a weird lagspike every few seconds after installing your mods (specifically aai-vehicles-laser-tank_0.1.4 and aai-vehicles-miner_0.1.7)
Does anyone else have the same problem?
Re: [MOD 0.14] AAI Programmable Vehicles
Posted: Thu Feb 16, 2017 5:34 am
by Nexela
wormzjl wrote:I'm getting a weird lagspike every few seconds after installing your mods (specifically aai-vehicles-laser-tank_0.1.4 and aai-vehicles-miner_0.1.7)
Does anyone else have the same problem?
I can't narrow this down to AAI (or even just AAI) but when I installed all of the AAI stuff and started a game I got some slight spikes every few seconds, After disabling Programmable Vehichles and structures, Loading the save, saving it and re-enabling the disabled mods the stutters went away.
I don't want to say this is just AAI or even AAI's fault as there were a few other mods I disabled that didn't get re-enabled.
Re: [MOD 0.14] AAI Programmable Vehicles
Posted: Thu Feb 16, 2017 9:51 pm
by SKleen75
Greedings.
PRAISE Earendel for making this mod.
The awesomeness is spectacular... ... aaaand actually a bit scary.
As much as i REALLY want to use this mod i can not get my head around the configuration.
I feel like a toddler looking at a clockwork. "Yeah. Some moves."
Anyway. Thank you for contributing to the factorio experience.
SKleen75
Re: [MOD 0.14] AAI Programmable Vehicles
Posted: Sat Feb 18, 2017 12:20 am
by misapati
Hi Earendel,
First of all, thanks for amazing mod, this is what I was looking for.
Sadly I am a bit daft, and I humbly ask You if You could also post setup of hauler muving items from one depot to another. I don't get to play alot lately due to work, so figuring it out is a bit tough for me.
Cheers
Re: [MOD 0.14] AAI Programmable Vehicles
Posted: Wed Feb 22, 2017 5:45 pm
by y.petremann
I've managed to make my first Programmable Controller setup controlling AAI
Earendel wrote:I have clarified the combinator diagrams with Input Count where that is required. I've also added some Unit Data, Exchange Data, Vehicle Depot, and Vehicle Deployer examples to the first post.
Hey,
You my SIr, Are Awsome!!
Re: [MOD 0.14] AAI Programmable Vehicles
Posted: Sat Feb 25, 2017 5:01 am
by Hyratel
so I just rolled up (with the help of the Discord THANKS GUYS - Swan most especially) a Raster Scanner, suitable for a zone scanner -
Constant Combinator R sets the range in total span, range is halved across world origin. You can easily add offsets to your X,Y outputs on the Green wire on the small electric pole
(yeah it's messy as hell. it's late, gimme a break. may revise later)
Friend and I are using this mod, and are attempting to create a depot that sends out miners to deforest the area surrounding our base, with Haulers coming to get the wood and place it in a depot. We're using the same setup from the example posts, but we run into a couple problems-
1. We have everything working as far as zone assignment/unassignment, as well as the miner moving to the zone. At some point, however, it just stops. Just stops moving completely.
2. The hauler doesn't do anything, at all.
Re: [MOD 0.14] AAI Programmable Vehicles
Posted: Mon Feb 27, 2017 8:01 pm
by TheChronicler
EDIT: This post will be a bit of a mess too while I figure out how spoilers work.
EDIT2: Fixed, images are in my post below this one since this is my first post.
EDIT3: Forgot to add some information.
EDIT4: It's a bit buggy, after further testing I've found out it's move buggy when K values exceed 90. For now I can't be bothered to fix it, but I will update when/if I do.
EDIT5: Yes, yes, I edit a lot, ok? Just to correct my above edit. It bugs out if you stop the clock incorrectly(in a way it doesn't like, isn't really incorrect).
(If you're interested exactly what: I stopped the clock by setting input on the leftmost combinator of the clock block to 1. This messes up the clock and in turn messes up the whole system. Instead, if you for some
reason want to stop it, simply go into the same combinator and set the operator(+-<>) to something other than what it is(<) )
Also in edit5: Added a new blueprint string
So, I've tested out some circuitry to search for resources in a spiral pattern.
There are some mistakes, It when it gets to a corner, it adds one to the opposite direction of where it's going then returns to it's correct path. I can't be bothered to fix this right now, but I will upload an uploaded version if I do.
As fas as I'm awake it works beyond that.
Another thing is that I haven't checked 100% if the flagging of resources works correctly. The algorithm and navigating the grid works fine, but I have not tested the zone controller to see if it flags all zones.
It's controlled by a clock that sends a single pulse every three(3) ticks. This can be changed to a higher number by changing the numbers in the combinator to the left and right in the clock section.
This is my first time testing out combinators and it was done between 2 and 4 in the morning so please excuse the messy and sub-optimal build.
It works, although, it might be a little slow.
It also doesn't handle the x and y position 0.
So resources in x=0 and y=0 will not be flagged. As far as I can tell this is because factorio handles value 0 as NULL(no signal). There may be a way around this, but I haven't found it.
Math behind it:
Math stuff
The logic behind this is that the searched tile moves Right, Down, Left, then Up. Somewhere in the combinators it got turned around, there's also an extra tile in the wrong direction at every corner, but I haven't had time and can't be bothered to fix it right now.
To navigate a xy grid in a spiral you need these steps(only shown a few)
R=right(x = x+1)
D=down(y = y-1)
L=left(x = x-1)
U=up(y = y+1)
RD|LLUU|RRRDDD|LLLLUUUU|RRRRRDDDDD|LLLLLLUUUUUU
RDLU movements form one "lap" or cycle around the origin.
Cycles are represented by the letter K
While C is a counter that counts how many steps there are in a cycle this counter determines which steps to take.
M represents the amount of steps in each cycle, and is used to compare with C and count.
The variable M is R+D+L+U+1. +1 since then you can use a decider combinator to do a "lessthan or equalto".
By the sequence above, you may see that the amount of Rs in a lap is 2K+1, same goes for Down movements.
Left and Up is 2K+2 since you have to move past the last marked tiles.
The determination of which direction to take is as follows:
While C<=R-1, move right
While C<=R+D-1, move Down
While C<=R+D+L-1, move left
While C<=R+D+L+U-1, move up
Brathahn wrote:Hi,
first of all: great mod!
But i have found a bug while playing around with the Unit Controller.
When you set a negative speed with a combinator the vehicle will go that fast.. so -1000 lets it fly away like a bullet
Somehow funny but i think thats not intended.
i made a quick video for you to see what i mean.
Watch the hauler in the bottom right: https://youtu.be/kJFA4pGQF3o
This should be fixed now, but I couldn't recreate it so let me know if it still happens after updating.
Re: [MOD 0.14] AAI Programmable Vehicles
Posted: Thu Mar 09, 2017 10:27 pm
by Exavier724
scatterlogical wrote:EDIT: So this doesn't quite work properly. Has some timing issues that I'm try to work out. If anyone more magely than me wants to try and fix it, feel free.
EDIT 2: OK fixed now! Updated image and blueprint
Absolutely loving these AAI mods! Here's a little something I've spent the past few hours working on:
It's an automatic zone manager that can manage up to six zones.
It cycles through each of the zones, removing zoning that no longer contains resources, then automatically jumps to the next zone.
Configure your resources per zone in each of the six decider combinators to the right.
Don't suppose you could double check your Blueprint String? I am being told it is invalid when I try to use it
Re: [MOD 0.14] AAI Programmable Vehicles
Posted: Fri Mar 10, 2017 7:04 am
by Exavier724
@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
Re: [MOD 0.14] AAI Programmable Vehicles
Posted: Sun Mar 12, 2017 11:03 pm
by Ender_Invader
I have one request to make, a small one. I have noticed that the depots are not giving ammo to the combat vehicles, so I have to manually fill the combat vehicles with ammo after each base raid. I was wondering if this was a glitch or if you could make the depots give ammo.
Re: [MOD 0.14] AAI Programmable Vehicles
Posted: Mon Mar 13, 2017 2:37 am
by Exavier724
Ender_Invader wrote:I have one request to make, a small one. I have noticed that the depots are not giving ammo to the combat vehicles, so I have to manually fill the combat vehicles with ammo after each base raid. I was wondering if this was a glitch or if you could make the depots give ammo.
The Depots give ammo just fine but it has to be configured correctly. The top right of the depot is a little box with wires coming out of it. Thats the inventory control box, if you set the ammo to -1 it will attempt to push it out to anything that wants it
Gets a bit trickier if you want the depot to pull ammo from a hauler & then give it to another vehicle later. You can use the programmable structures & zones to create a detection zone around the depot & circuits to change the inventory settings (connect a wire to that box) depending on the vehicle detected.
Re: [MOD 0.14] AAI Programmable Vehicles
Posted: Tue Mar 14, 2017 4:25 pm
by Ender_Invader
Exavier724 wrote:
Ender_Invader wrote:I have one request to make, a small one. I have noticed that the depots are not giving ammo to the combat vehicles, so I have to manually fill the combat vehicles with ammo after each base raid. I was wondering if this was a glitch or if you could make the depots give ammo.
The Depots give ammo just fine but it has to be configured correctly. The top right of the depot is a little box with wires coming out of it. Thats the inventory control box, if you set the ammo to -1 it will attempt to push it out to anything that wants it
The depots give ammo to haulers fine, but they will not give ammo, like the laser battery, to a combat vehicle, in this example a laser tank. This is the same for all other combat vehicles, not just the laser tank.
I am sorry if this sounds dumb, but I haven't been able to test this. I was wondering of a halter could push a certain amount of ammo onto combat vehicles.
Re: [MOD 0.14] AAI Programmable Vehicles
Posted: Tue Mar 14, 2017 6:07 pm
by Exavier724
Ender_Invader wrote:The depots give ammo to haulers fine, but they will not give ammo, like the laser battery, to a combat vehicle, in this example a laser tank. This is the same for all other combat vehicles, not just the laser tank.
I am sorry if this sounds dumb, but I haven't been able to test this. I was wondering of a halter could push a certain amount of ammo onto combat vehicles.
Ahh. How did you place the combat vehicles? I found the defaults on them if you place them by hand are a little odd. Drop a Unit Data Scanner and hook it up to a constant combinator set to the specific vehicle ID. The output on the scanner should tell you what its resource requests are. Chances are for some reason the vehicle might not have been given a request value for that ammo type.
I usually use the Vehicle Deployer building and there is a box on the right side of the exit that lets you program the vehicle needs the same way as the depot. The vehicle will receive the configuration the moment it gets to the end of the platform (something i learned trying to set up a variable system that didn't keep the signal on long enough). Set it to request 100 units of fuel & 100 units of that ammo type, then re-deploy the vehicle from there and it will be set correctly... Or use a Unit Data Controller to program them remotely if you don't wana fetch them.