Author Topic: Editing Research Tree in OpenXCom: "dependencies" with "getOneFree"  (Read 21579 times)

Offline Hedron

  • Sergeant
  • **
  • Posts: 16
    • View Profile
I has encountered a problem when I tried to change Research Tree like that:


If I try do like this:
Code: [Select]
  - name: STR_AQUATOID_SOLDIER
    cost: 192
    points: 50
    lookup: STR_AQUATOID
    needItem: true
    unlocks:
      - STR_ALIEN_ORIGINS
    dependencies:
      - STR_AQUATOID_CORPSE
      - STR_MC_READER
  - name: STR_AQUATOID_MEDIC
    cost: 192
    points: 50
    needItem: true
    getOneFree:
      - STR_CALCINITE
      - STR_HALLUCINOID
      - STR_DEEP_ONE
      - STR_XARQUID
      - STR_TENTACULAT
      - STR_BIODRONE
      - STR_TRISCENE
    dependencies:
      - STR_AQUATOID_SOLDIER
– Aquatoid Medic appears in Research List when he appears in the Alien Containment (parameter "dependencies" is ignored).

When I try use "requires":
Code: [Select]
  - name: STR_AQUATOID_SOLDIER_DEP
    cost: 0
    dependencies:
      - STR_AQUATOID_CORPSE
      - STR_MC_READER
  - name: STR_AQUATOID_SOLDIER
    cost: 192
    points: 50
    lookup: STR_AQUATOID
    needItem: true
    unlocks:
      - STR_ALIEN_ORIGINS
      - STR_AQUATOID_SQUAD_LEADER
      - STR_AQUATOID_MEDIC
      - STR_AQUATOID_TECHNICIAN
      - STR_AQUATOID_NAVIGATOR
    dependencies:
      - STR_AQUATOID_CORPSE
      - STR_MC_READER
  - name: STR_AQUATOID_MEDIC
    cost: 192
    points: 50
    needItem: true
    getOneFree:
      - STR_CALCINITE
      - STR_HALLUCINOID
      - STR_DEEP_ONE
      - STR_XARQUID
      - STR_TENTACULAT
      - STR_BIODRONE
      - STR_TRISCENE
    dependencies:
      - STR_AQUATOID_SOLDIER
    requires:
      - STR_AQUATOID_SOLDIER_DEP
– Aquatoid Medic do not appears in Research List when researching Aquatoid Soldier was completed.

How can I solve this problem?

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: Editing Research Tree in OpenXCom: "dependencies" with "getOneFree"
« Reply #1 on: April 25, 2016, 05:48:37 pm »
You either use 'requires' or 'dependencies' - the difference between both is subtle (requires is more restrictive - check the wiki for more details) but they are designed to be used separately.

Offline Hedron

  • Sergeant
  • **
  • Posts: 16
    • View Profile
Re: Editing Research Tree in OpenXCom: "dependencies" with "getOneFree"
« Reply #2 on: April 25, 2016, 06:44:36 pm »
You either use 'requires' or 'dependencies' - the difference between both is subtle (requires is more restrictive - check the wiki for more details) but they are designed to be used separately.
'Requires' NEVER USED WITHOUT 'dependencies' – you may see it itself in research.rul.

In any case, I tried use 'requires' without 'dependencies':
Code: [Select]
  - name: STR_AQUATOID_SOLDIER
    cost: 192
    points: 50
    lookup: STR_AQUATOID
    needItem: true
    unlocks:
      - STR_ALIEN_ORIGINS
      - STR_AQUATOID_SQUAD_LEADER
      - STR_AQUATOID_MEDIC
      - STR_AQUATOID_TECHNICIAN
      - STR_AQUATOID_NAVIGATOR
    dependencies:
      - STR_AQUATOID_CORPSE
      - STR_MC_READER
  - name: STR_AQUATOID_MEDIC
    cost: 192
    points: 50
    needItem: true
    getOneFree:
      - STR_CALCINITE
      - STR_HALLUCINOID
      - STR_DEEP_ONE
      - STR_XARQUID
      - STR_TENTACULAT
      - STR_BIODRONE
      - STR_TRISCENE
    requires:
      - STR_AQUATOID_SOLDIER
