Page 4 of 5

Re: [MOD 0.14] AAI Programmable Structures

Posted: Fri Feb 02, 2018 12:15 am
by Earendel
nightingale wrote:I've hit a problem in the 0.4.1 AAI Programmable Structures release on Factorio 0.16.21. Whenever I click on either the Input Terminal or Output Terminal of the Tile Scanner, I get this error:

Code: Select all

Error while running event aai-programmable-structures::on_tick (ID 0)
Can't add element with the name "entity" as LuaGuiElement contains a property or method with the same name.
stack traceback:
	__aai-programmable-structures__/control.lua:1016: in function 'struct_gui_add_setting'
	__aai-programmable-structures__/control.lua:1058: in function 'struct_gui_add_settings_recursive'
	__aai-programmable-structures__/control.lua:1042: in function 'struct_gui_add_settings_recursive'
	__aai-programmable-structures__/control.lua:1054: in function 'struct_gui_add_settings_recursive'
	__aai-programmable-structures__/control.lua:1042: in function 'struct_gui_add_settings_recursive'
	__aai-programmable-structures__/control.lua:1087: in function 'struct_add_settings_gui'
	__aai-programmable-structures__/control.lua:1203: in function <__aai-programmable-structures__/control.lua:1186>
Thanks, I've fixed that in the next version. I plan to release a version to the mod portal tomorrow morning so that would have caused lots of problems.
grays42 wrote:
Earendel wrote:Those structures are being moved to a different tech for vehicle specific structures. It makes it less complicated if you add the vehicles mod at a later date.
Gotcha.
Earendel wrote:I'm guessing that you're using a mod that automatically makes ghost entities real? If so that's what is breaking it.
Ah! Yep, that would be it. Rather than try to learn the mod a live environment, I'm experimenting and putting together circuit monstrosities in my creative mode sandbox that I can later use in live. :D Didn't realize that would affect it. Thanks!

As a side note, do you have any intention of making the coordinates of depots scannable by ID? That's the one thing that I really feel like is missing; I'm setting up what is essentially going to be a combinator-driven data network to make haulers into giant logistic bots, and the one thing that's proving super difficult to streamline is the process of defining the locations of depots. I'm having to manually enter X,Y values into constant combinators to say "this is where the depot lives", it's completely arbitrary. The only way to uniquely pull a depot location is to mark the depot with a zone, which isn't scalable; I'm basically just using a zone to tag the location, a scanner to determine the X,Y, and manually keying that into a combinator.

Also, a few questions about some of the signals that I can't find documentation for anywhere:
- What triggers, or how do I utilize, the "minimum fuel" signal? At the moment I have a manually built combinator array that basically adds up all fuel sources in inventory to determine how much fuel I have left. I can't figure out how the minimum fuel symbol shows up on my scanner in a usable way.
- What is a "surface signal"?

Thanks for this mod. I just discovered it a week ago and it's a whole new playground of programmable awesomeness. :)
I think there should be a way to make the scanner code work with creative mode but it could get complicated to make it a robust fix, it's a lower priority for me than other stuff right now.

Eventually depots probably will be scannable by id, and 'followable' using their id as part of a goto command. That will probably happen as part of adding location beacons that also have ids and are used for the same purpose (minus the storage).

Minimum Fuel is value you can set on a unit's Unit Data. When it transfers items away, it will make sure it has at least items totalling that fuel value. This stops haulers from giving away all their coal and getting stuck.

Re: [MOD 0.14] AAI Programmable Structures

Posted: Fri Feb 02, 2018 1:47 am
by grays42
Eventually depots probably will be scannable by id, and 'followable' using their id as part of a goto command. That will probably happen as part of adding location beacons that also have ids and are used for the same purpose (minus the storage).
Fantastic, that's good to hear. That will definitely simplify this process.
Minimum Fuel is value you can set on a unit's Unit Data. When it transfers items away, it will make sure it has at least items totalling that fuel value. This stops haulers from giving away all their coal and getting stuck.
Ok, that makes more sense! Thanks. What about the surface signal?

Re: [MOD 0.14] AAI Programmable Structures

Posted: Fri Feb 02, 2018 4:51 am
by grays42
Built a program to make a hauler act like a giant logistic bot:

https://www.reddit.com/r/factorio/comme ... s_built_a/

Re: [MOD 0.14] AAI Programmable Structures

Posted: Fri Feb 02, 2018 8:11 am
by Earendel
The Surface signal does nothing right now, but in the future it will let you do things like put zone tiles or scan on a different surface. Right now if you built something in a Factorissimo room it can't do much outside of that room because it's on it's own surface.

