Page 1 of 1

ShowSelectionTextPopup

Posted: Fri Sep 08, 2017 8:50 am
by AnthonyBF2
From time to time I scroll around BattlefrontII.exe in the hex editor and look for things that peak my interest, usually things I didn't see before and experiment with it. Just now I found something known as ShowSelectionTextPopup. I've never seen this function before and checked all of the stock .lvl files and found no references that are using it.

In the stock tatooine assault script I put the following bit of code to try and test what will happen when I use ShowSelectionTextPopup;
Hidden/Spoiler:
[code]OnCharacterDeath(
function(character)
if IsCharacterHuman(character) then
ShowSelectionTextPopup("ifs.stats.meat")
end
end
)[/code]
Now what is happening is that when the game detects that I died it displays the localize string that presents the message Bantha Fodder.
The test is successful and yields weird results.
It does display the right message Bantha Fodder but it also displays two more messages Obi-wan and Anakin with a blank white square. I am assuming this is a texture or perhaps a missing texture. It also freezes the game until I pause and unpause at which point I finish dying and respawn.

The following screenshot shows the results I described above:
Hidden/Spoiler:
Image
Now the purpose of posting this is to see if anyone else has discovered this function and what to do with it or what purpose it serves.

Re: ShowSelectionTextPopup

Posted: Fri Sep 08, 2017 2:07 pm
by Marth8880
This is all the documentation I have on it (from https://github.com/marth8880/SWBF2-Lua- ... clua#L1167 ):

Code: Select all

--------------------------------------------------------------
-- Shows the specified localized text in a selection popup. Used in spa2c_c for choosing control layout making but not for PC?!
-- 
-- @param #string text		Path to localized text to show (example: `"level.spa2.objectives.popup.selectConfig"`)
function ShowSelectionTextPopup(text) end
From what I remember based on my findings when I did a lookup of the function in the stock scripts, I believe it's used exclusively on console. Could be wrong, though.

Re: ShowSelectionTextPopup

Posted: Fri Sep 08, 2017 10:36 pm
by AnthonyBF2
Marth8880 wrote:This is all the documentation I have on it (from https://github.com/marth8880/SWBF2-Lua- ... clua#L1167 ):

Code: Select all

--------------------------------------------------------------
-- Shows the specified localized text in a selection popup. Used in spa2c_c for choosing control layout making but not for PC?!
-- 
-- @param #string text		Path to localized text to show (example: `"level.spa2.objectives.popup.selectConfig"`)
function ShowSelectionTextPopup(text) end
From what I remember based on my findings when I did a lookup of the function in the stock scripts, I believe it's used exclusively on console. Could be wrong, though.
I don't recall being asked to change controls in PS2 or PSP Space Coruscant mission, but thanks anyway.

Re: ShowSelectionTextPopup

Posted: Sat Sep 09, 2017 2:13 am
by Teancum
Does it return a value? That might be something we could catch and replace with something else.

Re: ShowSelectionTextPopup

Posted: Sat Sep 09, 2017 10:16 am
by AnthonyBF2
Teancum wrote:Does it return a value? That might be something we could catch and replace with something else.
I'm not sure how to answer that. I am a code noob. Let's hope Zerted stops by or another high level code person. :P