MattFiler / OpenCAGE

A modding toolkit for Alien: Isolation that gives access to scripting, assets, configurations, and behaviour trees.
http://opencage.co.uk
MIT License
274 stars 13 forks source link

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

Closed ghramsey closed 8 months ago

ghramsey commented 11 months ago

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

I added text for header_text and maintext. 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.

MattFiler commented 11 months ago

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

ghramsey commented 10 months ago

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_

MattFiler commented 10 months ago

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 commented 10 months ago

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

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 commented 10 months ago

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 commented 10 months ago

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

ghramsey commented 10 months ago

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.

MattFiler commented 10 months ago

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 commented 9 months ago

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 commented 9 months ago

OpenCAGE now patches this :)

ghramsey commented 9 months ago

Cool!