Author Topic: config.yaml question  (Read 5726 times)

Offline Tenmiles

  • Vagabond
  • *
  • Posts: 5
  • Merit: 0
  • I haven't updated my profile yet! (Or have I?)
    • View Profile
config.yaml question
« on: March 07, 2015, 11:18:45 AM »
First, I want to congratulate farin and all the others who have worked so hard to build JCloisterZone; You have built a really great program. Thank you for all your efforts! My family really loves playing it!

I wanted to adjust a few of the settings inside config.yaml to customize my game.

Specifically, I wanted to adjust the score_display_duration to add a few more seconds,
and also adjust the ai_place_tile_delay(we think it goes too fast, and it feels a little more "natural", like a human player, if the AI takes a few full seconds to make its turn),
and I also wanted to customize the ai_names.

I made a copy of config.yaml and saved it in another directory as a backup.
Then I renamed config.yaml to config.txt so I could edit it.
I changed the values described above, then saved the file.
Then I renamed config.txt back to config.yaml. It is stored in the same original directory (separate from the backup).

But when I run JCloisterZone.jar now (in the same directory as the new config.yaml), the settings have not changed.
It still displays the original AI player names, and the AI turn is still executed in the original time frame.

What am I missing?

Linkback: https://www.carcassonnecentral.com/community/index.php?topic=1601.0
« Last Edit: March 07, 2015, 11:21:11 AM by Tenmiles »

Offline farin

  • Duke
  • *
  • Posts: 241
  • Merit: 44
  • JCloisterZone maintainer
    • View Profile
Re: config.yaml question
« Reply #1 on: March 07, 2015, 12:49:05 PM »
maybe you made some formating error in yaml and it is not valid yaml file. Could you attach your file?

Offline Tenmiles

  • Vagabond
  • *
  • Posts: 5
  • Merit: 0
  • I haven't updated my profile yet! (Or have I?)
    • View Profile
Re: config.yaml question
« Reply #2 on: March 07, 2015, 01:10:55 PM »
Here is the edited file.
(cannot attach .yaml files, so it has been renamed to .txt for upload)

I was careful to keep things as they were, only adjusting the specific values (noted above), but it is certainly possible that I've made a mistake.

I appreciate your willingness to check it!

Offline rfielder

  • Marquis
  • ***
  • Posts: 475
  • Merit: 10
  • Carcassonne Beginner
    • View Profile
    • Cool Country Nights
Re: config.yaml question
« Reply #3 on: March 08, 2015, 07:04:51 PM »
Most programming editors can load a file such as a .yaml as text, if you tell them to.  I used UltraEdit32, and it has no problem with files like config.yaml, loads and saves directly without any glitches.

I just loaded config.yaml into the Windows Wordpad editor, and it works fine.  Saved it as config.yaml2, and it added the .txt extension so I ended up with config.yaml2.txt.

However, the size remained the same, so all that might be needed is to do a rename.  Would suggest saving the file elsewhere first, just in case whatever editor you use does something weird.
Robert Fielder
Brampton, Ontario, Canada  EST

Offline Paul

  • Marquis Chevalier
  • ***
  • Posts: 2491
  • Merit: 86
    • View Profile
    • sydby.com
Re: config.yaml question
« Reply #4 on: March 09, 2015, 12:37:56 AM »
I think it's safe to say all text editors can load .yaml file, or any file. About 99% of them even have an all files option to then select any file you want.

Then there's a simple matter of right-click (Windows) on a file and choose specific program to open with and select Notepad for example. Doing this once, even without selecting it as a main program for .yaml file, will remember this next time you right click on a .yaml file.

This will also keep the integrity of the file even when you du CTRL + S to save it.
World record holder for a single game of Carcassonne using 10 007 tiles!

Offline farin

  • Duke
  • *
  • Posts: 241
  • Merit: 44
  • JCloisterZone maintainer
    • View Profile
Re: config.yaml question
« Reply #5 on: March 09, 2015, 05:26:01 AM »
yes, file is correct. So as was already mentioned above, you probably has additional suffix (hidden in windows folder explorer)  in filename itself.

Offline Tenmiles

  • Vagabond
  • *
  • Posts: 5
  • Merit: 0
  • I haven't updated my profile yet! (Or have I?)
    • View Profile
