aliens

Author Topic: Replacing text in Ufopedia after research.  (Read 2018 times)

Offline Docent

  • Colonel
  • ****
  • Posts: 101
    • View Profile
Replacing text in Ufopedia after research.
« on: March 26, 2022, 03:46:00 pm »
Hi all!
I want a completed research to change the description of a certain item in the ufopedia.
How do I do this?
I made a copy of this item, which is available initially. After researching, the original appears. How do I hide the copy? The problem is that this item is available from the beginning of the game and if I make a research to it that should be cancelled (I understand how to do that), how do I make that research be completed before the game starts?
Or is there some other way?

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1512
    • View Profile
Re: Replacing text in Ufopedia after research.
« Reply #1 on: March 26, 2022, 06:31:35 pm »
You want to use a TRUE research trigger on version 2 of the report, so that it only appears after research X. Then you want a FALSE research trigger on version 1, so that when research X is finished, it disappears. If both reports use the same format and title, it will appear to the end user that it is only one report but that its text has been updated.

Make sure the research uses two separate entries: the first one shows up in the research list and has the full cost, and the second is hidden and has zero cost but is unlocked automatically when the first one finishes. One of these will be maintained permanently and enables access to items or other stuff; the other is tied to the UFOPedia report so that it can be removed without affecting anything else.

https://www.ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom)#Arc_Scripts

- - - - -

I feel like I understand it correctly but I haven't done it before, so let me know if anything doesn't go as planned.
« Last Edit: March 26, 2022, 06:37:20 pm by The Reaver of Darkness »

Offline Docent

  • Colonel
  • ****
  • Posts: 101
    • View Profile
Re: Replacing text in Ufopedia after research.
« Reply #2 on: March 26, 2022, 10:57:10 pm »
Thanks for the answer. The logic seems to be clear. If I have any questions on the technical side - I will write)