Object Import
Uploads new objects to the set. There is no undo. Please be very careful when selecting target set. Mistake can damage lot of data and can be hard to undo.
If you upload new object of the same name and type to the set, old object is replaces by new upload. If more object of the same name are uploaded at once, result is undefined (one object will prevail). If you need to import Simutrans program base texts, please read additional information.
Field Description
- Upload Type - This field determines if images shall be uploaded or not. Image upload is extremely slow. If you have made only small changes to object properties, it makes no point to re-upload complete set of objects with images. In this case, you will upload only dat files and choose Dat Only - all existing images in the database will not be touched and they will be reconnected with newly uploaded objects of same name.
- Comment Mode - This switch lets you to select the verbosity of object parser.
In the verbose mode object reader displays all properties of read objects.
This can be useful when you have some uncertainties about the corretnes of dat files and need to check if the upload was correct.
Quite mode displays only the list of objects imported. This option is only very slightly faster.
Input File Specification
Inputfile: zipped(!) set of dat files and images. Zip archive will be searched and all found files ending with .dat will be analyzed. Be careful if you have backup files in your archive - while MakeObj analyzes only the single directory, SimuTranslator will process all found dat files - even those in subdirectories.
Translator is running on Linux machine, so file search is in general case sensitive. Therefore it is advisable to create your dat files so that the image references respect the case of image file paths. There is a workaround implemented for the case insensitive image file search if normal search fails, this however applies to the image file names only, not to the preceding directories.
Upload Process
(state from: 10-Feb-2006)
All objects definitions are read from dat files (including images - depending on the options) and stored into the database. By default old object is completely removed before new object is stored. Removal does not affect stored texts!
All attribute names are lowercased and trimmed from both sides during the import process.
Case of all attribute values is preserved, they are trimmed as well, excluding one case - when reading attribute type "name" for object type (obj attribute) "program_text", the name is not trimmed and treated as is (including extra spaces on both ends). Trimming is done when the dat file is read, so the attribute obj must be read (stored in the file) before the attribute name to ensure this behavior.
If you need to import Simutrans program base texts, please read additional information.