– Aquatoid Medic DOES NOT APPEAR in the research-list after the research Aquatoid Soldier.

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: Editing Research Tree in OpenXCom: "dependencies" with "getOneFree"
« Reply #3 on: April 25, 2016, 07:13:03 pm »
'Requires' NEVER USED WITHOUT 'dependencies' – you may see it itself in research.rul.

Thanks for the correction, in any case as you might see 'requires' is only used for the storyline research topics in both xcom1 and xcom2 and I would discourage using it since you can get the same effect with 'dependencies' without using 'requires', which is more complicated to use.

Quote
In any case, I tried use 'requires' without 'dependencies':
Code: [Select]
  - name: STR_AQUATOID_SOLDIER
    cost: 192
    points: 50
    lookup: STR_AQUATOID
    needItem: true
    unlocks:
      - STR_ALIEN_ORIGINS
      - STR_AQUATOID_SQUAD_LEADER
      - STR_AQUATOID_MEDIC
      - STR_AQUATOID_TECHNICIAN
      - STR_AQUATOID_NAVIGATOR
    dependencies:
      - STR_AQUATOID_CORPSE
      - STR_MC_READER
  - name: STR_AQUATOID_MEDIC
    cost: 192
    points: 50
    needItem: true
    getOneFree:
      - STR_CALCINITE
      - STR_HALLUCINOID
      - STR_DEEP_ONE
      - STR_XARQUID
      - STR_TENTACULAT
      - STR_BIODRONE
      - STR_TRISCENE
    requires:
      - STR_AQUATOID_SOLDIER
– Aquatoid Medic DOES NOT APPEAR in the research-list after the research Aquatoid Soldier.

Replace 'requires' with 'dependencies'. And you'll need to have a Aquatoid Medic on Alien Containment (since needItem: true) after you research Aquatoid Soldier
« Last Edit: April 25, 2016, 07:14:47 pm by Hobbes »

Offline Hedron

  • Sergeant
  • **
  • Posts: 16
    • View Profile
Re: Editing Research Tree in OpenXCom: "dependencies" with "getOneFree"
« Reply #4 on: April 26, 2016, 02:01:02 am »
I would discourage using it since you can get the same effect with 'dependencies' without using 'requires', which is more complicated to use.
Replace 'requires' with 'dependencies'. And you'll need to have a Aquatoid Medic on Alien Containment (since needItem: true) after you research Aquatoid Soldier
The fact of the problem is that when using 'GetOneFree' with 'Dependencies' – parameter 'Dependencies' IS IGNORED! (IMHO it should not be, but so it is)
So, in this case, it will be possible to research Aquatoid Medic without researching Aquatoid Soldier.

« Last Edit: April 26, 2016, 02:04:20 am by Hedron »

Offline hellrazor

  • Commander
  • *****
  • Posts: 2025
  • Deep Ruleset Digger & Bughunter
    • View Profile
    • Github Account
Re: Editing Research Tree in OpenXCom: "dependencies" with "getOneFree"
« Reply #5 on: April 27, 2016, 12:38:21 am »
Correct usage of "dependencies" and "requires":

