Difference between revisions of "Listedit tool"

From VDrift
Jump to: navigation, search
 
Line 2: Line 2:
  
 
==list.txt format==
 
==list.txt format==
The list.txt file contains object definitions in sections, separated by a blank line. The lines of the object definition sections are formatted as follows:
+
The list.txt file contains object definitions in sections, separated by a blank line. A description of each field in the list.txt file can be found at the following location:
#vdrift object list file format v0.4
+
 
#0 model filename (no spaces allowed)
+
http://svn.vdrift.net/viewvc.cgi/trunk/listedit/format.txt?root=VDrift+Track+Editor&view=co
#1 texture filename (no spaces allowed)
+
 
#2 mipmap texture (1 for true, 0 for false)
 
#3 disable lighting (1 for true, 0 for false)
 
#4 is this a skybox? (1 for true, 0 for false)
 
#5 is this object a transparent blended texture? (1 for true, 0 for false)
 
#6 bumpiness wavelength - length in meters of a bump on a surface
 
#7 bumpiness amplitude - height in meters of a bump on a surface
 
#8 ignore
 
#9 collide-able (1 for true, 0 for false)
 
#10 friction coefficient for surface when driven on with non-treaded tires
 
#11 friction coefficient for surface when driven on with treaded tires
 
#12 rolling resistance coefficient
 
#13 rolling drag coefficient
 
 
The numbers next to each of the lines is important to the way the listedit program works.
 
The numbers next to each of the lines is important to the way the listedit program works.
  

Revision as of 19:08, 26 February 2009

Listedit is part of the Track editor tools that simplifies working on list.txt files. It is a command line style program.

list.txt format

The list.txt file contains object definitions in sections, separated by a blank line. A description of each field in the list.txt file can be found at the following location:

http://svn.vdrift.net/viewvc.cgi/trunk/listedit/format.txt?root=VDrift+Track+Editor&view=co

The numbers next to each of the lines is important to the way the listedit program works.

Commands

The basic commands are

  • load
  • save
  • ls
  • set
  • quit
  • addparam

Load, save, and quit are obvious. You can supply arguments to load and save to specify the file if you want. The ls and set commands work using the object list file format.

ls

The first argument to ls is the object property you want to search. For example, specify 1 if you want to search objects based on the texture filename. The second argument to ls is what you want to search for. You can use * and ? wildcards. For example, to find all of the objects that use a texture called sky*, you'd do:

ls 1 sky*

To find all of the objects that have the skybox property set to true (1), do:

ls 4 1

set

The set command is similar to ls. It allows you to both search for objects and set their properties in one step. The first two arguments to set are exactly the same as ls. The second two arguments the property you want to set on the objects that match your search. For example, say want to set the skybox property to true for all objects that have a texture starting with "sky"... you'd do:

set 1 sky* 4 1
Note: All of the objects will start with default properties.

addparam

This command takes 1 argument. This command will add one parameter to each object and is primarily used when upgrading a list.txt file from an old version (say, with 14 parameters per object) to a new version (say, with 15 parameters per object). The argument is the default value that all objects will start with for the new parameter.