OpenXcom Forum

Modding => OpenXcom Extended => OXCE Support => Topic started by: skyhawk on January 09, 2020, 09:29:40 am

Title: [Solved] TFTD Map Items Recovery question
Post by: skyhawk on January 09, 2020, 09:29:40 am
So I'm turning the 'Synomium Device' into a story item - This is a small map object present at Alien Artifact sites, and at Alien Colony sites. Destroying the item is a mission objective [It allows to complete the mission without neutralizing all hostiles], and is normally recovered as a 'Magnetic Navigation' item if you recover the site.

I've added the following to items:
  - type: STR_SYNOMIUM_DEVICE
    size: 0.5
    costSell: 200000
    specialType: 15
    recoveryPoints: 100   <-- Yeah, it's really important

I've added this to alienDeployments:
  - type: STR_ARTIFACT_SITE_P2
    objectiveType: 15
  - type: STR_ALIEN_COLONY_P2
    objectiveType: 15

And I've got two modified MCD files, assigning the Synomium Device object as specialType 15, rather than the usual specialType 3.

If I destroy the device, I get the 'mission successful' message. If I recover the site, I do NOT get a Navigation item [So the modified MCDs appear to be working], but I also don't get a STR_SYNOMIUM_DEVICE.

Anyone have any idea what I'm doing wrong?
Title: Re: TFTD Map Items Recovery question
Post by: Meridian on January 09, 2020, 10:53:11 am
can you upload the mod... and a save before the recovery?
Title: Re: TFTD Map Items Recovery question
Post by: skyhawk on January 09, 2020, 07:55:50 pm
Mod and savegames. This is being tested on OpenXCom Extended 6.3.3

For the Recovery save I edited an instant battle and set all alien HP to zero. Just end turn to win.

For the Destruction save I edited an instant battle and removed all the alien weapons. :)  Shoot the Synomium Device right in front of you and End Turn to get the "Mission Successful" message.

Thanks in advance for your insight Meridian.
Title: Re: TFTD Map Items Recovery question
Post by: Meridian on January 10, 2020, 04:18:01 pm
And which of them is wrong?
Recovery save or Destruction save?

Also:
Quote
"If I destroy the device, I get the 'mission successful' message. If I recover the site, I do NOT get a Navigation item [So the modified MCDs appear to be working], but I also don't get a STR_SYNOMIUM_DEVICE."

What does "If I recover the site" mean here? You have destroyed the device... and then did what? Aborted as instructed (that's not a recovery, you don't get anything)? Or killed all aliens?

For the Destruction save I edited an instant battle and removed all the alien weapons. :)  Shoot the Synomium Device right in front of you and End Turn to get the "Mission Successful" message.

And what should I do after I get the "Mission Successful" message?




Can you just give me one scenario and one description of what's wrong in your opinion please? Do not describe what is not wrong, it's just confusing me.
Title: Re: TFTD Map Items Recovery question
Post by: Meridian on January 10, 2020, 04:32:04 pm
So I'm turning the 'Synomium Device' into a story item - This is a small map object present at Alien Artifact sites, and at Alien Colony sites. Destroying the item is a mission objective [It allows to complete the mission without neutralizing all hostiles], and is normally recovered as a 'Magnetic Navigation' item if you recover the site.

Why do you say it is normally recovered as 'Magnetic Navigation' ?
I can't recover any magnetic navigation from vanilla TFTD artifact site...
Title: Re: TFTD Map Items Recovery question
Post by: skyhawk on January 10, 2020, 07:13:02 pm
My apologies for the confusion.

To the best of my knowledge, the Synomium Device tile is typically recovered as a Magnetic Navigation if the site is completed by neutralizing all the aliens. [In vanilla tftd] [I will verify this myself shortly]

I included both saves to demonstrate that the SpecialType 15 was working - by destroying the SpecialType 15 tile you can get the mission complete popup.

But if you kill all the aliens and recover the site, you do NOT get a STR_SYNOMIUM_DEVICE as expected.

- the Destruction save shows the game working as expected
- the Recovery save shows the game not working as expected - no STR_SYNOMIUM_DEVICE is recovered.
Title: Re: TFTD Map Items Recovery question
Post by: Nord on January 10, 2020, 07:15:07 pm
Why do you say it is normally recovered as 'Magnetic Navigation' ?
It is true.
Quote
I can't recover any magnetic navigation from vanilla TFTD artifact site...
Encountered that when creating twots. my decision was create another tilepart - floor under synomium. and synomium explosion damages that tile. any other way seems not working, mission objective can not be recovered.
Title: Re: TFTD Map Items Recovery question
Post by: skyhawk on January 10, 2020, 10:22:43 pm
I just tested both Alien Colony and Artifact Site in vanilla oxce, and did not get a Magnetic Navigation in either.

Which is contrary to what I could swear I remember happening. Oh well, guess I'm just going crazy.

