-
Notifications
You must be signed in to change notification settings - Fork 69
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
WotC bug + Solution : Problems Editing Covert Action Soldier Loadouts with a Controller #1035
Comments
It looks like there is a working solution already - please provide it as a PR |
Hello. This is still a problem in the latest release. I thought I could help turning the proposed solution in a PR, however I never worked with Xcom mod sources. I cloned this repo and searched for the aforementioned functions RefreshNavigation and EditSoldierLoadout, however nothing like that exists. Nor it seems to exist any source for the UICovertActions class. Therefore I'm assuming one should get the original UICovertActions.uc file (from where? the SDK?), edit it with the proposed changes and place it along the other .uc files with the classes inside this mod Src/XComGame/Classes. Am I thinking correctly? |
It seems this process isn't documented in the HL repo -- we should fix that. Yes, you're correct, get the original file from SDK/Development/SrcOrig, add it unmodified to the project, do a commit, then make and commit your changes separately. |
Full credit to this fix for kdm2k6 on issue X2CommunityCore#1035
Thanks. I did that, and after hours of despair with modbuddy and all that stuff (first time with it...) I was finally able to make a modified build based on this, and I confirm that it in fact works. I made a pull request: #1170 that therefore solves this issue. |
Great job and thanks. |
Full credit to this fix for kdm2k6 on issue X2CommunityCore#1035
Full credit to this fix for kdm2k6 on issue #1035
This issue was resolved in #1170, closing. |
General problem: The issue is that, while using a controller, you can edit the loadout of the 1st soldier slot for any given Covert action; however, you can not edit the loadout of the 2nd, 3rd ... soldier slot. I have come across this problem while testing LWotC; however, I believe it is a WotC bug. Additionally, I have confirmed the solution by using a modified highlander.
In order to replicate this bug do the following :
Why this occurs : Within the
UIScreen
,UICovertActions
, the code :SlotContainer.Navigator.SelectedIndex
is used to determine which particular slot within the slot container is currently selected. This can be seen withinOnUnrealCommand
, where the A button :UICovertActionStaffSlot
is selected via the call :SlotContainer.Navigator.SelectedIndex
HandleClick
on this slot, sending in the parameter "theButton" via :SlotContainer.ActionSlots[SlotContainer.Navigator.SelectedIndex].HandleClick("theButton")
.UICovertActionStaffSlot.HandleClick
then determines if this slot should be filled with a soldier, or emptied, depending upon its current state.Unfortunately in several locations, including the
EditSoldierLoadout
function, the selected slot is determined viaNavigator.SelectedIndex
rather thanSlotContainer.Navigator.SelectedIndex
. This results in the index value 0 always being returned and the 1st soldier slot being "dealt with". I never tested exactly whatNavigator.SelectedIndex
referenced, but I would guess the screen's navigator is pointing to the slot container itself.Solution : There are 3 problematic lines of code within
UICovertActions
.1.] Within the function :
RefreshNavigation
.if( SlotContainer.ActionSlots[Navigator.SelectedIndex].CanEditLoadout() )
should becomeif( SlotContainer.ActionSlots[SlotContainer.Navigator.SelectedIndex].CanEditLoadout() )
2.] Within the function :
EditSoldierLoadout
if( SlotContainer.ActionSlots[Navigator.SelectedIndex].CanEditLoadout() )
should becomeif( SlotContainer.ActionSlots[SlotContainer.Navigator.SelectedIndex].CanEditLoadout() )
SlotContainer.ActionSlots[Navigator.SelectedIndex].HandleClick("theButton2");
should becomeSlotContainer.ActionSlots[SlotContainer.Navigator.SelectedIndex].HandleClick("theButton2");
The text was updated successfully, but these errors were encountered: