aboutsummaryrefslogtreecommitdiff
path: root/blog/posts/sf5_estrogen_moth/index.md
blob: c4ab8218ca553779beceabda8d9e34a66fef92cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
I'm currently knee-deep in a playthrough of Skyfactory 5, which for the bafflingly uninformed reader is a skyblock tech modpack for Minecraft. Among many others, it includes the Create mod, and it will come as no surprise to those familiar with my proclivities that my first impulse upon finding this out was to mod my modpack to include the [Create: Estrogen](https://modrinth.com/mod/estrogen) addon.

This went surprisingly smoothly, except for one thing. See, the Estrogen addon adds a few things that have nothing whatsoever to do with the eponymous fluid processing line and consumable items, including one mob: a rosy maple moth.

<figure class="media">
  <img src="moth.png" alt="The Rosy Maple Moth mob in question. It's clear that it was modeled on the vanilla bee.">
</figure>

This presents a problem because of Skyfactory 5's absurdly custom progression system. Instead of mob spawning working normally, trees drop loot bags, which give "gateway pearls" that summon little challenge events where you fight a specific mob and get a trophy as a reward that can be used to toggle spawning of that mob in your world, which then ignores almost all of the mob's typical spawning conditions and just plonks it down anywhere. Transphobically, this system was not designed with my aftermarket mod in mind, so if I wanted the moths in my world in a way that could reasonably be called legitimate I was gonna have to do some tinkering.

I'd be content to just not bother except that I want one of the items that you can only get via moth, a pair of thigh high socks that provide extremely high resistance to fall damage and are made from Moth Fuzz, which of course you can only get from the moths. I could, of course, just spawn a couple moths in with commands and farm the necessary fuzz from them, but that's the coward's way out.

Luckily for me, a lot of the custom stuff in Skyfactory 5 is done using datapacks applied globally to every world, which means it can be augmented by just futzing with some json files in the game install folder. So far, I've managed to create a custom Gateway Pearl, add it to the loot table for Pink Loot Bags, and add the reward trophy. However, the pearl's name is bugged, the moths don't attack you during the event like they're supposed to, and the trophy doesn't toggle spawns. Also, it's just the standard gateway pearl &mdash; I didn't bother integrating this with any of the more advanced challenge gateway stuff because I don't care.

However however, this is enough to get moths in my world because the gateway event spawns a couple of the respective mob when you win, so I'm content to stop here for now. I'll update this post if I make any more progress towards integrating this properly. If you've got any information to that end, I'd appreciate hearing about it. This blog has a comment box and my various contact info is listed on the About Me page.

Also, I did this on version 5.0.8 of the modpack. Just something to keep in mind.

# How to do it

The upside of my woefully incomplete solution is that it's relatively simple to set up. All you gotta do is add two .json files and modify a third.

## Trophy

To create the trophy, create `moth.json` in `<your game folder>/global_packs/required_data/skyfactory_5/data/obtrophies/trophies` with the following content:

<p class="codetitle">moth.json</p>

```
{
  "entity": "estrogen:moth",
  "scale": 1.5
}
```

This is technically an optional step because the trophy doesn't do anything, but the JSON for the gateway pearl expects it to be there. Also, the scale entry doesn't need to be there &mdash; all it does is make the model on the trophy bigger. It's purely cosmetic, but I like it.

## Gateway Pearl

To add the gateway pearl and event, place this file inside `<your game folder>/global_packs/required_data/skyfactory_5/data/gateways/gateways/normal`:

[moth.json](moth.json)

This is just the json file for the teacup pig gateway, except I've swapped every mention thereof out for the moths. Which mob the base file is isn't super important, but this one is convenient because it's already pink and already has the configuration required to spawn the mob for you after you win the challenge. Hostile mob gateways don't do this, for obvious reasons.

## Loot Tables

Finally, add the pearl to one of the loot tables defined in `<your game folder>/global_packs/required_data/skyfactory_5/data/treasurebags/loot_tables/bags` by adding this entry to the relevant json file:

<p class="codetitle">pink.json</p>

```
...},
{
  "type": "item",
  "name": "gateways:gate_pearl",
  "weight": 100,
  "functions": [
    {
      "function": "set_nbt",
      "tag": "{gateway:\"gateways:normal/moth\"}"
    }
  ]
}
...
```

For your convenience, I've also uploaded my version of `pink.json` with this entry added. Just overwrite the existing version (again, inside `<your game folder>/global_packs/required_data/skyfactory_5/data/treasurebags/loot_tables/bags`) with it and it should work.

[pink.json](pink.json)