Transferring data between clean saves

Post » Tue Nov 20, 2012 5:02 am

I've been trying to figure out a way to save a bunch of arrays between clean saves.

I tried making a transfer mod that would take the data from the mod store it then implant it later. Since they were both .esp though, I couldn't get the transfer mod to save the references to the main mod. It would appear to save, but after reloading it the properties would always empty out.

I'm unfamiliar with making .esm mods, but would making the main mod a .esm work? Also is this the only way? I believe the conversion will require a clean save wiping tons of stored data. Which I'm trying to avoid in the first place. So I'm hesitant to try this without getting some advise first.

Thanks in advance
User avatar
Wane Peters
 
Posts: 3359
Joined: Tue Jul 31, 2007 9:34 pm

Post » Tue Nov 20, 2012 5:08 am

you're going to have to be more specific. Do you mean between two different plugins?

You can't share data between plugins, your plugins cannot "see" other plugins, or the forms added by them, unless you use GetFormFromFile via scripting. There is very limited interaction that can happen between two esps (largely by design).
User avatar
maddison
 
Posts: 3498
Joined: Sat Mar 10, 2007 9:22 pm

Post » Tue Nov 20, 2012 1:43 am

Thanks for the response

There is Mod A (.esp)
Mod A is the main mod where everything happens. In this mod large arrays are stored by the user. Sometimes I make changes that require a clean save. At the same time I want to preserve these arrays.

In an attempt to accomplish this I was going to create Mod B (.esp)
Mod B would store these arrays while Mod A goes through a clean save. When mod A is re-installed Mod B would load the stored arrays back into Mod A.

I have made some progress.
I successfully transferred the arrays back and forth between both mods by making Mod A a master of Mod B. I did this using WryeBash, using esmify on ModA, then setting it as a master to Mod B in the creation kit and saving, then finally using espify on ModA. This gave me two .esp that can actively communicate with each other. Works great except that if Mod A isn't installed and Mod B is the game crashes. Therefor I can't carry the values while Mod A goes through clean save.

I was hoping someone had already come up with a method to transfer data between clean saves. It doesn't have to be this method it was just an idea I was trying.
User avatar
Carlos Vazquez
 
Posts: 3407
Joined: Sat Aug 25, 2007 10:19 am

Post » Tue Nov 20, 2012 12:45 pm

I was hoping someone had already come up with a method to transfer data between clean saves. It doesn't have to be this method it was just an idea I was trying.

I think it might be possible with this:
http://www.creationkit.com/SetINIFloat_-_Utility

But like it says, they are not written to the file so it would only work if you do not quit the game before you make/load a clean save.. You cannot read or write to files with papyrus, so you don't really have eany options other than this... It might even reset when you load a or start a new game though.

Also if you have arrays full of data, you might not have enough random ini settings to hold the information. Well, maybe if you change it to a string and back.
User avatar
Kristian Perez
 
Posts: 3365
Joined: Thu Aug 23, 2007 3:03 am

Post » Tue Nov 20, 2012 11:03 am

Thanks for the reply =]
That is an interesting idea. Unfortunately I'm working with what can be large arrays and a good bit of them are form arrays too. The mod can have 60 arrays indexed at 35, 20 arrays at 15, and 4 arrays at 100. Granted it is very rare these will all be filled but they must all be accounted for.

After talking to the author of Convenient Horses, he pointed me to a good method. By starting and stopping a quest you can update it's properties. You just have to store the values elsewhere and implant them after the quest restarts. Unfortunately my mod uses a complex system to store arrays that involves object refs of a form stored in a form list. Also some of the core data is stored on a persistent activator.

I think I may just have to wait for a way to save information to an .ini

Thanks again
User avatar
Jacob Phillips
 
Posts: 3430
Joined: Tue Aug 14, 2007 9:46 am

Post » Tue Nov 20, 2012 4:28 am

I got it to work!

I made the main mod (Mod A) dependent on the transfer mod (Mod B ).
Mod B is now a master file (.esm) and has one script in a quest.
This script has nothing but the properties to hold values.
Mod A does all the work to put the values in those properties.
Then I completely remove Mod A and save.
When I reload Mod A I can put all the values back into it and get the clean save effect.

This is just as good as having an external file for my purposes. Yay =]
User avatar
Jordan Fletcher
 
Posts: 3355
Joined: Tue Oct 16, 2007 5:27 am

Post » Tue Nov 20, 2012 1:22 am

I got it to work!

I made the main mod (Mod A) dependent on the transfer mod (Mod B ).
Mod B is now a master file (.esm) and has one script in a quest.
This script has nothing but the properties to hold values.
Mod A does all the work to put the values in those properties.
Then I completely remove Mod A and save.
When I reload Mod A I can put all the values back into it and get the clean save effect.

This is just as good as having an external file for my purposes. Yay =]

Oh, I thought you meant accessing the same data between two separate saves. I.e. load a game and play for a while, then save some information and start a new game with access to that same information.

But you actually meant: How you can store data from a mod (in a single save) after the mod has been deactivated, in order to access it again later if the mod was re-activated... is that correct?

If so, maybe change the first line of the first post to help random people passing by understand.
User avatar
gary lee
 
Posts: 3436
Joined: Tue Jul 03, 2007 7:49 pm


Return to V - Skyrim