Re: config.yaml question
« Reply #6 on: March 09, 2015, 11:48:21 AM »
Thank you, everyone, for your suggestions!

This was in Windows 7 (Pro); file extensions are already set to be displayed (not hidden - I can't stand that 'feature').

When I tried right-clicking on the .yaml file, the context menu (to my surprise) did not offer an option to "open with", otherwise I would have just selected "Notepad".

That's why I changed the extension to .txt simply to edit it.

I'm currently at work (where I also have JCZ), and here, when I right-click on the .yaml file, I do have the option to edit it in Notepad++ (which I use at work, but never bothered to install at home).
I tried editing it that way, and that does seem to have worked without any issues, so at least I know how to work around whatever error I may have originally made at home.

I appreciate all the feedback!
« Last Edit: March 09, 2015, 11:51:37 AM by Tenmiles »

Offline MrNumbers

  • Duke Chevalier
  • *
  • Posts: 1830
  • Merit: 91
    • View Profile
    • Carcassonne Latvia
Re: config.yaml question
« Reply #7 on: March 09, 2015, 11:52:07 AM »
When I tried right-clicking on the .yaml file, the context menu (to my surprise) did not offer an option to "open with", otherwise I would have just selected "Notepad".

Try just do right-click with pressed "Shift": you will see desired "Open with" context menu.
Or, try double-click on that file and then select Notepad.
"I never lose. Either I win or I learn." (Nelson Mandela)

Offline Paul

  • Marquis Chevalier
  • ***
  • Posts: 2491
  • Merit: 86
    • View Profile
    • sydby.com
Re: config.yaml question
« Reply #8 on: March 09, 2015, 12:43:09 PM »
If the .yaml file has never been chosen to open with a program before for example using the right-click, there is only a bold open choice. Once you choose this, select a program to open it with (you may have to choose + sign and/or browse to find the right program).

After this, the open with will always appear for .yaml file.

Offline Tenmiles

  • Vagabond
  • *
  • Posts: 5
  • Merit: 0
  • I haven't updated my profile yet! (Or have I?)
    • View Profile
Re: config.yaml question
« Reply #9 on: March 09, 2015, 01:29:50 PM »
Excellent!
Thank you, all. I wish I knew how to increase your merits.
 :(y)

Offline Paul

  • Marquis Chevalier
  • ***
  • Posts: 2491
  • Merit: 86
    • View Profile
    • sydby.com
Re: config.yaml question
« Reply #10 on: March 09, 2015, 03:04:07 PM »
Excellent!
Thank you, all. I wish I knew how to increase your merits.
 :(y)

Under, for example my frog image, there is a link named Give merit.  :meeple:

Offline Tenmiles

  • Vagabond
  • *
  • Posts: 5
  • Merit: 0
  • I haven't updated my profile yet! (Or have I?)
    • View Profile
Re: config.yaml question
« Reply #11 on: March 09, 2015, 04:21:09 PM »
Maybe my account is still too new (too few posts); I don't see it.

(screenshot attached)

EDIT: Indeed. The magic number seems to be 5, as I could see the link after I made this post.
« Last Edit: March 09, 2015, 04:23:30 PM by Tenmiles »


Share via delicious Share via digg Share via facebook Share via furl Share via linkedin Share via myspace Share via reddit Share via stumble Share via technorati Share via twitter

  Subject / Started by Replies / Views Last post
xx
Question about Carcassonne Big Box 5's contents

Started by oosie

5 Replies
2668 Views
Last post October 05, 2017, 06:08:38 AM
by Paul
xx
newbie question about scoring

Started by ngkeith

9 Replies
5191 Views
Last post April 10, 2016, 08:12:27 AM
by SRBO
xx
A question about "Road Sweeper" card (The Gifts)

Started by ac1982

4 Replies
1040 Views
Last post April 23, 2022, 01:49:48 AM
by Meepledrone
xx
Question regarding the Winter editions

Started by OneEyedOwl

2 Replies
963 Views
Last post January 28, 2022, 11:29:10 AM
by Meepledrone
clip
Newbie question re roads/villages

Started by trannymatt

4 Replies
5596 Views
Last post February 10, 2016, 04:32:07 AM
by trannymatt