Re: [MOD 0.14] AAI Programmable Structures

Posted: Sat Feb 24, 2018 1:59 am
by Sir_Cherry
Hello I was trying to figure out how this mod works when I got a crash notification.

Code: Select all

29013.500 Error MainLoop.cpp:1019: Exception at tick 12420538: Error while running event aai-programmable-structures::on_tick (ID 0)
Value outside of range in property tree at ROOT[5].count
stack traceback:
	__aai-programmable-structures__/control.lua:393: in function 'struct_export_outputs_to_constants'
	__aai-programmable-structures__/control.lua:942: in function 'struct_process_input_output'
	__aai-programmable-structures__/control.lua:964: in function 'struct_update_state'
	__aai-programmable-structures__/control.lua:1255: in function <__aai-programmable-structures__/control.lua:1190
29013.500 Error ServerMultiplayerManager.cpp:95: MultiplayerManager failed: "Error while running event aai-programmable-structures::on_tick (ID 0)
Value outside of range in property tree at ROOT[5].count
stack traceback:
	__aai-programmable-structures__/control.lua:393: in function 'struct_export_outputs_to_constants'
	__aai-programmable-structures__/control.lua:942: in function 'struct_process_input_output'
	__aai-programmable-structures__/control.lua:964: in function 'struct_update_state'
	__aai-programmable-structures__/control.lua:1255: in function <__aai-programmable-structures__/control.lua:1190>"
29013.501 Info ServerMultiplayerManager.cpp:696: mapTick(12420538) changing state from(InGame) to(Failed)
29127.718 Info ServerMultiplayerManager.cpp:141: Quitting multiplayer connection.
29127.718 Info ServerMultiplayerManager.cpp:696: mapTick(12420538) changing state from(Failed) to(Closed)
EDIT: After some experimentation it seems that the crash happens only when a distance signal connected to a tile scanner is set to 1000

Re: [MOD 0.14] AAI Programmable Structures

Posted: Wed Mar 07, 2018 9:04 am
by Toch
Hello is there any plan to make tile scanner read cliffs ?

Re: [MOD 0.14] AAI Programmable Structures

Posted: Fri Mar 16, 2018 5:03 pm
by Earendel
Toch wrote:Hello is there any plan to make tile scanner read cliffs ?
Yes

Re: [MOD 0.14] AAI Programmable Structures

Posted: Tue Mar 27, 2018 3:45 am
by tehfreek
Running a tile scanner on a distance from my position, the mod blows up when I approach my car:

Image

I am not running AAI Programmable Vehicles, only Structures.

Re: [MOD 0.14] AAI Programmable Structures

Posted: Tue Apr 24, 2018 2:18 am
by brunobf
Either I have a bug, or I'm missing something, can someone please help?

On any of the scanners, there are 3 elements that you can hover. The main structure and the signal input or output terminals.
I watched the tutorial linked from the first page, and whenever Nilaus clicks (?) on the signal output terminal, an inventory like interface pops up with the signals listed as items.
Video Frame: https://youtu.be/e93rbJmFTyU?t=209
Whenever I do that, I get instead a "Tile Scanner" screen with Output Filtering toggles. Am I using the wrong click?
Weirdly when I'm playing on my MP server (hosted on a different machine), I can actually see the expected screen flash before being replaced by that screen.

I looked at control.lua inside the first section of struct_on_tick(), and I can see the handler the shows that screen that is popping up, but no the other one.
I have zero experience with Factorio modding though, so I'm not sure what I should be looking for. It feels like the handler for the screen that I'm expecting is part of the base game.

Can someone please tell me if this is actually a bug or stupidity on my part?

Thanks

Re: [MOD 0.14] AAI Programmable Structures

Posted: Tue Apr 24, 2018 3:50 am
by tehfreek
brunobf wrote:I watched the tutorial linked from the first page, and whenever Nilaus clicks (?) on the signal output terminal, an inventory like interface pops up with the signals listed as items.
Video Frame: https://youtu.be/e93rbJmFTyU?t=209
Whenever I do that, I get instead a "Tile Scanner" screen with Output Filtering toggles. Am I using the wrong click?
That video is over a year old (and therefore shows an older version of the mod), and the interface shown isn't appropriate for output regardless. If you want to see the output then connect it to a power pole and hover over the pole.

Re: [MOD 0.14] AAI Programmable Structures

Posted: Fri Apr 27, 2018 8:04 pm
by bengenie
I found an eard. game will not launch

Re: [MOD 0.14] AAI Programmable Structures

Posted: Fri Apr 27, 2018 10:18 pm
by sparr
Attached to this comment is a save file illustrating a bug, possibly a problem with blueprint placement as the entities in question were placed from a larger blueprint.

