Fandom

Transformice Wiki

Map XML editing

747pages on
this wiki
Add New Page
Comments0 Share

It is possible to edit maps by editing Map XML (exporting, then editing and importing back).


XML Parts Edit

C (CarteXML)

The C (CarteXML) is a root element containing all information about the map.

P (ParamXML) Edit

Map Options
Property Values Description
G Wind: -500 to 500 and Gravity: -50 to 50 Two numbers. The first is for the wind and the second is gravity.

Negative wind blows to the left and positive to the right. Default gravity is 10, default wind is 0. If there is no G attribute in the P tag the gravity and wind are set to default.

DS Optional. Multiple mice spawns.

Using the optional DS tag it is possible to add multiple places where mice spawn. Syntax: DS="m;x1,y1,x2,y2" where x1 and y1 are the coordinates of the first spawn, x2 and y2 the second. More than two mice spawns is also possible.

H 0 to 800 Map Height.

Using H the height of the map can be set. If omitted, map height will be 400px. Values lower than 400 may cause problems.

L 0 to 1600 Map Length.

Using L the length of the map can be set. If omitted, map width will be 800px. Values lower than 800 may cause problems. Defilante maps have a maximum width of 4800 instead of 1600.

Ca Missing or not Offscreen Hiding Function

If the Ca attribute is in the P tag you won't be able to see anything outside the standard game area.

C Missing or not Collision.

If there is a C attribute in the P tag collisions between mice are turned on, otherwise they are turned off.

N Missing or not Nightmode.

If there is an N attribute in the P tag nightmode is turned on, otherwise it is turned off.

A Missing or not Soulmate.

If there is an A attribute in the P tag mice have a soulmate (there is a string that attaches mice together), otherwise they don't.

F See table below. Background.

A number from the list.

aie Missing or not Activates death on violent force for mice.
mc Missing or not This attribute make all map motors invisible but the motors will still be running with this attribute specified.
D,d image Path, x, y Adds a background image from transformice.com - this can be any event map or UI image.
Example <P G="0,10" C="" N="" A="" F="0" />
Background Types
ID Description
0 Daylight
1 Dawn
2 Twilight
3 Full Moon
4 Halloween
5 Christmas
6 Valentines'
7 Storm Clouds
8 Storm Clouds 2
ID Description

Note: The Valentines' background can only be added by editing the XML

Z (ZoneXML) Edit

Z (ZoneXML) contains information about in-game elements.

S (SolXML) Edit

S (SolXML) contains information about solid grounds used in map.

Visible map height is 400 and width is 800.

Ground properties can be separated into default properties and optional properties. The latter need to be added manually and cannot be added using the map editor.

Default properties
Property Description
L Length (Horizontal). 10 is min and 3000 is max
X The X coordinate (Horizontal) of the middle of the object
H Height (Vertical). 10 is min and 3000 max
Y The Y coordinate (Vertical) of the middle of the object
T Ground texture (See table below). Only changes the look
P Ground properties array (See table below)
Special properties
Property Description
m If m="" is added to a ground it will be invisible.
v The time in ms after which a ground is despawned.
o Set ground color (only works with rectangles or circles)
Ground textures
Id Description Notes
0 Wood -
1 Ice -
2 Trampoline -
3 Lava -
4 Chocolate -
5 Earth -
6 Grass -
7 Sand -
8 Cloud -
9 Water Cannot be dynamic or rotated.
10 Stone -
11 Snow -
12 Color Has no texture, but instead can be recolored.
13 Circle The only non-rectangle. Has no texture, but can be recolored.
14 Invisible Hidden from options, can only be added in XML editing
15 Web Sticky, covered with webs and can only be added in XML editing
Property array
# Property Values Description
1 Dynamic flag Boolean (0 or 1) Movable or Not
2 Mass Float Higher equals harder to move
3 Friction Float 0 for Ice or more to make it harder to run. Solid ground with invalid friction sends objects and mice to the top-left corner on impact. After anything hits the invalid-friction ground, gravity continues to increase until all mice fall through the floor.
4 Restitution Float Bounciness (1.2 is Trampoline and 20 is Lava)
5 Rotation Integer 360 Degree positive or negative
6 FixedRotation Boolean (0 or 1) When on it will keep whatever rotation was put for 5
7 LinearDamping Float The higher this is the slower a Dynamic ground will fall. 30 will stop if not touched and any higher makes no change
8 AngularDamping Float 0 means it will spin very easily after touched. 10 seems to be max in that it will only rotate as long as a Mouse is pushing on a side

D (ObjetSourisXML) Edit

D (ObjetSourisXML) contains information about start positions and vital objects.

 
Element French Origin Description
T Trou Mouse hole
F Fromage Cheese
DS Depart Souris Mouse spawn
DC Depart Chamane Shaman spawn
P Plante Plant
 
Property Description
Common
X The X coordinate (Horizontal) of the middle of the object
Y The Y coordinate (Vertical) of the middle of the object
Plant Specific
P Two numbers separated with a comma. The first is whether the plant is on background (0) or foreground (1), and the second is whether the plant is mirrored horizontally (1) or normal (0).
T Plant type (See table below)
Plant types
Id Description
0 Bush
1 Tree
2 Fern
3 Blue flower
4 Sign
5 Grass puff
6 Palm tree
7 Parasol
8 Sandcastle
9 Shovel
10 Bucket
11 Red flower
12 Thorns

O (ChamaneXML) Edit

O (ChamaneXML) contains information about shaman-spawnable objects on map.

Properties
Property Description
P Rotation value and Ghost flag
X The X coordinate (Horizontal) of the middle of the object
C Object type (Object types list)
Y The Y coordinate (Vertical) of the middle of the object

L (...) Edit

L contains information about hidden or drawn connections between grounds or coordinates on the map.

Some Default Values Edit

Properties
Normal Ground <S L="10" X="200" H="10" Y="200" T="0" P="0,0,0.3,0.2,0,0,0,0" />
Ice Ground (Light Purple) <S L="10" X="200" H="10" Y="200" T="1" P="0,0,0,0.2,0,0,0,0" />
Trampoline Ground (Dark Purple) <S L="10" X="200" H="10" Y="200" T="2" P="0,0,0,1.2,0,0,0,0" />
Lava Ground (Red) <S L="10" X="200" H="10" Y="200" T="3" P="0,0,0,20,0,0,0,0" />
Chocolate Ground (Dark) <S L="10" X="200" H="10" Y="200" T="4" P="0,0,20,0.2,0,0,0,0" />

Miscellaneous Info/Tips Edit

Properties
Description Example/Screenshot
The minimum space between objects for a mouse to be able to walk is 30. Y1 and H1 are from the higher object and Y2 and H2 are from the lower object.

( Y1 - ( H1 / 2 ) ) - ( Y2 + ( H2 /2 ) ) >= 30

<S L="340" X="170" H="10" Y="280" T="0" P="0,0,0,0,0,0,0,0" />

<S L="300" X="150" H="10" Y="240" T="0" P="0,0,0,0,0,0,0,0" />

When a fake balloon is added (Types 29-31) balloons cannot be attached to mice
Unattachable Balloons

Unattachable Ballon

Map is invalid but doesn't catch it

Click Reset to get the Load button back and start from scratch. Can happen if a value isn't correct or if there is an attribute missing (i.e. <O P="0" X="100" C="1" /> no Y)
Notice: It IS possible to load map without a load button by pressing Enter in map load editbox.

MissedInvalidMap

Missed Invalid Map

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.