Dralex wrote:As for a closer look into the problem, I just discovered that I am one of the unlucky guys who have not received the complete source files. I know there is a thread there that deals with the problem. Could very well be because I have got an Athlon 64-bit processor, but not with a 64-bit OS.
I guess there must be a misunderstanding here. Everybody gets a lot of Lua scripts in Rail Simulator\Assets\Kuju\RailSimulator\RailNetwork\signals and no one gets other sources. The confusing point about the signal scripts is just that you get a lot of shared files and then find copies of them in each of the individual scripts. The point is that they replaced the original require statement by some --include= which makes the Asset Editor append a copy of the included file to the including file. Don't ask my why, performance maybe (although not a good argument).
Dralex wrote:By the way, you seem to be doing the same thing anyway.
In
http://forums.uktrainsim.com/viewtopic. ... 78&t=76059 you find a link to an early write-up where I sketch what I am doing, and where I also give a detailed introduction to the existing scripts. However, this was written before docu was available, so see
http://forums.uktrainsim.com/viewtopic. ... 78&t=76989 for corrections to the original assumptions. However, as of this writing, I am mostly back at the original design, after having found a way to deal with the restriction that signals need to know the orientation of the receiving signal when they send a message to it.
Dralex wrote:I would have to clone the signal and do my tests on the cloned version as I do not dare to touch the original code, for the reasons you just gave me.
What I do is make a backup of the Lua scripts. Then I make a little test route with only one type of signal (e.g., the combined semaphore with distant and home arm) and then I hack about the code of that signal until I have enough for the night. More seriously, I use LuaEdit, which comes with integrated interpreter and debugger. While the interpreter only says "error" whatever you mess up, the debugger helps you figure out your latest typos. Unfortunately, you cannot run KRS scripts in the LuaEdit environment, I tried something along these lines and it was a waste of time.
Of course, if you want to run the default routes in between coding sessions, you better clone a signal and rename its script, so your scripting experiments do not disturb enjoying a leisure time ride.