Code: [Select]
#BEGIN WIN THE GAME
#listOrder: 10-29
  - name: STR_THE_ALIEN_THREAT
    cost: 200
    points: 20
    listOrder: 10
  - name: STR_ALIEN_INVASION
    cost: 500
    points: 40
    dependencies:
      - STR_THE_ALIEN_THREAT
      - STR_ALIEN_DATA_SLATE
      - STR_ALIEN_INVASION_UNLOCK
    listOrder: 11
  - name: STR_ALIEN_INVASION_UNLOCK
    requires:
      - STR_THE_ALIEN_THREAT
    dependencies: &ALL_ALIVE_ALIENS
      - STR_FLOATER_SOLDIER
      - STR_FLOATER_NAVIGATOR
      - STR_FLOATER_MEDIC
      - STR_FLOATER_ENGINEER
      - STR_FLOATER_LEADER
      - STR_FLOATER_COMMANDER
      - STR_SECTOID_SOLDIER
      - STR_SECTOID_NAVIGATOR
      - STR_SECTOID_MEDIC
      - STR_SECTOID_ENGINEER
      - STR_SECTOID_LEADER
      - STR_SECTOID_COMMANDER
      - STR_SNAKEMAN_SOLDIER
      - STR_SNAKEMAN_NAVIGATOR
      - STR_SNAKEMAN_ENGINEER
      - STR_SNAKEMAN_LEADER
      - STR_SNAKEMAN_COMMANDER
      - STR_MUTON_SOLDIER
      - STR_MUTON_NAVIGATOR
      - STR_MUTON_ENGINEER
      - STR_WASPITE_SOLDIER
      - STR_WASPITE_NAVIGATOR
      - STR_WASPITE_MEDIC
      - STR_WASPITE_ENGINEER
      - STR_WASPITE_LEADER
      - STR_WASPITE_COMMANDER
      - STR_GAZER_SOLDIER
      - STR_GAZER_NAVIGATOR
      - STR_GAZER_MEDIC
      - STR_GAZER_ENGINEER
      - STR_GAZER_LEADER
      - STR_GAZER_COMMANDER
      - STR_SECTOID_ELITE_SOLDIER
      - STR_SECTOID_ELITE_NAVIGATOR
      - STR_SECTOID_ELITE_MEDIC
      - STR_SECTOID_ELITE_ENGINEER
      - STR_SECTOID_ELITE_LEADER
      - STR_SECTOID_ELITE_COMMANDER
      - STR_MUTON_ELITE_SOLDIER
      - STR_MUTON_ELITE_NAVIGATOR
      - STR_MUTON_ELITE_ENGINEER
      - STR_MUTON_ELITE_LEADER
      - STR_ETHEREAL_SOLDIER
      - STR_ETHEREAL_LEADER
      - STR_ETHEREAL_COMMANDER
      - STR_MUTON_ELITE_GUARD_SOLDIER
      - STR_MUTON_ELITE_GUARD_ENGINEER
      - STR_MUTON_ELITE_GUARD_LEADER
      - STR_SILACOID_TERRORIST
      - STR_REAPER_TERRORIST
      - STR_CYBERDISC_TERRORIST
      - STR_CHRYSSALID_TERRORIST
      - STR_SECTOPOD_TERRORIST
      - STR_CELATID_TERRORIST
      - STR_MUTON_BERSERKER_TERRORIST
      - STR_CYBERMITE_TERRORIST
      - STR_HOLODRONE_TERRORIST
      - STR_ARMORED_CYBERDISC
      - STR_ARMORED_SECTOPOD
      - STR_CHRYSSALID_SPITTER_TERRORIST
    listOrder: 12
  - delete: STR_ALIEN_ORIGINS
  - name: STR_ALIEN_ORIGINS
    cost: 1000
    points: 60
    dependencies:
      - STR_LEADER_PLUS
    listOrder: 13
  - delete: STR_LEADER_PLUS
  - name: STR_LEADER_PLUS
    requires:
      - STR_ALIEN_INVASION
    dependencies:
      - STR_FLOATER_LEADER
      - STR_FLOATER_COMMANDER
      - STR_SECTOID_LEADER
      - STR_SECTOID_COMMANDER
      - STR_SNAKEMAN_LEADER
      - STR_SNAKEMAN_COMMANDER
      - STR_WASPITE_LEADER
      - STR_WASPITE_COMMANDER
      - STR_GAZER_LEADER
      - STR_GAZER_COMMANDER
      - STR_SECTOID_ELITE_LEADER
      - STR_SECTOID_ELITE_COMMANDER
      - STR_MUTON_ELITE_LEADER
      - STR_ETHEREAL_LEADER
      - STR_ETHEREAL_COMMANDER
      - STR_MUTON_ELITE_GUARD_LEADER
    listOrder: 14
  - name: STR_THE_MARTIAN_SOLUTION
    cost: 2000
    points: 60
    dependencies:
      - STR_COMMANDER_PLUS
    listOrder: 15
  - name: STR_COMMANDER_PLUS
    unlocks:
      - STR_THE_MARTIAN_SOLUTION
    requires:
      - STR_ALIEN_ORIGINS
    dependencies:
      - STR_FLOATER_COMMANDER
      - STR_SECTOID_COMMANDER
      - STR_SNAKEMAN_COMMANDER
      - STR_WASPITE_COMMANDER
      - STR_GAZER_COMMANDER
      - STR_SECTOID_ELITE_COMMANDER
      - STR_ETHEREAL_COMMANDER
    listOrder: 16
  - delete: STR_CYDONIA_OR_BUST
  - name: STR_CYDONIA_OR_BUST
    cost: 3000
    points: 100
    unlockFinalMission: true
    dependencies:
      - STR_CYDONIA_PLUS
    listOrder: 17
  - name: STR_CYDONIA_PLUS
    unlocks:
      - STR_CYDONIA_OR_BUST
    requires:
      - STR_THE_MARTIAN_SOLUTION
    dependencies:
      - STR_ETHEREAL_COMMANDER
    listOrder: 18
