Converting TMXL mods to CP

From The Stardew Modding Wiki
Jump to navigation Jump to search

From TMXL Map Toolkit to Content Patcher (WIP)[edit | edit source | hide | hide all]

This is a guide that should help you convert mods that use TMXL to Content Patcher. It is a work in progress. Made by Kamalei.

What you need[edit | edit source | hide]

  • Notepad++
  • Tiled

What you first have to do![edit | edit source | hide]

Some mod authors use the .tbin extension instead of .tmx, so it will be handy to enable this in Tiled.

  1. Open Tiled
  2. At the top left, click Edit
  3. Click Preferences..
  4. A window will pop up, click Plugins
  5. You should see a list of plugins. Enable the checkbox with tbin.dll
  6. Click close
  7. Done!

Converting the Stuff[edit | edit source | hide]

Now, there are mods that use TMXL to load in festival positions for their NPCs. Also spouserooms, maps and warps. We are going to convert this to CP.

Converting a TMXL Spouseroom[edit | edit source | hide]

The folder the NPC's spouseroom is in, may have other maps (.TMX or .TBIN files) in it. The only necessary files for the spouseroom are the NPCNameSpouseRoom (which either ends with .tmx or .tbin) and the sproomsts.png. NPCNameSpouseRoom is just an example, a different example is Eugene. His spouseroom map is called EugeneSpouseRoom.tmx.

  1. First, go to the [CP] NPC Mod folder.
  2. Open the assets and then Maps folder. Almost all mods have either of those. It's fine as long as you're in a Maps folder. If there is none, create a Maps folder in either the assets folder or the [CP] NPC Mod folder itself.
  3. Take the NPCNameSpouseRoom (.tbin or .tmx, if there's both, take both) and sproomsts.png from the [TMXL] NPC Mod folder.
  4. Cut and paste these in the Maps folder in [CP] NPC Mod folder.
  5. Open the content.json that is inside the [CP] NPC Mod folder. Now, you must know that every { ends with }, let's call this a block. This also applies with [ and ]. You will see a "Changes": [, which the next step has to be inside in. But please remember, what you are about to put in, should not be inside a different {} block.
  6. Take the code below and put it inside the part where it says "Changes": [. Let's say the name of the NPC is Ronin. See the code below.
  7. Where it says only "Ronin", rename it to the name of the NPC.
  8. Where it says in two places "RoninSpouseRoom", rename it to the filename of the spouseroom map.
  9. Where it says "assets/Maps/Template:TargetWithoutPath.tmx", if the spouseroom map does not end with .tmx, change it to .tbin
   {
       "Action": "EditData",
       "Target": "Data/SpouseRooms",
       "Entries":
       {
           "Ronin": "RoninSpouseRoom/0",
       }
   },
   // Load SpouseRoom Map
   {
       "Action": "Load",
       "Target": "Maps/RoninSpouseRoom",
       "FromFile": "assets/Maps/{{ Template:TargetWithoutPath.tmx }}"
},