[MOD 0.14] AAI Programmable Vehicles

Topics and discussion about specific mods
robertpaulson
Long Handed Inserter
Long Handed Inserter
Posts: 92
Joined: Sun Jun 18, 2017 2:21 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by robertpaulson »

I managed to strip it all down to the AAI vehicles, off-grid-effects and prototypes. So everything else is optional if you just care about RC function.

Everything works fine, and I removed much of all the tweaks i.e killing all trees in radius lol- how cheesy is that. And the nudge works now so that's great. Honestly I'm impressed with path-finding. I told the car to travel 1k+ tiles through base and few forests and it did it quite smoothly. I thought I would need to babysit the thing.

However I wanted to use electric vehicles mod, the consume energy/equipment function does not work for me for some reason. Electric car initiates correctly when placed by hand with the grid contents. If you place it empty and add the items to grid it will never update the grid equipment for electric vehicles. And even if I put it down with the equipment as soon as I get and move front/back the car "runs out of fuel" basically after the first "fuel_tick". For now I'm tweaking the Electric vehicle car to basically to require fusion reactor and bunch of batteries in recipe and ditch the entire energy consumption deal, but it's painful, since its a quite neatly calculated mod.
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 »

You want your vehicles to use equipment energy to run?
This mod do this for me, but i have opposite problem - I dont want it. I want my energy to be conserved for shield and laser modules, but instead of this, when my vehicles get to biters, their batteries are empty...
User avatar
cpy
Filter Inserter
Filter Inserter
Posts: 839
Joined: Thu Jul 31, 2014 5:34 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by cpy »

Found bug when you have tanks with custom weapons it only lets you keep just one.
Bobwarfare tank only have 1 weapon, when i remove programable vehicles tanks have all weapons again.

Bob equipment also vanishes from vehicles. If you put some items to your vehicle grid it just vanishes after a while or after you give command to a vehicle.
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 »

Vehicle equipment grids are not officially supported right now. I didn't make the mods that add equipment grids to my vehicles. Also the code that makes them use battery power was submitted to me and has the clear intention of making vehicles run on battery power for all things.

At some point I will be adding proper equipment grid support complete with the ability to deploy vehicles with equipment grids. Before I do that though, if people have specific use cases of ideas on how it should work feel free to make suggestions.

My current thinking is that there should be a special bit of equipment that allows battery power to be used to move the vehicle, and without it fuel would be required. The other option is to have a unit data signal to switch on and off fuel use which would be more versatile but also more complicated. Another thing to bear in mind is that I will soon be trying to remove the AAI structures dependency so any solution will need to work with that.
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 just found this video on orbiting cars: https://www.youtube.com/watch?v=l1vEO-6G9AI
robertpaulson
Long Handed Inserter
Long Handed Inserter
Posts: 92
Joined: Sun Jun 18, 2017 2:21 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by robertpaulson »

Berkys32 wrote:You want your vehicles to use equipment energy to run?
This mod do this for me, but i have opposite problem - I dont want it. I want my energy to be conserved for shield and laser modules, but instead of this, when my vehicles get to biters, their batteries are empty...
are you using electric vehicles, or you just added grid to the vanilla car?
User avatar
cpy
Filter Inserter
Filter Inserter
Posts: 839
Joined: Thu Jul 31, 2014 5:34 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by cpy »

Earendel wrote:I just found this video on orbiting cars: https://www.youtube.com/watch?v=l1vEO-6G9AI
That terrain generator is cool, do you know by any chance what it is?
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 »

robertpaulson wrote:
Berkys32 wrote:You want your vehicles to use equipment energy to run?
This mod do this for me, but i have opposite problem - I dont want it. I want my energy to be conserved for shield and laser modules, but instead of this, when my vehicles get to biters, their batteries are empty...
are you using electric vehicles, or you just added grid to the vanilla car?
Just mod called Vehicle equipment grid, which add equipment grid to AAI vehicles. But sadly this mod alter not only this mod, but Bobs vehicles with bobs vehicle equipment too (as all vehicles use any energy from any batteries)
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 »

Earendel wrote:Vehicle equipment grids are not officially supported right now. I didn't make the mods that add equipment grids to my vehicles. Also the code that makes them use battery power was submitted to me and has the clear intention of making vehicles run on battery power for all things.

At some point I will be adding proper equipment grid support complete with the ability to deploy vehicles with equipment grids. Before I do that though, if people have specific use cases of ideas on how it should work feel free to make suggestions.

