Code Monkey home page Code Monkey logo

modsets's Introduction

Mod Sets

Modrinth Downloads Modrinth Version Modrinth Game Versions

GitHub GitHub issues
Static Badge Discord

This project heavily inspired by ThatOrThis
The mod is using for Minecraft Fabric/Quilt/Forge for managing mod loading in game.
And useful for modpack developer

Feature

  • Enable/Disable mods in game with defined mod sets/subdirectory name/mod id(Need restart)
  • Using https://github.com/isXander/YetAnotherConfigLib for config screen
  • Custom mod loading rules for modpack developer to make the pack with more user defined options

Usage

The rules files should be json in config/modsets/rules.
Add rule and enter the config screen through Mod Menu
Full example: https://github.com/SettingDust/ModSets/blob/main/example_rules.json

Mod Set

Mod set is entry defined in config/modsets/modsets.json that is string to set of mod id map.
Specifically, sub folder name in mods folder will be mod sets the mods in it. And mod id will be the mod set only contains itself.
Notice, the defined mod sets by config will override the folder/mod id with the same name.
Example:

{
  // The `sodium` will target the two mods here. 
  // If disable this mod set, the mod in list won't load if it is exist
  "sodium": {
    "text": "Sodium",
    "description": "Performance: +++++",
    "mods": [
      "sodium",
      "indium"
    ]
  }
}

Rule

img_1.png Every rule hold a text and description for displaying the info you want.
And a controller for YACL user interface Example:

{
  "text": {
    "text": "My first rule set",
    "bold": true,
    "color": "green"
  },
  "description": "Awwww",
  "rules": [
    {
      "text": "text",
      "description": "description",
      "controller": {
        "type": "type" // Notice, this isn't valid type of controller. Take the type from controllers below
      }
    }
  ]
}

Controllers

Label

For displaying text on screen Example:

{
  "text": "The label",
  "description": "Text Text",
  "controller": {
    "type": "label"
  }
}

Boolean

For switching a single mod set on/off
Example:

{
  "text": "The boolean",
  "description": "Text Text",
  "controller": {
    "type": "boolean",
    "mod": "sodium"
  }
}

Cycling

For switching between mod sets in a list.
Useful when there is conflicting mods such as sodium and optifabric. Or switching the pack difficult Example:

{
  "text": "The cycling",
  "description": "Text Text",
  "controller": {
    "type": "cycling",
    "mods": [ // Don't empty
      "sodium",
      "optifabric"
    ]
  }
}

Mods Group

Assign a simple boolean controller option to every mods in the mod sets. Example:

{
  "text": "The mods group",
  "description": "Text Text",
  "controller": {
    "type": "mods_group",
    // Default is true
    "collapsed": false,
    "mods": [ // Don't empty
      "sodium",
      "optifabric"
    ]
  }
}

Rules Group

Group the rules so that it's able to collapse the rules Example:

{
  "text": "The rules group",
  "description": "Text Text",
  "controller": {
    "type": "rules_group",
    // Default is true
    "collapsed": true,
    "rules": [ // Don't empty
      {
        "text": "text",
        "description": "description",
        "controller": {
          "type": "label"
        }
      },
      {
        "text": "text",
        "description": "description",
        "controller": {
          "type": "boolean",
          "mod": "sodium"
        }
      }
    ]
  }
}

Notice: Every text and description is text raw json. Using https://www.minecraftjson.com/ for generating text.

modsets's People

Contributors

settingdust avatar u7f8au7fbd avatar

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.