PA Expansion Hook
Moderator: JeremyaFr
PA Expansion Hook
-
- Posts: 218
- Joined: Mon Dec 08, 2014 10:59 pm
Hello folks,
This hook will allow one to expand the number of public announcements in the concourse.
v1.2
- Better detection of Wav files
Download and source link here: xwa_hook_pa_expansion.zip
This hook will allow one to expand the number of public announcements in the concourse.
v1.2
- Better detection of Wav files
Download and source link here: xwa_hook_pa_expansion.zip
Last edited by Justagai on Thu Jun 27, 2019 2:29 am, edited 1 time in total.
- ual002
- Posts: 983
- Joined: Wed Sep 24, 2008 2:23 am
Here is a link to my Imperial PA re-voice/re-master thread. It includes several additional Imperial announcements that utilize this hook.
Imperial Install PA System Wave edits
Here is a direct DL:
Imperial Install Concourse Wave edits.7z
Imperial Install PA System Wave edits
Here is a direct DL:
Imperial Install Concourse Wave edits.7z
- Darksaber
- Posts: 10931
- Joined: Mon Jan 10, 2000 12:01 am
- Contact:
@Justagai
Quick Q. What if you have the Extra PA's set to say 10 in the cfg file, but those wave files don't exist in the Wave/Frontend folder, will this be ignored??
I only ask as if I add ual002's new PA waves to the DSUCP, they will only be installed if the Imperial Concourse is installed, but the Hook_PA_Expansion.dll and Hook_PA_Expansion.cfg will be installed regardless of what Concourse is installed.
Thanks
Quick Q. What if you have the Extra PA's set to say 10 in the cfg file, but those wave files don't exist in the Wave/Frontend folder, will this be ignored??
I only ask as if I add ual002's new PA waves to the DSUCP, they will only be installed if the Imperial Concourse is installed, but the Hook_PA_Expansion.dll and Hook_PA_Expansion.cfg will be installed regardless of what Concourse is installed.
Thanks
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate
Good Things Come To Those Who Wait....
Darksaber's X-Wing Station
- John Lydgate
Good Things Come To Those Who Wait....
Darksaber's X-Wing Station
- ual002
- Posts: 983
- Joined: Wed Sep 24, 2008 2:23 am
I follow what you are saying, Justagai will have to confirm.
If however it causes issues. I can also record some rebel friendly equivalents for those 10 expansion PAs. This way if playing with this stuff fancies anyone, they have 10 expansion examples for both rebel and Imperial.
If however it causes issues. I can also record some rebel friendly equivalents for those 10 expansion PAs. This way if playing with this stuff fancies anyone, they have 10 expansion examples for both rebel and Imperial.
- Trevor
- Posts: 541
- Joined: Thu Dec 04, 2014 7:11 pm
Awww, make some rebel ones too...
Can the concourse be made to go to red-alert for "defend the liberty"?
Maybe have "General Quarters, General Quarters. All hands man your battle stations. The route of travel is forward and up to starboard, down and aft to port. Set material condition 'Zebra' throughout the ship. Reason for General Quarters: Inbound hostiles - KLAXON"
Trev
Can the concourse be made to go to red-alert for "defend the liberty"?
Maybe have "General Quarters, General Quarters. All hands man your battle stations. The route of travel is forward and up to starboard, down and aft to port. Set material condition 'Zebra' throughout the ship. Reason for General Quarters: Inbound hostiles - KLAXON"
Trev
Last edited by Trevor on Wed Jun 26, 2019 6:45 pm, edited 1 time in total.
-
- Posts: 218
- Joined: Mon Dec 08, 2014 10:59 pm
If its one of the extra PAs then the announcement would attempt to play but nothing would play. The game would not crash or anything like that.Darksaber wrote: ↑Wed Jun 26, 2019 6:24 am@Justagai
Quick Q. What if you have the Extra PA's set to say 10 in the cfg file, but those wave files don't exist in the Wave/Frontend folder, will this be ignored??
I only ask as if I add ual002's new PA waves to the DSUCP, they will only be installed if the Imperial Concourse is installed, but the Hook_PA_Expansion.dll and Hook_PA_Expansion.cfg will be installed regardless of what Concourse is installed.
Thanks
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate
Good Things Come To Those Who Wait....
Darksaber's X-Wing Station
- John Lydgate
Good Things Come To Those Who Wait....
Darksaber's X-Wing Station
- JeremyaFr
- Posts: 4001
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
Hello,
Instead of requiring a config file value, you can count the wav files in "\WAVE\FRONTEND\" starting with "T01PA".
Instead of requiring a config file value, you can count the wav files in "\WAVE\FRONTEND\" starting with "T01PA".
- ual002
- Posts: 983
- Joined: Wed Sep 24, 2008 2:23 am
Here's 10 rebel expansion files so someone at least has a template.
https://www.dropbox.com/s/219zryf9hjtt7 ... on.7z?dl=0
https://www.dropbox.com/s/219zryf9hjtt7 ... on.7z?dl=0
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate
Good Things Come To Those Who Wait....
Darksaber's X-Wing Station
- John Lydgate
Good Things Come To Those Who Wait....
Darksaber's X-Wing Station
-
- Posts: 218
- Joined: Mon Dec 08, 2014 10:59 pm
Hey Jeremy, I've added the code to count the number of PA wavs but it doesn't seem to be getting any. What am I doing wrong?
Here is the code:
Here is the code:
Code: Select all
int GetNumOfExtraPA()
{
int PACount = 0;
for (const auto& file : std::experimental::filesystem::directory_iterator(".\Wave\Frontend"))
{
if (file.path().extension().string() != ".wav")
{
continue;
}
const auto& filename = file.path().filename().string();
if (filename.find("T01PA") != 0 && filename.find("t01pa") != 0)
{
continue;
}
++PACount;
}
return PACount - 37;
}
- JeremyaFr
- Posts: 4001
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
Replace ".\Wave\Frontend" with ".\\Wave\\Frontend".
- JeremyaFr
- Posts: 4001
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
Also, try to make a case-insensitive comparison for ".wav".
-
- Posts: 218
- Joined: Mon Dec 08, 2014 10:59 pm
Ok, so something like this:
Code: Select all
if (file.path().extension().string() != ".wav" && file.path().extension().string() != ".WAV")
{
continue;
}
-
- Posts: 218
- Joined: Mon Dec 08, 2014 10:59 pm
Updated to 1.1, no longer needs the config and there is no limit on the amount of expanded PAs.
- Trevor
- Posts: 541
- Joined: Thu Dec 04, 2014 7:11 pm
Justagai, why not do
Trev
Code: Select all
if (toupper(file.path().extension().string()( != ".WAV")
{
continue;
}
-
- Posts: 218
- Joined: Mon Dec 08, 2014 10:59 pm
That works. I'll put it in for the next version.
- Darksaber
- Posts: 10931
- Joined: Mon Jan 10, 2000 12:01 am
- Contact:
Does it work for lower case files though?
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate
Good Things Come To Those Who Wait....
Darksaber's X-Wing Station
- John Lydgate
Good Things Come To Those Who Wait....
Darksaber's X-Wing Station
- Trevor
- Posts: 541
- Joined: Thu Dec 04, 2014 7:11 pm
it should do since you take the string and make it upper case before comparing.
in = ".wav", ToUpperCase = .WAV, compare ".WAV" == ".WAV" = true
so, ".wav" = ".WAV" = ".WaV" = ".wAv" … etc
Trev
in = ".wav", ToUpperCase = .WAV, compare ".WAV" == ".WAV" = true
so, ".wav" = ".WAV" = ".WaV" = ".wAv" … etc
Trev
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate
Good Things Come To Those Who Wait....
Darksaber's X-Wing Station
- John Lydgate
Good Things Come To Those Who Wait....
Darksaber's X-Wing Station
-
- Posts: 218
- Joined: Mon Dec 08, 2014 10:59 pm
Updated to 1.2 with better detection of Wav files.
- keiranhalcyon7
- Posts: 599
- Joined: Tue Jan 02, 2018 6:41 am
Close all shops in the mall. Cancel the three ring circus. Secure all animals in the zoo.Trevor wrote: ↑Wed Jun 26, 2019 5:37 pmAwww, make some rebel ones too...
Can the concourse be made to go to red-alert for "defend the liberty"?
Maybe have "General Quarters, General Quarters. All hands man your battle stations. The route of travel is forward and up to starboard, down and aft to port. Set material condition 'Zebra' throughout the ship. Reason for General Quarters: Inbound hostiles - KLAXON"
Trev