Custom switch track tutorial
NLCSV doesn't respond when I open it. Is there an alternative way to turn the light pattern file into a CSV file with other programs?
actionzbaron posted on March 17th, 2024
NLCSV doesn't respond when I open it. Is there an alternative way to turn the light pattern file into a CSV file with other programs?
Unfortunately, not without the Pro license (which, if you have it, surely makes a much better job than this workaround). I haven't found any other program that does that, and yes, it's a bit of an old program, so it's a bit quirky.
However, you're not the first to tell me they're having issues with that program, so even though I didn't code it or even know who coded it, I can try to check the algorithm it uses to calculate the spline it writes into the csv and port the program to a different programming language that runs better, but it'd take time, so I have no idea when I'd be able to do it.
In the meantime, I can tell you what I do to run it, maybe it also works for you.
First, I'm running it with Java 13. If you're running an older version it might be the case that it's too old to run this program. I'm not sure which is the minimum version it can run on. If you don't know what version you're using, check this: https://www.java.com/en/download/help/version_manual.html
Second, I sometimes have issues running it if I just double-click the jar file, but if I run it from the command line, it works just fine. If you don't know how to run it from the command line, the easiest way is this:
- In the folder where you have the NLCSV.jar file, on the bar at the top of the window where it says which folder you're in (something like "This PC > Windows (C:) > NL2 > Programs" or "Documents > com.nolimitscoaster.nolimits2" for example) click (normal left click) at the right of all the text, where there's nothing, and the bar should change to a text input.
- Copy and paste this into that text input, replacing everything that was in there.
java -jar NLCSV.jar - Hit enter and the program should open.
(Note that you have to do all steps in one go because clicking out of the text input makes it go back to how it was before.)
I hope you can make it work with that.
Otherwise, feel free to answer back ^^
Cheers,
Dragón Groar
I'm trying to follow this tutorial, but I'm confused on how this would work. Whenever I roll into the launch and switch over the transfer able, when I try to roll back into the backward spike, the train crashes/cant move through the transfer table/switch. I've made some images because I think that way my question/issue becomes clearer.

I know the transfer table should be 0 distance but this is just for demonstration purposes. What I'm trying to emulate (a swing launch, moving along the track in track view and manually switching the transfer table), order of operations is numbered.

