OpenXcom Forum

Modding => OpenXcom Extended => OXCE Support => Topic started by: krautbernd on February 21, 2019, 11:19:22 pm

Title: [Solved] Unlock research topics that also require items
Post by: krautbernd on February 21, 2019, 11:19:22 pm
I've been messing around with the gauss/mass driver research tree in xcom files and have hit a wall:

Is it possible to create a research topic which requires the item in question to be researched, but which can also be unlocked by other research entries?

Case in point, i'm trying to make a weapon researchable by either recovering and researching the weapon (-> needItem), or by researching other entries (-> unlocks).

Is this even possible with the current system? I know i can create a second research topic and have that unlock the weapon (via lookup or getonefree), but that way i can potentially end up with both research topics being available.
Title: Re: Unlock research topics that also require items
Post by: ohartenstein23 on February 21, 2019, 11:27:20 pm
Have the other research entries use giveOneFree to get the item's research entry?
Title: Re: Unlock research topics that also require items
Post by: krautbernd on February 21, 2019, 11:36:44 pm
Have the other research entries use giveOneFree to get the item's research entry?
Quote
I know i can create a second research topic and have that unlock the weapon (via lookup or getonefree), but that way i can potentially end up with both research topics being available.

Again, this would be a workaround, but it would lead to both topics being researchable when i unlock the entry and recover the item. I'd like to end up with one topic that is unlocked via prior research or the recovered item.
Title: Re: Unlock research topics that also require items
Post by: Meridian on February 21, 2019, 11:44:00 pm
Is this even possible with the current system?

No, the same research topic cannot need item and not need item at the same time.
Title: Re: Unlock research topics that also require items
Post by: krautbernd on February 22, 2019, 12:05:14 am
No, the same research topic cannot need item and not need item at the same time.
So needItem: true and unlock via dependency are mutually exclusive?
Title: Re: Unlock research topics that also require items
Post by: Meridian on February 22, 2019, 12:16:45 am
So needItem: true and unlock via dependency are mutually exclusive?

No, not mutually exclusive, they can work nicely together... i.e. you can create a research that needs to be unlocked first and then still needs an item.

I guess your question is if "unlock" can override "needItem"... and the answer is no... "unlock" is not powerful enough to override "needItem".
Title: Re: Unlock research topics that also require items
Post by: krautbernd on February 22, 2019, 12:35:26 am
No, not mutually exclusive, they can work nicely together... i.e. you can create a research that needs to be unlocked first and then still needs an item.
Yeah, sorry - i guess i'm too tired right now to think logically  :P
Title: Re: Unlock research topics that also require items
Post by: mumble on February 22, 2019, 03:29:36 am
I thought he was suggesting research requiring additional resources to use. Ie, researching plasma requiring 20 elerium and 5 alien alloys.
Title: Re: Unlock research topics that also require items
Post by: krautbernd on February 22, 2019, 07:23:11 pm
I thought he was suggesting research requiring additional resources to use. Ie, researching plasma requiring 20 elerium and 5 alien alloys.
@Meridian:
Would it be pointless to ask for either of those options to be implemented?
Title: Re: Unlock research topics that also require items
Post by: Meridian on February 22, 2019, 07:45:04 pm
@Meridian:
Would it be pointless to ask for either of those options to be implemented?

Probably... describe both of them in more detail and we'll see.
Title: Re: Unlock research topics that also require items
Post by: mumble on February 23, 2019, 08:27:31 am
Ill give it a shot for at least my idea. So basically my idea is enabling similar requirements research as buildings. Currently, med bays in piratez requires 10 medicine items to be created, in addition to funding. Research would be similar. Say you want to research creating the medbay. Perhaps you need medical supplies, alcohol, and a slave to medically experiment on. Thus requirements go from 1 item being researched, or tech tree position, to that tech item, and a bunch of requirements (medical supplies, alcohol, slave). These items wouldn't be researched, but would be a requirement, and possibly consumed by such research.

Always bothered me more research wasn't more resource intensive, I always thought researching Making a gun would at least require some metal for a prototype.

