Jump to content

R&D to Increase Squad Size


Beknatok

Recommended Posts

A new bug discovered by one of the Long War mod players

I have now confirmed that the bug discovered by mrscrib (invisible soldier pawns in the PSI chamber) is indeed caused by the fix that prevents off-screen soldiers from jumping into unused slots in the skyranger loadout screen.

 

Short term: You can use the below toolboks custom mods to pick your poison or more correctly select which bug is least disturbing:

 

 

Allow off-screen soldiers in the skyranger load-out screen to jump into unused slot:

MOD_NAME=UnfixSlotStealingBug
AUTHOR=Bertilsson
DESCRIPTION=Trade one bug for another

Version: 0.94

Compatible with XCOM Enemy Unknown versions:
- Patch 4 ( Changelist: 356266 )

UPK_FILE=XComGame.upk
OFFSET=5061546
[MODDED_HEX]
{Un-Replace entire SeqEvent_HQUnits.AddUnit to bugfix soldiers from jumping into empty slots, also removes some of the off duty soliders as a trade off}
05 13 00 00 50 55 00 00 00 00 00 00 FF 12 00 00 00 00 00 00 00 00 00 00 05 13 00 00 00 00 00 00 22 00 00 00 8C 04 00 00 65 05 00 00 C9 03 00 00 49 06 00 1D FF FF FF FF 15 14 2D 00 02 13 00 00 27 07 A7 01 82 99 00 04 13 00 00 25 16 18 15 00 96 00 04 13 00 00 01 F0 12 00 00 16 16 05 04 13 00 00 00 00 04 13 00 00 0A 6A 00 25 0F 01 FC 12 00 00 00 05 13 00 00 06 A4 01 0A 84 00 26 0F 01 FB 12 00 00 00 05 13 00 00 06 A4 01 0A 9F 00 2C 02 0F 01 FA 12 00 00 00 05 13 00 00 06 A4 01 0A BA 00 2C 03 0F 01 F9 12 00 00 00 05 13 00 00 06 A4 01 0A D5 00 2C 04 0F 01 F8 12 00 00 00 05 13 00 00 06 A4 01 0A F0 00 2C 05 0F 01 F7 12 00 00 00 05 13 00 00 06 A4 01 0A 0B 01 2C 06 0F 01 F6 12 00 00 00 05 13 00 00 06 A4 01 0A 26 01 2C 07 0F 01 F5 12 00 00 00 05 13 00 00 06 A4 01 0A 41 01 2C 08 0F 01 F4 12 00 00 00 05 13 00 00 06 A4 01 0A 5C 01 2C 09 0F 01 F3 12 00 00 00 05 13 00 00 06 A4 01 0A 77 01 2C 0A 0F 01 F2 12 00 00 00 05 13 00 00 06 A4 01 0A 92 01 2C 0B 0F 01 F1 12 00 00 00 05 13 00 00 06 A4 01 0A FF FF 14 2D 00 02 13 00 00 28 06 A4 01 06 45 04 07 DD 01 82 72 01 FC 12 00 00 2A 16 18 0D 00 97 01 F0 12 00 00 25 16 16 0F 01 FC 12 00 00 00 05 13 00 00 06 45 04 07 13 02 82 72 01 FB 12 00 00 2A 16 18 0D 00 97 01 F0 12 00 00 26 16 16 0F 01 FB 12 00 00 00 05 13 00 00 06 45 04 07 4A 02 82 72 01 FA 12 00 00 2A 16 18 0E 00 97 01 F0 12 00 00 2C 02 16 16 0F 01 FA 12 00 00 00 05 13 00 00 06 45 04 07 81 02 82 72 01 F9 12 00 00 2A 16 18 0E 00 97 01 F0 12 00 00 2C 03 16 16 0F 01 F9 12 00 00 00 05 13 00 00 06 45 04 07 B8 02 82 72 01 F8 12 00 00 2A 16 18 0E 00 97 01 F0 12 00 00 2C 04 16 16 0F 01 F8 12 00 00 00 05 13 00 00 06 45 04 07 EF 02 82 72 01 F7 12 00 00 2A 16 18 0E 00 97 01 F0 12 00 00 2C 05 16 16 0F 01 F7 12 00 00 00 05 13 00 00 06 45 04 07 26 03 82 72 01 F6 12 00 00 2A 16 18 0E 00 97 01 F0 12 00 00 2C 06 16 16 0F 01 F6 12 00 00 00 05 13 00 00 06 45 04 07 5D 03 82 72 01 F5 12 00 00 2A 16 18 0E 00 97 01 F0 12 00 00 2C 07 16 16 0F 01 F5 12 00 00 00 05 13 00 00 06 45 04 07 94 03 82 72 01 F4 12 00 00 2A 16 18 0E 00 97 01 F0 12 00 00 2C 08 16 16 0F 01 F4 12 00 00 00 05 13 00 00 06 45 04 07 CB 03 82 72 01 F3 12 00 00 2A 16 18 0E 00 97 01 F0 12 00 00 2C 09 16 16 0F 01 F3 12 00 00 00 05 13 00 00 06 45 04 07 02 04 82 72 01 F2 12 00 00 2A 16 18 0E 00 97 01 F0 12 00 00 2C 0A 16 16 0F 01 F2 12 00 00 00 05 13 00 00 06 45 04 07 39 04 82 72 01 F1 12 00 00 2A 16 18 0E 00 97 01 F0 12 00 00 2C 0B 16 16 0F 01 F1 12 00 00 00 05 13 00 00 06 45 04 14 2D 00 02 13 00 00 28 07 4F 05 2D 00 02 13 00 00 07 4F 05 77 01 EF 12 00 00 2A 16 0F 00 00 13 00 00 2E B5 46 00 00 00 05 13 00 00 07 AB 04 77 00 00 13 00 00 2A 16 19 00 00 13 00 00 0A 00 00 00 00 00 00 1B 85 5A 00 00 00 00 00 00 16 0F 00 01 13 00 00 2E CF 37 00 00 00 05 13 00 00 14 19 00 01 13 00 00 0A 00 D1 35 00 00 00 2D 01 D1 35 00 00 28 19 00 01 13 00 00 0F 00 00 00 00 00 00 61 2A 01 EF 12 00 00 4A 4A 4A 16 19 00 01 13 00 00 05 00 00 00 00 00 00 6F 82 24 07 16 19 00 01 13 00 00 0A 00 00 00 00 00 00 1B CD 5D 00 00 00 00 00 00 16 1B 4C 6E 00 00 00 00 00 00 16 04 2D 00 02 13 00 00 04 3A 03 13 00 00 53 00 00 00 02 40 02 00 75 02 00 00 00 00 00 00 

