OpenXcom Forum

Modding => Released Mods => XPiratez => Topic started by: tylor on January 11, 2017, 07:33:38 pm

Title: What if... some researches could be reusable and trigger missions on completion?
Post by: tylor on January 11, 2017, 07:33:38 pm
I was looking into code and it does not look too hard. Basically, skip (*i)->removeResearch(*iter); in GeoscapState.cpp when "repeatable" flag is set, and do processCommand for missionTriggered param if one is present.

What possibilities would this open. It would allow "buying" missions for highly configurable price in Brainer's and Runt's time and items.  And chain missions in different ways, with forking, even some C&C, etc. It would make Brainers useful even if you have run out of all (or all interesting) researches.

~50 brainerdays seems a reasonable price for something that you should not use lightly, and can be way more for late-game missions. Including some kind of prisoner in price could be a good idea too, as they are harder to keep for a long time, and it can give use for many prisoner types.

For example, instead of waiting while RNG would give you a Reticulan Base Probe, you would craft 10 SG novices and 10 Data Disks into a "Lead to Reticulan Base" item, research it for 300 Brainerdays, and get a Reticulan Base mission on finish. With 3 Guild Reps and a hefty sum of money you will be able to research Guildmaster Location. Or it could be something even more complex, detective-like work, with combination of questioning different people, checking different leads, etc. It can be useful for other mods, such as X-Com Files.
Title: Re: What if... some researches could be reusable and trigger missions on completion?
Post by: Solarius Scorch on January 11, 2017, 08:53:58 pm
Not the most important thing, but how would it affect research progress meter? Can you get 100%?
Title: Re: What if... some researches could be reusable and trigger missions on completion?
Post by: tylor on January 11, 2017, 09:19:00 pm
I think you can't reach 100% even now, considering Codex divergence.
Title: Re: What if... some researches could be reusable and trigger missions on completion?
Post by: Meridian on January 11, 2017, 09:22:48 pm
I think you can't reach 100% even now, considering Codex divergence.

And don't forget STR_UNAVAILABLE :P
100% is unobtainable...
Title: Re: What if... some researches could be reusable and trigger missions on completion?
Post by: Solarius Scorch on January 11, 2017, 10:09:02 pm
Good point, thanks. :)
Title: Re: What if... some researches could be reusable and trigger missions on completion?
Post by: BetaSpectre on January 14, 2017, 03:52:00 am
This makes more sense than random mission encounters, But isn't the system only able to start the mission the month after?

Title: Re: What if... some researches could be reusable and trigger missions on completion?
Post by: tylor on January 14, 2017, 07:31:08 am
This makes more sense than random mission encounters, But isn't the system only able to start the mission the month after?
Yeah, code (if I understand it right) looks up possible missions at the start of month (void GeoscapeState::time1Month()) and shedule those who are applicable and have passed the chance roll. Though I think it's possible to schedule mission on research completion, instead of in time1Month function, and/or with zero timeout. Though, I don't know code well enough to tell if it would break something.
Title: Re: What if... some researches could be reusable and trigger missions on completion?
Post by: BTAxis on January 15, 2017, 01:44:43 pm
And don't forget STR_UNAVAILABLE :P
100% is unobtainable...

Is it worth adding code to get around that? From the way it sounds you'd need a flag for research to tell the system it doesn't count toward the progression stat, and a way for research to mark other research as completed (for purposes of completion progress only) in addition to itself.

Maybe it's considered a non-issue, and I can live with that, but completionism is a thing and I can definitely see how being able to reach 100% can make people feel better.