Code Monkey home page Code Monkey logo

20mtd-spritereplacer's Introduction

20MTD AssetReplacer

BepInEx plugin to replace assets in 20 Minutes Till Dawn.

Can currently replace:

  • Textures of Sprites
  • Audio

Usage

Thunderstore

  1. Install through Thunderstore
  2. Install any Asset-Mods based on AssetReplacer
  3. See Configuration

Manual

  1. Install BepInEx
  2. Add the plugin DLL to BepInEx\plugins
  3. Install any Asset-Mods based on AssetReplacer
    They should follow this structure:
20MinutesTillDawn
  |--BepInEx
      |--plugins
          |--YourModFolderName
              |--Textures
              |   |--Enemies
              |   |   |EyeMonster.png
              |   |   |T_TreeMonster.png
              |   |--Projectiles
              |       |T_GunFX.png
              |       |T_FireParticles.png
              |--Audio
                  |title.mp3
                  |battle.mp3

"Textures" and "Audio" may only contain files corresponding to the type. E.g. Textures should not contain any text files, only images.
Files in "Textures" and "Audio" may follow any structure. They may be located in subdirectories or directly contained in the folders.

  1. See Configuration

Configuration

Thunderstore

  1. Enable/Disable which assets to replace
  2. Add the Mods directory names to the proper ModFolders configuration comma seperated
    Thunderstore Format: ModCreator-Modname
    Example:
    [Textures]
    
    EnableTextureMods = true
    
    TextureModFolders = Zeprus-ExampleTextureMod,Zeprus-ExampleTextureMod2
    

Manual

  1. Add the Mods directory names to the proper ModFolders configuration comma seperated
    Format: ModfolderName
    Example:
    Mod folder is BepInEx/plugins/YourModFolderName
    [Textures]
    
    EnableTextureMods = true
    
    TextureModFolders = YourModFolderName
    

Setup

  1. Clone the repo
  2. Add libs to /lib:
    • Add all the DLLs from the game's Managed folder
    • Add all BepInEx DLLs
  3. Install any pre-requisite stuff (see BepInEx setup docs)
  4. Open in Visual Studio
  5. Build via Build » Build Solution
    • Compiled DLL will be in /bin/Debug

Create Asset-Mods

Thunderstore

  1. Create your Thunderstore package
  2. Create a "plugins" folder inside your package
  3. Create a folder inside plugins named after the asset type you want to replace (e.g. textures or audio)
  4. Place your replacement assets inside the proper subfolder following any structure
  5. (Optional) Write a BepInEx-Plugin that calls AssetReplacer.API.Register("Author-Modfoldername", AssetReplacer.API.AssetType.[Textures/Audio]) during its Awake() function and has AssetReplacer as dependency. See example plugin directory or this complete example.

Structure examples:

MyThunderStorePackage.zip
|(optional)BepInExPlugin.dll
|README.md
|icon.png
|manifest.json
|--Plugins
	|--Textures
	|	|--Enemies
	|	|	|EyeMonster.png
	|	|	|T_TreeMonster.png
	|	|
	|	|--Projectiles
	|		|T_GunFX.png
	|		|T_FireParticles.png
	|--Audio
		|title.mp3
		|battle.mp3
MyThunderStorePackage.zip
|(optional)BepInExPlugin.dll
|README.md
|icon.png
|manifest.json
|--Plugins
	|--Textures
	|	|EyeMonster.png
	|	|T_TreeMonster.png
	|	|T_GunFX.png
	|	|T_FireParticles.png
	|
	|--Audio
		|title.mp3

Links

Credits

Changelog

  • 20.2.0 added API for registering Modfolders programmatically
  • 20.1.0 Bugfixes for 20MTD v1.0 release, increased stability
  • 20.0.0 Thunderstore release

20mtd-spritereplacer's People

Contributors

dragoonx6 avatar ithinkandicode avatar zeprus avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

dragoonx6

20mtd-spritereplacer's Issues

Music bug

If the sound file is shorter than the original only the first x seconds are replaced with the custom sound. Afterwards it returns to playing the rest of the original.
If the sound file is longer than the original it'll cut off and loop after the original sounds length.

Dragon hatch animation is still red

The code responsible for hatching is inside SummonEgg.cs.

The flash is handled by FlashSprite.cs, which switches to a material during the flash

The material presumably being one of these:
unity-red-material

We might be able to change the color, since that's a visible setting in Unity. I don't know if that would impact other things though

This is no doubt part of a larger issue!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.