OpenXcom Forum
Modding => Work In Progress => Topic started by: BlackLibrary on February 12, 2014, 01:36:42 am
-
See code below. Just playing around after creating some weapon mods, and wondered is it possible to create a pure non-item associated research mod. Well clearly, after testing, I'm missing something. Looked through others, and no luck. So posting to John Q (that means you!).
Whats wrong with the below. Looking to create a mod for a new research topic. Completing it should open a reference in the ufopaedia for reading. I'll experiment from there. Please correct my aim! is the issue because I must have an actual item with and ID for STR_SOLYENT_GREEN?
If you know, please correct my text so I can see a working example. Thanks!
research:
- name: STR_SOLYENT_GREEN
cost: 5
points: 10
lookup: STR_SOLYENT_GREEN_UFOPEDIA
ufopaedia:
- id: STR_SOLYENT_GREEN
type_id: 4
section: STR_WEAPONS_AND_EQUIPMENT
requires:
- STR_SOLYENT_GREEN
text: STR_SOLYENT_GREEN_UFOPEDIA
extraStrings:
- type: en-GB
strings:
STR_SOLYENT_GREEN: "Solyent Green found in laboratory"
STR_SOLYENT_GREEN_UFOPEDIA: "Yes...you found out what it is. It also tastes GREAT!!!"
- type: en-US
strings:
STR_SOLYENT_GREEN: "Solyent Green"
STR_SOLYENT_GREEN_UFOPEDIA: "Yes...you found out what it is. It also tastes GREAT!!!"
-
the "lookup" field refers to another research project. it is generally used to refer say, a sectoid commander to the generic sectoid article.
you have not defined a research topic called "STR_SOLYENT_GREEN_UFOPEDIA".
when defining an article in the ufopaedia as "type_id: 4" (item) you require a corresponding item for it to display.
-
Warboy.,
Thanks for the info. Made the following corrections. However it crashes to desktop when attempting to view the article in the ufopaedia after research is completed.
research:
- name: STR_SOLYENT_GREEN
cost: 5
points: 10
ufopaedia:
- id: STR_SOLYENT_GREEN
type_id: 9
section: STR_ALIEN_RESEARCH_UC
text: STR_SOLYENT_GREEN_UFOPEDIA
requires:
- STR_SOLYENT_GREEN
listOrder: 4299
extraStrings:
- type: en-GB
strings:
STR_SOLYENT_GREEN: Solyent Green
STR_SOLYENT_GREEN_UFOPEDIA: Yes...you found out what it is. It also tastes GREAT!!!
- type: en-US
strings:
STR_SOLYENT_GREEN: Solyent Green
STR_SOLYENT_GREEN_UFOPEDIA: Yes...you found out what it is. It also tastes GREAT!!!
-
"type_id: 9" requires an associated UFO to display. If you want a "pure text" article use 8. It's explained in the documentation: https://www.ufopaedia.org/index.php?title=Ruleset_Reference_(OpenXcom)#UFOpaedia_Article
-
:Head slap!
Thanks!