[MOD 0.14] AAI Programmable Vehicles

Topics and discussion about specific mods
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 »

Ratzap wrote:My AAI save from v15 still has 3 files not updated that I think were part of the set:

data-raw-prototypes
detached-gun-sounds
off-grid-effects

Are they part of the AAI set and still needed?
They are not needed anymore.

data-raw-prototypes was created to address gaps in the lua api prototype data. Those gaps mean't there was no way to read certain values, like vehicle weight or what ammo does. I made mod support requests for those which sparked this thread: viewtopic.php?f=28&t=47087 but it has taken time for all of the requests to make it in the game so the additional mod was required for a while. That's no longer the case so it's not required. I don't plan to update that mod to 0.16 unless someone has a good reason to request an update.

detached-gun-sounds was created for the fake vehicle turret mechanics. Previously it was not possible to make the sound of a gun without actually firing the gun in game, which there was no way to do. I copied all the gun sounds to explosion entities, so if you wanted to play a gun sound you could spawn the invisible explosion to play the sound. This is obsolete now, because you can cause guns to fire, but you can alos use the lua api to play any sound directly. That mod won't be updated anymore.

off-grid-effects is not required anymore. It was mainly useful before because the fake gun mechanics required smoke ammo casings to be spawned at the turret, but without this mod the casings would spawn snapped to tile centres. I don't plan to update that mod to 0.16 unless someone has a good reason to request an update.
GemeinerJack
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sun Feb 04, 2018 12:30 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by GemeinerJack »

Hi guys.

i know, the pathfinding is based on biter AI, but this... this is ridiculous in my opinion. Any idea how this is happening or i how i can stop that?

To clarify the problem: The Hauler is not getting close enough to actually unload the goods...

Edit: I fixed the problem by setting the target location in the most bottom right spot of the depot. At least i get the stuff now ^^
Attachments
intressting pathfinding.jpg
intressting pathfinding.jpg (1.28 MiB) Viewed 9169 times
Ratzap
Filter Inserter
Filter Inserter
Posts: 371
Joined: Sun Aug 16, 2015 11:15 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Ratzap »

Earendel wrote: They are not needed anymore.
Thanks, I'll remove them.
User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2638
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by steinio »

Hi,

get this error with added Pavement Drive Assist:

Code: Select all

Error while running event aai-programmable-vehicles::on_tick (ID 0)
Error while running event PavementDriveAssist::on_player_driving_changed_state (ID 26)
__PavementDriveAssist__/pda.lua:89: attempt to index a nil value
stack traceback:
	__aai-programmable-vehicles__/control.lua:857: in function 'unit_update_mode'
	__aai-programmable-vehicles__/control.lua:3016: in function 'unit_tick'
	__aai-programmable-vehicles__/control.lua:3054: in function <__aai-programmable-vehicles__/control.lua:3024>
Clicked on the Change AAI Mode button sitting in a car.
Image

Transport Belt Repair Man

View unread Posts
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: I don't plan to update that mod to 0.16 unless someone has a good reason to request an update.
You do more than enough!!!! ;)
THANK YOU sir!
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 »

uhhh... :roll:
I hate to do it but i hafta.....
But I may have a :idea: ....

Error while running event aai-programmable-vehicles::on_tick (ID 0)
Error while running event PavementDriveAssist::on_player_driving_changed_state (ID 26)
__PavementDriveAssist__/pda.lua:89: attempt to index a nil value
stack traceback:
__aai-programmable-vehicles__/control.lua:857: in function 'unit_update_mode'
__aai-programmable-vehicles__/control.lua:3016: in function 'unit_tick'
__aai-programmable-vehicles__/control.lua:3054: in function <__aai-programmable-vehicles__/control.lua:3024>


I think I saw someone post a similar one...
Everything works fine I can jump in and out...and use them no problem..

(EDIT even while they are part of a programmed system..they went back to work after i jumped out...)