Don't allow off-screen soldiers in the skyranger load-out screen to jump into unused slot, at the cost of some invisible off duty-soldiers and invisible soldiers in the PSI-chamber:

MOD_NAME=ReFixSlotStealingBug
AUTHOR=Bertilsson
DESCRIPTION=Trade one bug for another

Version: 0.94

Compatible with XCOM Enemy Unknown versions:
- Patch 4 ( Changelist: 356266 )

UPK_FILE=XComGame.upk
OFFSET=5061546
[MODDED_HEX]
{Replace entire SeqEvent_HQUnits.AddUnit to bugfix soldiers from jumping into empty slots, also removes some of the off duty soliders as a trade off}
05 13 00 00 50 55 00 00 00 00 00 00 FF 12 00 00 00 00 00 00 00 00 00 00 05 13 00 00 00 00 00 00 22 00 00 00 8C 04 00 00 1D 04 00 00 C9 03 00 00 49 06 00 1D FF FF FF FF 15 14 2D 00 02 13 00 00 27 07 A7 01 82 99 00 04 13 00 00 25 16 18 15 00 96 00 04 13 00 00 01 F0 12 00 00 16 16 05 04 13 00 00 00 00 04 13 00 00 0A 6A 00 25 0F 01 FC 12 00 00 00 05 13 00 00 06 A4 01 0A 84 00 26 0F 01 FB 12 00 00 00 05 13 00 00 06 A4 01 0A 9F 00 2C 02 0F 01 FA 12 00 00 00 05 13 00 00 06 A4 01 0A BA 00 2C 03 0F 01 F9 12 00 00 00 05 13 00 00 06 A4 01 0A D5 00 2C 04 0F 01 F8 12 00 00 00 05 13 00 00 06 A4 01 0A F0 00 2C 05 0F 01 F7 12 00 00 00 05 13 00 00 06 A4 01 0A 0B 01 2C 06 0F 01 F6 12 00 00 00 05 13 00 00 06 A4 01 0A 26 01 2C 07 0F 01 F5 12 00 00 00 05 13 00 00 06 A4 01 0A 41 01 2C 08 0F 01 F4 12 00 00 00 05 13 00 00 06 A4 01 0A 5C 01 2C 09 0F 01 F3 12 00 00 00 05 13 00 00 06 A4 01 0A 77 01 2C 0A 0F 01 F2 12 00 00 00 05 13 00 00 06 A4 01 0A 92 01 2C 0B 0F 01 F1 12 00 00 00 05 13 00 00 06 A4 01 0A FF FF 14 2D 00 02 13 00 00 28 06 A4 01 06 FD 02 07 DE 01 82 72 01 F6 12 00 00 2A 16 18 0E 00 97 01 F0 12 00 00 2C 00 16 16 0F 01 F6 12 00 00 00 05 13 00 00 06 FD 02 07 15 02 82 72 01 F5 12 00 00 2A 16 18 0E 00 97 01 F0 12 00 00 2C 01 16 16 0F 01 F5 12 00 00 00 05 13 00 00 06 FD 02 07 4C 02 82 72 01 F4 12 00 00 2A 16 18 0E 00 97 01 F0 12 00 00 2C 02 16 16 0F 01 F4 12 00 00 00 05 13 00 00 06 FD 02 07 83 02 82 72 01 F3 12 00 00 2A 16 18 0E 00 97 01 F0 12 00 00 2C 03 16 16 0F 01 F3 12 00 00 00 05 13 00 00 06 FD 02 07 BA 02 82 72 01 F2 12 00 00 2A 16 18 0E 00 97 01 F0 12 00 00 2C 04 16 16 0F 01 F2 12 00 00 00 05 13 00 00 06 FD 02 07 F1 02 82 72 01 F1 12 00 00 2A 16 18 0E 00 97 01 F0 12 00 00 2C 05 16 16 0F 01 F1 12 00 00 00 05 13 00 00 06 FD 02 14 2D 00 02 13 00 00 28 07 07 04 2D 00 02 13 00 00 07 07 04 77 01 EF 12 00 00 2A 16 0F 00 00 13 00 00 2E B5 46 00 00 00 05 13 00 00 07 63 03 77 00 00 13 00 00 2A 16 19 00 00 13 00 00 0A 00 00 00 00 00 00 1B 85 5A 00 00 00 00 00 00 16 0F 00 01 13 00 00 2E CF 37 00 00 00 05 13 00 00 14 19 00 01 13 00 00 0A 00 D1 35 00 00 00 2D 01 D1 35 00 00 28 19 00 01 13 00 00 0F 00 00 00 00 00 00 61 2A 01 EF 12 00 00 4A 4A 4A 16 19 00 01 13 00 00 05 00 00 00 00 00 00 6F 82 24 07 16 19 00 01 13 00 00 0A 00 00 00 00 00 00 1B CD 5D 00 00 00 00 00 00 16 1B 4C 6E 00 00 00 00 00 00 16 04 2D 00 02 13 00 00 04 3A 03 13 00 00 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 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 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 75 02 00 00 00 00 00 00  

 

 

 

