Page 20 of 44

Re: [MOD 0.14] AAI Programmable Vehicles

Posted: Tue Jul 04, 2017 11:41 pm
by robertpaulson
Do I really have to install all other mods to have RTS control of my car? I don't want any other feature, just to have a RC car.

Before I start playing with the files, is it even viable to shave this mod down to just RC of vanilla vehicles?

Re: [MOD 0.14] AAI Programmable Vehicles

Posted: Wed Jul 05, 2017 5:10 pm
by Earendel
Skeleton Man wrote:how feasable is it to allow vehicles with a color signal or something similar to take on that color on their exterior, similar to how when a player of a particular color is controlling them?

it would be nice to visually organize them
The only way to do it is put a dummy character entity in the vehicle, but that prevents any other player from getting in to take control so it's not a viable option.
robertpaulson wrote:Do I really have to install all other mods to have RTS control of my car? I don't want any other feature, just to have a RC car.

Before I start playing with the files, is it even viable to shave this mod down to just RC of vanilla vehicles?
No, the ones with ? are optional.

Re: [MOD 0.14] AAI Programmable Vehicles

Posted: Wed Jul 05, 2017 9:37 pm
by robertpaulson
Earendel wrote:
No, the ones with ? are optional.
Yes, I know that. But you have 7 required mods:

Code: Select all

		"aai-programmable-structures >= 0.3.3",
		"aai-zones >= 0.2.1",
		"detached-gun-sounds >= 0.2.1",
		"off-grid-effects >= 0.2.1",
		"aai-signals >= 0.2.1",
		"aai-vehicles-miner >= 0.2.1",
		"aai-vehicles-hauler >= 0.2.1",
Considering I just want an RC function, hauler, miner, zones I assume could be dealt entirely without. I was asking if its even possible to shave off all these out for an RC functionality (I can do the leg work myself, and started it yesterday). I just don't want to spend few days working on it to realize that the RC or RTS-like control mechanics or tweaks are embedded in something thats not intuitively related.(not sure if I'm making myself clear here)

I really don't want all these items, features. I briefly browsed through some of it and I saw they change vehicle physics which will collide with some mods I already have. So I will be really happy if I can just select a single non-occupied car/tank and click it to go some place (that's how simple I want it). It doesn't have to account for collisions since it will be a single unit (that's where the vehicle physics changes came from I assume since they change collisions) it even doesn't have to engage with enemies, but it can I don't mind that part.

Re: [MOD 0.14] AAI Programmable Vehicles

Posted: Thu Jul 06, 2017 10:07 pm
by Earendel
robertpaulson wrote:
Earendel wrote:
No, the ones with ? are optional.
Yes, I know that. But you have 7 required mods:

Code: Select all

		"aai-programmable-structures >= 0.3.3",
		"aai-zones >= 0.2.1",
		"detached-gun-sounds >= 0.2.1",
		"off-grid-effects >= 0.2.1",
		"aai-signals >= 0.2.1",
		"aai-vehicles-miner >= 0.2.1",
		"aai-vehicles-hauler >= 0.2.1",
Considering I just want an RC function, hauler, miner, zones I assume could be dealt entirely without. I was asking if its even possible to shave off all these out for an RC functionality (I can do the leg work myself, and started it yesterday). I just don't want to spend few days working on it to realize that the RC or RTS-like control mechanics or tweaks are embedded in something thats not intuitively related.(not sure if I'm making myself clear here)

I really don't want all these items, features. I briefly browsed through some of it and I saw they change vehicle physics which will collide with some mods I already have. So I will be really happy if I can just select a single non-occupied car/tank and click it to go some place (that's how simple I want it). It doesn't have to account for collisions since it will be a single unit (that's where the vehicle physics changes came from I assume since they change collisions) it even doesn't have to engage with enemies, but it can I don't mind that part.
I don't know what version you're using but the miner and hauler are optional now. In the future structures, zones, and signals can be made optional.
Data-raw-prototypes will not be required once a few things get properly implemented in the Factorio API, that's probably a few weeks away.
Off-grid-effects and detached-gun-sounds will always be required.

Re: [MOD 0.14] AAI Programmable Vehicles

Posted: Fri Jul 07, 2017 6:38 pm
by Berkys32
Everytime i try to remote control my tank leading my tank formation, i got CTD. Cant find any logs I could provide...
If i drive it personally, everything is ok

Re: [MOD 0.14] AAI Programmable Vehicles

Posted: Sat Jul 08, 2017 3:27 pm
by robertpaulson
Earendel wrote: I don't know what version you're using but the miner and hauler are optional now. In the future structures, zones, and signals can be made optional.
Data-raw-prototypes will not be required once a few things get properly implemented in the Factorio API, that's probably a few weeks away.
Off-grid-effects and detached-gun-sounds will always be required.
That's good news. I managed to strip everything except Data-raw-prototypes and off-grid-effects. and few other things like allowing engines to be crafted manually. You changed a lot of things in there without specifying it that (to my knowledge) is not required but affects game balance quite significantly. anyhow:

