News:

SMF - Just Installed!

Main Menu

Recent posts

#71
Years of experience! And learning from other routes that other people build.
#72
Development Classes / Basic Object Building
Last post by SP1900 - Mar 24, 2021, 06:41 PM
A couple of years ago I wrote a guide for those who want to learn to build objects and train external views

Here's the link to it: https://docs.google.com/document/d/10YiyOGf4PI4PKKwXb_-BZwiY91ghxXV6zXv0bDKGlcg/edit?usp=sharing

Also includes how to texture an object. This is for basic building an object but the principles can be applied to build up more complicated structures.
#73
Development Classes / TFO Tutorial
Last post by tf51d - Mar 24, 2021, 03:46 PM
This is the Youtube Tutorial I did last year on how the Track-Following Object (TFO) function works in OpenBVE (Post version 1.6+), and an example file which shows the structure of the .xml files required. If anyone has any questions please post them in this thread and I'll try and answer them for you!

https://www.youtube.com/watch?v=HdPJVsO1FaI&t=0s

https://drive.google.com/file/d/1C543HWMmEHCdjrtW7jUt82PkOJ3WQP9C/view?usp=sharing
#74
Thank you so much! Where did you learn all this??
#75
Hello!

You want to learn how to make trains switch tracks. First things first you need to understand that openbve doesn't actually have switchable tracks and we use that the .turn/.curve commands to create illusion of switching tracks. Now this instruction here will require you to have a basic understanding of coding in openbve tracks/freeobjs/dikes/cracks/walls and forms. NOTE! I will provide you with the basic understanding and from that point you will need to experiment on your own to grasp the concept.

To create a switch from the express track to the local track we will use the ,.curve command to do so. ,.curve is a cleaner alternative than ,.turn which causes more headaches:

Instructions!

(1) Go to the point you would like to create the switch: For me I will go to position 300M. NOTE! In openbve you will need to at a multiple of 25 in order to switch tracks efficiently and to end all repeating objects. If you dont then you will have errors or glitching objects later on.
You cannot view this attachment.

(2) Prepare your code in notepad++ or your route editing software. Once you establish the area you would like to switch tracks at. Take the position and enter it into your editing software like the following: Example: 300,. You cannot view this attachment.

(3) For my code at position 300M I will add this into notepad++ and then add 3 more numbers which will be multiples of 25 after 300 in the next lines. With that my following numbers will be listed as follows:
 300,.
 325,.
 350,.
 375,.

(4) I now will add the following code to switch my track to the track on the right side.
 300,.curve 156
 325,.curve -156
 350,.curve 0
 375,.

(5) Save your work and refresh openbve. Once that's completed your tracks should look like what I have posted.
You cannot view this attachment.

(6) Were not done yet so here comes the hard part. As I said before "Openbve doesn't actually have switchable tracks and we use that the .turn/.curve commands to create illusion of switching tracks". Now on the line where you have the code [300,.curve 156] you will edit your rail to the right side by adding the following code. My right side rail is numbered ,.rail 1 this maybe different from whatever rail is being used on your route or project ensure that you check what rail is being defined at that point. NOTE: Some rails will be overlapped on other rails for detailing purposes or other reasons!

(6A) Enter the rail codes for the as follows for each line. This will allow the right side rail to be kept straight as the main rail turns into that track.
     300,.curve 156 ,.rail 1;4
     325,.curve -156,.rail 1;2
     350,.curve 0 ,.rail 1;0
Once you are finished you should have something that looks like this You cannot view this attachment.

(7) After that is completed. Add a new railstart command to the code, identify it by adding a number like the following ,.railstart 4;0;0;0. I made my track identification number to be #2. We will be using this to make the main look rail straight while you will be diverging to the right.
     300,.curve 156 ,.rail 1;4 ,.railstart 2;0;0;3
     325,.curve -156,.rail 1;2 ,.rail 2;-2
     350,.curve 0 ,.rail 1;0 ,.rail 2;-4
Once that is completed you will see the rail look like this You cannot view this attachment.

( 8 ) Lets clean up now. So the rail that you see in the middle needs to be removed. How do we do that? Simple! We will go to the rail commands wherever they are placed and look for nothing.csv or nothing.b3d. NOTE! If this invisible object isn't added in your rail code you will need to do this! This is useful because you can hide you rails or other objects with this command. The command to hide the rail crossing over will be the following:
 300,.curve 156 ,.rail 1;4 ,.railstart 2;0;0;3 ,.railtype 0;0
