Jump to content
  TPR Home | Parks | Twitter | Facebook | YouTube | Instagram 

The Official NoLimits/NL2 Help Thread


Recommended Posts

I am trying to recreate a piece of undeveloped terrain of a real park to make a new coaster of mine. My normal process in NL1 is as follows:

 

1: Make a template of the top down view of the build area with supports.

2: Use Google Sketchup to export that slice of terrain as a .3DS file.

3: Import the .3DS skin and drag the terrain to match the contours of the .3DS skin of the terrain, tile by tile.

 

I have come across two problems when trying to execute Step 3:

 

First off, the .3DS files are no longer viewed in wire frame mode, which has actually helped me because I could see the terrain below the .3DS file as I was adjusting it. How could I manipulate the .3DS file so that it is partially transparent.

 

Second, I am coming across a very weird glitch where any modified terrain appears to auto-smooth the farther away I zoom out, but appears at the correct height when I am very close. I tried maxing the LOD switch distance, but that didn't appear to do anything. This makes it incredibly difficult to tell how far I actually dragged the terrain markers.

Link to comment
Share on other sites

  • Replies 1.4k
  • Created
  • Last Reply

Top Posters In This Topic

I am trying to recreate a piece of undeveloped terrain of a real park to make a new coaster of mine. My normal process in NL1 is as follows:

 

1: Make a template of the top down view of the build area with supports.

2: Use Google Sketchup to export that slice of terrain as a .3DS file.

3: Import the .3DS skin and drag the terrain to match the contours of the .3DS skin of the terrain, tile by tile.

 

I have come across two problems when trying to execute Step 3:

 

First off, the .3DS files are no longer viewed in wire frame mode, which has actually helped me because I could see the terrain below the .3DS file as I was adjusting it. How could I manipulate the .3DS file so that it is partially transparent.

 

Second, I am coming across a very weird glitch where any modified terrain appears to auto-smooth the farther away I zoom out, but appears at the correct height when I am very close. I tried maxing the LOD switch distance, but that didn't appear to do anything. This makes it incredibly difficult to tell how far I actually dragged the terrain markers.

 

The solution for your .3DS files is to make them into scene object (.nl2sco) files and assign a custom material (.nl2mat) file to them.

 

Create the material:

1. Open the NL2MAT editor and click New. Save the file where you like.

2. Go to the Alpha tab and set Const. to 0.5 (representing 50% transparency).

3. Go to the Alpha and Blend tab and click the Blend checkbox.

4. Save.

 

Create the scene object:

1. Open the NL2SCO editor and click New. Save the file where you like (normally the same directory as your material file is best).

2. In the General tab (default) assign your .3DS file.

3. Go to the Materials tab.

4. Click Add to bring up the Replace Material dialog.

5. Click the top right [...] button for a drop down list of available material assignments on the .3DS model.

6. Select the material assignment and then in the lower [...] assign your .nl2mat file from before.

7. Save.

 

Now return to the Scenery tab in the editor. Click Choose... and add the .nl2sco file to the scene.

 

With large projects you should avoid using raw .3DS files in the scene. Sketchup is known to have issues with textures appearing dark due to the way that Sketchup stores certain data in the file. .NL2SCO is a little more work but adds a huge amount of control and versatility to your project files.

 

Regarding the terrain appearing to auto-smooth, this is not a glitch, it is working as intended. The terrain is a single continuous mesh that tessellates progressively as a function of distance.

Link to comment
Share on other sites

