Jump to content

R&D to Increase Squad Size


Beknatok

Recommended Posts

I will be testing vect(18.0, 18.0, 4.0) and vect(-18.0, -18.0, 4.0) for a while and see if that stops them from falling below ground and how much it bugs me that the rear soldier is sweeping his guns thru the body of the guy in front.

If still not good, I will probably figure out how use soldier rotation as a compass and move them full tiles or put them turned back to back if is only cosmetical issue remaining.

Link to comment
Share on other sites

  • Replies 429
  • Created
  • Last Reply

Top Posters In This Topic

Safe direction found:

kSpawn.Location + vect(0.0, -96.0, 0.0)

 

From soldiers perspective

Research outpost rescue: 1 tile left

Rooftop construction: 1 tile right (the only safe direction not occupied by other soldiers)

Friends in low places: 1 tile forward (only forward and backward is safe)

Alien Base location 1 & 2: 1 tile right

Big cemetary: 1 tile right

 

In addition to the above I have also tested on 10+ random missions without any issues.

Link to comment
Share on other sites

Sounds like some excellent progress!

 

I feel like a good number of the issues encountered (like the flanking bug) are actually related to glitches in the maps themselves. It's strange that the directions are so inconsistent from map to map.

Link to comment
Share on other sites

Change

 

This:

function ChooseSquadForNewMission(XGMission kMission, XGShip_Dropship kSkyranger, optional bool bNewGame)
{
  local XGStrategySoldier kSoldier, kAdded;

  bNewGame = false;
  // End:0xAA
  if(kMission.m_iMissionType == 8)
  {
    // End:0xA9
    foreach m_arrSoldiers(kSoldier,)
    {
      // End:0xA8
      if(kSoldier.m_kSoldier.iPsiRank == 4)
      {
        kAdded = kSoldier;
        LoadSoldier(kSoldier, kSkyranger);
      }      
    }    
  }
  // End:0x11E
  foreach m_aLastMissionSoldiers(kSoldier,)
  {
    // End:0xDC
    if(kSoldier == kAdded)
    {
      continue;      
    }
    LoadSoldier(kSoldier, kSkyranger);
    // End:0x11D
    if(kSkyranger.IsFull())
    {      
      return;
    }    
  }  
  // End:0x193
  foreach m_arrSoldiers(kSoldier,)
  {
    // End:0x151
    if(kSoldier == kAdded)
    {
      continue;      
    }
    LoadSoldier(kSoldier, kSkyranger);
    // End:0x192
    if(kSkyranger.IsFull())
    {      
      return;
    }    
  }  
  //return;  
} 

To this:

function ChooseSquadForNewMission(XGMission kMission, XGShip_Dropship kSkyranger, optional bool bNewGame)
{
  local XGStrategySoldier kSoldier, kAdded;

  bNewGame = false;
  // End:0xAA
  if(kMission.m_iMissionType == 8)
  {
    // End:0xA9
    foreach m_arrSoldiers(kSoldier,)
    {
      // End:0xA8
      if(kSoldier.m_kSoldier.iPsiRank == 4)
      {
        kAdded = kSoldier;
        LoadSoldier(kSoldier, kSkyranger);
      }      
    }    
  }
  // End:0x148
  foreach m_arrSoldiers(kSoldier,)
  {
    // End:0xDC
    if(kSoldier == kAdded)
    {
      continue;      
    }
    // End:0x122
    if(InStr(kSoldier.GetLastName(), "*") >= 0)
    {
      LoadSoldier(kSoldier, kSkyranger);
    }
    // End:0x147
    if(kSkyranger.IsFull())
    {      
      return;
    }    
  }  
  //return;  
}

And now player has full control of which soldiers are loaded into the SkyRanger by putting a * anywhere in the Last Name of Soldiers or Shivs.

 

Hex-code for this change: (XComStrategyGame.upk, Decimal offset: 2847433, unused 0B tokens for future updates: 51)

F5 27 00 00 AB 1F 00 00 00 00 00 00 F0 27 00 00 00 00 00 00 00 00 00 00 F5 27 00 00 00 00 00 00 A4 01 00 00 4B 2E 00 00 4C 01 00 00 1F 01 00 00 49 02 00 28 15 07 AA 00 9A 19 00 F5 27 00 00 09 00 35 37 00 00 00 01 35 37 00 00 2C 08 16 58 01 B1 27 00 00 00 F2 27 00 00 00 4A A9 00 07 A8 00 9A 35 75 FB FF FF 74 FA FF FF 00 00 19 00 F2 27 00 00 09 00 EC 44 00 00 00 01 EC 44 00 00 2C 04 16 0F 00 F1 27 00 00 00 F2 27 00 00 1B E0 16 00 00 00 00 00 00 00 F2 27 00 00 00 F4 27 00 00 16 31 30 58 01 B1 27 00 00 00 F2 27 00 00 00 4A 48 01 07 DC 00 72 00 F2 27 00 00 00 F1 27 00 00 16 31 06 48 01 07 22 01 99 7E 19 00 F2 27 00 00 0A 00 F1 44 00 00 00 1B 7C 0F 00 00 00 00 00 00 16 1F 2A 00 16 25 16 1B E0 16 00 00 00 00 00 00 00 F2 27 00 00 00 F4 27 00 00 16 07 47 01 19 00 F4 27 00 00 0A 00 E4 3D 00 00 00 1B 66 14 00 00 00 00 00 00 16 30 04 0B 31 30 04 0B 53 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 00 00 00 02 40 02 00 93 05 00 00 00 00 00 00

