OpenXcom Forum
Modding => Tools => Topic started by: The Reaver of Darkness 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.)
-
take a look how the plasma beam in the original is researched
-
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.
-
"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)
-
So you're saying that all techs with multiple dependencies of which only one is needed, the dependencies all have an unlock command?
-
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
-
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
-
But what if I want to force an A and B and C condition? How do I do that?
-
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.
-
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.
-
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.