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

Item upgrades for rescued soldiers #407

Open
Xymanek opened this issue Jan 1, 2020 · 1 comment
Open

Item upgrades for rescued soldiers #407

Xymanek opened this issue Jan 1, 2020 · 1 comment
Assignees
Labels
enhancement Improvement of something that already exists gameplay low priority This should be worked on eventually, but it's not an improtant conern

Comments

@Xymanek
Copy link
Member

Xymanek commented Jan 1, 2020

Need to investigate how item upgrades work for soldiers who were captured and being rescued. This may possibly reveal a base game bug/omission which may need to be fixed in CHL. Copy paste from when I was looking into it for #371:

The call is routed though X2StrategyElement_DefaultRewards::GivePersonnelReward and afterwards bCaptured is cleared (for both chosen captees and alien HQ ones).

  • GivePersonnelReward calls 2 things: UnitState.ApplyBestGearLoadout and XComHQ.AddToCrew

  • ApplyBestGearLoadout replaces armor, primary weapon, secondary weapon, heavy weapon, grenade pocket and 1 utility item with a better version if it's infinite and puts the old one back into HQ's inventory.

  • AddToCrew updates m_RecruitDate to today, recalculates bond compatibility, triggers ui popup if not a rescued soldier.

I'm kinda extremely confused currently and have a big desire to just let ApplyBestGearLoadout handle this, even though it seems subpar.

@Xymanek Xymanek added enhancement Improvement of something that already exists gameplay low priority This should be worked on eventually, but it's not an improtant conern labels Jan 1, 2020
@Xymanek Xymanek added this to the Beta 3 milestone Jan 1, 2020
@Xymanek
Copy link
Member Author

Xymanek commented Jan 20, 2020

Possibly related: X2CommunityCore/X2WOTCCommunityHighlander#732

@Xymanek Xymanek modified the milestones: Beta 3, Beta 3.1 Mar 12, 2020
@Xymanek Xymanek modified the milestones: Beta 3.1, Beta 3.2 Jul 20, 2020
@Xymanek Xymanek modified the milestones: Beta 3.2, Post release Jul 31, 2020
@Xymanek Xymanek removed this from the Post release milestone Aug 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement of something that already exists gameplay low priority This should be worked on eventually, but it's not an improtant conern
Projects
None yet
Development

No branches or pull requests

2 participants