now, as excepted, i have some trouble getting the mod (remote control item) to work. It selects a unit (a car) and a box appears with Type ID and Unit ID however there is no box below that gets populated, and the Manual Commands (Shift+LMB) do not work. Can you give me a hint where this is handled currently?

Re: [MOD 0.14] AAI Programmable Vehicles

Posted: Sat Jul 08, 2017 8:04 pm
by buggy123
whitecold wrote:
buggy123 wrote:Would it be possible to add a setting to toggle the 1-weapon-per-vehicle mechanic? It's possible to disable it by deleting a few bits in entity-update and entity-update-external but its kind of annoying doing it after every update.
Which bits exactly have to be deleted? I broke the mod trying to accomplish that.
Sorry for the late reply.

Okay, IIRC you need to edit "entity-update.lua" and "entity-update-externals.lua" in /prototypes/entity. For entity-update.lua, delete basically everything so that the only thing left in the file is this:

Code: Select all

function aai_split_vehicle(vehicle_name, gun_names)
end
I'd say just delete everything, but I suspect that would break things, since things would be trying to call a function that no longer exists. Instead we just delete everything in the function so that it does nothing when called.

Next, for entity-update-externals.lua, find and delete this bit of code near line 80

Code: Select all

    -- only 1 gun per vehicle
    if vehicle.guns and #vehicle.guns > 1 then
        -- assume last gun is best?
        vehicle.guns = {vehicle.guns[#vehicle.guns]}
    end
Unless I've forgotten anything, that should be it. AAI vehicles such as the laser tank will be unaffected, since they only have 1 gun anyway. Vehicles with multiple guns should behave normally, except that they'll only use one gun when AI-controlled (and it might not be a good gun), but that would happen anyway.

I really wish this was a configurable option.

Re: [MOD 0.14] AAI Programmable Vehicles

Posted: Sun Jul 09, 2017 8:41 am
by Sabrewulf
My vehicles hit anything at it way to reach the target when following.
Can you add a path-finding when following to avoid obstacles?

Re: [MOD 0.14] AAI Programmable Vehicles

Posted: Sun Jul 09, 2017 8:51 am
by Berkys32
buggy123 wrote:
I really wish this was a configurable option.
I second this. And Im suggesting chabging weapons through vehicle data. Vehicles are able to use ammo from trunk, so...

Re: [MOD 0.14] AAI Programmable Vehicles

Posted: Sun Jul 09, 2017 9:01 am
by Berkys32
Sabrewulf wrote:My vehicles hit anything at it way to reach the target when following.
Can you add a path-finding when following to avoid obstacles?
I think its because its actually going to sub X/Y (its telling vehicle only direction and speed).
Because of this im using following function only to hold formation. For longer distance moving Im using go to X/Y coords...

Re: [MOD 0.14] AAI Programmable Vehicles

Posted: Sun Jul 09, 2017 4:32 pm
by Skeleton Man
Sabrewulf wrote:My vehicles hit anything at it way to reach the target when following.
Can you add a path-finding when following to avoid obstacles?
the vehicles would use biter pathfinding anyways and would screw everything over
personally I dont tell them to follow anything until they're out in the open, trying to maintain a formation inside a factory is a loosing battle

alternatively have the vehicles follow one another using combinator logic in a specific tight formation like a column or something

Re: [MOD 0.14] AAI Programmable Vehicles

Posted: Sun Jul 09, 2017 9:27 pm
by Nightinggale
I have had problems getting a hauler to return to the unload location. It was a strait line, but with water to one side and trees to the other, it often went in the wrong direction and started driving in circles. This made me come up with a system, which avoids using the pathfinder, which is useful for all vehicles passing tight locations.

The setup is as follows: (read everything before starting to copy)
  • Set up a constant combinator and a decider combinator
  • Connect constant to decider input with green wire
  • Set the decider combinator to output everything by value when X > 0. X is a zone, which loos like an arrow pointing up (color doesn't matter)
  • Set the constant combinator to output what you want a vehicle to do on that zone. That would be direction = 360 and whatever speed you want
  • Repeat that for the 7 other directions of the same color
  • Connect inputs of the 8 decider combinators with red wire
  • Connect outputs of the 8 decider combinators with red wire
  • Place a unit scanner and connect output to any decider combinator input using red wire
  • Set the unit scanner to trigger every single tick and make it output zone and ID
  • Place a unit controller and connect input to output of the decider combinators using red wire
  • Set the unit controller to trigger every tick
This will make vehicles follow the arrows on the ground. It's fast (combinators will finish in one tick) and it will use the ID from the scanner to the controller. This means you can set a constant combinator, loop or whatever you want as input to the scanner and it will figure out to send commands to the right vehicle. The pipeline structure allows setting a new vehicle every tick. Just remember that looping 50 vehicles means from the point of view from a specific vehicle, it gets updated every 50th tick, which is slow if it is moving at high speed and should have turned.

The only problem is that vehicles have a tendency to overshoot turns. This means if a west going vehicle turns to go north, it can end up west of the north line and this place will need arrows to north-east to correct this issue. Well that and being CPU heavy.

It's possible to add more constant+decider combinator pairs as long as it's certain that max one will trigger at once. This means you can add 8 more and have another color to tell that the vehicles should slow down before they turn. You can even have two steps of slowing down if you like, making a total of 24 decider combinators. Slowing down in advance for turns allows more vehicle in the loop as it can accept a delay of more ticks before going off the route.

Yes the pathfinder used when giving coordinates to go to could be better, but you can do lots of stuff with autonomous vehicles without ever using that pathfinder. You just need to figure out how to set up combinators to make it work the way you want it to work, like in this case get through a maze in your base without hitting all the assemblers ;)

Re: [MOD 0.14] AAI Programmable Vehicles

Posted: Mon Jul 10, 2017 9:18 am
by Berkys32
Im using bobs vehicles and its equipment. And just realized vehicles are using battery energy instead of solid fuels (which I have tons of).
If it isnt bug, how to turn it off?

EDIT: It does even without bobs mods, just with vehicle grid...

EDIT 2: Its most probably caused by your mod - if i turn AAI off, vehicles cant use battery power to move anymore.

Re: [MOD 0.14] AAI Programmable Vehicles

Posted: Mon Jul 10, 2017 5:29 pm
by Skeleton Man
Berkys32 wrote:Im using bobs vehicles and its equipment. And just realized vehicles are using battery energy instead of solid fuels (which I have tons of).
If it isnt bug, how to turn it off?

EDIT: It does even without bobs mods, just with vehicle grid...

EDIT 2: Its most probably caused by your mod - if i turn AAI off, vehicles cant use battery power to move anymore.
i'd give your mod settings a check on the world, some of them might override other mods that try to intergrate battery power

Re: [MOD 0.14] AAI Programmable Vehicles

Posted: Mon Jul 10, 2017 6:17 pm
by Berkys32
Im not sure what do you mean..
my mods.settings.json?
mods.settings.json
here is my mod list:
my mod list
But as i told - when I turn off AAI, its ok. So I assume its bsc of it, as it is altering many things about vehicles...

Re: [MOD 0.14] AAI Programmable Vehicles

Posted: Mon Jul 10, 2017 11:02 pm
by Seldion
Not sure where to post this so if this is in the wrong place, pardon!

Either way, I have a request for you, I love your warden vehicle, all of them really but it came to me when I was using one as a repairer/gather that it would be awesome to have it's cannon as a turret, of'course be stronger and have a much father range would be great but it is just a thought, if it came true I'd glee with joy like a school girl xD

Also thank you for all your work on the mods that I so enjoy!

Re: [MOD 0.14] AAI Programmable Vehicles

Posted: Wed Jul 12, 2017 10:35 am
by robertpaulson
robertpaulson wrote:
Earendel wrote: I don't know what version you're using but the miner and hauler are optional now. In the future structures, zones, and signals can be made optional.
Data-raw-prototypes will not be required once a few things get properly implemented in the Factorio API, that's probably a few weeks away.
Off-grid-effects and detached-gun-sounds will always be required.
That's good news. I managed to strip everything except Data-raw-prototypes and off-grid-effects. and few other things like allowing engines to be crafted manually. You changed a lot of things in there without specifying it that (to my knowledge) is not required but affects game balance quite significantly. anyhow:

now, as excepted, i have some trouble getting the mod (remote control item) to work. It selects a unit (a car) and a box appears with Type ID and Unit ID however there is no box below that gets populated, and the Manual Commands (Shift+LMB) do not work. Can you give me a hint where this is handled currently?
I'm not sure if you are not happy about how i am editing your mod or simply you don't want to deal with me. But I guess I will have to take the long way around this and do it piece by piece.

Re: [MOD 0.14] AAI Programmable Vehicles

Posted: Wed Jul 12, 2017 1:29 pm
by Sigma1
I have a weird problem. I have configured a hauler to go between two depots, and the coordinates are set up correctly, but the hauler always goes to a specific spot and starts spinning in place.

EDIT: Seems that it was a combinator configured wrong.

Re: [MOD 0.14] AAI Programmable Vehicles

Posted: Fri Jul 14, 2017 4:43 pm
by robertpaulson
Ok So I installed all required mods (all updated for .15 version), however I can't even get it to work:

Placing vehicles by hand throws error pointing to on_buit_entity, and the line 552

Code: Select all

table.insert(global.unit.unit_types[unit.unit_type], unit)
in control.lua (getting a nil instead of a table)

Re: [MOD 0.14] AAI Programmable Vehicles

Posted: Fri Jul 14, 2017 9:38 pm
by cpy
Is it me or this mod really eats update time like crazy?