[FIX] Sound looping in tavern and arena

Users who are viewing this thread

Fix for ambient sound.

This fix is imported from Viking Conquest. Adaptation for clean Prophecy of Pendor 3.9.5.1.

1. Variables
1) File: variables.txt
2) Add new
ambiance_channel
3) Find ID
144115188075857320

2. Tavern
1) File: mission_templates.txt
2) Mission: town_default
3) Find:
-19.000000 0.000000 0.000000 0 10 1 1 936748722493063512 1 1 936748722493063752 31 2 144115188075856124 4 600 1 1152921504606847613 4 0 31 2 144115188075856216 1 1 2 936748722493063677 16384 5 0 1 2 936748722493063677 512 3 0
4) Increase counter "10" to +1
-19.000000 0.000000 0.000000 0 11
4) After
600 1 1152921504606847613
Insert
615 1 144115188075857320 (replace ambiance_channel ID)
5) Result
-19.000000 0.000000 0.000000 0 11 1 1 936748722493063512 1 1 936748722493063752 31 2 144115188075856124 4 600 1 1152921504606847613 615 1 144115188075857320 4 0 31 2 144115188075856216 1 1 2 936748722493063677 16384 5 0 1 2 936748722493063677 512 3 0 (don't forget a space in the end)
6) Find and delete 3 triggers
-30.000000 0.000000 0.000000 0 2 609 1 1 2133 2 144115188075856124 0 -23.000000 0.000000 0.000000 0 2 609 1 1 2133 2 144115188075856124 0 -29.000000 0.000000 0.000000 0 2 609 1 1 2133 2 144115188075856124 0
7) Decrease counter of mission town_default: -3
:cool: Find
-21.000000 0.000000 0.000000 4 4 0 31 2 144115188075855932 0 2075 1 1 3 0 0
And replace with
(ambiance_channel ID replace in the next line - 3 instances)
-21.000000 0.000000 0.000000 4 31 2 144115188075855932 0 2075 1 1 609 0 30 1 144115188075857320 2 616 1 144115188075857320 2133 2 144115188075857320 -1 (don't forget a space in the end)

(ti_tab_pressed, 0, 0,
[
(eq, "$g_main_attacker_agent", 0),
(set_trigger_result, 1),
(stop_all_sounds),
(ge, "$ambiance_channel", 0),
],[
(stop_sound_channel, "$ambiance_channel"),
(assign, "$ambiance_channel", -1),
]),

3. Arena
1) File: mission_templates.txt
2) Mission: arena_melee_fight
3) Find:
0.200000 0.000000 100000000.000000 0 3 31 2 144115188075856124 3 600 1 1152921504606847346 1 2 936748722493063677 134217728
4) Increase counter +1
0.200000 0.000000 100000000.000000 0 4
5) After
600 1 1152921504606847346
Add
615 1 144115188075857320 (replcae ambiance_channel ID)
Result
0.200000 0.000000 100000000.000000 0 4 31 2 144115188075856124 3 600 1 1152921504606847346 615 1 144115188075857320 1 2 936748722493063677 134217728
6) Find two triggers
-30.000000 0.000000 0.000000 0 2 609 1 1 2133 2 144115188075856124 0
-29.000000 0.000000 0.000000 0 2 609 1 1 2133 2 144115188075856124 0
Increase counters +5
-30.000000 0.000000 0.000000 0 7 609 1 1 2133 2 144115188075856124 0
-29.000000 0.000000 0.000000 0 7 609 1 1 2133 2 144115188075856124 0
Add this code to the end of each trigger
4 0 32 2 144115188075857320 -1 616 1 144115188075857320 2133 2 144115188075857320 -1 3 0 (replace ambiance_channel ID)
Result
-30.000000 0.000000 0.000000 0 7 609 1 1 2133 2 144115188075856124 0 4 0 32 2 144115188075857320 -1 616 1 144115188075857320 2133 2 144115188075857320 -1 3 0
-29.000000 0.000000 0.000000 0 7 609 1 1 2133 2 144115188075856124 0 4 0 32 2 144115188075857320 -1 616 1 144115188075857320 2133 2 144115188075857320 -1 3 0

4. Potential bugs
This sounds can loop potentially. So report bugs and I will post fixes.

rain fire_loop torch_loop fire_loop_loud town_ambiance dedal_tavern_lute dedal_tavern_lyre
 
Last edited:
Thanks for solution but this looks complex...
Best solution is to re-start game. For me it happens so rarely that a restart is probably good anyways so I can go do something else for a bit.
 
Is is the laughing sound ? For me sometimes, after i visit a tavern, that sound remains and i can hear it on menus over and over (like on the reports page). It's realy annoying.
 
As an easyier "fix" to make it less annoying not to fix the actual bug, i found that sound and replaced it with the null one. So now it doens't bother
me anymore, even if it's still there.
It was in Sounds folder (below pop module folder). Called "tavernsound.ogg", i appended an ".old" to its name for backup. Then copy the "null.ogg" from the Music folder in the Sounds folder with the name "tavernsound.ogg" . I had no notable issues with the game for doing this.
 
Last edited:
Back
Top Bottom