^Though the assistance is appreciated, it appears that I figured out a way to circumvent all my issues. For those who are interested and wish to adopt my build method, I simply do the same by utilizing Sketchup to extract the terrain and export as a .3DS file, (Google Earth may have inaccurate topographic data, but it's the best one can get for free) then importing into the editor as before, except when dragging the terrain up to fit the contour of the .3DS file from above the terrain, it is done below the terrain, and I stop dragging each marker right when it disappears beyond the black underside of the terrain object.

Link to comment
Share on other sites

Try moving your objects and textures to the same folder as the NoLimits 2 park. Open your lightwave objects from there and make sure that the textures are mapped to their locations in the folder. See if that helps you.

 

-Ride_Op

 

 

That's jut the thing, though, even the ones that ARE already like that show the error:

Failed file: "C:\Users\Tomi\Documents\com.nolimitscoaster.nolimits2\Sunny Skies Park\atomica.jpg"

and such, wen opened on another computer. As you can see, it's the park's folder, but the address remains the one on my comp.

 

Solution is here.

 

Uhm... Uncalled for passive-agressivness aside... (I mean, was "absolute file path" really a term I was supposed to know?)

 

I couldn't find anything in the results that seemed to help.

The first result is some plugin that seems to make lightwave find the file if it's in the lightwave root directory. But when you install an NLpackage it doesn't put the files in lightwave's root directory, it puts them in the park's directory. So that doesn't really help.

 

The 2nd result is a forum post the answer to which I didn't really understand. I never heard of setting a content directory in lightwave.

 

The 3rd result seems to refer to file backups rather than textures...

 

and all the rest seem to be equally confusing.

Link to comment
Share on other sites

I'm having a bit of trouble with scripting on the ride I'm currently working on. When I load up the ride there are 2 trains on the track, 1 in the station and 1 on the end brake run. Once the station is clear, the train on the brake run will advance with no problem, but when the first train arrives at the end of the circuit, the end brake run doesn´t seem to recognize the train is coming (the brakes stay up and the transport wheels don't turn on).

 

Here's the code I'm using for that block

 

 private void processBeforeStationBlock()
 {
   switch (beforeStationBlock.getState())
   {
   case STATE_BLOCK_FREE:
     beforeStationBlock.getSection().setBrakesOn();
     beforeStationBlock.getSection().setTransportsOff();
     break;
   case STATE_BLOCK_APPROACHING:
     beforeStationBlock.getSection().setBrakesOff();
     beforeStationBlock.getSection().setTransportsStandardFwdOn();
     if (beforeStationBlock.getSection().isTrainOnSection())
     {
       beforeStationBlock.setState(STATE_BLOCK_BEFORE_TRIGGER);
     }
     break;
case STATE_BLOCK_APPROACHING_B:
     beforeStationBlock.getSection().setBrakesOff();
     beforeStationBlock.getSection().setTransportsOff();
     if (beforeStationBlock.getSection().isTrainOnSection())
     {
       beforeStationBlock.setState(STATE_BLOCK_BEFORE_TRIGGER_B);
     }
     break;
   case STATE_BLOCK_BEFORE_TRIGGER:
     beforeStationBlock.getSection().setBrakesTrim();
     beforeStationBlock.getSection().setTransportsStandardFwdDependingOnBrake();
     if (beforeStationBlock.getSection().isTrainBehindBrakeTrigger())
     {
       beforeStationBlock.setState(STATE_BLOCK_BEHIND_TRIGGER);
     }
     break;
   case STATE_BLOCK_BEFORE_TRIGGER_B:
     beforeStationBlock.getSection().setBrakesTrim();
     beforeStationBlock.getSection().setTransportsStandardBwdDependingOnBrake();
     if (beforeStationBlock.getSection().isTrainBehindBrakeTrigger())
     {
       beforeStationBlock.setState(STATE_BLOCK_BEHIND_TRIGGER);
     }
     break;
   case STATE_BLOCK_BEHIND_TRIGGER:
     if (stationBlock.getState() == STATE_BLOCK_FREE)
     {
       if (mode == MANUAL_BLOCK_MODE)
       {
         beforeStationBlock.setState(STATE_BLOCK_WAIT_FOR_ADVANCE);
       }
       else
       {
         stationBlock.setState(STATE_BLOCK_APPROACHING);
         beforeStationBlock.setState(STATE_BLOCK_LEAVING);
       }
     }
     else
     {
       beforeStationBlock.getSection().setBrakesOn();
       beforeStationBlock.getSection().setTransportsOff();
       {
         Train train = beforeStationBlock.getSection().getTrainOnSection();
         if (train.getSpeed() == 0)
         {
           beforeStationBlock.setState(STATE_BLOCK_WAIT_FOR_CLEAR);
         }
       }
     }
     break; 
   case STATE_BLOCK_WAIT_FOR_ADVANCE:
     if ((mode != MANUAL_BLOCK_MODE) || (stationBlock.getState() != STATE_BLOCK_FREE))
     {
       beforeStationBlock.setState(STATE_BLOCK_WAIT_FOR_CLEAR);
     }
     beforeStationBlock.getSection().setBrakesOn();
     beforeStationBlock.getSection().setTransportsOff();
     break;
   case STATE_BLOCK_WAIT_FOR_CLEAR:
     if (stationBlock.getState() == STATE_BLOCK_FREE)
     {
       if (mode == MANUAL_BLOCK_MODE)
       {
         beforeStationBlock.setState(STATE_BLOCK_WAIT_FOR_ADVANCE);
       }
       else
       {
         stationBlock.setState(STATE_BLOCK_APPROACHING);
         beforeStationBlock.setState(STATE_BLOCK_LEAVING);
       }
     }
     else
     {
       beforeStationBlock.getSection().setBrakesOn();
       beforeStationBlock.getSection().setTransportsOff();
     }
     break;
   case STATE_BLOCK_LEAVING:
     beforeStationBlock.getSection().setBrakesOff();
     beforeStationBlock.getSection().setTransportsStandardFwdOn();
     if (beforeStationBlock.getNumberOfTrainsOnBlock() == 0)
     {
       beforeStationBlock.setState(STATE_BLOCK_FREE);
     }
     break;
   }    
 }

Link to comment
Share on other sites

Be sure that in the block before the main brake run, you are defining that the main brake block is "approaching" otherwise it will stay in the "free" state the entire time. That seems to be what would be causing it. Can you post the block previous to this one (lift possibly?) if the problem persists?

Link to comment
Share on other sites

That was it. I was using the scripts from the Script Park file with some minor changes for most things aside for the block which was before the final brake run, which I had to customze for timing, I didn't notice the "nextBlock.setState" part of the scripts. Thanks.

Link to comment
Share on other sites

Could someone help me with another script?

 

I'm using this one from the "Scripting API - Basics" page in the manual to rotate an object:

import com.nolimitscoaster.*;

public class Rotating extends Script {
private SceneObject sco;
private float totalTime;

public bool onInit() 
{
	int parentID = sim.getParentEntityId();
	sco = sim.getSceneObjectForEntityId(parentID);

	if (sco == null) {
		System.err.println("Object Not Found");
		return false;
	}
	return true;
}

public void onNextFrame(float tick)
{
	totalTime += tick;
	
	sco.setRotation(0, totalTime, 0);
}
}

 

I'm constantly getting a C60 (Unknown Method) error on this line:

int parentID = sim.getParentEntityId();

Edited by Projektion
Link to comment
Share on other sites

I know nothing about NoLimits but I know a little bit about scripting so I thought I'd jump in. Change these two lines:

 

int parentID = sim.getParentEntityId();

sco = sim.getSceneObjectForEntityId(parentID);

 

to:

 

#int parentID = sim.getParentEntityId();

sco = sim.getSceneObjectForEntityId(getParentEntityId());

 

If that works you can remove the line that is commented out, #int parentID=... The error indicates that getParentEntityId() is not a valid method for sim. I got the second line from some info I found through a quick Google search so I hope it helps.

Link to comment
Share on other sites

^It should work. Minimum requirements for it is Windows XP (recommended is Windows 7), so I'm sure most programs that work there can work in Vista as well.

 

I didn't see a basics tutorial on customizing lights yet, so I went ahead and made one myself. Quality is a little cruddy, but that's what you get with the $45.95 version of NL2 I guess. (I might upgrade someday.)

Link to comment
Share on other sites

If it wasn't Vista compatible, you could still probably get it to work by changing the compatibility mode of the program.

 

Click the start button and start typing the name of the program to find the entry point for it. Right click the icon -> properties. Click on the Compatibility tab and check the box 'Run this program in compatibility mode for:' then select the version of Windows that you want to emulate running this program in.

 

When I used to use Live Messenger, it wanted to keep the program in my taskbar on Windows 7 even when minimized. I changed Messenger to run under XP compatibility mode which allowed me to minimize it to the system tray and keep it out of my taskbar.

Link to comment
Share on other sites

The problem I'm running into is that the x, y and z in "sco.setRotation(x, y, z)" all need to be int values, and 1.501 is a double.

 

 

I'm also running into another problem, I'm trying to create the preshow for my Furius Baco recreation. Below is the script for to close the doors that separate the preshow room and station that (are supposed to) close when the train runs over a trigger. My problem is that in the "onTrainEntering" section, it will change the state to "STATE_ROTATION" to start closing the doors, but it seems to stop processing the "onNextFrame" section once the trigger is activated.

 

 

import com.nolimitscoaster.*;
import nlvm.math3d.*;
import nlvm.lang.Math;

public class showTrigger extends Script implements TrackTriggerListener {
private static final String scoName1 = "DoorRight";
private static final String scoName2 = "DoorLeft";
private SceneObject sco1;
private SceneObject sco2;

private float time1 = 0;
private float time2 = 0;

private static final int STATE_IDLE = 0;
 	private static final int STATE_ROTATION = 1;
private static final int STATE_BACK_ROTATION = 2;
private static final int STATE_PLAYING = 3;
 	
 	private int state;	

public bool onInit() 
{
		sco1 = sim.getSceneObject(scoName1);
		sco2 = sim.getSceneObject(scoName2);
				if (sco1 == null) 
	{			
		System.err.println("Object Not Found (sco1)");
		return false;
		
	}
	if (sco2 == null) 
	{			
		System.err.println("Object Not Found (sco2)");
		return false;
		
	}
	state = STATE_IDLE;
	
	return true;
	
}

public void onNextFrame(float tick)
{
		switch (state)
		{
			case STATE_IDLE:
			
				break;
			case STATE_ROTATION:
				time2 += sim.getCurSimulationTickSec()/4;
				sco1.setRotation(new Vector3f(0, 0+time2, 0));
				sco2.setRotation(new Vector3f(0, 0-time2, 0));
				if (time2 >= 1.501) 
				{
					sco1.setRotation(0, 1.501, 0);
					sco2.setRotation(0, -1.501, 0);
				
					state = STATE_PLAYING;
				}
				break;
			case STATE_BACK_ROTATION:
				time2 += sim.getCurSimulationTickSec()/4;
				sco1.setRotation(0,1.501-time2, 0);
				sco2.setRotation(0, -1.501+time2, 0);
				if (time2 >= 1.501)
				{
					sco1.setRotation(0, 0, 0);
					sco2.setRotation(0, 0, 0);
				}
				break;
			case STATE_PLAYING:
			{
				time1 += sim.getCurSimulationTickSec();
				if (time1 >= 1) 
				{
					time2 = 0;
					state = STATE_BACK_ROTATION;
				}
			}
			break;
				
		}
}	

public void onTrainEntering(TrackTrigger trigger, Train train) 
{
	state = STATE_ROTATION;
	
}
	
public void onTrainLeaving(TrackTrigger trigger, Train train) 
{
}



}

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...

Important Information

Terms of Use https://themeparkreview.com/forum/topic/116-terms-of-service-please-read/