Поиск по STEAMB

Игры и программы по онлайну, скины по объёму продаж

Ничего не найдено

Попробуйте другое название или переключите категорию.

Меню

Библиотеки

Syla's Resource Pack Library

Положительные голоса94%752 голосов игроков
Подписчики668,9 тыс.668 903 в Steam Workshop
Размер файла21,71 КБЗагрузка через Steam
Обновление автора17 июн. 2024 г.Дата обновления материала
Изображение 1 из 1
Установить через Steam

О материале

«Syla's Resource Pack Library» — материал мастерской tModLoader. Моды Terraria для tModLoader: новый контент, удобство игры и библиотеки. Для установки откройте оригинал в Steam Workshop, проверьте требования автора и подпишитесь. Совместимость с версией игры редакцией не проверена.

Описание автора

Allows for the replacement of textures from Asset and Texture2D objects with resource packs.

How to make a resource pack for a mod that supports this:

  1. Instead of a Content folder, use a ModContent folder.
  2. Inside of this folder, follow the mod's folder layout.
  3. Put your replacement textures in the same place in your resource pack.

Ex: replacing "S_Panel_Middle.png" in my Summoner UI mod. The file path for the file in the mod is: SummonsUI/UI/S_Panel_Middle.png Put your file at: YourResourcePackNameHere/ModContent/SummonsUI/UI/S_Panel_Middle.png

How to make your mod support this:

  1. Add "modReferences = SylaResourcePackLib@#.#" without the quotation marks, and the #'s being this mod's version number to your build.txt file (if you already have modReferences, add ", SylaResourcePackLib@#.#" instead, still without quotation marks and with replacing the #'s).
  2. In your mod, add a new class that inherits from the ResourceLoader abstract class. Name it something you will remember, like "YourModNameHereRL".
  3. Add "using SylaResourcePackLib;" and "using SylaResourcePackLib.ResourceTypes;" to the top of the new class's file.
  4. Add public static assets, and make them either ModifiableAsset (where T is the type you usually use in Asset) or ModifiableTexture2D. For example: "public static ModifiableAsset UIFFill;"
  5. Add public override void methods for InitializeResources(), ReloadResources(), PostSetupContentResources(), and Unload() to the new class.
  6. In InitializeResources(), initialize each asset. You can find the constructors by extracting the mod (source code is included). Here's an example from my Summoner UI mod: "UIFFill = new ModifiableAsset("SummonsUI/UI/Summon_Fill", mode: AssetRequestMode.ImmediateLoad);"
  7. In PostSetupContentResources(), replace assets handled by TextureAssets as follows: "TextureAssets.Item[ModContent.ItemType<Items.YourItem>()] = YourItemAsset.asset;"
  8. In ReloadResources(), run the Reload() method on each asset. For example: "UIFFill.Reload();"
  9. Also in ReloadResources(), if the asset is for an asset handled by TextureAssets, put this on the next line: "TextureAssets.Item[ModContent.ItemType<Items.YourItem>()] = YourItemAsset.asset;"
  10. In Unload(), set each asset to null.
  11. In your Mod class in Load(), add "new YourModNameHereRL();"
  12. Whenever you need to access your modifiable assets, instead of using the object name (ex: "UIFFill"), you need to use "YourModNameHereRL.UIFBack.asset" (if you're using something other than ModifiableAsset, it won't be ".asset". It will instead be the same type as you were using before, ex: ".texture2D").

Future plans for this:

  • Add the ability to allow modders to read .json files from resource packs.
  • Figure out how to test when the resource pack menu is closed so that everything can be reloaded then instead of on world/mod load.

Developed By Tetriscat66 (Syla)

Оригинал в Steam Workshop

Как установить и запустить

Откройте оригинальную страницу в Steam Workshop, проверьте версию игры, зависимости и порядок загрузки в описании автора. Нажмите «Подписаться» и дождитесь загрузки Steam. Включите материал в меню модификаций или контента игры, если это требуется. Совместимость и запуск редакцией не проверены.

Настройки cookies

Вы можете изменить выбор в любой момент. Отказ от аналитики не ограничивает доступ к сайту.

Технологии, провайдеры и сроки хранения