OpenXcom Forum

Modding => Work In Progress => Topic started by: davide on September 13, 2016, 12:55:20 pm

Title: [Request with solutions by Civilian & Robin] How to recover a craft ?
Post by: davide on September 13, 2016, 12:55:20 pm
I wish recover a craft from a mission.

I imagine that it is necessary to retrieve an object that unlocks a new craft manufactory project

The recovered object could has a description about "It is aslightly damaged craft. It could be repaired ..."
The manufacture project could has description "Repair damaged craft named abc" (It needs free hangar as usual)

thanks
Title: Re: [Request] How to recover a craft ?
Post by: kkmic on September 13, 2016, 01:07:56 pm
I suppose that you could add an item to the map that is recoverable and can be used to manufacture a new craft.
Title: Re: [Request] How to recover a craft ?
Post by: davide on September 13, 2016, 02:16:11 pm
Has the recoverable item to have sprites ?
Title: Re: [Request] How to recover a craft ?
Post by: Solarius Scorch on September 13, 2016, 06:37:08 pm
Has the recoverable item to have sprites ?

No, at least not the floorob. I suggest you give it a bigob anyway, because then it could be displayed in the Ufopaedia, but make sure to place it in a place where a soldier is unlikely to stand, so you wouldn't see in in battlescape.
Title: Re: [Request] How to recover a craft ?
Post by: new_civilian on September 14, 2016, 01:30:14 pm
Here you go, davide. I took the FHYR small scout idea, some of canadianbeaver's graphics and went ahead.

Notes:

research not tested in game yet
everything else seems fine, tested it in debug mode only, however.
credits:
CanadianBeaver for the Ufopaedia sky background (from his Lightning Ufopaedia fix)
Droggarth for the FHYR mod
You, for the idea
me :-)
Boredom, for actually forcing me to do this


The terrain and maps/routes are edited original files.

It's possible that the research does not display both ufopedias at once, if that's the case just delete the getonefree entry.

hf²!
Title: Re: [Request] How to recover a craft ?
Post by: robin on September 14, 2016, 02:11:13 pm
you can also link an MCD to an item, adding a specialType entry to the item; the MCD then should be given the same value to its Target_Type.
example:
specialType: 30 (in ruleset)
Target_Type 30 (in MCDEdit)
(Use a value of 20+ because some values -up to 14 iirc- are already used; max is 99 i think).

The linked item is automatically recovered if that MCD is still undamaged by the end of a mission (1 item for each MCD present on the battlescape).
Then I guess you can use the item to manufacture a craft..? I'm not sure about this.
Title: Re: [Request] How to recover a craft ?
Post by: davide on September 14, 2016, 03:14:55 pm
Thank you very much to all friends :)
Title: Re: [Request] How to recover a craft ?
Post by: new_civilian on September 15, 2016, 12:09:41 pm
you can also link an MCD to an item, adding a specialType entry to the item; the MCD then should be given the same value to its Target_Type.
example:
specialType: 30 (in ruleset)
Target_Type 30 (in MCDEdit)
(Use a value of 20+ because some values -up to 14 iirc- are already used; max is 99 i think).

The linked item is automatically recovered if that MCD is still undamaged by the end of a mission (1 item for each MCD present on the battlescape).
Then I guess you can use the item to manufacture a craft..? I'm not sure about this.

True and yes you can use it as an ingredient-item for manufacture. I opted for the way I used in my mod as it was a bit more convinient ,flexible and easier/faster to do, but robin's way is actually much more elegant.