Author Topic: Rename an ufopaedia section? (SOLVED)  (Read 4691 times)

Offline robin

  • Commander
  • *****
  • Posts: 1224
  • ULTIMATE ROOKIE
    • View Profile
Rename an ufopaedia section? (SOLVED)
« on: November 29, 2014, 11:57:11 pm »
The HWPs' ufopaedia section has only a few entries.
So I wanted to rename the section to use it for a different (new) set of entries (moving HWPs entries elsewhere).
Possible (how?)?

Thanks.


Edit: I'm an idiot, of course I can! I just need to set an extra string for the section string, like this:

Code: [Select]
extraStrings:
  - type: en-US
      STR_HEAVY_WEAPONS_PLATFORMS: Whatever Name
« Last Edit: November 30, 2014, 12:06:53 am by robin »

Offline ivandogovich

  • Commander
  • *****
  • Posts: 2381
  • X-Com Afficionado
    • View Profile
    • Ivan Dogovich Youtube
Re: Rename an ufopaedia section? (SOLVED)
« Reply #1 on: November 30, 2014, 01:14:27 am »
Ahh!! This may be the perfect place to put all the Commendation entries!! WOOT!

Cheers, Ivan :D

Offline ivandogovich

  • Commander
  • *****
  • Posts: 2381
  • X-Com Afficionado
    • View Profile
    • Ivan Dogovich Youtube
Re: Rename an ufopaedia section? (SOLVED)
« Reply #2 on: December 04, 2014, 04:42:59 pm »
The HWPs' ufopaedia section has only a few entries.
So I wanted to rename the section to use it for a different (new) set of entries (moving HWPs entries elsewhere).
Possible (how?)?

Thanks.


Edit: I'm an idiot, of course I can! I just need to set an extra string for the section string, like this:

Code: [Select]
extraStrings:
  - type: en-US
      STR_HEAVY_WEAPONS_PLATFORMS: Whatever Name

I just tried this and it didn't work out for me.  Did you get it to work?

Cheers, Ivan :D

Offline yrizoud

  • Commander
  • *****
  • Posts: 1014
    • View Profile
Re: Rename an ufopaedia section? (SOLVED)
« Reply #3 on: December 04, 2014, 05:13:24 pm »
Check if you're in en-gb or en-us (with the proper case, whichever it is)

Offline ivandogovich

  • Commander
  • *****
  • Posts: 2381
  • X-Com Afficionado
    • View Profile
    • Ivan Dogovich Youtube
Re: Rename an ufopaedia section? (SOLVED)
« Reply #4 on: December 04, 2014, 06:03:00 pm »
Derp. I dropped an "s"


     STR_HEAVY_WEAPONS_PLATFORM: "Commendation Entries"

not

     STR_HEAVY_WEAPONS_PLATFORMS: "Commendation Entries"

By the way, Where are these UFOpedia section titles actually defined?   I don't see them in Xcom1Ruleset.rul.  ??

Cheers, Ivan :D

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile
Re: Rename an ufopaedia section? (SOLVED)
« Reply #5 on: December 04, 2014, 07:45:12 pm »

By the way, Where are these UFOpedia section titles actually defined?   I don't see them in Xcom1Ruleset.rul.  ??

Cheers, Ivan :D
here
https://github.com/SupSuper/OpenXcom/blob/2ee614e6258a7001753dcefb8575cdac5568affe/src/Ufopaedia/Ufopaedia.h#L36

Offline ivandogovich

  • Commander
  • *****
  • Posts: 2381
  • X-Com Afficionado
    • View Profile
    • Ivan Dogovich Youtube
Re: Rename an ufopaedia section? (SOLVED)
« Reply #6 on: January 09, 2015, 05:53:18 pm »
Thanks Falko!  That shows where its at in the code. :)

But I looked some more and found where it is defined in the language yml file.

/data/Language/en-US.yml

That clears up alot for me.  I never really looked at any of the stuff in the Language folder. XD

--- posts merge ---

I finally got around to this.  Can't believe it took me so long. :-\

    

I'll be publishing version 2.0 of the Commendations UFOpedia Mod soon with this implemented.
« Last Edit: January 25, 2016, 09:10:06 am by Solarius Scorch »