Jump to content

Best tool for creating Data Structures in Skyrim Papyrus? (JContainers or alternative?)


opusGlass

Recommended Posts

No problem, it was interesting to finally see how Papyrus really can be slow. All the scripts I have done have been so small.

 

Maybe this Wiki tutorial has something in it (it is a long one - really): http://www.creationkit.com/index.php?title=Creating_Multithreaded_Skyrim_Mods

 

The tutorial apparently concentrates on spawning actors, but if they could somehow be replaced by json elements or MCM options, then that might help. Instead of using threads to spawn actors, the actual work would be to handle one json and/or MCM element and all the list looping + copying related to it.

 

When I last read that tutorial, it was a bit complicated, or maybe I just did not know things then (still I do not know but let's nevermind that). If you have an idea on how to make scripts run in parallel in an easy way, then that is great. Maybe you could even use SKSE ModEvents for communication somehow, like in the tutorial? The Wiki says ModEvents need to be registered for on each game load, but maybe if it would be possible to register the refs for the mod events (in a non-parallel, non-asynchronous way) from inside the MCM script before starting the parallel stuff by ModEvents? Maybe calling a function on each ref that registers it, and when that is finished, then start despatching the parallel jobs with ModEvents? Or not? Incorporating the job/ref/thread manager in the MCM script somehow? Or not?

 

I really have no idea. Maybe the tutorial could offer a better understanding of how to make things parallel, and then it might be easier to make one's own version with that gained knowledge. The tutorial's way of doing it looks so... sophisticated? Maybe there is an easier way to do it, too. Or maybe there is not.

 

It should apparently be possible to use a quest with a ReferenceAlias pointing at the player character/reference, and then attach a script to that ReferenceAlias. When the script on the player Alias extends Actor script, OnPlayerLoadGame event should work. I think it does, I do not remember if I have done it myself, the MCM event has been enough for me. Maybe that one could be used? Or not? It still requires a quest and an Alias.

Edited by Contrathetix
Link to comment
Share on other sites

Wanted to state about the differences.

 

In PU offloading changes into JSON is done automatically or manually. Be aware that it's possible that it will save your changes in the middle of the modification process. If your are going just read the file then it shouldn't matter.

In JC, when you read the file persistent tree of data structures being created. It is not tied to the original file. This means that no matter what will happen with the original file later - say you loaded your save file ten years later.. the original data will still be there until the tree exists. But, you have to save or read things manually.

Edited by silvericed
Link to comment
Share on other sites

Wanted to state about the differences.

 

In PU offloading changes into JSON is done automatically or manually. Be aware that it's possible that it will save your changes in the middle of the modification process. If your are going just read the file then it shouldn't matter.

In JC, when you read the file persistent tree of data structures being created. It is not tied to the original file. This means that no matter what will happen with the original file later - say you loaded your save file ten years later.. the original data will still be there until the tree exists. But, you have to save or read things manually.

 

Thank you silvericed. I was a little unclear on the differences. I ended up sticking with JC for my file and judging by your description I'm glad I did -- I don't want or need to tie my parameters to an external JSON. I'll provide an optional Save/Load interface and that'll be the extent of my JSON use.

 

I'm almost done with my script -- you guys will see the first iteration of it released with Beasts of Tamriel, then later I'll upload a modder's resource version.

 

@silvericed -- do you plan to update JContainers for SSE, assuming SKSE gets updated? I'd really like to release my tool for SSE since I expect most authors to migrate. But I depend on SKSE, SkyUI, and now JContainers so that may never be possible.

Link to comment
Share on other sites

 

Wanted to state about the differences.

 

In PU offloading changes into JSON is done automatically or manually. Be aware that it's possible that it will save your changes in the middle of the modification process. If your are going just read the file then it shouldn't matter.

In JC, when you read the file persistent tree of data structures being created. It is not tied to the original file. This means that no matter what will happen with the original file later - say you loaded your save file ten years later.. the original data will still be there until the tree exists. But, you have to save or read things manually.

 

Thank you silvericed. I was a little unclear on the differences. I ended up sticking with JC for my file and judging by your description I'm glad I did -- I don't want or need to tie my parameters to an external JSON. I'll provide an optional Save/Load interface and that'll be the extent of my JSON use.

 

I'm almost done with my script -- you guys will see the first iteration of it released with Beasts of Tamriel, then later I'll upload a modder's resource version.

 

@silvericed -- do you plan to update JContainers for SSE, assuming SKSE gets updated? I'd really like to release my tool for SSE since I expect most authors to migrate. But I depend on SKSE, SkyUI, and now JContainers so that may never be possible.

 

Sure. But I'll need to wait for SKSE source code release

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...