johnnylump Posted August 3, 2013 Share Posted August 3, 2013 Would another option be to decrease the soldier boxes' starting y ? It looks like if you started at the top of the pseudo-rectangle (over the xcom logo and operation name), you could fit eight soldiers in that box. Link to comment Share on other sites More sharing options...
XMarksTheSpot Posted August 3, 2013 Share Posted August 3, 2013 Would another option be to decrease the soldier boxes' starting y ? It looks like if you started at the top of the pseudo-rectangle (over the xcom logo and operation name), you could fit eight soldiers in that box.Sure, there are various options one could pursue (e.g. shrinking the width of the slots and adding a second column), but why stop at 8? I'd prefer more dynamic solutions allowing for yet more soldiers, the same goes for the squad select screen. Even if the tactical game may become cumbersome with too many soldiers around there'll always be people asking for more :laugh: Link to comment Share on other sites More sharing options...
Bertilsson Posted August 3, 2013 Share Posted August 3, 2013 (edited) Edit: Or wait, actually there are probably also a few 4 and 5 that should be changed to 6 and 7 to make the naggers about needing to buy OTS SquadSize I & II working again. But that is really minor and probably very non-complicated :smile: Ehr... The part that isn't broken or purposely disabled from start is simple to fix. simulated function UpdateData() ... if(UISquadSelect(screen).GetMgr().ITEMTREE().CanFacilityBeBuilt(12)) { m_arrUIOptions[m_arrFillOrderIndex[5]].bHint = true; //Shouldn't one of these be 4? m_arrUIOptions[m_arrFillOrderIndex[5]].bHint = true; //and why have none of them ingame effect? } else { if(UISquadSelect(screen).GetMgr().HQ().HasFacility(12)) { if(!UISquadSelect(screen).GetMgr().BARRACKS().HasOTSUpgrade(2)) { m_arrUIOptions[m_arrFillOrderIndex[5]].bHint = true; //Change to 7 works } if(!UISquadSelect(screen).GetMgr().BARRACKS().HasOTSUpgrade(1)) { m_arrUIOptions[m_arrFillOrderIndex[4]].bHint = true; //Change to 6 works } } } //These two lines from XGChooseSquadUI sort of suggests that you are supposed to be told to build OTS before being told to use it to increase squad size. m_strOTSHelp1="Must increase squad size through the Officer Training School!" m_strOTSHelp2="Build the Officer Training School!" Edited August 3, 2013 by Bertilsson Link to comment Share on other sites More sharing options...
johnnylump Posted August 3, 2013 Share Posted August 3, 2013 Hex change for the naggers XComStrategyGame >> UISquadselect_SquadList.UpdateData() 2c 05 01 c7 16 00 00 01 c8 16 00 00 27 07 d1 02 81 19 19 19 2e b3 16 00 00 01 14 fb ff ff 0a 00 86 16 00 00 00 1b 91 0f 00 00 00 00 00 00 16 0a 00 a8 00 00 00 00 1b f4 02 00 00 00 00 00 00 16 0c 00 54 28 00 00 00 1b 17 11 00 00 00 00 00 00 24 01 16 16 14 2d 35 b7 16 00 00 c3 16 00 00 00 01 10 10 2c 04 to 2c 07 01 c7 16 00 00 01 c8 16 00 00 27 07 d1 02 81 19 19 19 2e b3 16 00 00 01 14 fb ff ff 0a 00 86 16 00 00 00 1b 91 0f 00 00 00 00 00 00 16 0a 00 a8 00 00 00 00 1b f4 02 00 00 00 00 00 00 16 0c 00 54 28 00 00 00 1b 17 11 00 00 00 00 00 00 24 01 16 16 14 2d 35 b7 16 00 00 c3 16 00 00 00 01 10 10 2c 06 Link to comment Share on other sites More sharing options...
Bertilsson Posted August 3, 2013 Share Posted August 3, 2013 (edited) To make it simpler for anyone to test or to just make it quicker to go back after re-install, I have put all current progress into a toolboks mod (attached).Replace entire LoadSquad function: Unique spawn tiles for first 12 soldiers, reused spawn tiles for soldier 13+, multiplayer code removed.Replace entire UISquadSelect_SquadList.Init function: Hard-coded fix to accept 8 soldier selection boxes instead of 6, should be replaced with a proper loop instead of hard-coding if need goes beyond 8 soldiersUpdate UISquadSelect_SquadList.UpdateData function: Hard-coded fix to make the you must buy OTS Upgrade nagging visible when OTS building is bought and squad size upgrades are not.Actionscript and Flash changes by XMarksTheSpot, that allow 8 soldier selection boxes, very unlikely to be final versionDGC SKYRANGER_CAPACITY=6I havn't checked if there are any conflicts for long war mod 1.92 in the 100KB change to command1.upk required to cover the 44 extra and less bytes in Command1.upk.If there is a conflict, I will attach an additional long war 1.92 compatible mod to this message later today. Edit: Corrected typos Edited August 3, 2013 by Bertilsson Link to comment Share on other sites More sharing options...
johnnylump Posted August 3, 2013 Share Posted August 3, 2013 No conflicts with Long War -- I've got it running fine. For eight soldiers, you also should have a couple of changes to XComStrategyGame.int: OTSTechSummary[eOTS_SquadSize_I]="Squad size increased to 5 soldiers."OTSTechSummary[eOTS_SquadSize_II]="Squad size increased to 6 soldiers." to OTSTechSummary[eOTS_SquadSize_I]="Squad size increased to 7 soldiers."OTSTechSummary[eOTS_SquadSize_II]="Squad size increased to 8 soldiers." Link to comment Share on other sites More sharing options...
Bertilsson Posted August 3, 2013 Share Posted August 3, 2013 For eight soldiers, you also should have a couple of changes to XComStrategyGame.int:Unfortunately I have absolutely no idea how to persuade toolboks into doing that... However since it is in no way a final version of anything I think the very limited userbase can live with the incorrect text as long as it is not completely forgotten about and ends up in the final version :) Link to comment Share on other sites More sharing options...
Amineri Posted August 3, 2013 Share Posted August 3, 2013 if(UISquadSelect(screen).GetMgr().ITEMTREE().CanFacilityBeBuilt(12)) { m_arrUIOptions[m_arrFillOrderIndex[5]].bHint = true; //Shouldn't one of these be 4? m_arrUIOptions[m_arrFillOrderIndex[5]].bHint = true; //and why have none of them ingame effect? } The OTS facility can only be built if it already hasn't been built. That means that this branch of the conditional only executes if the OTS hasn't yet been built. In that case (as I recall) the outer two boxes are made invisible by some completely different mechanism, so the fact that the bHint flag is getting set incorrectly shouldn't matter. Speaking of such things, as an alternative to trying to "shrink" the boxes down in order to squeeze in 8 at the bottom of the screen, it might be easier and more extensible to add an additional 6 boxes at the top of the screen instead. This would allow for squad sizes of up to 12 soldiers (for those that want to push the envelope). The upk code that is controlling whether or not the extra boxes are visible would need to be sussed out so that extra boxes would be visible if the max is less than 12. (e.g. Long War) As an extra bonus, the soldier on display could possible be set to be toggled between the upper and lower boxes based on which box was last moused over. It's not ideal but I don't see any way to squeeze in more than 6 soldiers in the preview. I think the "11" in the previously mentioned function is referencing the 11 soldier models that can be displayed in the Barracks at once (the ones using the non-armor body models). Eleven pawns sounds about right for how many are in that area. Link to comment Share on other sites More sharing options...
Bertilsson Posted August 4, 2013 Share Posted August 4, 2013 (edited) On a related note, has anyone been looking into displaying additional soldier pawns in the hangar? In the XGFacility_Barracks#OnLoadSoldier() method I can see Soldier.SetHQLocation(1, false, false, SlotIdx);being called which points to XGStrategySoldier#SetHQLocation() then further to XGStrategySoldier#AddToLocation() which, oddly enough, references SeqEvent_HQUnits.AddUnitToRoomSequence() and finally the SeqEvent_HQUnits#AddUnit() methods inside XComGame.upk at which point I don't quite understand what's going on anymore (or if I've taken a wrong turn somewhere) :confused:Though in there I do see various conditionals referencing slot ids going up to 11 which might be interpreted as some rooms being able to support up to 12 pawns. Or maybe all 12 slots are spread out throughout the whole base (hangar, infirmary, gym, recreation area)?I did a little experiment on the SetHQLocation-function. By replacing one of the last lines AddToLocation(Loc, SlotIdx); with AddToLocation(Loc, 1); The result was very interesting and to my surprise exactly what was expected: (not used to that) :smile: In a seven soldier loadout all 7 pawns are drawn in the exact same location above selection slot 1. My conclusion is that there are 6 defined "plinths" to which the first 6 soldiers are mapped and when the next soldier has no plinth it is simply ignored. Unless someone can figure out where those plinths are defined, I'm figuring the second best solution would be to more or less do the same as was done to the spawn locations in the in the tactical game by attempting to reuse and offset the locations of plint 1-6 for soldier 7-12. Edit: I'm guessing this is the function that would need some poking simulated function PlaceOnArmoryPlinth() { local SkeletalMeshActor SoldierPlinth, SearchActor; // End:0x5C foreach AllActors(class'SkeletalMeshActor', SearchActor) { // End:0x5B if(SearchActor.Tag == 'ArmorySoldierPlinth') { SoldierPlinth = SearchActor; // End:0x5C break; } } // End:0x219 if(SoldierPlinth != none) { m_kPawn.bSkipRotateToward = true; m_kPawn.SetPhysics(4); m_kPawn.SetLocation(SoldierPlinth.Location); m_kPawn.SetRotation(SoldierPlinth.Rotation); m_kPawn.SetDesiredRotation(SoldierPlinth.Rotation); // End:0x219 if(!m_kPawn.m_bLeftHandIKAnimOverrideEnabled && m_kPawn.LeftHandIK != none) { m_kPawn.m_bLeftHandIKAnimOverrideEnabled = true; m_kPawn.m_bLeftHandIKAnimOverrideOn = true; m_kPawn.LeftHandIK.ControlStrength = 1.0; } } //return; } But I don't see a lot of useless code to throw out in there... :( Edited August 4, 2013 by Bertilsson Link to comment Share on other sites More sharing options...
Bertilsson Posted August 4, 2013 Share Posted August 4, 2013 Alternative idea which is probably easier:Assign all pawns to a fixed SlotIdx (as in my experiment)Remove m_kPawn.SetLocation(SoldierPlinth.Location); from PlaceOnArmoryPlinth()Let any other function do the necessary m_kPawn.SetLocation(fixed_location + offset);Worst case, repurpose a completely unrelated function to take care of it... Link to comment Share on other sites More sharing options...
Recommended Posts