• 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!

Fixed Drinking and Gambling at the Tavern

the soldiers on weird places I'm working on. It has something to do with the order they are created in and need to reverse that so story characters are generated first and I can check which locators are still "open".
The rest of the things work fine as far as I know....
 
So can anyone already confirm the drinking bugs?
 
I did notice btw that some of the enc encounters in the tavern seem to have dialog problems. One asks to play games but doesn't work. Could be this is just unfinnished but it does have to be fixed.
 
Uh? The games should work fine. Or is it just one particular guy for who it doesn't work? UH??? o_O
 
its the encounter guy. they have another dialog thing and it asks if you wanna play but you can't choose then. Probally never fully implemented.
 
This one is confirmed bug, but I am not sure if I reported it before...

What generally happens 30% of the time (only under certain circumstances).. when the table is full of people and you talk to the guy for gambling from BEHIND him.. once you accept to play.. you then sit behind him and NOT on the table...


Whether you win or lose, it then becomes a glitch and the character cannot move from location, even when you save/reload the file...


Now this ONLY happens when the table is full and you ask the man to play gambling from behind him.. however if there is room on the table, you either sit normal or sit on someone else and you can see their texture hovering over your character's texture.


I'll try to post save/img when I go through this problem again.
But has anyone reported this issue before?
 
Please post a savegame where this is the case (before you talk to him)
 
  • Like
Reactions: A.H
Just a note to say I managed to trigger an instance in Martinique - not exactly the same because the dialogue to finish and exit from talking to the drinking companion did happen but I was locked sitting by (not exactly "at") the table. So I am looking into this one - doesn't mean I will get any clue as to what and how of course :read
 
Just a note to say I managed to trigger an instance in Martinique - not exactly the same because the dialogue to finish and exit from talking to the drinking companion did happen but I was locked sitting by (not exactly "at") the table. So I am looking into this one - doesn't mean I will get any clue as to what and how of course :read
Can you remind me what was this particular problem was again? I don't remember now.... :oops:
 
In a tavern (probably any tavern but yet to prove that - I thought it worked OK at Speightsown - so will have to check that again) when you talk and drink with the drinker if you follow through to where you threaten him the landlord steps in but you do not get to exit the table scene and are stuck. Got a similar effect when on another approach the drinker was now a gambler, when I said lets play but then changed my mind on getting game choices again I didn't exit the table properly.

I have a number of different compiles now showing which cases are executed in various scenarios because they differr from run through to run through (sometimes you get mugged whilst drinking etc)- it looks like it is supposed to be a teleport exit within the tavern scene - which isn't being properly triggered.

EDIT first post in the thread lays it out pretty well
 
Well I think I was wrong, not any tavern after all, the sitting bug I found probably only happened reliably at Martinique (except I later found a case which would have stuck in Nevis -see below) so I was lucky to stumble across it (and was right that it had worked at Speightstown).

Actually in the end I found four problems.

The first related to getting stuck sitting when exiting from drinking or gambling in certain cases. I think it only applied to Martinique and arose partly because of a lack of seating for PChar - @Pieter Boelen had already noted this in line 3016 in quests.common with "//PB FdF empty?". However the clever "habitue.location" workaround places PChar sitting in the air near the NPC drinker/gambler you are dealing with but on exit PChar is not at a "sit" locator so LAi_Fade to the next case does not happen in case exit_sit. Since I can't imagine this case being called if you're NOT sitting perhaps the if limitation could be removed - but for now I have just stuck the same LAi_Fade at the end of the case to be enacted whenever exit_sit is called - since everything else in the if condition is repeated in the next case anyway.

The second problem was despite the fight with a soldier outside the tavern being OK in the first post in the thread it was not working at Martinique. This was due to a wrong PChar.location switch test in "drink_speak_with_soldier" in quests_common.c, which was also wrong for pirate_fort and smugglers_lair so they would have locked up too.

The third issue (as per first post in the thread) is the conversation you are meant to have with the officiant (who is also the "waitress") when you have passed out from drink. I have found how to get this to happen reliably and applied the "fix" for FdF in "saved_by_off". The resultant dialogue looks like it was written for a bedroom scene and I don't know if it is actually used elsewhere in the quests or storylines. The changes I made could alter how a different use would pan out - so I only did the FdF one for now (in case I'm wasting my time) but it did require a change in eng_officiant.c which would be called everywhere.


If you have a look at the FdF case and decide you want that added to the other locations too just let me know.

I think the drinking and gambling stuff should then be OK but as always it remains to be tested.

However the last issue was at Nevis the placement code in "alc_2_prepare":, referred to as missing for FdF above, in this case placed me on a gentleman's lap. However another gambler came in and sat at the same table (but not at not one of the pre-set locations) and talking with him saw me "sitting" at the side of the table as in FdF. I wonder if turning of the hard coded placement and allowing the "habitue.location" approach to find you a "seat" would be an improvement. I don't know how often you are placed in an occupied location to judge.
 

Attachments

  • drinking fix.7z
    32.4 KB · Views: 121
Cool! Have installed this in my game now for inclusion in the next update. :doff

I think @Levis did some stuff with the officiants and bedroom scenes with them, so perhaps he is better suited to comment on this.
Personally I never spent that much time in the taverns.... :oops:
 
I think these scenes you talk about are for the resurrection
 

Yes, sure is.

The not being able to move after is what I (think I) have fixed. Sitting behind is an extreme example the "habitue.location" just tries to find the nearest position. This happened at either FdF or another tavern if the character you were engaging with was not in one of the hard-coded locations but a random generation. In the case I looked at the locator returned "reload" so the test for a "sit" locator stopped the execution of the release from sitting.

The sitting on a lap is a result of the hard-coded locations in all but FdF tavern in case "ale_2_prepare" in quest.common.c (my fourth issue above). If the game AI has already place a random character there the hard-coding doesn't recognise the fact and you get the double placement (and can sort of see both characters). This happens even if there are other free seats at the table. So that aspect isn't fixed as yet. This one didn't lock the game because at least you were actually at a "sit".

BTW It is not resurrection where the dialogues are used. As far as I can see only two dialogue lines seem to be re-used (in case "after_love") and they make the least sense in the middle of a tavern -so I am skipping those anyway for the "without_money" dialogues in eng_officiant_dialog.c. However there is a -1 hit on reputation which doesn't make much sense for getting drunk and being robbed, which is part of why I thought there was a "bedroom" angle.
 
The not being able to move after is what I (think I) have fixed. Sitting behind is an extreme example the "habitue.location" just tries to find the nearest position. This happened at either FdF or another tavern if the character you were engaging with was not in
Would using LAi_FindRandomLocator("sit") be of any help? If I recall, that function should only return empty locators.
But of course that doesn't mean it is a locator near to where you were standing, so you might end up anywhere in the tavern. :facepalm

BTW It is not resurrection where the dialogues are used. As far as I can see only two dialogue lines seem to be re-used (in case "after_love") and they make the least sense in the middle of a tavern -so I am skipping those anyway for the "without_money" dialogues in eng_officiant_dialog.c. However there is a -1 hit on reputation which doesn't make much sense for getting drunk and being robbed, which is part of why I thought there was a "bedroom" angle.
There IS a bedroom angle there which works once you reach rank 4/5. @Levis definitely made some updates to that as well.
 
Back
Top