[MOD 0.14] AAI Programmable Vehicles

Topics and discussion about specific mods
DrJones
Long Handed Inserter
Long Handed Inserter
Posts: 52
Joined: Thu Sep 08, 2016 11:13 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by DrJones »

Could it be that miners that drive (i.e. actually move) over ores will mine these ores even if their inventory is already completely full? My full moving miners leave trails of ores after them...
20170420235231_1.jpg
20170420235231_1.jpg (714.12 KiB) Viewed 10281 times
Having lots of fun with your mod! Thanks for all the hard work!
tuefekci
Manual Inserter
Manual Inserter
Posts: 4
Joined: Tue Apr 18, 2017 2:33 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by tuefekci »

DrJones wrote:Could it be that miners that drive (i.e. actually move) over ores will mine these ores even if their inventory is already completely full? My full moving miners leave trails of ores after them...
Having lots of fun with your mod! Thanks for all the hard work!
Had that aswell, add a conditionen that they stop when they are full makes it easyer for your hauler to catch them anyway if they are far away from your base and should make them stop dropping stuff.
coolidge
Burner Inserter
Burner Inserter
Posts: 12
Joined: Fri Jul 11, 2014 12:16 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by coolidge »

Hello,

I am getting an error trying to use this mod. I am using all AAI mods, bullet trails, data raw prototypes, detatched gun sounds, and off grid effects. Running version 0.14.22 of factorio

I open up factorio, and attempt to place a Miner, and I get the error. Here's the log:

Code: Select all

AppData/Roaming/Factorio/temp/currently-playing/control.lua: 1057114497
  69.265 Checksum for script __aai-vehicles-miner__/control.lua: 1377160231
  69.276 Checksum for script __aai-zones__/control.lua: 78234736
  69.280 Checksum for script __data-raw-prototypes__/control.lua: 3938907402
  69.296 Checksum for script __aai-programmable-structures__/control.lua: 4167701744
  69.321 Checksum for script __aai-programmable-vehicles__/control.lua: 1634630390
  73.510 Error MainLoop.cpp:788: Exception at tick 138: Error while running event on_tick (ID 0)
__aai-vehicles-miner__/control.lua:336: attempt to index field 'attachments' (a nil value)
control.lua lines 334- 337

Code: Select all

