rvglue examples

These are some examples on the "description" or "command" files for rvglue.

The options used in here are descibed in the Options Reference.

Back to index

Example 1: Copying files

The following description file tells rvglue just to rename the body of the editor's track 'USER018' to 'NHood1':


create( nhood1 )
user018.w

Example 2: Re-coloring blue walls

Same as previous except that the ugly blue walls of the track pieces are now colored bright red, which is annoying, too.


create( nhood1 )
user018.w( tecolor(ff8080) )

Example 3: Making whole track muddy

This makes the whole track muddy (Slippery surfaces and brown car tracks):


create( nhood1 )
user018.w( surface(mud) )
    

Example 4: Merging instances into track

Since our track features an enormous bridge we built using some instances and the in-game editor, we want to have that bridge in the track's body.


create( nhood1 )
user018.w
myinsts.fin
    

Example 5: Red Walls, Muddy instances

Since we are somewhat drunk and think that the steel bridge should feel muddy, we do the recoloring and make the bridge-body instance 'brbody' muddy:


create( nhood1 )

user018.w(
  tecolor(ff8080)
)

myinsts.fin(
  brbody( surface(mud) )
)
    

Example 6: Multiple instance sources

Since there are two steel bridges, the first intended to be muddy and the second invisible, we saved them to two different .fin files.


create( nhood1 )

user018.w
  (
    tecolor(ff8080)
  )

bridge1.fin (
  brbody( surface(mud) )
)

bridge2.fin (
  brbody( invisible )
)    

Example 7: Using comments

Since the file becomes larger and we want it to be more easy to read, we insert some comments. The hashmark '#' is used for one-line comments, while the square brackets '[...]' may span multiple lines.

# Editor directory: NHood1
create( nhood1 )

# Track editor's track:
user018.w
  (
    tecolor(ff8080)
  )

[ The first bridge just behind the ten-corner
  tunnel everybody will hate: ]
bridge1.fin
  (
    brbody( surface(mud) )
  )

[ The second bridge, my very funny invisible
  shortcut nobody will find except myself: ]
bridge2.fin
  (
    brbody( invisible )
  )    

Example 8: Using global instance parameters

We used the 'carpet' instance on both bridges, and want it to be slippery on both bridges, but hate to type the same command twice, so we use the 'global' section:


# Editor directory: NHood1
create( nhood1 )

global (
  carpet( surface(slippery) ) # Carpet is alway slippery!
)

# Track editor's track:
user018.w
  (
    tecolor(ff8080)
  )

[ The first bridge just behind the ten-corner
  tunnel everybody will hate: ]
bridge1.fin
  (
    brbody( surface(mud) )
  )

[ The second bridge, my very funny invisible
  shortcut nobody will find except myself: ]
bridge2.fin
  (
    brbody( invisible )
  )    

Example 9: Using the 'default' option set

Since a friend sent us some better bridge-body instances than the simple 'brbody' we used before, we rebuild the bridges. But now we would have to write twenty lines, one for every bridge part. The 'default' group is a better place for that:


# Editor directory: NHood1
create( nhood1 )

global
  (
    carpet( surface(slippery) ) # Carpet is alway slippery!
  )

# Track editor's track:
user018.w
  (
    tecolor(ff8080)
  )

[ The first bridge just behind the ten-corner
  tunnel everybody will hate: ]
bridge1.fin
  (
    [ This makes everything muddy except 'carpet', which has
      is personal entry in the 'global' section: ]
    default( surface(mud) )
  )

[ The second bridge, my very funny invisible
  shortcut nobody will find except myself: ]
bridge2.fin
  (
    default( invisible )
  )    

Example 10: Deleting track editor objects

Since the lamps at the ceiling and the boxes in the room's corner are ugly we decide to cut them out:


# Editor directory: NHood1
create( nhood1 )

global
  (
    carpet( surface(slippery) ) # Carpet is alway slippery!
  )

# Track editor's track:
user018.w
  (
    tecolor(ff8080)
    tedelete ( lamp box )
  )

[ The first bridge ]
bridge1.fin
  (
    default( surface(mud) )
  )

[ The second bridge ]
bridge2.fin
  (
    default( invisible )
  )