OpenXcom Forum

Modding => Released Mods => XPiratez => Topic started by: machinehater on September 26, 2020, 01:10:36 am

Title: Game crashes if you "capture" Zombie Sentinel"
Post by: machinehater on September 26, 2020, 01:10:36 am
Hey. I was on a zombie-vessel-mission and fund a "bug":
When every enemy is dead and the last one, a Zombie Sentinel, is mind controlled, the mission ends and the game crashes. I think, because there is no option to keep an alive specimen of this, maybe?
 
Well, here is the savegame, if it can help anyone (X-Vampiress right on the exit of the metallo, ready to mind control):



Title: Re: Game crashes if you "capture" Zombie Sentinel"
Post by: Dioxine on September 26, 2020, 02:12:18 am
Zombie Sentinel has capturable: false flag, so it should not be possible to capture it by any means. Sounds like an omission in the engine.
Title: Re: Game crashes if you "capture" Zombie Sentinel"
Post by: Meridian on September 26, 2020, 08:49:21 am
Should I change capturable: false to mean also that a unit cannot be mind controlled?

Currently it means that units are insta-killed when they fall unconscious.
Title: Re: Game crashes if you "capture" Zombie Sentinel"
Post by: Solarius Scorch on September 26, 2020, 09:43:54 am
Would it be possible to introduce a rule that if an appropriate liveAlien item doesn't exist, the capture fails?
Title: Re: Game crashes if you "capture" Zombie Sentinel"
Post by: Meridian on September 26, 2020, 09:49:39 am
Would it be possible to introduce a rule that if an appropriate liveAlien item doesn't exist, the capture fails?

Yes, but that is not a good solution.

It is indistinguishable if this situation is intended or if it's a bug (i.e. modder just forgot to define the item).
It's actually a pretty common mistake modders do regularly.
Title: Re: Game crashes if you "capture" Zombie Sentinel"
Post by: Solarius Scorch on September 26, 2020, 11:11:19 am
It's actually a pretty common mistake modders do regularly.

It's true, and I agree that it's not a good method. Good point.

Still, completely preventing a unit from getting psi controlled is also imperfect - either if feels forced (why can't I psi that guy, he's not a robot!) or limiting (only robots can be no-capturable!).

I suppose the only good solution is to make items for all units, whether they can be captured or not, and leave the code alone.
Title: Re: Game crashes if you "capture" Zombie Sentinel"
Post by: machinehater on September 26, 2020, 12:32:04 pm
The same thing happens with the Zombie Trooper, btw.

Title: Re: Game crashes if you "capture" Zombie Sentinel"
Post by: Meridian on September 26, 2020, 12:56:57 pm
Still, completely preventing a unit from getting psi controlled is also imperfect - either if feels forced (why can't I psi that guy, he's not a robot!) or limiting (only robots can be no-capturable!).

Being able to mind-control, but not capture also feels forced (to me).

I suppose the only good solution is to make items for all units, whether they can be captured or not, and leave the code alone.

Other options are:
1/ insta-kill during debrief
2/ not end the battle if such scenario happens

I'll check both and implement the less hacky one.
Title: Re: Game crashes if you "capture" Zombie Sentinel"
Post by: Solarius Scorch on September 26, 2020, 01:17:12 pm
Being able to mind-control, but not capture also feels forced (to me).

Absolutely agreed. It doesn't make much sense.

Other options are:
1/ insta-kill during debrief
2/ not end the battle if such scenario happens

I'll check both and implement the less hacky one.

OK, sure. But still, in my view it's fine as it is... The modder should either make the standard liveAlien item, or cause the enemy to be recovered as some other item using that new fancy feature.
Title: Re: Game crashes if you "capture" Zombie Sentinel"
Post by: Dioxine on September 30, 2020, 12:27:48 am
But if I make the LiveAlien item, the unit will GET captured. So you propose to simply add impossibly high PsiDef? (also why this did not happen before...? these units are in game for a long time...)
Title: Re: Game crashes if you "capture" Zombie Sentinel"
Post by: Solarius Scorch on September 30, 2020, 01:45:57 am
But if I make the LiveAlien item, the unit will GET captured. So you propose to simply add impossibly high PsiDef? (also why this did not happen before...? these units are in game for a long time...)

Yeah, I kinda resigned myself to making items for ALL enemy units, regardless if capturable. I mean, why not?
Title: Re: Game crashes if you "capture" Zombie Sentinel"
Post by: khade on September 30, 2020, 02:53:25 am
Could you have the things that shouldn't be captured link to a single item?  A No-Prize, if you will, worth 1 infamy or whatever and 1 dollaro, with no storage cost so you can collect them if you want to?
Title: Re: Game crashes if you "capture" Zombie Sentinel"
Post by: Meridian on September 30, 2020, 10:55:34 am
But if I make the LiveAlien item, the unit will GET captured. So you propose to simply add impossibly high PsiDef?

It has been fixed already, the battle will not end if such a unit is mind controlled.

(also why this did not happen before...? these units are in game for a long time...)

Don't know... did someone try the save he attached? For me it doesn't crash...
Title: Re: Game crashes if you "capture" Zombie Sentinel"
Post by: xcomfan on September 30, 2020, 11:59:11 am
For what is wotrh, nither i experienced crashes, the zzz zombies (trooper and whatsover) were always captured in my runs.

Edit: i'm on L4
Title: Re: Game crashes if you "capture" Zombie Sentinel"
Post by: machinehater on September 30, 2020, 01:07:56 pm
Yes, i do not use the latest version, but the one i downloaded in june, can't recall the name atm.
Title: Re: Game crashes if you "capture" Zombie Sentinel"
Post by: Meridian on September 30, 2020, 03:13:25 pm
OK, I checked earlier versions.

It crashes on v6.5.1.
We have fixed it in v6.6... by always transforming all zombie-like units to their spawned units before recovery.

And as I mentioned in v6.7 there will be yet another fix for it (just to make sure!), the battle will NOT end at all if zombie-like creatures with 'capturable: false' are mind-controlled... you will need to kill them.
Title: Re: Game crashes if you "capture" Zombie Sentinel"
Post by: machinehater on September 30, 2020, 03:21:43 pm
Thank youl!
You guys all put a lot of work in this mod, but it:s absolutely worth it!
Title: Re: Game crashes if you "capture" Zombie Sentinel"
Post by: xcomfan on September 30, 2020, 03:25:54 pm
OK, I checked earlier versions.

It crashes on v6.5.1.
We have fixed it in v6.6... by always transforming all zombie-like units to their spawned units before recovery.

And as I mentioned in v6.7 there will be yet another fix for it (just to make sure!), the battle will NOT end at all if zombie-like creatures with 'capturable: false' are mind-controlled... you will need to kill them.
ok, stuning will count as "killed"?
Title: Re: Game crashes if you "capture" Zombie Sentinel"
Post by: Meridian on September 30, 2020, 04:12:56 pm
ok, stuning will count as "killed"?

you cannot stun a zombie-like creature... since 1994... it will just convert
Title: Re: Game crashes if you "capture" Zombie Sentinel"
Post by: DaEMon on October 07, 2020, 08:51:30 pm
you cannot stun a zombie-like creature... since 1994... it will just convert

In this mod you can capture zombies alive.
Title: Re: Game crashes if you "capture" Zombie Sentinel"
Post by: Meridian on October 07, 2020, 08:57:57 pm
In this mod you can capture zombies alive.

That's why I said zombie-like, not zombie... meaning "creatures that transform into other creatures".