#END WIN THE GAME

Correct usage of "dependencies", "requires", "unlock" and "getOneFree"

Code: [Select]
#BEGIN FLOATERS
#listOrder: 800-899
  - delete: STR_FLOATER_SOLDIER
  - delete: STR_FLOATER_MEDIC
  - delete: STR_FLOATER_ENGINEER
  - delete: STR_FLOATER_NAVIGATOR
  - delete: STR_FLOATER_LEADER
  - delete: STR_FLOATER_COMMANDER
  - name: STR_FLOATER
    listOrder: 800
  - name: STR_FLOATER_SOLDIER
    cost: 288
    points: 50
    needItem: true
    listOrder: 801
    lookup: STR_FLOATER
    unlocks:
      - STR_ALIEN_LANGUAGE_UNLOCK
      - STR_ALIEN_INVASION_UNLOCK
  - name: STR_FLOATER_MEDIC
    cost: 288
    points: 50
    needItem: true
    listOrder: 802
    lookup: STR_FLOATER
    unlocks: &MEDIC_UNLOCKS
      - STR_ALIEN_LANGUAGE_UNLOCK
      - STR_ALIEN_INVASION_UNLOCK
      - STR_EXAMINATION_ROOM_UNLOCK
      - STR_ALIEN_SURGERY_UNLOCK
      - STR_ALIEN_ENTERTAINMENT_UNLOCK
      - STR_PSI_AMP_UNLOCK
      - STR_PSI_LAB_UNLOCK_2
      - STR_ULTIMATE_CRAFT_UNLOCK_3
    getOneFree: &MEDIC_GETONEFREE
      - STR_FLOATER
      - STR_FLOATER_CORPSE
      - STR_SECTOID
      - STR_SECTOID_CORPSE
      - STR_SNAKEMAN
      - STR_SNAKEMAN_CORPSE
      - STR_MUTON
      - STR_MUTON_CORPSE
      - STR_WASPITE
      - STR_WASPITE_CORPSE
      - STR_GAZER
      - STR_GAZER_CORPSE
      - STR_SECTOID_ELITE
      - STR_SECTOID_ELITE_CORPSE
      - STR_MUTON_ELITE
      - STR_MUTON_ELITE_CORPSE
      - STR_ETHEREAL
      - STR_ETHEREAL_CORPSE
      - STR_MUTON_ELITE_GUARD
      - STR_MUTON_ELITE_GUARD_CORPSE
      - STR_SILACOID
      - STR_SILACOID_CORPSE
      - STR_REAPER
      - STR_REAPER_CORPSE
      - STR_CYBERDISC
      - STR_CYBERDISC_CORPSE
      - STR_CHRYSSALID
      - STR_CHRYSSALID_CORPSE
      - STR_SECTOPOD
      - STR_SECTOPOD_CORPSE
      - STR_CELATID
      - STR_CELATID_CORPSE
      - STR_MUTON_BERSERKER
      - STR_MUTON_BERSERKER_CORPSE
      - STR_CYBERMITE
      - STR_CYBERMITE_CORPSE
      - STR_HOLODRONE
      - STR_HOLODRONE_CORPSE
      - STR_ARMORED_CYBERDISC
      - STR_ARMORED_SECTOPOD_CORPSE
      - STR_ARMORED_SECTOPOD
      - STR_ARMORED_CYBERDISC_CORPSE
      - STR_CHRYSSALID_SPITTER
      - STR_CHRYSSALID_SPITTER_CORPSE
  - name: STR_FLOATER_ENGINEER
    cost: 288
    points: 50
    needItem: true
    listOrder: 803
    lookup: STR_FLOATER
    unlocks: &ENGINEER_UNLOCKS
      - STR_ALIEN_LANGUAGE_UNLOCK
      - STR_ALIEN_INVASION_UNLOCK
      - STR_PLASMA_PISTOL_UNLOCK
      - STR_PLASMA_RIFLE_UNLOCK
      - STR_HEAVY_PLASMA_UNLOCK
      - STR_SMALL_LAUNCHER_UNLOCK
      - STR_BLASTER_LAUNCHER_UNLOCK
      - STR_UFO_POWER_SOURCE_UNLOCK
      - STR_UFO_CONSTRUCTION_UNLOCK
      - STR_POWER_SUIT_UNLOCK
      - STR_REINFORCED_POWER_SUIT_UNLOCK
      - STR_PSI_LAB_UNLOCK_1
      - STR_NEW_FIGHTER_TRANSPORTER_UNLOCK_1
      - STR_NEW_FIGHTER_CRAFT_UNLOCK_1
      - STR_ULTIMATE_CRAFT_UNLOCK_1
    getOneFree: &ENGINEER_GETONFREE
      - STR_SMALL_SCOUT
      - STR_MEDIUM_SCOUT
      - STR_LARGE_SCOUT
      - STR_HARVESTER
      - STR_ABDUCTOR
      - STR_TERROR_SHIP
      - STR_BATTLESHIP
      - STR_SUPPLY_SHIP
      - STR_FIGHTER_SHIP
      - STR_SENTRY_SHIP
      - STR_LAB_SHIP
      - STR_EXCAVATOR
  - name: STR_FLOATER_NAVIGATOR
    cost: 288
    points: 50
    needItem: true
    listOrder: 804
    lookup: STR_FLOATER
    unlocks: &NAVIGATOR_UNLOCKS
      - STR_ALIEN_LANGUAGE_UNLOCK
      - STR_ALIEN_INVASION_UNLOCK   
      - STR_UFO_NAVIGATION_UNLOCK
      - STR_HYPER_WAVE_DECODER_UNLOCK
      - STR_FLYING_SUIT_UNLOCK
      - STR_NEW_FIGHTER_CRAFT_UNLOCK_2
      - STR_NEW_FIGHTER_TRANSPORTER_UNLOCK_2
      - STR_ULTIMATE_CRAFT_UNLOCK_2
      - STR_REINFORCED_FLYING_SUIT_UNLOCK
    getOneFree: &NAVIGATOR_GETONEFREE
      - STR_ALIEN_RESEARCH
      - STR_ALIEN_HARVEST
      - STR_ALIEN_ABDUCTION
      - STR_ALIEN_INFILTRATION
      - STR_ALIEN_BASE
      - STR_ALIEN_TERROR
      - STR_ALIEN_RETALIATION
      - STR_ALIEN_SUPPLY
  - name: STR_FLOATER_LEADER
    cost: 288
    points: 50
    needItem: true
    listOrder: 805
    lookup: STR_FLOATER
    unlocks:
      - STR_ALIEN_LANGUAGE_UNLOCK
      - STR_ALIEN_INVASION_UNLOCK
      - STR_LEADER_PLUS
  - name: STR_FLOATER_COMMANDER
    cost: 288
    points: 50
    needItem: true
    listOrder: 806
    lookup: STR_FLOATER
    unlocks:
      - STR_ALIEN_LANGUAGE_UNLOCK
      - STR_ALIEN_INVASION_UNLOCK
      - STR_LEADER_PLUS
      - STR_COMMANDER_PLUS
