Making a compatibility patch for an official DLC

Post » Sat May 28, 2011 1:49 am

Hi!

For my project, Losing my Religion, I have to make a compatibility patch with Knights of the Nine. I do not have KOTN, and I do not plan on buying it either.
What the patch would do, is simply making the visual changes I did to the Chapel of Dibella work with the ruined verison of KOTN. I also have new NPCs I'd put dead inside the chapel.

Now here comes my question. Is it possible, without having the official DLC, to call script variables of that DLC without having it activated in the CS?
What I mean, is that I want to use KOTN's variable that destroys and then restores back the chapel of Dibella. And then put that variable inside a script I write that is attached to Losing My Religion's objects and actors.

I guess it is not possible only with the CS. Would it be possible with something like TES4Edit?

Thanks!
User avatar
neen
 
Posts: 3517
Joined: Sun Nov 26, 2006 1:19 pm

Post » Sat May 28, 2011 5:48 am

Pretty sure that's a neg...

I think your best bet would probably be to collaborate with someone who does have KotN. Since is a pretty small thing you're looking to do, finding someone who would be capable of doing it shouldn't be too hard...
User avatar
tiffany Royal
 
Posts: 3340
Joined: Mon Dec 25, 2006 1:48 pm

Post » Sat May 28, 2011 1:18 am

Pretty sure that's a neg...

I think your best bet would probably be to collaborate with someone who does have KotN. Since is a pretty small thing you're looking to do, finding someone who would be capable of doing it shouldn't be too hard...


Aye, that was indeed what I thought.
I wanted to do it myself before bothering a modder with this small issue. :P

Thanks a lot Dragoon! :goodjob:

EDIT: Oh I do have another question related to that.

To make things simple for the modder who will do the patch, I'll prepare everything by making a ruined chapel of Dibella, placing the dead NPCs, and writing up the script that, with KOTN, will change the chapel from a restored to a destroyed version and vice versa. I'll call one of my own variables that the modder will replace with the one from KOTN.

So, this being said, would the mod still be playable if LosingMyReligion.esp does not have KOTN as a requirement? I know it would load up an error in the CS because it can't find KOTN's variable, but inside the game, will someone who does not have KOTN still play the mod normally?

The reason I'm asking this is that making a compatiblity esp file would require the modder to place the decoration, dead NPCs and write the script himself. And I prefer to do this part. I believe it would also mean that I have to make a duplicate of LMR's esp file for the patch. If I release an update to the main file, I'd need the update to be applied on the patch as well.

So, since there would be only the script that changes the chapel's state that would not run, I suppose the mod would still be playable?
User avatar
Danel
 
Posts: 3417
Joined: Tue Feb 27, 2007 8:35 pm

Post » Sat May 28, 2011 10:42 am

I think so..... the script would already be compiled, and if you enclosed that particular bit in an IsModLoaded type loop, so, if it isn't, that bit would never execute, shouldn't be a problem.

I think.
User avatar
Charlotte Lloyd-Jones
 
Posts: 3345
Joined: Fri Jun 30, 2006 4:53 pm

Post » Fri May 27, 2011 10:03 pm

The issue will be that if another mod is not a master for yours, its formids do not get automatically adjusted on load. You'll need to determine the refs at run-time using GetFormFromMod in a script that run when GetGameLoaded says to do so. If you just retrieve them all at startup, and save them as quest variables in the compatibility script, it should be easy enough.

if GetGameLoaded  if (IsModLoaded "xxx.esp")    set XxxLoaded to 1    set ItemRef to GetFormFromMod "xxx.esp" "nnnnnn"    ...  else    set ItemRef to VanillaItem    ...  endifendif


The "nnnnnn" is the formid without the high-order byte - the call to GetFormFromMod will add that. Then you use CompatibilityQuestname.ItemRef when you need the current value, or the XxxLoaded if you want mod-dependent outcomes.
User avatar
Vickytoria Vasquez
 
Posts: 3456
Joined: Thu Aug 31, 2006 7:06 pm

Post » Sat May 28, 2011 2:27 am

Just wanted to add that I've done similar to ghastley's code several times, for example to make doors to player owned houses un-openable (when not paying taxes), even if the vanilla doors are replaced by doors added by BBC or OBC - and it really works as intended :)
User avatar
maddison
 
Posts: 3498
Joined: Sat Mar 10, 2007 9:22 pm

Post » Sat May 28, 2011 4:35 am

The issue will be that if another mod is not a master for yours, its formids do not get automatically adjusted on load. You'll need to determine the refs at run-time using GetFormFromMod in a script that run when GetGameLoaded says to do so. If you just retrieve them all at startup, and save them as quest variables in the compatibility script, it should be easy enough.

if GetGameLoaded  if (IsModLoaded "xxx.esp")    set XxxLoaded to 1    set ItemRef to GetFormFromMod "xxx.esp" "nnnnnn"    ...  else    set ItemRef to VanillaItem    ...  endifendif


The "nnnnnn" is the formid without the high-order byte - the call to GetFormFromMod will add that. Then you use CompatibilityQuestname.ItemRef when you need the current value, or the XxxLoaded if you want mod-dependent outcomes.


Oh, using OBSE it is possible then. I love OBSE and all its functions, but I've decided instead to get the DLC, simply because it will be less of a hassle to mod the patch and make sure everything's okay. :) And I'd want to have a broader range of people who can play the mod. (If I recall correctly, Direct2Drive Oblivion is not compatible with OBSE.)
Still, thank you very much for your answer, I'll save that script bit in my folders for future usage on possible compatibility patches! :goodjob:
User avatar
Ana
 
Posts: 3445
Joined: Sat Jul 01, 2006 4:29 am

Post » Sat May 28, 2011 10:12 am

If the load order position of the DLC is not fixed, that influences the FormIDs (unlike SI, which effective merges its content into the base). You may have to use those OBSE functions anyway to get the right IDs for each possible configuration of mods.
User avatar
Tanya
 
Posts: 3358
Joined: Fri Feb 16, 2007 6:01 am


Return to IV - Oblivion