Author Topic: Game freeze sometimes when using invisible units  (Read 1601 times)

Offline Cooper

  • Colonel
  • ****
  • Posts: 150
  • Chryssalids are awesome
    • View Profile
Game freeze sometimes when using invisible units
« on: December 11, 2022, 12:14:19 pm »
In the mod I'm working on I have the possibility to use certain captured aliens as our own units - as slaves.
The idea is that they can walk around and rarely be recognized as an enemy because other aliens think it is one of them.

To achieve this I use  loftempsSet: [ 100 ] on the armor. It works great and the unit is only occasionally seen by the aliens.

However when testing this for a while, the game occasionally would freeze. Probably the aliens get confused when they are not able to walk somewhere and don't know why because they cannot se the unit. This is so sad because I really really loved this part of my mod.

Any idea on how to fix this? I tried a few other loftempsSet numbers but it did not help much.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11464
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Game freeze sometimes when using invisible units
« Reply #1 on: December 11, 2022, 05:23:25 pm »
Honestly I don't think it can be done without some advanced scripting.

I know Finnik played around with similar concepts.

Offline Cooper

  • Colonel
  • ****
  • Posts: 150
  • Chryssalids are awesome
    • View Profile
Re: Game freeze sometimes when using invisible units
« Reply #2 on: December 11, 2022, 07:05:29 pm »
Ooh, thats such bad news.

And that advanced scripting is not done in the mod I assume but in OXC itself?

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11464
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Game freeze sometimes when using invisible units
« Reply #3 on: December 11, 2022, 10:21:03 pm »
No, the thing about scripts is that they don't need messing with the game code; they are a mod option. But they still require some basic programming, and knowing the Yankes scripts language.

Offline Cooper

  • Colonel
  • ****
  • Posts: 150
  • Chryssalids are awesome
    • View Profile
Re: Game freeze sometimes when using invisible units
« Reply #4 on: January 14, 2024, 07:03:39 pm »
Has this been fixed? I can't reproduce the crash, even when recreating the exact same situation as on the picture.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8631
    • View Profile
Re: Game freeze sometimes when using invisible units
« Reply #5 on: January 14, 2024, 07:08:47 pm »
No, there was no change I am aware of that could affect this.

But we didn't have a save to reproduce to start with, so can't say much.

Offline Yankes

  • Commander
  • *****
  • Posts: 3210
    • View Profile
Re: Game freeze sometimes when using invisible units
« Reply #6 on: January 15, 2024, 11:06:03 am »
This is not same problem like happens in XPZ caverns? when unit want move but not see unit in front of it?

Offline Cooper

  • Colonel
  • ****
  • Posts: 150
  • Chryssalids are awesome
    • View Profile
Re: Game freeze sometimes when using invisible units
« Reply #7 on: January 15, 2024, 07:43:24 pm »
Quote
No, there was no change I am aware of that could affect this.
How strange. It would happen quite regularly before, now I have tested even more and it never happens anymore.

Quote
This is not same problem like happens in XPZ caverns? when unit want move but not see unit in front of it?
I don't know about this problem, but it would happen every time the aliens wanted to go somewhere and the slave unit (mostly invisible unit using loftempsSet: [ 100 ] ) was blocking its way. This is exactly what I reproduced 20 times now, but with no crashes.
« Last Edit: January 15, 2024, 07:48:09 pm by Cooper »

Offline psavola

  • Commander
  • *****
  • Posts: 636
    • View Profile
Re: Game freeze sometimes when using invisible units
« Reply #8 on: January 15, 2024, 09:58:30 pm »
This appears to be precisely the same problem, though it is triggered in a different way.

If the path the AI uses for pathfinding is blocked (the AI thinks it can move through a block but it cannot), then the AI cannot move past that point. I haven't seen the game freezing, but I don't think that would be unheard of either.

See my report based on an XCF stream with caves where you can squeeze through but you cannot attack through the corners: 

https://openxcom.org/forum/index.php/topic,5047.msg160688.html#msg160688