Next step is to modify the OrderedHigher-function to put soldiers with a * anywhere in the Last Name on top whenever the list of soldeirs is sorted (usually when wounded soldiers return to duty, after tactical missions, when new soldiers arrive and after PSI-training).

 

That way it should be easy for player to overview which soldiers are up for next mission, by simply looking at the top of the list in the barracks and make changes if so desired. To verify that selection really is the intended one the player can also remove a soldier from slot 0-4 during loadout and re-add him to see who is marked as on mission in the add soldier dialog that looks like barracks but really isn't).

 

Edit: The final step after that is to make it possible for player to change name of Shivs... If customize-button can't be unlocked in a reasonable way I will probably attempt to re-purpose the Dismante-tank button to put/remove * in Shivs name.

Edited by Bertilsson
Link to comment
Share on other sites

Not sure if this idea has been discussed.

But another idea I got while modifying the above function was this:

if(kSkyranger(0).IsFull())
{
LoadSoldier(kSoldier, kSkyranger(1));
}
And in loadSquad-screen, repurpose one of the You need OTS-sprites to toggle between SkyRanger0 and SkyRanger1.
SkyRangers would be limited to 3 soldiers capacity and have option to add one extra soldier each via OTS upgrade to get a total squad of 8 soldiers.
How difficult it would be to realize I leave for someone more qualified to ponder about... But in theory it would be a very elegant solution, almost as good as two extra soldier slots :)
Link to comment
Share on other sites

The problem is that the skyranger carries a lot more than just the squad. There is the entire battle description that gets carried back and forth (which includes soldiers, collected artifacts, foundry tech, research tech, recap stats, etc). The structure DropshipCargoInfo is the primary mechanism by which data is shuttled back and forth between the strategy and tactical games.

 

Now, you could purpose one of the buttons as a toggle and leave the other five as soldiers, but map them to soldiers 0-4 and 5-9 in the Dropship cargo array, which would give you access to up to 10 soldiers, although you'd only be able to view half of them at a time.

Link to comment
Share on other sites

Now, you could purpose one of the buttons as a toggle and leave the other five as soldiers, but map them to soldiers 0-4 and 5-9 in the Dropship cargo array, which would give you access to up to 10 soldiers, although you'd only be able to view half of them at a time.

I like that idea and don't see myself going beyond 10 soldiers so would be perfect.

 

If you want more than 10 could the ones at either end be turned to next page prevues page for 12?

Link to comment
Share on other sites

After doing tests with 12 soldiers I doubt that anyone sane would ever want more than 10 soldiers... Let's just say that It get's tiresome to move them all around very quickly.

 

So if it could be made possible to have up to 10 soldiers I think that would be more than enough.

 

Also it wouldn't require any new solution for spawning soldiers which is currently reusing spawn locations for soldier 13+ :smile:

Edited by Bertilsson
Link to comment
Share on other sites

On initial positioning, want to make sure this is what's advised:

 

 

 

if(I > 5)
{
kSoldier = SpawnUnit(class'XGUnit', m_kPlayerController, kSpawn.Location + vect(0.0, 0.0, 0.0), kSpawn.Rotation, kChar, m_kSquad,, kSpawn);
}
// End:0x38C
else
{
kSoldier = SpawnUnit(class'XGUnit', m_kPlayerController, kSpawn.Location + vect(0.0, -96.0, 0.0), kSpawn.Rotation, kChar, m_kSquad,, kSpawn);
}
Link to comment
Share on other sites

Almost,

 

Final code should be if (I <= 5) in order to only shift location for extra soldiers.

 

Also do not forget kSpawn = arrSpawnPoints[i % 6]; if you prefer to mod from scratch.

 

Edit This is the final code with 1 tile moved for soldier 7-12: (XComGame.upk, decimal offset 8571137)

