Closed cannonfodder1 closed 3 years ago
I don't think this a concern, arguably attachments shouldn't even be allowed with mods.
arguably attachments shouldn't even be allowed with mods
I assume you meant achievements and IMO since FXS didn't introduce any such restriction it's not up to us to do so. Besides, I think that as long as the game isn't different to the point where it's unrecognizable, it's fine to keep the achievements
Derp, achievements, yes. I don't really care about achievements either way, but I don't see a reason to bloat the codebase with features just for their sake, particularly when it's seemingly an "all or nothing" issue, seems like a slippery slope.
To be blunt - I do not share your concerns. Let's view it from a bit of a different angle: how should we handle the situation? Options:
Fair enough, just wanted to say my piece.
Is one event for a single achievement the right approach? One event could cover all achievement triggers here:
function UnlockAchievement(EAchievementType Type)
{
DevOnlineMsg("UnlockAchievement: " $ AreAchievementsEnabled() $ ": " $ Type);
if (AreAchievementsEnabled())
{
OnlineSub.PlayerInterface.UnlockAchievement(LocalUserIndex, Type);
}
CheckGameProgress(Type);
}
I would be cautious against adding an event to XComOnlineEventMgr::UnlockAchievement
due to register in strategy/tactical/etc situation - it would need to be a DLCInfo hook or a delegate in CHHelpers
I could expand the event hook to cover everything in the FinalMissionOnSuccess() function. There are some others here that would be good to have control over, like “Who Needs Tygan?”
@cannonfodder1 robo's suggestion is about inserting a hook into the global "trigger achievement" function so that mods could filter each achievement trigger individually, to avoid the need to patch each trigger site individually
@cannonfodder1 robo's suggestion is about inserting a hook into the global "trigger achievement" function so that mods could filter each achievement trigger individually, to avoid the need to patch each trigger site individually
I thought you said that was a bad idea but after reading your earlier comment more carefully I see you were just giving suggestions on how to do it better. I’ll get to to work on that
Yeah, I just meant that a hook like that would need to be either a DLCInfo or a CHHelpers
delegate (see EHLDelegateReturn
and onwards in CHHelpers
)
So I thought about this for a while and I think it's best to leave the current implementation as-is. XComOnlineEventMgr::UnlockAchievement
is a great idea in theory but in practice it has several issues:
XComCheatManager::TestUnlockAchievement
As such, I think it's best to leave it at a specific trigger override, at least until we have an actionable use case for a wider implementation
The achievement "The Few and the Proud" requires the player to defeat the aliens on Commander or Legend difficulty without increasing their squad size. The evaluation logic in X2AchievementTracker checks specifically for the
SquadSizeIUnlock
andSquadSizeIIUnlock
GTS upgrades. This can present a bit of a problem if mods remove these upgrades or add alternate methods to increase squad size. An event trigger with passed tuple should be added to X2AchievementTracker, so mods can override the default behaviour.