TMXL地图工具包

创作者: Platonymous
已更新:2023-03-08 00:04:04
400KB

前置 MOD

使用 TMXL地图工具包 时将自动安装

关于此 MOD

用于添加/编辑/替换地图和创建可构建内容的工具包。(原名TMXLoader)。

TMXL Map Toolkit

by Platonymous

Formerly named TMXLoader. Renamed TMXL Map Toolkit as the pure .tmx-file-loading part of this mod is now part of SMAPI (3.2+)

New in 1.8.4

Image Layers for Buildables
To use Image layers their name has to end with "UNIQUEID" like "MyLayer-UNIQUEID", though not on indoor-maps.
Coloring for Buildables
To allow coloring, the Image Layer needs to have two properties: "Color" holding a default rgba value like "255 255 255 255" for white and a "ColorId" proptery which can be anything. All layers that share a "ColorId" property will be colored the same way.

New in 1.8.0:
Buildables:
Buildables can be build or removed by pressing F2 (can be changed in the config file)
To remove the last Buildable placed on the map press BACKSPACE while having the menu open.
Regular buildable Map edits:
"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
}
  ]

exitTile is the point where a player would warp to when exiting a building. to warp to that point use the Action or TouchAction ExitBuildable on the map or (with 1.8.8+) use BUILDINGLOCATION EXITXY in the Warp property, like "Warp" : "9 24 BUILDLOCATION EXITXY".
On the Buildable (exterior) every INDOORS or UNIQUEID used in properties will be replaced by the generated values. to warp to the interior use for exp:
Warp 14 3 INDOORS

New in 1.4.2:
Setting festival spots for NPCs that don't have one. 
Format festival spots:
"festivalSpots":
[
{
"name": "Sandy",
"map": "Town-Fair", 
"position": [19, 35],
"direction": 1
}
]


New in 1.4.0:
Added a simpler way to add spouse rooms using the Spouse Room Template that you find under optional files
if you create a mod with the template, do not include the towninterior.png file when releasing it.

Important change in Version 1.3.0:
TMXL now uses SMAPI ContentPacks, which means all packs go directly into the mod folder and the ContentPack for the two Examples has to be downloaded seperately (Optional Files).

Includes two examples both ports of UlithiumDragons Mods (Cut Content & Jungle Temple).

Additional Layers and new TileActions will also work in maps not imported with TMXL.



Json Structure of ContenPacks content.js:
Spoiler:  
Show

{
  "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"]
}
Additional Features:
Spoiler:  
Show


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:1-5:5-7
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
Spoiler:  
Show

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


Additionally every Action (and TouchAction) can be set conditional by adding the following properties to the same Tile:
Condition A condition either in the format of an event condition (Event preconditions) or if prefixed by PC a playerconditon (but not mixed yet)
FallbackAction triggered if the condition isn't met (optional)

Player conditions currently supported: catPerson , isMale , exhausted , hasGreenhouse , hasRustyKey , hasSkullKey , hasUnlockedSkullDoor , hasDarkTalisman , hasMagicInk , running , usingTool , usingSlingshot , bathingClothes , stardewHero , hasClubCard , canUnderstandDwarves

Conditions and PlayerConditions can be prefixed with NOT the invert them.


Actions are still very limited but will be expanded on. If you're in need of a specific TileAction you can suggest it to me on the SMAPI Discort (@Routine)

SMAPI Mods can add their own Tileactions using PyTK:
using PyTK.Types;
TileAction Say = new TileAction("Say", sayAction).register();



Known Bugs:

Draw/DrawBefore/DrawAbove doesn't always work with the Front layer.


Changed save serializer Warning
SMAPI warns that this mod "may corrupt your save files, or make them unusable if you uninstall" it.
This is because TMXL accesses properties that COULD be used to change the serializer in that way, but doesn't actually change it.
So despite what the warning says, your save files will not be corrupted or become unusable when using or uninstalling this mod.


If you have any questions you can usually find me on the Stardew Valley Discord under the username Routine#8715

If you like my mods and want to support me, you can do so via Paypal or on Patreon.

星露谷物语 的热门 MOD

探索适用于 星露谷物语 的最佳MOD,带来新功能、升级画面,以及令人兴奋的方式来改变您的游戏体验。

内容修补程序

Pathoschild2025-07-28 06:03:57

加载内容包,更改游戏的数据、图像和地图,而不替换XNB文件。

内容补丁

Pathoschild2025-10-26 17:17:30

加载内容包,这些内容包会更改游戏的数据、图像和地图,而不会替换 XNB 文件。

SMAPI-Stardew修改API

Pathoschild2025-07-15 09:52:47

Stardew Valley的mod加载器。

NPC地图位置

Bouhm2025-05-26 10:22:12

在地图上看到NPC和玩家,有一个可选的小地图。

CJB秘籍菜单

Pathoschild2025-07-28 06:19:19

一个简单的游戏作弊菜单,有很多作弊。

SpaceCore

spacechase02025-05-28 10:06:38

A framework mod used by some of my other mods.

星露谷扩建

FlashShifter2025-07-01 07:17:39

mod描述游戏中玩家扮演继承了爷爷农场的“Stardew valley”主角开阔和经营整座小牧场。 你继承了爷爷在星露谷的农场,但是你手头上只有最基础的农具和少许的金钱,你得靠此开始你的新生活。你能把这片杂草丛生的田地变成一个繁荣的家园吗?这很不容易,自从JOJA公司来到了小镇,以前的生活都变了。社区中心,这个曾经是小镇最活跃的地方,如今却是破烂不堪。但山谷里似乎充满了机会,只要你肯努力,就有可能把星露谷变得更繁荣。 开始游戏后,玩家可以通过捏人的方式创建自己所喜爱的角色。人物共有24种肤色,32

农场类型经理(FTM)

EscaMMC2025-07-22 13:55:17

农场类型管理器(FTM)是一个框架,允许其他模组在游戏中的任何地方生成对象和怪物,具有各种控制和自定义选项。

使用 Xmod 解锁 星露谷物语 的全部潜力 — 今天就探索这些顶级 MOD!