IsharaMeradin Posted November 5, 2016 Share Posted November 5, 2016 I'm making a DLC MCM version of my mod however I would like to make it available to use with Vanilla Skryim without glitching the recipes I added. Is there a way to do that?If your recipes are using DLC items, traditionally the answer would be no the DLC is a hard requirement because of that. However, SKSE has added numerous functions to the ConstructibleObject script. With them you could have your recipes use stock/vanilla items and swap them out for the DLC items if the DLC is present. You can also include a condition that a global variable be at a certain value in order for the recipes to display. If the DLC is present, set the global. Otherwise leave the global at a non-matching value and those without the DLC won't even see the recipes. I'm taking a look in more depth into using something like this, I've started the script but I get a ton of errors when trying to compile. Is it possible to get an example of what item swap would look like to give me a base reference please? This is my best guess as I haven't actually swapped items before on recipes via script. ConstructibleObject Property MyRecipe Auto MiscObject Property MyPlaceHolderIngredient Auto Form MyDLCIngredient ;some event If GetModByName("SomeDLC.esm") != 255 MyDLCIngredient = Game.GetFormFromFile(0x00123456,"SomeDLC.esm") EndIf Int NumIng = MyRecipe.GetNumIngredients() While NumIng >= 0 If MyRecipe.GetNthIngredient(NumIng) == MyPlaceHolderIngredient MyRecipe.SetNthIngredient(MyDLCIngredient,NumIng) EndIf NumIng -= 1 EndWhile ;end some event Would this be the same if the DLC ingredient is the constructible object and not the required to make the item? For Instance, the constructed object would be 1 Ancestor Moth Wing but would require gold to craft it. Script I came up with but I still get an error pertaining to this line. Function DawnguardCompatibility()If LCCADLCDawnguard.getValue() == 0ConstructibleObject CurrentRecipe = LCCA_DGIngredientRecipesFlist.GetSize()CurrentRecipe.SetResult("DragonflyBlue")ElseIf LCCADLCDawnguard.getValue() == 1LCCA_DGIngredientsFList.AddForm(Game.GetFormFromFile(0x020059BA, "Dawnguard.esm")) ;Ancestor Moth WingDG_RecipeIngredientAncestorMothWing.SetResult("DLC01MothWingAncestor")EndIfEndFunction I can see where your script is going wrong. GetSize() returns an integer count of the total number of entries in the form list. You use GetAt() to work with a specific entry.Your lines: ConstructibleObject CurrentRecipe = LCCA_DGIngredientRecipesFlist.GetSize() CurrentRecipe.SetResult("DragonflyBlue") Become: Int RecipeListCount = LCCA_DGIngredientRecipesFlist.GetSize() While RecipeListCount >= 0 RecipeListCount -= 1 ConstructibleObject CurrentRecipe = LCCA_DGIngredientRecipesFlist.GetAt(RecipeListCount) CurrentRecipe.SetResult("DragonFlyBlue") EndWhileI got the position of the subtraction wrong in the earlier example. When you are using a variable that starts with the total number of entries, you have to subtract one first because the GetSize() function returns the total count starting at 1 yet GetAt() uses an index count starting at 0. Link to comment Share on other sites More sharing options...
droseph610 Posted November 5, 2016 Share Posted November 5, 2016 So I'm not sure exactly how to describe this. In first person, my hands go all over the place depending on where i look and in third when I look up or down my back snaps in half. Think I've had this before I just don't remember how I fixed it Link to comment Share on other sites More sharing options...
Hearton Posted November 5, 2016 Share Posted November 5, 2016 Well that's brilliant and convenient. I'll test it out. Link to comment Share on other sites More sharing options...
LadyCrystyna Posted November 5, 2016 Share Posted November 5, 2016 (edited) I'm making a DLC MCM version of my mod however I would like to make it available to use with Vanilla Skryim without glitching the recipes I added. Is there a way to do that?If your recipes are using DLC items, traditionally the answer would be no the DLC is a hard requirement because of that. However, SKSE has added numerous functions to the ConstructibleObject script. With them you could have your recipes use stock/vanilla items and swap them out for the DLC items if the DLC is present. You can also include a condition that a global variable be at a certain value in order for the recipes to display. If the DLC is present, set the global. Otherwise leave the global at a non-matching value and those without the DLC won't even see the recipes. I'm taking a look in more depth into using something like this, I've started the script but I get a ton of errors when trying to compile. Is it possible to get an example of what item swap would look like to give me a base reference please? This is my best guess as I haven't actually swapped items before on recipes via script. ConstructibleObject Property MyRecipe Auto MiscObject Property MyPlaceHolderIngredient Auto Form MyDLCIngredient ;some event If GetModByName("SomeDLC.esm") != 255 MyDLCIngredient = Game.GetFormFromFile(0x00123456,"SomeDLC.esm") EndIf Int NumIng = MyRecipe.GetNumIngredients() While NumIng >= 0 If MyRecipe.GetNthIngredient(NumIng) == MyPlaceHolderIngredient MyRecipe.SetNthIngredient(MyDLCIngredient,NumIng) EndIf NumIng -= 1 EndWhile ;end some event Would this be the same if the DLC ingredient is the constructible object and not the required to make the item? For Instance, the constructed object would be 1 Ancestor Moth Wing but would require gold to craft it. Script I came up with but I still get an error pertaining to this line. Function DawnguardCompatibility()If LCCADLCDawnguard.getValue() == 0ConstructibleObject CurrentRecipe = LCCA_DGIngredientRecipesFlist.GetSize()CurrentRecipe.SetResult("DragonflyBlue")ElseIf LCCADLCDawnguard.getValue() == 1LCCA_DGIngredientsFList.AddForm(Game.GetFormFromFile(0x020059BA, "Dawnguard.esm")) ;Ancestor Moth WingDG_RecipeIngredientAncestorMothWing.SetResult("DLC01MothWingAncestor")EndIfEndFunction I can see where your script is going wrong. GetSize() returns an integer count of the total number of entries in the form list. You use GetAt() to work with a specific entry.Your lines: ConstructibleObject CurrentRecipe = LCCA_DGIngredientRecipesFlist.GetSize() CurrentRecipe.SetResult("DragonflyBlue") Become: Int RecipeListCount = LCCA_DGIngredientRecipesFlist.GetSize() While RecipeListCount >= 0 RecipeListCount -= 1 ConstructibleObject CurrentRecipe = LCCA_DGIngredientRecipesFlist.GetAt(RecipeListCount) CurrentRecipe.SetResult("DragonFlyBlue") EndWhileI got the position of the subtraction wrong in the earlier example. When you are using a variable that starts with the total number of entries, you have to subtract one first because the GetSize() function returns the total count starting at 1 yet GetAt() uses an index count starting at 0. Ok got that working, thank you. However, now the swap isn't working in game any ideas? Edited November 5, 2016 by LadyCrystyna Link to comment Share on other sites More sharing options...
IsharaMeradin Posted November 5, 2016 Share Posted November 5, 2016 I'm making a DLC MCM version of my mod however I would like to make it available to use with Vanilla Skryim without glitching the recipes I added. Is there a way to do that?If your recipes are using DLC items, traditionally the answer would be no the DLC is a hard requirement because of that. However, SKSE has added numerous functions to the ConstructibleObject script. With them you could have your recipes use stock/vanilla items and swap them out for the DLC items if the DLC is present. You can also include a condition that a global variable be at a certain value in order for the recipes to display. If the DLC is present, set the global. Otherwise leave the global at a non-matching value and those without the DLC won't even see the recipes. I'm taking a look in more depth into using something like this, I've started the script but I get a ton of errors when trying to compile. Is it possible to get an example of what item swap would look like to give me a base reference please? This is my best guess as I haven't actually swapped items before on recipes via script. ConstructibleObject Property MyRecipe Auto MiscObject Property MyPlaceHolderIngredient Auto Form MyDLCIngredient ;some event If GetModByName("SomeDLC.esm") != 255 MyDLCIngredient = Game.GetFormFromFile(0x00123456,"SomeDLC.esm") EndIf Int NumIng = MyRecipe.GetNumIngredients() While NumIng >= 0 If MyRecipe.GetNthIngredient(NumIng) == MyPlaceHolderIngredient MyRecipe.SetNthIngredient(MyDLCIngredient,NumIng) EndIf NumIng -= 1 EndWhile ;end some event Would this be the same if the DLC ingredient is the constructible object and not the required to make the item? For Instance, the constructed object would be 1 Ancestor Moth Wing but would require gold to craft it. Script I came up with but I still get an error pertaining to this line. Function DawnguardCompatibility()If LCCADLCDawnguard.getValue() == 0ConstructibleObject CurrentRecipe = LCCA_DGIngredientRecipesFlist.GetSize()CurrentRecipe.SetResult("DragonflyBlue")ElseIf LCCADLCDawnguard.getValue() == 1LCCA_DGIngredientsFList.AddForm(Game.GetFormFromFile(0x020059BA, "Dawnguard.esm")) ;Ancestor Moth WingDG_RecipeIngredientAncestorMothWing.SetResult("DLC01MothWingAncestor")EndIfEndFunction I can see where your script is going wrong. GetSize() returns an integer count of the total number of entries in the form list. You use GetAt() to work with a specific entry.Your lines: ConstructibleObject CurrentRecipe = LCCA_DGIngredientRecipesFlist.GetSize() CurrentRecipe.SetResult("DragonflyBlue") Become: Int RecipeListCount = LCCA_DGIngredientRecipesFlist.GetSize() While RecipeListCount >= 0 RecipeListCount -= 1 ConstructibleObject CurrentRecipe = LCCA_DGIngredientRecipesFlist.GetAt(RecipeListCount) CurrentRecipe.SetResult("DragonFlyBlue") EndWhileI got the position of the subtraction wrong in the earlier example. When you are using a variable that starts with the total number of entries, you have to subtract one first because the GetSize() function returns the total count starting at 1 yet GetAt() uses an index count starting at 0. Ok got that working, thank you. However, now the swap isn't working in game any ideas?It was late when I replied. There might need to be a cast.ConstructibleObject CurrentRecipe = LCCA_DGIngredientRecipesFlist.GetAt(RecipeListCount) as ConstructibleObject Reason I say this is that the form list, lists the forms but doesn't list the type of form. If that doesn't help, test on a new game if you haven't been already. And if that doesn't help, I'm just as clueless as you are. Link to comment Share on other sites More sharing options...
thorGraves Posted November 5, 2016 Share Posted November 5, 2016 Is it possible to "Ragdoll" a single limb? Say, an arm gets a critical hit and just hangs down for a while? Link to comment Share on other sites More sharing options...
LadyCrystyna Posted November 5, 2016 Share Posted November 5, 2016 So say I build the mod with DLC, can it be run without DLC being installed. I didn't remove the DLC masters, loaded it in the game without the DLC enabled. Game and mod loaded fine, had no issues or are my files bugged. I thought if the mod required the DLC then without it wouldn't load. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted November 5, 2016 Share Posted November 5, 2016 So say I build the mod with DLC, can it be run without DLC being installed. I didn't remove the DLC masters, loaded it in the game without the DLC enabled. Game and mod loaded fine, had no issues or are my files bugged. I thought if the mod required the DLC then without it wouldn't load.Are you modding original Skyrim or SSE? If SSE, as I understand it, the game will re-enable all the DLC. If original Skyrim, the game should have crashed. Link to comment Share on other sites More sharing options...
LadyCrystyna Posted November 6, 2016 Share Posted November 6, 2016 (edited) So say I build the mod with DLC, can it be run without DLC being installed. I didn't remove the DLC masters, loaded it in the game without the DLC enabled. Game and mod loaded fine, had no issues or are my files bugged. I thought if the mod required the DLC then without it wouldn't load.Are you modding original Skyrim or SSE? If SSE, as I understand it, the game will re-enable all the DLC. If original Skyrim, the game should have crashed. Original Skyrim, not SSE. It didn't crash with the DLC disabled through mod organizer. Was the MCM version I've been working on, I had the mod checks running for DLC though. Edited November 6, 2016 by LadyCrystyna Link to comment Share on other sites More sharing options...
IsharaMeradin Posted November 6, 2016 Share Posted November 6, 2016 If your plugin has the DLC as an actual master, it should have caused an issue when you tried to load it while the DLC were inactive. If your plugin does not have the DLC as masters and your script(s) merely check for their presence, then it would still run. Link to comment Share on other sites More sharing options...
Recommended Posts