Jump to content

XMarksTheSpot

Members
  • Posts

    165
  • Joined

  • Last visited

Everything posted by XMarksTheSpot

  1. Neat, looks like a pretty straightforward change was all that's needed after all :cool: I suppose the proper inside-out fill order would be 4-3-5-2-6-1-7-0 for 8 slots, the basic pattern looks to be capacity/2 = 4 -1 = 3 +2 = 5 -3 = 2 +4 = 6 -5 = 1 +6 = 7 -7 = 0Maybe the bunch of "m_arrFillOrderIndex.AddItem(x);" calls could be replaced with a loop construct allowing for different slot counts defined via simple DGC edits, something along the lines of index = m_iMaxSlots / 2; for(i = 0; i < m_iMaxSlots; i++) { m_arrFillOrderIndex.AddItem(index); index += ((i%2)*2-1)*(i+1); } Not sure if this is feasible with UPK hexing though, can you introduce new local helper variables to a function or are you stuck with using what's defined originally? Edit: just noticed this Actually I didn't just append slots 6 and 7 to the end of the sprite list but instead inserted them separately at either end while also modifying the identifiers. So slots 0-5 became 1-6 in the process with a new 0 and 7 entering the list. I just thought that keeping the order along the x axis intact would be a good idea :smile:
  2. Yes to both, I didn't go into much detail regarding those minor edits, did I? Sorry about that. I did change the m_arrUIOptions array to hold 8 elements m_arrUIOptions.Add(8); as well as increasing the MAX_UNITS var to 8 (as can be seen in the flash edits below). Alright, alright, no need to be so pushy :laugh: Needs two replacements, the first is an updated "Squadlist MC" sprite definition placing two extra soldier slot boxes to the right and the left: original header FF 09 8C 00 00 00 3C 00 01 00 new data, 44 (0x2C) extra bytes FF 09 B8 00 00 00 3C 00 01 00 BF 06 10 00 00 00 26 01 00 3B 00 1F 1D 87 8D 98 75 6E 69 74 37 00 BF 06 10 00 00 00 26 01 00 3B 00 1F 56 17 8D 98 75 6E 69 74 36 00 BF 06 10 00 00 00 26 1E 00 3B 00 1D 1D 4E 36 60 75 6E 69 74 35 00 BF 06 10 00 00 00 26 3B 00 3B 00 1B 1C D8 D9 80 75 6E 69 74 34 00 BF 06 10 00 00 00 26 58 00 3B 00 1B FF 18 D9 80 75 6E 69 74 33 00 BF 06 10 00 00 00 26 75 00 3B 00 1A E1 58 D9 80 75 6E 69 74 32 00 BF 06 10 00 00 00 26 92 00 3B 00 1C E1 CE 36 60 75 6E 69 74 31 00 BF 06 10 00 00 00 26 92 00 3B 00 1E A9 77 8D 98 75 6E 69 74 30 00 The second one contains edits to the SquadList ActionScript class to free up space needed by the first change (removing debug stuff) and to increase MAX_UNITS to 8: original header 5F 5F 50 61 63 6B 61 67 65 73 2E 53 71 75 61 64 4C 69 73 74 00 FF 0E 78 0C 00 00 60 00 88 D5 03 54 00 (alternatively search for '__Packages.SquadList' string, without quotes) new data, 44 (0x2C) bytes less 5F 5F 50 61 63 6B 61 67 65 73 2E 53 71 75 61 64 4C 69 73 74 00 FF 0E 4C 0C 00 00 60 00 88 D1 03 54 00 5F 67 6C 6F 62 61 6C 00 53 71 75 61 64 4C 69 73 74 00 61 6E 63 68 6F 72 00 45 6E 76 69 72 6F 6E 6D 65 6E 74 00 41 4E 43 48 4F 52 5F 42 4F 54 54 4F 4D 5F 43 45 4E 54 45 52 00 50 61 6E 65 6C 00 70 72 6F 74 6F 74 79 70 65 00 6F 6E 4C 6F 61 64 00 75 6E 69 74 42 6F 78 65 73 00 41 72 72 61 79 00 4D 41 58 5F 55 4E 49 54 53 00 75 6E 69 74 00 70 75 73 68 00 55 70 64 61 74 65 41 6E 63 68 6F 72 69 6E 67 00 6D 78 00 75 74 69 6C 73 00 44 65 6C 65 67 61 74 65 00 63 72 65 61 74 65 00 69 6E 73 74 61 6E 63 65 00 53 75 62 73 63 72 69 62 65 54 6F 52 65 73 6F 6C 75 74 69 6F 6E 55 70 64 61 74 65 00 64 69 73 70 6F 73 65 00 73 65 74 41 6E 63 68 6F 72 00 5F 79 00 6F 6E 50 6F 70 75 6C 61 74 65 44 65 62 75 67 44 61 74 61 00 63 75 72 72 65 6E 74 53 65 6C 65 63 74 69 6F 6E 00 64 65 62 75 67 5F 63 75 72 72 65 6E 74 53 65 6C 65 63 74 69 6F 6E 00 43 6C 65 61 72 00 49 63 6F 6E 5F 58 5F 53 51 55 41 52 45 00 45 64 69 74 00 49 63 6F 6E 5F 41 5F 58 00 53 65 74 55 6E 69 74 48 65 6C 70 00 50 52 4F 4D 4F 54 45 00 00 4D 65 64 6B 69 74 00 42 41 43 4B 50 41 43 4B 3A 00 73 75 70 70 6F 72 74 00 53 75 70 70 6F 72 74 00 22 43 72 75 73 68 65 72 22 00 52 4B 2E 20 48 41 52 52 49 45 53 00 53 65 74 55 6E 69 74 49 6E 66 6F 00 46 72 61 67 20 47 72 65 6E 61 64 65 00 61 73 73 61 75 6C 74 00 41 73 73 61 75 6C 74 00 22 54 68 65 20 42 65 61 73 74 22 00 52 4B 2E 20 54 75 72 62 6F 20 44 77 61 72 66 20 4B 6F 6D 62 61 74 00 41 6C 69 65 6E 20 47 72 65 6E 61 64 65 00 73 6E 69 70 65 72 00 53 6E 69 70 65 72 00 52 4B 2E 20 53 61 76 61 67 65 20 53 75 73 68 69 20 43 68 6F 72 65 6F 67 72 61 70 68 65 72 00 47 72 61 6E 61 64 61 20 64 65 20 66 72 61 67 6D 65 6E 74 61 63 69 C3 83 C2 B3 6E 00 68 65 61 76 79 00 48 65 61 76 79 00 52 4B 2E 20 54 68 65 20 49 6E 66 65 72 6E 61 6C 20 53 6F 66 74 77 61 72 65 20 54 72 69 00 2B 00 41 44 44 20 55 4E 49 54 00 53 65 74 41 64 64 55 6E 69 74 54 65 78 74 00 4F 6E 43 68 69 6C 64 4D 6F 75 73 65 45 76 65 6E 74 00 4F 6E 43 68 69 6C 64 4D 6F 75 73 65 45 76 65 6E 74 3A 20 00 2C 20 00 49 6E 70 75 74 00 4D 4F 55 53 45 5F 55 50 00 46 6C 61 73 68 52 61 69 73 65 4D 6F 75 73 65 45 76 65 6E 74 00 66 6C 61 73 68 00 65 78 74 65 72 6E 61 6C 00 45 78 74 65 72 6E 61 6C 49 6E 74 65 72 66 61 63 65 00 63 61 6C 6C 00 6F 6E 49 6E 70 75 74 00 64 65 62 75 67 67 69 6E 67 00 44 50 41 44 5F 4C 45 46 54 00 44 50 41 44 5F 52 49 47 48 54 00 53 65 74 53 65 6C 65 63 74 65 64 00 73 65 74 49 6E 64 65 78 00 73 65 74 43 6F 6E 74 61 69 6E 65 72 00 72 65 61 6C 69 7A 65 00 53 65 74 48 65 6C 70 00 53 71 75 61 64 4C 69 73 74 20 2D 20 53 65 74 53 65 6C 65 63 74 65 64 3A 20 69 6E 64 65 78 3D 00 6F 6E 4C 6F 73 65 46 6F 63 75 73 00 6F 6E 52 65 63 65 69 76 65 46 6F 63 75 73 00 68 65 6C 70 5F 64 69 73 70 6C 61 79 31 00 68 65 6C 70 5F 69 63 6F 6E 31 00 68 65 6C 70 5F 64 69 73 70 6C 61 79 30 00 68 65 6C 70 5F 69 63 6F 6E 30 00 45 72 72 6F 72 3A 20 53 65 74 53 65 6C 65 63 74 65 64 49 74 65 6D 20 62 61 64 20 3A 20 00 41 53 53 65 74 50 72 6F 70 46 6C 61 67 73 00 96 02 00 08 00 1C 96 02 00 08 01 4E 12 12 9D 02 00 61 08 96 02 00 08 00 1C 96 02 00 08 01 8E 08 00 00 00 00 03 19 00 22 00 96 0C 00 06 00 00 00 00 00 00 00 00 04 02 03 52 17 96 06 00 04 01 08 02 08 03 1C 96 02 00 08 04 4E 4F 87 01 00 01 4F 96 02 00 08 00 1C 96 02 00 08 01 4E 96 02 00 08 05 1C 69 96 04 00 04 01 08 06 4E 87 01 00 02 17 96 04 00 04 02 08 07 8E 08 00 00 00 00 04 19 00 D5 00 96 0F 00 04 01 08 08 06 00 00 00 00 00 00 00 00 08 09 40 4F 96 09 00 06 00 00 00 00 00 00 00 00 87 01 00 03 17 96 04 00 04 03 08 01 1C 96 02 00 08 0A 4E 48 12 9D 02 00 2F 00 96 06 00 04 01 08 0B 04 03 47 4E 96 09 00 07 01 00 00 00 04 01 08 08 4E 96 02 00 08 0C 52 17 96 02 00 04 03 50 87 01 00 03 17 99 02 00 BC FF 96 0D 00 06 00 00 00 00 00 00 00 00 04 02 08 07 52 17 96 0D 00 06 00 00 00 00 00 00 00 00 04 01 08 0D 52 17 96 04 00 04 01 08 0D 4E 96 09 00 04 01 07 02 00 00 00 08 0E 1C 96 02 00 08 0F 4E 96 02 00 08 10 4E 96 02 00 08 11 52 96 10 00 07 01 00 00 00 06 00 00 00 00 00 00 00 00 08 03 1C 96 02 00 08 12 52 96 02 00 08 13 52 17 4F 96 04 00 04 02 08 14 8E 08 00 00 00 00 03 19 00 5A 00 96 04 00 04 01 08 0D 4E 96 09 00 04 01 07 02 00 00 00 08 0E 1C 96 02 00 08 0F 4E 96 02 00 08 10 4E 96 02 00 08 11 52 96 10 00 07 01 00 00 00 06 00 00 00 00 00 00 00 00 08 03 1C 96 02 00 08 12 52 96 02 00 08 13 52 17 96 0D 00 06 00 00 00 00 00 00 00 00 04 02 08 14 52 17 4F 96 04 00 04 02 08 0D 8E 08 00 00 00 00 02 29 00 2C 00 96 04 00 04 01 08 02 4E 96 09 00 07 01 00 00 00 04 01 08 15 52 17 96 08 00 04 01 08 16 04 01 08 16 4E 96 05 00 07 19 00 00 00 0B 4F 4F 96 04 00 04 02 08 17 8E 08 00 00 00 00 02 29 00 EA 00 96 0D 00 04 01 08 18 06 00 00 00 00 00 00 00 00 4F 96 0D 00 04 01 08 19 06 00 00 00 00 00 00 00 00 4F 96 11 00 08 1A 08 1B 08 1C 08 1D 07 04 00 00 00 04 01 08 1E 52 17 96 27 00 08 1F 08 20 08 21 08 22 08 23 08 24 08 25 08 26 07 03 00 00 00 06 00 00 00 00 00 00 00 00 07 0A 00 00 00 04 01 08 27 52 17 96 27 00 08 20 08 28 08 21 08 22 08 29 08 2A 08 2B 08 2C 06 00 00 00 00 00 00 00 00 07 01 00 00 00 07 0A 00 00 00 04 01 08 27 52 17 96 23 00 08 20 08 20 08 2D 08 22 08 2E 08 2F 08 2B 08 30 07 01 00 00 00 07 02 00 00 00 07 0A 00 00 00 04 01 08 27 52 17 96 14 00 08 1D 08 35 08 36 07 04 00 00 00 07 04 00 00 00 04 01 08 37 52 17 96 14 00 08 1D 08 35 08 36 07 05 00 00 00 07 04 00 00 00 04 01 08 37 52 17 4F 96 04 00 04 02 08 38 8E 17 00 00 02 00 04 29 00 03 74 61 72 67 65 74 00 02 65 76 65 6E 74 00 58 00 96 04 00 08 39 04 03 47 96 02 00 08 3A 47 96 02 00 04 02 47 26 96 04 00 04 02 08 3B 1C 96 02 00 08 3C 4E 49 12 9D 02 00 2E 00 96 02 00 04 03 4B 96 04 00 04 02 04 01 4B 96 09 00 08 3D 07 04 00 00 00 08 3E 1C 96 02 00 08 3F 4E 96 02 00 08 40 4E 96 02 00 08 41 52 17 4F 96 04 00 04 02 08 42 8E 16 00 00 02 00 05 29 01 04 63 6F 64 65 00 00 61 63 74 69 6F 6E 00 F7 00 96 04 00 04 02 08 43 4E 12 12 9D 02 00 06 00 96 02 00 05 00 3E 96 02 00 05 01 87 01 00 03 17 96 02 00 04 04 87 01 00 00 96 02 00 08 3B 1C 96 02 00 08 44 4E 66 9D 02 00 19 00 96 04 00 04 00 08 3B 1C 96 02 00 08 45 4E 66 9D 02 00 46 00 99 02 00 8F 00 96 0C 00 04 01 08 19 04 01 08 19 04 01 08 19 4E 50 87 01 00 00 4F 96 04 00 04 00 08 01 1C 96 02 00 08 0A 4E 3F 4F 96 04 00 04 01 08 19 4E 96 09 00 07 01 00 00 00 04 01 08 46 52 17 99 02 00 5D 00 96 0C 00 04 01 08 19 04 01 08 19 04 01 08 19 4E 51 87 01 00 00 4F 96 04 00 04 00 08 01 1C 96 02 00 08 0A 4E 47 96 02 00 08 01 1C 96 02 00 08 0A 4E 3F 4F 96 04 00 04 01 08 19 4E 96 09 00 07 01 00 00 00 04 01 08 46 52 17 99 02 00 0F 00 96 02 00 05 00 87 01 00 03 17 99 02 00 00 00 96 02 00 04 03 3E 4F 96 04 00 04 02 08 27 8E 61 00 00 0A 00 0C 29 00 02 69 6E 64 65 78 00 09 73 74 61 74 75 73 00 03 75 6E 69 74 4E 61 6D 65 00 08 6E 69 63 6B 6E 61 6D 65 00 07 63 6C 61 73 73 54 65 78 74 00 0B 63 6C 61 73 73 4C 61 62 65 6C 00 0A 62 61 63 6B 70 61 63 6B 00 05 69 74 65 6D 31 00 04 69 74 65 6D 32 00 06 70 72 6F 6D 6F 00 82 00 96 0B 00 04 02 07 01 00 00 00 04 01 08 08 4E 96 02 00 04 02 4E 96 02 00 08 47 52 17 96 0B 00 04 01 07 01 00 00 00 04 01 08 08 4E 96 02 00 04 02 4E 96 02 00 08 48 52 17 96 1B 00 04 06 04 04 04 05 04 0A 04 0B 04 07 04 08 04 03 04 09 07 09 00 00 00 04 01 08 08 4E 96 02 00 04 02 4E 96 02 00 08 27 52 17 96 0D 00 06 00 00 00 00 00 00 00 00 04 01 08 08 4E 96 02 00 04 02 4E 96 02 00 08 49 52 17 4F 96 04 00 04 02 08 37 8E 2C 00 00 04 00 06 29 00 02 69 6E 64 65 78 00 04 64 69 73 70 6C 61 79 53 74 72 69 6E 67 00 03 70 72 65 66 69 78 00 05 69 63 6F 6E 00 94 00 96 0B 00 04 02 07 01 00 00 00 04 01 08 08 4E 96 02 00 04 02 4E 96 02 00 08 47 52 17 96 0B 00 04 01 07 01 00 00 00 04 01 08 08 4E 96 02 00 04 02 4E 96 02 00 08 48 52 17 96 0F 00 04 05 04 03 04 04 07 03 00 00 00 04 01 08 08 4E 96 02 00 04 02 4E 96 02 00 08 37 52 17 96 0D 00 06 00 00 00 00 00 00 00 00 04 01 08 08 4E 96 02 00 04 02 4E 96 02 00 08 4A 52 17 96 0D 00 06 00 00 00 00 00 00 00 00 04 01 08 08 4E 96 02 00 04 02 4E 96 02 00 08 49 52 17 4F 96 04 00 04 02 08 46 8E 36 00 00 02 00 05 29 00 03 74 61 72 67 65 74 49 6E 64 65 78 00 04 66 6F 72 63 65 52 65 64 72 61 77 49 66 50 72 65 76 69 6F 75 73 6C 79 53 65 6C 65 63 74 65 64 00 40 01 96 03 00 04 03 03 49 4C 9D 02 00 0F 00 17 96 04 00 04 01 08 18 4E 96 02 00 04 03 49 4C 12 9D 02 00 07 00 17 96 02 00 04 04 12 12 9D 02 00 05 00 96 01 00 03 3E 96 04 00 08 4B 04 03 47 26 96 09 00 06 00 00 00 00 00 00 00 00 87 01 00 02 17 96 04 00 04 02 08 01 1C 96 02 00 08 0A 4E 48 12 9D 02 00 2E 00 96 0D 00 06 00 00 00 00 00 00 00 00 04 01 08 08 4E 96 02 00 04 02 4E 96 02 00 08 4C 52 17 96 02 00 04 02 50 87 01 00 02 17 99 02 00 BD FF 96 07 00 04 03 07 FF FF FF FF 67 4C 12 9D 02 00 10 00 17 96 04 00 04 03 08 01 1C 96 02 00 08 0A 4E 48 12 9D 02 00 67 00 96 06 00 04 01 08 18 04 03 4F 96 0D 00 06 00 00 00 00 00 00 00 00 04 01 08 08 4E 96 02 00 04 03 4E 96 02 00 08 4D 52 17 96 04 00 04 01 08 4E 4E 96 04 00 04 01 08 4F 4E 96 04 00 04 01 08 50 4E 96 04 00 04 01 08 51 4E 96 09 00 07 04 00 00 00 04 01 08 08 4E 96 02 00 04 03 4E 96 02 00 08 4A 52 17 99 02 00 1F 00 96 07 00 04 03 07 FF FF FF FF 49 12 9D 02 00 05 00 99 02 00 09 00 96 04 00 08 52 04 03 47 26 4F 96 04 00 04 02 08 1E 8E 2A 00 00 04 00 06 29 00 05 69 63 6F 6E 30 00 03 64 69 73 70 6C 61 79 30 00 04 69 63 6F 6E 31 00 02 64 69 73 70 6C 61 79 31 00 28 00 96 06 00 04 01 08 51 04 05 4F 96 06 00 04 01 08 4F 04 04 4F 96 06 00 04 01 08 50 04 03 4F 96 06 00 04 01 08 4E 04 02 4F 4F 96 09 00 04 01 08 0A 07 08 00 00 00 4F 96 09 00 04 02 08 18 07 FF FF FF FF 4F 96 09 00 04 02 08 19 07 FF FF FF FF 4F 96 08 00 07 01 00 00 00 02 08 00 1C 96 02 00 08 01 4E 96 02 00 08 06 4E 96 07 00 07 03 00 00 00 08 53 Enjoy! :happy: Yes, I suppose there are a few ways to achieve this, e.g. by editing some sprite definitions directly or adding a bit of ActionScript code, which is less of a pain in the rear as you don't need to bother decoding the sprite stuff. Most of the PlaceObject tags in the sprite definitions usually don't feature scaling information, so you'd need to free up space for that by editing some ActionScript class anyway. Yes, I did that. Since I haven't added any fixes related to soldier placement I got the usual 6 units near the LZ and two more stacked on top of each other at an alien spawn point, no more.
  3. I suppose I could be persuaded into doing that - what exactly do you have in mind? With regards to sprite definition edits there's already the Launch sprite change article which did a good job of pointing me in the right directions in the beginning, the rest was done via careful study of the SWF File Format Specification to get the hang of decoding and modifying all those bit-packed swf tags.
  4. It's quite possible to add more soldier slots to the selection screen, indeed: http://i.imgur.com/VV3k6hj.jpg Note that the slots are defined and referenced from right to left (unit0, unit1, and so forth) and that I modified the UISquadSelect_SquadList#Init() method to fill the slots in that same order. I had set the skyranger's capacity to 8 via DGC edit and inside the Add Unit dialog two more soldiers showed up marked as 'On Mission'. Trying to add more units by clicking the empty slots also marked them as 'On Mission' but neither did they fill the slot in the selection screen nor did they appear in the tactical game. So basically there's a bit of UPK re-coding necessary to make any new slots actually functional :geek: 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)?
  5. So, after tinkering around with the loadout screen for what feels like an eternity I've finally got it to a point worth releasing :smile: Behold the modified screen featuring a properly placed and fully functional scrollbar for the inventory list: http://i.imgur.com/WcPve65.jpg To achieve this I've basically enlarged the background of the loadout panel, moved a few components of it to the right and copied the scrollbar objects from the locker list into the inventory list sprite as mentioned in my previous post. Add to that further adjustments made to the InventoryList ActionScript class to make item focus behavior work properly and to free up some space for the new sprite objects. I've added my notes containing the necessary changes below: For those that don't want to bother with several smaller hex edits, here's the complete flash file: Simply copy its contents [142,189 (0x22B6D) bytes] into the command1.upk file starting at offset 0x2D73D87 :smile: Enjoy!
  6. Good news, after Amineri pointed me towards modifying sprite defintions to add more stuff to the squad select UI (again, thanks for that, you rock :thumbsup:) it occurred to me that this might be the missing link in getting a scrollbar in the inventory list. I've tinkered around with the DefineSprite parts of the loadout flash file (as well as 'borrowing' a few ActionScript commands found inside the LockerList class and putting them into the InventoryList script) and lo and behold, a functional scrollbar and masking rectangle appeared! :smile: http://i.imgur.com/XvFxyps.jpg Originally I've simply copied the object definitions from the lockerList sprite, but have since modified them a bit to correct the placement of the masking rectangle and moved the scrollbar to the left-hand side of the item list. There are still a few kinks to iron out, e.g. I'd like to add a margin on the left edge of the loadout sprite where the scrollbar will be placed and the selection indicator is misbehaving, as usual :rolleyes: Will report back when those issues have been dealt with :thumbsup: In general, I very much prefer this solution to the grid-based one as the scrollbar behavior is much more dynamic and independent of the number of items you specify. As with the locker list no scrollbar will be displayed when the item sprites don't exceed the space defined by the masking rectangle, so some measure of backwards-compatibility for vanilla-like configurations with only 2 small items is maintained :smile:
  7. Ah, intriguing, I haven't considered looking into the sprite definitions, so I was looking in the wrong places after all :wink: Thanks for the hint, I'll try tinkering with that, and maybe re-read some earlier posts, the scrolling solution still seems rather sound to me (visual consistency and all).
  8. Maybe editing the original squad selection UI is still the best option? I've been sifting through the related ActionScript and UnrealScript classes, but haven't found what exactly limits the number of displayed unit boxes and how they're laid out, yet. I was able to reduce their number (by reducing the SKYRANGER_CAPACITY variable in the DGC settings) and modify their scale (via AS hexing), but making additional boxes appear has been out of reach so far - perhaps I'm looking in the wrong places :ermm: Yet perhaps a different alternative could be viable: instead of changing the number of visible unit boxes it might be possible to re-rig the outermost boxes (the ones that display the OTS-related hints) to serve a different function. The way I envision it these boxes would display left-/right-pointing arrows or 'next'/'prev' text labels and would be used to 'scroll' through the list of soldiers by manually invoking the UnloadSoldierFromSlot() and LoadSoldierIntoSlot() methods inside the XGFacility_Barracks class. Scrolling could happen in increments of four - imagine 4-person sub-squads (e.g. Team Alpha, Bravo and Charlie :cool:) and the OTS upgrades would be re-configured to increase the squad limit by the same increment (making it 4/8/12 instead of 4/5/6). Perhaps I'm dreaming a little too big here, but this would at least be visually more consistent than adding more unit boxes to the loadout screen without additional soldier pawns in the hangar scene to go with them. I suspect there are a quite a few changes to be made in various places, mainly XGChooseSquadUI, UISquadSelect and UISquadSelect_SquadList (to modify button behavior of the outermost boxes), but possibly also to XGFacility_Barracks and XGShip_Dropship (to properly track changes made to the soldier selection and to differentiate scrolling-related loading/unloading from standard behavior by clicking 'add unit'/'clear unit'). Anyone up for brainstorming this idea? :smile:
  9. I've had soldiers not being able to take cover on a lot of occasions, but got them into that state in a different way. When you order a unit to move somewhere and then try to have it switch its weapons by clicking the icons in the bottom right while it's still moving the unit will stop mid-motion, swap its weapons and will usually not be located properly in a tile. Moving the unit next to cover will then have no effect most of the time, it'll keep playing its out-of-cover idle animations. Fortunately saving and reloading the game seems to fix that, 'grounding' the unit to the nearest tile and making it take cover properly. Edit: on retrospection the effect might be triggered not by swapping, but probably by reloading weapons mid-move
  10. I've finished up an updated version of the grid-like small item layout - changes include better use of the padding parameter, a modified slot order (right-to-left, top-to-bottom), increased font size and proper placement of the selection indicator thingie (that one took a lot longer than anticipated, but that's what you get for being a stickler for such details :geek:). Hex changes to the command1.upk file noted below: # class start offset end offset length InventoryListItem 0x02D8C955 0x02D8DBD7 4739 (0x1283) 0A 05 6C 00 31 32 33 34 35 36 37 38 39 30 31 00 5F 78 00 70 61 64 64 69 6E 67 00 5F 69 6E 64 65 78 00 5F 67 6C 6F 62 61 6C 00 49 6E 76 65 6E 74 6F 72 79 4C 69 73 74 49 74 65 6D 00 62 53 6B 69 70 4D 6F 75 73 65 42 69 6E 64 69 6E 67 00 58 43 6F 6D 4C 69 73 74 49 74 65 6D 42 61 73 65 00 70 72 6F 74 6F 74 79 70 65 00 49 43 6F 6E 74 61 69 6E 65 72 49 74 65 6D 00 6F 6E 4C 6F 61 64 00 74 69 74 6C 65 00 66 6F 6E 74 53 69 7A 65 00 46 4F 4E 54 5F 53 49 5A 45 5F 33 44 00 5F 69 6E 76 65 6E 74 6F 72 79 49 74 65 6D 48 65 6C 70 00 72 65 6D 6F 76 65 49 74 65 6D 42 74 6E 48 65 6C 70 00 67 6F 74 6F 41 6E 64 53 74 6F 70 00 69 74 65 6D 54 79 70 65 00 69 6E 69 74 49 74 65 6D 54 79 70 65 00 69 6E 69 74 49 74 65 6D 49 6D 67 00 68 6F 76 65 72 4D 43 00 68 6F 76 65 72 00 5F 76 69 73 69 62 6C 65 00 74 68 65 42 75 74 74 6F 6E 00 68 69 74 41 72 65 61 4D 43 00 6F 6E 52 6F 6C 6C 4F 76 65 72 00 68 6F 76 65 72 49 6E 00 6D 78 00 75 74 69 6C 73 00 44 65 6C 65 67 61 74 65 00 63 72 65 61 74 65 00 6F 6E 52 6F 6C 6C 4F 75 74 00 68 6F 76 65 72 4F 75 74 00 42 69 6E 64 00 6D 6F 75 73 65 00 69 6E 66 6F 4D 6F 75 73 65 49 6E 00 69 6E 66 6F 4D 6F 75 73 65 4F 75 74 00 63 6C 69 63 6B 61 62 6C 65 42 75 74 74 6F 6E 30 00 65 71 75 69 70 4D 6F 75 73 65 49 6E 00 65 71 75 69 70 4D 6F 75 73 65 4F 75 74 00 63 6C 69 63 6B 61 62 6C 65 42 75 74 74 6F 6E 31 00 52 65 66 72 65 73 68 44 61 74 61 00 49 6E 76 65 6E 74 6F 72 79 4C 69 73 74 00 49 54 45 4D 5F 54 59 50 45 5F 53 4D 41 4C 4C 5F 49 54 45 4D 00 6E 75 6D 53 6D 61 6C 6C 49 74 65 6D 73 00 69 6E 69 74 4E 75 6D 49 74 65 6D 73 00 48 69 64 65 41 6C 6C 49 6D 61 67 65 43 6F 6E 74 61 69 6E 65 72 73 00 69 74 65 6D 31 00 5F 78 73 63 61 6C 65 00 49 54 45 4D 53 5F 49 4D 47 5F 53 43 41 4C 45 00 5F 79 73 63 61 6C 65 00 69 6D 61 67 65 00 69 74 65 6D 00 77 74 61 32 69 00 49 54 45 4D 5F 54 59 50 45 5F 41 52 4D 4F 52 00 57 45 41 50 4F 4E 5F 49 4D 47 5F 53 43 41 4C 45 00 41 52 4D 4F 52 5F 49 4D 47 5F 53 43 41 4C 45 00 4D 41 58 5F 4E 55 4D 5F 53 4D 41 4C 4C 5F 49 54 45 4D 53 00 69 73 46 6F 63 75 73 65 64 00 43 6F 6C 6F 72 73 00 4E 4F 52 4D 41 4C 5F 48 54 4D 4C 00 48 49 4C 49 54 45 5F 48 54 4D 4C 00 68 74 6D 6C 54 65 78 74 00 69 74 65 6D 54 65 78 74 00 77 72 61 70 49 6E 48 74 6D 6C 00 45 6E 76 69 72 6F 6E 6D 65 6E 74 00 69 6E 73 74 61 6E 63 65 00 49 73 4D 6F 75 73 65 41 63 74 69 76 65 00 58 43 6F 6D 4C 69 73 74 00 5F 63 6F 6E 74 61 69 6E 65 72 00 67 65 74 53 65 6C 65 63 74 65 64 49 6E 64 65 78 00 67 65 74 49 6E 64 65 78 00 4C 6F 63 6B 65 72 4C 69 73 74 00 49 54 45 4D 5F 43 41 52 44 5F 42 54 4E 5F 48 45 4C 50 5F 47 41 4D 45 50 41 44 5F 49 43 4F 4E 00 62 74 6E 49 63 6F 6E 30 00 61 63 74 69 6F 6E 49 63 6F 6E 30 00 6F 77 6E 65 72 53 63 72 65 65 6E 00 73 74 72 52 65 6D 6F 76 65 49 6E 76 65 6E 74 6F 72 79 53 6C 6F 74 42 75 74 74 6F 6E 48 65 6C 70 49 63 6F 6E 00 62 74 6E 49 63 6F 6E 31 00 61 63 74 69 6F 6E 49 63 6F 6E 31 00 5F 72 65 6D 6F 76 65 00 65 71 75 69 70 49 63 6F 6E 00 62 74 6E 48 65 6C 70 00 5F 79 00 67 65 74 48 65 69 67 68 74 00 49 54 45 4D 5F 54 59 50 45 5F 57 45 41 50 4F 4E 00 67 65 74 49 64 00 6F 6E 52 65 63 65 69 76 65 46 6F 63 75 73 00 69 73 4C 6F 63 6B 65 64 46 6F 72 4C 6F 63 6B 65 72 53 65 6C 65 63 74 69 6F 6E 00 5F 53 65 6C 65 63 74 65 64 55 6E 66 6F 63 75 73 65 64 00 5F 53 65 6C 65 63 74 65 64 00 49 43 4F 4E 5F 41 5F 58 00 67 61 6D 65 70 61 64 49 63 6F 6E 00 67 6F 74 6F 41 6E 64 50 6C 61 79 00 5F 55 70 00 6F 6E 4C 6F 73 65 46 6F 63 75 73 00 53 6F 6C 64 69 65 72 4C 6F 61 64 6F 75 74 00 5F 70 61 72 65 6E 74 00 48 69 67 68 6C 69 67 68 74 49 6E 76 65 6E 74 6F 72 79 4C 69 73 74 00 49 6E 76 65 6E 74 6F 72 79 4D 6F 75 73 65 53 65 6C 65 63 74 69 6F 6E 43 68 61 6E 67 65 64 00 46 6C 61 73 68 52 61 69 73 65 43 6F 6D 6D 61 6E 64 00 66 6C 61 73 68 00 65 78 74 65 72 6E 61 6C 00 45 78 74 65 72 6E 61 6C 49 6E 74 65 72 66 61 63 65 00 63 61 6C 6C 00 5F 68 6F 76 65 72 00 5F 6E 6F 72 6D 61 6C 00 41 53 53 65 74 50 72 6F 70 46 6C 61 67 73 00 96 02 00 08 04 1C 96 02 00 08 05 4E 12 12 9D 02 00 65 0D 96 02 00 08 04 1C 96 02 00 08 05 8E 08 00 00 00 00 03 19 00 1B 00 96 0C 00 06 00 00 00 00 00 00 00 00 04 02 03 52 17 96 06 00 04 01 08 06 05 01 4F 87 01 00 01 4F 96 02 00 08 04 1C 96 02 00 08 05 4E 96 02 00 08 07 1C 69 96 04 00 04 01 08 08 4E 87 01 00 02 17 96 02 00 08 04 1C 96 02 00 08 09 4E 96 07 00 07 01 00 00 00 08 04 1C 96 02 00 08 05 4E 2C 96 04 00 04 02 08 0A 8E 08 00 00 00 00 0D 19 00 B4 04 96 0D 00 06 00 00 00 00 00 00 00 00 04 02 08 0A 52 17 96 04 00 04 01 08 0B 4E 96 04 00 08 0C 08 07 1C 96 02 00 08 0D 4E 4F 96 0B 00 08 0E 07 01 00 00 00 04 01 08 0F 4E 96 02 00 08 10 52 17 96 08 00 04 01 08 11 04 01 08 12 4E 4F 96 04 00 04 01 08 13 4E 87 01 00 0B 17 96 08 00 04 01 08 14 04 01 08 15 4E 4F 96 04 00 04 01 08 14 4E 96 04 00 08 16 05 00 4F 96 06 00 08 19 04 01 08 1A 4E 96 09 00 04 01 07 02 00 00 00 08 1B 1C 96 02 00 08 1C 4E 96 02 00 08 1D 4E 96 02 00 08 1E 52 96 06 00 08 1F 04 01 08 20 4E 96 09 00 04 01 07 02 00 00 00 08 1B 1C 96 02 00 08 1C 4E 96 02 00 08 1D 4E 96 02 00 08 1E 52 96 05 00 07 02 00 00 00 43 96 04 00 04 01 08 18 4E 96 07 00 07 02 00 00 00 08 21 1C 96 02 00 08 22 52 17 96 06 00 08 19 04 01 08 23 4E 96 09 00 04 01 07 02 00 00 00 08 1B 1C 96 02 00 08 1C 4E 96 02 00 08 1D 4E 96 02 00 08 1E 52 96 06 00 08 1F 04 01 08 24 4E 96 09 00 04 01 07 02 00 00 00 08 1B 1C 96 02 00 08 1C 4E 96 02 00 08 1D 4E 96 02 00 08 1E 52 96 05 00 07 02 00 00 00 43 96 04 00 04 01 08 0F 4E 96 02 00 08 25 4E 96 07 00 07 02 00 00 00 08 21 1C 96 02 00 08 22 52 17 96 06 00 08 19 04 01 08 26 4E 96 09 00 04 01 07 02 00 00 00 08 1B 1C 96 02 00 08 1C 4E 96 02 00 08 1D 4E 96 02 00 08 1E 52 96 06 00 08 1F 04 01 08 27 4E 96 09 00 04 01 07 02 00 00 00 08 1B 1C 96 02 00 08 1C 4E 96 02 00 08 1D 4E 96 02 00 08 1E 52 96 05 00 07 02 00 00 00 43 96 04 00 04 01 08 0F 4E 96 02 00 08 28 4E 96 07 00 07 02 00 00 00 08 21 1C 96 02 00 08 22 52 17 96 0D 00 06 00 00 00 00 00 00 00 00 04 01 08 29 52 17 96 04 00 04 01 08 11 4E 96 02 00 08 2A 1C 96 02 00 08 2B 4E 49 12 9D 02 00 1A 02 96 09 00 04 01 08 30 07 30 00 00 00 4F 96 09 00 04 01 08 32 07 30 00 00 00 4F 96 08 00 04 01 08 01 04 01 08 03 4E 96 05 00 07 02 00 00 00 3F 96 05 00 07 7F 00 00 00 0C 96 05 00 07 16 00 00 00 0B 4F 96 04 00 04 01 08 0B 4E 96 07 00 08 0C 07 2A 00 00 00 4F 96 04 00 04 01 08 0B 4E 96 0E 00 00 5F 68 65 69 67 68 74 00 07 30 00 00 00 4F 96 08 00 04 01 08 2C 04 01 08 2D 4E 4F 96 0D 00 06 00 00 00 00 00 00 00 00 04 01 08 2E 52 17 96 04 00 04 01 08 13 4E 96 02 00 00 00 49 4C 9D 02 00 0E 00 17 96 04 00 04 01 08 13 4E 96 01 00 03 49 12 9D 02 00 00 00 96 04 00 04 01 08 2C 4E 96 05 00 07 01 00 00 00 49 12 9D 02 00 75 00 96 04 00 04 01 08 2F 4B 4E 87 01 00 06 17 96 09 00 08 30 07 64 00 00 00 08 05 1C 96 02 00 08 31 4E 0C 96 09 00 08 32 07 64 00 00 00 08 05 1C 96 02 00 08 31 4E 0C 96 09 00 08 16 05 01 07 03 00 00 00 43 96 04 00 04 01 08 13 4E 96 09 00 04 06 07 03 00 00 00 08 21 1C 96 02 00 08 33 52 17 96 04 00 04 01 08 2F 4B 4E 96 04 00 08 16 05 01 4F 99 02 00 D3 00 96 09 00 06 00 00 00 00 00 00 00 00 87 01 00 03 17 96 06 00 04 03 04 01 08 2C 4E 48 12 9D 02 00 B1 00 96 02 00 08 34 87 01 00 04 17 96 04 00 04 01 08 2C 4E 96 05 00 07 02 00 00 00 49 12 9D 02 00 0A 00 96 02 00 08 35 87 01 00 04 17 96 06 00 04 01 04 04 04 03 47 4B 4E 87 01 00 06 17 96 09 00 08 30 07 64 00 00 00 08 05 1C 96 02 00 08 31 4E 0C 96 09 00 08 32 07 64 00 00 00 08 05 1C 96 02 00 08 31 4E 0C 96 09 00 08 16 05 01 07 03 00 00 00 43 96 04 00 04 01 08 13 4E 96 09 00 04 06 07 03 00 00 00 08 21 1C 96 02 00 08 33 52 17 96 06 00 04 01 04 04 04 03 47 4B 4E 96 04 00 08 16 05 01 4F 96 02 00 04 03 50 87 01 00 03 17 99 02 00 3E FF 99 02 00 8C 00 96 04 00 04 01 08 11 4E 96 02 00 08 2A 1C 96 02 00 08 36 4E 49 9D 02 00 11 00 96 02 00 08 05 1C 96 02 00 08 37 4E 99 02 00 0C 00 96 02 00 08 05 1C 96 02 00 08 38 4E 87 01 00 05 17 96 04 00 04 01 08 33 4E 87 01 00 06 17 96 09 00 08 30 07 64 00 00 00 04 05 0C 96 09 00 08 32 07 64 00 00 00 04 05 0C 96 09 00 08 16 05 01 07 03 00 00 00 43 96 04 00 04 01 08 13 4E 96 09 00 04 06 07 03 00 00 00 08 21 1C 96 02 00 08 33 52 17 4F 96 04 00 04 02 08 2E 8E 08 00 00 00 00 03 29 00 6F 00 96 09 00 06 00 00 00 00 00 00 00 00 87 01 00 02 17 96 04 00 04 02 08 05 1C 96 02 00 08 39 4E 48 12 9D 02 00 49 00 96 06 00 04 01 08 34 04 02 47 4B 4E 96 04 00 08 16 05 00 4F 96 07 00 04 02 07 02 00 00 00 48 12 9D 02 00 14 00 96 06 00 04 01 08 35 04 02 47 4B 4E 96 04 00 08 16 05 00 4F 96 02 00 04 02 50 87 01 00 02 17 99 02 00 A2 FF 4F 96 04 00 04 02 08 29 8E 08 00 00 00 00 05 29 00 94 02 96 04 00 04 01 08 14 4E 96 02 00 08 16 4E 4C 9D 02 00 12 00 17 96 0D 00 06 00 00 00 00 00 00 00 00 04 01 08 3A 52 9D 02 00 11 00 96 02 00 08 3B 1C 96 02 00 08 3C 4E 99 02 00 0C 00 96 02 00 08 3B 1C 96 02 00 08 3D 4E 87 01 00 04 17 96 04 00 04 01 08 0B 4E 96 08 00 08 3E 04 04 04 01 08 3F 4E 96 07 00 07 02 00 00 00 08 3B 1C 96 02 00 08 40 52 4F 96 04 00 04 01 08 0F 4E 87 01 00 02 17 96 14 00 06 00 00 00 00 00 00 00 00 06 00 00 00 00 00 00 00 00 08 41 1C 96 02 00 08 42 52 96 02 00 08 43 52 87 01 00 03 17 96 04 00 04 01 08 3F 4E 96 01 00 03 49 12 4C 12 9D 02 00 10 00 17 96 04 00 04 01 08 3F 4E 96 02 00 00 00 49 12 4C 12 9D 02 00 1E 00 17 96 0D 00 06 00 00 00 00 00 00 00 00 04 01 08 3A 52 4C 9D 02 00 06 00 17 96 02 00 04 03 4C 12 9D 02 00 31 00 17 96 0B 00 06 00 00 00 00 00 00 00 00 08 44 1C 96 04 00 04 01 08 45 4E 2B 96 02 00 08 46 52 96 0D 00 06 00 00 00 00 00 00 00 00 04 01 08 47 52 49 12 9D 02 00 59 01 96 06 00 04 02 08 16 05 01 4F 96 02 00 08 48 1C 96 02 00 08 49 4E 96 09 00 07 01 00 00 00 04 02 08 4A 4E 96 02 00 08 10 52 17 96 04 00 04 02 08 4A 4E 96 04 00 08 16 04 03 12 4F 96 04 00 04 02 08 4B 4E 96 04 00 08 16 04 03 12 4F 96 04 00 04 02 08 25 4E 96 04 00 08 16 04 03 4F 96 04 00 04 01 08 11 4E 96 02 00 08 2A 1C 96 02 00 08 2B 4E 49 12 9D 02 00 AD 00 96 04 00 04 01 08 4C 4E 96 02 00 08 4D 4E 96 09 00 07 01 00 00 00 04 02 08 4E 4E 96 02 00 08 10 52 17 96 04 00 04 02 08 4E 4E 96 04 00 08 16 04 03 12 4F 96 04 00 04 02 08 4F 4E 96 04 00 08 16 04 03 12 4F 96 0B 00 08 50 07 01 00 00 00 04 02 08 4F 4E 96 02 00 08 10 52 17 96 04 00 04 02 08 28 4E 96 04 00 08 16 04 03 4F 96 0B 00 08 50 07 01 00 00 00 04 02 08 28 4E 96 02 00 08 51 4E 96 02 00 08 10 52 17 96 02 00 04 03 12 9D 02 00 17 00 96 04 00 04 01 08 52 4E 96 0B 00 08 53 06 00 00 00 00 00 00 00 00 4F 99 02 00 30 00 96 04 00 04 02 08 4E 4E 96 04 00 08 16 05 00 4F 96 04 00 04 02 08 4F 4E 96 04 00 08 16 05 00 4F 96 04 00 04 02 08 28 4E 96 04 00 08 16 05 00 4F 99 02 00 0A 00 96 06 00 04 02 08 16 05 00 4F 4F 96 04 00 04 02 08 54 8E 08 00 00 00 00 03 29 00 AD 00 96 04 00 04 01 08 11 4E 87 01 00 00 96 02 00 08 2A 1C 96 02 00 08 36 4E 66 9D 02 00 2D 00 96 04 00 04 00 08 2A 1C 96 02 00 08 55 4E 66 9D 02 00 22 00 96 04 00 04 00 08 2A 1C 96 02 00 08 2B 4E 66 9D 02 00 2F 00 99 02 00 5D 00 96 05 00 07 7D 00 00 00 3E 96 09 00 07 69 00 00 00 04 01 08 03 4E 96 05 00 07 02 00 00 00 0E 96 05 00 07 13 00 00 00 0C 0B 3E 96 04 00 04 01 08 03 4E 96 05 00 07 01 00 00 00 0A 96 05 00 07 02 00 00 00 3F 96 05 00 07 35 00 00 00 0C 96 04 00 04 01 08 45 4E 96 02 00 08 02 4E 0B 3E 96 01 00 03 3E 4F 96 04 00 04 02 08 57 8E 08 00 00 00 00 04 19 00 26 01 96 14 00 06 00 00 00 00 00 00 00 00 06 00 00 00 00 00 00 00 00 08 41 1C 96 02 00 08 42 52 96 02 00 08 43 52 87 01 00 03 17 96 0D 00 06 00 00 00 00 00 00 00 00 04 02 08 57 52 17 96 0B 00 06 00 00 00 00 00 00 00 00 08 44 1C 96 04 00 04 01 08 45 4E 2B 96 02 00 08 46 52 96 0D 00 06 00 00 00 00 00 00 00 00 04 01 08 56 52 49 4C 9D 02 00 06 00 17 96 02 00 04 03 12 9D 02 00 87 00 96 04 00 04 01 08 58 4E 4C 9D 02 00 06 00 17 96 02 00 04 03 12 9D 02 00 15 00 96 0B 00 08 59 07 01 00 00 00 04 01 08 10 52 17 99 02 00 10 00 96 0B 00 08 5A 07 01 00 00 00 04 01 08 10 52 17 96 04 00 04 01 08 52 4E 96 04 00 08 16 05 01 4F 96 0B 00 08 5B 07 01 00 00 00 04 01 08 52 4E 96 02 00 08 5C 4E 96 02 00 08 5D 52 17 96 04 00 04 01 08 52 4E 96 02 00 08 5C 4E 96 04 00 08 16 04 03 12 4F 99 02 00 10 00 96 0B 00 08 5E 07 01 00 00 00 04 01 08 10 52 17 96 0D 00 06 00 00 00 00 00 00 00 00 04 01 08 29 52 17 4F 96 04 00 04 02 08 5F 8E 08 00 00 00 00 03 19 00 C1 00 96 0D 00 06 00 00 00 00 00 00 00 00 04 02 08 5F 52 17 96 0B 00 06 00 00 00 00 00 00 00 00 08 44 1C 96 04 00 04 01 08 45 4E 2B 96 02 00 08 46 52 96 0D 00 06 00 00 00 00 00 00 00 00 04 01 08 47 52 49 12 9D 02 00 57 00 96 0B 00 08 59 07 01 00 00 00 04 01 08 10 52 17 96 04 00 04 01 08 52 4E 96 04 00 08 16 05 01 4F 96 0B 00 08 5B 07 01 00 00 00 04 01 08 52 4E 96 02 00 08 5C 4E 96 02 00 08 5D 52 17 96 04 00 04 01 08 52 4E 96 02 00 08 5C 4E 96 04 00 08 16 05 00 4F 99 02 00 10 00 96 0B 00 08 5E 07 01 00 00 00 04 01 08 10 52 17 96 0D 00 06 00 00 00 00 00 00 00 00 04 01 08 29 52 17 4F 96 04 00 04 02 08 1A 8E 08 00 00 00 00 02 29 00 89 00 96 0B 00 06 00 00 00 00 00 00 00 00 08 60 1C 96 04 00 04 01 08 45 4E 96 02 00 08 61 4E 2B 96 02 00 08 62 52 17 96 0D 00 06 00 00 00 00 00 00 00 00 04 01 08 56 52 96 06 00 08 63 04 01 08 45 4E 96 02 00 08 61 4E 4B 96 09 00 08 64 07 04 00 00 00 08 65 1C 96 02 00 08 66 4E 96 02 00 08 67 4E 96 02 00 08 68 52 17 96 04 00 04 01 08 14 4E 96 04 00 08 16 05 01 4F 96 0D 00 06 00 00 00 00 00 00 00 00 04 01 08 29 52 17 4F 96 04 00 04 02 08 20 8E 08 00 00 00 00 02 29 00 22 00 96 04 00 04 01 08 14 4E 96 04 00 08 16 05 00 4F 96 0D 00 06 00 00 00 00 00 00 00 00 04 01 08 29 52 17 4F 96 04 00 04 02 08 23 8E 08 00 00 00 00 02 29 00 1C 00 96 0B 00 08 69 07 01 00 00 00 04 01 08 0F 4E 96 02 00 08 25 4E 96 02 00 08 10 52 17 4F 96 04 00 04 02 08 24 8E 08 00 00 00 00 02 29 00 1C 00 96 0B 00 08 6A 07 01 00 00 00 04 01 08 0F 4E 96 02 00 08 25 4E 96 02 00 08 10 52 17 4F 96 04 00 04 02 08 26 8E 08 00 00 00 00 02 29 00 3E 00 96 0B 00 08 69 07 01 00 00 00 04 01 08 0F 4E 96 02 00 08 28 4E 96 02 00 08 10 52 17 96 0B 00 08 50 07 01 00 00 00 04 01 08 0F 4E 96 02 00 08 28 4E 96 02 00 08 51 4E 96 02 00 08 10 52 17 4F 96 04 00 04 02 08 27 8E 08 00 00 00 00 02 29 00 3E 00 96 0B 00 08 6A 07 01 00 00 00 04 01 08 0F 4E 96 02 00 08 28 4E 96 02 00 08 10 52 17 96 0B 00 08 50 07 01 00 00 00 04 01 08 0F 4E 96 02 00 08 28 4E 96 02 00 08 51 4E 96 02 00 08 10 52 17 4F 96 0D 00 04 01 08 38 06 99 99 E9 3F 9A 99 99 99 4F 96 0D 00 04 01 08 37 06 66 66 E6 3F 66 66 66 66 4F 96 0D 00 04 01 08 31 06 5C 8F E2 3F 8F C2 F5 28 4F 96 09 00 04 01 08 39 07 03 00 00 00 4F 96 08 00 07 01 00 00 00 02 08 04 1C 96 02 00 08 05 4E 96 02 00 08 08 4E 96 07 00 07 03 00 00 00 08 6B # class start offset end offset length InventoryList 0x02D92041 0x02D92D3E 3326 (0xCFE) A0 05 44 00 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 00 5F 67 6C 6F 62 61 6C 00 49 6E 76 65 6E 74 6F 72 79 4C 69 73 74 00 70 61 64 64 69 6E 67 00 58 43 6F 6D 4C 69 73 74 00 70 72 6F 74 6F 74 79 70 65 00 49 43 6F 6E 74 61 69 6E 65 72 49 74 65 6D 00 6F 6E 4C 6F 61 64 00 41 64 64 49 6E 76 65 6E 74 6F 72 79 49 74 65 6D 00 4F 62 6A 65 63 74 00 49 54 45 4D 5F 54 59 50 45 5F 41 52 4D 4F 52 00 49 54 45 4D 5F 54 59 50 45 5F 57 45 41 50 4F 4E 00 49 54 45 4D 5F 54 59 50 45 5F 53 4D 41 4C 4C 5F 49 54 45 4D 00 6C 69 73 74 49 74 65 6D 49 64 65 6E 74 69 66 69 65 72 00 53 4C 5F 61 72 6D 6F 72 5F 69 6E 76 65 6E 74 6F 72 79 5F 73 6C 6F 74 00 53 4C 5F 77 65 61 70 6F 6E 5F 69 6E 76 65 6E 74 6F 72 79 5F 73 6C 6F 74 00 53 4C 5F 69 74 65 6D 5F 69 6E 76 65 6E 74 6F 72 79 5F 73 6C 6F 74 00 69 6E 69 74 49 74 65 6D 54 79 70 65 00 69 6E 69 74 49 74 65 6D 49 6D 67 00 6F 77 6E 65 72 53 63 72 65 65 6E 00 5F 70 61 72 65 6E 74 00 69 6E 69 74 4E 75 6D 49 74 65 6D 73 00 67 65 74 53 69 7A 65 00 41 64 64 4C 69 73 74 49 74 65 6D 00 6F 6E 49 74 65 6D 4C 6F 61 64 00 6C 65 66 74 54 6F 4C 6F 61 64 43 6F 75 6E 74 00 49 6E 76 65 6E 74 6F 72 79 49 74 65 6D 73 4C 6F 61 64 65 64 00 46 6C 61 73 68 52 61 69 73 65 43 6F 6D 6D 61 6E 64 00 66 6C 61 73 68 00 65 78 74 65 72 6E 61 6C 00 45 78 74 65 72 6E 61 6C 49 6E 74 65 72 66 61 63 65 00 63 61 6C 6C 00 53 6F 6C 64 69 65 72 4C 6F 61 64 6F 75 74 00 49 6E 76 65 6E 74 6F 72 79 4C 69 73 74 46 69 6E 69 73 68 65 64 4C 6F 61 64 69 6E 67 00 6F 6E 4C 6F 73 65 46 6F 63 75 73 00 45 6E 76 69 72 6F 6E 6D 65 6E 74 00 69 6E 73 74 61 6E 63 65 00 49 73 4D 6F 75 73 65 41 63 74 69 76 65 00 67 65 74 53 65 6C 65 63 74 65 64 49 6E 64 65 78 00 49 6E 76 65 6E 74 6F 72 79 4C 69 73 74 49 74 65 6D 00 67 65 74 49 74 65 6D 00 66 6F 63 75 73 00 5F 61 6C 70 68 61 00 69 6E 76 65 6E 74 6F 72 79 4C 61 62 65 6C 00 69 6E 76 65 6E 74 6F 72 79 54 69 74 6C 65 00 6F 6E 52 65 63 65 69 76 65 46 6F 63 75 73 00 70 72 65 76 49 74 65 6D 00 52 65 66 72 65 73 68 53 65 6C 65 63 74 6F 72 49 63 6F 6E 00 6E 65 78 74 49 74 65 6D 00 47 65 74 59 50 6F 73 4F 66 49 74 65 6D 00 67 65 74 48 65 69 67 68 74 00 64 69 73 70 6F 73 65 00 69 6E 70 75 74 00 6F 6E 50 6F 70 75 6C 61 74 65 44 65 62 75 67 44 61 74 61 00 2E 2E 2F 41 73 73 65 74 4C 69 62 72 61 72 69 65 73 2F 53 74 72 61 74 65 67 79 49 6D 61 67 65 73 2F 49 6E 76 65 6E 74 6F 72 79 49 63 6F 6E 73 2F 67 66 78 54 65 73 74 69 6E 67 2F 49 6E 76 5F 4C 76 33 4D 65 64 4D 61 6C 65 5F 41 72 6D 6F 72 2E 64 64 73 00 2E 2E 2F 41 73 73 65 74 4C 69 62 72 61 72 69 65 73 2F 53 74 72 61 74 65 67 79 49 6D 61 67 65 73 2F 49 6E 76 65 6E 74 6F 72 79 49 63 6F 6E 73 2F 67 66 78 54 65 73 74 69 6E 67 2F 49 6E 76 5F 46 72 61 67 47 72 65 6E 61 64 65 2E 64 64 73 00 2E 2E 2F 41 73 73 65 74 4C 69 62 72 61 72 69 65 73 2F 53 74 72 61 74 65 67 79 49 6D 61 67 65 73 2F 49 6E 76 65 6E 74 6F 72 79 49 63 6F 6E 73 2F 67 66 78 54 65 73 74 69 6E 67 2F 49 6E 76 5F 41 73 73 61 75 6C 74 52 69 66 6C 65 4D 6F 64 65 72 6E 2E 64 64 73 00 2E 2E 2F 41 73 73 65 74 4C 69 62 72 61 72 69 65 73 2F 53 74 72 61 74 65 67 79 49 6D 61 67 65 73 2F 49 6E 76 65 6E 74 6F 72 79 49 63 6F 6E 73 2F 67 66 78 54 65 73 74 69 6E 67 2F 49 6E 76 5F 4C 61 73 65 72 50 69 73 74 6F 6C 2E 64 64 73 00 2E 2E 2F 41 73 73 65 74 4C 69 62 72 61 72 69 65 73 2F 53 74 72 61 74 65 67 79 49 6D 61 67 65 73 2F 49 6E 76 65 6E 74 6F 72 79 49 63 6F 6E 73 2F 67 66 78 54 65 73 74 69 6E 67 2F 49 6E 76 5F 4D 65 64 69 4B 69 74 32 2E 64 64 73 00 2E 2E 2F 41 73 73 65 74 4C 69 62 72 61 72 69 65 73 2F 53 74 72 61 74 65 67 79 49 6D 61 67 65 73 2F 49 6E 76 65 6E 74 6F 72 79 49 63 6F 6E 73 2F 67 66 78 54 65 73 74 69 6E 67 2F 49 6E 76 5F 48 65 61 76 79 50 6C 61 73 6D 61 2E 64 64 73 00 2E 2E 2F 41 73 73 65 74 4C 69 62 72 61 72 69 65 73 2F 53 74 72 61 74 65 67 79 49 6D 61 67 65 73 2F 49 6E 76 65 6E 74 6F 72 79 49 63 6F 6E 73 2F 67 66 78 54 65 73 74 69 6E 67 2F 49 6E 76 5F 4C 4D 47 2E 64 64 73 00 49 6E 76 65 6E 74 6F 72 79 4C 69 73 74 20 6F 6E 50 6F 70 75 6C 61 74 65 44 65 62 75 67 00 54 69 74 61 6E 20 41 72 6D 6F 72 20 6F 66 20 44 65 61 74 68 20 61 6E 64 20 44 69 73 70 61 69 72 00 4C 4D 47 00 53 6D 61 6C 6C 20 50 69 73 74 6F 6C 00 50 72 6F 78 69 6D 69 74 79 20 4D 69 6E 65 00 41 64 76 61 6E 63 65 64 20 4D 65 64 69 20 4B 69 74 20 6F 66 20 41 77 65 73 6F 6D 65 73 61 75 63 65 00 41 53 53 65 74 50 72 6F 70 46 6C 61 67 73 00 96 02 00 08 01 1C 96 02 00 08 02 4E 12 12 9D 02 00 4A 07 96 02 00 08 01 1C 96 02 00 08 02 8E 08 00 00 00 00 03 19 00 1E 00 96 0C 00 06 00 00 00 00 00 00 00 00 04 02 03 52 17 96 09 00 04 01 08 03 07 05 00 00 00 4F 87 01 00 01 4F 96 02 00 08 01 1C 96 02 00 08 02 4E 96 02 00 08 04 1C 69 96 04 00 04 01 08 05 4E 87 01 00 02 17 96 02 00 08 01 1C 96 02 00 08 06 4E 96 07 00 07 01 00 00 00 08 01 1C 96 02 00 08 02 4E 2C 96 04 00 04 02 08 07 8E 08 00 00 00 00 02 1A 00 12 00 96 0D 00 06 00 00 00 00 00 00 00 00 04 01 08 07 52 17 4F 96 04 00 04 02 08 08 8E 32 00 00 04 00 08 29 00 03 74 79 70 65 00 05 74 69 74 6C 65 00 06 69 6D 67 4C 61 62 65 6C 00 04 6E 75 6D 45 71 75 69 70 61 62 6C 65 49 74 65 6D 73 00 FE 00 96 0B 00 06 00 00 00 00 00 00 00 00 08 09 40 87 01 00 02 17 96 01 00 03 87 01 00 07 17 96 02 00 04 03 87 01 00 00 96 02 00 08 02 1C 96 02 00 08 0A 4E 66 9D 02 00 2D 00 96 04 00 04 00 08 02 1C 96 02 00 08 0B 4E 66 9D 02 00 28 00 96 04 00 04 00 08 02 1C 96 02 00 08 0C 4E 66 9D 02 00 23 00 99 02 00 2D 00 96 06 00 04 01 08 0D 08 0E 4F 99 02 00 23 00 96 06 00 04 01 08 0D 08 0F 4F 99 02 00 14 00 96 06 00 04 01 08 0D 08 10 4F 99 02 00 05 00 96 01 00 03 3E 96 06 00 04 02 08 11 04 03 4F 96 06 00 04 02 08 12 04 06 4F 96 08 00 04 02 08 13 04 01 08 14 4E 4F 96 04 00 04 03 08 02 1C 96 02 00 08 0C 4E 49 12 9D 02 00 0A 00 96 06 00 04 02 08 15 04 04 4F 96 15 00 04 02 05 00 05 01 04 05 06 00 00 00 00 00 00 00 00 04 01 08 16 52 96 09 00 07 05 00 00 00 04 01 08 17 52 17 4F 96 04 00 04 02 08 18 8E 0E 00 00 01 00 04 19 00 03 69 74 65 6D 00 75 00 96 0B 00 04 03 07 01 00 00 00 04 02 08 18 52 17 96 04 00 04 01 08 19 4E 96 09 00 06 00 00 00 00 00 00 00 00 49 12 9D 02 00 4A 00 96 06 00 08 1A 04 01 08 14 4E 4B 96 09 00 08 1B 07 03 00 00 00 08 1C 1C 96 02 00 08 1D 4E 96 02 00 08 1E 4E 96 02 00 08 1F 52 17 96 0B 00 06 00 00 00 00 00 00 00 00 08 20 1C 96 04 00 04 01 08 14 4E 2B 96 02 00 08 21 52 17 4F 96 04 00 04 02 08 22 8E 08 00 00 00 00 08 19 00 42 01 96 0D 00 06 00 00 00 00 00 00 00 00 04 02 08 22 52 17 96 14 00 06 00 00 00 00 00 00 00 00 06 00 00 00 00 00 00 00 00 08 23 1C 96 02 00 08 24 52 96 02 00 08 25 52 87 01 00 05 17 96 0D 00 06 00 00 00 00 00 00 00 00 04 01 08 16 52 87 01 00 06 17 96 0D 00 06 00 00 00 00 00 00 00 00 04 01 08 26 52 87 01 00 07 17 96 09 00 06 00 00 00 00 00 00 00 00 87 01 00 04 17 96 04 00 04 04 04 06 48 12 9D 02 00 91 00 96 02 00 08 27 1C 96 02 00 04 04 4B 96 09 00 07 01 00 00 00 04 01 08 28 52 2B 87 01 00 03 17 96 0D 00 06 00 00 00 00 00 00 00 00 04 03 08 22 52 17 96 04 00 04 04 04 07 49 12 4C 12 9D 02 00 0D 00 17 96 06 00 04 03 04 01 08 29 4E 49 12 4C 12 9D 02 00 07 00 17 96 02 00 04 05 12 12 9D 02 00 12 00 96 09 00 04 03 08 2A 07 32 00 00 00 4F 99 02 00 0D 00 96 09 00 04 03 08 2A 07 64 00 00 00 4F 96 02 00 04 04 50 87 01 00 04 17 99 02 00 61 FF 96 02 00 04 05 12 12 9D 02 00 1F 00 96 04 00 04 01 08 14 4E 96 02 00 08 2B 4E 96 02 00 08 2C 4E 96 07 00 08 2A 07 28 00 00 00 4F 4F 96 04 00 04 02 08 2D 8E 08 00 00 00 00 05 19 00 94 00 96 0D 00 06 00 00 00 00 00 00 00 00 04 02 08 2D 52 17 96 0D 00 06 00 00 00 00 00 00 00 00 04 01 08 16 52 87 01 00 04 17 96 09 00 06 00 00 00 00 00 00 00 00 87 01 00 03 17 96 04 00 04 03 04 04 48 12 9D 02 00 2E 00 96 02 00 04 03 4B 96 09 00 07 01 00 00 00 04 01 08 28 52 96 07 00 08 2A 07 64 00 00 00 4F 96 02 00 04 03 50 87 01 00 03 17 99 02 00 C4 FF 96 04 00 04 01 08 14 4E 96 02 00 08 2B 4E 96 02 00 08 2C 4E 96 07 00 08 2A 07 64 00 00 00 4F 4F 96 04 00 04 02 08 2E 8E 08 00 00 00 00 03 19 00 31 00 96 0D 00 06 00 00 00 00 00 00 00 00 04 02 08 2E 52 17 96 0B 00 06 00 00 00 00 00 00 00 00 08 20 1C 96 04 00 04 01 08 14 4E 2B 96 02 00 08 2F 52 17 4F 96 04 00 04 02 08 30 8E 08 00 00 00 00 03 19 00 31 00 96 0D 00 06 00 00 00 00 00 00 00 00 04 02 08 30 52 17 96 0B 00 06 00 00 00 00 00 00 00 00 08 20 1C 96 04 00 04 01 08 14 4E 2B 96 02 00 08 2F 52 17 4F 96 04 00 04 02 08 31 8E 0F 00 00 01 00 05 29 00 04 69 6E 64 65 78 00 76 01 96 0B 00 04 04 06 00 00 00 00 00 00 00 00 48 12 4C 12 9D 02 00 16 00 17 96 0F 00 04 04 06 00 00 00 00 00 00 00 00 04 01 08 16 52 67 12 12 9D 02 00 3A 01 96 09 00 06 00 00 00 00 00 00 00 00 87 01 00 03 17 96 05 00 07 01 00 00 00 87 01 00 02 17 96 09 00 04 02 04 04 07 01 00 00 00 47 48 12 9D 02 00 02 01 96 0C 00 07 00 00 00 00 04 02 07 01 00 00 00 0B 4B 96 09 00 07 01 00 00 00 04 01 08 28 52 96 02 00 08 32 52 96 0E 00 07 13 00 00 00 07 02 00 00 00 04 01 08 03 4E 0C 0B 96 07 00 04 02 07 03 00 00 00 0E 0C 47 87 01 00 09 17 96 09 00 04 09 04 02 07 02 00 00 00 67 96 07 00 04 02 07 02 00 00 00 3F 12 10 96 05 00 07 35 00 00 00 0C 0B 87 01 00 09 17 96 07 00 07 00 00 00 00 04 02 4B 96 09 00 07 01 00 00 00 04 01 08 28 52 96 02 00 08 32 52 96 0C 00 07 13 00 00 00 04 02 07 02 00 00 00 0E 0C 47 87 01 00 0A 17 96 09 00 04 0A 04 02 07 02 00 00 00 67 96 07 00 04 02 07 02 00 00 00 3F 10 96 05 00 07 35 00 00 00 0C 47 87 01 00 0A 17 96 06 00 04 03 04 09 04 0A 47 96 05 00 07 02 00 00 00 0D 47 96 04 00 04 01 08 03 4E 47 87 01 00 03 17 96 02 00 04 02 50 87 01 00 02 17 99 02 00 EA FE 96 02 00 04 03 3E 96 05 00 07 9C FF FF FF 3E 4F 96 04 00 04 02 08 33 8E 08 00 00 00 00 03 19 00 1B 00 96 05 00 04 01 08 34 03 4F 96 0D 00 06 00 00 00 00 00 00 00 00 04 02 08 33 52 17 4F 96 04 00 04 02 08 35 8E 08 00 00 00 00 09 29 00 46 00 96 02 00 08 36 87 01 00 03 17 96 02 00 08 37 87 01 00 05 17 96 02 00 08 38 87 01 00 07 17 96 02 00 08 39 87 01 00 04 17 96 02 00 08 3A 87 01 00 08 17 96 02 00 08 3B 87 01 00 06 17 96 02 00 08 3C 87 01 00 02 17 4F 96 09 00 04 01 08 0A 07 01 00 00 00 4F 96 09 00 04 01 08 0B 07 02 00 00 00 4F 96 09 00 04 01 08 0C 07 03 00 00 00 4F 96 08 00 07 01 00 00 00 02 08 01 1C 96 02 00 08 02 4E 96 02 00 08 05 4E 96 07 00 07 03 00 00 00 08 43 With that I consider this modlet done for now, but I'm open to feedback and suggestions, of course :smile: Sure, bring 'em on, can't hurt to at least have a look - though no promises :happy:
  11. Fair enough :wink: I'm running the game in 1680x1050, but judging from pieces of AS code it seems the game is tailored to a 1280x720 resolution and will scale/clip accordingly, so the offsets I introduced should (in theory) work properly on different resolutions. The small overlay buttons on top of the selected slot are still there and fully operational, original functionality is fully preserved as far as I can tell. It's just that the buttons are a little less than 25% the size of their vanilla brethren :happy: The order of the buttons currently goes from top left to bottom right in a 1 2 3 4 ...fashion and the amount of buttons is tied dynamically to the number of small item slots an individual solder possesses. Have another screenshot to illustrate the functionality: http://i.imgur.com/SAJuCdI.jpg There you can also see the little selection indicator thingie sticking out like a sore thumb, I suppose I could flip the button order horizontally so that odd-numbered slots appear in the right-hand column to mitigate this, but this order might feel a little unintuitive when navigating using a gamepad/cursor keys. Glad to hear about the resolutions working properly :smile: I probably should have referenced the padding variable directly when offsetting the right-hand column buttons instead of using a hard-coded value, that's already on my to-do list, but thanks for reconfirming :cool:
  12. Alright, made a bit of progress in getting small item slots displayed in a grid layout. The buttons are essentially scaled down and moved around a bit, hover/selection functionality is working perfectly as far as I can tell :smile: See image below for a unit sporting a whopping eight possible small item slots: http://i.imgur.com/NDB53Ka.jpg Some things of note: The positions are fine-tuned to my display resolution (using hard-coded x/y offsets), I don't know whether the grid will appear the same for everybody else, so if some of you would like to try this out for yourself and something appears off, let me know :smile: Furthermore, the little horizontal selection indicator to the right of the selected item appears a little misaligned for the small item slots, but I've already tracked down where the positions are calculated - I'll see if I can squeeze in a fix for that. So far hex changes are limited to the InventoryListItem class of the SolderLoadout flash file inside command1.upk. I haven't looked into what changes introduced by recompiling via JPEXS are actually essential (there seem to be some junk changes, as far as I can tell), so I'll simply post the new hex values for the whole class: As for the gameplay implications of that many small items, I'd suggest introducing items, that effectively take up multiple slots (e.g. by removing surplus empty slots). That probably would need some re-coding of the inventory system to ensure there are enough slots available when trying to equip a multi-slot item and forcing the player to always use the first open slot lest items occupying slots further down get consumed as the slots are removed. Just some food for thought :smile:
  13. Been playing around with the JPEXS flash decompiler tool a bit today to see if I can wrap my head around ActionScript hex editing and I've stumbled upon another way to display additional small items in the soldier loadout screen. The SoldierLoadout flash file contains the InventoryListItem class which in turn contains a function named getHeight() which is called by the GetYPosOfItem() function inside the InventoryList class: function getHeight() { register2=undefined; switch(this.itemType) { case InventoryList.ITEM_TYPE_ARMOR: register2=125; break; case InventoryList.ITEM_TYPE_WEAPON: register2=105; break; case InventoryList.ITEM_TYPE_SMALL_ITEM: register2=98; break; default: trace("getHeight called on item \'"+this.getId()+" ERROR: Invalid ItemType."); return 25; } return register2; } By reducing the value set inside the small item-specific third case of the switch statement one can make the small item cards display on top of each other, see spoiler image for a height value of 28 for 5 small item slots: The drawback here is that the small extra buttons overlaid on top of the selected item card (for showing the description popup or removing the item) are obscured by any item cards below the selected one. Personally I consider this a rather acceptable sacrifice and layering multiple small item cards like this doesnt look half bad :smile: I'll keep digging around the classes and try to investigate whether actually resizing the list items and arranging them in a grid-like fashion is feasible, that would be super cool :smile: So far resizing the image displayed inside the item card seems relatively straightforward as you only have to modify the ITEMS_IMG_SCALE parameter at the bottom of the InventoryListItem class, but I'm more interested in the whole bounding box, keeping mouseover functionality intact, maybe downsizing the font a little, etc. ...
  14. Instead of using every other struct member's value to store the number of aliens wouldn't it be possible to combine both alien type and deployment count into a single byte value? As you have 8 bits available you could, for example, reserve the first 5 bits for specifying the alien type and the other 3 bits for defining the number of aliens. This would allow for up to 2^5 = 32 different alien types (17[?] in the base game + any that may be added in future expansions [fingers crossed] :wink:) and up to 2^3 = 8 aliens per type (I'd assume a minimum of 1 alien per type, therefore the 3 bits would encode for a range of 1-8 instead of the usual 0-7). Code could look somewhat like this: // using bitwise operators (char) ((type << 3) | count) // or alternatively using arithmetic operators (char) ((type * 8) + count) /* with type and count being ints, type: 0 - none 1 - sectoid 2 - thin man and so forth... */ // Encoding example, '4 thin men leaders with 2 sectoid minions' eMain = (char) ((2 << 3) | 4); // 2 = [00010], 4 = [100], together [00010100] = 20 eSupport1 = (char) ((1 << 3) | 2); // 1 = [00001], 2 = [010], together [00001010] = 10 // Decoding example, eMain = 20 mainType = eMain >> 3; // [00010100] >> 3 = [00000010] mainCount = eMain & 7; // [00010100] & [00000111] = [00000100] (I hope this isn't too confusing :confused:) Up to 8 aliens per up to 3 (or possibly 5, when repurposing the other members, too) different type groups makes for more reasonable and varied pod composition options than your 255*2 proposoal, in my opinion :smile: Final note: If you'd exclude certain aliens from inclusion in pods (e.g. zombies, uber ethereals) you could cram the type specifier into only 4 bytes leaving the other 4 bits for defining up to 2^4 = 16 aliens per type, but this might be stretching it a bit as this would lead into unreasonable alien count terrain again :wink:
  15. I suspect this part could be further condensed into a single line using the ternary (conditional) operator: STORAGE().RemoveItem(kInt.IsFirestorm() ? 106 : 105, 1); I don't actually know the hex values for that operator or whether it's actually usable in XCOM's version of UE3, but maybe one of you does :smile:
×
×
  • Create New...