How to do a compatibility patch?

Post » Sat Nov 17, 2012 10:43 am

Ok so I made the See You Sleep mod, and I want to make a patch to add beds from other mods, like Lmattoo's camping mod. Basically my mod has an alias list of beds which it uses to add the script to. So Do I highlight each mod but not make either of them active and then save as a new mod? So I add his bedroll to my list and save? Is it that easy? Or is it impossible? In Oblivion I think we turned our mod to an ESM but I don't think Skyrim allows that anymore.
User avatar
Reanan-Marie Olsen
 
Posts: 3386
Joined: Thu Mar 01, 2007 6:12 am

Post » Sat Nov 17, 2012 12:02 pm

cant you just use GetFormFromFile (return as objectreference) and force it into your aliases if it returns anything other than none? you dont need any sort of dependency or new esp's to do this. you only need to require the user to be updated to patch 1.6
User avatar
CSar L
 
Posts: 3404
Joined: Fri Nov 09, 2007 9:36 pm

Post » Fri Nov 16, 2012 11:24 pm

cant you just use GetFormFromFile (return as objectreference) and force it into your aliases if it returns anything other than none? you dont need any sort of dependency or new esp's to do this. you only need to require the user to be updated to patch 1.6
Apparently you are right. I just read this page: http://www.creationkit.com/GetFormFromFile_-_Game and it was like getting kicked in the head by a mule and I feel like a total noob again who knows absolutely nothing about scripting. The learning never ends... ok enough self pity. Questions:

How do I get the form Id from Lmatoos mod? Do I use get form?

Once I get the id, how do I add his bed to my list?

The wiki says this:
FormList beekillerlist = Game.GetFormFromFile(0x0000ABCD, "KillerBees.esp") As FormList
Where are they coming up with 0x0000ABCD?
User avatar
Nicholas
 
Posts: 3454
Joined: Wed Jul 04, 2007 12:05 am

Post » Fri Nov 16, 2012 9:50 pm

YourFLST.AddForm(Game.GetFormFromFile(0x00000BED, "OtherMod.esp"))
0x00000BED would have to match the FormID of the bed from the OtherMod.esp. You'd want to http://www.creationkit.com/Complete_Example_Scripts#Maintenance.2Fupdate_code_which_runs_once_per_save_load_and_shows_a_message_when_a_mod_is_updated_or_first_loaded for OtherMod.esp and add the new bed(s) when applicable. In OtherMod.esp's absence, your FLST will purge the added form(s) as FLSTs won't retain 'None'. If there are multiple beds, you can check for one's existence before trying to add the others as each time GetFormFromFile is used and asFileName isn't loaded, it'll be reported in one's log.

If there are a lot of beds in a mod, keep in mind you can http://www.creationkit.com/Arrays_(Papyrus)#Creating_a_FormID_Array.

FormList Property YourFLST AutoFurniture[] Property OtherModBedFormIDArray Auto ; All the bed FormIDs converted from hex to decimal.If Game.GetFormFromFile(0x00000BED, "OtherMod.esp")	Int iIndex = OtherModBedFormIDArray.Length	While iIndex > 0		iIndex -= 1		YourFLST.AddForm(Game.GetFormFromFile(OtherModBedFormIDArray[iIndex], "OtherMod.esp"))	EndWhileEndIf
User avatar
Katie Pollard
 
Posts: 3460
Joined: Thu Nov 09, 2006 11:23 pm

Post » Sat Nov 17, 2012 10:23 am

i noticed none of my beds work with your mod. does your alias search from a pre-defined formlist of vanilla base objects before filling the alias when it finds a match from the formlist?

if that is the case, it would be easier if we incorporated this into our own mods rather than you having to do a patch to include all possible mods

a simple quest that runs the getformfromfile (formlist from your mod) then addform for each bed type

if you want to PM me with the source code, i can help you write a compatibility tutorial so each modder can handle their own compatibility issues

otherwise, you may end up getting a never ending stream of requests to make compatibility with so-and-so's favorite mod
User avatar
Colton Idonthavealastna
 
Posts: 3337
Joined: Sun Sep 30, 2007 2:13 am

Post » Fri Nov 16, 2012 7:56 pm

i noticed none of my beds work with your mod. does your alias search from a pre-defined formlist of vanilla base objects before filling the alias when it finds a match from the formlist?

if that is the case, it would be easier if we incorporated this into our own mods rather than you having to do a patch to include all possible mods

a simple quest that runs the getformfromfile (formlist from your mod) then addform for each bed type

if you want to PM me with the source code, i can help you write a compatibility tutorial so each modder can handle their own compatibility issues

otherwise, you may end up getting a never ending stream of requests to make compatibility with so-and-so's favorite mod
I think this sounds good.

What about keywords? Rather than use a list, can't we search for a bed that has a keyword in it that we add to all the beds we want to use? So you put a keyword SeeYouSleep in it, and then my mod would use it. Is something like that possible?
User avatar
Rudi Carter
 
Posts: 3365
Joined: Fri Sep 01, 2006 11:09 pm

Post » Sat Nov 17, 2012 4:21 am

unfortunately not.

amethysthollows.esp.SYSkeyword is a separate object as seeyousleep.esp.SYSkeyword (totally diiferent form ID's)


although, you could find a deprecated vanilla keyword that isnt used by the game (sift through the keyword objects in the editor window, and look for any that have use count 0). that way they will return the same form ID regardless of the mod that uses it.

just hope no other mod is trying to do the same kind of thing.
User avatar
Kristina Campbell
 
Posts: 3512
Joined: Sun Oct 15, 2006 7:08 am

Post » Sat Nov 17, 2012 8:52 am

unfortunately not.

amethysthollows.esp.SYSkeyword is a separate object as seeyousleep.esp.SYSkeyword (totally diiferent form ID's)


although, you could find a deprecated vanilla keyword that isnt used by the game (sift through the keyword objects in the editor window, and look for any that have use count 0). that way they will return the same form ID regardless of the mod that uses it.

just hope no other mod is trying to do the same kind of thing.
Ok well it was just an idea. Check your PM, I sent you the source.
User avatar
kasia
 
Posts: 3427
Joined: Sun Jun 18, 2006 10:46 pm


Return to V - Skyrim