I've been working on replacing all the "DLG_TEXT" references in "gamble.c" with 'XI_ConvertString', copying all the required lines from "Habitue_dialog.h" into "common.ini". The result is that "gamble.c" no longer relies on the dialog file, which means I'm finally rid of the error messages about repeated declaration of "DLG_TEXT". In doing so, I found two weirdnesses and one bug relating to the poker quest.
Weirdness 1: before I did all this, your opponents in the tournament didn't prompt you when to raise, which is why I never figured it out until
@pedrwyth gave detailed instructions. With the line prompting you to raise now using 'XI_ConvertString', the opponents in the tournament do now prompt you. I can't find any explicit code to prevent the tournament opponents giving the prompt, though it would be easy enough. So,
@pedrwyth and
@Jack Rackham, do you want the tournament opponents to tell you when you can raise?
Weirdness 2: with all the "DLG_TEXT" replaced by 'XI_ConvertString', I commented out the 'string DLG_TEXT[162]' line at the top of "gamble.c". After that, the tournament reliably crashed when I sat down for the third game. Putting back the line, even declaring it as 'string DLG_TEXT[1]', made the third day work. The only difference I could see was that, in dialog file "Poker Twins_dialog.c", case "Gambling2" has the code for setting up "Gambler 3" in a different order from the code for "Gambler 2" in case "Gambling1". I copied the code from "Gambling1" into "Gambling2", changed the character name, put back the lines giving the trophy to Ron, and after that the tournament worked perfectly.
Bug: after winning the tournament, I continued my gambling career in Port Royale tavern, where poker was still labelled "Day Three". "gamble.c" checks attribute "quest.poker.day" to decide whether to override the default title "Poker", and the attribute is presumably still set after the tournament is over. Not wanting to mess with quest attributes in case they're still needed, I put a condition round the code which sets the tournament titles so that they only appear if you're in the tournament room.
Also:
to avoid more complexity to that file it could just as easily been a separate dialogue file for them.
Now done. I've moved the dialog for the tournament opponents into a new file just for them, removed it from "Habitue_dialog.h" (along with a few more lines near the end relating to vingt-un), changed the opponents' character definitions to use the new file, and tried talking to them during the tournament. It worked.
Final tests: I loaded a savegame from just before starting the tournament, played to lose (exited all three games after the first hand), checked that the trophy hand-over worked when someone else wins. Then I loaded the savegame again, played to win, and got the trophy. The title properly showed each day. Finally I tried poker in Port Royale after the tournament and it now correctly showed the normal "Poker" title.
Edit: one other minor bug - there was nothing in "common.ini" for "HighCard", so if both you and the opponent have a non-flush hand with highest card less than ten, the winning hand is just reported as "!". I've added an entry translating it as "High Card". It's still not quite right, for example king high will be reported as "High Card! Kings" as if you had more than one king, but at least it's better than "! Kings".
None of this is in the next update folder yet, so if there are any objections, everything can stay as it is now.