Author Topic: Large units spawn in small rooms  (Read 5772 times)

Offline Caleb13

  • Sergeant
  • **
  • Posts: 22
    • View Profile
Large units spawn in small rooms
« on: August 31, 2016, 11:12:35 pm »
I know the original game did this too, but large units (2x2 tiles) sometimes spawn inside small rooms in OpenXCOM. Sometimes it's not a problem, sometimes it's rather annoying. I'm attaching two saves:

1. Hallucinoid blocked the lift for several turns before it finally moved away and I could kill it.
2. Triscene appeared in a ship cabin. This one was super annoying, because I spent about half an hour checking all the cabins.

It would be nice if this was fixed... eventually.

Offline kkmic

  • Commander
  • *****
  • Posts: 582
  • Undefined
    • View Profile
Re: Large units spawn in small rooms
« Reply #1 on: September 05, 2016, 02:53:21 pm »
IIRC, this happens in two cases:
  • When a spawn node that is in an inappropriate location for large units is tagged as being able to spawn large units - this is an error on the part of the map creator
  • When the game tries to spawn a large unit and there are no free nodes that can be used to spawn said unit, it will pick a random node (or the next available one) and will spawn the unit there, if possible (even if it's a X-Com tagged node)
    • I am not sure how the spawn algorithm works internally - if it tries to spawn large units first to avoid this kind of situation, or it simply spawns the unit in random order
    • I suppose that at least some checks are done to avoid spawning units in walls or terrain, as I don't remember seeing this situation.

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: Large units spawn in small rooms
« Reply #2 on: September 05, 2016, 05:18:33 pm »
I checked the original map files - in both cases the bug is present on the vanilla TFTD

In OXC the code that deals with spawning will never spawn large units on nodes set for small. If there are no more large nodes available it will place the large unit next to a large node already occupied.

Offline Caleb13

  • Sergeant
  • **
  • Posts: 22
    • View Profile
Re: Large units spawn in small rooms
« Reply #3 on: September 05, 2016, 11:17:39 pm »
I checked the original map files - in both cases the bug is present on the vanilla TFTD

I see. Oh well, nevermind, then. I've recently installed new_civilian's TFTD combo patch:

https://openxcom.org/forum/index.php/topic,4128.0.html

It fixes some node problems, so maybe it will affect this "bug", too.

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: Large units spawn in small rooms
« Reply #4 on: September 05, 2016, 11:31:37 pm »
It fixes some node problems, so maybe it will affect this "bug", too.

I think these are the two that you experienced:

Quote
linerb03 (only rmp file) made sure that no huge units spawn in small rooms where they can not get out

grunge07 (only rmp file) changed two nodes to prevent large units to become stuck