The Genesis Project

The Genesis Project

Not enough ratings
Modding: && vs ||, Best Practices, Avoiding Incompatibility, and How To Make Multiple Mods Work Together
By Octogenius
A guide to help you futureproof mods, ensure maximum compatibility with other mods, and some tips on how to integrate content from other mods into your own for cross-compatibility when people download both mods.
   
Award
Favorite
Favorited
Unfavorite
Introduction: So You've Made A Mod
This guide isn't here to tell you HOW to make a mod. It's here to tell you how to make sure you made your mod RIGHT.

It's very easy to make a mod that won't work with other mods, or that can cause issues with item drop tables. Or even a mod that could break things in the base game, if you're particularly sloppy with it. It's okay to make these mistakes- most modders have, at some point, but the important thing is knowing how to fix them... and how to keep them from happening in the first place.

This guide's a set of suggested Best Practices for the TGP modding community to ensure minimal issues impacting players and maximum compatibility of mods with one another.

If these suggestions are followed, it's likely that 90% of the workshop's content will be able to be used all in the same game. This not only benefits players who want lots of custom stuff, but also opens up some options for mods that want to add cross-compatible alchemy recipies (something this guide will cover later).

Thank you for taking the time to read this guide and for being part of the TGP modding community! Let's get into it.
Best Practices and Avoiding Incompatibility
There's really just three important things you need to pay attention to when you're building your mod. Two of them mostly apply to making new items- But they're really important.

1: Using Unique File Names and/or Item Codes
2: Using a clean LDB file
3: Using Unique and Logical Item Recipes



1: Using Unique File Names and/or Item Codes.

For everything, you want to make sure the filenames are unique. From custom exiles, to item images, to LDB files, if two mods use the same name it can and WILL cause problems that may not have obvious causes to players who encounter them.

There's a few ways to, with almost 100% certainty, futureproof these files. Just append part of your own username to the start of the file.

For example:

Items.LDB - This will conflict with the base game's LDB file and may cause significant issues with items while playing the game.

PosterPack.LDB - This isn't going to conflict with the base game's Items.LDB file, but it's very, very likely that someone else could upload their own LDB with this name too.

HZposterpack.LDB - This is very good. I've appended a shortened version of my username (HatsuneZaku) to the front of the filename. HZposterpack is a name that's very unlikely to be used by another modder, avoiding the potential conflicts that just using the name PosterPack might encounter.

This applies to almost everything- you want item images to have unique names, you want house files to have unique names, you want exiles and prototypings and dungeons to ALL have unique names. This extends to the files themselves specifically- you can have an item named Hat in your mod without conflicting with the item named Hat in the base game or an item named Hat in another mod... as long as they aren't all using Hat.png for their images.

Just adding two or three initials onto the front of any file will save you and other modders a lot of headaches.


2: Using a Clean LDB File

This bit's simple, but important.

Get or make an empty LDB file if you are making new items.

DO NOT EVER UPLOAD AN LDB FILE THAT CONTAINS ITEMS FROM THE BASE GAME OR OTHER MODS.

If you don't know how to generate one, hit the #modding channel on the TGP discord and there'll be one you can grab from the pinned messages there. Or just ask for one! We're happy to help.

So with that out of the way, we'll tackle a more involved thing specific to item mods: Recipes.
Recipes part 1: && vs ||
This is extremely important for item mods. You can just kind of chuck in recipes that just feel right, or that you think seem cool, but they might not always make sense to players- and worse, they may actually overlap with existing base-game recipies or recipes from other mods.

First, I want to establish the difference between an && recipe and a || recipe.

According to the comic, and to TGP's devs on the discord, these two recipe types reflect combining the two component items in different ways. I'll spare you the programming language and try to simplify it.


A && recipe combines both items in their totality. An example of this would be in Homestuck, when John combined a hammer and his pogo ride with && and got the Pogo Hammer. It is both a hammer and a pogo, losing the functionality of neither. Think of && as something like "what object could do what both of these things do?" The Pogo Hammer, in that sense, is still a fully functional hammer, but now with the pogo springs integrated into it, allowing it to bounce like a pogo as well.



A || recipe combines the form of one item with the functionality of another. An example of this from Homestuck would be when John combined a hammer and his pogo ride, to get the hammer pogo ride. Which was absolutely worthless because it was a pogo ride with the aesthetic of a hammer. That's not to say || recipes are (or even should be) useless- but they're not full combinations of both items, and they can suit more specific things than && does.
Recipies part 2: Good Recipe Options
With THAT explained, let's look at what a good recipe might be.
In these examples I'll be using + instead of || or && just because these examples apply to both kinds of alchemization. They'll also be ordered from most specific combination to least specific combination, and you'll find both ends of that spectrum have some downsides.


