Elvas Tower: Notepad+ - Elvas Tower

Jump to content

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Notepad+ Is there ready MSTS/ORTS syntax plugins? Rate Topic: -----

#16 User is offline   engmod 

  • Open Rails Developer
  • PipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 2,123
  • Joined: 26-February 08
  • Gender:Male
  • Location:Eltham, Victoria, Australia
  • Simulator:ORNYMG
  • Country:

Posted 18 February 2021 - 12:52 PM

From James Ross's site.

Silver's Simple Site - Weblog - Simis Jinx Unicode Text File Format
Simis Jinx Unicode Text File Format

This is one of the 2nd-level (inner) formats for the Simis file format used by Microsoft Train Simulator.

As I mentioned last time, the 1st-level (outermost) format has an adjusted header when working with this 2nd-level format; in particular, the file starts with a UTF16-LE byte order mark and the header itself is Unicode text encoded as UTF-16LE. Here it is again:

00000000 FF FE 53 00 49 00 4D 00 49 00 53 00 41 00 40 00 ÿþS.I.M.I.S.A.@.
00000010 40 00 40 00 40 00 40 00 40 00 40 00 40 00 40 00 @.@.@.@.@.@.@.@.
00000020 40 00 @.

The 2nd-level format identifies itself with its own header, unsurprisingly, starting with the text "JINX0", two values indicating the 3rd-level (inner inner) format, the text "t" indicating the Unicode text variety of this format, some padding (6 underscores) and a newline.

00000020 4A 00 49 00 4E 00 58 00 30 00 .. .. .. .. J.I.N.X.0.....
00000030 74 00 5F 00 5F 00 5F 00 5F 00 5F 00 5F 00 0D 00 t._._._._._._...
00000040 0A 00 ..

Those 4 missing bytes are the two characters (a letter then a number) that identify the 3rd-level format used. As text, the header of these files looks like the following line:

SIMISA@@@@@@@@@@JINX0..t______

Now follows the actual data...

Simis Jinx files all store data in a tree-like structure, where each tree node has a type and optional name, and is intermixed with values. In other words, each node's children can be both nodes and values, including a mixture. The structure is marked out by parentheses ("(" and ")") for blocks, with values being raw or quoted strings (generally speaking, any value with no whitespace and no significant symbols - quotes, parentheses - can be left unquoted). Let's get straight to an example from Microsoft Train Simulator, the file GLOBAL\gui.txt:

SIMISA@@@@@@@@@@JINX0I0t______

io_dev ( KEYB 0
io_map ( T "sounddialog" ALL_UP SHIFT_DOWN )
io_map ( ESCAPE "escape" ALL_UP )
io_map ( F1 "Help" ALL_UP )
)

The header has identified this as containing 3rd-level format "I0"; for now, though, let's focus on the 2nd-level format. There is a single root node of type "io_dev" (and it has no name) which contains:

The value "KEYB".
The value "0".
Three nodes of type "io_map", each containing a selection of values but no further nodes.

This is just a simple example, but the format is pretty easy to read (although a little tricky to parse correctly); the 3rd-level format actually defines which node types and what nesting of them is allowed and which values should be where.

Permalink | Author: Silver | Tags: Format, Games, Microsoft, Simis, Train Simulator | Posted: 04:48PM on Thursday, 22 April, 2010 | Comments: 0

#17 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 15,643
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 18 February 2021 - 12:55 PM

Derek, is there anything in that data that would be of any use to any of us? Looks like KUJU shortcut codes to me.

#18 User is offline   engmod 

  • Open Rails Developer
  • PipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 2,123
  • Joined: 26-February 08
  • Gender:Male
  • Location:Eltham, Victoria, Australia
  • Simulator:ORNYMG
  • Country:

Posted 18 February 2021 - 01:52 PM

I don't thing so, Dave.

#19 User is offline   pwillard 

  • Foreman Of Engines
  • Group: Posts: Contributing Member
  • Posts: 881
  • Joined: 03-March 08
  • Gender:Male
  • Location:Cumming, Ga
  • Simulator:OpenRails
  • Country:

Posted 18 February 2021 - 03:56 PM

This whole SIMIS header thing seems so arbitrary now.

#20 User is offline   Weter 

  • Member, Board of Directors
  • PipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 8,832
  • Joined: 01-June 20
  • Gender:Not Telling
  • Simulator:ORTS
  • Country:

Posted 18 February 2021 - 06:25 PM

It's Useful for understanding the law.
Thanks,Derek.

#21 User is offline   pwillard 

  • Foreman Of Engines
  • Group: Posts: Contributing Member
  • Posts: 881
  • Joined: 03-March 08
  • Gender:Male
  • Location:Cumming, Ga
  • Simulator:OpenRails
  • Country:

Posted 14 July 2021 - 03:54 PM

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" )

)

#22 User is offline   Weter 

  • Member, Board of Directors
  • PipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 8,832
  • Joined: 01-June 20
  • Gender:Not Telling
  • Simulator:ORTS
  • Country:

Posted 14 July 2021 - 06:08 PM

Quite nice.
May I know, where can we get it?

#23 User is offline   pwillard 

  • Foreman Of Engines
  • Group: Posts: Contributing Member
  • Posts: 881
  • Joined: 03-March 08
  • Gender:Male
  • Location:Cumming, Ga
  • Simulator:OpenRails
  • Country:

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









  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users