OpenCAGE icon indicating copy to clipboard operation
OpenCAGE copied to clipboard

PopUpMessage function precedes header or main text string with "Text_"

Open ghramsey opened this issue 2 years ago • 10 comments

Trying to use PopUpMessage function. Triggered it following collecting a keycard I spawned.

I added text for header_text and main_text. The output is adding 'TEXT_" before the text I added. 20240107172820_1

Not sure if this is a bug or not. If it's not then tell me how to correctly format the text please.

ghramsey avatar Jan 07 '24 23:01 ghramsey

Could you screenshot the entity & parameters in the script editor, and the localisation you've used (if you have)?

MattFiler avatar Jan 08 '24 10:01 MattFiler

I actually worked around this using tutorialmessage vs popupmessage so I deleted what I was using. I posted on discord though. Here's one of the screenshots. This is a variant of the text originally posted above w/ the header removed, but it was same result. The word "TEXT_" apended to the start of the string.
screenschot1

I also tried gathering it from a variable in the OBJECTIVE.TEXT file and it merely appened TEXT_ to the variable name not the data.

In the past I think you said that if localization is not needed text may be used directly, but perhaps that is not the case here. I don't know what to use then though.

20240107182510_1 I also tried leaving the fields blank at one point and I get two lines of TEXT_

ghramsey avatar Jan 08 '24 19:01 ghramsey

Huh interesting. I'll leave this open to investigate but suspect it may be a base game bug? Have you validated against any uses of it elsewhere from the vanilla paks?

MattFiler avatar Jan 08 '24 20:01 MattFiler

Ok yeah I just double checked - the only two instances of PopupMessage being used are:

  • ARCHETYPES\SCRIPT\MISSION\CHECKPOINT on TECH_HUB, where it's used seemingly for a legacy/debug objective update popup on M06_PT02 (you can tell it's not intended for retail as it doesn't use a localised string)
  • REQUIRED_ASSETS\PICKUPS\PLASTIC_CONTAINER_BOMB which is in every map since it's in required assets, but it's again only used for a legacy/debug new objective popup from the LV426 mission

What made you pick PopupMessage? It seems like it's an old entity type which isn't intended to be used in the final game. I suspect the TEXT_ prefix is a result of that.

If you're making custom objectives I'd recommend using the proper objective system entities.

MattFiler avatar Jan 08 '24 20:01 MattFiler

Ok, just checked out the decompilation of the iOS port and it is indeed applied at an engine level: image

Not anything I can do in the script editor unfortunately, would require patching the game's executable.

As I say, I'd recommend using the proper objective system entities 👍

MattFiler avatar Jan 08 '24 20:01 MattFiler

For future reference btw, I dumped some pages that you may find useful for situations like this:

MattFiler avatar Jan 08 '24 21:01 MattFiler

So essentially don't use that command. It's a depricated, little-used command even in the original game.

I just chose what was there as a function to display a simple message.
I didn't want to go to the trouble of setting an objective.

I just needed it to say that the keycard I placed was collected. It's purely a feedback message. The message was what I figured to be fastest method. I ended up using a tutorial message instead w/ a 3 second delay.
Gets the job done. Only difference was the popupmessage function seems to have the duration and such integral vs needing to create an external logic delay.

Thank you for the help.
I dislike making tickets unless it truely is a bug or something unsolvable otherwise.

ghramsey avatar Jan 09 '24 01:01 ghramsey

No probs! It's nice that we're at the level now where bug tickets are reporting issues with the game's engine and not my tools to be honest 😅

MattFiler avatar Jan 09 '24 13:01 MattFiler

I'm gonna re-open this ticket. PopupMessage actually seems quite handy to display quick UI prompts, so it'd be nice to be able to use it. I can get OpenCAGE to patch the binary to fix the TEXT_ prefix.

MattFiler avatar Feb 25 '24 10:02 MattFiler

OpenCAGE now patches this :)

MattFiler avatar Feb 26 '24 19:02 MattFiler

Cool!

ghramsey avatar Feb 27 '24 14:02 ghramsey