UNTIL I switched it to FULL AI while in the vehicle...(I planned to ride it to the miner it was pathing to....)
But I as long as it was on "AI auto-off"... I seemed to be fine....
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 PavementDriveAssist errors need to be reported to the PavementDriveAssist mod maintainer. The error is coming from their script, they probably just need to add a line to check if something exists before accessing its properties.
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:The PavementDriveAssist errors need to be reported to the PavementDriveAssist mod maintainer. The error is coming from their script, they probably just need to add a line to check if something exists before accessing its properties.
understood.
mrvn
Smart Inserter
Smart Inserter
Posts: 5881
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by mrvn »

GemeinerJack wrote:Hi guys.

i know, the pathfinding is based on biter AI, but this... this is ridiculous in my opinion. Any idea how this is happening or i how i can stop that?

To clarify the problem: The Hauler is not getting close enough to actually unload the goods...

Edit: I fixed the problem by setting the target location in the most bottom right spot of the depot. At least i get the stuff now ^^
But how is that not a bug in the biter AI pathfinding? It has a clear path to the target which it follows for a time and then instead it takes a way all around the wall and then THROUGH the wall.
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 »

I think that weird path posted before was the biter switching to wander mode when it got close to the target. I'm not sure how it got though the wall though, that usually only happens near corners.

I made an update to my pathfinding API request so we'll see what happens with that. If I don't get a response in a week or so I'll try asking the devs directly on discord or something.
mrvn
Smart Inserter
Smart Inserter
Posts: 5881
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by mrvn »

Earendel wrote:I think that weird path posted before was the biter switching to wander mode when it got close to the target. I'm not sure how it got though the wall though, that usually only happens near corners.

I made an update to my pathfinding API request so we'll see what happens with that. If I don't get a response in a week or so I'll try asking the devs directly on discord or something.
The way it gets through that wall is by attacking it. Same reason why they sometimes attack trees on the way to my turrets instead of walking around them.

If I had to guess I would say the path finding is either buggy or it has a random factor in there to ignore obstacles and then attacks them when the path goes through them. The later would be an effort to make bitters not get stuck with insanely long paths through forests or mazes. Every now and then they make a path.
GemeinerJack
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sun Feb 04, 2018 12:30 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by GemeinerJack »

Earendel wrote: ...
I made an update to my pathfinding API request so we'll see what happens with that. If I don't get a response in a week or so I'll try asking the devs directly on discord or something.
Okay, let's update:
Pressed Update all Mods button -> Load up game -> notice AAI zones no longer vanishing if the ores get mines -> get confused -> notice a new aai zones mod is out -> revert aai zones to older version and remove all zones -> update again

Set the target coordinates to "buggy" position.
Working now, but i also changed the layout and i forgot to keep a save with the old layout
And the old position outside of the wall is now overbuild and walled off. So... there could be different reasons why it is working now. Still keeping an eye on it
Attachments
update.png
update.png (1.66 MiB) Viewed 9060 times
Officer Joe Balogna
Inserter
Inserter
Posts: 28
Joined: Mon Apr 04, 2016 1:00 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Officer Joe Balogna »

I've noticed a few problems with the AAI mods, I was wondering if you could help me out.

Whenever I remotely control and send chaingunner vehicles to some far away nest, I often get bad lag spikes as soon as they approach enemy nests.

Another issue I have is that chaingunners pick up both alien artifacts and small alien artifacts (from NE), and those artifacts get deleted. The chaingunners only pick up artifacts that dropped from enemies, they won't pick up any items dropped by a player.

*EDIT*
I have encountered a very bizarre and frustrating issue. When inputting X and Y tile signals, and a green signal, into 2 separate arithmetic devices, one which does "X AND GREEN SIGNAL = X", and another which does "Y AND GREEN SIGNAL = X", only the X one gives any output. Basically, these 2 arithmetic devices are identical in every single way, except one is using X and one is using Y, yet only one gives output.
Officer Joe Balogna
Inserter
Inserter
Posts: 28
Joined: Mon Apr 04, 2016 1:00 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Officer Joe Balogna »

I have yet another issue, as well. Player-spawned nests are not detected by scanners, only naturally generated ones are.
RocketManChronicles
Filter Inserter
Filter Inserter
Posts: 362
Joined: Mon Aug 01, 2016 2:38 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by RocketManChronicles »

