I have the same problem.xiffix wrote:I've named the Station "Refuel L-CC"
I don't know what i'm doing wrong.
Here is the error:
Error in SmartTrains.
__SmartTrains__/gui.lua:608: attempt to index field '?' (a nil value)
![Wink ;)](./images/smilies/icon_e_wink.gif)
I have the same problem.xiffix wrote:I've named the Station "Refuel L-CC"
I don't know what i'm doing wrong.
Here is the error:
Error in SmartTrains.
__SmartTrains__/gui.lua:608: attempt to index field '?' (a nil value)
Fixed in SmartTrains 0.3.81xiffix wrote:Error in SmartTrains.
__SmartTrains__/gui.lua:608: attempt to index field '?' (a nil value)
Thanks, the only problem that I continue to have that I don't understand how of it works, there is very little documentation. What does a checkbox like "active", "marked" , "refuel","depart" do?Choumiko wrote:Fixed in SmartTrains 0.3.81xiffix wrote:Error in SmartTrains.
__SmartTrains__/gui.lua:608: attempt to index field '?' (a nil value)
Yeah, documentation is a "bit" lacking..JMiles wrote:Thanks, the only problem that I continue to have that I don't understand how of it works, there is very little documentation. What does a checkbox like "active", "marked" , "refuel","depart" do?
Sorry if this was explained before, but it wasn't in your first post and nobody likes to dig through the other 230 posts in this thread.
1. You are right in every point. Trains with refuel set only add the refueling Station to their schedule when they have to. The reason for this option is more or less for self-set rules/"realism", have dedicated stations for refueling and don't bother supplying each and every station in your base with fuel. It might actually be more usefull for long long trainlines, where a train could run out of fuel before coming back to the base (since i assume most players don't refuel at outposts), though i have yet to see an outpost that is that far awayJMiles wrote: 1. If "refuel" is checked, does that mean that the train will automatically refuel at the refuel station that is assigned? If so....why do we have such an option to be begin with, since every train needs to be refueled eventually.
2. What does "depart" do? I check it but nothing happens. When a trains stop at a station, I thought that checking "depart" might manually force a train to depart, after which the checkbox should go empty, but that's not the case.
3. "active"... what does that do? I'm assuming that it allows me to select the details of a train line in the top window, but why does it show 0 for "#trains" in the first train line and 1 in the other with the "active" checkbox of the 2nd train line selected, but switches to 1 for "#trains in the first train line and 0 in the second, once I check "active" of the first train line? There is 1 train on each train line, so I expected to see 1 for "#trains" in both train lines or do you ONLY show the #trains for the line that has "Active" checkbox checked?
4. "marked", what is that used for"? Only to mark a train line for deletion?
5. How do I use "signal value" in "rules"? I can check it, but then the checked box quickly returns to an empty box.
6. How do I find a station number that I can set in rules?
7. How do I set the signal for having both "FULL (AND)" with "signal" checked?
Basically a "leave when no change in cargo for 2 seconds" rule. Added way before the full/empty/signal stuffTrains leave stations when there is no change in their loaded cargo for a certain time (2s interval as default, cargo difference is checked per item)
maximum time still is the time set in the schedule
minimum waiting time (4s as default, change it in the global settings window)
You're nutsXeteth wrote:I've started on my next combinator build and I've decided to make a rather large system that dynamically controls my outpost trains. Trains will be sent to the various outposts depending on the amount being mined at a given time, amount of ore in chests at the station etc. This would mean that once an outpost gets low on outputting ores a train is sent only occasionally and finally once it runs dry trains are never sent; basically supplying trains depending on demand.
You basically want a fixed mapping of Station name to a number? I'm a bit worried about backwards compatibility, unless i add yet another checkbox (YACXeteth wrote: I am finding this rather difficult to do however due to the way stations are identified by signal value. Currently the signal value is taken from the order that the station appears in the schedule list and unfortunately this becomes problematic when (for example) a station is removed from the schedule (ie. outpost is removed) as it bumps each station up a value and thus throws the system out of order.
Would it be possible to instead be able to set the signal value for a smart station and have that value remain regardless of the order in the schedule? This would mean that if the player dropped a station and set it as "Iron 1" (signal value = 3) then that station would always be signal value 3 regardless of what was happening in the schedule.
Furthermore if it was possible to output that value from the smart station (or the cargo box thing) it would make identifying outposts through the circuit network much easier.
Choumiko wrote:You're nuts![]()
Yep, custom mapping for the station signal values so that they can remain constant when stations are added/removed would be awesomeChoumiko wrote: You basically want a fixed mapping of Station name to a number? I'm a bit worried about backwards compatibility, unless i add yet another checkbox (YAC) to use the lookup table (better naming suggestions welcome).
How should this behave for cases where you have the same station in the schedule multiple times? Probably go to the first one it finds after the current one?
Outputting the station# isn't a problem, a few lines of code and creating an icon. Though the "cargo box thing" starts to have so many virtual signals that it's nearly worth considering adding an extra one just for the special signals.
I think once my rewrite of FatController is done i'll get to it, really want to see your setup
lamhirh wrote:Can you make trun run on signal only ( or wait just for signal)? I want the train to run only whan cetain resource in storage drop under certain level.
For now it either ignores signal, waits for timer and runs, or waits till full AND signal. well actually it mostly ignores the settings anyway. Only one that works is wait forever. MAkes the train not move at all:P
What? No answer? Too afraid to get competition?JMiles wrote:One last question; where did you find the documentation (about the game) that is needed to write these mods? I was a professional programmer before I became a systems administrator, so I have the programming skills (also in LUA) and I'm also skilled in 2d and 3D graphic design, and I was thinking about writing a mod for Factorio, but without any proper documentation about the internals of the game, there is not a lot I can develop.So where did you get that info?
JMiles wrote:What? No answer? Too afraid to get competition?
Like thisMalcolmCooks wrote:Is there a way to have a train, after being dispatched to a certain station by a signal value, to then return straight back to the first station again instead of visiting all the remaining stations on the schedule?
Code: Select all
Station A <- sends train to station C via signal value
Station B
Station C <-- sends train to A, when it came from there, to D otherwise?
Station D
I found a better way to do it. Schedule goesMalcolmCooks wrote:Sorry, I worked it out with some experimenting.
Same error here, but in line 250...NearlyDutch wrote:So I was making my train network a little bit smarter with the introduction of smart train stops, but I get the following error, whenever a train uses a smart train stop:
This only happens with smart train stops, normal ones have no problem. I wanted to make my trains go to ore outpost after ore outpost until they are full and then goto the unloading station. That's why I was reworking my train network with smart train stops, but whenever I place one, a train arrives at one or departs from one, this error is printed.Code: Select all
Error in SmartTrains: __SmartTrains__/Train.lua:240:conversion of data to type "j" failed
P.S.: Already tried hard resetting with the remote interface.