#END FLOATERS

Offline Hedron

  • Sergeant
  • **
  • Posts: 16
    • View Profile
Re: Editing Research Tree in OpenXCom: "dependencies" with "getOneFree"
« Reply #6 on: April 27, 2016, 01:55:40 am »
Correct usage of "dependencies" and "requires":
Listing-1

Correct usage of "dependencies", "requires", "unlock" and "getOneFree"
Listing-2

In your listings I have never found "dependencies" (or "requires") together with "getOneFree".
If I understand correctly, in this listings, Floaters of all ranks can be researched as soon as they appear in Alien Containment. This is not my case.
If I'm wrong – I would be very happy if you describe in more detail how this works.
For exapmple: Which means &MEDIC_GETONEFREE in
Code: [Select]
   getOneFree: &MEDIC_GETONEFREE?
In Ruleset_Reference nothing is written about &any_reference. And in your listings I have not found where cited referenses with &.
« Last Edit: April 27, 2016, 02:43:25 am by Hedron »

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: Editing Research Tree in OpenXCom: "dependencies" with "getOneFree"
« Reply #7 on: April 27, 2016, 03:00:54 am »
Code: [Select]
  - delete: STR_FLOATER_SOLDIER
  - delete: STR_FLOATER_MEDIC
  - delete: STR_FLOATER_ENGINEER
  - delete: STR_FLOATER_NAVIGATOR
  - delete: STR_FLOATER_LEADER
  - delete: STR_FLOATER_COMMANDER