My current thinking is that there should be a special bit of equipment that allows battery power to be used to move the vehicle, and without it fuel would be required. The other option is to have a unit data signal to switch on and off fuel use which would be more versatile but also more complicated. Another thing to bear in mind is that I will soon be trying to remove the AAI structures dependency so any solution will need to work with that.
Yes, be able to switch battery using for move on/off will be really best sollution (like make emergency switch when they ran out of fuel). But as long as warden can hold tons of fuel for all vehicles, I rather save energy for weapons. Could you please point me to part of your mod, where I can disable this function please?
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 »

cpy wrote:
Earendel wrote:I just found this video on orbiting cars: https://www.youtube.com/watch?v=l1vEO-6G9AI
That terrain generator is cool, do you know by any chance what it is?
Alien Biomes: https://mods.factorio.com/mods/Earendel ... /downloads
Berkys32 wrote:
Earendel wrote:Vehicle equipment grids are not officially supported right now. I didn't make the mods that add equipment grids to my vehicles. Also the code that makes them use battery power was submitted to me and has the clear intention of making vehicles run on battery power for all things.

At some point I will be adding proper equipment grid support complete with the ability to deploy vehicles with equipment grids. Before I do that though, if people have specific use cases of ideas on how it should work feel free to make suggestions.

My current thinking is that there should be a special bit of equipment that allows battery power to be used to move the vehicle, and without it fuel would be required. The other option is to have a unit data signal to switch on and off fuel use which would be more versatile but also more complicated. Another thing to bear in mind is that I will soon be trying to remove the AAI structures dependency so any solution will need to work with that.
Yes, be able to switch battery using for move on/off will be really best sollution (like make emergency switch when they ran out of fuel). But as long as warden can hold tons of fuel for all vehicles, I rather save energy for weapons. Could you please point me to part of your mod, where I can disable this function please?
Search control.lua for "consume". There is a function to get energy from batteries or fuel.
Northgate
Long Handed Inserter
Long Handed Inserter
Posts: 60
Joined: Sun Nov 27, 2016 9:17 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Northgate »

I'm having huge issues with the path finding of the vehicles. If vehicles have to travel longer than a short distance they can't find their destination and start to roam around randomly. Also they seem to bug themselve through walls which makes it very hard to prevent them from getting into crowded areas.

Are there any solutions to this? Or would it be possible to limit them to only walk on zones?
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 »

Northgate wrote:I'm having huge issues with the path finding of the vehicles. If vehicles have to travel longer than a short distance they can't find their destination and start to roam around randomly. Also they seem to bug themselve through walls which makes it very hard to prevent them from getting into crowded areas.

Are there any solutions to this? Or would it be possible to limit them to only walk on zones?
I was having the same problem and ended up designing my base around vehicles being able to get through it. This mean pretty much walling off every main area of the factory and leaving areas that vehicles can drive through. It helps pathfinding a bit but they do have a habit of passing through objects they cut close to. They don't automatically trigger gates which means it wasn't too much of a hinderance to set up walls everywhere.

The vehicles won't get stuck on underground belts either, so you can bridge areas of the factory together using long strips of underground belts. Until new pathfinding is coded specifically for the vehicles (which is a huge task in itself and likely wouldn't be very performance friendly) you'll have babysit the vehicles through most complex areas.

However makes me think, there ought to be a way to pack up a vehicle, the opposite of a vehicle deployer, automatically. Then you could simply pack a vehicle and its cargo up at one point, move it via conveyor or train to another point, then unpack and re-deploy it there. Would be pretty needlessly complex but probably cool.
Northgate
Long Handed Inserter
Long Handed Inserter
Posts: 60
Joined: Sun Nov 27, 2016 9:17 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by Northgate »

I actually already have walls everywhere where the vehicles shouldn't go. The problem is that they glitch through the walls on a frequent base. And even tough everything is walled off and there is literally just one way to go, they still roam around cluelessly.
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 »

Northgate wrote:I actually already have walls everywhere where the vehicles shouldn't go. The problem is that they glitch through the walls on a frequent base. And even tough everything is walled off and there is literally just one way to go, they still roam around cluelessly.
That's weird, long range bug pathfinding gets sticky either way. Some people have figured out combinator based pathfinding but that's a huge chore. You can really only hope for improvement in general biter AI, or keep vehicles far away from the insides of your base.
User avatar
CakeDog
Inserter
Inserter
Posts: 22
Joined: Sun Jun 25, 2017 12:48 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by CakeDog »

Something about this mod, and the Warden mod, corrupts filled barrel icons.