The unit scanner is correctly locating the nearby mining machine mk2, and sending its output to the input of the tile scanner. The tile scanner is scanning and outputting information about the wrong tile.

Image
Image

(I deleted the poles and decider from the screenshots, this did not affect the misbehavior)

Re: [MOD 0.14] AAI Programmable Structures

Posted: Sat Apr 28, 2018 12:18 am
by sparr
Another user on Discord says they have the above described problem even when manually placing buildings on top of blueprint ghosts, so it's not a problem with bots or creative mode, specifically.

Re: [MOD 0.14] AAI Programmable Structures

Posted: Sat Apr 28, 2018 1:42 am
by tehfreek
sparr wrote:Attached to this comment is a save file illustrating a bug, possibly a problem with blueprint placement as the entities in question were placed from a larger blueprint.

The unit scanner is correctly locating the nearby mining machine mk2, and sending its output to the input of the tile scanner. The tile scanner is scanning and outputting information about the wrong tile.
I opened the file and immediately noticed a bunch of "floating" output terminals, and the tile scanner is connected to one of these floating output terminals and not the unit scanner's output terminal.

Image

Re: [MOD 0.14] AAI Programmable Structures

Posted: Mon Jul 30, 2018 9:10 am
by bitersmustdie
Hey all,

I am trying to use this mod to control the aircraft from the Aircraft mod, but I get this error when trying to control rocket launcher aircraft. There are two rocket launcher aircraft and both have the error, all the other aircraft are fine:

Image

any ideas?

Re: [MOD 0.14] AAI Programmable Structures

Posted: Mon Jul 30, 2018 2:12 pm
by mrvn
Nightinggale wrote:Add an output signal to tell the number of ticks since last update.
The main reason for the infrequent scans is that setting signals is very UPS costly. Setting the ticks since last update would already incurr most of the cost of the whole operation making it pointless to not scan so often.

Re: [MOD 0.14] AAI Programmable Structures

Posted: Mon Dec 10, 2018 1:08 am
by diamondq
Would it be possible to allow the Tile Scanner to return the 'health' of a block? ie. if a structure (and particularly a wall) is damaged, it'd be nice to be able to get that as a result.

At which point, I could dispatch a Chaingunner to make sure any biters are dead and a Warden to repair the wall.

Awesome mod. Thanks

Re: [MOD 0.14] AAI Programmable Structures

Posted: Mon Dec 10, 2018 10:22 am
by mrvn
mrvn wrote: Mon Jul 30, 2018 2:12 pm
Nightinggale wrote:Add an output signal to tell the number of ticks since last update.
The main reason for the infrequent scans is that setting signals is very UPS costly. Setting the ticks since last update would already incurr most of the cost of the whole operation making it pointless to not scan so often.
You could output the tick number of the scan.

Re: [MOD 0.14] AAI Programmable Structures

Posted: Mon Dec 10, 2018 10:24 am
by mrvn
tehfreek wrote: Sat Apr 28, 2018 1:42 am
sparr wrote:Attached to this comment is a save file illustrating a bug, possibly a problem with blueprint placement as the entities in question were placed from a larger blueprint.

The unit scanner is correctly locating the nearby mining machine mk2, and sending its output to the input of the tile scanner. The tile scanner is scanning and outputting information about the wrong tile.
I opened the file and immediately noticed a bunch of "floating" output terminals, and the tile scanner is connected to one of these floating output terminals and not the unit scanner's output terminal.

Image
Maybe on entity_build events the terminals should check that they are not floating and the main structure should check for any floating terminals and take them over.

I had the same problems with bulebuilt places ghosts.

Re: [MOD 0.14] AAI Programmable Structures

Posted: Sun Feb 17, 2019 3:42 am
by ShinoHarvest
bug control by subtitle use biter pathfinder not direct angle
Vehicle/Unit ID + (Sub-X-Tile and/or Sub-Y-Tile): The Sub-XY tile offset is converted to an angle and speed. Sub-X-Tile 1 and Sub-Y-Tile 1 means go South East VERY slowly. Sub-X-Tile -1000 and Sub-Y-Tile 500 means go West-South-West quickly. If you can get the Sub-XY positions of two objects you can subtract them to get the Sub-XY difference between them. If you use these values as your command signal it will make the vehicle go directly towards (or away from) the target.
if i follow your description normally vehicle calculated angle and go straight line on point ignoring the obstacle on road but if i look sreen can see id/subtitle use on controler but vehicle evade wall

https://imgur.com/a/sLwLBeN
Image