Skip to content

Develop your own: prototype.json

Hampton edited this page Sep 6, 2015 · 1 revision

#NOTE: As of 9/5/15, prototype.json is still very much subject to change. This information may or may not be current, so bear that in mind.

Developing a prototype.json file is actually quite simple. No coding knowledge is required!! All you will need to do is follow the syntax described here (which is very simple) and you'll be good to go.

###What does this file contain:

This file basically contains a whole bunch of variables about your prototype locomotive. protoEngine.js takes these values and uses them to accurately model physics and behaviors for your locomotive.

###Variables: You'll need to have numbers (specific to your locomotive) for all these.

  • locoWeight - Your locomotive's weight in pounds.

  • prototypeMaxHP - Your locomotive's maximum horsepower.

  • locoFrontArea - The area of the front of your locomotive, in sq. ft. This does not have to be exact, get as close as you can.

  • airDensity - This should be set to 0.07962062. Unless, of course, you happen to be insane and have a desire to change this. In that case, congratulations. You're brave.

  • protoEngineNotchWait - This is an amount of time (in milliseconds) that we must wait between changing the notch. If you want no wait time, set it to 0. Bear in mind that doing this has a big chance of screwing up your decoder's sound notching functionality, as decoder.js has it's own wait time option for changing the decoder's sound notch.

  • prototypeMaxNotch - This is how many notches your locomotive has. 99% of the time, you can set this to 8. All you people with those weird GE 16-notchers, you're in luck, I thought of you when writing this. Also, if you have a locomotive with a continuous throttle, you can set this to 100 to change your throttle to a percentage-based model.

Clone this wiki locally