This is critical to do before changing any existing research entries, otherwise you might still be using some of the old settings

Offline hellrazor

  • Commander
  • *****
  • Posts: 2025
  • Deep Ruleset Digger & Bughunter
    • View Profile
    • Github Account
Re: Editing Research Tree in OpenXCom: "dependencies" with "getOneFree"
« Reply #8 on: April 27, 2016, 07:31:39 am »
In your listings I have never found "dependencies" (or "requires") together with "getOneFree".
They are not used in one and the same topic, but functionalwise both listings are linked, especially if you look at the Leader/Commander Rank and what researches they can unlock.

If I understand correctly, in this listings, Floaters of all ranks can be researched as soon as they appear in Alien Containment. This is not my case.
If I'm wrong – I would be very happy if you describe in more detail how this works.
For exapmple: Which means &MEDIC_GETONEFREE in
Code: [Select]
   getOneFree: &MEDIC_GETONEFREE?
In Ruleset_Reference nothing is written about &any_reference. And in your listings I have not found where cited referenses with &.
Yes indeed, those alien become immediatly avaible, once captured and in alien containment.
Those are YAML anchors for defining a list of values to be used elsewere. Nothing you need to worry about.
Here a example of using those $any_reference (also called YAML anchors)
Code: [Select]
#BEGIN SECTOID
#listOrder: 900-999
  - delete: STR_SECTOID_SOLDIER
  - delete: STR_SECTOID_MEDIC
  - delete: STR_SECTOID_ENGINEER
  - delete: STR_SECTOID_NAVIGATOR
  - delete: STR_SECTOID_LEADER
  - delete: STR_SECTOID_COMMANDER
  - name: STR_SECTOID
    listOrder: 900
  - name: STR_SECTOID_SOLDIER
    cost: 288
    points: 50
    needItem: true
    listOrder: 901
    lookup: STR_SECTOID
    unlocks:
      - STR_ALIEN_INVASION_UNLOCK
      - STR_ALIEN_LANGUAGE_UNLOCK
  - name: STR_SECTOID_MEDIC
    cost: 288
    points: 50
    needItem: true
    listOrder: 902
    lookup: STR_SECTOID
    unlocks: *MEDIC_UNLOCKS
    getOneFree: *MEDIC_GETONEFREE
  - name: STR_SECTOID_ENGINEER
    cost: 288
    points: 50
    needItem: true
    listOrder: 903
    lookup: STR_SECTOID
    unlocks: *ENGINEER_UNLOCKS
    getOneFree: *ENGINEER_GETONFREE
  - name: STR_SECTOID_NAVIGATOR
    cost: 288
    points: 50
    needItem: true
    listOrder: 904
    lookup: STR_SECTOID
    unlocks: *NAVIGATOR_UNLOCKS
    getOneFree: *NAVIGATOR_GETONEFREE
  - name: STR_SECTOID_LEADER
    cost: 288
    points: 50
    needItem: true
    listOrder: 905
    lookup: STR_SECTOID
    unlocks:
      - STR_ALIEN_LANGUAGE_UNLOCK
      - STR_ALIEN_INVASION_UNLOCK
      - STR_LEADER_PLUS
      - STR_PSIONICS_UNLOCK
  - name: STR_SECTOID_COMMANDER
    cost: 288
    points: 50
    needItem: true
    listOrder: 906
    lookup: STR_SECTOID
    unlocks:
      - STR_ALIEN_LANGUAGE_UNLOCK
      - STR_ALIEN_INVASION_UNLOCK
      - STR_LEADER_PLUS
      - STR_COMMANDER_PLUS
      - STR_PSIONICS_UNLOCK
