Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make meteor reagents completely configurable and add some new options to their functionality. #63

Merged
merged 8 commits into from
Jan 18, 2025

Conversation

koolkrafter5
Copy link

Reagent config files are placed in /config/BloodMagic/meteors/reagents/. Create a file named reagentName.json to configure that reagent (orbisTerrae.json, potentia.json, ...). Reagent names may most easily be found by looking at the tooltips of belljars in NEI.
Default configs will be generated if the folder is not present. Default functionality should be equivalent to original Blood Magic. Defaults will not be generated if the folder is present AND empty if you want to remove every reagent's effects.

Reagent Configuration Options:

For the following three configs, the single largest increase (largest positive config) and single largest decrease (largest negative config) values are used, just like how Orbis Terrae completely overshadows Terrae in the old system. Default values for these three configs are all 0:
radiusChange: int (change the radius of the meteor. Minimum radius is 1)
fillerChanceChange: int (change the filler chance similar to how it was done with the old weight system, except the max chance is now 100 instead of 1000. For example, terrae with a fillerChanceChange of 10 is equivalent to how it increased the total weight by 100 previously. Full formula is fillerChance = (fillerChance + fillerChanceChange) * 100 / (100 + fillerChanceChange). For example, a fillerChance of 50 with Orbis Terrae's default fillerChanceChange of 20 gives a new fillerChance of about 58%. This fixes meteors with very high fillerChance values (90+) from being entirely made of filler when supplied with (Orbis) Terrae which was caused by my last PR)
rawFillerChanceChange: int (directly change the filler chance by the supplied amount. fillerChance += rawFillerChanceChange. For example, a fillerChance of 50 with a rawFillerChanceChange of -20 gives a new fillerChance of 30)
The final value for fillerChance will always be between 0 and 100 inclusive. Reagents will not add filler to meteors with a fillerChance of 0. rawFillerChanceChange is applied before fillerChanceChange. A reagent with fillerChanceChange of -100 will always set the fillerChance of a meteor to 0.

For the following two configs, any reagent with these options set to true will apply this change to the whole meteor. Default value for both of these is false:
disableExplosions: boolean (if set to true, this reagent entirely disables explosions caused by the meteor)
invertExplosionBlockDamage: boolean (if set to true, this reagent inverts the setting B:doMeteorsDestroyBlocks in config/AWWayofTime.cfg for this meteor. May be used to make normally dangerous meteors safe, or can be used as a tradeoff to unlock a powerful effect when meteors are normally safe)

This config's format is the same as the meteor ore and filler configs:
filler: array of strings that define blocks (For example, incendium's default filler array contains "minecraft:netherrack:0:60", minecraft:glowstone:0:60", minecraft:soul_sand:0:60")
For best results when combining reagents, try to ensure that all reagent filler arrays you define have the same total weight. Default configs use a total of 180 because it is highly composite, but that exact number is not required to be used.

Block Format Changes:

The formats for blocks in the meteor and reagent configs has been slightly altered to allow certain blocks to be placed only when a specified reagent is present. The block formats are now: modId:itemName:meta:weight(:reagent1, reagent2, ... optional) OREDICT:oreDictName:weight(:reagent1, reagent2, ... optional). Don't include the () in any configs, they just show the optional section. Spaces after the commas used to separate reagents are optional. The colon is required if any reagents are specified, and commas are required to separate multiple reagents. Any one reagent in the list must be present for that block to be present.
Example: "minecraft:diamond_ore:0:100:terrae,orbisTerrae" will only allow diamond ore to be placed when either Terrae OR Orbis Terrae are present. Other ores from the meteor will be chosen, or default stone if every listed ore is missing a required reagent.
Block lists in reagent configs CAN depend on other reagents being present! Changing tenebrae's default filler entry to "minecraft:obsidian:0:180:magicales" will make it only change the filler out for obsidian if magicales is also present. Reagents required for blocks in ore/filler lists do NOT require a config file to be present in /config/BloodMagic/meteors/reagents/, but creating an empty config file for it will not cause problems.
NEI will show the tooltip "Required reagent: x, y, ..." for any meteor ores or filler blocks that require a reagent.

The legacy config format [block, weight, block, weight ...] has been REMOVED due to these changes. All of the meteor configs in GTNH have already been rewritten in the newer formats.

… to their functionality.

Config files are placed in /config/BloodMagic/meteors/reagents/.
Default configs will be generated if the folder is not present. Defaults will not be generated if the folder is present AND empty if you want to remove every reagent's effects.
Create a file named reagentName.json to configure that reagent (orbisTerrae.json, potentia.json, ...). Reagent names may most easily be found by looking at the tooltips of belljars in NEI.

Available reagent configuration options are:

For the following three configs, the single largest increase (largest positive config) and single largest decrease (largest negative config) values are used, just like how Orbis Terrae completely overshadows Terrae in the old system. Default values for these three configs are all 0:
radiusChange: int (change the radius of the meteor. Minimum radius is 1)
fillerChanceChange: int (change the filler chance similar to how it was done with the old weight system, except the max chance is now 100 instead of 1000. For example, terrae with a fillerChanceChange of 10 is equivalent to how it increased the total weight by 100 previously. Full formula is fillerChance = (fillerChance + fillerChanceChange) * 100 / (100 + fillerChanceChange). For example, a fillerChance of 50 with Orbis Terrae's default fillerChanceChange of 20 gives a new fillerChance of about 58%. This fixes meteors with very high fillerChance values (90+) from being entirely made of filler when supplied with (Orbis) Terrae like how they were in my last commit)
rawFillerChanceChange: int (directly change the filler chance by the supplied amount. fillerChance += rawFillerChanceChange. For example, a fillerChance of 50 with a rawFillerChanceChange of -20 gives a new fillerChance of 30)
The final value for fillerChance will always be between 0 and 100 inclusive. Reagents will not add filler to meteors with a fillerChance of 0. rawFillerChanceChange is applied before fillerChanceChange. A reagent with fillerChanceChange of -100 will always set the fillerChance of a meteor to 0.

For the following two configs, any reagent with these options set to true will apply this change to the whole meteor. Default value for both of these is false:
disableExplosions: boolean (if set to true, this reagent entirely disables explosions caused by the meteor)
invertExplosionBlockDamage: boolean (if set to true, this reagent inverts the setting B:doMeteorsDestroyBlocks in config/AWWayofTime.cfg for this meteor. May be used to make normally dangerous meteors safe, or can be used as a tradeoff to unlock a powerful effect when meteors are normally safe)

This config's format is the same as the meteor ore and filler configs:
filler: array of strings that define blocks (For example, incendium's default filler array is "minecraft:netherrack:0:60", minecraft:glowstone:0:60", minecraft:soul_sand:0:60")
For best results when combining reagents, try to ensure that all reagent filler arrays you define have the same total weight. Default configs use a total of 180 because it is highly composite, but that exact number is not required to be used.

The formats for blocks in the meteor and reagent configs has been slightly altered to allow certain blocks to be placed only when a specified reagent is present. The block formats are now:
modId:itemName:meta:weight(:reagent1, reagent2, ... optional)
OREDICT:oreDictName:weight(:reagent1, reagent2, ... optional)
Don't include the () in any configs, they just show what the optional section. Spaces after the commas used to separate reagents are optional. The colon is required if any reagents are specified, and commas are required to separate multiple reagents.
Any one reagent in the list must be present for that block to be present, for example: "minecraft:diamond_ore:0:100:terrae,orbisTerrae" will only allow diamond ore to be placed when either Terrae OR Orbis Terrae are present.
Block lists in reagent configs CAN depend on other reagents being present! Changing tenebrae's default filler entry to "minecraft:obsidian:0:180:magicales" will make it only change the filler out for obsidian if magicales is also present.
Reagents required for blocks in ore/filler lists do NOT require a config file to be present in /config/BloodMagic/meteors/reagents/, but creating an empty config file for it will not cause problems.
NEI will show the tooltip "Required reagent: x, y, ..." for any meteor ores or filler blocks that require a reagent.

The legacy config format [block, weight, block, weight ...] has been REMOVED. All of the meteor configs in GTNH have already been rewritten in one of the two newer formats.
@Dream-Master Dream-Master requested a review from a team January 16, 2025 20:14
@Dream-Master Dream-Master requested a review from a team January 17, 2025 21:29
@Dream-Master Dream-Master merged commit 3f9641b into GTNewHorizons:master Jan 18, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants