SV Racer -- Editing Levels

About

  • Intro

  • Controls

  • Goals

  • Navigation

  • Editing Levels

  • License

  • Missions are described as text files. You can edit these text files to change the levels, or create your own levels and insert them into the game. To find the level descriptions, right-click or control-click on the SV Racer icon, and choose "Show Package Contents":

    Then, in the folder that appears, navigate to the Resources folder, where you'll find the level descriptions:

    We'll use Mission 1 (level1.txt) as a starting point for understanding the level file format. It begins with the line:

    9 30
    
    Each level begins with two numbers followed by a level description. These numbers indicate the number of lines in the level description, and the maximum number of characters per line. In this case, the description is 9 lines long, and each line has at most 30 characters. The number of characters also determines the size of the text.
    Mission 1
    we'll start easy; just fly
    through way-gates as they are
    activated.
    take this chance to get used
    to your weapon and control
    systems.
    make sure you move out of the
    way after dropping a mine.
    
    Each line in the description will be centered, unless it is space-justified in the mission file. Text will be converted to the all-caps font, so capitilzation doesn't matter. Not every character is defined in the internal font. Unknown characters will be replaced with blank spaces.
    Goal
    
    Each level has any number of goals which you most pass or overcome. Objects designated as goals are proceeded by the world Goal. (This is case sensitive.) Goals must be passed in the order they are found in the level description.
    WayGate
    0 0 10 0 0 0 1.5 8
    
    The waygate is the most basic world structure. When it is a goal, it will have animated green lines inside it. When a goal is passed, the next goal in the level is activated.

    In this level you must simply pass through 5 consecutive way gates. The parameters listed after the waygate are described below.

    Goal
    WayGate
    0 0 40 0 0 0 1.5 8
    Goal
    WayGate
    0 0 70 0 0 0 1.5 8
    Goal
    WayGate
    0 0 100 0 0 0 1.5 8
    Goal
    WayGate
    0 0 130 0 0 0 1.5 8
    
    Besides goal objects, other objects can be placed in the world. Stars and Music are both special-effect objects, that you do not interact with while playing the game.
    Stars
    0 0 65 6000
    Music
    99 16 4 48 4 0 30 50 30 0 30 45 30 0 30 47 30 0 30 49 30
    
    Yes, the music for each level is contained in the level description. If you turn off music in the game, this is the music it will mute. All other sounds created in the game are muted when you turn off sound.

    When you begin a new level, your ship is at (0, 0, 0). The negative x-axis is on your right, and the positive x-axis is on your left. You are looking down the positive z-axis, and the positive y-axis is above you.

    Here is a description of all possible world objects. Parameters have either a subscript f for a floating point number (eg 1.35 or -0.123) or d for a decimal number (eg 37 or -24).


    GateKeyGoal: noParams: xf yf zf radiusf timef startd
    descriptionThe first three arguments (x, y, z) are the location of the gatekey. Radius is the size of the gatekey. Time is how long the gate key will hold its respective waygate open or closed. Start is either 1 or 0. When it is 1, hitting/shooting the gate key will open its way gate. When it is 0, any object hitting/shooting the gate key will close the way gate.

    A gate key must be defined after a way gate - each gate key is associated with the last way gate defined.

    example
    GateKey
    0 1.25 10 .25 1.25 1
    
    Place a gate key at (0, 1.25, 10), radius .25. They gate key will keep the way gate locked until it is hit, when it will hold it open for 1.25 seconds.

    HomingMineGoal: yesParams: xf yf zf
    descriptionThe three parameters are the (x, y, z) location of the homing mine. A homing mine will activate when your ship gets within 10 units of the mine. A homing mine that is a goal object will be inert and immune to damage until it is activated by the previous goal. When activated as a goal, a homing mine will immediately start tracking after your ship.
    example
    HomingMine
    0.0 1.0 3.14
    
    Place a homing mine at (0.0, 1.0, 3.14).

    MineGoal: yesParams: xf yf zf
    descriptionThe three parameters are the (x, y, z) location of the mine. A mine that is a goal object will be inert and immune to damage until it is activated by the previous goal.
    example
    Mine
    1.0 1.0 -2.5
    
    Place a mine at (1.0, 1.0, -2.5).

    MusicGoal: noParams: Instrd NumNotesd Styled Repeat2d Repeat1d (Noted Durationd ...)
    description Instr is the general midi instrument number to use. 0 is Grand Piano

    NumNotes is the number of note entries. This is generally twice the number of actual notes in the melody, as each note also needs a duration

    Style is the style used to play the melody:

    0 - Play Once

    1 - Repeat; parameter Repeat1 is # of times to repeat. Repeat2 is ignored.

    2 - Repeat and raise pitch; parameter Repeat1 is # of times to repeat. Repeat2 is # of times to repeat before rising.

    3 - Repeat and increase speed; parameter Repeat1 is # of times to repeat. Repeat2 is ignored.

    4 - Repeat and raise both pitch and speed; parameter Repeat1 is # of times to repeat. Repeat2 is # of times to repeat before rising.

    5 - Repeat and decrease speed; parameter Repeat1 is # of times to repeat. Repeat2 is ignored.

    6 - Repeat raising pitch and decreasing speed; parameter Repeat1 is # of times to repeat. Repeat2 is # of times to repeat before rising.

    Repeat1/Repeat2 are described above.

    Notes This contains NumNotes entries, grouped as pairs. The first value is the pitch of the note to play, where 60 is middle C. The duration is in 60ths of a second. So a duration of 120 means play the note for 2 seconds. If you want to insert a rest use a pitch of 0.

    example
    Music
    99 16 4 48 4 0 30 50 30 0 30 45 30 0 30 47 30 0 30 49 30
    
    Play instrument 99 (General MIDI instrument number)

    There are 16 parts to the music description.

    Play style 4 -- rise repeating

    play 4 times before rising, 48 times total.

    The notes each have a duration of 1/2 a second, and are followed by 1/2 a second of silence.


    StarsGoal: noParams: xf yf zf countd
    descriptionThe first values are the (x, y, z) location where the stars are cenetered. 8*count stars will be drawn in a cube radius 100 around this point.
    example
    Stars
    0 0 65 6000
    
    Draw 8*6000 = 24000 stars centered at (0, 0, 65). They will be spread from (-100, -100, -35) to (100, 100, 165).

    TurretGoal: noParams: xf yf zf ratef speedf typed radiusf
    description (x, y, z) is the turret location.
    Rate is the number of seconds between shots.
    shotSpeed is how fast the bullets of a bullet turret will shoot, or the number of mines that a mine turret will deploy.
    type is the type of turret - 1 for for bullets, 0 for mines.
    radius is the activation radius. Once you enter this radius of the turret it will begin to fire at you, unless it is a active goal, in which case it will start firing immediately.

    Only mine turrets should be active goals. Mine turrets will not deploy the next mine until the first one is destroyed.

    example
    Turret
    0 25 10 19.9 15 1 28
    
    Create a turret at (0, 25, 10) that shoots a bullet every 19.9 seconds at speed 15. Turret will activate when you are within radius 28 of the turret.
    Turret
    10 25 0 2.1 10 0 25
    
    Create a turret at (10, 25, 0) that will shoot up to 10 mines, one every 2.1 seconds. Turret is activated when you are within radius 25 of the turret.

    WayGateGoal: yesParams: xf yf zf rotxf rotyf rotzf radiusf resolutiond
    description (x, y, z) is the way gate location
    rotx, roty, rotz are the respective rotations of the waygate around each of the x, y and z axis.
    radius is the radius of the way gate
    resolution is the number of segments used to draw the way gate.
    example
    WayGate
    0.00 32.73 33.78 -108.00 0.00 0.00 1 8
    
    Create a waygate at (0.00, 32.73, 33.78), rotated -108 degress on the x-axis. The waygate will have a radius of 1, and will be drawn as 8 segments. (Unless you are in high-resolution mode.)

     

     

     

    SV Racer ©2004 NS Software