Jump to content

Quick Questions, Quick Answers


Mattiewagg

Recommended Posts

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.

It did have DLC as masters, had a few things that required DLC to craft them. Yes my scripts check for DLC on mod start. Which is why I'm curious about this I didn't think it was supposed to load into game with DLC disabled when the mod requires it. Unless the Item swap was actually working but the recipe didn't show up as I tied it to a dlc named global value.

Edited by LadyCrystyna
Link to comment
Share on other sites

  • Replies 2.6k
  • Created
  • Last Reply

Top Posters In This Topic

 

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.

It did have DLC as masters, had a few things that required DLC to craft them. Yes my scripts check for DLC on mod start. Which is why I'm curious about this I didn't think it was supposed to load into game with DLC disabled when the mod requires it. Unless the Item swap was actually working but the recipe didn't show up as I tied it to a dlc named global value.

 

You've got me stumped on this one. No idea what is going on.

Link to comment
Share on other sites

 

 

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.

It did have DLC as masters, had a few things that required DLC to craft them. Yes my scripts check for DLC on mod start. Which is why I'm curious about this I didn't think it was supposed to load into game with DLC disabled when the mod requires it. Unless the Item swap was actually working but the recipe didn't show up as I tied it to a dlc named global value.

 

You've got me stumped on this one. No idea what is going on.

 

Ok thanks, I just thought it was really weird unless the item swap in the game makes it not require the DLC. It's got me stumped also.

Link to comment
Share on other sites

 

 

 

 

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?

 

 

Ok I understand the global value to make the recipe show as well as the workbench swap however, the item swap is not working for some reason I'm thinking it's a scripting issue but I'm not seeing why it's not working (not good with scripting). Any help with this would be appreciated. Thanks in advance.

 

Here is what I came up with:

 

 

 

Scriptname LCCA_DG_CompatibilityScript extends Quest
GlobalVariable Property LCCAInstDawnguard Auto
Keyword Property CraftingTanningRack Auto
FormList Property LCCA_DawnguardItems Auto
FormList Property LCCA_DawnguardLeatherRecipes Auto
MiscObject Property DLC1DeerHide Auto ; Vale Deer Hide
; Leather Recipes
ConstructibleObject DG_RecipeLeatherValeDeerHide_A_LCCA
ConstructibleObject DG_RecipeLeatherValeDeerHide_C_LCCA
Function DG_Compatibility()
If LCCAInstDawnguard.getValue() == 1
LCCA_DawnguardItems.AddForm(Game.GetFormFromFile(0x02011999, "Dawnguard.esm")) ; Vale Deer Hide
DG_Enable()
DG_SwitchLeatherWorkbenchOn()
EndIf
EndFunction
Function DG_Enable()
DG_RecipeLeatherValeDeerHide_A_LCCA.SetResult(DLC1DeerHide)
DG_RecipeLeatherValeDeerHide_C_LCCA.SetResult(DLC1DeerHide)
EndFunction
Function DG_SwitchLeatherWorkbenchOn()
Int RecipeListCount = LCCA_DawnguardLeatherRecipes.GetSize()
While RecipeListCount >= 0
RecipeListCount -= 1
ConstructibleObject CurrentRecipe = LCCA_DawnguardLeatherRecipes.GetAt(RecipeListCount) As ConstructibleObject
CurrentRecipe.setWorkbenchKeyword(CraftingTanningRack)
EndWhile
EndFunction

Link to comment
Share on other sites

LCCA_DawnguardItems.AddForm(Game.GetFormFromFile(0x02011999, "Dawnguard.esm")) ; Vale Deer Hide

GetFormFromFile uses the ID# for the form within the plugin only, load order is not considered.

If the ID# in the CK and game is 02011999, its ID# for GetFormFromFile is 00011999

Link to comment
Share on other sites

The workbench swap is working the activating global value is also working. However, the item swap still is not working.

 

 

Edit: I kept messing with the script and got it to work. If anyone wanted to know you have to do each item separately so if you have multiple swaps you can only do one swap per function. Make sure you set that constructible object to that specific item and no others are set to that item. But it works. Thank you so much for your help IsharaMeradin :smile:

 

 

 

Function DG_SwitchValeDeerHide()
Int RecipeListCount = LCCA_DawnguardRecipes.GetSize()
While RecipeListCount >= 0
RecipeListCount -= 1
ConstructibleObject CurrentRecipe = LCCA_DawnguardRecipes.GetAt(RecipeListCount) As ConstructibleObject
If CurrentRecipe.GetResult() == DeerHide
CurrentRecipe.SetResult(DLC1DeerHide)
EndIf
EndWhile
EndFunction

Edited by LadyCrystyna
Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...
  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...