• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Need Help Tavern_2 from New Horizons

@Myth: The new lighting files do work in PoTC:NH and certainly make a difference at night. Thanks again!:onya

About the third door: your location code includes this line:
Code:
Locations[n].models.always.door_chapel = "door_chapel";
In PoTC:NH, that is only used for a special variant of "Tavern_2" used in one particular storyline. The standard "Tavern_2" which can be visited in Havana and Cartagena has no such line, therefore no third door, and nowhere for it to lead. So for PoTC:NH, I'll stick with the locator file I created by adding your candle locators to the original file and then swapping "reload1" and "reload2".
 
@Myth: The new lighting files do work in PoTC:NH and certainly make a difference at night. Thanks again!:onya

About the third door: your location code includes this line:
Code:
Locations[n].models.always.door_chapel = "door_chapel";
In PoTC:NH, that is only used for a special variant of "Tavern_2" used in one particular storyline. The standard "Tavern_2" which can be visited in Havana and Cartagena has no such line, therefore no third door, and nowhere for it to lead. So for PoTC:NH, I'll stick with the locator file I created by adding your candle locators to the original file and then swapping "reload1" and "reload2".

In any case, I had to connect the third door, otherwise it was left without files of light. And when I connected it, I realized that for myself I can leave for the whole time. It came in handy: I did not want to make the door to the room on the first floor.
 
Recently, I corrected the locator file: I added a locator for the sound of fire from the furnace.
 
Which locator is that? I've found locators called "fireplace01", group "sound", in a few locator files for places that should have fires. PoTC doesn't seem to take any notice of them; there is no sound of firewood in any of those places, and if I add a similar locator to "tavern2_l.gm", it doesn't seem to have any effect.

It may be that this sound effect is yet another feature which Akella didn't get working in time for the release of PoTC but did get working in CoAS, and possibly even in AoP.
 
It may be that this sound effect is yet another feature which Akella didn't get working in time for the release of PoTC but did get working in CoAS, and possibly even in AoP.
The sound system in PotC:NH has been rewritten several times by modders. I wonder if some of that work might have broken existing functionality.
Perhaps this did work in the unmodded game?
 
The sound system in PotC:NH has been rewritten several times by modders. I wonder if some of that work might have broken existing functionality.
Perhaps this did work in the unmodded game?

Correct. I just compared the original POTC code to NH and it was correct in POTC, was altered in NH, which negated this feature for NH.
 
Could you point out where it was altered in NH? Perhaps it can be corrected back, preferably without breaking any other sound effects in NH.
 
Could you point out where it was altered in NH? Perhaps it can be corrected back, preferably without breaking any other sound effects in NH.

I've not verified it is working/not working in NH, but based on the claim made here that it does not seem to be, it might be the isDigit function is not working as intended? Or perhaps within the while loop, the strLen is not actually adjusting the length simultaneously within script, like would be expected?

Original POTC void SetStaticSounds (from sound.c):

locatorType = strcut(locatorName, 0, locatorNameLength-3);

NH SetStaticSounds:

string LocatorType = locatorName;
while (isDigit(locatorType, strLen(locatorType)-1)) locatorType = strLeft(locatorType, strLen(locatorType)-1);
 
Frankly, if I might add...I think it's a terrible idea to use a while condition based on the continually truncated string within the loop, unless absolutely necessary. In this case, it would have been much smarter to simply conform to the original naming convention that the locator names for these to contain the two digit append (e.g. name01, name02). I highly doubt any model would need more than 100 sound locators; should have just kept it the way it was. Of course, by now, there may probably be models in NH containing name1, or name001, just name, which changing this function back would certainly break.
 
The sound system in PotC:NH has been rewritten several times by modders. I wonder if some of that work might have broken existing functionality.
Perhaps this did work in the unmodded game?
I have the unmodded game on my hard drive, normally used only as a base from which to create a new NH install, but it means I was able to check this. There should be two fireplaces in Oxbay, one in the town and one in the tavern, and I can't here fireplace sounds at either of them. Possibly there's something odd about my system, which would then perhaps be why I can't hear fireplace sounds in NH either.
I've not verified it is working/not working in NH, but based on the claim made here that it does not seem to be, it might be the isDigit function is not working as intended? Or perhaps within the while loop, the strLen is not actually adjusting the length simultaneously within script, like would be expected?
There's a 'TraceAndLog' command right after the 'while' line, currently commented out, which shows both the original "locatorName" and the derived "locatorType". When I uncommented it, it showed that the type was being correctly set to "fireplace". Moreover, in NH, this tavern is in Havana town centre, which should have a couple of locator based sounds of its own, including a fountain, and I don't hear any sound from that either. Sound locator "fountain01" was correctly truncated to locatortype "fountain" - in fact, the report from that 'TraceAndLog' was what made me check the fountain.
 
In that case... We have had problems with "sounds dropping out of the game" when there are too many different sounds defined.
That was actually the whole reason why the sound system was rewritten (twice) in the first place.
Could it be that we have too many sounds defined again? There are different places to define sounds and ideally the "new" method should be used.

@Jack Rackham and @Grey Roger: Where and how do you normally define sounds that you add into the game?
 
For special fireplaces I have done it by making sound loops in questrection.c.

Maybe this could be a way:
See PROGRAM\Locations\particles.c. Here particle effects are linked to certain locators. My guess is this should be
possible with sounds as well.
A first test could be to add a burning sound for locator "fire" in Tortuga at night.
 
Sounds other than music appear to be defined in "RESOURCE\ALIASES\sound_alias.ini". Various sounds are defined in there, including sounds for gunshots (which work), ambient sounds such as people talking in a tavern (which work), and locator-based sounds such as the fireplace (which don't work). Besides, if the game calls for a sound which either isn't defined or doesn't have the actual sound file which the definition wants, there's a message in "system.log". There's even a message if the file does exist but it's the wrong format and the game can't play it. There are no messages for the fireplaces which aren't making sounds.
 
Back
Top