dependencies
List of research projects that can unlock access to this one. If the full list is researched, or if one of the projects on the list "unlocks" this one, it becomes available.
dependencies:
- STR_AQUATOID
- STR_GILLMAN
- STR_TASOTH
- STR_LOBSTERMAN
requires
List of research projects unilaterally required before this project can be unlocked (for example, "the martian solution" will not even be considered for unlocking until AFTER "alien origins" is completed).
Let's say I list the following dependencies for all Sonic weapons (Pistol, Blasta Rifle & Cannon):Code: [Select]dependencies:
- STR_AQUATOID
- STR_GILLMAN
- STR_TASOTH
- STR_LOBSTERMAN
Does this mean each weapon will require 4 live aliens of every race? Or does fulfilling dependencies for one item apply to all others which list the same dependencies? In other words, would all Sonic weapons become unlocked after I research a live Aquatoid, Gillman, Tasoth and Lobsterman, or would I need to research these 4 alien races again for each weapon separately? (I hope that's a clear question.)
Or would the latter apply if I list the 4 alien races as requirements instead?
Let's take The Martian Solution as an example then. How does having Alien Origins as a requirement differ from having Alien Origins as a dependency?
Apologies if it's a silly question :P
- name: STR_LEADER_PLUS
cost: 0
requires:
- STR_ALIEN_ORIGINS
- name: STR_COMMANDER_PLUS
cost: 0
points: 0
unlocks:
- STR_TLETH_ALIEN_CITY
requires:
- STR_THE_ULTIMATE_THREAT
I'd still like to know the actual difference between requirements and dependencies, though. Requirements are only used twice in research, both of which are associated with unlocking the final mission.Code: [Select]- name: STR_LEADER_PLUS
cost: 0
requires:
- STR_ALIEN_ORIGINS
Wouldn't having Alien Origins as a dependency have the same effect as a requirement here? I would just like to understand the logic behind it. Same with the second example below.
Code: [Select]- name: STR_COMMANDER_PLUS
cost: 0
points: 0
unlocks:
- STR_TLETH_ALIEN_CITY
requires:
- STR_THE_ULTIMATE_THREAT
My following question is: I understand "unlock" basically overrides the need to fulfill multiple dependencies, correct? To follow up on my original example then, Sonic Pistol could have all 4 alien races listed under dependencies and I could make each one of those races "unlock" Sonic Pistol, thus overriding the need to research the 4 of them.
Now... could I have any other item (say, Gauss Pistol) "unlock" Sonic Pistol even if it's not listed under Sonic Pistol's dependencies (as the 4 alien races are) or does it have to be included under Sonic Pistol's dependencies too in order to be able to unlock it?
All these examples are experimental, I'm just trying to learn how it all works!
Thanks :)
unlocks:
- STR_SONIC_PISTOL
Next question: does 'getOneFree' always unlock one of the bonuses listed or is that random (ie. maybe you get a bonus, maybe not)?
PS: Just to be sure, would STR_AQUATOID mean any Aquatoid, regardless of rank (as opposed to STR_AQUATOID_MEDIC, for example, which would be rank-specific)?
Always unlocks one. Usage of 'getOneFree' also has a side effect which is that the research topic will always be available for research, even with dependencies.
No. STR_AQUATOID is used to designate a speciific /alienRace entry, while STR-AQUATOID_MEDIC is an entry on /units (along with all the other ranks).
dependencies:
- STR_AQUATOID
- STR_GILLMAN
- STR_TASOTH
- STR_LOBSTERMAN
dependencies:
- STR_ION_BEAM_ACCELERATORS
- STR_PLASTIC_AQUA_ARMOR
- STR_DEEP_ONE_TERRORIST
You mean a 'getOneFree' from an Aquatoid Medic, for example, would randomly unlock some alien autopsy, completely overriding the need to properly research the corresponding corpse and therefore making the research topic immediately available?Get one free basically randomly selects a single research topic from its following list, and gives it to the player instantly. It does not unlock anything by itself. The player just gets the random free tech as though they researched it.
- name: STR_SOME_TECH
cost: 100
points: 10
getOneFree:
- STR_TECH_1
- STR_TECH_2
- STR_TECH_3
Basically when STR_SOME_TECH is researched, then it will give the player either tech 1, 2, or 3. However, upon completing research, STR_SOME_TECH will still be available unless needitem is set to true and the option to expend items upon research is set to true in the advanced options or it is a live alien which are hardcoded to expire after research. Dependencies, requirements, or any other restriction do not matter in this case. The player will receive a tech from the list unless the player already has every item researched.So if I list the following under Sonic Pistol (to keep using the same example):Given the code you posted above, the player would only need to research a member of that alien race or have received the techs through medic interrogations. There would be no rank requirements.Code: [Select]dependencies:
- STR_AQUATOID
- STR_GILLMAN
- STR_TASOTH
- STR_LOBSTERMAN
Doesn't that mean any rank of any of the aforementioned alien races would qualify? Or do I have to indicate STR_AQUATOID_SOLDIER, STR_AQUATOID_SQUAD_LEADER, STR_AQUATOID_MEDIC, etc. for each race (assuming I wanted all ranks to qualify as dependencies)?
Yes. DEEP_ONE_TERRORIST means the player must research a live deep one in order to meet the requierments for the tech to become available for research.
PS: Does DEEP_ONE_TERRORIST under Ion Armor's dependencies mean you must have a live Deep One in storage/containment? In other words, it's not a Deep One's Autopsy, correct?Code: [Select]dependencies:
- STR_ION_BEAM_ACCELERATORS
- STR_PLASTIC_AQUA_ARMOR
- STR_DEEP_ONE_TERRORIST
So if I wanted it to be an autopsy or corpse requirement I'd have to change that to STR_DEEP_ONE_AUTOPSY or STR_DEEP_ONE_CORPSE, respectively?
And just to be sure, AUTOPSY means the UFOpedia entry has been unlocked and CORPSE means that, well, you have a dead Deep One in storage.I'm not really sure. The rules basically have researching the corpse give the player the autopsy tech which references the proper UFOpaedia article. Someone wiser than me would probably know the reason why it's set up like this.
I'm not really sure. The rules basically have researching the corpse give the player the autopsy tech which references the proper UFOpaedia article. Someone wiser than me would probably know the reason why it's set up like this.
requires:
- STR_AQUA_PLASTICS
dependencies:
- STR_AQUATOID
- STR_GILLMAN
- STR_TASOTH
- STR_LOBSTERMAN
- type: STR_ALIEN_CONTAINMENT
requires:
- STR_ALIEN_CRYOGENICS
- STR_ALIEN_CLONING
- type: STR_GAUSS_DEFENSES
requires:
- STR_GAUSS_DEFENSES
- name: STR_GAUSS_DEFENSE
cost: 510
points: 15
Would that prompt a "now we can build Alien Containment" pop-up alongside it's UFOpedia entry? Or do I need to do something else?
Yes, I was just figuring that out last night... requirements could perhaps be more easily understood as pre-requisites, so that regardless of how many dependencies are met (or even single "unlocking" factors, for that matter), until the pre-requisite is fulfilled, nothing will be unlocked.That's almost right. What will happen is that you can research any of these any number of time you want, it will do absolutely nothing for the sonic pistol. You have to research the aliens again AFTER you have researched aqua plastics. Before the requirements are met, no progress can be made towards the dependencies.
So following my earlier Sonic Pistol example, I could have this:Code: [Select]requires:
- STR_AQUA_PLASTICS
dependencies:
- STR_AQUATOID
- STR_GILLMAN
- STR_TASOTH
- STR_LOBSTERMAN
In this case, even if I captured and interrogated all 4 live aliens from each race (or even if I made any one of them independently 'unlock' STR_SONIC_PISTOL), I would still not get Sonic Pistol until I researched Aqua Plastics.
Now, on to Facilities!That should work. In my version of a similar idea, I defined a new research project for the alien containment with its own dependencies, then put that in the facility's requires. It might help with the popup issue that Hobbes was talking about.
If I wanted to make Alien Containment require Alien Cryogenics and Alien Cloning (rather than being immediately available from the beginning), would this be enough?Code: [Select]- type: STR_ALIEN_CONTAINMENT
requires:
- STR_ALIEN_CRYOGENICS
- STR_ALIEN_CLONING
Would that prompt a "now we can build Alien Containment" pop-up alongside it's UFOpedia entry? Or do I need to do something else?
Also, I'm not sure if there's a little typo in the code below. I was going through Gauss Defenses as a guideline for the above example, and I came across this:Code: [Select]- type: STR_GAUSS_DEFENSES
requires:
- STR_GAUSS_DEFENSES
However, when I tried to look up STR_GAUSS_DEFENSES in research.rul, I didn't find it. Instead, I found this:
Code: [Select]- name: STR_GAUSS_DEFENSE
cost: 510
points: 15
In other words, shouldn't Gauss Defenses require STR_GAUSS_DEFENSE (without the S at the end, as it appears in research.rul) rather than STR_GAUSS_DEFENSES (with an S at the end)? Or am I totally off?
Same applies to STR_PWT_DEFENSES and STR_SONIC_DEFENSES as well. Just want to be sure.
Thanks for all the help, everyone :)
That's why, if you have a project with a requirement, you should only put corpses, items and interrogations as dependencies, since you can do those however many time you want.
That looks like a good catch! I haven't played OpenTftD enough to find if indeed the defenses don't show up, but strictly from this, they should indeed not come up as the research/requires don't match.
It should but the pop-ups sometimes don't appear when they should.
Just for reference
https://www.ufopaedia.org/index.php?title=Ruleset_Reference_Nightly_%28OpenXcom%29
This explains most of the rules files.
Ah, that's extremely good to know!
You also answered another question I had in mind: I was thinking dependencies fulfilled prior to the requirement would still count towards unlocking said project/topic, but you are basically saying that's not the case (ie. dependencies must be researched—again, if necessary—after the requirement is met). Gotta keep that in mind.
the missing S in the research was fixed days ago, make sure you're using the up-to-date ruleset.
- name: STR_AQUA_PLASTICS
dependencies: ""
dependencies:
- STR_AQUATOID_COMMANDER
- STR_AQUATOID_NAVIGATOR
- STR_AQUATOID_TECHNICIAN
- STR_AQUATOID_MEDIC
- STR_AQUATOID_SQUAD_LEADER
- STR_AQUATOID_SOLDIER
- STR_CALCINITE_TERRORIST
- STR_HALLUCINOID_TERRORIST
- STR_GILLMAN_COMMANDER
- STR_GILLMAN_TECHNICIAN
- STR_GILLMAN_SQUAD_LEADER
- STR_GILLMAN_SOLDIER
- STR_DEEP_ONE_TERRORIST
- STR_XARQUID_TERRORIST
- STR_TASOTH_SQUAD_LEADER
- STR_TASOTH_SOLDIER
- STR_TENTACULAT_TERRORIST
- STR_BIODRONE_TERRORIST
- STR_TRISCENE_TERRORIST
- STR_LOBSTERMAN_COMMANDER
- STR_LOBSTERMAN_NAVIGATOR
- STR_LOBSTERMAN_TECHNICIAN
- STR_LOBSTERMAN_SQUAD_LEADER
- STR_LOBSTERMAN_SOLDIER
- name: STR_ALIEN_ORIGINS
dependencies: []
- STR_AQUATOID
- STR_GILLMAN
- STR_TASOTH
- STR_LOBSTERMAN
- name: STR_NEW_ITEM
dependencies:
- STR_ITEM_A
- STR_ITEM_B
- name: STR_NEW_ITEM
dependencies:
- STR_ITEM_C
- facilities:
- delete: STR_ALL_YOUR_BASE_ARE_BELONG_TO_US
Now I got some mOrz questions! :PAlright! Let's see...
If I wanted to remove Deep One's dependencies from Aqua Plastics, would this do the trick? (I know I could simply edit it out of the base rulset, but I'd like to understand how modular rulsets are applied to the base ruleset here—and more specifically, how to use "" and [])The "needItem: true" means exactly that, you need the item to be able to do the research. The only exception I can think of would be:Code: [Select]- name: STR_AQUA_PLASTICS
dependencies: ""
Would that nullify STR_DEEP_ONE_CORPSE?[/quote[
I don't think this would work, no. You can define a new list, which will overwrite the old one, but I don't think you can define an empty list. I think it might be better to just haveCode: [Select]research:
- delete: STR_AQUA_PLASTICS
- name: STR_AQUA_PLASTICS
cost: ???
points: ???
needItem: trueQuoteNext question (getting more complicated). If I wanted to remove a list of dependencies instead of just one, whilst adding my own dependencies, how would I do that? Let's take TFTD Alien Origin's, for example. This is how it appears:Code: [Select]dependencies:
- STR_AQUATOID_COMMANDER
- STR_AQUATOID_NAVIGATOR
- STR_AQUATOID_TECHNICIAN
- STR_AQUATOID_MEDIC
- STR_AQUATOID_SQUAD_LEADER
- STR_AQUATOID_SOLDIER
- STR_CALCINITE_TERRORIST
- STR_HALLUCINOID_TERRORIST
- STR_GILLMAN_COMMANDER
- STR_GILLMAN_TECHNICIAN
- STR_GILLMAN_SQUAD_LEADER
- STR_GILLMAN_SOLDIER
- STR_DEEP_ONE_TERRORIST
- STR_XARQUID_TERRORIST
- STR_TASOTH_SQUAD_LEADER
- STR_TASOTH_SOLDIER
- STR_TENTACULAT_TERRORIST
- STR_BIODRONE_TERRORIST
- STR_TRISCENE_TERRORIST
- STR_LOBSTERMAN_COMMANDER
- STR_LOBSTERMAN_NAVIGATOR
- STR_LOBSTERMAN_TECHNICIAN
- STR_LOBSTERMAN_SQUAD_LEADER
- STR_LOBSTERMAN_SOLDIER
If I just wanted to remove all of that and just add the 4 non-Terrorist races instead, would this work?Code: [Select]- name: STR_ALIEN_ORIGINS
dependencies: []
- STR_AQUATOID
- STR_GILLMAN
- STR_TASOTH
- STR_LOBSTERMAN
The reason it is done this way is that there is some kind of interplay between having project A as a dependency of project B if A unlocks B. As you have it listed now, STR_ALIEN_ORIGINS will require you to research all 4 races. You could potentially make the racial projects unlock alien origins, but that becomes a really long chain: research line alien -> get alien race project -> unlock alien origins. in this case it was judged simpler to have "A gives B and unlocks C" than "A gives B that unlocks C". But to answer the question, yes, defining a new list will overwrite the old list.QuoteLast question (for now). This is a silly question perhaps, but just to be completely clear: when I list any dependencies on my own modular ruleset without removing any from the base ruleset, does it nullify the original dependencies or does it add to them?Defining your list will overwrite the previous list. Unfortunately lists are not additive. If you want to add to a list, you have to define the whole thing. So for your example, you would need:
For example, let's say this is what I want to modify:Code: [Select]- name: STR_NEW_ITEM
dependencies:
- STR_ITEM_A
- STR_ITEM_B
If I do:Code: [Select]- name: STR_NEW_ITEM
dependencies:
- STR_ITEM_C
Does it already override the base ruleset's dependencies or does it add ITEM_C to the list?Code: [Select]- name: STR_NEW_ITEM
dependencies:
- STR_ITEM_A
- STR_ITEM_B
- STR_ITEM_C
[quote[Bonus question:
If I want to completely delete something entirely, would this work?Code: [Select]- facilities:
[/quote[
- delete: STR_ALL_YOUR_BASE_ARE_BELONG_TO_US
Yup, that removes it. In some cases it is the only way to do things, such as the deleting and redefining I suggested above for Aqua Plastics.
[quote[Bonus question #2
Does 'needItem: true' just means you must have item in storage first, so that even if dependencies are already met (or even if some other item 'unlocks' this one), you must have the item regardless?
- name: STR_MY_SUPER_GUN
needItem: true
- name: STR_ALIEN_GENIUS
getOneFree:
- STR_MY_SUPER_GUN
In which case the project is given for free, regardless of dependencies and presumable "needItem". If STR_MY_SUPER_GUN has a "requires", then I am not sure how that would interact with the "getOneFree" however.
The "needItem: true" means exactly that, you need the item to be able to do the research.
- name: STR_VIBRO_BLADE
cost: 300
points: 10
dependencies:
- STR_CALCINITE_CORPSE
If you need to specifically erase a field, for example to clear requirements for something (like making an item or research available from the start of the game), you can use "" for an empty string, [] for an empty list and {} for an empty map.
- name: STR_AQUA_PLASTICS
cost: 400
points: 30
needItem: true
dependencies:
- STR_DEEP_ONE_CORPSE
- name: STR_DEEP_ONE_CORPSE
cost: 180
points: 50
lookup: STR_DEEP_ONE_AUTOPSY
needItem: true
unlocks:
- STR_AQUA_PLASTICS
Then does 'needItem: true' become the single determining factor to gain access to certain research topics? In other words, does it work with dependencies or other variables or not?
For example, Vibro Blade has Calcinite Corpse as dependency. Does that mean I do not need to have Vibro Blade (the item in question) in order to unlock the research?Code: [Select]- name: STR_VIBRO_BLADE
cost: 300
points: 10
dependencies:
- STR_CALCINITE_CORPSE
What if I add 'needItem: true' to it? What happens then?
As for the nullifying of dependencies or requirements without using "" or []Uh.. well well.. Never noticed that :P I guess it would work. As I mentioned before, I would otherwise have deleted the whole project and redefined it straight away. I have never been in a situation to remove dependencies, just add more, so I didn't know about that!
https://www.ufopaedia.org/index.php?title=Rulesets_%28OpenXcom%29#Modular_Rulesets (https://www.ufopaedia.org/index.php?title=Rulesets_%28OpenXcom%29#Modular_Rulesets)
Say, you wanted to remove Deep One Corpse dependency from Aqua Plastics (thereby making Aqua Plastics available for research upon acquisition).Code: [Select]- name: STR_AQUA_PLASTICS
cost: 400
points: 30
needItem: true
dependencies:
- STR_DEEP_ONE_CORPSE
How would you go about it?
And does Deep One Corpse's 'unlock' need to be removed as well?Code: [Select]- name: STR_DEEP_ONE_CORPSE
cost: 180
points: 50
lookup: STR_DEEP_ONE_AUTOPSY
needItem: true
unlocks:
- STR_AQUA_PLASTICS
To rephrase it differently: if Aqua Plastics no longer has Deep One Corpse dependency, can Deep One Corpse still unlock it just because it has 'unlocks: - STR_AQUA_PLASTICS'? Or does negating one negate the other?
If a research has a "needItem: true", it simply means that this item needs to be in storage for the research to be available. It is in addition to other dependencies or requirements, which also have to be met. If you have the item in storage when the project's last dependency is satisfied, you should get the "We can now research" popup. If you didn't, but later on acquire one, you will never get a popup but it will be there next time you check after acquiring the item.
If you were you add "needItem: true" to the vibro blade, you would need to research a calcinite corpse, and then, then next time you go in the lab while having a vibro blade in your storage, you will see the research topic.
Note that this doesn't work in this case, since aliens don't use the vibro blade, so you will never have one in storage before you made one, but you will never make one before researching it, but you will never research it before having one, etc.
As I mentioned before, I would otherwise have deleted the whole project and redefined it straight away.
If a research "unlocks" something, you will usually see it as a dependency for the projects it unlocks. This is done because otherwise, the unlocked project would have no dependency so could be researched from the beginning.
In this case, since there is only one project that can unlock Aqua Plastics, I honestly don't see why the corpse would need to unlock it. As soon as the Deep-One Corpse project is finished, all (of one) dependencies of Aqua Plastics have been satisfied and it should become available any ways.
If you remove the dependency, you should also remove the unlock, yes. More for simplicity and "cleanliness" than because it is needed in this case, but in others where there could be new dependencies defined, having an odd unlock will probably still unlock the project and mess up your research tree.
EDIT: just to be clear, STR_CALCINITE_CORPSE would mean just having a corpse in storage, correct? Not the same as STR_CALCINITE_AUTOPSY.uh?! If you have a project that has:
- name: STR_VIBRO_BLADE
dependencies:
- STR_CALCINITE_CORPSE
needItem: true
Are you sure about that? Maybe it's because I have never played vanilla TFTP, only TFTDextender, but I am 100% certain aliens do carry drill-type weapons quite a lot. In fact, I've gotten all 3 types of drills way before I even begun research on them.
Well, that may perhaps be less troublesome! So, I do ask you again, just to have an idea, what would you do code-wise to delete the project and then redefine it? I still don't quite see how it should look like in my mind. An example would be appreciated :)
- delete: STR_AQUA_PLASTICS
- name: STR_AQUA_PLASTICS
cost: 400
points: 30
needItem: true[/quote]
I believe that what you said is better, so knowing that now, I would do:
[code]- name: STR_AQUA_PLASTICS
dependencies: []
In order to research the vibroblade, you do not need to have a calcinite corpse at your base, but you need to already have researched a calcinite corpse (which is different from getting a calcinite autopsy article from an alien medic, you need to have researched the actual corpse). You also need to have a vibroblade in your storage at the base.
- delete: STR_AQUA_PLASTICS
- name: STR_AQUA_PLASTICS
cost: 400
points: 30
needItem: true
- name: STR_AQUA_PLASTICS
dependencies: []
- name: STR_AQUA_PLASTICS
dependencies: []
- STR_SONIC_PISTOL
- name: STR_MAGNETIC_NAVIGATION
cost: 450
points: 30
needItem: true
- name: STR_ION_BEAM_ACCELERATORS
cost: 450
needItem: true
That doesn't look bad at all. I was worried the second would conflict with the first and get itself deleted too :P
By the way, does it matter in which order they are listed? What if you did "delete: STR_ID" after "name: STR_ID"? Or is "delete" just removing the previous/older iteration (which would be found in the base ruleset) regardless?
- name: STR_AQUA_PLASTICS
dependencies: []
- delete: STR_AQUA_PLASTICS
And if I did the above to replace old dependencies for new ones, would it still work? Like this:If you define new dependencies, they automatically replace the previous one. So if you want the sonic pistol to replace the corpse, all you need to do is:Code: [Select]- name: STR_AQUA_PLASTICS
dependencies: []
- STR_SONIC_PISTOL
Would that cancel out Deep-One Corpse and add in Sonic Pistol?
Or perhaps I should just stick to the good ol' "delete: STR_ID" method!
- name: STR_AQUA_PLASTICS
dependencies:
- STR_SONIC_PISTOL
- name: STR_AQUA_PLASTICS
dependencies:
- STR_DEEP_ONE_CORPSE
- STR_SONIC_PISTOL
I do have totally different question now: when I change weapon stats, does that reflect in the corresponding UFOpedia entry or do I have to update the UFOpedia file separately? Like, if I change Dart Gun's meager power value of 16 to 24 or whatever, would UFOpaedia show this?The UFOPaedia section of the game is very well done and goes to get all its own data. If you change stats (or pictures) of an already existing item, the UFOPaedia article will automatically load the new data. Nothing to else to do. The only exception is for things like weight, which are NOT displayed generally but some modders add it to the flavour text. If you do that and then change the weight, you need to update the flavour text yourself.
PS: One more question. Does 'unlock' override 'needItem'? Or do I still need to have said item before 'unlock' can come into effect? For example, Sonic Pistol could have Zrbite, Aqua Plastics and Gilman dependencies while research on Gilman Corpse can independently 'unlock' Sonic Pistol. But if Sonic Pistol has 'needItem', does Gilman Corpse research till 'unlock' it or do I have to have Sonic Pistol first?
- name: STR_ITEM_C
dependencies:
- STR_PROJECT_A
- STR_PROJECT_B
needItem: true
- name: STR_PROJECT_B
unlocks:
- STR_ITEM_C
Researching project B will make item C researchable even if you haven't completed project A, but you will still need to have item C in your storage, otherwise the project will not show up. All that unlocks does is get rid of dependencies if there is no require.
Good catch on the research. It does not seem to have been corrected. For reference, if you want to see the most up to date code without having to update, you can go to the git repository and look there for the ruleset in bin/standard/xcom2.
- name: STR_COELACANTH_GAUSS #Coelacanth/Gauss #
requires:
- STR_GAUSS_CANNON
Fabulous. Well, I believe you've answered all my questions!
Now, you wouldn't happen to know how AP, HE & Incendiary/Phosphorous actually differ from each other, would you? :P To make it simple: what does more damage; an AP round of power value 60, an HE round of 60, or a In/Ph round of 60? (I'm asking about direct hit damage—AOE or subsequent fire damage aside.)
Oh, actually: this is not terribly important, but can I use two getOneFree's in order to unlock 2 random UFO files at a time, as an example, instead of just 1? Or would they come in conflict with each other? I wouldn't think there'd be a problem, but just to be sure.
And would you happen to know where the repair, fuel, rearm order for crafts is located? I haven't been able to find it...
If I wanted to remove the New Fighter Flying Sub from Coelacanth/Gauss' dependencies (to make it more worthwhile), but leave Gauss Cannon intact, would this do it?You mean in the manufacture section I guess? Yes, that should work. The option to manufacture the Coelacanth should pop when you research the gauss canon. Note that you will need to also change the dependencies of the USOPaedia article if you want to get that at the same time.Code: [Select]- name: STR_COELACANTH_GAUSS #Coelacanth/Gauss #
requires:
- STR_GAUSS_CANNON
In other words: whatever I list under 'requires' (even if multiple items, or same items as the base ruleset but with additions or omissions) would override the 'requires' found in the base ruleset, correct?
With the TftD damage rule, both AP and Explosives do 50% to 150% of listed damage on impact (at ground zero for the explosive, which also means it is hitting under armor instead of whatever facing was hit). That means 30 to 90 damage on hit (neglecting damage modifiers and armor).
With EU damage rule, AP does 0% to 200% damage, so 0 to 120 damage for your 60 listed power. By opposition, explosives still do 50% to 150% damage. On average, they both do 60, in practice, the HE is a lot more reliable, especially since at ground zero it is hitting under armor which is generally lower.
For both formulas, In/Ph rounds do variable damage on hit, about 6 on average, and will do damage over time. The only thing that the listed power does is determine the size of the area to be covered in fire.
No, getOneFree will be executed once, and if you have two defined in the ruleset the second should overwrite the first. It's not getTwoFree :P
I believe that this is hard coded.
You mean in the manufacture section I guess? Yes, that should work. The option to manufacture the Coelacanth should pop when you research the gauss canon. Note that you will need to also change the dependencies of the USOPaedia article if you want to get that at the same time.
It is a bit different since the coelacanth does not have its own research project. If it did, with dependencies on the cannon and sub construction, and both the manufacture and UFOPaedia had depended on that research topic, all you would have had to do is change the dependencies, but alas ;)
compatibleAmmo:
- STR_DISRUPTOR_AMMO
accuracyAimed: 120
tuAimed: 66
battleType: 1
- type: STR_DISPLACER_SONIC
size: 6
costSell: 980000
transferTime: 96
bigSprite: 54
bulletSprite: 8
fireSound: 36
hitSound: 31
power: 110
damageType: 5
Alright, that answers everything pretty nicely! I was aware of the 50-150% of TFTD and the 0-200% of EU. Also knew HE's quirk (other than AOE) is that it hits under armor (which is usually weaker). I did not understand how In/Ph worked, though. The damage value is quite misleading! No wonder I couldn't kill anything with Phosphorous when I first played TFTD! So there's basically little benefit other than illuminating big patches of terrain with it, right? It's not like you can count on 6 points of damage per turn to kill the enemy for you... (which is a shame, because I would have wanted it to have a more compelling reason to actually be useful)Fire can be useful, there is a thread somewhere where we were discussing it recently. Fire damage ignores armor (but not damage modifiers), so if you have a 2x2 unit that is not immune to fire, that's ~24 damage per hit which is sometimes more than you can deal otherwise (a good example being sectopods), and it can work really well against reapers. For pure damage dealing in general though, it is indeed not great unless you have a weapon with lots of shots per turn. That's what the flamethrower mods do and it allows you to get a nice arc spread around your target too.
And while I'm at it, I might as well ask: does smoke damage (like making Dye Grenade do 60 smoke damage instead of 10) also determine blast radius, or is there something else to it? Actually, is there any smoke health damage at all, or is does it only build up stunning over time? I'm a bit confused now since armor's damage modifiers do list smoke as if a unit could be strong/weak against it somehow. I can understand 0.0 would mean totally invulnerable, but to what exactly? In other words, what does smoke really do, damage-wise?The power listing of smoke is also for the area (and I think the smoke density. Not all smoked tiles are equal. (https://www.ufopaedia.org/index.php?title=Smoke#Visual_range)). The damage done is 1-3/turn and only affected by the damage multiplier. So if an armor (ex.: Power Suit) has 0%, they don't get that tiny damage. In Piratez, most armors are well above 100% and unarmored units are at 400%, which now deals 4-12 per turn and you'll get soldiers passing out if standing in the smoke. It's just that the vanilla values are very small so it's kind of a non-issue.
Ah, would've been nice if it worked. On a tangential note, can 2 or more UFOpaedia articles pop-up at the same time? For example, you research an Aquatoid Medic and get the Aquatoid UFOpaedia entry proper (provided you never research any Aquatoid before) + some random autopsy due to the Medic's 'geOneFree'? Does this happen or do you get both unlocked but just one pops up? I do not recall getting any more than one at once...I'm pretty sure you will get the aquatoid entry and also something from getOneFree. An example is researching an engineer where you get the race and also some other stuff, usually UFO stats or something.
I do not know where I had read this, but I remember refuel, repair and rearming priorities could be re-ordered...?I think someone altered the code to enable this at some point, at my request even. To change it to Rearm, Refuel, Repair so they are completed from fastest to longest. But I don't know of an option for that (even though I would like it rather than having to change the code).
Well, I've exhausted all my questions for now! I should be back with some mOrz later :PReally? I wonder how long I'll have to wait :P But you're welcome all the same ;) I figure it's worth it to help new modders, since then we all get some new mods :D
Thanks for all the help.
Fire damage ignores armor (but not damage modifiers), so if you have a 2x2 unit that is not immune to fire, that's ~24 damage per hit which is sometimes more than you can deal otherwise
The power listing of smoke is also for the area (and I think the smoke density. Not all smoked tiles are equal.). The damage done is 1-3/turn and only affected by the damage multiplier.
I'm pretty sure you will get the aquatoid entry and also something from getOneFree. An example is researching an engineer where you get the race and also some other stuff, usually UFO stats or something.
I think someone altered the code to enable this at some point, at my request even. To change it to Rearm, Refuel, Repair so they are completed from fastest to longest. But I don't know of an option for that (even though I would like it rather than having to change the code).
As for your USOPaedia questions, you're sure you're comparing the picture with the ruleset that generated it? If so, that's really weird.. Or are you comparing your picture (with a dated, wrong ruleset, it seems) with the new ruleset from Github (where it would have been fixed)?
Notes
The UFOpedia.orgrmation on the power of the Displacer/Sonic's weapon is incorrect. Its true power is 110.
ufopaedia:
- id: STR_PARTICLE_DISTURBANCE_SENSOR
requires: ""
- id: STR_MEDI_KIT
requires: ""
research:
- delete: STR_PARTICLE_DISTURBANCE_SENSOR
- delete: STR_MEDI_KIT
manufacture:
- delete: STR_PARTICLE_DISTURBANCE_SENSOR #Particle Disturbance Sensor #
- delete: STR_MEDI_KIT #Medi-Kit #
- delete: STR_PARTICLE_DISTURBANCE_SENSOR
- id: STR_PARTICLE_DISTURBANCE_SENSOR
type_id: 14
section: STR_WEAPONS_AND_EQUIPMENT
text: STR_PARTICLE_DISTURBANCE_SENSOR_UFOPEDIA
image_id: UP030.BDY
- delete: STR_MEDI_KIT
- id: STR_MEDI_KIT
type_id: 14
section: STR_WEAPONS_AND_EQUIPMENT
text: STR_MEDI_KIT_UFOPEDIA
image_id: UP052.BDY
Alright, but to be clear: this is stun-damage only, correct?Yes.
Perhaps I should have phrased my question somewhat differently. What I meant to ask was: I know the two entries will be added to the UFOpedia, but will they pop-up on screen, one first, then the other (immediately after you exit the first one)? Or will the game just notify you for the first unlocked entry only?Yeah, as far as I know you get them back to back. It just doesn't happen very often since you only need STR_SECTOID once, and you likely got it from a soldier which doesn't give anything else, and then when you research a sectoid medic or engineer, you only get the "bonus" one, since you already have STR_SECTOID.
It's a bit of a silly question, I know. I just do not remember getting two UFOpedia entries simultaneously.
No, that's a screencap from the vanilla game. Sure, it may be fixed now. Regardless, why would the actual data state 110 and UFOpedia 130? I mean, I'm just asking because I want to be absolutely sure that any changes I make to items will be automatically reflected in UFOpedia without me needing to go out of my way and be on the lookout for any errors!Are you trying to say that the ruleset should follow the vanilla screencap? If you don't identify what you show, it is very difficult to understand you. This screenshot could have come from OpenXCom (any version of it) and that code snippet could be from any ruleset too. If you don't say anything, the assumption is that they are from the same version, which they weren't.
About researching Aliens, you can do nice stuff with dependencies and such.
in some cases, "" won't work, because it's adding to an array rather than replacing a string, so you need to delete and redefine.
Are you trying to say that the ruleset should follow the vanilla screencap? If you don't identify what you show, it is very difficult to understand you. This screenshot could have come from OpenXCom (any version of it) and that code snippet could be from any ruleset too. If you don't say anything, the assumption is that they are from the same version, which they weren't.
As you showed, the coelacanth had power 110 wrongly displayed, so OpenXCom devs decided to give the coelacanth the same power, but OpenXCom works better than the original and displays the right info. As far as I can tell, it always displays exactly the info there. The UFOPaedia in OpenXCom will pull its values from the ruleset it uses.
extraStrings:
STR_TASOTH_COMMANDER: "Tasoth Commander"
Unfortunately, the game isn't clever enough to realize that it is of race Tasoth and rank Commander and so should be displayed as "Tasoth Commander" You need to define what to display for STR_TASOTH_COMMANDER in the extraStrings section.
extraStrings:
- type: en-US
strings:
STR_ID: Name
- type: STR_ALIEN_RESEARCH
points: 0
raceWeights:
0:
STR_SECTOID: 70
STR_SNAKEMAN: 10
STR_FLOATER: 20
- type: STR_ALIEN_RESEARCH
raceWeights:
0:
STR_ANTHROPOD: 10
- type: recurringTerror
missionWeights:
0:
STR_ALIEN_TERROR: 100
you'll have to alter the raceweights to remove floaters from the table, you might have to delete stuff first
alienRaces:
- delete: STR_FLOATER
- delete: STR_SNAKEMAN
alienRaces:
- id: STR_FLOATER
members: ""
- id: STR_SNAKEMAN
members: ""
as for the armor, there are two written forms, STR_SOME_ARMOR and STR_SOME_ARMOR_UC (UC standing for UPPER CASE)
alienRaces:
- id: STR_FLOATER
members: ""
- id: STR_SNAKEMAN
members: ""
alienRaces:
- id: STR_FLOATER
members:
- STR_MUTON_COMMANDER
- id: STR_SNAKEMAN
members:
- STR_MUTON_COMMANDER
alienMissions:
- type: STR_ALIEN_RESEARCH
points: 0
raceWeights:
0:
STR_SECTOID: 70
STR_GAZER: 10
STR_WASPITE: 20
- type: STR_ALIEN_RESEARCH
points: 0
raceWeights:
0:
STR_SECTOID: 70
STR_GAZER: 10
STR_WASPITE: 20
STR_SNAKEMAN: 0
STR_FLOATER: 0
PS: Out of curiosity now, why is it that if I evade or abort a terror site, all UFO activity ceases next month and the only thing that occurs is another terror attack?
gonna put that down to confirmation bias. there probably are UFOs that you're simply not detecting.
you can check this at any time by making a save and opening it in a text editor to see how many UFOs are in flight/etc.
research:
- name: STR_HOVERTANK_PLASMA
cost: 450
points: 15
dependencies:
- STR_HEAVY_PLASMA_CLIP
- STR_NEW_FIGHTER_CRAFT
units:
- type: STR_DEEP_ONE_TERRORIST
race: STR_DEEP_ONE
rank: STR_LIVE_TERRORIST
stats:
tu: 50
stamina: 90
health: 35
bravery: 90
reactions: 55
firing: 50
throwing: 58
strength: 40
psiStrength: 50
psiSkill: 0
melee: 70
armor: DEEP_ONE_ARMOR0
standHeight: 21
kneelHeight: 16
value: 12
deathSound: 56
intelligence: 4
aggression: 2
livingWeapon: true
units:
- type: STR_DEEP_ONE_TERRORIST
race: STR_DEEP_ONE
rank: STR_LIVE_TERRORIST
stats:
tu: 50
stamina: 90
health: 35
bravery: 90
reactions: 55
firing: 50
throwing: 58
strength: 40
psiStrength: 50
psiSkill: 0
melee: 70
armor: DEEP_ONE_ARMOR0
standHeight: 21
kneelHeight: 16
value: 12
deathSound: 56
intelligence: 4
aggression: 2
livingWeapon: true
Copy-pasting will not save you from the modding issues (https://openxcom.org/forum/index.php/topic,3287.msg50713.html#msg50713), as they are still separate mods and the game will judge them differently. It could be anything as simple as a death sound or object sprite falling into the danger zone.
research:
- name: STR_TANK_LASER_CANNON
cost: 300
points: 15
dependencies:
- STR_HEAVY_LASER
- name: STR_HOVERTANK_PLASMA
cost: 450
points: 15
dependencies:
- STR_HEAVY_PLASMA_CLIP
- STR_NEW_FIGHTER_CRAFT
- name: STR_HOVERTANK_LAUNCHER
cost: 500
points: 15
dependencies:
- STR_BLASTER_BOMB
- STR_NEW_FIGHTER_CRAFT
research:
- name: STR_ALIEN_CONTAINMENT
cost: 300
points: 25
dependencies:
- STR_ALIEN_FOOD
- STR_ALIEN_REPRODUCTION
Should be fixed now.
- name: STR_THE_LATEST_FLYING_SUB
cost: 900
points: 30
requires:
- STR_NEW_FIGHTER_TRANSPORTER
dependencies:
- STR_THE_LATEST_FLYING_SUB_DEP
- name: STR_THE_LATEST_FLYING_SUB_DEP
cost: 0
dependencies:
- STR_AQUATOID_COMMANDER
- STR_AQUATOID_NAVIGATOR
- STR_AQUATOID_TECHNICIAN
- STR_GILLMAN_COMMANDER
- STR_GILLMAN_NAVIGATOR
- STR_GILLMAN_TECHNICIAN
- STR_TASOTH_COMMANDER
- STR_TASOTH_NAVIGATOR
- STR_TASOTH_TECHNICIAN
- STR_LOBSTERMAN_COMMANDER
- STR_LOBSTERMAN_NAVIGATOR
- STR_LOBSTERMAN_TECHNICIAN
- name: STR_THE_LATEST_FLYING_SUB
cost: 900
points: 30
dependencies:
- STR_NEW_FIGHTER_TRANSPORTER
- STR_LOBSTERMAN_COMMANDER
- name: STR_THE_LATEST_FLYING_SUB
cost: 900
points: 30
dependencies:
- STR_NEW_FIGHTER_TRANSPORTER
- STR_AQUATOID_NAVIGATOR
- name: STR_ULTIMATE_CRAFT
cost: 900
points: 30
dependencies:
- STR_NEW_FIGHTER_TRANSPORTER
- STR_ULTIMATE_CRAFT_DEP
- name: STR_ULTIMATE_CRAFT_DEP
cost: 0
dependencies:
- STR_SECTOID_COMMANDER
- STR_SECTOID_LEADER
- STR_SECTOID_ENGINEER
- STR_WASPITE_COMMANDER
- STR_WASPITE_LEADER
- STR_WASPITE_ENGINEER
- STR_GAZER_COMMANDER
- STR_GAZER_LEADER
- STR_GAZER_ENGINEER
- STR_ANTHROPOD_COMMANDER
- STR_ANTHROPOD_LEADER
- STR_ANTHROPOD_ENGINEER
- STR_MUTON_COMMANDER
- STR_MUTON_LEADER
- STR_MUTON_ENGINEER
- STR_ETHEREAL_COMMANDER
- STR_ETHEREAL_LEADER
- STR_ETHEREAL_ENGINEER
- delete: STR_THE_LATEST_FLYING_SUB
- name: STR_THE_LATEST_FLYING_SUB
cost: 900
points: 30
dependencies:
- STR_NEW_FIGHTER_TRANSPORTER
- STR_THE_LATEST_FLYING_SUB_DEP
The first line "- delete: STR_THE_LATEST_FLYING_SUB" removes the topic from the game. After that you can re-add it with new dependencies.
This will also delete the original pre-counted listorder for this item. You can sort it again by adding the listorder parameter.
I had much trouble with the "required" parameter already too and try to avoid it.
use the listOrder
PS: Just to be clear, it's the "requires" field which doesn't work, not the dependencies. Don't worry about it, it's not that big of a deal, I'll just keep dependencies instead. I just wanted dependencies to come into effect only after the requirement was fulfilled, just a fastidious little detail :P
PS: On that note, it would be nice if a TFTD' list order was released sometime on https://ufopaedia.org. Figuring out that the vanilla (UFO/EU) listing is here altered by the introduction of 7 new items (Craft Gauss Shells, the 3 Gauss Clips, and the 3 Drills) can be a bit tricky ;P
My personal opinion on the 'required' flag, based on almost 2 years of modding OXCOM... avoid it like fire ;)I feel the same way about research.
It's a shame the listOrder for vanilla items is taken from "somewhero elso" instead of being written down in the ruleset, where it belongs. The best solution for a large mod is to add listorders for everything - lots of work but saves a lot of effort later.If you wanna write down the listOrder for over a hundred items by hand be my guest, I'd rather let a computer do it for me. :P
If you wanna write down the listOrder for over a hundred items by hand be my guest, I'd rather let a computer do it for me. :P
If a research has a "needItem: true", it simply means that this item needs to be in storage for the research to be available. It is in addition to other dependencies or requirements, which also have to be met. If you have the item in storage when the project's last dependency is satisfied, you should get the "We can now research" popup. If you didn't, but later on acquire one, you will never get a popup but it will be there next time you check after acquiring the item.Sure - the Sectoid Corpse has "needItem: true", and I have the item in storage all the time, but nothing changed in terms of dependencies, or storage...
I'm pretty sure live aliens are exempt from normal research limitations. You can always interrogate them.
I did as you suggested, made the containment research depend on the several alien autopsies, and made each autopsy unlock it.
However, now when I research the first corpse (which yields an autopsy), I no longer get the "We can now research Alien Containment" message... but the research is available once I go back to the Lab interface.
Either:Or both :)
(a) corpses should be "unlinked" from being erroneously triggered for research by the research topic under which they are listed as dependencies, or
(b) autopsies should correctly trigger the "we can now research" message for whatever research topic they are unlocking.
the divide between the corpses and the autopsies is intentional - medics will unlock certain autopsies, but they won't grant any associated research, whereas the corpse itself will still be available, and WILL.
for example: deep ones.
if you capture an aquatoid medic, he might give you information on live deep ones, but that won't give you access to aqua plastics, you still need to go out and get a physical sample.
- name: STR_ALIEN_THINGAMAJIG
dependencies:
STR_ALIEN_CORPSE
- name: STR_ALIEN_MEDIC
getOneFree:
STR_ALIEN_AUTOPSY
- name: STR_ALIEN_THINGAMAJIG
dependencies:
STR_ALIEN_AUTOPSY
I'm pretty sure live aliens are exempt from normal research limitations. You can always interrogate them.
Always unlocks one. Usage of 'getOneFree' also has a side effect which is that the research topic will always be available for research, even with dependencies.
musics:
- type: LIGHTNINGWAR
normalization: 1.00
- type: STR_BASE_DEFENSE
music:
- type: LIGHTNINGWAR
Usage of 'getOneFree' also has a side effect which is that the research topic will always be available for research, even with dependencies.
PS: I'll be necroing a few posts to let modders know what's new.
It would also be useful to update the UFOPaedia.org page regarding the Nightlies ruleset to include the new functionalities and what they allow