That should be able to cover it. If there were a method to load it automatically that would be better but I don't know how that would be able to be done. I don't mind using infinite heaven though, considering I already use it anyway.Tex wrote:Yeah, sorry, Player.ApplyFormVariationWithFile(fovaFilePath) is the one.
For my test, as mentioned hospital already had fova files in it's pack, for scarf I just grabbed the fova files from the cutscene fpk (sna0_main1_v00.fv2 is the mask) and jammed them in the plparts_normal_scarf.fpk
There's a couple of downsides:
If there's a player emblem will change to the default emblem, not that big of a deal.
Player fova is reset on any load (mission start, checkpoint restart). A bigger deal.
I know you're capable enough to use that to start testing stuff, so what I intend to do:
I have a method in mind that might mean all a model swap needs to provide is a lua file with the same name as the plparts fpk which will contain simple info about the fova (path + description), and bundle the fova in the plparts pack. Hopefully it actually pans out.
And I would have to work out saving (easyish with my current setup) and restoring (a matter of finding the right place in execution to run it). Though this will be complicated a bit to allow the user to change model swap pack at will.
That of course does does mean relying on infinite heaven, but an independent system would essentially have to do what inf heaven would be doing anyway: button input>menu/data file>menu selection of fova etc.
Would that cover what you had hoped to be able to do? If not what did you have in mind?
Also, did a quick test with it for the Medic's outfit and it worked. dds0_main2_v01.fv2 brought up the clean medical glove he used when operating on Paz http://i.imgur.com/wMlSSnB.jpg
Now I just need to find the fv2 that loads up the model for the gloves that are present on the model since that's the reason I posted that in the first place. Thanks a lot Tex, this can potentially solve a issue me and another user were trying to fix for a couple of months now.
EDIT: Found it, it was simply the dds0_main2_v05 fova file. http://i.imgur.com/5scmnqg.jpg
Thanks a lot Tex. Can't wait for your fova loading method with Infinite Heaven.