Long term: It is likely possible to make a better bugfix that only makes soldiers invisible in the skyranger load-out screen but I don't think I will be spending time investigating that until some time after Enemy Within has arrived.

 

I will as stated above most likely not try to fix it any time soon, but it might be good to keep this issue in mind when re-creating this mod for Enemy Within.

With some luck it could be possible to name the different slots in a way that never makes the bug an issue to begin with...

Edited by Bertilsson
Link to comment
Share on other sites

  • Replies 429
  • Created
  • Last Reply

Top Posters In This Topic

I've been doing a bit more research -- trying to understand how the particular dropship/evac zone is activated in the landed/crashed UFO maps. In case you didn't know each UFO map has 3 dropship models and 3 evac zones defined, but only one of them gets activated when the map is loaded.

 

Anyhow, I decompressed the LSmallScout_River landed UFO map and opened it in UE Explorer and appear to have found where the soldier spawn positions are defined.

 

I'm not quite sure how it handles the multiples (it appears that there are 21 SoldierSpawns defined).

 

All of the info appears to be under DGC_DropshipSoldierSpawn/Prefabs/SoldierSpawns_DrpshipVol.

 

In particular the "root six" appear to be SoldierSpawns_DrpShipVol_Arc#, where # ranges from 0 to 5.

 

Each of these has a location value (amongst other attributes):

SoldierSpawns_DrpshipVol_Arc0 : Location=(X=239.61840,Y=-479.64510,Z=94.88030)

SoldierSpawns_DrpshipVol_Arc1 : Location=(X=432.0,Y=-48.0,Z=48.0)

SoldierSpawns_DrpshipVol_Arc2 : Location=(X=240.0,Y=47.999980,Z=48.0)

SoldierSpawns_DrpshipVol_Arc3 : Location=(X=432.0,Y=-240.0,Z=48.0)

SoldierSpawns_DrpshipVol_Arc4 : Location=(X=240.0,Y=-144.0,Z=48.0)

SoldierSpawns_DrpshipVol_Arc5 : Location=(X=48.0,Y=-48.0,Z=48.0)

 

Assuming that these are defined in Unreal units (96 per tile), these numbers make sense, I think. There are three X locations : 48, 240, and 432, with spacing of 192 units between each. This corresponds to exactly 2 tiles between units.

 

Looking at the buffer for the Arc1 spawnpoint :

37 00 00 00 EE 05 00 00 00 00 00 00 E3 0A 00 00 00 00 00 00 0C 00 00 00 00 00 00 00 89 0C 00 00 00 00 00 00 FF FF D7 43 FF FF 3F C2 FF FF 3F 42 8D 09 00 00 00 00 00 00 E3 0A 00 00 00 00 00 00 0C 00 00 00 00 00 00 00 92 09 00 00 00 00 00 00 00 00 00 00 00 42 00 00 00 00 00 00 35 01 00 00 00 00 00 00 85 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3C 01 00 00 00 00 00 00 85 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 9D 02 00 00 00 00 00 00 4F 04 00 00 00 00 00 00 04 00 00 00 00 00 00 00 85 1E 86 40 90 0B 00 00 00 00 00 00 6B 07 00 00 00 00 00 00 08 00 00 00 00 00 00 00 0C 0D 00 00 00 00 00 00 7E 07 00 00 00 00 00 00 

I excised the following portion:

FF FF D7 43 FF FF 3F C2 FF FF 3F 42

which breaks down as:

FF FF D7 43 -- IEEE float for 431.9999694824219
FF FF 3F C2 -- IEEE float for -47.999996185302734
FF FF 3F 42 -- IEEE float for 47.999996185302734

which apparently UE Explorer is rounding to 432.0, -48.0 and 48.0.

 

This means that it should be possible to hex edit the map files to change the soldier spawn locations. At least for the maps with only a single dropzone (i.e. 6 soldier spawn points). Of course the bad news is that they would have to be editted separately for each map upk.

 

Still have to do more digging to try and understand how the multiple deployment zones work for UFO maps.

Link to comment
Share on other sites

That is VERY interesting finds :smile:

 

It holds promise that the "broken" UFO map(s?) where soldiers can fall below ground when offset by even the littlest could be repaired, so that it would be possible to use same spawn tiles for multiple soldiers.

 

Alternatively moving spawn points which conflict with the full tile offset, currently implemented, that holds low promise of being compatible with all the new maps...

 

You didn't happen to see any nearby values which could indicate direction of the spawn points? (Edit: I'm thinking that in the end we could probably use one of the aliens spawn functions to find empty tiles in the relative "forward" direction of the spawn point, but that there is a good chance that at least one map will sabotage that plan, in which case changing direction could be relevant).

Edited by Bertilsson
Link to comment
Share on other sites

Each SoldierSpawn had a rotation value as well, which I presume sets the direction that the soldier is initially facing.

 

For LSmallScout_River.upk, SoldierSpawnsDrpShipVol_Arc0 this was: Rotation=(Pitch=0,Yaw=-8192,Roll=0)

 

All six of the spawn points I previously described have a rotation, and for all six both pitch and Roll are 0. So just the Yaw is determining the direction the soldier is facing.

Link to comment
Share on other sites

Okay, I have to revise the earlier information. I've been digging around trying to figure out how the evac zone is defined.

 

The DGN_DropShipSoldierSpawn object appears to be more sophisticated than I initially thought. Of the 20 subobjects, only 6 of them are of type XComSpawnPoint. The SoldierSpawns_DrpShipVol_Arc0 was NOT a spawnpoint. Instead it was of type 'XComBuildingVolume'.

 

This is how the evac zone is defined, as a building volume.

 

In XComUnitPawn.Touch, being in the evac zone is checked via:

    if(((Unit != none) && XComBuildingVolume(Other) != none) && XComBuildingVolume(Other).IsDropShip)
    {
        Unit.m_bInDropShip = true;
    }

