Discussion General Partyscreenmanager long time issue

Users who are viewing this thread

Hello,
I have worked on a mod changing a bit the partyscreenmanger sometime ago and while the access wasn't the easiest in the world i could make just what i wanted. Then after a patch (Might be 1.5.7 or 1.5.8 don't remember) there was some weird issues with my mod and since i was busy i didn't really checked it out back then, but i did now and i'm a bit confused.

So here is the issue, the partyscreenmanager have a few "modes" it is operating as, they are all listed in a dedicated enum in the campaignsystem, soberly called PartyScreenMode.
Since the party screen is used for many things, from displaying your troops to sharing them between parties it was to be expected to have something like this, the modes are
Code:
public enum PartyScreenMode
    {
        Normal,
        Shared,
        Loot,
        Ransom,
        PrisonerManage,
        TroopsManage
    }
And once again it made complete sense.

So the issue is since i wanted my mod to not mess with the game and with other mods, i was carefully checking the PartyScreenManager.Instance.CurrentMode to only change it's logic when in the correct mode, in the "TroopsManage" mode, but it seem those modes aren't set correctly anymore.

When i speak to one of my party leader, wandering the map, it's Normal mode that is called, the same when i check my troops with the main icone.
When i manage the garrison or when i create a new party from the clan menu, it's the TroopsManage that is called
When i go to the prison and ask to manage prisonners it's PrisonerManage.

So it most of the time makes sense, except when speaking to one of your party leader, but it's also the last one that was changed and updated. So the question is, is this a bug (Well hard to say a bug as nothing crash cause of this, but maybe it will bring unsuspected issues), or it is intended and this feature was irrelevant and will be abandoned in the future?

I know developers are more concerned in more immediate issues, but since you know are more friendly with the modding community, i'll try my luck on this one, and hope i'll get an answer telling me if this will be fixed or if my method to track the troop window need to be changed cause it's not valid anymore and relies on something that will be changed.
 
I only change the logic if it's in TroopsManage mode, i replace the logic with my own class to allow transferring companions under certain circumstances.
Basically i do
Code:
PartyScreenManager.PartyScreenLogic.SetTroopTransferableDelegate(new PartyScreenLogic.IsTroopTransferableDelegate(ClanManageTroopTransferableDelegate));
with my own code to have it work.

But that shouldn't affect anything about the issue i talked about earlier. I do replace only if in the correct mode and i only change the logic on the current call.
 
Ok so i dug a bit more and i understand the issue and why you changed it now, but that do not solve the issue at all and put more questions in the balance.

managermode.png

So first i asked DNSpy to find when OpenScreenAsManageTroops was called and no surprise it reported exactly what i said in the first post, it was called for garrison and new parties but not on the party conversation.
So i checked what the party conversation was calling and it's another methode called OpenScreenAsManageTRoopsAndPrisoners, and this one set PartyScreenMode as normal.

And this is my issue here.The party clan management should use the same mode, they should both use Normal (So before 1.5.7 that was never set correctly) or they should both use Normal mode to be able to transfer prisoners too, but then GauntletClanScreen.OpenPartyAsManage isn't set correctly and should be switched to normal for consistency, as they are supposed to do exactly the same thing.

By the way, i also wonder what is called Normal, cause there is also a "Shared" mode ...
 
I don't see an issue with the enum and it's usage inside the PartyScreenManager since TroopsManage is representing what it should be representing(only managing troops). We'll take a look at how the conversation and clan screen opens the party screen. Currently I don't see a problem why they can't be opened in the same mode.
 
Back
Top Bottom