TMXL Map Toolkit

TMXL Map Toolkit | Stardew Valley

by Dona

TMXL Map Toolkit for adding, editing, and replacing maps, as well as creating buildables. (Previously known as TMXLoader.)

Creator: Platonymous

TMXL Map Toolkit

TMXL Map Toolkit
nowmods information

Nowmods requirements

Mod nameNotes
PyTK Platonymous Toolkit
SMAPI – Stardew Modding API

Mods requiring this file

Mod nameNotes
Garden Village Expansion Modrequired
Lunna Astray Modrequired
Stardew Valley Expanded(Framework Mod) This mod loads the custom maps
Always Raining ModLoads Spouse Rooms

Credits and distribution rights

  • Assets of other users: All of the assets in this file are either the author’s or free-to-use modder’s TMXL Map Toolkit resources.
  • Upload authorization: Under no circumstances are you permitted to upload this TMXL Map Toolkit file to other websites.
  • Permission to modify: You must obtain my permission before modifying my TMXL Map Toolkit files in order to improve them.
  • Permission to convert: Under no circumstances are you permitted to convert this file for use in other games.
  • Permission to use assets: You must obtain my permission before using any of the assets in this TMXL Map Toolkit file.
  • Asset use permission in purchased mods/files: You are not permitted to use assets from this file in any mods or files that are sold for a fee on Steam Workshop or other platforms.
  • Permission to use assets in mods/files that earn donation points: If your mods use my assets, you must obtain permission to earn Donation Points.

Notes from the Author
This author has made no additional notes about TMXL Map Toolkit file permissions.

Credits should be filed
Both of the examples included are ports of Mods by UlithiumDragon.

Version 1.15.4
Some changes that should help with Android

Version 1.9.0
Reworked Buildables

Version 1.8.8
Buildables Indoors can use Colors & Variables in properties

Version 1.8.6
Fixes Buildables not beieng removed on custom maps

Version 1.8.5
Fixes merges that were broken in 1.8.4

Version 1.8.4
Allows Image Layers on Buildables, clears area before building, adds coloring options if the buildables was set up for it.

Version 1.8.2
Fix for buildables in multiplayer

DESCRIPTIONS

Previously known as TMXLoader. TMXL Map Toolkit has been renamed the pure. The tmx-file-loading component of this mod is now included in SMAPI (3.2+).

Image Layers for Buildables

To use Image layers, their names must end with “UNIQUEID,” such as “MyLayer-UNIQUEID,” except on indoor maps.
Buildables Coloring
To enable coloring, the Image Layer must have two properties: “Color,” which holds a default RGBA value such as “255 255 255 255” for white, and “ColorId,” which can be anything. Layers with the same “ColorId” property will be colored in the same way.

Buildables

By pressing F2, you can build or remove buildables (can be changed in the config file)
To remove the last Buildable from the map, press BACKSPACE while the menu is open.

"buildables": [
{
"id":"Platonymous.Buildable",
"name": "Buildable",
"file": "assets/Buildable.tmx",
"iconFile": "assets/icon.png",
"removeEmpty":false,
"price":10000,
"set:": "Others"
},
  ]

Buildings:
"buildables": [
{
"id":"Platonymous.SomeBuilding",
"name": "Some Building",
"file": "assets/SomeBuilding.tmx",
"indoorsFile":"assets/SomeBuildingInterior.tmx",
"exitTile":[1,3],
"iconFile": "assets/SomeIcon.png",
"removeEmpty":false,
"buildItems":[
{
"index":388,
"stack":100
},
{
"name":"Parsnip",
"stack":1
}
],
"price":10000
}
  ]

Setting festival spots for NPCs that don’t have one.

“festivalSpots”:
[
{
”name”: “Sandy”,
”map”: “Town-Fair”, 
”position”: [19, 35],
”direction”: 1
}
]

TMXL Map Toolkit

INSTALLATION

nowmods download

?Download TMXL Map Toolkit

Optional files:
? Jungle Temple and City Bus (Cut Content)Content Pack for TMX Loader, Maps by Ulithium Dragon
? Spouse Room TemplateTemplate for a Spouse Room. Example Map by HopeWasHere

How it works

(spoiler)

{
  “addMaps”: // New Maps
  [  
    {
      “name”: “JungleTempleExterior”, // Name of the new Location 
      “file”: “JungleTempleExterior.tmx”, // Filename inside the ContentPacks folder
    },
    …
  ],
  “mergeMaps”: // Replace parts of Maps
  [  
    {
      “name”: “Woods”, // Map to merge into
  “file”: “Woods.tmx”, 
  “sourceArea”: [0,0,12,12], // Area on your Map that you want to place (x, y, width, height)
  “position”: [0,0], // Position were the new Content should be placed on the map (x, y)
      “addWarps”:  // add Warps (“entryX entryY TargetLocation exitX exitY”)
      [
        “7 -1 JungleTempleExterior 14 34”,
      ….
      ],
     “removeWarps”:  // removes existing Warps (“entryX entryY TargetLocation exitX exitY”)
      [ 
        “7 -1 JungleTempleExterior 14 34”,
      ….
      ]
    },
   …
  ],
“replaceMaps”: // Fully replace Maps
  [  
   {
      “name”: “Woods”, // Map to replace
  “file”: “Woods.tmx”, 
    },
   …
  ],
  “onlyWarps”: // Only change Warps
   [
    {
      “name”: “BusStop”, 
      “addWarps”: [
        “12 8 CityBus 2 6”
      ]
    }
  ],
“scripts”:[“script.lua”]
}

Drawing more than just the standart layers:

Add the property Draw/DrawAbove or DrawBefore to the layer you want to see drawn in the game, the value needs to be the layer that is it drawn after/before, for exp. Back if you want another Back-Layer.

Added TileActions (1.0.1), used either in the Action or TouchAction Property.
And since 1.1.0 you can also use the map property “EntryAction” which will be triggered whenever the player enters the map.

  • Say YourText
    Same as Message used to work but without the ” “

    Say Dwarvish YourText
    Same as Say but shows the text in dwarvish if the player doesn’t have the translation guide.
  • SwitchLayers Layer1:Layer2
    Switches two layers, even layers that aren’t actually drawn.

    SwitchLayers 
    Layer1:Layer2:14:17
    Switches only the specified Tile between layers x:y
  • SwichLayers Layer1:Layer2:15:57
    Switches the specified Area between layers x1-x2:y1-y2
    SwitchLayers Actions can be combined by just writting them one after the other exp: 
    SwitchLayers Buildings:BuildingsOpen:4:6-9 Buildings:BuildingsOpen:9:5 Front:FrontOpen:4:6-9 AlwaysFront:AlwaysFrontOpen:4:6-9
  • Lock 1 380
    Invokes a TileAction if the Active object is of the specified index Lock amount index
    Requires further properties on the same tile:

Success Action triggered when using the right object in at least the right amount
Failure Action triggerd when using the wrong object or not enough
Default Action triggered when holding no object

(New in 1.1.0)
Lua YourFolderName YourFunction
Invokes a function from any of your lua scripts

Lua functions must take three paramters: location, tileposition & layerid

Lua Examples

pc = false
function startPC(location, tilepos, layer)
if pc then
Game1.playSound(“coin”)
TMX.getTile(location,”Front”,36, 12).TileIndex = 991
pc = false
else
Game1.playSound(“stardrop”)
TMX.getTile(location,”Front”,36, 12).TileIndex = 1153
pc = true
end
end

Furthermore, by adding the following properties to the same Tile, each Action (and TouchAction) can be made conditional:

Condition A condition that can be either an event condition (Event preconditions) or, if prefixed by PC, a player condition (but not mixed yet)
If the condition is not met, a fallback action is triggered (optional)

CatPerson, isMale, exhausted, hasGreenhouse, hasRustyKey, hasSkullKey, hasUnlockedSkullDoor, hasDarkTalisman, hasMagicInk, running, usingTool, usingSlingshot, bathingClothes, stardewHero, hasClubCard, canUnderstandDwarves are currently supported player conditions.

Conditions and the Participant

Conditions can be inverted by prefixing them with NOT.

Actions are still limited, but they will be expanded. If you require a specific TileAction, please contact me on the SMAPI Discord (@Routine).

SMAPI Mods can add their own Tileactions using PyTK:

using PyTK.Types;
TileAction Say = new TileAction(“Say”, sayAction).register();

Known Bugs

The Draw/DrawBefore/DrawAbove commands do not always work with the Front layer.

SMAPI warns that uninstalling this mod “may corrupt your save files or render them unusable.”
This is due to the fact that TMXL Map Toolkit accesses properties that COULD be used to change the serializer in this manner, but does not do so.
So, contrary to what the warning implies, your save files will not be corrupted or rendered unusable as a result of using or uninstalling this TMXL Map Toolkit mod.

Support creator

  • If you like this mods and want to support creator, you can do so via Paypal or on Patreon
  • If you have any questions you can usually find creator on the Stardew Valley Discord under the username Routine#8715

If you fond TMXL Map Toolkit really helpful or just searching for another Stardew Valley mods, check these out:
? Stardew Valley Anime mod
? Always Raining Mod
? Save editor

Related Posts

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x