C6 94 00 00 50 55 00 00 00 00 00 00 A0 94 00 00 00 00 00 00 00 00 00 00 B1 94 00 00 00 00 00 00 97 03 00 00 8D 7B 00 00 33 05 00 00 D6 03 00 00 0F 00 A9 94 00 00 36 00 B1 94 00 00 0F 01 E3 93 00 00 1C 3D FC FF FF 20 21 AD 00 00 4A 4A 4A 4A 4A 4A 01 C5 FE FF FF 16 0F 19 01 E3 93 00 00 09 00 30 AC 00 00 00 01 30 AC 00 00 17 54 01 CC 93 00 00 2C 13 16 0F 10 25 01 CC 93 00 00 26 0F 00 A8 94 00 00 26 07 E4 00 82 96 00 A8 94 00 00 2C 13 16 18 16 00 96 00 A8 94 00 00 36 00 B0 94 00 00 16 16 0F 10 00 A8 94 00 00 01 CC 93 00 00 10 00 A8 94 00 00 00 B0 94 00 00 A5 00 A8 94 00 00 16 06 85 00 0F 01 CB 93 00 00 00 AF 94 00 00 0F 01 CA 93 00 00 00 AE 94 00 00 55 00 AD 94 00 00 0C 00 10 25 00 AD 94 00 00 16 40 00 AD 94 00 00 25 26 16 0F 00 A8 94 00 00 25 07 30 05 96 00 A8 94 00 00 00 A9 94 00 00 16 0F 00 A7 94 00 00 10 FD 00 A8 94 00 00 2C 06 16 00 AD 94 00 00 0F 00 AB 94 00 00 1C 3D FC FF FF 20 B4 A3 00 00 4A 4A 4A 4A 4A 4A 4A 16 19 2E B4 A3 00 00 00 AB 94 00 00 30 00 00 00 00 00 00 1B 1A 63 00 00 00 00 00 00 35 D4 44 00 00 D6 44 00 00 00 00 10 00 A8 94 00 00 00 B1 94 00 00 16 19 00 AB 94 00 00 30 00 00 00 00 00 00 1B FC 62 00 00 00 00 00 00 35 D5 44 00 00 D6 44 00 00 00 00 10 00 A8 94 00 00 00 B1 94 00 00 16 0F 19 00 AB 94 00 00 09 00 B9 A2 00 00 00 01 B9 A2 00 00 10 00 A8 94 00 00 00 AC 94 00 00 07 FD 02 98 00 A8 94 00 00 2C 05 16 0F 00 AA 94 00 00 1B B0 66 00 00 00 00 00 00 20 44 B8 00 00 01 9B 93 00 00 D7 19 00 A7 94 00 00 09 00 DE F8 FF FF 00 01 DE F8 FF FF 23 00 00 00 00 00 00 00 00 00 00 00 00 16 19 00 A7 94 00 00 09 00 DD F8 FF FF 00 01 DD F8 FF FF 00 AB 94 00 00 01 E3 93 00 00 4A 00 A7 94 00 00 4A 4A 16 06 8C 03 0F 00 AA 94 00 00 1B B0 66 00 00 00 00 00 00 20 44 B8 00 00 01 9B 93 00 00 D7 19 00 A7 94 00 00 09 00 DE F8 FF FF 00 01 DE F8 FF FF 23 00 00 00 00 00 00 C0 C2 00 00 00 00 16 19 00 A7 94 00 00 09 00 DD F8 FF FF 00 01 DD F8 FF FF 00 AB 94 00 00 01 E3 93 00 00 4A 00 A7 94 00 00 4A 4A 16 0F 19 00 AA 94 00 00 09 00 3D AF 00 00 00 01 3D AF 00 00 35 D0 44 00 00 D6 44 00 00 00 00 10 00 A8 94 00 00 00 B1 94 00 00 19 00 AA 94 00 00 31 00 00 00 00 00 00 1B 5C 02 00 00 00 00 00 00 35 D3 44 00 00 D6 44 00 00 00 00 10 00 A8 94 00 00 00 B1 94 00 00 4A 16 07 29 04 72 00 AA 94 00 00 2A 16 06 22 05 07 DA 04 9A 35 D3 0D 00 00 D5 0D 00 00 00 00 19 00 AB 94 00 00 09 00 C3 A2 00 00 00 01 C3 A2 00 00 2C 02 16 19 2E B5 46 00 00 19 00 AA 94 00 00 0A 00 12 33 00 00 00 1B EA 33 00 00 00 00 00 00 16 45 00 00 00 00 00 00 1B 56 61 00 00 00 00 00 00 35 32 0E 00 00 3D 0E 00 00 00 01 19 2E B4 A3 00 00 00 AB 94 00 00 09 00 79 A3 00 00 00 01 79 A3 00 00 4A 16 12 20 FC A8 00 00 14 00 00 00 00 00 00 1B 03 04 00 00 00 00 00 00 00 AA 94 00 00 4A 16 19 00 AA 94 00 00 0A 00 00 00 00 00 00 1B 41 6E 00 00 00 00 00 00 16 A5 00 A8 94 00 00 16 06 3A 01 04 0B 53 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 0B 00 00 00 02 00 02 00 1A 44 00 00 00 00 00 00
Edited by Bertilsson
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...