OpenXcom Forum

Modding => Work In Progress => Topic started by: robin on November 29, 2014, 11:57:11 pm

Title: Rename an ufopaedia section? (SOLVED)
Post by: robin 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
Title: Re: Rename an ufopaedia section? (SOLVED)
Post by: ivandogovich 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
Title: Re: Rename an ufopaedia section? (SOLVED)
Post by: ivandogovich 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
Title: Re: Rename an ufopaedia section? (SOLVED)
Post by: yrizoud 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)
Title: Re: Rename an ufopaedia section? (SOLVED)
Post by: ivandogovich 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
Title: Re: Rename an ufopaedia section? (SOLVED)
Post by: Falko 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
Title: Re: Rename an ufopaedia section? (SOLVED)
Post by: ivandogovich 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. :-\

(https://i.imgur.com/CbsedUQ.png)   (https://i.imgur.com/Nwx84bT.png) 

I'll be publishing version 2.0 of the Commendations UFOpedia Mod soon with this implemented.