ShowSelectionTextPopup

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
AnthonyBF2
Sith
Sith
Posts: 1255
Joined: Wed Aug 21, 2013 3:55 pm
Projects :: PS2+PSP Overhaul

ShowSelectionTextPopup

Post 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.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: ShowSelectionTextPopup

Post 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.
User avatar
AnthonyBF2
Sith
Sith
Posts: 1255
Joined: Wed Aug 21, 2013 3:55 pm
Projects :: PS2+PSP Overhaul

Re: ShowSelectionTextPopup

Post 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.
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: ShowSelectionTextPopup

Post by Teancum »

Does it return a value? That might be something we could catch and replace with something else.
User avatar
AnthonyBF2
Sith
Sith
Posts: 1255
Joined: Wed Aug 21, 2013 3:55 pm
Projects :: PS2+PSP Overhaul

Re: ShowSelectionTextPopup

Post 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
Post Reply