<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>https://tg.ss220.space/index.php?action=history&amp;feed=atom&amp;title=Map_Merger</id>
	<title>Map Merger - История изменений</title>
	<link rel="self" type="application/atom+xml" href="https://tg.ss220.space/index.php?action=history&amp;feed=atom&amp;title=Map_Merger"/>
	<link rel="alternate" type="text/html" href="https://tg.ss220.space/index.php?title=Map_Merger&amp;action=history"/>
	<updated>2026-06-04T00:36:50Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.39.1</generator>
	<entry>
		<id>https://tg.ss220.space/index.php?title=Map_Merger&amp;diff=72&amp;oldid=prev</id>
		<title>imported&gt;Cartographer-D: Added a note to the in-progress merges section to clarify what needs to be done for the bat file to work.</title>
		<link rel="alternate" type="text/html" href="https://tg.ss220.space/index.php?title=Map_Merger&amp;diff=72&amp;oldid=prev"/>
		<updated>2021-01-11T05:24:17Z</updated>

		<summary type="html">&lt;p&gt;Added a note to the in-progress merges section to clarify what needs to be done for the bat file to work.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;: [[Guide to contributing to the game]] &amp;gt; [[Guide to mapping]]&lt;br /&gt;
&lt;br /&gt;
/tg/station uses a tool called the &amp;#039;&amp;#039;&amp;#039;Map Merger&amp;#039;&amp;#039;&amp;#039; to make map changes easier for maintainers to review and less likely to conflict with map changes made by others.&lt;br /&gt;
&lt;br /&gt;
There are a few ways of running the tool. If you have trouble or need help, ask in [[Community|#coderbus]].&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Summary&amp;#039;&amp;#039;&amp;#039;: for best results, open the &amp;lt;code&amp;gt;tools/hooks/&amp;lt;/code&amp;gt; folder and double-click &amp;lt;code&amp;gt;Install.bat&amp;lt;/code&amp;gt; to install the hooks, which will handle things automatically.&lt;br /&gt;
&lt;br /&gt;
== TGM format conversion ==&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;map merge&amp;quot; operation describes the process of converting a map file written by the DreamMaker map editor to:&lt;br /&gt;
# Use a format more amenable to Git&amp;#039;s conflict resolution, called &amp;quot;TGM&amp;quot; and originally developed by Remie. The TGM map format is like the standard Dream Maker map format, but arranged differently, meaning Dream Maker is able to open TGM maps.&lt;br /&gt;
# Keep the size of the difference between the old version and the new version of the map as small as possible.&lt;br /&gt;
This is accomplished by referencing the changed version of the map against the old version stored in the Git history.&lt;br /&gt;
&lt;br /&gt;
=== Use as a Git hook (recommended) ===&lt;br /&gt;
&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;Install the hook&amp;#039;&amp;#039;&amp;#039;: Open the &amp;lt;code&amp;gt;tools/hooks/&amp;lt;/code&amp;gt; folder and double-click &amp;lt;code&amp;gt;Install.bat&amp;lt;/code&amp;gt;&lt;br /&gt;
#* Linux users: run &amp;lt;code&amp;gt;tools/hooks/install.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once complete, the map merger will run &amp;#039;&amp;#039;&amp;#039;automatically&amp;#039;&amp;#039;&amp;#039; every time you commit in Git. The console log can be reviewed if there are any errors.&lt;br /&gt;
&lt;br /&gt;
=== Or: Run manually before committing ===&lt;br /&gt;
&lt;br /&gt;
You can also manually run a .bat file just before each time you commit:&lt;br /&gt;
&lt;br /&gt;
# Ensure you have saved all your changes&lt;br /&gt;
# Open the &amp;lt;code&amp;gt;tools/mapmerge2/&amp;lt;/code&amp;gt; folder and double-click &amp;lt;code&amp;gt;Run Before Committing.bat&amp;lt;/code&amp;gt;&lt;br /&gt;
# Commit&lt;br /&gt;
&lt;br /&gt;
=== If you forgot to map merge ===&lt;br /&gt;
&lt;br /&gt;
For first-time contributors who committed map edits without map merging, a script is available to automatically commit a fix to your PR branch:&lt;br /&gt;
&lt;br /&gt;
# Ensure you have no unsaved changes&lt;br /&gt;
# Open the &amp;lt;code&amp;gt;tools/mapmerge2/&amp;lt;/code&amp;gt; folder and double-click &amp;lt;code&amp;gt;I Forgot To Map Merge.bat&amp;lt;/code&amp;gt;&lt;br /&gt;
# Push your branch&lt;br /&gt;
&lt;br /&gt;
== Automatic conflict resolver ==&lt;br /&gt;
&lt;br /&gt;
We also have a rudimentary conflict resolver to cover some cases that the TGM conversion couldn&amp;#039;t prevent.&lt;br /&gt;
&lt;br /&gt;
When run, the console output will indicate whether further manual action is needed, including conflicting coordinates.&lt;br /&gt;
&lt;br /&gt;
=== Use as a Git hook ===&lt;br /&gt;
&lt;br /&gt;
# &amp;#039;&amp;#039;&amp;#039;Install the hook&amp;#039;&amp;#039;&amp;#039;: Open the &amp;lt;code&amp;gt;tools/hooks/&amp;lt;/code&amp;gt; folder and double-click &amp;lt;code&amp;gt;Install.bat&amp;lt;/code&amp;gt;&lt;br /&gt;
#* Linux users: run &amp;lt;code&amp;gt;tools/hooks/install.sh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once complete, the conflict resolver will run &amp;#039;&amp;#039;&amp;#039;automatically&amp;#039;&amp;#039;&amp;#039; every time you merge in Git.&lt;br /&gt;
&lt;br /&gt;
=== Or: Resolve conflicts on an in-progress merge ===&lt;br /&gt;
&lt;br /&gt;
If you are using a Git GUI which does not run the hook on merge, you can also run the conflict resolver on an in-progress merge by request:&lt;br /&gt;
# Open the &amp;lt;code&amp;gt;tools/mapmerge2/&amp;lt;/code&amp;gt; folder and double-click &amp;lt;code&amp;gt;Resolve Map Conflicts.bat&amp;lt;/code&amp;gt;&lt;br /&gt;
#* Linux users: run &amp;lt;code&amp;gt;tools/hooks/dmm.merge --posthoc&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that to use this, you must merge your updated local master branch into the branch with conflicts so that your Git GUI reports a conflict on the map file.&lt;br /&gt;
== Implementation details ==&lt;br /&gt;
&lt;br /&gt;
Information on the tool&amp;#039;s implementation is stored with [https://github.com/tgstation/tgstation/blob/master/tools/mapmerge2/ the code].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Contribution guides}}&lt;/div&gt;</summary>
		<author><name>imported&gt;Cartographer-D</name></author>
	</entry>
</feed>