In particular the DrpShipVol_Arc0 object has the properties:

begin object name=SoldierSpawns_DrpshipVol_Arc0 class=XComBuildingVolume
    IsDropShip=true
    IsInside=false

So this is how the evac zone is being defined.

 

The 6th solder spawn point appears to be defined in SoldierSpawns_DrpshipVol_7Arc0, which is of type XComSpawnPoint and has Location=(X=48.0,Y=-240.0,Z=48.0)

 

Most of the other objects appear to be particle system emitters, probably defining the "glowy bits" that define the edges of the evac zone.

 

There's also 1 XComLevelActor, 1 PlayerStart, and 2 points in space.

 

So, of the 21 total objects in DGC_DropShipSoldierSpawn/Prefabs, there are:

1 XComLevelActor

1PlayerStart

2 PointInSpace

1 XComBuildingVolume

6 XComSpawnPoint

10 Emitter

 

For comparison I opened up the decompressed URB_Bar.upk map, and its DGC_DropShipSoldierSpawn/Prefabs appears identical, with 21 subobjects, and the XComBuildingVolume (for the evac zone) and the six spawn points with identical information.

 

This makes it look likely that this object is indeed a prefab template object which is separately placed elsewhere. The good news in terms of increasing soldiers is that this hex code is likely identical on most maps.

Link to comment
Share on other sites

Looks promising indeed.

Let's just wait and see how the new spawn points for exalts complicate things :)

 

I saw a review where exalts were supposed to spawn from an helicopter in the roof top construction map, so it seems they are not only adding new maps, but also modding the existing ones.

Link to comment
Share on other sites

I can confirm that it is possible to move spawn points around :smile:

 

Unfortunately I didn't document my findings so I'd have to investigate it again, but it should be relatively easy (compared to last time).

 

From my understanding, adding additional spawn points would require adding objects to the map file, which as you know with UPKs, shifts all of the variable locations around etc. I might be mistaken though and you might find a workaround.

 

If my memory serves me correct, then if there are more soldiers than spawn points, then the soldiers will spawn at (0, 0, 0), which is often below ground.

 

I'll have a look again and try to make my next post a bit more useful :smile:

Link to comment
Share on other sites

We (well not so much me personally, but more like the original thread-starters) encountered mixed results when adding more soldiers than available spawn locations.

The most common result was stealing a spawn location from the aliens, often ending up stuck at that location + preventing aliens from using it.

 

In order to get around that we (that would be me with tons of technical assistance from amineri) modified XGPlayer.LoadSquad() to re-use spawn location 0-5 with an offset for soldier 6 to 11.

 

After some very boring offset testing I determined that kSpawn.Location + vect(0.0, -96.0, 0.0) was the only offset that didn't result in soldiers standing on top of each other or spawning in bad locations... Only to later discover that soldier 6 ended up in a bad location in the reversed version of the harbor mission:(

 

The fix to that problem was to only reuse location 1-5 and allow soldier 11 and 5 to quantum dynamically share spawn location.

That could now be properly fixed by adjusting spawn location 0 on that map.

 

Since EW is expected to add lot of new maps I would expect at least a few additional conflicts which could probably be resolved in the same way making it possible to focus more on the rest of the mod that needs to be recreated, even though a better solution all together would have been preferable.

Link to comment
Share on other sites

As an interesting side-note, the dropzone/spawnpoint object I found when browsing the map upks with UE Explorer was a prefab type. The UDN website has this to say about using prefabs in levels:

 

 

 

Suggested Workflow
While the functionality listed in this document is still accurate from a technical standpoint, Epic's level designers and artists use the following internal workflow to avoid any issues when using prefabs:

  • Use Prefabs as a level placement device only.
  • This means that once a prefab is placed in a level, it should be immediately converted back to straightforward actors by right-clicking and choosing Convert PrefabInstance To Normal Actors.
  • Avoid certain advanced features, including propagating actor property changes to prefab instances already placed in the level, and storing Kismet logic within the prefab asset.

While these features do technically work, it is possible that their use my lead to various issues. As such, Epic's internal staff now only uses prefabs as described above and strongly recommends this workflow.

source: https://udn.epicgames.com/Three/UsingPrefabs.html

 

This possibly might be the source of the "disappearing evac zone" bug in XCOM:EU. I'd assume the Firaxis level designers are up-to-date with this, so the EW maps should hopefully have that fixed.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...