Jump to content

DArkHekRoMaNT

Vintarian
  • Posts

    573
  • Joined

  • Last visited

  • Days Won

    18

Posts posted by DArkHekRoMaNT

  1. @ZergMazter If the author doesn't change this, then you have only a couple of options:

    1. You're lucky and your mod loads after MoreMolds. So you can create an empty file assets/moremolds/patches/moremolds-recipes-grid-plank-removal.json in your mod, this will overwrite the original patch. 

    2. Make a patch via C#

    3. Modify mod files directly

    4. Do nothing and just get over it

  2. On 1/24/2024 at 6:52 AM, ZergMazter said:

    I just wanted to make a patch to remove a recipe from another mod conflicting with my personal modpack but it didnt work. This is what I did:

    mymodZip >>> assets/mymod/patches/moremolds-recipes-grid-plank-removal.json

    Inside the json:

    [
        {
            file: "moremolds:patches/survival-recipes-grid-plank.json",
            op: "add",
            path: "/enabled",
            value: "false"
        }
    ]

    Did I forget anything?

    You can't patch another patch, it leads to undefined behavior.

  3. 1 hour ago, HinataNekoNya said:

    Yes but I still find that they are not yet practical enough. I also don't find them too difficult but I think that there will be a way to automate everything like a Minecraft launcher.

    I would take FTB or Technic Launcher as an example.

    There are plans to integrate mddb into the game, this has already been partially implemented. But the use of CurseForge and this topic in general have long been irrelevant. This was three years ago.

  4. 4 hours ago, HinataNekoNya said:

    Bonjour je vient ici pour donner mon avis que je juge important car je connais très bien curseforge.

    1er chose Curseforge est disponible sur linux si vous penser que non c'est que vous avais jamais chercher.

    après arrêter de parler de monopole curseforge ne loge rien il redirige et sont payer par les pub donc on peut très bien utiliser le hub comme base de donnée et se servir de curseforge pour créer l'assistant.

    et pour les préjuger curseforge n'ont pas la main sur tout et c'est les développeurs qui choisissent quoi mettre ou, donc si linux na que WoW plaigner vous pas que a CurseForge les développeurs sont responsable d'entretenir se qu'ils développent.

    Dernier point de vue si Curseforge ne vous convient pas développer un petit programme pour installer les mods ou intégrer le directement au menu mod dans le jeu de manière a se qu'il soit compatible avec toute les versions meme les futurs. (Vous trier déjà les mods par version et vous aurais juste a noter les dépendances déjà sur le hub quand vous voudrais upload un mod, tout est ranger trier tout est bien qui finit bien !)

    No longer relevant. VintageStory has its own modhub now.

    https://mods.vintagestory.at

  5. 20 hours ago, Twizzle said:

    I'm assuming you mean specifically with this game/engine? Working with JSON files is very common, especially to read from to get data. I guess, like I said, I am missing some key concepts in regard to the VS API. To be clear, I am not looking to make a patch/JSON mod, I am using .NET as I'll have to make a GUI, etc.

    My main goal right now is to programmatically get a list of all possible bed blocks, to then add logic/GUI to interaction with one. I could do something like:

    serverAPI.World.GetBlock(new AssetLocation("bed-hay-head-north")).BlockId;
    serverAPI.World.GetBlock(new AssetLocation("bed-hay-head-south")).BlockId;
    //repeat for every bed type and direction

    Instead of doing this, my idea was to read the JSON file for beds and extract the values in "variantgroups" and "shapebytype", and do some string manipulation (in .NET, not modifying the JSON, to clarify) and add all of them to an array for later event handling, something like:

    // class field
    private List<int> bedIdentifiers;
      
    // [...]
    
    public override void StartServerSide(ICoreServerAPI api)
    {
        base.StartServerSide(api);
        
        string bedJson; // get bed.json here and use the values in it for the following lists
    
        List<string> bedTypes = new List<string>(); // populate with types from JSON file, i.e., "wood", "hay", etc.
        List<string> bedParts = new List<string>{ "head", "feet" };
        List<string> directions = new List<string>{"north", "east", "south", "west"};
        foreach (string bedType in bedTypes)
        {
            foreach (string direction in directions)
            {
                foreach (string bedPart in bedParts)
                {
                    // compile bed array
                    bedIdentifiers.Add(serverAPI.World.GetBlock(new AssetLocation($"bed-{bedType}-{bedPart}-{direction}")).BlockId);
                }
            }
        }
    }

    Might seem like a ridiculous way to go about this, but if more bed types were added, the mod wouldn't work properly. Hope that was clearer, and I hope there's an easier way to do this via API!

    Iterate api.World.Block and get all with code "game:bed-*". Or attach custom BlockBehavior/BlockEntityBehavior via patch bed  blocktype json and do code there

  6. 19 hours ago, Twizzle said:

    Interesting reasoning! I don't appear to be able to find that the newtonsoft package supports JSON5? Guess I could just try it out and see.

    The issue I see is trying to programmatically use the JSON files, for example, iterating beds somehow rather than listing all different types of beds one by one - maybe I am missing a key piece of the puzzle as the API documentation is a bit difficult to read, although I also understand that it's generated, and nobody wants to do documentation 🙉 my early idea was to get the bed.json file with AssetLocation, then prepend "bed-", get the variantgroups, shapebytype, and compile an array with a bunch of string manipulation. It all seems a bit tedious to not have some way to do it programmatically, but like I said maybe I am missing some knowledge here?

    You shouldn't work with json files directly as you would with strings. Either use a ready-made block/item from the game, or a patch. Patches are made through a fork of the Tavis.JsonPatch library using other json or C# code.

  7. If you want it without a mod just change assets/survival/blocktypes/plant/glowworms.json from your game folder and replace

    drops: []

    with

    drops: [{ "type": "block", "code": "glowworms- {type}" }]


    Or try More Recipes. Although it is no longer maintained, but in general most things will work, this is a content mod

  8. 18 hours ago, Bat_Tech419 said:

    Hey @DArkHekRoMaNT you mentioned this about glowworms being able to drop, any quick and easy way to edit my own file to allow myself to harvest these without a mod. MoreRecipes is outdated. Thanks in advance for any advice or to tell me its not possible without it being a mod. Also, maybe even updating MoreRecipes mod, I cant find any mod that allows harvesting of Glowworms for decorative purpose other than CaveBeacons that I don't want to add.

    Answered in MR topic

  9. On 6/10/2023 at 3:52 PM, Conquest of Blocks said:

    No matter what i put inside, e.g.

    {
      "ExcludeEntities": {
        "Description": "Exclude these entities, support wildcards. Use comma (,) as separator. Take precedence over IncludeEntities",
        "Default": "humanoid-*",
        "Value": "humanoid-*"
      },

    it will always delete it so that it again looks like

    {
      "ExcludeEntities": {
        "Description": "Exclude these entities, support wildcards. Use comma (,) as separator. Take precedence over IncludeEntities",
        "Default": "",
        "Value": ""
      },

    any tips?

    Try /cl config

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.