This may just be a case of me being stupid, since it's obviously working for you and everyone else, and I probably just did something wrong. So I would appreciate it if anyone could help me out here. If I need to clarify anything, just ask. Thanks a lot in advance for anybody willing to answer.
Hi!
Firstly, I'd connect the top hat and the spike to the same track of the transfer switch (in your case, the rightmost track). It makes things substantially easier.
Second, aside from the 0m distance between tracks, which yes, for demonstration purposes is fine not to be set like that, you also need to setup the switch track, in the "Special Track Properties" window, to change tracks in 0.1 seconds (that's the minimum).
Now, the last thing you need is a script for your coaster that moves the transfer track when the train comes in. The sequence of events would be like this: your train leaves the previous block, your train arrives at the sneaky transfer track, as soon as the train is fully inside the transfer track block, switch the transfer to the right position (in the code, that'd be position 1, since it counts from 0), launch the train forwards towards the top hat, launch it backwards towards the spike (note that the transfer track is already correctly positioned for this backwards launch), launch the train forward over the top hat. (When the launch block is clear, of course, you can reset the transfer to the left position to receive the next train.)
If you don't know how to code that script, not that I want to self-promote, but you can use my script generator. It allows you to program both the switch track movement and the swing launch automatically through a (I hope) easy to use interface. The only note I'd need to tell you is that, when adding the switch, tell the generator it's a Fork/Merge switch, because if you tell it it's a Transfer, the script will wait for the train to stop in the transfer before moving the transfer, while Fork/Merge switches move as soon as they're clear to do so.
If you decide to go with my script generator and encounter any issue or doubt, feel free to ask in its forum post and I'll help you further! :)
Hope that solved your doubts! Feel free to ask more stuff if I left any doubt unsolved!
Cheers,
Dragón Groar
Thanks a lot dg, the track connection was the main thing I was confused about, I understood the part about the "forwards-backwards-forwards-switch back to track 0" sequence. I was planning to us your script generator, because while I do know the basics about coding it's just easier not having to do it yourself, so thanks for the advice about telling it it's a switch, not a transfer table.
One question, do you know if there are any sites with measurements for the track? Where did you find measurements for the Hagrids coaster? Manufacturer website? I want to use the MACK launch coaster, but I don't know the exact measurements for Blender. If you could refer me to any method on how to find information like this or a way to measure it in NL, that would be very helpful. I hope I'm not taking up too much of your time.
Edit: dw I found the track gauge chart on the resource mega thread. God am I stupid scrolling past that 100 times.
If you want the numbers, there are some tables in the Mega Resource Thread that should help (you're looking for the green and red tables in the post I linked), but I believe that, mainly out of laziness, I didn't look for them or use them when I did Hagrid's.
I just started with a very small section of track, aligned it with NoLimits' track and did small adjustments until I nailed the rail diameter, the track gauge and the main spine / 3rd tube height (which, unless if you're using a 2-tube track style in your switch and don't need it, you won't find a table for)...
Be warned though that the tables in the Mega Resource Thread are not perfect anyway (some people have found errors here and there) and you should still test what you're building in Blender in NoLimits next to its actual track to nail down the values to the exact same NL2 uses, but the tables are indeed a very good first approximation to start with.
Hope I helped!
Cheers,
Dragón Groar
Edit: I see you ended up finding the tables yourself. The rest of my message is equally valid, though. ;)
Edit 2: A small bonus I originally didn't answer. While not perfect, a trick to measure stuff in NoLimits 2 is to use two support "free nodes" and join them with a beam. When you select the beam, its length will appear in the status bar at the bottom of the Editor. You just need to make sure that both free nodes are at the same height. It might be tricky to measure things as small as the rail diameter, but for track gauge and specially main spine / 3rd rail height, it can be very useful.

Hello everyone!
It's been already a while since I published my work in progress project to recreate Hagrid's coaster in NoLimits 2 (more on that on its own forum topic), and since then, I have seen several topics asking how to make a custom switch track, which I actually had done for that project:
So I'm writing this topic as a tutorial on how to do that.
Coaster part
The "secret" about how to do the coaster part of it is already detailed on Hagrid's coaster topic, but summarizing it, you need a transfer track before (if it's a fork) or after (if it's a merge) the switch. It must have zero separation between axes and minimum transition time (0.1). The last thing missing here is a custom block script.
3D objects part
This is apparently the hardest thing to figure out for most people and I didn't explain it at all in Hagrid's coaster topic, so here I go.
First, you'll need to export the spline of the switch to a csv file. This is done differently with NL2 Standard and NL2 Pro. I only have Standard, so if you have Pro and want to use its own CSV spline export options, I've got to guess you already know how to do that. Otherwise, the NL2 Standard method should also work on Pro.
You first need to generate a cutout of each of the switch's tracks. To do that, you can duplicate the coaster and remove everything except for one of the switch's tracks, then do the same with the other. Keep in mind that you should leave vertices from opposite side to the transfer track until two or three after the switch track actually ends or until the next strict vertex so that the cutout track is still following your original complete design.
For me, as you can see, both tracks had strict vertices quite close, so I stopped at those, and you can also see that both tracks are on different coasters.
Then we'll export each of these tracks separately, thanks to the Light Pattern Creator. With the coaster whose track you want to export selected, open the Light Pattern Creator and select "Generate Object", "T", "B", "L" and "R". In theory, "Width" and "Height" are not important, but I usually set them to 1. Don't forget to use different file prefixes for either track.
The rest of the settings are meaningless for our purposes.
(Small side note: While writing this, I've just seen the new "Start Trigger" and "End Trigger" options, apparently added in update 2.6.2.0. I guess they allow us to skip the paragraphs on coaster duplication, but I haven't tested it at all yet, so feel free to try it out, and if it doesn't work well what I'm telling you are the precise steps I've taken, which I know work.)
If done correctly, in the export folder you should have several files that start with the prefix you chose. The important one is the one with extension .lwo.
You will need to import it in the NLCSV program. I haven't found it in this forum and I can no longer find it on the internet either, so sadly I cannot credit its creator. All I can do is share it here: NLCSV. You will need Java installed in your computer for it to work.
If you already had this program, note that I have fixed a bug in the version I'm sharing with relation to some scientific notation that was enabling by default on values close to 0, and which the next steps didn't take nicely (and thought that 0.01 = 1e-2 was 1, so a position located at 0.01 in some axis appeared later on 1 in that axis, or worse).
Please take into account that other than that small fix, I have not developed the program and I won't take any responsibility on anything about it.
The program has a few instructions in its "?" button, but it's pretty straightforward: in the first path box you select the .lwo file exported from the Light Pattern Creator, in the second one you select where you want your new .csv file to be generated. Hit "Convert" and you're done here.
Next, we'll use blender and the Blender CSV importer by geforcefan (available as well in the Mega Resource Thread). You install the plugin and import the .csv file as explained in the plugin's github page.
Then you should see a line appear in your screen. That's your coaster's spline. You firstly need to rotate that spline 180º in the Z axis to match NL2's orientation (note that this might not be the case using NL2 Pro export spline, I don't know).
Then you need to create your track segment. Don't think it's too hard. I did this one without really knowing anything about 3D modelling, just adding default cylinders and merging them into one object. With a couple of easy Blender tutorials, you're good.
I built it along the X axis, with the object origin in the cross tie and the length of track going towards the negative x direction.
Now you need to go in the Modifiers tab of the segment you've created and add this two modifiers:
Your exact setup will depend on how you modelled the segment itself, so don't be afraid to play a bit with the settings. The relative offset controls how far should each repetition of the track go with respect to the previous. Since our cross ties go out of the rail by a small amount, it can't be 1, but if you've built it difrerently (with the cross tie in the middle of the segment for example), and the end of the rail is the end of the object in both sides, it could be -1. You should also play with this value to get the exact length of track you want (by reducing it, you make the cross ties be closer to each other).
Similarly, the deform axis of the curve modifier will be X if you've built the track segment as I did, but if you didn't, you might need to play around with it a bit.
Last, the Merge options sometimes provide better results, sometimes don't. Play with them a bit.
Then, to make the 3D object start where you want in the spline (if the spline starts before the switch like it will do in a merge), play with the Location X value in the object properties tab of the segment (same place we rotated the spline 180º before, but for the segment.)
Almost finishing: the Start and End caps you see there are two more special track segments that will be put automatically at the start and end of your piece of track.
The end one is easy, do one with two cross ties (the end one without going further than what the rail goes) and the start one depends. If you want to do a slanted cut, it will require some playing with it. I can't give you much more detail because that's how I did it. What I can tell you is that you'd need to do two parts to the cut: the moving one and the fixed one, and later export them separately (the fixed one on its own and the moving one with the rest of the switch track). But the caps are really if you want to go the extra mile, you don't need them for an easy switch if you don't want.
If you add them, though, place them in a different object collection and uncheck it so that the original copy of them doesn't appear in (0,0,0).
Last part, if you want to customize the colors from NoLimits 2, you need to add at least one material to the object. That is done through the materials tab.
You can do it more or less advanced, but all the faces of the objects you have created need to have a material assigned (with whatever settings, they don't matter) to be adjustable in NoLimits 2 (that part I'm not going to explain, since I guess you know how to change scene object materials and properties).
Last, exporting: use Blender's File (top menu bar) -> Export -> Collada (.dae) option and in the right panel don't forget to select "Apply modifiers" or the "Array" and "Curve" modifiers we added will not work on the final exported model (careful: this checkbox is disabled each time you restart Blender, remember to check it again when you come back to your model).
Save it where you want and you're ready to import it to NoLimits 2.
Then you can use Bestdani's attachment tools or any other similar to make it move along a hidden transfer track or switch with the appropriate transition time. which you should add to your coaster script so that it moves just the same as the actual transfer track the train goes through.
Hope this guide puts all of you in the correct track (pun obviously intended) to create these custom switches.
I'll leave you with a screenshot of a different proof of concept I did with this, something I'm aware no park would buy ($$), but that was really fun to think about.
(It's a mechanism to make a regular dueling coaster become möbius and vice-versa.)
(And I know about the floating tracks, I never got to design the lift mechanism for the switch pieces.)
Feel free to ask any questions, and I'll answer as soon as I can, which might not be fast, but I sure will answer them.
Cheers,
Dragón Groar