I think this UFOPaedia article (https://www.ufopaedia.org/index.php/Magnetic_Navigation) is at least partially responsible for my confusion.

I was hoping to be lazy and implement the Synomium Device without resorting to actual map editing, but I guess that's not on the table. I guess I'll have to try it Nords way.
Title: Re: TFTD Map Items Recovery question
Post by: Solarius Scorch on January 10, 2020, 11:21:50 pm
No, you don't have to do that.
All you need to do is identify which specialType the Synonium is (it must be a specialType to enable the victory condition). This information should be easily available on the Ufopedia site.
Then you must create a new item with this specialType. VoilĂ !
Title: Re: TFTD Map Items Recovery question
Post by: skyhawk on January 10, 2020, 11:48:53 pm
Doesn't work.

the vanilla Synomium Device is SpecialType 3, which is the 'Magnetic Navigation' item. Vanilla victory conditions work, and if you kill all the Aliens you don't get a recovered item in OXCE.

My mod has tweaked the two relevant MCD entries to be SpecialType 15 [Unused in vanilla afaik], and altered the victory condition in aliendeployments.rul. I've also created a STR_SYNOMIUM_DEVICE item with SpecialType 15.

The victory conditions in my mod work, but like vanilla, if you recover the site you don't get the item.

I absolutely could positively swear that OpenXCom duplicated the DOS behaviour in this instance - recovering the site would yield a Magnetic Navigation item. I should test that and confirm this isn't a difference between OXC and OXCE.

Edit: I'm talking shit. OpenXCom standard doesn't recover these items either.
Title: Re: TFTD Map Items Recovery question
Post by: skyhawk on January 11, 2020, 01:12:59 am
@Meridian,

Can I ask for an extra flag in alienDeployments: ?

Keeping the existing/vanilla behavior for objectiveType, we could add objectiveCapture [default False], which allows Objective items to be recovered along with the site if the player wins by killing all hostiles.
Title: Re: TFTD Map Items Recovery question
Post by: ohartenstein23 on January 11, 2020, 01:19:56 am
Couldn't you just place an item on the same tile as the device that the player can recover if they kill all the aliens before destroying the tile? If you're worried about the player picking up the item to recover it during an abort, you can just make its inventory height and width 0.

That way, you get all of the behavior you want:
1. Win by killing aliens : recover device
2. Win by destroying the tile then killing aliens : recover device
3. Win by destroying the tile then evacuating : no recovery
Title: Re: TFTD Map Items Recovery question
Post by: skyhawk on January 11, 2020, 02:13:03 am
2. Win by destroying the tile then killing aliens : recover device

That's actually undesired. If the player blows it up, he shouldn't be able recover it.

I could give this item a low armorvalue, but then it's feasible that a weak explosion could fail to kill the tile, but destroy the item. [Or possibly vice/versa?]
Title: Re: TFTD Map Items Recovery question
Post by: Nord on January 11, 2020, 08:24:38 am
That's actually undesired. If the player blows it up, he shouldn't be able recover it.

I could give this item a low armorvalue, but then it's feasible that a weak explosion could fail to kill the tile, but destroy the item. [Or possibly vice/versa?]
As i said, you can give new item an armor equal to tile armor. And equal to tile explosion strength.
Title: Re: TFTD Map Items Recovery question
Post by: Meridian on January 14, 2020, 01:59:19 pm
I absolutely could positively swear that OpenXCom duplicated the DOS behaviour in this instance - recovering the site would yield a Magnetic Navigation item. I should test that and confirm this isn't a difference between OXC and OXCE.

Edit: I'm talking shit. OpenXCom standard doesn't recover these items either.

I can confirm that original TFTD did recover magnetic navigation.

And I can confirm that both OXC and OXCE don't recover it (because it is a mission objective)... code is very very explicit about it, see attached screenshot.

Why the difference... I don't know.
Title: Re: TFTD Map Items Recovery question
Post by: skyhawk on January 15, 2020, 07:47:35 am
So I'm not completely crazy. That's good.

Any chance of adding an objectiveCapture option to alienDeployments: as above?
Title: Re: TFTD Map Items Recovery question
Post by: Meridian on January 22, 2020, 02:51:56 pm
Any chance of adding an objectiveCapture option to alienDeployments: as above?

Added.

Code: [Select]
alienDeployments:
  - type: STR_ARTIFACT_SITE_P2
    markerName: STR_ARTIFACT_SITE
    objectiveType: 3
    allowObjectiveRecovery: true    # <--------------------- this one
    objectivesRequired: 1
    objectiveComplete: [STR_ALIEN_SYNOMIUM_DEVICE_DESTROYED, 750]
    objectiveFailed: [STR_ALIEN_SYNOMIUM_DEVICE_FAILED, -750]
    objectivePopup: STR_CONTROL_CENTER_DESTROYED
Title: Re: TFTD Map Items Recovery question
Post by: skyhawk on January 22, 2020, 07:33:54 pm
You are so awesome Meridian, thank you!