Dragón Groar's NoLimits 2 Script Generator
dg posted on December 4th, 2024
Hello!
Hope you have fun making amazing new coasters!
Cheers,
Dragón Groar
Do u have a version that works with Win XP 32-bits ?
Probably not. :/ I'm using Unity to build the program (even I question that decision now, but when I started it, it's the only thing I knew I could program stuff on, so it stuck), and the latest versions apparently only work on Windows 10 or newer, so I can try to export a 32 bit version (which apparently Unity hasn't fully removed yet), but I can't promise it will work all the way back to Windows XP. You're dealing with a 20+ year-old machine there by now...
I don't have the time to do it right now, though, so I'll try to check it next week and send it to you, and if it works, I'll add it to the post.
If anyone other than MrRC (I've already told him on direct messages) was wondering about that, I've just tested if by any chance it worked and it doesn't, so I'm discussing with MrRC if any of the solutions I can offer suits them, and if any does, I'll add it on the first message with the rest of the download links for everyone.
Dragón Groar's,
I run your program on my laptop Win 10 , (runs great, not a script written or tested) and later on i will transfer the script to my Win XP PC.
UPDATE 1.1.0 RELEASED
I've just released an update to the script generator. The highlights of this update are:
- Fixed: Bug where the blocks would freeze after resetting the coaster.
- Fixed: Bug where the blocks would not act as trims when the train was leaving (without launching).
- Added: Compatibility with Musickid43's generator's scripts. You can now load into this generator the scripts created with versions 1.0.4 and 1.1.0 (both basic and advanced modes) of Musickid43's generator. Regenerating and saving them updates them to this generator's format and applies all extra features and fixes I've added.
- Added: Transfer track empty positions. Make a transfer track automatically skip one (or more) position(s) in those cases where you just want to separate the storage tracks more from the main track than from themselves and add an empty position.
- Added: Simultaneous advance. Allows to safely advance a train into a block while another is leaving that block. Can be set to advance as soon as the next block is leaving or when its train has reached the end of the block.
- Added: Override maximum speed, complete stop and wait time values for a block exit. Allows to set a different value for these properties than the one set in the NL2 Editor. There are some restrictions, check the feature's help for information.
- Added: Overshoot fault detection. In the block states where the train is not expected to leave the block, if the train is suddenly not on the block, an automatic E-Stop is triggered, as that is a critical fault.
- Added: Station passthrough. Unfortunately, scripts can't read a station's "Passes" value, so it's been added into the script logic. Stations will behave as brakes while in passthrough mode. Remaining passes are set to the specified value on dispatch. Passthrough mode is disabled when not in AUTO mode.
- Added: Script extension (for advanced users). Make it easier to interact with the generated script from other scripts to extend the coaster functionality further.
- Added: DgScriptGeneratorManager class where all block system controllers in the park created with this generator are stored and can be fetched from.
- Added: Station disconnect. Making use of the station passthrough feature, stations can now be disconnected from an external script. Doing so makes them always behave in passthrough mode until they're enabled again.
- Changed: Some methods and constants made accessible to external scripts (public).
- Improved: More comments on framework scripts so that advanced users can understand what they do more easily.
- (More information about script extension in the program help.)
- Improved: Keyboard navigation and some other UI fixes.
The download link is in the first post (I'll always replace the link there to make it easier to find for newcomers).
Any questions and suggestions, as always, don't hesitate to ask them right here.
Absolutely love the generator. One question I have is if there is a way to get a switch to reset before the next block is free, like the 'move back to exit track' feature in thekadani's custom block logic builder.
Hey, I'm not sure if this is an issue specific to my computer or an issue with the mac export in general, but when I try to open it on my M1 Macbook air (11.5.1) I get an error saying I don't have permission to open the application. I have my Mac gatekeeper completely disabled by the command line, which usually should let me run any application downloaded from the internet, so I'm not sure what's causing this issue exactly.
popfilms posted on January 4th, 2025
Absolutely love the generator. One question I have is if there is a way to get a switch to reset before the next block is free, like the 'move back to exit track' feature in thekadani's custom block logic builder.
I didn't include that feature because, in general, reallistically speaking, that'd be a huge safety concern. Imagine that for some weird reason your train didn't make it over the next hill (think on a strong wind gust pushing the train backwards) and rolled backwards towards the now disengaged switch with no way to stop it in between. That'd be really bad.
To have the switch reset instantly, I'd recommend setting up a block, even a short one, after the switch. The switch will be automatically freed as soon as the train enters that extra block instead of waiting until the next one. And, reallistically speaking, you'd have a way to stop the train before the switch in case it rolled back.
For some future update, I already kinda planned to somehow (still polishing the details on my head) add a feature so that in auto mode, a block won't let a train go if the next AND the next are free. That'd help in this case with my suggestion: you'd hold the train before the switch until the small block after the switch and the proper next one would be free, preventing any non-emergency stops in the small block, but again, I'm still polishing the details on how to do that...
nerfer10 posted on January 4th, 2025
Hey, I'm not sure if this is an issue specific to my computer or an issue with the mac export in general, but when I try to open it on my M1 Macbook air (11.5.1) I get an error saying I don't have permission to open the application. I have my Mac gatekeeper completely disabled by the command line, which usually should let me run any application downloaded from the internet, so I'm not sure what's causing this issue exactly.
Sadly, as I say in the original post, I'm not even sure what I'm exporting on Mac. I have absolutely no way to check it, as I don't have any Mac computers. Just in case it was an issue with the actual file permissions (read-write-execute), I have zipped the file again from a Linux file system (that supports the execute permission) and updated the link above.
Summary, try downloading the program again and checking again; and let me know if it worked. If it doesn't, though, I'm not sure I'll be able to fix it easily...
A cool feature or improvement would be to account for an extended block when you simultaneously advance trains once the first train hits the end of the block. Other than that this is a really good tool that helps me a lot and I'm sure this helps other too, you can pat your self on the back for this.
CCA_Games posted on January 12th, 2025
[...] account for an extended block when you simultaneously advance trains once the first train hits the end of the block [...]
I guess by "extended block" you mean with the Linked Sections feature. Yes, that's something I've realized is actually a bug in my implementation of the "isTrainBeforeStartOfSection(double distFromStart)" and "isTrainBehindEndOfSection(double distFromStart)" functions (I implemented my own to include Linked Sections into the mix, but I did it wrong). I've already fixed that issue for the next update, along with some other issues I found while fixing that one ^^ .
Also something else I thought of as a cool feature would be variable speed lifts so if the next block isn’t clear it can go at a slower speed. Maybe as a bonus would be for a train to engage a lift at a slower speed then speed up when the train is fully on the lift however, I’m not sure if that is possible.
I've been orbiting around how to do that in an easy way.
Through script extension it should be currently possible, but you'd need to know a bit of Java programming (check the "Advanced: extend script" help button if you do).
I do want to somehow add it in a nice way to the generator, but the easiest thing that comes to mind, track triggers, is tricky because there's no way in NoLimits 2 as of now to get a list of all the track triggers in a coaster then check them by name to see what they should do.
So I'm still thinking how I should do that... ;)
Probably last one, something cool and maybe easy to add is have a swing launch only if the ride stops on the block but if not it launches normally. Kinda like Voltron’s valley launch.
CCA_Games posted on January 13th, 2025
Maybe as a bonus would be for a train to engage a lift at a slower speed then speed up when the train is fully on the lift however, I’m not sure if that is possible.
It totally is possible.
CCA_Games posted on January 14th, 2025
Probably last one, something cool and maybe easy to add is have a swing launch only if the ride stops on the block but if not it launches normally. Kinda like Voltron’s valley launch.
Although I haven't tested Voltron's case specifically, the swing-launch feature should definitely work like that already.
The way swing-launches work, they just go back and forth picking up speed until the train leaves the block, and I took care to program them so that if the train wasn't stopped when the swing-launch should start, it would pick the train up from whatever speed it already had, it wouldn't try to fight against it. So, as I said, if the train comes to the launch like the one in Voltron and doesn't need to stop, the launch should just work like a kicker.
If you want to do that Voltron kicker style of launch, just enable swing-launch (set the start launch to the direction you want it to go when starting from a stop) and enable swing-brake in the block exit leading to the kicker to prevent an overshoot fault if the train needed to stop (so that it can make a proper swing-brake in the kicker). Swing-brakes are skipped if the train can immediately leave the block.
I should say, though, that I'm still planning some improvements for rolling launches (most LSM launches where the train doesn't stop before being accelerated). Most of that can be somewhat bodged with the swing-launch and swing-brake features, but I want to add a couple of things specific for rolling launches and properly test and adjust swing-launch and swing-brake to work properly with that.
I updated the features and future features lists in the first post the other day, so feel free to check that out ;)
ThatFlyerGuy1 posted on January 14th, 2025
It totally is possible.
It's not about what's absolutely possible with NoLimits 2 scripting, it's about what's possible to integrate in a generic manner in a program that creates scripts for any kind of coaster. I know it's possible, and there's a package specifically created to do that (not sure if it's what's used in the video), but I don't think that package would be compatible with my scripts. I have the feeling they would fight each other for control over the lift, although I haven't tested it and it might just work fine.
Anyway, the easiest way I can think of right now to integrate this feature would be by letting you chose a entry speed (max speed different from the entrance max speed that would apply until the train had cleared the first X m/ft of the block) and an exit speed (max speed different from the exit max speed that would apply when the train has entered the last X m/ft of the block). It'd then be limited to 4 speed zones per block (entry, before trigger, after trigger, exit), but I feel that'd be enough for most use cases.
P.S.: Don't forget that on version 1.1.0 you can already setup different maximum speeds for the entrance and exits, so you can already do a two-speed lift actually, only that it's just before or after the trigger.
I keep coming up with feature it’s alright if you don’t put these in but I thought of having a roll back feature so if a train were to roll back on a launch that was a linked section it could go back to the trigger maybe you could also have a setting where you can set a time limit for a train to clear a block or just detect when a train hit the same section twice when it wasn’t supposed to do that and have the ride auto e-stop.
Also Transfer Tracks can only skip one Transfer at a time
After Generating a script and load the ride in No Limits I get this error: Error in File 'Script.nlvm' in Line 123, Column 1: Cyclic class hierarchy: Script
EDIT: Never mind, don't name your script Script otherwise this won't work.
Gonna try this out on my next project. This thing is due for some multi-move.
A possible feature would be to start a launch as soon as the train hits the block zone instead of waiting till it hits the trigger. This could possibly be a toggle next to the launch button on the thing. You would also be able to recreate what modern coasters with magnetic brakes do where the mags stay closed and the train crawls through them if the next block isn’t clear but if it is it is trimmed to the speed. Then the mags open.
As I said, I'm still planning a few improvements with regards to rolling launches. I'm not sure the exact set of features I'll include yet, but it's on the list...
One of the features I've been thinking of is a "relaunch trigger" option where you can choose where the train stops to perform a relaunch, independently of the normal NL2 brake trigger that would still control where the decision would be made to either launch or hold the train.
Most likely, it would probably be a set of options: on the start of the section, on the default trigger, on the center of the section or at the end of the section.
But, again, I haven't started with that yet and there's still a few other things I need to do on the program before starting that...
For now, most rolling launches I've seen in real life don't actually kick in the moment the first can enters the launch, but actually wait until a few cars are already inside so that the launch can actually pull the train forwards without wasting energy and heating up the electromagnets unnecessarily...
Therefore, while I haven't tested the specific case, if you set the trigger to "Center car" and the trigger point to the start of the launch, I'm quite sure it will mimic a real rolling launch behaviour quite reallistically.
You'd need to set a very slow transport speed and not much deceleration force (something like 0.1 or 0.2), and the acceleration force slightly higher than your brake force, then the launch speed and acceleration as you wish.
If you also want the train to be able to stop in the launch if the next block is not free, add swing-brake to the previous block exit. This will let the train return backwards to the trigger at its "normal" (not launch) transport speed. If you also want to shoot it backwards before shooting it forwards, add swing launch to that block's exit.
I know it's a bit of a hacky way to do it and ideally there should be an easier way, but as I said, I'm still defining that easier way. For now, you can do the hacky way if you really need to ;)
I think a bug is when going for a section of track to a storage track you can hear the transports constantly turning on and off.
CCA_Games posted on February 2nd, 2025
I think a bug is when going for a section of track to a storage track you can hear the transports constantly turning on and off.
That's part of the speed limiting code. For next version, I've added a small histeresis (like the one in the brake sections on the NL2 editor) that greatly reduces that annoying noise. For now, it does help that for the transfer track or brake section leading to the storage track you set a low transport acceleration and deceleration. Next version will make it better ^^
dg posted on February 2nd, 2025
That's part of the speed limiting code. For next version, I've added a small histeresis (like the one in the brake sections on the NL2 editor) that greatly reduces that annoying noise. For now, it does help that for the transfer track or brake section leading to the storage track you set a low transport acceleration and deceleration. Next version will make it better ^^
What I do in my custom scripts is I set one of my speeds to 5km/h (the storage section speed limit) and I set the other speed limit to the upper speed limit of the section, often either 8 or 10km/h.
Yeah, every time the train enters the storage section I’ve put the speed above 5km/h because I didn’t know.
Hello!
I'm very excited to finally present a project I've been working on for years and that, after a long (you can't actually believe how long) break, I've managed to finish and am proud to share with you.
Dragón Groar's NoLimits 2 Script Generator
What originally started as a rewrite of the original Musickid43's Script Generator ended up growing... probably too much. The first idea was just to fix the formatting of the scripts Musickid43's generator produced to make it easier to read and edit them afterwards, and that's what the program did originally. Then I started fixing things in the scripts it generated. And then I started adding things, and that's when it became the monster it is today.
Features
As of the latest update, main features are:
Some screenshots of the program (version v1.3.0):
Some things I want to add to future updates that I haven't had the time to add yet are:
Download
You can download my Script Generator in the following links. Any future updates will be mentioned in a new post on this thread and updated here as well:
The minimum requirements are those of Unity 6: Windows 10 21H1 or MacOS BigSur 11 (both 64 bits). For a more detailed list, check Unity's documentation.
NOTE: The Mac version is largely untested, as I don't own a Mac. I've tried to fix some things reported by users, but I can't check they're working. If you have file permission issues, having the app bundle in your desktop or using the DMG package to drop it in your Applications folder might help, from previous experience.
ALSO: Neither the Windows nor the Mac versions are signed (which is an expensive thing to do, and I do this for fun, not for a job), so it's possible that your computer and/or antivirus alert you about them being dangerous.
Feel free to run a manual virus scan or upload them to virustotal, there's no virus in them.
Feedback & thanks
If you use my program, I'd be very happy to hear what you think about it! In the same way, if you find any issue while using it, let me know right here.
And of course, if you need help, don't hesitate to ask!
If you generate a script for a coaster of yours and release it, you are not required to credit neither me nor the program for it, but I'd very much appreciate it if you did.
I've spent many many hours into this program and, while I've done it mostly for fun and learning, it's always nice to see people acknowledge your work and thank you for it :) .
I, of course, cannot end this post without thanking Musickid43 for their original Script Generator, which not only inspired this project, but also helped me greatly to get started with NLVM and start to program my own coasters.
Hope you have fun making amazing new coasters!
Cheers,
Dragón Groar