Author Topic: How do I fully edit research project dependencies?  (Read 4313 times)

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1346
    • View Profile
How do I fully edit research project dependencies?
« on: September 08, 2014, 10:00:21 am »
The Xcom1Ruleset.rul file contains dependency lists for various research projects, but does not specify whether all items are needed, such as needing power suit and UFO navigation for flying suit, or if any one item is enough, such as how you can research almost any alien for alien origins.

How do I know which one it is, and how do I change it? For example, I wish to make both pulse cannons and laser beam available for research once you have completed any of the following: heavy laser cannon, laser autocannon, large laser turret, X-large laser turret; or pulse cannons available once medium laser turret is researched. (I'm adding some new technologies here.)
« Last Edit: September 08, 2014, 10:04:49 am by The Reaver of Darkness »

Offline Falko

  • Commander
  • *****
  • Posts: 810
    • View Profile
Re: How do I fully edit research project dependencies?
« Reply #1 on: September 08, 2014, 02:05:13 pm »
take a look how the plasma beam in the original is researched

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1346
    • View Profile
Re: How do I fully edit research project dependencies?
« Reply #2 on: September 08, 2014, 10:15:28 pm »
I noticed that, and had some questions about that. I see there are two dependencies, but I don't understand how they work and it doesn't answer my question.

Offline NoelBuddy

  • Colonel
  • ****
  • Posts: 143
    • View Profile
Re: How do I fully edit research project dependencies?
« Reply #3 on: September 08, 2014, 11:18:45 pm »
"unlocks:" will make the target topic available, bypasses "dependencies:"
"requires:" will block "unlocks:" until everything in this field is researched
"dependencies:" will keep it unavailable until all dependencies are fulfilled, or it is unlocked(dependencies will not block the "unlocks:" command.)
"getOneFree:" pick something from the listed option and gives it to you as a completed research item w/o regard for any of it's requirements.

So research becomes available once all of it's dependencies are fulfilled, or it is referenced by an unlocks: line(which only works if all requires: have already been met)

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1346
    • View Profile
Re: How do I fully edit research project dependencies?
« Reply #4 on: September 09, 2014, 08:58:27 am »
So you're saying that all techs with multiple dependencies of which only one is needed, the dependencies all have an unlock command?

Offline yrizoud

  • Commander
  • *****
  • Posts: 1024
    • View Profile
Re: How do I fully edit research project dependencies?
« Reply #5 on: September 09, 2014, 01:04:00 pm »
You generally use only one of the systems:
- D becomes available when A and B and C are discovered : D has A B C dependencies
- D becomes available when A or B or C are discovered : A unlocks D, B unlocks D, C unlocks D

Offline moriarty

  • Commander
  • *****
  • Posts: 1427
    • View Profile
    • Luke's OX mod site
Re: How do I fully edit research project dependencies?
« Reply #6 on: September 09, 2014, 08:01:10 pm »
also remember that you can use "invisible" research projects that are instantly available as "special unlock conditions":

A unlocks "special"
B unlocks "special"
C unlocks "special"

"special" has no cost, no point value and no UFOpedia entry

X has dependency "special" and D

--> as soon as either A,B, or C are discovered AND D is discovered, X becomes available

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1346
    • View Profile
Re: How do I fully edit research project dependencies?
« Reply #7 on: September 09, 2014, 08:20:32 pm »
But what if I want to force an A and B and C condition? How do I do that?

Offline moriarty

  • Commander
  • *****
  • Posts: 1427
    • View Profile
    • Luke's OX mod site
Re: How do I fully edit research project dependencies?
« Reply #8 on: September 09, 2014, 08:28:34 pm »
if A,B,C are dependencies for X, you have what you want: X only becomes available if A and B and C are researched.

Offline moriarty

  • Commander
  • *****
  • Posts: 1427
    • View Profile
    • Luke's OX mod site
Re: How do I fully edit research project dependencies?
« Reply #9 on: September 09, 2014, 09:03:23 pm »
Quote
For example, I wish to make both pulse cannons and laser beam available for research once you have completed any of the following: heavy laser cannon, laser autocannon, large laser turret, X-large laser turret; or pulse cannons available once medium laser turret is researched.

-->

heavy laser cannon UNLOCKS: STR_PCLB_AVAILABLE
laser autocannon UNLOCKS: STR_PCLB_AVAILABLE
large laser turret UNLOCKS: STR_PCLB_AVAILABLE
X-large laser turret UNLOCKS: STR_PCLB_AVAILABLE

STR_PCLB_AVAILABLE
    DEPENDENCIES: heavy laser cannon (need only one dependency to make sure it isn't available from the start)
    UNLOCKS: pulse cannon, laser beam

medium laser turret UNLOCKS: pulse cannon

pulse cannon DEPENDENCIES: medium laser turret, STR_PCLB_AVAILABLE
laser beam REQUIRES: STR_PCLB_AVAILABLE

...that should work. I think. I like to use those kinds of "proxies", because usually it's about underlying principles: in your example, the four laser technologies give your researchers some kind of technological insight represented by the "hidden" research topic "STR_PCLB_AVAILABLE", which then enables you to research pulse cannon and laser beam.

if you later add another tech that should give the same insight, fitting it in will be easy this way.

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1346
    • View Profile
Re: How do I fully edit research project dependencies?
« Reply #10 on: September 10, 2014, 12:53:56 am »
Thanks. I believe I've got it know. I'll let you know if it doesn't work whenever I get around to trying it.