Tickets

Bald ist es soweit: Unsere nächste Leitstellenfahrt findet statt. Weitere Informationen findet ihr hier.

  • In OMSI, tickets are defined in a file, a ticket pack. Here you will find explanations of how this file is structured.

    1. Introduction

    Tickets, also called TicketPacks in OMSI, are, as in reality, a proof that a passenger has paid for his journey. They are defined via .otp files. These are located in OMSI 2\TicketPacks\[Additional folder with name of ticket pack]\[Name].otp.

    2. structure of  .otp-files

    2.1. Passenger voices

    In order for passengers to speak, a voice path must be specified. This is usually at the beginning of such a file and looks like this:

    Code
    [voicepath]
    <Path of the folder where the voices are located. Starting with the folder TicketPacks>

    2.2. Definition of the Ticketpack

    First, the conditions that generally apply to the ticket pack are defined in the file. This section should be at the beginning of such a file and only occurs once.


    1. [ticketpack]
    2. Probability of a ticket being cancelled
    3. Probability of a ticket purchase
    4. Probability of passengers talking (greeting, ticketing)
    5. Probability that passengers complain (in case of bad driving behaviour, accidents)


    Only values from 0 to 1 (decimal numbers with one point (0.4)) are allowed for probability values.


    [ticketpack] tells the application that from there on the 4 lines with the definition of the TicketPack follow. It must necessarily stand alone in the line, no tabs or spaces are allowed before or after the keyword.

    2.2.1. Probability of invalidation

    This defines the probability that a passenger will validate his or her previously purchased ticket at a validation point.

    2.2.2. Probability of a ticket purchase

    Now follows the probability of selling a ticket to the passenger.

    2.2.3. Probability of passengers talking

    This determines how much a passenger talks. This includes, for example, "Hello", "Good evening", "A short distance, please." etc. However, this probability does not set the probability of complaining (see 2.2.4.).

    2.2.4. Probability of passengers complaining

    Finally, the probability of complaining is set. This includes "Well, are we Michael Schumacher again today?", "Can I please get off, I don't like your driving style at all!" and "Has he won his driving licence, or what?".

    2.3. Definition of Tickets - Option 1

    Now comes the section where the individual tickets are defined. These can exist several times, as there can also be several tickets.


    1. [ticket]
    2. Name of the ticket
    3. Name of the ticket in English
    4. Minimum age for the ticket
    5. Maximum age for the ticket
    6. Maximum number of stops allowed
    7. Ticket price
    8. Display on the ticket printer


    [ticket] introduces a ticket definition. It must be placed alone in the line and no tabs or spaces are allowed before or after the keyword.

    2.3.1. Name of the ticket

    The first step is to define the name of the ticket, usually in the language of the country. This name will be displayed in the information line when selling tickets, if you have set German as the language.

    2.3.2. Name of the ticket in English

    Now follows the name of the ticket in English. This is displayed in the information line during ticket sales if you have selected a language other than German.

    2.3.3. maximum number of stops allowed

    Here you define the maximum number of stops that may be passed with this ticket. If 0 (zero) is entered, passengers can travel over as many stops as they wish with this ticket.

    2.3.4. Minimum age for the ticket

    Now you define the minimum age you have to be for a ticket. For example, for a ticket called "short distance adult" a value of 18 would be recommended.

    2.3.5. Maximum age for the ticket

    In order to prevent a 50 year old person from buying a child short distance ticket, the maximum age for the ticket is set here. A value of 14 would be suitable for a "short-haul children's ticket".

    2.3.6. Ticket price

    Next is the price of the ticket. Please note that commas (1,20 Euro) must always be indicated with a dot (.), i.e. 1.20.

    2.3.7. Display on the ticket printer

    The last step is to determine what should be displayed on the ticket printer as the ticket name. Ideally, the same name should be entered here as in the item "Ticket nme in national language".

    2.4. Definition of tickets - option 2

    There is an extended possibility to define tickets. This is introduced by the keyword [ticket_2] and reads in 2 more lines from the end:

    1. [ticket_2]
    2. Name of the ticket
    3. Name of the ticket in English
    4. Minimum age for the ticket
    5. Maximum age for the ticket
    6. Maximum allowed stops
    7. Ticket price
    8. Display on ticket printer
    9. Day ticket characteristics
    10. Probability of ticket purchase

    2.4.1. Day ticket characteristics

    Depending on the type of ticket, 2 digits can be entered:

    • = Normal ticket
    • 1 = Day ticket

    2.4.2. probability of ticket purchase

    Values from 0 to 1 are possible here (also e.g. 0.35). This determines the highest probability. If a 1 was entered one line before (= day ticket), the value (again the example: 0.35) increases linearly from 0:00 to 9:00.

    51103-pasted-from-clipboard-png

    3. comments in the file

    In the file, comments can be written before and after keywords (and the corresponding strings). If OMSI recognises a certain keyword in a line, it reads in a mostly fixed number of further lines. What is written in previous or further lines does not matter.

    4. appendix

    In the appendix you will find an example file. Starting from the OMSI main directory in the TicketPacks folder, you will find further examples.


Teilen

CC BY-SA 4.0

Sämtliche Inhalte unseres OMSI-Wiki sind unter Creative Commons Namensnennung & Weitergabe unter gleichen Bedingungen (CC BY-SA 4.0) lizensiert.