Jump to content

Photo

R&D to Increase Squad Size


  • Please log in to reply
428 replies to this topic

#411
clanfear

clanfear

    Enthusiast

  • Supporter
  • PipPip
  • 201 posts

I think I have a half-decent work-in-progress version that's got the basic functionality covered for Enemy Within (patch 1).

perfectly works on unpatched version of the EW too, many thanks



#412
XMarksTheSpot

XMarksTheSpot

    Fan

  • Members
  • PipPipPip
  • 271 posts

All right, I have done that. Are this two files everything for a bigger squad size or must I edit more files? Because yerude posted a lot more upks to change..

You will have to modify the Skyranger capacity to actually be able to select more soldiers. You can either use the changes detailed by yerude or modify the DefaultGameCore.ini for that. The change to XComGame.upk deals with fixing spawn locations so soldiers don't start out in odd places, it's recommended you apply that, too.

 

perfectly works on unpatched version of the EW too, many thanks

That's good to know, apparently the flash menu was left untouched by the patch.



#413
yerude

yerude

    Enthusiast

  • Members
  • PipPip
  • 130 posts

The Toolbooks script i posted is a summary of both the fixed spawning locations and the UI which were released in this thread before. I just made a working toolbooks mod of it.

But the UI does only work with lots of bugs for me. But marksthespot already said, the ui is just not finished and its just in work.

So if you do only use the corrected spawn locations it should work very well too.



#414
ozpush

ozpush

    Stranger

  • Members
  • Pip
  • 2 posts

Hi From the Land Down Under

 

have tried you new increased squad size toolbok mod and it works for me

 

thanks you



#415
ninjamp8

ninjamp8

    Stranger

  • Members
  • Pip
  • 2 posts

I have the extra slot now but i cant add my extra squad member , help please :')



#416
XMarksTheSpot

XMarksTheSpot

    Fan

  • Members
  • PipPipPip
  • 271 posts

I have the extra slot now but i cant add my extra squad member , help please :')

That's an issue that's currently being worked on.

In the interim you can use the following hex change to make the soldier slots fill in the proper order (and to allow more than 6 slots to be filled):

Spoiler

Also available in upk_mod format if you're using UPKModder: Attached File  UISquadSelect_SquadList_Init.zip   633bytes   57 downloads

 

Probably doesn't work correctly in conjunction with OTS naggers, so use at your own risk :smile:

 

X.


Edited by XMarksTheSpot, 09 February 2014 - 04:11 pm.


#417
ninjamp8

ninjamp8

    Stranger

  • Members
  • Pip
  • 2 posts

 

I have the extra slot now but i cant add my extra squad member , help please :')

That's an issue that's currently being worked on.

In the interim you can use the following hex change to make the soldier slots fill in the proper order (and to allow more than 6 slots to be filled):

Spoiler

Also available in upk_mod format if you're using UPKModder: attachicon.gifUISquadSelect_SquadList_Init.zip

 

Probably doesn't work correctly in conjunction with OTS naggers, so use at your own risk :smile:

 

X.

 

Thanks, also when i was playing enemy unknown i could just edit the skyranger capacity in the defaultgamecore.ini to add more soldier  but it doesnt work for Enemy Within, is this just me? and i cant find the uncompressed xcomstrategygame.upk


Edited by ninjamp8, 10 February 2014 - 09:18 am.


#418
Amineri

Amineri

    Resident poster

  • Premium Member
  • 3,927 posts

With the updated Flash code developed by XMarksTheSpot, some upk work by Johnnylump, and using UPKmodder to port some of Bertilsson's EU patch 4 upk code, I appear to having everything for the larger squad size working excepting the soldier pawn cycling.

 

The code which handles the HQ pawns has changed quite a bit, and I never really understood what was happening before, so it may take some digging to ferret out how to get it working in EW. Currently the version I have running in our Long War EW alpha displays the pawns of only the first six soldiers. All are in correct poses and there's no extra overlapping soldiers, so it's not completely horrible, but I'm going to see what I can get working.



#419
Amineri

Amineri

    Resident poster

  • Premium Member
  • 3,927 posts

I've been digging a bit into the SeqEvents that appear to handle the displaying of the soldier pawns (not just in the dropship, but everywhere in HQ).

 

