Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notification settings not saved #291

Open
beginetienne opened this issue Sep 17, 2020 · 3 comments
Open

Notification settings not saved #291

beginetienne opened this issue Sep 17, 2020 · 3 comments
Assignees
Labels
Milestone

Comments

@beginetienne
Copy link

The notification configuration is not saved when I hit the save button. I had to manually update the profiles in %appdir%\rails\profiles to make them work.

image

Example profile:
C:\Users\Etienne\AppData\Roaming\rails\profiles\EtienneA.rails_profile

#Automatically generated, do not edit
#Thu Sep 17 09:47:55 EDT 2020
log.directory=C:\Users\Etienne\Desktop\log\
font.ui.scale=1.0
save.auto.enabled=yes
save.archive.keep_count=5
profile.parent=pbem
save.directory=C:\Users\Etienne\Desktop\save
local.player.name=EtienneA
map.displayCurrentRoutes=yes
save.recovery.active=yes
gridPanel.tableBorders=enabled
save.auto.interval=3
notify.discord.webhook=https://discordapp.com/api/webhooks/720004884778319975/NwaTbMo__Ngs8KLF55HGtk_UEad4_2IQVjcqEv26VxVcSt1LPeJeh5lVi-WuWFzMl8a6
notify.discord.user_mapping=EtienneA:517444304176939028,EtienneB:517444304176939028
notify.message=Player ${previous} has played. Your turn ${current}! Game: ${game} Round: ${round}

Above is also a "good" example for the notify.message value. I had to read notify/Discord.java to find out what the substitution pattern is. Also for reference, the notify.discord.user_mapping value is [playername]:[discord],[playername]:[discord],...,[playername]:[discord]. I recommend using the discord ID in place of [discord], which seems to work every time!

Also, an incomplete notify.discord.user_mapping value (with missing players) seems to prevent the game from moving forward.

I have also noticed that the notification settings are pulled from the save game file. Is there a way to change that once the game has started ?

@beginetienne
Copy link
Author

beginetienne commented Sep 17, 2020

Note that I have used the master branch to run these tests with 18scan. It would be great if a new build could be posted on sourceforge. Thanks.

@erik-vos
Copy link
Contributor

erik-vos commented Sep 20, 2020

Options that have to be saved, because these can vary per game, should not be configuration options but game options, settable in the Option tab at game start.

Insofar these items consist of a fixed and a variable part, I would suggest to use both option types, whereby the (variable) game option string is appended to the (fixed) config option part, allowing either one to be null or empty.

@erik-vos
Copy link
Contributor

Two somewhat unrelated remarks:

  1. I notice that many game options appear in all games; these are in fact generic.
    Shouldn't we add a generic GameOptions.xml in the resources/data directory to cover these items?

  2. For Steam over Holland I have added a new GameOption type="hidden" to enable saving values that must persist but should not appear in the startup Options tab. I'm using this to save the seed (date/time in milliseconds) of the random generator that I have added to GameManager. In SOH it is used for the random selection of the in-game privates. This facility will appear in a forthcoming PR that includes SOH.

@neutronc neutronc added the bug label Jan 6, 2021
@neutronc neutronc added this to the 2.4 milestone Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants