I use a Python script to help generate code, data, and textures for Bok’s Banging Butterflies. However, this script was starting to get unwieldy. At more than 500 lines it was getting harder to find certain sections when modifications needed to be made.
Python
A useful language for writing quick scripts.
Extracting Data for my Let’s Play
In my Let’s Play of Baldur’s Gate I use a lot of cropped and edited images, and rely heavily on the in-game dialogue to tell the story. As I am a lazy programmer, you may wonder why I spend so much time editing these images.
Doing Spawn Eggs Properly
Spawn eggs were almost an afterthought in Bok’s Banging Butterflies. They worked, but the experience was rough. Not all entities had spawn eggs, and most eggs looked identical. With 61 butterfly and moth species, it was almost impossible for players to know what they were spawning.
Porting Things to the Past
A while ago someone asked me to port Bok’s Banging Butterflies to 1.18.2. I made an attempt and failed due to the numerous changes in the code between Minecraft versions. This week I decided to take another look at it, determined to actually create a build that would work.
Handling and Preventing Errors
Mistakes are an inevitable part of coding, and debugging is where the real problem-solving begins. This will inevitably lead to bugs. When you notice a bug you will, of course, spend some time figuring out what went wrong. There are two ways to tackle these bugs: detection and prevention.
Bugs, Habitats, and Refactors
The next version of Bok’s Banging Butterflies will introduce villagers that can interact with butterflies. It’s still in the design stages, but I’m starting out by fixing a few bugs and working on what I can until I get my flow back again.
Finishing Up the New Moths
I’ve been adding even more moths to the mod ready for the next release. Some of these have custom behaviours and others don’t. I also contemplate adding butterfly breeding, so that players can artificially increase the number of butterflies in their farms.
Moths, Silk, and Startling
This week I add silk to the butterfly mod and finally add my first moth. This moth has its own unique behaviour, something I will start adding to several other butterflies. Along the way I fixed a bug or two, and discovered a couple more that need to be fixed.
Generating Butterfly Advancements
I’m still on a mission to reduce the amount of work needed to add new butterflies to the mod. This week I looked at advancements, with the goal of being able to generate their requirements without having to manually edit each one.
200 Files and Nothing New
This week I merged a change consisting of over 200 files. It’s probably the largest change I’ve made since the project began, and yet it doesn’t actually introduce anything new. Instead, it fixes a mistake I made when I first created the mod.