OpenXcom Forum
Modding => Work In Progress => Topic started by: wsmithjr on July 24, 2013, 03:44:30 am
-
Is there any way to generate messages that say when new research is available? For instance, after you research Laser Cannon, you get a window that says "You can now research Laser Defense". I don't see anywhere in the ruleset where that is generated. I've successfully set up a research option to Tank/Laser Cannon so that you have to research the topic before you can build the HWP. And the topic appears at the bottom of the research selection screen. However, I can't get the game to say "You can now research Laser Defense and Tank/Laser Cannon."
I've tried setting up the following in the research section:
- name: STR_TANK_LASER_REQ
cost: 0
points: 0
dependencies:
- STR_ALIEN_ALLOYS
- STR_LASER_CANNON
unlocks:
- STR_TANK_LASER_CANNON
and it works, but no messages.
I've added the necessity to research the item because at the same time I've changed the armor of the Tank/Laser to be similar to the Hovercraft, so there's a benefit to actually building them. Not a big deal, but it would be nice to have messages pop up given changes to the research tree. Maybe it's hard-coded thing.
BTW, I know you can just put the dependencies in the entry for Tank/Laser but hoped the above code would help with the message issue. Still haven't quite figured out why sometimes the ruleset uses code as above, and other times it just lists the dependencies.
Thanks for any help.
-
I believe this is what comes up on the pop-up
unlocks:
- STR_TANK_LASER_CANNON
if you have multiple items then it shoudl be
unlocks:
- STR_TANK_LASER_CANNON
- STR_LASER_DEFENSE
maybe that is not what you mean, but i think that will case the game to display
"You can now research Tank/Laser Cannon and Laser Defense."
I haven't tested myself i am doing a few changes myself to the whole research tree but i am in testing phase just yet.
-
cost needs to be over 0 in order for it to pop up.
-
if you have multiple items then it shoudl be
unlocks:
- STR_TANK_LASER_CANNON
- STR_LASER_DEFENSE
maybe that is not what you mean, but i think that will case the game to display
"You can now research Tank/Laser Cannon and Laser Defense."
Yep, tried exactly that but it ignored it.
cost needs to be over 0 in order for it to pop up.
And now I know why. That answers the question. Now to see if I can reconfigure it and make it work the way I want.
Thanks for the help.
-
I'm having the same issue after making alien containment depend on performing an autopsy:
- name: STR_SECTOID_AUTOPSY
cost: 1
points: 50
needItem: true
unlocks:
- STR_ALIEN_CONTAINMENT
- name: STR_SNAKEMAN_AUTOPSY
cost: 1
points: 50
needItem: true
unlocks:
- STR_ALIEN_CONTAINMENT
...and so on
Got everything else to work, but it's not showing up in the "we can now research" message.
-
I guess you have to set the "cost" for your alien containment to >0, right? because if you don't, it will just be available for building after you researched a body (instead of being available for research).
-
Yeah I've got a research entry and etc too:
facilities:
- type: STR_ALIEN_CONTAINMENT
requires:
- STR_ALIEN_CONTAINMENT
spriteShape: 1
spriteFacility: 25
buildCost: 400000
buildTime: 18
monthlyCost: 15000
aliens: 10
mapName: XBASE_08
research:
- name: STR_ALIEN_CONTAINMENT
cost: 50
points: 15
dependencies:
- STR_SECTOID_AUTOPSY
- STR_SNAKEMAN_AUTOPSY
- STR_FLOATER_AUTOPSY
- STR_MUTON_AUTOPSY
- STR_ETHEREAL_AUTOPSY
- STR_CHRYSSALID_AUTOPSY
- STR_REAPER_AUTOPSY
- STR_CELATID_AUTOPSY
ufopaedia:
- id: STR_ALIEN_CONTAINMENT
type_id: 6
section: STR_BASE_FACILITIES
requires:
- STR_ALIEN_CONTAINMENT
text: STR_ALIEN_CONTAINMENT_UFOPEDIA
-
Still have this problem. Decided to rename string to be less ambiguous, works fine, but still don't get the research prompt after performing any autopsy; it just silently becomes available.
facilities:
- type: STR_ALIEN_CONTAINMENT
requires:
- STR_ALIEN_CONTAINMENT_RESEARCH
research:
- name: STR_ALIEN_CONTAINMENT_RESEARCH
cost: 150
points: 15
dependencies:
- STR_SECTOID_AUTOPSY
- STR_SNAKEMAN_AUTOPSY
- STR_FLOATER_AUTOPSY
- STR_MUTON_AUTOPSY
- STR_ETHEREAL_AUTOPSY
- STR_CHRYSSALID_AUTOPSY
- STR_REAPER_AUTOPSY
- STR_CELATID_AUTOPSY
- name: STR_SECTOID_AUTOPSY
unlocks:
- STR_ALIEN_CONTAINMENT_RESEARCH
- name: STR_SNAKEMAN_AUTOPSY
unlocks:
- STR_ALIEN_CONTAINMENT_RESEARCH
- name: STR_FLOATER_AUTOPSY
unlocks:
- STR_ALIEN_CONTAINMENT_RESEARCH
- name: STR_MUTON_AUTOPSY
unlocks:
- STR_ALIEN_CONTAINMENT_RESEARCH
- name: STR_ETHEREAL_AUTOPSY
unlocks:
- STR_ALIEN_CONTAINMENT_RESEARCH
- name: STR_CHRYSSALID_AUTOPSY
unlocks:
- STR_ALIEN_CONTAINMENT_RESEARCH
- name: STR_REAPER_AUTOPSY
unlocks:
- STR_ALIEN_CONTAINMENT_RESEARCH
- name: STR_CELATID_AUTOPSY
unlocks:
- STR_ALIEN_CONTAINMENT_RESEARCH
- name: STR_SILACOID_AUTOPSY
unlocks:
- STR_ALIEN_CONTAINMENT_RESEARCH
ufopaedia:
- id: STR_ALIEN_CONTAINMENT
type_id: 6
section: STR_BASE_FACILITIES
requires:
- STR_ALIEN_CONTAINMENT_RESEARCH
text: STR_ALIEN_CONTAINMENT_UFOPEDIA
extraStrings:
- type: English
strings:
STR_ALIEN_CONTAINMENT_RESEARCH: Alien Containment
-
Hi,
I am not sure my solution will be suitable to you, but this way I do not meet anymore issue you are describing, so perhaps will you find why it does not display from your side after have a look at this
Some screen shots
1) No Alien Detention available at start
2) Researching Sectoid Corpse will announce "Alien Detention" as available.
-
"Alien Detention" is different from "Alien Containment", as it is only describing the way to "Alien Containment".
This is about like your "Alien Biology", except it will point out needed alien researches to reach "Alien Containment"
For testing purposes, I only activated "Alien Food"
Once you successfully researched "Alien Detention", suppose you bring back an "Alien Food" from a mission : you know you have to search for it, what you do
You can observe it announces "Alien Containment"
EDIT : I just tested it with "Alien Food" and "Alien Entertainment", it works too
-
Then you are allowed to research "Alien Containment"
I attached the version with two depedencies "Alien Food" and "Alien Entertainment"