#END SECTOID

Let me be brief:
"dependency": a Research Topic becomes avaible, once all its dependencies are unlocked (either throu researching them or via a unlock (from getOneFree also)
"requires": a Research Topic becomes avaible for research or unlocking once a list of other Researchtopics has been unlocked and all depencies fullfilled, dependencies will only fullfill if the appropriate requires is met before.
"unlock": a Researchtopic automatically unlocks another Researchtopics on its completion (if the requires for the research topic to be unlocked are met),
"getOneFree": allows to create a list of research topics, at completion of the current topic holding the list, one from the list will be selected and unlocked. Also implies that this research topic is avaible as long as there are element of the genOneFree List still avaible for unlocking.

EDIT: I am not sure, but i think alive alien will show up for research even if they have dependencies or require set. Never tested it thou.
EDIT2: Your Medic has "    needItem: true" set which means you need a alive one to research it.
« Last Edit: April 27, 2016, 07:43:36 am by hellrazor »

Offline hellrazor

  • Commander
  • *****
  • Posts: 2025
  • Deep Ruleset Digger & Bughunter
    • View Profile
    • Github Account
Re: Editing Research Tree in OpenXCom: "dependencies" with "getOneFree"
« Reply #9 on: April 27, 2016, 07:46:56 am »
'Requires' NEVER USED WITHOUT 'dependencies' – you may see it itself in research.rul.

In any case, I tried use 'requires' without 'dependencies':
Code: [Select]
  - name: STR_AQUATOID_SOLDIER
    cost: 192
    points: 50
    lookup: STR_AQUATOID
    needItem: true
    unlocks:
      - STR_ALIEN_ORIGINS
      - STR_AQUATOID_SQUAD_LEADER
      - STR_AQUATOID_MEDIC
      - STR_AQUATOID_TECHNICIAN
      - STR_AQUATOID_NAVIGATOR
    dependencies:
      - STR_AQUATOID_CORPSE
      - STR_MC_READER
  - name: STR_AQUATOID_MEDIC
    cost: 192
    points: 50
    needItem: true
    getOneFree:
      - STR_CALCINITE
      - STR_HALLUCINOID
      - STR_DEEP_ONE
      - STR_XARQUID
      - STR_TENTACULAT
      - STR_BIODRONE
      - STR_TRISCENE
    requires:
      - STR_AQUATOID_SOLDIER
– Aquatoid Medic DOES NOT APPEAR in the research-list after the research Aquatoid Soldier.
Maybe add:
Code: [Select]
    dependency:
      - STR_AQUATOID_SOLDIER

Offline Hedron

  • Sergeant
  • **
  • Posts: 16
    • View Profile
Re: Editing Research Tree in OpenXCom: "dependencies" with "getOneFree"
« Reply #10 on: April 27, 2016, 03:56:49 pm »
They are not used in one and the same topic, but functionalwise both listings are linked, especially if you look at the Leader/Commander Rank and what researches they can unlock.
Those "researches they can unlock" do not use 'GetOneFree'.

Quote
Yes indeed, those alien become immediatly avaible, once captured and in alien containment.
Here's the problem.
I need, on the one hand, the research depended on other researches and on the other – used 'GetOneFree'.

Quote
Those are YAML anchors for defining a list of values to be used elsewere. Nothing you need to worry about.
Here a example of using those $any_reference (also called YAML anchors)
Many thanks. Maybe even take advantage of this.

Quote
Let me be brief: ...
That's all – in theory. In practice:
• "getOneFree" negate the effect of "dependency" ("dependency" don't working with "getOneFree") – This is the main problem!
• "requires" triggered ONLY in 0-cost researches
(so I can't use this option) and it negate the effect of "getOneFree" ("getOneFree" don't working with "requires").

So:
Quote
EDIT: I am not sure, but i think alive alien will show up for research even if they have dependencies or require set. Never tested it thou.
Of course, but only those aliens, who have "getOneFree" in their research-topics (Medic, Engeneer/Technician, Squad Leader etc.). Soldiers and terrorists will not appear in the list immediately (after appearance in Alien Containment), if they add "dependencies".
If they add "requires" directly – they will NEVER show up for research (because they are not 0-cost recearch). Those can be done only through the support 0-cost recearch-topic.

Quote
EDIT2: Your Medic has "    needItem: true" set which means you need a alive one to research it.
:) The best way to repair technique is just to turn it "on"  ;D
Of course I have Aquatoid Medics in Alien Containment.

Maybe add:
Code: [Select]
    dependency:
      - STR_AQUATOID_SOLDIER
As far as I could understand – it's all about that "requires" triggered only in 0-cost researches.
So I could not use "requires" with "GetOneFree".

But by itself, this design is quite work:
Code: [Select]
  - name: STR_GAUSS_TECH
    cost: 0
    points: 0
    dependencies:
      - STR_MEDI_KIT
    requires:
      - STR_MEDI_KIT
Gauss Pistol (depended on Gauss Technology) becomes available for research after researching Medi-kit.

« Last Edit: April 27, 2016, 05:06:14 pm by Hedron »

Offline Hedron

  • Sergeant
  • **
  • Posts: 16
    • View Profile
Re: Editing Research Tree in OpenXCom: "dependencies" with "getOneFree"
« Reply #11 on: April 27, 2016, 04:03:42 pm »
This is critical to do before changing any existing research entries, otherwise you might still be using some of the old settings
Сurrently I don't do it like a mod.
Сurrently I'm directly editing openxcom\standard\xcom2\research.rul. So I have no "old settings".
And I don't use other mods affecting Research Tree.
« Last Edit: April 27, 2016, 04:05:14 pm by Hedron »

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: Editing Research Tree in OpenXCom: "dependencies" with "getOneFree"
« Reply #12 on: April 27, 2016, 04:12:47 pm »
Сurrently I don't do it like a mod.
Сurrently I'm directly editing openxcom\standard\xcom2\research.rul. So I have no "old settings".
And I don't use other mods affecting Research Tree.

Which can lead to issues but as long as you know what you're doing...

Offline Hedron

  • Sergeant
  • **
  • Posts: 16
    • View Profile
Re: Editing Research Tree in OpenXCom: "dependencies" with "getOneFree"
« Reply #13 on: April 27, 2016, 04:40:04 pm »
Which can lead to issues...
What problems this can lead?

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11629
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Editing Research Tree in OpenXCom: "dependencies" with "getOneFree"
« Reply #14 on: April 27, 2016, 05:21:27 pm »
So:Of course, but only those aliens, who have "getOneFree" in their research-topics (Medic, Engeneer/Technician, Squad Leader etc.).

Not only aliens; any research that has getOneFree is always available from the start, as long as you have the item (if needed).