I've been having a look at making a syntax highlighter for Visual Studio CODE... Its not what I would call super easy, like Notepad++ or CONTEXT.EXE.
Here is what I have so far. *Granted... to keep the coloring, I have to allow the forum software to screw up the formatting... :-(
SIMISA@@@@@@@@@@JINX0D0t______
Comment ( ########## WAGON SECTION ########## )
Wagon ( SCO_USRA_NEW_LD
Type ( Freight )
WagonShape ( SCO_USRA_NEW.S )
Size ( 3.1m 4.6m 13.35m )
CentreOfGravity ( 0m 1.90m -5m )
Comment ( Loaded 68t | Empty 21.7t )
Mass ( 61.7t )
InertiaTensor ( Box ( 3.1m 4.6m 13.211m ) )
WheelRadius ( 33in/2 )
NumWheels ( 4 )
Comment ( ##### COUPLING ##### )
Coupling (
Type ( Automatic )
Spring (
Stiffness ( 9.0e4N/m 4.6e6N/m )
Break ( 1.28e6N 1.29e6N )
r0 ( 16cm 21cm )
)
)
Comment ( ##### FRICTION ##### )
ORTSBearingType ( Friction )
ORTSDavis_A ( 196.20lb )
ORTSDavis_B ( 2.7765lbf/mph )
ORTSDavis_C ( 0.039999lbf/mph^2 )
CentreOfGravity_Y ( 1.4 )
Comment ( ##### BRAKES ##### )
BrakeEquipmentType( "Handbrake, Triple_valve, Auxilary_reservoir, Emergency_brake_reservoir" )
BrakeSystemType ( "Air_single_pipe" )
MaxBrakeForce ( 57.919kN )
MaxHandbrakeForce ( 19.306kN )
NumberOfHandbrakeLeverSteps ( 100 )
TripleValveRatio ( 2.5 )
MaxReleaseRate( 0.935 )
MaxApplicationRate( 0.515 )
MaxAuxilaryChargingRate( 0.84 )
EmergencyResCapacity( 2.1 )
EmergencyResChargingRate( 0.79 )
BrakeCylinderPressureForMaxBrakeBrakeForce( 57 )
EmergencyBrakeResMaxPressure( 80 )
Comment ( ##### MISC WAGON ##### )
Sound ( "genfreightwag14.sms" )
Name ( "SCO USRA NEW Loaded" )
)
Notepad+ Is there ready MSTS/ORTS syntax plugins?
#23
Posted 15 July 2021 - 03:05 AM
Well, it's still in a proof of concept, 'barely working' state... but I can upload it to GITHUB so other people might make use of it.
Like many things nowadays... there is conflicting information and multiple ways to make these files so as I read up on it... I get more confused than informed.
Obviously, I have only entered some common KEYWORDS I use and not bothered to "handle" values inside PARENTTHESIS yet... and it might stay that way since I am so bad at REGEX coding.
Github Link
Like many things nowadays... there is conflicting information and multiple ways to make these files so as I read up on it... I get more confused than informed.
Obviously, I have only entered some common KEYWORDS I use and not bothered to "handle" values inside PARENTTHESIS yet... and it might stay that way since I am so bad at REGEX coding.
Github Link