Open BlackDog86 opened 3 weeks ago
So based on some digging these enums are used in the ParticleEffects config array to add particle effects to photobooth poses via config, but like why do that when poses can be added to pose animations directly via animnotifies like TLE poses do?
OK so - as I understand it, m_arrAnimationPoses is a config array of AnimationPoses structs with the following stuff inside: struct native AnimationPoses
{
var localized string AnimationDisplayName;
var name AnimationName;
var float AnimationOffset;
var Photobooth_AnimationFilterType AnimType;
var array<Photobooth_ParticleEffectType> ParticleEffectTypes; <<<----- this is the array of enums
var bool bExcludeFromGroupShots;
var bool bExcludeFromTemplar;
};
By convention, most people add new poses by adding new lines to XComContent.ini like this:
+m_arrAnimationPoses=(AnimationName="AS_Cal_Pinup_16",AnimationOffset=0.25,AnimType=ePAFT_None)
(this one from Kexx calendar pack).
Presumably new poses can also specify particle effects, like this:
+m_arrAnimationPoses=(AnimationName="Photobooth_TemplarPoses",AnimationOffset=1.25,AnimType=ePAFT_Templar,ParticleEffectTypes=(ePPET_TemplarBladeRight,ePPET_TemplarBladeLeft))
Meanwhile, there is a config array of ParticleEffects which can be specified like:
+ParticleEffects=(PSTemplateName="TLE_FX_Photobooth.P_Deflect_Shield_Looping",SocketName="CIN_Root",ParticleEffectType=ePPET_TemplarShield)
From what I can tell, the code in SetParticleEffects seems to goes through each ParticleEffectTypes in the array of AnimationPoses and checks those against each element of the seperate ParticleEffects array before playing them, with the link between the two being this ePPET_
So it's using a enum as a key to connect two config arrays. Sounds like if mod authors want to add new poses using this feature, they have to first submit a CHL PR to add new enums. Ugh, this is awful, how did this even get approved. I suppose at this point we just have to support it, but in the presence of a much simpler method (adding PFX directly to pose animsequences like TLP poses do), I don't see anybody ever using it.
Yeah I don't know of any mods actively using the feature to be fair. It does seem like a very awkward way of doing it - the code should probably be refactored so that a single animpose config array including all the particle effects can be specified but yeah, maybe I should never have dug this up in the first place!
OK so - as I understand it, m_arrAnimationPoses is a config array of AnimationPoses structs with the following stuff inside: struct native AnimationPoses
{ var localized string AnimationDisplayName; var name AnimationName; var float AnimationOffset; var Photobooth_AnimationFilterType AnimType; var array<Photobooth_ParticleEffectType> ParticleEffectTypes; <<<----- this is the array of enums var bool bExcludeFromGroupShots; var bool bExcludeFromTemplar; };
By convention, most people add new poses by adding new lines to XComContent.ini like this:
+m_arrAnimationPoses=(AnimationName="AS_Cal_Pinup_16",AnimationOffset=0.25,AnimType=ePAFT_None)
(this one from Kexx calendar pack).Presumably new poses can also specify particle effects, like this:
+m_arrAnimationPoses=(AnimationName="Photobooth_TemplarPoses",AnimationOffset=1.25,AnimType=ePAFT_Templar,ParticleEffectTypes=(ePPET_TemplarBladeRight,ePPET_TemplarBladeLeft))
Meanwhile, there is a config array of ParticleEffects which can be specified like:
+ParticleEffects=(PSTemplateName="TLE_FX_Photobooth.P_Deflect_Shield_Looping",SocketName="CIN_Root",ParticleEffectType=ePPET_TemplarShield)
From what I can tell, the code in SetParticleEffects seems to goes through each ParticleEffectTypes in the array of AnimationPoses and checks those against each element of the seperate ParticleEffects array before playing them, with the link between the two being this ePPET_ enum which has to be specified in both arrays. So presumably, if one wants to add an animpose with a custom particle effect just using config, it would have to use one of the other not-already-defined enums otherwise the SetParticleEfffects code would prevent the effect from playing, maybe?
Well, since you already started, would you mind laying out some of that in the docs? The short version.
Adds docs for issue #359