neahxx Posted October 13, 2018 Share Posted October 13, 2018 (edited) Hello fellow Don't Starve players and modders, I need help with finding out how to check if another mod is installed. Preferably to change starting inventory items based on what mods are installed and determine whether or not a recipe needs to be added. Alternatively, I would also like to learn how to check if an item exists with recipe. I would be so thankful for any reply you may have! Edited October 13, 2018 by neahxx Link to comment Share on other sites More sharing options...
Ultroman Posted October 13, 2018 Share Posted October 13, 2018 (edited) Since this works: GLOBAL.KnownModIndex:IsModEnabled("workshop-whateverthenumberis") then using GetModActualName can be used to instead give the actual name of the other mod: GLOBAL.KnownModIndex:IsModEnabled(GLOBAL.KnownModIndex:GetModActualName("The Other Mod")) That should take care of your first request. I would advise you to use the first way, though, since the author can change the name of the mod at any time, while the workshop-######## ID doesn't change. Not sure exactly what your goal is. The builder-component has a KnowsRecipe function you can call, to see whether the player knows a certain recipe. It's really the functions in the builder-component, which determine which things the player can and can't craft/build, and they do so by generating a list of known recipes, and add to that the recipes afforded by the techtree from the nearest prototyper (or all nearby prototypers if you're using my mod "Long-range Research") if you're in range of a prototyper. Edited July 21, 2021 by Ultroman 1 Link to comment Share on other sites More sharing options...
neahxx Posted October 14, 2018 Author Share Posted October 14, 2018 @Ultroman Thanks for the reply, I'll try that as I plan to make a mod item exist in two mods and wanted to make sure it only instanced once. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now