Skip to content

Edit Element Level

Dan Gerendasy edited this page Feb 9, 2017 · 4 revisions

Contents


What

A Level edit element is used to import a level into Ty. For more information on creating a custom level, refer to here.


Usage

A level element requires a few bits of information. It needs the relative path to the directory containing the level files and a unique name. It also requires language translations and a portal location.

  • The directory path is relative to the folder that the XML is placed in.
  • Do NOT use absolute paths when specifying the directory path.
<level directory="" name="">
  <translation>
    <english></english>
    <german></german>
    <spanish></spanish>
    <italian></italian>
    <french></french>
  </translation>

  <portal>
    <x></x>
    <y></y>
    <z></z>
  </portal>
</level>
Type Name Required Description Usage
attribute directory Yes The relative path to the custom map directory <level directory="MyCustomMap/" ...
attribute name Yes The name of the custom map <level name="My Custom Map" ...
element translation No Contains the map's translation ... <translation> ... </translation> ...
element english No The map's name English translation ... <english>My Custom Map</english> ...
element german No The map's name German translation ... <german>Meine kundenspezifische Karte</german> ...
element spanish No The map's name Spanish translation ... <spanish>Mi mapa personalizado</spanish> ...
element italian No The map's name Italian translation ... <italian>La mia mappa personalizzata</italian> ...
element french No The map's name French translation ... <french>Ma carte personnalisée</french> ...
element portal No The location of the map's portal in Rainbow Cliffs ... <portal> ... </portal> ...
element x No X Coordinate of portal position ... <x>1200.1</x> ...
element y No Y Coordinate of portal position ... <y>233.0</y> ...
element z No Z Coordinate of portal position ... <z>1313.533</z> ...

Example

Level Example

<root>
	<tymod name="Beyond the Black Stump Copy Map" version="1.0.0" tyversion="[,0]" authors="Dnawrkshp" description="Adds a custom map portal in between A Walk in the Park and Ship Rex.&#13;&#10;This is not a valid map and is disabled.">
		<!-- Add custom map from CustomMap0 directory. Path must be relative. -->
		<level directory="CustomMap0/" name="Beyond the Black Stump Copy">
			<!-- Name of map in each supported language -->
			<translation>
				<english>Custom Map EN</english>
				<spanish>Custom Map ESP</spanish>
				<german>Custom Map DE</german>
				<french>Custom Map FR</french>
				<italian>Custom Map IT</italian>
			</translation>

			<!-- Position of portal in Rainbow Cliffs -->
			<portal>
				<x>0</x>
				<y>2372</y>
				<z>12520</z>
			</portal>
		</level>
	</tymod>
</root>
  • The directory attribute points to a relative directory.

In the provided example, the level files contained in $(TyInstallationPath)/Mods/CustomMap0/ are copied, and renamed appropriately, to $(TyInstallationPath)/PC_External/. A portal is placed in Rainbow Cliffs at the coordinates (0, 2372, 12520).

Clone this wiki locally