HeartlessSeph wrote:It's a bit of a long shot to ask, but does anyone know how to make models that appear invisible in normal gameplay inside of an fmdl become visible? I'm talking about items like Skull Face's mask and Venom Snake's scarf. Swapping their models onto the player has these models invisible but they are triggered to appear during cutscenes (Skull Face's mask generally appears in Scenes with him and Venom Snake's face scarf pops up when using the scarf model during the mission where you rescue Kaz).
I think it's the .fv2 files aka fova aka Form Variations:
https://youtu.be/6bEV3P564ps
In the video the debugshiz just sets vars.playerPartsType = PlayerPartsType.HOSPITAL, not new stuff, though I don't think there's been much actual discussion about it.
The engine aparently monitoring when the variable is set (and similar vars) so it can do the model change the same as mission prep would (or the same as prologue mission in the case of this model).
The engine must have an internal list for enum to file pack and .parts file.
I did hunt around to see if the parts file could be set for the player model from script - since that's what defines the fmdl and related files that are used, the enemy soldier system does (one main one and an alternate), and the hostages can be set more or less individually if needed.
There are the Player.RegisterPartsPackagePath calls in start.lua, but as it's incomplete and there is no apparent effect on swapping them around I'm guessing it's orphaned code.
One function that looked promising was Player.SetPartsInfoAtInstanceIndex which is referenced in the exe but has no use cases in the scripts to learn from. Passing it a parts path like the soldier fova functions take shows some interesting behavior where the player model will disappear in like setting the player vars, but unfortunately when it returns the model hasn't been changed.
One frustrating thing is how special-case most of the script>engine calls are for things that are seem just a step away from something more generic/flexible.
So, back to the original point: .fv2/fova files - plparts_hospital.fpk seems to be the only player parts pack with multiple .fv2 files. In the prologue mission the function Player.ApplyFormVariationWithFile is used change to these fovas, it's the only example of it's use in the scripts.
That said, both male and female parasite suit fpks have two fovas, but testing them shows no apparent change.
If you look in data1.dat\\Assets\tpp\level_asset\chara\enemy\Soldier2FaceAndBodyData.lua - use this:
http://pastebin.com/96U6Xp61 as it's a slightly more updated version from my deminified luas where I've added some notes.
You'll see face and body ids index into tables of .fv2 paths along side the fpk that includes them, and in the case of faces (which the dd player model type uses) it indexes to face, face decoration, hair file, and hair decoration .fv2 files/fpks.
The packs/files themselves will likely be familiar to those who have poked around them manually.
I still don't understand how a fmdl maps to a fv2, and there's no parts files that I can find that reference them, it may just be in the specific handling function for head fova fpks, or yet more tables in the exe. Then you have stuff like glasses which are separate fmdls in the same fova fpk.
The .fv2 file itself? I guess it's some kind of mask into a specific fmdls mesha and material definitions? I don't know, I'm weak on file formats and modelling in general, someone else will have to take the reigns, though I'd like to learn more.
Also which fmdl is the hideo head? Would be a nice reference point since it seems unique? (But then unlike others the facefova indices listed are unexpected) If anyone has their own notes on different files it would be nice to try and cross reference.