OpenXcom Forum
Modding => Work In Progress => Topic started by: Align on January 27, 2015, 10:58:45 pm
-
I'm trying to make researching the alien grenade prerequire researching Elerium. I've got a savegame where I researched Elerium and have a grenade stored, but it's not showing up as an option.
https://imgur.com/onylTRR,UreNdsG,3OX7lz9#0
-
Use
dependencies:
- STR_ELERIUM_115
instead of requires: - from my experience it seems the game only checks the 'requires' if the dependencies are fulfilled. If there aren't any dependencies it will ignore if the 'requires' are fulfilled.
-
Yes not sure of exact logic, but if there's only one requirement you should use the dependency language instead.
-
Thanks, that did it. Although now I've got a different problem:
https://imgur.com/Mm82ZXb,OKv5aaQ,8Cc3laf#0
I wanted to make interrogation require autopsy, but there's something weird going on here...
-
Here are my notes about how it works. I don't remember the exact scenario, but I think get one free is the culprit for weird items showing up in your list that shouldn't be unlocked.
#1) Always have one and only one "requires:" for any UFOPAEDIA entry (cf. XCOMEnforcer below)
#2) Reciprocally, this "requires:" has to trigger one and only one UFOPAEDIA entry (cf. Alloy ammunition below)
#3) If necessary, create a new RESEARCH entry with cost 0 including as dependencies the corresponding "requires:"
#4) getOneFree: seems to need more than one entry, otherwise it unlocks the parent item prematurely it seems.
#5) unlocks can be used to chain several items provided you've got a 0 cost.
-
I don't think that's it, I haven't used getOneFree so the only entries there would be what vanilla uses, which are all more than one entry.
EDIT: Ah, but the navigator and engineer have getOneFree lists, unlike the soldier which just unlocks. Hmm...
EDIT2: Confirmed, setting getOneFree: [] on the engineer made it unresearchable from start, while navigator (which did not get getOneFree: []) is still bugged. To the bugmobile!
-
If you just want to chain one project to the next for free, I.e. Item A gets you item B, use unlocks and set the requirements for time etc on B to 0.
-
I'd prefer not to touch the getOneFree lists, so I'll wait and see if it gets fixed.
Meanwhile, I've been trying to figure out when to use requires:
- name: STR_TESTME1
cost: 1
- name: STR_TESTME2
cost: 1
- name: STR_TESTME_HASREQ
cost: 1
requires:
- STR_TESTME1
- name: STR_TESTME_HASDEP
cost: 1
dependencies:
- STR_TESTME1
- name: STR_TESTME_HASREQDEP
cost: 1
requires:
- STR_TESTME1
dependencies:
- STR_TESTME2
After researching TESTME1, TESTME_HASDEP becomes available, but even after researching that and TESTME2, I can't research TESTME_HASREQ or _HASREQDEP. So is it only usable for cost 0 entries? Like STR_COMMANDER_PLUS in the vanilla ruleset.
-
Try to use "unlocks" keyword.
- name: STR_TESTME1
cost: 1
unlocks:
- STR_TESTME_HASREQ
- STR_TESTME_HASREQDEP
- name: STR_TESTME2
cost: 1
- name: STR_TESTME_HASREQ
cost: 1
requires:
- STR_TESTME1
- name: STR_TESTME_HASDEP
cost: 1
dependencies:
- STR_TESTME1
- name: STR_TESTME_HASREQDEP
cost: 1
requires:
- STR_TESTME1
dependencies:
- STR_TESTME2
-
- name: STR_RESEARCH_PROJECT_1
dependencies:
- STR_DEPENDENCY_1
- STR_DEPENDENCY_2
- STR_DEPENDENCY_3
- STR_RESEARCH_PROJECT_1_UNLOCK
- name: STR_RESEARCH_PROJECT_1_UNLOCK
requires:
- STR_DEPENDENCY_1
- STR_DEPENDENCY_2
- STR_DEPENDENCY_3
dependencies:
- STR_ALIVE_ALIEN
- name: STR_RESEARCH_PROJECT_2
dependencies:
- STR_RESEARCH_PROJECT_1
- STR_RESEARCH_PROJECT_2_UNLOCK
- name: STR_RESEARCH_PROJECT_2_UNLOCK
requires:
- STR_RESEARCH_PROJECT_1
dependencies:
- STR_ALIVE_ALIEN
- name: STR_ALIVE_ALIEN
unlocks:
- STR_RESEARCH_PROJECT_1_UNLOCK
- STR_RESEARCH_PROJECT_2_UNLOCK
This should work :)
Explanation:
RESEARCH_PROJECT_1 will show up in the Research popup, after DEPENDENCY 1-3 are fullfilled and STR_ALIVE_ALIEN is researched. STR_ALIVE_ALIEN unlocks the last DEPENDENCY -> STR_RESEARCH_PROJECT_1_UNLOCK. Which will only be considered for unlocking after DEPENDENCY 1-3 have been researched.
After this you will see the STR_RESEARCH_PROJECT_1 in the research popup.
STR_RESEARCH_PROJECT_2 will be avaible after another STR_ALIVE_ALIEN has been researched, STR_RESEARCH_PROJECT_2_UNLOCK will not even be considered to be unlocked until STR_RESEARCH_PROJECT_1 is researched and avaible.
Hope this helps :)
-
This should work :)
It didn't... but should work now in the latest nightly.