Earendel, I reported a performance issue with running a heavily modded game here: viewtopic.php?f=23&t=57665. After posting this, I continued to analyze what was affecting my UPS. I think my computer has most of the blame on it (it's getting old), the UPS drops are mostly due to AAI Programmable Vehicles. The AAI Miner does play a small role in UPS drops, but only drops it from 60.0 to 57.8, so not a big deal. Is there anything you can look into? Do not worry too much though, I am building a new gaming computer in a couple months anyways, so maybe that one will handle the mods without issue.
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 »

Ideally I'd rebuild large sections of the mod from a performance standpoint. That will also require a lot of testing different ways of doing things to see which is actually faster. It's a big time sink for relatively small gains, so right now my priority is to finish the other features and mods I already have in the pipeline. Once those are done I'll be spending more time fixing bugs, and then doing optimisations work. I've been over the code a few times and I've made a lot of performance changes so for most problems I know there's not a quick fix. If someone reports a new performance issue I will look into it and see what's going on though, for example the lag caused when chaingunners approach a base is because enemies won't attack a vehicle by default so I need to find the biters and give them an attack move command.
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 »

On mods.factorio.com :
Miners stops working if inventory is filtered and can no longer insert "rocket-part" where it could mine something it can insert in his inventory.

I think you should make some function to prepare the mining, then testing if this is possible to place the ressources mined, and finally if this is possible, doing it, each function could pass the information needed to prevent redondancy in the code.
RocketManChronicles
Filter Inserter
Filter Inserter
Posts: 362
Joined: Mon Aug 01, 2016 2:38 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by RocketManChronicles »

Earendel wrote:Ideally I'd rebuild large sections of the mod from a performance standpoint. That will also require a lot of testing different ways of doing things to see which is actually faster. It's a big time sink for relatively small gains, so right now my priority is to finish the other features and mods I already have in the pipeline. Once those are done I'll be spending more time fixing bugs, and then doing optimisations work. I've been over the code a few times and I've made a lot of performance changes so for most problems I know there's not a quick fix. If someone reports a new performance issue I will look into it and see what's going on though, for example the lag caused when chaingunners approach a base is because enemies won't attack a vehicle by default so I need to find the biters and give them an attack move command.
That all makes sense. I am not asking you to drop everything to figure out performance issues. I am bringing this up just to let you know I found something. The 0.15 release of the mod worked fine on the same computer, but something in 0.16 does not. I do not mind, it is not totally game breaking. Just keep up the good work and know that we appreciate your efforts to create a set of mods that adds something very unique to the game!
mrvn
Smart Inserter
Smart Inserter
Posts: 5881
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by mrvn »

Earendel wrote:Ideally I'd rebuild large sections of the mod from a performance standpoint. That will also require a lot of testing different ways of doing things to see which is actually faster. It's a big time sink for relatively small gains, so right now my priority is to finish the other features and mods I already have in the pipeline. Once those are done I'll be spending more time fixing bugs, and then doing optimisations work. I've been over the code a few times and I've made a lot of performance changes so for most problems I know there's not a quick fix. If someone reports a new performance issue I will look into it and see what's going on though, for example the lag caused when chaingunners approach a base is because enemies won't attack a vehicle by default so I need to find the biters and give them an attack move command.
Huh? When I drive by some aliens with a car or tank in vanilla then they attack me.
Is that because they attack the player inside the car? Didn't you add fake players to the AAI vehicles now causing much the same thing?


In my multiplayer game the other players have forbidden me from using chaingunners because the game becomes unplayable. I like to take 4-8 wardens and 12-20 chaingunners and arrange them in circles around a central warden. And then move in to attack.

Maybe if you still need to check for aliens and give them an attack move command would it be possible to do that just once for the whole group of 20 units instead of each unit individually?
Draulor
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sat Feb 17, 2018 3:02 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Draulor »

Encountered a bug in a 50+ hr modded game, sent a group of cars and a warden to a distant bug base and would come up with an error as they got to the base.

"Error while running event aai-programmable-vehicles::on_tick (ID 0)_ _ aai-programmable-vehicles _ _/control.lua:1042: bad argument #-1 to 'remove' (string expected, got nil)"

EDIT: Actually it'll happen regardless on if the vehicles move or not. I manually went in and assaulted the base and eventually ended up with an error as the other vehicles opened up.
Post Reply

Return to “Mods”