Author Topic: configure the layout of the tile deck  (Read 11587 times)

Gerry

  • Guest
configure the layout of the tile deck
« on: December 17, 2014, 12:01:43 PM »
I was wondering how difficult it would be to allow someone to configure the content and draw sequence of the deck.

Example

 I wish to set a puzzle, currently I use my own spreadsheet version of Carcassonne which allows me to pick and choose individual tiles.
Would it be possible for me to pick a set number of tiles from out of all the available tiles and manually order the deck  so that I can control the order the tiles are drawn but allow the players to control the placement?

I notice the save game file size is very small so I was thinking of letting the players

1 make their move
2 save the game
3 e-mail the save file to the next person so they can make their move ... and so on.

thanks gerry     :-\

Linkback: https://www.carcassonnecentral.com/community/index.php?topic=1355.0

Offline Paul

  • Marquis Chevalier
  • ***
  • Posts: 2491
  • Merit: 86
    • View Profile
    • sydby.com
Re: configure the layout of the tile deck
« Reply #1 on: December 18, 2014, 12:26:19 AM »
This is a project I was working on earlier this year. An E-mail based game.

danisthirty and I tested a manual version as each turn Dan would receive in the mail his tile randomly chosen by a script that sets up a draw pile before the game starts.
  He then would reply to this mail his move. and the next player would then get his tile and replies etc.

I can't seem to find the link to the game itself but I should have it still up on my server. Hopefully when I get more leisure time I can start working on this again, to make it as automated as possible so people would have a fullfledged game of Carcassonne via E-mail and mobile text message service.

World record holder for a single game of Carcassonne using 10 007 tiles!

Offline MrNumbers

  • Duke Chevalier
  • *
  • Posts: 1830
  • Merit: 91
    • View Profile
    • Carcassonne Latvia
Re: configure the layout of the tile deck
« Reply #2 on: December 18, 2014, 04:27:48 AM »
I can't seem to find the link to the game itself but I should have it still up on my server.

Here it is.
"I never lose. Either I win or I learn." (Nelson Mandela)

Offline Paul

  • Marquis Chevalier
  • ***
  • Posts: 2491
  • Merit: 86
    • View Profile
    • sydby.com
Re: configure the layout of the tile deck
« Reply #3 on: December 18, 2014, 05:16:40 AM »
I can't seem to find the link to the game itself but I should have it still up on my server.

Here it is.

Thank you!

Visiting my own site I got flooded with fond memories. Can't believe it was so long ago we did this. It was such a fun thing to do and I would love to find time to do this again.

 :(y)

Offline Decar

  • Owner
  • Chatelain Grand Officier
  • *
  • *
  • Posts: 6719
  • Merit: 317
  • Shut up and take my money!
    • View Profile
    • tehill.net
Re: configure the layout of the tile deck
« Reply #4 on: December 18, 2014, 08:18:46 AM »
Hi Gerry, I had a go at doing this today:

It looks like JCloisterZone supports debug options:

https://github.com/farin/JCloisterZone/blob/caf23a63f73eb0b484a488ac862a27494ee6dbee/README.md#debug-options

You need to edit the config.yaml / or debug.yaml and force drawn tiles:

Code: [Select]
Force drawn tiles

draw:
  - BA.C
  - BA.Cccc+

I dont seem to be able to load the debug.yaml via the command line -D argument; and it seems to fail to load debug options specified in config.yaml.

I'll keep having a go.

Offline Decar

  • Owner
  • Chatelain Grand Officier
  • *
  • *
  • Posts: 6719
  • Merit: 317
  • Shut up and take my money!
    • View Profile
    • tehill.net
Re: configure the layout of the tile deck
« Reply #5 on: December 18, 2014, 08:53:05 AM »
Managed to get a bit further I added the following to the bottom of the config.yaml:

I also unpacked the tile-definitions directory from the JClositer.jar file:

Code: [Select]
debug:
  save_format: plain
  autosave: saves/_prerank.jcz
  autostart:
    preset: default
    players:
      - Alice
      - Bob
  tile_definitions:
    BASIC: tile-definitions/basic.xml
  draw:
    - BA.C
    - BA.Cccc+

Now I just get an error when the auto start starts:

Code: [Select]
[AWT-EventQueue-0] WARN com.jcloisterzone.rmi.ClientStub - Autostart profile default not found.

I'm guessing the preset is wrong; I'll keep trying.

Gerry

  • Guest
Re: configure the layout of the tile deck
« Reply #6 on: December 18, 2014, 08:56:33 AM »
Hi Gerry, I had a go at doing this today:

It looks like JCloisterZone supports debug options:


I'll keep having a go.


You definitely seem to have clued in on the appropriate information.

Just to elaborate I was considering setting up the first 20 – 30 tiles of the game and sending out multiple copies to players so that they could pair up and each play an identical (as far as tile draw sequence) game . 

It could possibly be done right now to play all tiles as the game could be saved after the start tile is drawn.  However I am not sure if the random tile draw is locked in at the start of the game or a random tile is drawn from the deck at each turn.

Offline Decar

  • Owner
  • Chatelain Grand Officier
  • *
  • *
  • Posts: 6719
  • Merit: 317
  • Shut up and take my money!
    • View Profile
    • tehill.net
Re: configure the layout of the tile deck
« Reply #7 on: December 18, 2014, 10:06:49 AM »
Sounds like a really interesting idea;  I was hoping once I'd figured how the draw sequence was loaded into JCloisterZone I could look whether it could be loaded by some sort of sequence file.  JCloisterZone easily supports plugins, so you could provide a JAR file ready with your config....in theory....