local sent_smoke = false
						for i = 1, miner_variants[miner.name].attachments do 
							if not miner.attachments[i] or not miner.attachments[i].valid then
								miner.attachments[i] = miner.entity.surface.create_entity{
sbadkins4@yahoo.com
Burner Inserter
Burner Inserter
Posts: 18
Joined: Tue Aug 02, 2016 1:13 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by sbadkins4@yahoo.com »

Sir,
If you used parts of the Avatar mod.... could you create the ability to build, equip, and deploy an army of clone soldiers? :shock:
sbadkins4@yahoo.com
Burner Inserter
Burner Inserter
Posts: 18
Joined: Tue Aug 02, 2016 1:13 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by sbadkins4@yahoo.com »

Maybe even add an option (for some "Angel-like-lite" complexity) to have the clones be directly remote order-able, but the vehicles not, so that, in order to program vehicles, you have to build clones, program them, and have them "operate" the vehicles?
Griggers
Burner Inserter
Burner Inserter
Posts: 17
Joined: Sat Apr 22, 2017 3:26 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Griggers »

I have a question about fuel consumption:

I noticed that the fuel consumption bar did not appear when driving a vehicle (all vehicles but not trains) and I also noticed that the fuel consumption is not based on acceleration but on speed.
Also total fuel consumption is drastically increased compared to vanilla driving.

Is this the intended behavior or is this a bug?
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 »

DrJones wrote:Could it be that miners that drive (i.e. actually move) over ores will mine these ores even if their inventory is already completely full? My full moving miners leave trails of ores after them...

Having lots of fun with your mod! Thanks for all the hard work!
Yes, but this will be fixed very soon.
sbadkins4@yahoo.com wrote:Sir,
If you used parts of the Avatar mod.... could you create the ability to build, equip, and deploy an army of clone soldiers? :shock:
That is possible, but I don't have any immediate plans to do it. If I ever make "The Colony" mod, then this might get added after.
Griggers wrote:I have a question about fuel consumption:

I noticed that the fuel consumption bar did not appear when driving a vehicle (all vehicles but not trains) and I also noticed that the fuel consumption is not based on acceleration but on speed.
Also total fuel consumption is drastically increased compared to vanilla driving.

Is this the intended behavior or is this a bug?
Ideally the fuel consumption bar would be shown but that is not possible, the energy needs to be tracked with scripts and they can't affect that part of the GUI. The consumption based on speed is intentional, it might be possible to make it based on acceleration but would be very difficult to make accurate and would disadvantage miners. The increased consumption is also intentional but possibly not balanced yet.
Griggers
Burner Inserter
Burner Inserter
Posts: 17
Joined: Sat Apr 22, 2017 3:26 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Griggers »

I Managed to change the fuel consumption based on acceleration (If you want I can how you the algorithm). I had to change it as it was kind of unrealistic and with the ship from one of the ship mod it would consume more then 100 pieces of wood (due to it's massive weight) without even getting to the other side of the screen.
In theory a 1MW machine should consume 1MJ/s (1 coal every 8 seconds). I'm not completely sure if factorio balances that way, but this is what makes sense to me.
I'm not sure how the miners do their consumption as i saw them running out of fuel by just idling, but if you want them to consume more you could try to lower effectiveness and increase their power cost.
The visual appearance of the fuel bar is not really a priority in my opinion.
User avatar
SphynxLoL
Inserter
Inserter
Posts: 21
Joined: Tue Apr 25, 2017 3:32 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by SphynxLoL »

There is a strange interaction between the WideChests mod Chest Merging Tool (json tweaked update) and the Unit Remote control. It seems they both use the same tool ID. When I use the remote to control my units, I get a "Not Enough Chests Found" message from WideChests. No incompatibilities, errors, or crashes. Just a strange thing I ran into in 0.15. I'm 95% sure this didn't happen in 0.14.

In the case that other mods in the future use a tool similar to yours, I just wanted to give you a heads up that there is definitely some conflict there. Either being a tool ID issue or running the same functions through the click-drag selector.

Also, I just wanted to give a huge thanks for this incredible mod suite. From the miners to my personal favorite, the flame tumbler, everything in this mod is absolutely amazing! Thank you for all of the hard work and dedication put into the 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 »

Griggers wrote:I Managed to change the fuel consumption based on acceleration (If you want I can how you the algorithm). I had to change it as it was kind of unrealistic and with the ship from one of the ship mod it would consume more then 100 pieces of wood (due to it's massive weight) without even getting to the other side of the screen.
In theory a 1MW machine should consume 1MJ/s (1 coal every 8 seconds). I'm not completely sure if factorio balances that way, but this is what makes sense to me.
I'm not sure how the miners do their consumption as i saw them running out of fuel by just idling, but if you want them to consume more you could try to lower effectiveness and increase their power cost.
The visual appearance of the fuel bar is not really a priority in my opinion.
By all means send me the code. I'll probably do a hybrid system to factor in the force required to counteract friction. The changes for 0.15 mean that the vanilla acceleration fuel use is used if you're driving the vehicles and overall fuel consumption is down. A side effect is that you an now see the vehicle energy in the fuel bar. Actually so many things had to change I surprised no bugs have been reported yet.
SphynxLoL wrote:There is a strange interaction between the WideChests mod Chest Merging Tool (json tweaked update) and the Unit Remote control. It seems they both use the same tool ID. When I use the remote to control my units, I get a "Not Enough Chests Found" message from WideChests. No incompatibilities, errors, or crashes. Just a strange thing I ran into in 0.15. I'm 95% sure this didn't happen in 0.14.

In the case that other mods in the future use a tool similar to yours, I just wanted to give you a heads up that there is definitely some conflict there. Either being a tool ID issue or running the same functions through the click-drag selector.

Also, I just wanted to give a huge thanks for this incredible mod suite. From the miners to my personal favorite, the flame tumbler, everything in this mod is absolutely amazing! Thank you for all of the hard work and dedication put into the mods!
Thanks that's a nice message.

You don't really have 'tool ids' in Factorio, you have names and the tool name is "unit-remote-controller" so it seems unlikely there is an overlap there. Then you do an area selection it fires events for all mods that are listening for it regardless of the tool used so I suspect there is a bug in the WideChests mod where it is not verifying that it's own tool is being used. Do you get the same thing if you use the Zone Planner?
User avatar
SphynxLoL
Inserter
Inserter
Posts: 21
Joined: Tue Apr 25, 2017 3:32 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by SphynxLoL »

Yeah, just noticed. Same "Not Enough Chests" notification from WideChests when using the Zone Planner as well. I think you nailed the issue on the head. Not sure if the WideChest developer is still developing/maintaining the mod. I'll toss him a general bug report.
Griggers
Burner Inserter
Burner Inserter
Posts: 17
Joined: Sat Apr 22, 2017 3:26 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Griggers »

Energy consumption (line 1365):
if unit.vehicle then -- update energy state, consume based on acceleration
if unit.vehicle.riding_state.acceleration == defines.riding.acceleration.accelerating or defines.riding.acceleration.reversing then -- only true when accelerating or reversing
local energy_used = (unit_type.consumption / 30) -- 60 ticks/s divided by 2 as I noticed you multiplied fuel value by 2 when consuming the fuel item.

I also had to add
consumption = string_to_number(vehicle.consumption),

in (line 120)
local function unit_setup_vehicle(vehicle)
local unit_type = {
This was done on version 0.2.11, I haven't tested it on 0.15 as I'm playing vanilla at the moment and I'm waiting for more mods to be released before playing a modded game.
Last edited by Griggers on Sun Apr 30, 2017 9:20 pm, edited 1 time in total.
User avatar
SphynxLoL
Inserter
Inserter
Posts: 21
Joined: Tue Apr 25, 2017 3:32 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by SphynxLoL »

Picked up this error today. Not sure if it's a AAI PV or Detached Gun Sounds error. I'll just leave it here.

Image

Edit: Error keeps repeating making save nearly unplayable with the mod activated.
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 »

SphynxLoL wrote:Picked up this error today. Not sure if it's a AAI PV or Detached Gun Sounds error. I'll just leave it here.
One of the vehicles had ammo loaded but the ammo prototype had changed so It couldn't fire properly. It should be fixed in version 0.3.2.
xXTheCatMasterXx
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sun Apr 30, 2017 1:38 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by xXTheCatMasterXx »

Hello, i have discovered a crash in version 0.3.2 for factorio 0.15 when a vehicle tries to use batteries as its fuel source it quits to title screen.

Error MainLoop.cpp:853: Exception at tick 72342: Error while running event aai-programmable-vehicles::on_tick (ID 0)
LuaEntity doesn't contain key equipment.
stack traceback:
__aai-programmable-vehicles__/control.lua:782: in function 'consume_fuel_or_equipment'
__aai-programmable-vehicles__/control.lua:1414: in function 'unit_update_state'
__aai-programmable-vehicles__/control.lua:1994: in function 'unit_tick'
__aai-programmable-vehicles__/control.lua:2003: in function <__aai-programmable-vehicles__/control.lua:2001>


Current workaround:
Simply dont have battery equipment in vehicles.
Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Nexela »

Replace line 782 of control.lua with

Code: Select all

local batteries = table.filter(unit.vehicle.grid.equipment, function(v) return v.type == "battery-equipment" end)
And AAI Miners control lua 152

Code: Select all

local batteries = table.filter(miner.entity.grid.equipment, function(v) return v.type == "battery-equipment" end)
MainTango
Long Handed Inserter
Long Handed Inserter
Posts: 55
Joined: Tue Oct 27, 2015 12:22 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by MainTango »

Hi,
looks like this mod removes the machine gun and the flame thrower from the tank and only leaves it with the main cannon.

Image

Is there a way to use the mod and still have full armament on the tank?
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 »

MainTango wrote:Hi,
looks like this mod removes the machine gun and the flame thrower from the tank and only leaves it with the main cannon.

Is there a way to use the mod and still have full armament on the tank?
No, 1 weapon per vehicle. This is to make sure vehicles have specialised roles and encourage squads of mixed unit types.
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 »

version 0.3.3 has been released.

The "Inventory Transferred" text has been replaced with a particle animation showing the item types exchanged. It's a lot less annoying and shows you what is being transferred.

Miners will take a direct route if told to go to a nearby tree. They won't try and path around the forest.

The Unit Remote Controller can now edit Unit Data directly.
User avatar
pezzawinkle
Fast Inserter
Fast Inserter
Posts: 113
Joined: Thu Jan 12, 2017 1:28 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by pezzawinkle »

on the 0.3.3 update, the graphics quality went to hell, im not sure what did it, but im reverting the version, its soo hard to play with grainy images.
Post Reply

Return to “Mods”