your current location:首页 > news>[SWEM] How to modify the drop rate of module items and module seeds in the staple box in SWEM modules [SWEM] Star Worm E

[SWEM] How to modify the drop rate of module items and module seeds in the staple box in SWEM modules [SWEM] Star Worm E

2024-12-10 17:56:22|Myriagame |source:minecraft skins

This tutorial is set by the author's setting without permission.

# Introduction

SWEM is a good horse -related module, but for surviving players, especially multi -module survival players, there are two problems in the module:

The probability of generating the items of the module is too high, which will squeeze out other MOD items in various loot boxes

The probability of the seed generation is too high (probability and the probability of the production of wheat seeds are the same, both of which are 0.125. The following figure is the generic probability of the original wheat seeds. Later, I will say how to find this place)

This article proposes the corresponding solution for these two issues. The goal is:

Reduce or delete the probability of SWEM items in the loot box

Reduce or delete the probability of drop seeds when beating


#

Here is not the specific Java code, but pay attention to the loot table itself.The MC's loot table is stored in various. JSON files in JSON format (serialized data of brackets and brackets), with the following points:

The loot JSON file is classified according to the existence of the loot box. For example, Village_butcher.json said that this is a torrential product in the butcher's hut, and Village_fisher.json said that this is the loot in the fisherman's hut.What is defined is the corresponding list of the corresponding boxes.The picture below is a list of loot corresponding to the butcher hut:

The items located in the list of loot have different weights (Weight). The greater the weight, the greater the probability of generating

The process of warrior is divided into two stages: first determine that several times from the loot list (that is, the role of the ROLL variable); then draw items according to a certain probability (this process further determines the number of each item draw))

Therefore, in order to achieve the purpose of modifying the chance of generating MOD, you need to modify the corresponding files in the MOD file.


#

SWEM's loot files are divided into two parts: the original loot tables and modules added new buildings (the module adds some new building structures).The former is located in Mod.jar/Data/Minecraft/Loot_tables/Chests (Chest means a box); the latter is located in the Mod.jar/Data/SWEM/LOOT_TABLES/Chests and Mod.jar/SWEM/LOOT_MODIFIRSsEssence

It is explained here that the .jar file is actually a form of compression, so you can use various decompression software to open the.jar package.


# Modification process

For the part of the original loot table, you can choose to directly delete the mod.jar/data/mincraft/loot_tables/chests (forge the original version of the same name file); you can also open each file, delete or modify you want to want you want to wantThe module items (as shown in the figure below).

Here is a word that the module's items are highly adjusted (more important than the power of the original items). This is why the items of other modules are not brushed after adding SWEM.

For new buildings of the module, you need to modify the files under the MOD.JAR/DATA/SWEM/LOOT_TABLES/CheSts, mainly to modify the weight of the items with SWEM tags, or it can be deleted directly.

The figure below is the standard structure of an item. When deleted, delete it with items (don't forget the comma and delete it):

For no seeds, you need to modify the files under the MOD.JAR/DATA/SWEM/LOOT_MODIFIRS (with Grass in the name), mainly to adjust the generation probability of the red box below:

The production seeds of the original wheat seeds are also 0.125. If you don't want the seeds of the module, you can directly change it to 0 (this method is suitable for all mods to be produced by the probability of the seeds of the seedlings.)


# Summarize

Completed.