Once that's completed you will see this You cannot view this attachment.

(9) Were almost finished! Now after that rail is cleared you will need to correct the rail constantly roaming around and correct your track at the end of it. Add the following code at line 375. 375,.railend 1 ,.railtype 0;4 : The reason we add this code is because your rail on the right side was rail 1. You ended rail 1 at line 375. Now your main which is rail 0 will continue to run in place of rail 1 giving you that illusion that you see normal tracks infront of you.

(10) Thats it! Your well on your way to code switchable tracks!! Enjoy!


Bonus! Turn the curve commands around with positive or negative to switch either left or right! 



 
#76
Development Classes / Re: Getting Started
Last post by Trainkidkris - Mar 24, 2021, 09:18 AM
Blessed!
#77
Development Classes / Getting Started
Last post by E-man-25 - Mar 23, 2021, 09:43 PM
Choosing your developer tools

The first step toward successful openBVE Development is knowing your developer tools, these tools will assist you in the most comprehensive and user-friendly way possible, in addition, increase your work efficiency, performance, and overall skillset. In existence, there currently are 6 official tools, all of which serve a very different purpose in the development process:

*Train Editor: A multi-purpose tool allowing you to modify/set the correct specifications of a train, they are, but not limited to: acceleration, deceleration, power notches, brake notches, brake type, train physics, and motor sounds. The tool reads and writes files with the name "train.dat"

*Train Editor2: This is a multi-purpose expansion/extension tool to the original Train Editor, while it may not be perfectly stable as the original, it aims to increase the efficiency and performance of certain things such as the ability to hear motor sounds while developing them, image-displayed cabs, and better user experience. The tool reads and writes multiple files which include: .te "Intermediate Files", .dat "train.dat" and .cfg "Panel and Sound Files"

*Object Viewer: Serves the purpose of viewing and measuring the necessary specifications of an object, as well as debugging. To understand the controls inside the program, observe the guidance icons and tooltips all around.

*Route Viewer: Roughly similar to the previous tool, but ONLY views and measures the necessary specifications of a route, as well as debugging.

*Car to XML Converter: Converts the commonly used image-displayed cab formats of extensions ".cfg" to an image-displayed cab format of ".xml"

*Object Bender: Bends objects to create curves (useful for rails and platforms!)

To find your developer tools, go to your installation path/location and within the "openBVE/" directory you can find all 6 tools, not always will you require each tool, certain tools have their designated time and ideality, you won't always need to use TrainEditor2 rather than TrainEditor nor will you always need to convert your panel type to XML!

Honorable Third-party mentions(a.k.a Extra tools that I personally use)

*Notepad++: The most recommended coding tool by me, in comparison to the generic Notepad, this tool allows you to do various things and save a huge amount of time on many occasions, with its featured "Find" "Replace" "Simultaneous-line editor" "User-defined Color Coding" and much more, you can make the most out of openBVE development at a high pace

*Adobe Photoshop: Top-tier tool used for texture work, all your texture editing needs can be fulfilled right here!

*Adobe Illustrator: Another Top-tier tool similar to Photoshop, but used for a different need... If you wish to re-create MTA maps, strip maps, ads, and other illustrations, it can easily be done here

*Sketchup: Professional modeling tool, very useful to save time and hugely increase the efficiency of large structures or complex geometry (in-game performance impact WARNING)

#78
Openbve Development / Re: NYCT (1) Train To Van Cour...
Last post by E-man-25 - Mar 23, 2021, 07:01 PM
Glad to see a start, I would suggest starting to code small fictional routes of just a few stops guiding yourself with the official documentation if you'd like to master the skillset of route development. Just remember patience is key tho it won't be as easy at first but it will eventually over time!
#79
Hello!

So I wanted to learn how to make routes go on the local or express track. For example, if I was on the express track and on the right is the local track and I find a track to turn my train, how do I change that? So if I wanted my train to go on the local track when its on the express track, how can I switch the .turn?
#80
Openbve Technical Assistance / Re: How to Install OpenBVE
Last post by SP1900 - Mar 23, 2021, 09:07 AM
OpenBVE stable versions now come as an installer package which lets you install it like any other program

Simply download from the official website: https://openbve-project.net/download/
SMF spam blocked by CleanTalk