Examples:

Mod Item 1 + Mod Item 2 - This recipe will be unique. It won't conflict with or be overwritten by other recipes, because the system prioritizes specific recipes over general recipes. However, it will require two items from the mod to be able to produce, which means players will either need to add those items to a custom house or cheat the items into their inventory to use this recipe. However, it CAN be useful if you want to gate something special behind two specific items.

Mod Item + Anime Sunglasses - This is a solid recipe that can result in something specific. An example from my Sonic Modpack would be combining an Eggman Plush with the Beaglepus- which gives you a moustache and glasses in the style of Eggman. As long as players can add the required mod item to their house (or you include a house with this item in your mod), this is a great option that won't conflict with the base game or other mods.

Anime Sunglasses + Vriska's Glasses - These are two base-game items, which you're adding a recipe for that will combine them into a modded item. This... CAN be okay, sometimes, but it might conflict with recipes in the base game- and if it doesn't now, it might in the future. I don't recommend it but there's times where it makes sense to use.

Mod Item + Alias From Mod - There's not much point to using this one, but it's certainly an option. If you're combining items from your own mod, you're better off just making recipies for combining specific items, unless you're doing a category to cover an item with a lot of variants (like how the base game has an alias for Scalemates since there's several different ones).

Mod Item + Alias from Base Game - This is a pretty decent recipe, as long as you're wanting to tie it into the categories of items the base game uses, like Scalemate or Dragon or Mask. Some of these are more appropriate for recipes than others- Mask, for example, is a great alias to use for making almost anything the player would wear on their face.

Anime Sunglasses + Alias From Mod - This is one of my go-to mod recipes, because it's very easy to implement. You can use as many aliases as you'd like, to cover all sorts of categories of items- and you can even assign multiple aliases to the same item. Since you're able to make your own alias, this lets you ensure it's a unique one, and therefore should never cause any conflicts with the base game or other mods. This is one of the best options to allow for players to use a variety of mod items with a specific base game item. Just try to make sure the alias usage isn't TOO broad or it can get weird.

Anime Sunglasses + Alias from Base Game - 80% of the time or so, you shouldn't do this. Unless you're using one of the category aliases (like Anime Sunglasses + Scalemate = Anime Scalemate or something). But it's pretty likely to conflict with existing or future base game recipes.

Mod Item + kind:Hammer - This can work really well for making some weapons, but ultimately I think it's better done by using Mod Item + Specific Item or Mod Alias + Specific Item. Making an entire category of item ('kind' covers entire categories of weapons or clothes, like hammerkind or shoes) means that it's pretty likely to overlap with other recipes your item could fulfill, like ones based on tags. Or it may result in something too broad- the bladekind category in particular has knives, daggers, swords... if you want to make a themed sword, it's best for that recipe to be for a sword rather than just kind:Blade. This goes double for Otherkind which is a very crazy catchall that should almost never be used in a recipe.

Anime Sunglasses + kind:Hammer - Don't do this. Do not combine a base game item with a category of items. This can and will cause problems for not only your mod and potentially base game recipes, but also will likely be disruptive to other mods. This is a do-not-use. Instead, you may want to combine two base game items, such as Anime Sunglasses and Pogo Hammer, to get something new- but be aware future updates to the game may conflict with or invalidate those recipes too.

Mod Item + tag:Lifey - This is a decent recipe, probably best used with ||, that can let a variety of base game or mod items work with a specific mod item. I don't think it's an ideal recipe because of how vague it is (the bouncy tag, for example, is on the pogo ride, pogo shoes, pogo hood, pogo hammer, etc) and it's inability to know what kind of item the tag is from, but it's not a bad option for || recipes.

Anime Sunglasses + tag:Lifey - Don't use this recipe format except in very specific circumstances. A base game item plus a tag, if it doesn't already, is going to result in something in the future. Plus it can disrupt certain bits of freestyle alchemization that players try to do to just combine different effects into a single item. However, if you want to do that specific item, themed to that specific tag, this can work well as a || recipe... occasionally.

Mod Alias 1 + Mod Alias 2 - This is uh, fine, I guess, but it's entirely dependent on what you're doing with the aliases in your mod. Either very useful or very dumb. The power is in your hands. Again, works better with less broad categories of items.