Other examples are making AA ammo consume guns on research (surely a few guns would break before you get it right) or using chemicals in piratez to deal with chemically involved research.

Could pad out research, or allow you to have earlier potential research that is also harder to get.
Title: Re: Unlock research topics that also require items
Post by: Meridian on February 23, 2019, 10:23:31 am
For me personally, not very interesting... but if more modders would want it, it's doable.

The same can be achieved also via manufacturing btw.
Create a manufacture project called "medbay blueprints", make it require medical supplies, alcohol and slaves... and after manufacturing that (single) item, research it.
Title: Re: Unlock research topics that also require items
Post by: mumble on February 23, 2019, 11:34:44 am
That does work, except 1, it clogs up manufacturing, and 2, this doesn't work if you lack manufacturing. (xcom files lacks manufacturing in first year) and its also much more wonky doing essentially a 2 step process for a singular thing.
Title: Re: Unlock research topics that also require items
Post by: Meridian on February 23, 2019, 01:34:55 pm
Of course.

From other perspective:
1) why would I need supplies, alcohol and a slave to research medbay? Sure, I may need them to build/stock the medbay... but research? I'm sure people "invented" a surgery room before they had modern anesthetics and a nuclear reactor before they had any enriched uranium.

2) How would this be communicated to the player?? I mean, if you need 1000 bottles of vodka to research the medbay... how should the poor player who doesn't hoard and maintains his stores properly and keeps only 999 bottles of vodka at any given time know that he's missing a key research because he's selling excess vodka?

3) Lack of manufacturing is not a valid argument... you can have manufacturing from the very beginning, limited to whatever projects you choose... doesn't need to be a full workshop.

4) Specifically for big mods like XCF which you mentioned... there are already 1000+ projects... adding a dozen more for special research will not clog up anything. In smaller mods, I agree, this would clog things up.
Title: Re: Unlock research topics that also require items
Post by: mumble on February 23, 2019, 09:36:31 pm
1). Idea is, researching how to better patch someone up requires a "learning dummy" (slave) booze (to properly incapacitate someone to practice cutting on) and medical supplies (to be wasted figuring out how they work best. That's actually the whole point, making research that's more resource intensive without the whole "is there some item I didn't craft somewhere" syndrome. It would streamline say, badges for bounty hunting in piratez, and allow more compact dealing with things. Technically we can do this now, but it has some downsides. 1,it requires crafting, which can end up easily lost, 2, it requires free crafting space, and 3,it makes researching said thing a 2 step process of craft and research. Its a bit wonky all around, I'm sure you can admit.

2. ui, a good question... I was thinking perhaps select research with requirements, could be a different color, and have a button inside the research labeled "required supplies", or if there's room, put em down. I figure tech tree viewer could display needed items too, and you could list items you are tech ready for, but lack supplies towards the bottom of the research list. ADMITABLY, ui is the biggest issue here, but I don't think its insurmountable. Even just a tag for like *r* on research, to show requirements, looking at tech tree viewer, and showing an error if attempting research without would work, I think.

3: depends on the mod. Xcf currently has no manufacturing for the first year. I realize you address xcf bellow, but it would also prevent losing core research items in a mess of manufacturing items. Currently a lot of care must be taken so these items are pointed out as "hey, research this dummy" so people don't end up stuck. It would make things less obtuse afterwards.

4: suppose I have nothing for this that isn't a rehash. Just feels like it could be a quality of life improvement for modders and players in some situations.
Title: Re: Unlock research topics that also require items
Post by: Hobbes on February 23, 2019, 10:22:17 pm
Items being required to start a research is already used in Firaxis' XCOMs so this isn't exactly a new idea :)

But, my biggest issue with using such a feature is this: while on Firaxis it was used cleverly to have to you to choose if you wanted those resources allocated to manufacturing or research, with larger mods it risk increases that it just adds complexity to a simple system where the player just needs the item to get the research (reward).
Title: Re: Unlock research topics that also require items
Post by: mumble on February 23, 2019, 10:31:35 pm
Kinda a null concern considering this already exists with crafting items to research, but then researching crafting items. The complexity already exists, but more complex than you think. This would actually SIMPLIFY many things.