Installation: Go to DocumentsMy GamesSkyrim Open SkyrimPrefs.ini,look for the line bEnableFileSelection (use ctrl+f in the Notepad),set the value to 1 Click and drag the 'data' folder to your game directory. Select and tick NEPWEAPS in Skyrim launcher and pl. Just like animation mods, you should always run FNIS when you add a poser mod. For the Pinup Poser mod, you will find 30 rings in your apparel. You must favourite and add to hotkeys whichever pair you wish to use. It is very important that you are using the right selector/ring pair.
Over the winter holiday I ran into a problem that resulted in the creation of a new mod and a new tool for Skyrim. The mod is called Poser Hotkeys and the tool that generates the data for the mod is PoserDataGen.
Recently, I’ve been spending most of my time in Skyrim setting up cool scenes for screenshots. I have several poser mods installed and I was finding it tedious to find a cool pose, apply it to an actor, position the actors and then find a good camera angle. I use several tools for this, but none of them seemed to play together nicely.
I have heard of some tool that allows you to assign hotkeys to iterate through poses in the MCM. That sounded great but I could never find a reliable download source, so I just created my own mod for it. You can get my mod and the data tool for the mod on the Nexus. The source code repositories are also available here and here.
If you want to know how to use them in your game, check out the Read Me or Nexus description. The rest of this post is a breakdown of what these things do, how and why.
Adding animations to Skyrim is made possible through a tool called Fores New Idles in Skyrim, or FNIS for short. If you are interested, Fore has some technical documentation available on the FNIS Nexus page.
When an artist adds animations to Skyrim, they need to supply FNIS with a text file containing a list of the animation files along with a name for each animation or pose. These names provide a means to play the animation through SendAnimationEvent in Papyrus.
Poser Hotkeys is essentially a means to organize animation events and call SendAnimationEvent when a user presses a button. In order to send the correct animation event, Poser Hotkeys has to know the event name to send. This is where PoserDataGen comes in.
PoserDataGen is a .NET tool that scans your Skyrim animations folder for FNIS definitions. These definitions are then placed into data files that Poser Hotkeys can read at run time. Being data driven allows the mod to work with any poser combination that exists on a user’s setup without the need to recompile scripts or make changes in the CreationKit.
Originally, I threw the data into XML and used FISS to read it at run time. This worked reasonably well, but there were some problems. The first is that FISS seems to be unable to handle reading a string from an empty XML attribute. For example, reading from the element “name” below:
2 | <moreStuff>some stuff</moreStuff> |
I would expect this to return an empty string, but instead FISS sends through the XML starting with the end of the “name” element. In this example, the string returned by FISS for element “name” would be:
2 | <moreStuff>some stuff</moreStuff> |
This is a problem for me, since there are times I am expecting elements to be empty. A second problem I was having was that I couldn’t scan a folder for XML files. This meant that I had to either create a hard coded list of XML to look for (thus limiting the poser support) or cram all of the definitions into a single, known XML file.
I opted to cram everything into a single XML file, which then created other problems: I could only handle 128 poser packs since that is the array length limit of Papyrus, whenever a user installed or removed a poser the entire XML file had to be recreated with PoserDataGen from scratch (invalidating their favorites), and the file had to be loaded by the user in MCM before the mod could be aware of data.
Beyond all that, another problem was that I was introducing an additional dependency for the user.
Since I already require PapyrusUtil for functions related to NPC packages (to stop them in place while they play an animation) I took a look at the Json library that comes with it. It turns out that JsonUtil works very well, so I changed PoserDataGen to spit out .json data files that JsonUtil can read at run time. This lets me update and save parts of the loaded .json files on the fly during run time and save things, like the currently selected pose, directly in the pose’s data file. There is also a function to get an array of all .json files in a specific directory, which lets me scan for poser data files without having to know which ones to look for ahead of time.
How it works now is that PoserDataGen loads all of the FNIS animation lists and organizes the pose data by poser and by “poser pack.” I define a poser to be an FNIS list file and a “poser pack” to be animation definitions that share a similar prefix. For example, Halo’s Poser S comes with two FNIS files which results in two poser data files. Each FNIS file has several groups of animations starting with a similar prefix. For example, all poses that are part of Halo’s Poser Module 11 start with “H11P” resulting in a “poser pack” called H11P in the data file.
I allow a user to specify their Skyrim directory in the accompanying config file. If it’s not there, I try to find it in the registry. Failing that, I try a hard-coded default path that Steam uses when it installs the game. Here is the C# for it:
2 4 6 8 10 | this.skyrimDirectory=Settings.Default.SkyrimDirectory; // try default skyrim directory if none in settings if(String.IsNullOrWhiteSpace(this.skyrimDirectory)) varlocalSkyrimDirectory=Registry.GetValue(@'HKEY_LOCAL_MACHINESOFTWAREBethesda SoftworksSkyrim','Installed Path',DefaultSkyrimDirectory); this.skyrimDirectory=localSkyrimDirectory?.ToString()??DefaultSkyrimDirectory; |
Once I find a valid animations folder, I save the Skyrim directory in the config so I don’t need to keep asking for it every time you open the app: