Map XML editing

From Transformice Wiki
Jump to: navigation, search

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

Contents

[edit] Placing unavailable objects

[edit] XML Parts

[edit] C (CarteXML)

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

[edit] P (ParamXML)

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.

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.

Example <P G="0,10" C="" N="" A="" F="0" />


ID Description
Background Types
0 Daylight
1 Dawn
2 Twilight
3 Full Moon
4 Halloween
5 Christmas

[edit] Z (ZoneXML)

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

[edit] S (SolXML)

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

Visible map height is 400 and width is 800.


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 type (See table below). Only changes the look
P Ground properties array (See table below)


Ground types
Id Description
0 Wood
1 Ice
2 Trampoline
3 Lava
4 Chocolate
5 Earth
6 Grass
7 Sand
8 Cloud
9 Water
10 Stone
11 Snow 12 rectangle 13 circle


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

[edit] D (ObjetSourisXML)

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

[edit] O (ChamaneXML)

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

[edit] Some Default Values

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" />


[edit] Miscellaneous Info/Tips

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 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.

Missed Invalid Map
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox