Mods introducing new content into the game.
Transportation of the player, be it vehicles or teleporters.
New ways to deal with enemies, be it attack or defense.
Related to roboports and logistic robots.
Entities which interact with the circuit network.
Hi, just got back to playing Factorio and got a crash when I used the car key the first time after updating to 0.1.11:
1834.123 Error MainLoop.cpp:1199: Exception at tick 5016072: The mod Autodrive caused a non-recoverable error.
Please report this error to the mod author.
Error while running event autodrive::on_tick (ID 0)
LuaEntity API call when LuaEntity was invalid.
stack traceback:
__autodrive__/control.lua:137: in function 'gui_car_unpublish'
__autodrive__/control.lua:646: in function 'remove_car'
__autodrive__/control.lua:728: in function 'tick_car'
__autodrive__/control.lua:1057: in function <__autodrive__/control.lua:1054>
stack traceback:
[C]: in function '__index'
__autodrive__/control.lua:137: in function 'gui_car_unpublish'
__autodrive__/control.lua:646: in function 'remove_car'
__autodrive__/control.lua:728: in function 'tick_car'
__autodrive__/control.lua:1057: in function <__autodrive__/control.lua:1054
Thanks for the report. I think the required fix is in 0.1.12, but important to note the .11 multiplayer updates affected quite a bit of the code and I've not tested them with car key... tread carefully, save a lot, etc.
Thanks for the quick update! 0.1.12 seems to fix it. I just summoned the car without a crash. I'll keep you updated if I run into problems after playing some more.
Another crash:
Error while running event autodrive::on_tick (ID 0)
__autodrive__/control.lua:183: attempt to index local 'state' (a string value)
stack traceback:
__autodrive__/control.lua:183: in function 'notify'
__autodrive__/control.lua:697: in function 'request_path'
__autodrive__/control.lua:889: in function 'tick_car'
__autodrive__/control.lua:1057: in function <__autodrive__/control.lua:1054
This happened while I was trying out shortwave radio/network sensor, but I can't tell what I did at the moment. Also, I'm not quite sure how to use these correctly. I can input coordinates by setting values for X and Y in a constant combinator. But that is used for a one-way trip. How could I send the coordinates for a complete route (e.g. pick up ore at one place, bring it to a storage near the smelters, go pick up fuel, repeat)?
I originally thought one should place a radio (all radios for one car transmitting over the same channel) near every waypoint, and it would always send the coordinates of the next stop, so the car can read it if it's near the radio and calculate a path to the new destination. But that's obviously not the way this mod works. :-)
Something else: The On-/Off-button on the radio doesn't have any effect. As soon as I set a signal in the constant combinator wired to the radio, the car starts moving -- even if the radio is turned off.
Thanks for the report; 0.1.13 fixes the crash. It was triggered when a non-colliding-position couldn't be found within a certain radius of the path target... which I've also just discovered is surprisingly hard to test for failure, because Factorio is really very good with finding obscure spaces for bounding boxes :-)
Yeah, the circuit network control was added to just mimic the functionality of the control. "Go to X,Y". The car also sends its own arrival/departure signals so the circuit network can react. Details on the information tab. So waypoints and routes are possible if you're into combinators. Best I've done is 3 combinators per waypoint and 3 more for timing pauses before each departure to allow robots time to work. I'm not sure how far down the path of automated routes I want Autodrive to go. That's really an AAI thing...
The On/Off bug might be a Shortwave thing. Will check.
Thanks for the report; 0.1.13 fixes the crash. It was triggered when a non-colliding-position couldn't be found within a certain radius of the path target... which I've also just discovered is surprisingly hard to test for failure, because Factorio is really very good with finding obscure spaces for bounding boxes :-)
Thanks again!
Best I've done is 3 combinators per waypoint and 3 more for timing pauses before each departure to allow robots time to work.
Would you mind sharing a blueprint? I've found a solution myself, but it's big! Trouble is that you can't rely on that X=W and Y=V, they may be a bit off. So I've decided to check whether the car has arrived (B is set) in an area (X-10/X+10, Y-10/Y+10) around the way point before sending the coordinates of the next one. But that totally bloats the thing, so I need 13 combinators (one constant combinator plus a dozen of the others) per waypoint. Given that the setup is identical for each way point (apart from the constant combinators holding the values, obviously), this would be the perfect use case for the Factorissimo-like embedded combinators suggested here.
About the robots: That's another issue where I was naively assuming things. You don't really need to park a car in an exact position so it can be accessed by inserters (can do that if you park your car manually), but that means that trains are easier before robots.
I'm not sure how far down the path of automated routes I want Autodrive to go. That's really an AAI thing...
Yes, no point in reinventing the wheel. Also, I quite like that Autodrive is not as complex as AAI seems to be. It allows you to get used to programming vehicles before graduating to the advanced stuff with zone marking etc.
The On/Off bug might be a Shortwave thing. Will check.
It has another bug related to that it consists of two entities: Some wisps damaged my radio. I could repair the dial knob, but if I try to use a repair pack with the I/O port, I get a message "Not operable". Nevertheless, the I/O port is marked with a yellow health bar because it has only 6/10 HP left.
… I need 13 combinators (one constant combinator plus a dozen of the others) per waypoint.
Optimized, so I save 3 combinators per way point. The fix comes with an overhead of 3 combinators for discarding all signals but X and Y and changing the wire before feeding into the radio (so input/output are separated). These 3 combinators handle input from all way points, so they don't count much if you define lots of way points. Yet, even this optimized set-up uses more combinators than your 3+3 version. :-)
Heh, well we're probably trying to do different things :-) My test route is a simplistic list of waypoints with 60s pause at each:
So, 3 per waypoint + 4 to cycle though the list. I forgot about the clock signal earlier as it's something I have throughout the base for other stuff.
I've just been trying to figure out how to get it work, so the time to wait is still set to a value that's not enough for loading/unloading.
Constant combinator stores the coordinates (X, Y) of a waypoint and the time to wait (T). It's connected to two arithmetic combinators: one outputs EACH -10, the other EACH + 10. From each arithmetic combinator I go into two deciders (one for X, one for Y) with a green wire. These four deciders are also fed via red wire with the radio signals. Each decider checks for one of these conditions: X<=W, Y<=V, X>=W, and Y>=V. Output is GREEN=1 if true. Next row is two deciders: One checks for GREEN=4 (meaning the current position is within an area of 10x10 around X/Y). The other is connected to the constant combinator and checks for B>=T. Both deciders output GREEN=1 if true. They are connected to another decider that is also connected to the constant combinator of the next waypoint; if GREEN=2, it outputs EACH (current value).
Now, the output of the last decider is X, Y, T of the next waypoint, and GREEN=2. I need another 2 combinators to eliminate T and GREEN. I've used arithmetic combinators (T *- 1, GREEN * -1) and another decider to combine input and change the wire. So X and Y are sent via green wire into the radio, while W, V, and B are read via red wire from the radio. I guess I could even save that very last combinator if I replaced the two arithmetic combinators with deciders (if X!=0 output value of X, if Y!=0 output value of Y). That would make it 10 combinators per waypoint plus 2 deciders overhead to sanitize the input for the radio.
However, this setup only works if the car already is at one of the waypoints! I'll have to manually set the coordinates with nothing but a temporary constant combinator connected to the radio before I can hook up my contraption. But once the whole thing has been initialized, the car should happily go in circles from one waypoint to the other. (Only tested with 2 locations for now, but it should work.)
Error while running event autodrive::on_tick (ID 0)
Unknown sprite "item/angels-cab-_-solid"
stack traceback:
autodrive/control.lua:106: in function 'gui_car_publish'
autodrive/control.lua:817: in function 'tick_car'
autodrive/control.lua:1091: in function <autodrive/control.lua:1088>
stack traceback:
[C]: in function 'add'
autodrive/control.lua:106: in function 'gui_car_publish'
autodrive/control.lua:817: in function 'tick_car'
autodrive/control.lua:1091: in function <autodrive/control.lua:1088>
Thanks for the report. Fixed in 0.1.15.
Great, thank you for your job.