Say I have an add-on that uses datablocks from another pack, but I want my add-on to be standalone and not force the pack as a required add-on. If I define datablocks that are identical to and named the same as those from the other pack, and duplicate the necessary files into my zip, will this work? Or will it cause loading issues with players/something else that I don't know about? Would I be better off adding a conditional to only redefine using the files in the zip if the other pack doesn't exist?
redefining the exact same datablocks would work but it would be better to just force the other addon as a required addon
if its a small enough addon(maybe you're making a weapon pack and you only need a small addon, you can do something like this:
if(!$AddOn__Weapon_Gun)
{
exec("Add-Ons/Weapon_Gun/server.cs");
gunItem.UIName = "";
}
so the if() part checks if the gun addon is enabled, then if not, the addon is executed.
the "gunItem.UIName = "";" part removes the gun item from the wrench list as the addon wasnt executed, so the host probably didnt want the gun.