how to save the default game mode?

Discussions about Winboard/Xboard. News about engines or programs to use with these GUIs (e.g. tournament managers or adapters) belong in this sub forum.

Moderator: Andres Valverde

how to save the default game mode?

Postby tatagi » 27 May 2019, 06:59

the default variant of the game each time I reload the winboard application is set to normal(in case of pulsar2009-9b engine, not sure otherwise) and I usually play atomic or suicide. I know I can change it manually but I just feel lazy doing this every time I run the player.

and also similarly I wanna skip the process of choosing the engines(I always use pulsar)

pls help thanks.

https://imgur.com/a/whUyRvU
tatagi
 
Posts: 3
Joined: 27 May 2019, 00:32

Re: how to save the default game mode?

Postby H.G.Muller » 28 May 2019, 07:14

In the master settings file (winboard.ini in the WinBoard folder) you can add some option settings at the end. That would always invoke them, even when they normally are 'volatile'. That is, they would still behave as if they were volatile (not remembered from one setting to the next), but it would like they now had another default.

So to always start WinBoard in Suicide you can add at the bottom of winboard.ini:

/variant=suicide

To make that it would always start in 'Play against an engine' mode, you would have to add:

/cp
/fcp=ENGINE1NAME
/fd=ENGINE1FOLDER
/scp=ENGINE2NAME
/sd=ENGINE2FOLDER

with the desired names substituted. (You have to specify two engines, otherwise it will still pop up the Startup Dialog to let you choose a second engine.)
User avatar
H.G.Muller
 
Posts: 3147
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: how to save the default game mode?

Postby tatagi » 28 May 2019, 13:14

thanks for your reply. I've tried it and it doesn't remember the settings(added lines are removed from the contents)

1. open the winboard.ini file
2. at the bottom of the text, put these lines
/cp
/fcp=pulsar2009-9b
/fd=winboard
/scp=pulsar2009-9b
/sd=winboard
/variant=atomic
3. save the change
4. run winboard

it works only for the first time I run the program but as you've mentioned, it reverts back to previous setting when I exit the program.

anything I missed or did wrong?
tatagi
 
Posts: 3
Joined: 27 May 2019, 00:32

Re: how to save the default game mode?

Postby H.G.Muller » 28 May 2019, 15:41

It sounds like you are using this winboard.ini as the user settings file, rather than as master settings file (as it would be in the binary WinBoard distribution). The difference is that a master settings file would contain the lines

/settingsFile=SOMEOTHERFILENAME
/saveSettingsFile=SOMEOTHERFILENAME

(usually also at the end). These lines tell WinBoard to save the settings on this other file, (and when it is started, read those from there), so that the winboard.ini in the WinBoard folder never gets overwritten.

I assumed this would also be the case for you, but apparently not. Normally the file to which it refers starts with %APPDATA%, which is interpreted as the system's AppData folder for the current user, so that each user would have a different file for saving his preferred settings. But if you are the only user, you could use a fixed filename here (e.g. mysettings.ini).

When you do this anything written in the winboard.ini file would then be permanent. Whatever you write after the /settingsFile line will even overrule the saved user settings, as the last setting of a particular option will be the one that sticks. (Persistent options that are written before the /settingsFile line would always be overruled by their value saved in the mentioned file, and only serve to have a proper initial setting when that file did not exist yet. For volatile options it does not matter where in the master settings file you write them, as the saved settings would not contain those anyway.)
User avatar
H.G.Muller
 
Posts: 3147
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: how to save the default game mode?

Postby tatagi » 29 May 2019, 00:44

thanks for the tip. now I can change the settings and remember it untouched for future use =)

what I did was adding those two SOMEOTHERFILENAMEs options for my liking(mysettings.ini)
so it looks like this at the bottom:

/settingsFile=mysettings.ini
/saveSettingsFile=mysettings.ini
/cp
/fcp=pulsar2009-9b
/fd=winboard
/scp=pulsar2009-9b
/sd=winboard
/variant=atomic

the result is it creates the mysettingsini file when I first exit the program(the contents is exactly the same as universal master settings(winboard.ini) and the added lines sticks with the new master settings(remain intact and remember my engines and variant to be my default start option) so the key was /settingsFile=mysettings.ini and /saveSettingsFile=mysettings.ini to get it done correctly.


can I ask you another question? when I play atomic, I want to disable castling when the king is on target because when I play with my friends the rule is we can't castle in that circumstance.
tatagi
 
Posts: 3
Joined: 27 May 2019, 00:32

Re: how to save the default game mode?

Postby H.G.Muller » 29 May 2019, 19:57

I am not sure what you mean by 'on target'. If you don't want to allow castling at all in the game, it means you should start from a position without castling rights. This could for instance be done by copy-pasting the FEN of such a position into WinBoard (through the 'Edit->Paste Position from Clipboard' menu item):

rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w - - 0 1

In principle this should work (i.e. with a fully compliant engine). But I don't think it would work on Pulsar; this will just always assume it can castle if the King and Rooks are on the required squares, in the position it starts from. Nothing a GUI can do about that. But there is a work-around: start from an (unfinished) game containing an opening line that destroys the castling rights. You can do that by moving away the Knights, move the Rooks back and forth, and then the Knights back, in Edit Game mode. You can then copy-paste that game into WinBoard before you start playing.

If you want these things to happen automatically you should write the FEN on a file (say nocastling.fen), and use the option /lpf=nocastling.fen. (E.g. in the master settings file. But you already rigged that for Suicide.) For starting from a game save that game on nocastling.pgn, and use the option /lgf=nocastling.pgn.

An alternative is to associate such options with an engine. E.g. when you install Pulsar a second time, through the Engine->Load 1st Engine menu, after you switched to Atomic, and tick 'Only use with this variant' in the dialog, and as extra WinBoard option write /lpf=nocastling.fen, selecting that engine would automatically switch you to a castling-free game of Atomic.
User avatar
H.G.Muller
 
Posts: 3147
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL


Return to Winboard and related Topics

Who is online

Users browsing this forum: Google [Bot] and 11 guests

cron