I'd pick it apart trying to figure out what, but that's a lot of picking and I already am short on time.
ichbinderjesus
Manual Inserter
Manual Inserter
Posts: 1
Joined: Tue Jul 25, 2017 4:56 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by ichbinderjesus »

Hi!

I'm following Nilau's tutorials but I'm doing something wrong and really can't figure out what. The hauler is not taking or dropping anything from the miners to the depot. It once smashed a miner close enough to a depot so that the inventory of the miner was transferred to the depot. But hauler is not taking or dropping any items.
What am I doing wrong?

Thank you for an awesome mod!
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 »

ichbinderjesus wrote:Hi!

I'm following Nilau's tutorials but I'm doing something wrong and really can't figure out what. The hauler is not taking or dropping anything from the miners to the depot. It once smashed a miner close enough to a depot so that the inventory of the miner was transferred to the depot. But hauler is not taking or dropping any items.
What am I doing wrong?

Thank you for an awesome mod!
It sounds like the unit data on your haulers or miners are not set up to correctly allow them to share their resources.

Change the unit data on a unit by selecting it and using the unit data structure symbol that shows up on the selected unit window.
Set the miner to have -1 of whatever type of ore it collects -- this makes sure that it gets rid of the ore when a vehicle with available inventory is nearby.
Set the hauler to accept a maximum amount of ore from a miner, probably a few thousand.
Then click on the depot's top left box to set its data. Set it to accept 100,000 of the ore the hauler should offload.
robertpaulson
Long Handed Inserter
Long Handed Inserter
Posts: 92
Joined: Sun Jun 18, 2017 2:21 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by robertpaulson »

hey, i'm back with my RC car project.

I'm trying to use the RC car with personal roboports, but they seem to glitch when you re-create entities in the "unit_update_mode" method. Why is it even there? I don't quite understand as it seems to work fine only with one mode ("unit" mode to be specific, but it uses the ghost entity which is kind of cheesy), so I want to clean up this whole thing and maybe get rid of it altogether with a solid entity instead of the ghost (I anticipate some issues with the vehicle getting stuck but I was under impression the nudge was implemented to take care of that....) I'm just unsure about the original purpose of all of these vehicle modes....

edit: so I tried switching the "unit" mode to create solid or whole entity, but that turned off path-finding completely. and where I tried using any other mode except "unit" the path-finding works but when trying to order a unit that was stationary it is missing the navigator entitiy, after creating it the vehicle coordinates for its position (unit.target_position) are not being passed to utility lua to get the angle.
robertpaulson
Long Handed Inserter
Long Handed Inserter
Posts: 92
Joined: Sun Jun 18, 2017 2:21 pm
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by robertpaulson »

ok this got pretty bad when I realized you left only 1 weapon in the tank. So can you at least tell me how to either get the weapons back for the tank entity or make it skip the tank while iterating through prototypes? leaving out the tank from "aai-vehicles" here is the code, I tried putting if statement to check for particular vehicle_name or type "car.car vs car.tank" but none of them worked.

Code: Select all

global.unit_types = {}
        global.unit_types_by_signal = {}
        global.unit_mineable_resources = {}
        global.hauler_types = {}
        global.hauler_types["vehicle-hauler"] = "vehicle-hauler"

        local list = remote.call("data-raw", "prototypes_list")
        if list then
            local cars = list.car
            if cars then
                for _,vehicle_name in pairs(cars) do
				--if vehicle_name = "electric-vehicles-electric-car" then --------------------------------------- ADDED
                    if not string.find(vehicle_name, composite_suffix, 1, true) then -- exclude attachments
                        local vehicle = remote.call("data-raw", "prototype", "car", vehicle_name)
                        if vehicle then
                            if vehicle.order then
                                if string.find(vehicle.order, programmable_identifier, 1, true) then
                                    unit_setup_vehicle(vehicle)
                                end
                            end
                        end
                    end
				--end
                end
            end
Please help me out with this one.

Got it to work by removing this
data.raw.car.tank.guns = {"tank-cannon"}
from "entity-update.lua" .... best part is that before i did that the tank was not select-able, and now it is. and I haven't modified the find_entities_filtered from selection method. The more i dissect this the more mysterious it gets. I think its time I remove what i need from this mod and not the other way around.
whitecold
Inserter
Inserter
Posts: 46
Joined: Fri May 19, 2017 6:48 am
Contact:

Re: [MOD 0.14] AAI Programmable Vehicles

Post by whitecold »

Has anyone gotten good blueprints for handling squads of combat units?
Single tanks spreading out don't cut it anymore against the behemoth biters
Post Reply

Return to “Mods”