Here is what I've traced out so far:

  • From XGStrategySoldier.AddToHQLocation, XGStrategySoldier.AddToLocation is called
  • AddToLocation first maps Location to state (which is what allows off-duty soldiers to be dressed in casual clothing in the barracks), then creates the pawn, then invokes class'SeqEvent_HQUnits'.static.AddUnitToRoomSequence
    • This can include the various cinematics (e.g. eSoldierLoc_PsiLabsCinematic) in which case the pawn is immediately destroyed.
    • The RoomName string argument for the squad select (location 1 = eSoldierLoc_Dropship) is "Dropship". The complete mapping from location value to RoomSequence RoomName is below
  • AddUnitToRoomSequence gets the first free open slot if none is specified (useful for the barracks view where you don't care about particular ordering), then invokes GetSpecializedRoomName (which is misnamed as it actually returns the RoomClass, possibly specialized, then invokes AddUnit to the Room returned in the previous step
  • GetSpecializedRoomName appends MEC or SHIV suffixes (as needed) to the roomname and then calls FindHQRoomSequence

FindHQRoomSequence is where the trail gets difficult to follow, but is the key next step:

class'Engine'.static.GetCurrentWorldInfo().GetGameSequence().FindSeqObjectsByClass(class'SeqEvent_HQUnits', true, HQUnitEvents);
Idx = 0;
J0x69:
if(Idx < HQUnitEvents.Length)
{
   UnitMap = SeqEvent_HQUnits(HQUnitEvents[Idx]);
   if((UnitMap != none) && UnitMap.ObjComment == RoomName)
   {
      return UnitMap;
   }
   ++ Idx;
   // [Loop Continue]
   goto J0x69;
}
return none; 

It first retrieves all SeqObjects that are of type class'SeqEvent_HQUnits', then loops through them until the supplied RoomName matches the .ObjComment element, and returns that SeqObject.

 

The most direct (least hacked) way would be to alter the class'SeqEvent_HQUnits' SeqObject with comment "Dropship" and add the additional slot index locations. After a little digging, and a little luck, it appears that this info is defined in the "Anim_Hangar.upk" file in CookedPCConsole. (Yet another upk to possibly mod).

 

After decompressing the file, at file offset 0x4881E9 is where the "DropShip" RoomSequence appears to be defined. It's unclear what format this is in. It's not unreal bytecode but it's also not any form of flash/actionscript, as best I can tell. Following "Dropship" are the "Dropship_Shiv", "Dropship_Mec", and "Dropship_MecTrooper" Room Sequences, as can be created by the GetSpecializedRoomName function.

 

The good news is that there appears to be 12 units in each of these sequences:

Spoiler

 

The bad news is that these are lightweight objects that don't appear to actually contain coordinates, and probably refer to some earlier objects "Soldier01" through "Soldier06", "Mec1" through "Mec6", "MecTrooper1" through "MecTrooper6", and "Shiv1" through "Shiv6", which again invokes the restriction of only 6 displayed pawns.

 

To add more pawns I'll have to figure out what the format of this hex is, and then try and figure out how to insert new objects -- for example "Soldier07" and "Soldier08".  In the short term, since MecTrooper is unused (it handles displaying the Mec in civvies), those 6 objects could potentially be repurposed to add 2 additional objects to Soldier, Mec, and Shiv, which would allow for display of 8 pawns in the dropship screen.

 

EDIT: I found the following reference to Sequence Objects on at beyondunreal : http://wiki.beyondun...nceObject_(UDK)

 

-------------------

 

Here is the complete set of RoomNames for all HQ Locations:

Spoiler

MEC in Civvies, MECs in MEC armor, and SHIVs have specialized variants of these names set up with "_MecTrooper", "_Mec", and "_Shiv" appended to the base RoomName.


Edited by Amineri, 12 February 2014 - 06:09 pm.


#420
dubiousintent

dubiousintent

    Resident poster

  • Premium Member
  • 8,878 posts

Created a new article from these latest discoveries: 'Strategic Display of Soldiers - XCOM:EU 2012'.

 

-Dubious-






IPB skins by Skinbox
Page loaded in: 0.732 seconds