aliens

Author Topic: Help correct my aim: Creating a Research Tree Mod  (Read 3886 times)

Offline BlackLibrary

  • Colonel
  • ****
  • Posts: 133
    • View Profile
Help correct my aim: Creating a Research Tree Mod
« 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!

Code: [Select]
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!!!"
« Last Edit: February 12, 2014, 01:38:30 am by BlackLibrary »

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Help correct my aim: Creating a Research Tree Mod
« Reply #1 on: February 12, 2014, 08:53:03 am »
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.
« Last Edit: February 12, 2014, 08:57:12 am by Warboy1982 »

Offline BlackLibrary

  • Colonel
  • ****
  • Posts: 133
    • View Profile
Re: Help correct my aim: Creating a Research Tree Mod
« Reply #2 on: February 12, 2014, 10:34:36 pm »
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.

Code: [Select]
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!!!

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: Help correct my aim: Creating a Research Tree Mod
« Reply #3 on: February 12, 2014, 11:56:07 pm »
"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

Offline BlackLibrary

  • Colonel
  • ****
  • Posts: 133
    • View Profile
Re: Help correct my aim: Creating a Research Tree Mod
« Reply #4 on: February 13, 2014, 02:06:47 am »
:Head slap!

Thanks!