Mod Alias + kind:Hammer - This can work, but much like the Mod Item + kind:Hammer recipe, it's probably much better off just being done via more specific recipes like Mod Alias + Pogo Hammer or Mod Alias + Anime Sunglasses, to have a more specific and logical recipe result.

Base Game Alias + kind:Hammer - NOPE. This is one to avoid. Never double up on base game 'category' types in a recipe. Ever.

Base Game Alias + tag:Lifey - See above. This is way too vague to result in any logical crafting result AND it probably overlaps with existing recipes.

Base Game Alias 1 + Base Game Alias 2 - Absolutely not. Same problem as above.

kind:Hammer + kind:Blade - No no no nope no do NOT do this, none of this, no kind + kind recipes ever. This WILL disrupt the base game's recipes AND the recipes in other mods. 200% Do Not Do This.

kind:Hammer + tag:Lifey - This is too vague to give a satisfying result and also will break a lot of alchemy mechanics. If you want to make a Lifey Hammer or a Doomy Sword or etc, use a Specific Item + Tag recipe instead.

tag:Lifey + tag:Timey - Never Do This. Okay? Promise me you won't do this. It will only end in suffering for all of us. It will conflict with everything. EVERYTHING. If you read this guide and still use this kind of recipe you'll transform me instantly into a godtier Waste of Time. I don't want that. You don't want that. Nobody wants that.

Okay so, if that's all a tl;dr for you, then, summary:


  • Recipes shouldn't conflict with any base game stuff. Check if you're unsure.
  • Specific items are better than categories (aka kind, tag, alias).
  • Except when those categories are an alias for a group of near-identical things (like Scalemates).
  • Tags and Kinds can be useful but should not be used together, or with themselves.
  • Following these instructions is good and I'm glad you'll do it.
Recipes part 3: Cross-Mod Recipies
This is gonna be a much simpler bit than the last part. Lucky you!

There's a very fun thing that some of us in the TGP modding community have done- and that's make recipes in our mods that use items from other mods. That sounds complex or hard to do, maybe. But it's super simple.

All you need to do is get the item codes or aliases from the mod you want to make a cross-mod recipe with, and use those in your recipes. The TGP Toolchain program won't allow you to make items that aren't in your own mod- so there's no worry of causing error'd out items as long as you're spelling the item code or alias correctly, capitalization included.

Here's an example of one I've done. The EDGELORD mod has a Shadow the Hedgehog plush in it. My Mostly Sonic Modpack has Sonic Spines hat in it. If you install both mods, you can use the Shadow the Hedgehog plush with the Sonic Spines hat to get a Shadow Spines hat! This item exists in my mod (Mostly Sonic Modpack) but uses an item from the EDGELORD mod in it's recipe.

Another example is in Muselk's Frozen Modpack- which has a recipe that lets you combine a Sonic Plush from the Mostly Sonic Modpack with a 'cold' item, to get a Coldsteel the Hedgehog plush! That plush can then be used to make several other Coldsteel themed items based on Sonic items from my modpack. In this case, since Muselk was using altered versions of art from my modpack, they reached out to me to ask permission before doing it- and I highly recommend you do this any time you might be repurposing someone else's art or items.

Similarly, you can use this to create recipes that combine items from multiple modpacks that you've made and released separately. You can use items from my Sonic pack with items from my Posters and Paintings pack to get Sonic posters, which themselves also use the Sonic alias from my Sonic pack- and therefore work in any Sonic alias recipes from that Sonic modpack too! It can go both directions!

Experiment with this, have fun with implementing 'hidden' items that require specific combinations of mods to be installed together, or just make cool stuff so doing alchemy with items from multiple mods feels as seamless as using two different items from the base game.
In Conclusion
I know even if I write this all, some folks won't read it, some folks will read it and ignore all the advice, and some folks will purposefully do what I tell them not to do, as like, a joke. A joke designed to break my heart.

Don't break my heart. Just go out there, make cool stuff, and use these tips to make it work well with other people's stuff.

You're gonna do great.
3 Comments
pYMxolbo 26 Jan @ 6:49pm 
made me not have a modded recipe of "unbreakable katana" || "ice cubes" so i thank you for that
Masked Error 23 Jun, 2023 @ 12:24pm 
read it, not planning on making a mod anytime soon, but ill keep this in mind if i do.
Habbit 31 Jul, 2022 @ 7:50pm 
Nice guide! It's helped me work on my mod, thank you.