Jump to content

R&D to Increase Squad Size


Beknatok

Recommended Posts

I was thinking like this:

  m_arrFillOrderIndex.AddItem(4);
  m_arrFillOrderIndex.AddItem(3);
  m_arrFillOrderIndex.AddItem(5);
  m_arrFillOrderIndex.AddItem(2);
  m_arrFillOrderIndex.AddItem(6);
  m_arrFillOrderIndex.AddItem(1);
  m_arrFillOrderIndex.AddItem(7);
  m_arrFillOrderIndex.AddItem(0);

If you downgrade that to 6 slots (0-5) then the fifth soldier would have no place to be...

 

But if I stop thinking about it statically then I would probably never have that problem... So I guess I'll just start working on vanilla fill order :smile:

 

Edit: Or wait I'm actually getting more confused by the second...
The above fill order is not good at all for 8 soldier setup...

 

We want the first 6 soldiers to use the first 6 slots... But that fillorder doesn't respect that...

Edited by Bertilsson
Link to comment
Share on other sites

  • Replies 429
  • Created
  • Last Reply

Top Posters In This Topic

Rather than making myself more confused tonight I will sleep on it and see if I can get it to add up tomorrow when I am back at my normal IQ of 75 :smile:

 

Meanwhile, can someone confirm that I'm not thinking backwards regarding the possibility to remap pawns vs slots in the following function?

SeqEvent_HQUnits.AddUnit

Edited by Bertilsson
Link to comment
Share on other sites

I was thinking like this:

  m_arrFillOrderIndex.AddItem(4);
  m_arrFillOrderIndex.AddItem(3);
  m_arrFillOrderIndex.AddItem(5);
  m_arrFillOrderIndex.AddItem(2);
  m_arrFillOrderIndex.AddItem(6);
  m_arrFillOrderIndex.AddItem(1);
  m_arrFillOrderIndex.AddItem(7);
  m_arrFillOrderIndex.AddItem(0);

If you downgrade that to 6 slots (0-5) then the fifth soldier would have no place to be...

 

But if I stop thinking about it statically then I would probably never have that problem... So I guess I'll just start working on vanilla fill order :smile:

 

Edit: Or wait I'm actually getting more confused by the second...

The above fill order is not good at all for 8 soldier setup...

 

We want the first 6 soldiers to use the first 6 slots... But that fillorder doesn't respect that...

The current fill order should be

6 5 7 4 8 3 9 2 10 1 11 0

for any capacity up to 12.

Generally, the fill order is not dependent on the skyranger's capacity but rather on the maximum number of UI slots, is this what got you confused?

Link to comment
Share on other sites

No I think what has me confused is the maping between soldier number and slot number...

 

From my seemingly flawed understanding:

First soldiers slot = m_arrFillOrderIndex[0]

Second soldiers slot = m_arrFillOrderIndex[1]

Third soldiers slot = m_arrFillOrderIndex[2]

 

If the finnished array looks like this: [6, 5, 7, 4, 8, 3, 9, 2, 10, 1, 11, 0]

Then only the very last soldier added would be assigned to slot 0 (the rightmost one).

Link to comment
Share on other sites

If the finnished array looks like this: [6, 5, 7, 4, 8, 3, 9, 2, 10, 1, 11, 0]

Then only the very last soldier added would be assigned to slot 0 (the rightmost one).

That observation is correct and I believe this is the proper way to fill out the soldier slots as it is analogous to the vanilla order (which also puts the sixth soldier in the rightmost slot).

In an 8-soldier setup only the first 8 indexes of that fill order array would be used, slots 0, 1, 10 and 11 (the rightmost 2 and leftmost 2 slots) would be left vacant.

Link to comment
Share on other sites

But since only slot 0-5 has a pawn... And vanilla places first soldier in slot3... Wouldn't he now end up in slot 0 due to missing pawn location for slot6 together with soldier11 (last one)?

Playing around with the fill order does not affect placement of the soldier pawns as far as I can tell. Pawn placement (so far) affects only the first 6 soldiers filled into slots and arranges them in a fashion which mirrors the vanilla slot fill order. You can easily see this using your linear fill order you posted earlier, the soldier in the rightmost UI slot (unit 0) is displayed in the squad leader's position, unit 1 to the right of the leader pawn, unit 2 to the left of the leader pawn and so on.

So after altering the maximum number of displayable soldier slots the fill order array needs to be adjusted to retain the vanilla appearance of slots being aligned with their pawns, at least for the first six soldiers.

Edited by XMarksTheSpot
Link to comment
Share on other sites

Yes in linear fillorder it works because soldier 0-5 ends up in slot 0-5.

But if that was not true then I am pretty sure we would end up in the scenario I described, so yes I agree that the first six soldiers need to be in the first six slots, which will not happen if we make the fillorder like this:

[6, 5, 7, 4, 8, 3, 9, 2, 10, 1, 11, 0].

 

I have also made a small test the pawnlocations can be swaped around in SeqEvent_HQUnits.AddUnit, so as soon as a fill order has been decided it is a simple matter of re-aligning the pawnlocations so that the soldier in slot 0 is shown above slot zero (when scrolled max right).

 

the fill-order I think would be easiest to implement would be:

[3, 2, 1, 0, 4, 5, 6, 7, 8, 9, 10, 11] as it would be one reversed loop 3 to 0 followed by a normal loop 4 to 11.

 

The most correct that would require no re-mapping of the pawns would be:

[3, 2, 4, 1, 5, 0, 6, 7, 8, 9, 10, 11]

 

And if someone figures out how to actually add additional pawnlocations then [6, 5, 7, 4, 8, 3, 9, 2, 10, 1, 11, 0] would be the best one.

Link to comment
Share on other sites

I thought about that idea as well, but I assume it is ten times more difficult to implement there than in the upk...

 

I don't think it should be to hard to implement any of the fillorders discussed... The main issue was that I was confused about what to implement.

 

Edit: And what implications it would have on scalability.

 

Edit2: I will most likely aim to implement this one tomorrow as it seems to be meeting all goals: [3, 2, 4, 1, 5, 0, 6, 7, 8, 9, 10, 11], however it will most likely also require that m_arrUIOptions.Add(m_iMaxSlots) respects whether OTS upgrades have been bought or not with skyranger capacity = 4 (which I will be more certain about after sleeping on it :smile: )

Edited by Bertilsson
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...