I'm not getting much further here though - I've managed to compile JCloisterZone (but can't run it in debug) :(

It looks like the code is checking if the RMI Client has the same preset as the autostart game.   I can't work out how to set the presets at the moment :(

Gerry

  • Guest
Re: configure the layout of the tile deck
« Reply #8 on: December 18, 2014, 10:23:41 AM »
regardless of the outcome it is good to see someone other than Farin taking an active role with JCloister. I am afraid it is beyond me these days.

The only "unpacking" I am up to doing involves cardboard boxes.

Of course, if Jcloister was written in COBOL, it would be a different matter  :)

Offline Decar

  • Owner
  • Chatelain Grand Officier
  • *
  • *
  • Posts: 6719
  • Merit: 317
  • Shut up and take my money!
    • View Profile
    • tehill.net
Re: configure the layout of the tile deck
« Reply #9 on: December 18, 2014, 10:35:42 AM »
LOL

Looks like it's been working for a while; I just hadn't realised!

I cant get the auto start to work; so you start a new game manually, but I can determine the draw sequence at least.

All you need to do is add to the bottom of config.yaml:

Code: [Select]
debug:
  draw:
    - BA.C
    - BA.Cccc+

This will always draw: a BASIC city tile and then a BASIC City, city, city,city + penant before drawing the rest of the deck.

You can add a . to end the game early:

Code: [Select]
debug:
  draw:
    - BA.C
    - BA.Cccc+
    - .

You can find all the tiles inside the classic.jar inside the plugin directory. 

I opened it using WINRAR and found all of the jpegs for files,  but let me know if you need help opening it; perhaps I can send it to you in a ZIP file?

I wouldn't say active part just yet - need a few more pokes before I grasp what's going on!

Gerry

  • Guest
Re: configure the layout of the tile deck
« Reply #10 on: December 18, 2014, 01:47:35 PM »
I managed to open the JAR and found the Jpegs along with the associated tile ID codes  - really good news.

If you start a game using the custom Config Draw Tiles in the Config.yaml then save the game , is the Config.yaml stored within the Saved game information or would you have to pass the saved game along with the associated Config.yaml filre to the next player?

Offline Decar

  • Owner
  • Chatelain Grand Officier
  • *
  • *
  • Posts: 6719
  • Merit: 317
  • Shut up and take my money!
    • View Profile
    • tehill.net
Re: configure the layout of the tile deck
« Reply #11 on: December 18, 2014, 02:17:20 PM »
wow, this is complicated:

Here's what you're going to have to do:

The Save game, stores ONLY the current tile to be played.  None afterwards.

The Draw list is loaded when JCZ starts and is independent of games played.

So: You'll have to: 

  • make a draw list of all the tiles you want
  • Load JCZ and start the game
  • Play all the moves you want
  • Save the Game
  • Edit the draw list removing all the tiles you've already played + the currently drawn tile
  • Share the game save and also the debug list

The person loading will have to edit their config.yaml and Load the game.  They'll not be able to save, because when they reload it will restart the draw list.

Hope that makes sense.

If I get time I'll see if I can work out how tiles are loaded, maybe the save file could save a sequence of tiles; that would be infinitely easier for users.

Offline Decar

  • Owner
  • Chatelain Grand Officier
  • *
  • *
  • Posts: 6719
  • Merit: 317
  • Shut up and take my money!
    • View Profile
    • tehill.net
Re: configure the layout of the tile deck
« Reply #12 on: December 18, 2014, 02:58:24 PM »
Right, I'm just putting my thought process here, so if Farin pops by he might: a) say I'm on the right lines or b) I'm totally mad.

I think once all the tiles are loaded, the random selection of the remaining tile is made in this method: handleGetRandSample in the SimpleServer.

I might have a go extending this class, so that tiles come out of packs in the order they are defined (eg: always drawing 0). 

Once that make sense, maybe I can look a deck builder (which I promised a while ago!)


Gerry

  • Guest
Re: configure the layout of the tile deck
« Reply #13 on: December 18, 2014, 03:21:27 PM »
If you were to go with a deck builder we would probably need some text string to uniquely identify each tile.  The codes currently used in the Jcloister debug text example which matches the  folder/file-name JPEG of the tile images would be suitable.

Offline Decar

  • Owner
  • Chatelain Grand Officier
  • *
  • *
  • Posts: 6719
  • Merit: 317
  • Shut up and take my money!
    • View Profile
    • tehill.net
Re: configure the layout of the tile deck
« Reply #14 on: December 18, 2014, 03:35:20 PM »
Will definitely need to give it a think,

All tiles from expansions are defined in XML files called packs.  Each tile has an ID: such as CccR and a number count of how many are present.

All the things that describe the tile are defined in there so you won't want to repeat these.

So, (pie in the sky dream) a tool to select a tile from an expansion and build a list to construct a deck would be nice.  Then a means of loading the deck and knowing they're played in order.


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
rules Besiegers in original layout

Started by thodekey

3 Replies
2856 Views
Last post November 16, 2016, 04:48:18 AM
by Paul
exclamation
--- Customized Deck = FUN!!! and Randomized Pixel Art ---

Started by DOCTORawfulMD

30 Replies
18249 Views
Last post February 15, 2014, 11:38:18 PM
by DOCTORawfulMD
xx
A Carcassone deck of cards

Started by Howdypoopy

6 Replies
4303 Views
Last post March 12, 2017, 12:31:28 AM
by stalcupojoy
xx
WTT/WTB Russian Carcassonne (Single-Count-Tile, Gingerbreadman-Tile...)

Started by LaPorxada (aka BigBoss)

15 Replies
8873 Views
Last post June 30, 2017, 02:28:32 AM
by Yashin-n
xx
Trade my Spiel 14 tile for your Spiel 15 tile

Started by pinback

0 Replies
2362 Views
Last post October 17, 2015, 10:16:55 AM
by pinback