Author Topic: reorder sections in ufopedia  (Read 5931 times)

Offline greg77

  • Sergeant
  • **
  • Posts: 17
    • View Profile
reorder sections in ufopedia
« on: December 15, 2017, 12:19:19 am »
is it possible [by using .rul files] to change the order of sections themselves?
i would put "base facilities" to the top, put "alien research" right below earth technology sections, and possibly insert something somewhere for new topics that don't fit in any vanilla ones.

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: reorder sections in ufopedia
« Reply #1 on: December 15, 2017, 12:47:17 am »
You could send all the items and stuff to other sections, and then rename them in the language files, but that would be overly tedious and would not work for anything added by mods. Not a solution, just a possibility.

Offline greg77

  • Sergeant
  • **
  • Posts: 17
    • View Profile
Re: reorder sections in ufopedia
« Reply #2 on: December 15, 2017, 01:40:30 am »
thank you for the quick reply.
i've done exactly that, and was just curious if it is possible to do it properly. i see that it is not the case. hopefully later there will be an option for this. until then, my STR_UFOS will contain "X-COM CRAFT" and so forth...
« Last Edit: December 15, 2017, 01:44:03 am by greg77 »

Offline Hobbes

  • Commander
  • *****
  • Posts: 2102
  • Infiltration subroutine in progress
    • View Profile
Re: reorder sections in ufopedia
« Reply #3 on: December 15, 2017, 02:18:15 am »
thank you for the quick reply.
i've done exactly that, and was just curious if it is possible to do it properly. i see that it is not the case. hopefully later there will be an option for this. until then, my STR_UFOS will contain "X-COM CRAFT" and so forth...

On the nightlies it is hardcoded, so the only method is the one you describe. On OXCE might be possible IIRC

Offline greg77

  • Sergeant
  • **
  • Posts: 17
    • View Profile
Re: reorder sections in ufopedia
« Reply #4 on: December 17, 2017, 10:24:44 pm »
thank you too. will have a look at.

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: reorder sections in ufopedia
« Reply #5 on: December 19, 2017, 06:36:16 pm »
On the nightlies it is hardcoded, so the only method is the one you describe. On OXCE might be possible IIRC
Actually in the nightly the Ufopaedia categories use the ordering of the corresponding articles (so the category of the first article goes first, etc).
To change it you would have to reorder all vanilla articles appropriately using "listOrder".

Offline greg77

  • Sergeant
  • **
  • Posts: 17
    • View Profile
Re: reorder sections in ufopedia
« Reply #6 on: December 21, 2017, 10:07:32 pm »
sorry, i don't quite understand. you say i define listOrder for all the up articles. will then their sections get reordered, too?
i tried the following:
Code: [Select]
ufopaedia:
  - id: STR_TEST_ARTICLE1
    type_id: 8
    section: STR_TEST_SECTION1
    text: STR_TEST_TEXT1
    listOrder: 1
  - id: STR_TEST_ARTICLE2
    type_id: 8
    section: STR_TEST_SECTION2
    text: STR_TEST_TEXT2
    listOrder: 999999
  - id: STR_SKYRANGER
    listOrder: 20020
  - id: STR_INTERCEPTOR
    listOrder: 20001
  - id: STR_FIRESTORM
    listOrder: 20002
  - id: STR_LIGHTNING
    listOrder: 20003
  - id: STR_AVENGER
    listOrder: 20004
  - id: STR_STINGRAY
    listOrder: 20025
  - id: STR_AVALANCHE
    listOrder: 20006
  - id: STR_CANNON_UC
    listOrder: 20007
  - id: STR_FUSION_BALL_UC
    listOrder: 20008
  - id: STR_LASER_CANNON_UC
    listOrder: 20009
  - id: STR_PLASMA_BEAM_UC
    listOrder: 20010
extraStrings:
  - type: en-GB
    strings:
      STR_TEST_ARTICLE1: "first article"
      STR_TEST_SECTION1: "top section"
      STR_TEST_TEXT1: "first article up"
      STR_TEST_ARTICLE2: "last article"
      STR_TEST_SECTION2: "bottom section"
      STR_TEST_TEXT2: "last article up"
just randomly reordered the original articles for testing purposes.
both test sections showed up at the bottom of the list. the original STR_XCOM_CRAFT_ARMAMENT section remained at the top.
maybe i'm not doing something properly.

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: reorder sections in ufopedia
« Reply #7 on: December 22, 2017, 03:44:55 am »
sorry, i don't quite understand. you say i define listOrder for all the up articles. will then their sections get reordered, too?
i tried the following:
Code: [Select]
ufopaedia:
  - id: STR_TEST_ARTICLE1
    type_id: 8
    section: STR_TEST_SECTION1
    text: STR_TEST_TEXT1
    listOrder: 1
  - id: STR_TEST_ARTICLE2
    type_id: 8
    section: STR_TEST_SECTION2
    text: STR_TEST_TEXT2
    listOrder: 999999
  - id: STR_SKYRANGER
    listOrder: 20020
  - id: STR_INTERCEPTOR
    listOrder: 20001
  - id: STR_FIRESTORM
    listOrder: 20002
  - id: STR_LIGHTNING
    listOrder: 20003
  - id: STR_AVENGER
    listOrder: 20004
  - id: STR_STINGRAY
    listOrder: 20025
  - id: STR_AVALANCHE
    listOrder: 20006
  - id: STR_CANNON_UC
    listOrder: 20007
  - id: STR_FUSION_BALL_UC
    listOrder: 20008
  - id: STR_LASER_CANNON_UC
    listOrder: 20009
  - id: STR_PLASMA_BEAM_UC
    listOrder: 20010
extraStrings:
  - type: en-GB
    strings:
      STR_TEST_ARTICLE1: "first article"
      STR_TEST_SECTION1: "top section"
      STR_TEST_TEXT1: "first article up"
      STR_TEST_ARTICLE2: "last article"
      STR_TEST_SECTION2: "bottom section"
      STR_TEST_TEXT2: "last article up"
just randomly reordered the original articles for testing purposes.
both test sections showed up at the bottom of the list. the original STR_XCOM_CRAFT_ARMAMENT section remained at the top.
maybe i'm not doing something properly.
My mistake, it was using YAML order, not listOrder.
Should be fixed in the new nightly:

Offline greg77

  • Sergeant
  • **
  • Posts: 17
    • View Profile
Re: reorder sections in ufopedia
« Reply #8 on: December 22, 2017, 08:42:53 am »
great, thank you.
could you lead me to the place where i can request other bugs fixed? i think i've found a small one.

Offline R1dO

  • Colonel
  • ****
  • Posts: 442
    • View Profile
Re: reorder sections in ufopedia
« Reply #9 on: December 22, 2017, 01:43:21 pm »
Try the bugtracker