Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs for Issue #359 - Photobooth Enums #1403

Merged

Conversation

BlackDog86
Copy link
Contributor

Adds docs for issue #359

@BlackDog86 BlackDog86 self-assigned this Nov 2, 2024
@BlackDog86 BlackDog86 added needs-docs Needs documentation ready-to-review A pull request is ready to be reviewed docs and removed needs-docs Needs documentation labels Nov 2, 2024
@BlackDog86 BlackDog86 requested a review from Iridar November 2, 2024 10:30
Copy link
Contributor

@Iridar Iridar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appreciate the efforts, but at the moment docs don't make it clear how to make use of this feature. I assume it expects mod authors to submit their own PRs that would add more members to the enum so then their mods can take advantage of the new values? TBH I have a hard understanding why this feature is necessary at all.

@Iridar
Copy link
Contributor

Iridar commented Nov 11, 2024

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?

@BlackDog86
Copy link
Contributor Author

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?

@Iridar
Copy link
Contributor

Iridar commented Nov 12, 2024

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.

@BlackDog86
Copy link
Contributor Author

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!

@Iridar
Copy link
Contributor

Iridar commented Nov 14, 2024

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.

@Iridar Iridar added waiting-on-author A pull request is waiting on changes from the author and removed ready-to-review A pull request is ready to be reviewed labels Nov 16, 2024
@Iridar Iridar added this to the 1.30.0 milestone Dec 2, 2024
@BlackDog86 BlackDog86 force-pushed the 359-PhotoBooth-Particle-Docs branch from 03080f3 to fc7fe60 Compare December 8, 2024 17:20
@BlackDog86 BlackDog86 added ready-to-review A pull request is ready to be reviewed and removed waiting-on-author A pull request is waiting on changes from the author labels Dec 8, 2024
Updated docs.
@Iridar
Copy link
Contributor

Iridar commented Dec 10, 2024

I've reworded the docs a bit, please take a look and if you don't see anything objectionable, this is good to go.

@Iridar Iridar added waiting-on-author A pull request is waiting on changes from the author and removed ready-to-review A pull request is ready to be reviewed labels Dec 10, 2024
@BlackDog86
Copy link
Contributor Author

Fine by me :)

@BlackDog86 BlackDog86 added ready-for-merge the pull request was reviewed and is ready to be merged. and removed waiting-on-author A pull request is waiting on changes from the author labels Dec 14, 2024
@Iridar Iridar merged commit 12bc94c into X2CommunityCore:master Dec 16, 2024
4 checks passed
@Iridar Iridar changed the title Docs - Photobooth Enums Add docs for Issue #359 - Photobooth Enums Dec 16, 2024
@BlackDog86 BlackDog86 deleted the 359-PhotoBooth-Particle-Docs branch January 7, 2025 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs ready-for-merge the pull request was reviewed and is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants