OpenXcom Forum

Modding => Released Mods => The X-Com Files => Topic started by: 0xEBJC on March 29, 2024, 06:25:16 pm

Title: [Help] Creating sub-mods for X-Com Files
Post by: 0xEBJC on March 29, 2024, 06:25:16 pm
I'm trying to understand the ufopedia mechanics for displaying different pages. I want one of my pages to show the topic with the engineer speaking from X-Com Files

I currently have a blank purple background for the scramjet research with the following code:

Code: [Select]
  - id: STR_SCRAMJET
    type_id: 8
    section: STR_UFO_COMPONENTS
    text: STR_SCRAMJET_UFOPEDIA
    requires:
      - STR_SCRAMJET
    listOrder: 10140


I want it to look like the 'Grav Module' with the engineer profile, like this one:

Code: [Select]
  - id: STR_GRAV_MODULE_CONSTRUCTION
    type_id: 4
    section: STR_UFO_COMPONENTS
    text: STR_GRAV_MODULE_CONSTRUCTION_UFOPEDIA
    requires:
      - STR_GRAV_MODULE_CONSTRUCTION
    listOrder: 61060

When I change the 'type_id' to 4 for the scramjet the game crashes when I open it up in the ufopedia.  So I'm trying to find out what I'm missing in linking the right files and code.

Any help would be greatly appreciated.  Thanks!
Title: Re: [Help] Creating sub-mods for X-Com Files
Post by: Juku121 on March 29, 2024, 07:32:30 pm
Most likely, you're missing the 'STR_SCRAMJET' item that looks like the engineer bigob. E.g.
Code: [Select]
  - type: STR_GRAV_MODULE_CONSTRUCTION
    bigSprite: 308
    weight: 0
    invWidth: 2
    invHeight: 3
Title: Re: [Help] Creating sub-mods for X-Com Files
Post by: 0xEBJC on April 05, 2024, 01:50:42 am
Thank you!  That worked perfectly.