From be7c287322fbb47bd567b538c4aab9092134552f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=20Morschh=C3=A4user?= Date: Tue, 2 Apr 2013 18:27:10 +0200 Subject: [PATCH 1/5] Added internet howto for own server on CentOS. --- doc/install_on_centos6.txt | 60 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 doc/install_on_centos6.txt diff --git a/doc/install_on_centos6.txt b/doc/install_on_centos6.txt new file mode 100644 index 00000000..8ad9ac80 --- /dev/null +++ b/doc/install_on_centos6.txt @@ -0,0 +1,60 @@ +With the main server inaccessibility recently I was asked by a number of people on how I compiled and hosted the cockatrice server at woogerworks.com. +In response to these questions, I have written a quick and dirty guide with exact commands to get a basic cockatrice server, the oracle tool, and cockatrice client compiled on CentOS. +These instructions can also be accessed at WoogerWorks incase this site goes offline for any reason. +I hope to improve upon the formatting of these steps when I have time, but for now this should help. +Installation script can be downloaded at: http://www.woogerworks.com/cockatrice/installatrice + +BEFORE CONTINUING, PLEASE UNDERSTAND THESE ARE THE VERY MOST BASIC STEPS. +THIS WILL NOT CONFIGURE SECURITY SETTINGS (YOU ARE RESPONSIBLE FOR YOUR OWN SECURITY)! +THIS WILL NOT CONNECT THE SERVER TO A DB! +USE AT YOUR OWN RISK. + +I RECOMMEND RUNNING THE COMMANDS AS ROOT (NOT REQUIRED) +YOU MUST HAVE INTERNET ACCESS + +-- open a command shell +yum -y groupinstall "development tools" +(64bit OS) rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm +(32bit OS) rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm +iptables -F +yum -y install qt-mysql qt-devel qt-mobility-devel protobuf-devel protobuf-compiler cmake28 libgcrypt-devel +cd ~ +(github source) git clone git://github.com/mbruker/Cockatrice.git +(woogerworks stable) wget http://www.woogerworks.com/files/Cockatrice_20130214.zip +(woogerworks stable) unzip Cockatrice_20130214.zip +(woogerworks unstable) wget http://www.woogerworks.com/files/Cockatrice_20130227.zip +(woogerworks unstable) unzip Cockatrice_20130227.zip +cd Cockatrice +mkdir build +cd build +cmake28 -DWITH_SERVER=1 .. +make +sudo make install +sed -e "s/number_pools=1/number_pools=0/" ../servatrice/servatrice.ini.example > ~/servatrice.ini + +-- install the database server (optional) +sudo yum -y install mysql-server mysql php-mysql +sudo service mysqld start +sudo chkconfig mysqld on +mysqladmin -u root password 'password' +mysql -u root -ppassword -e "create database servatrice;" +mysql -u root -ppassword -e "create user 'servatrice'@'localhost' identified by 'password';" +mysql -u root -ppassword -e "grant all privileges on servatrice.* to 'servatrice'@'localhost';" +mysql -u servatrice -ppassword servatrice < ../servatrice/servatrice.sql +mysql -u servatrice -ppassword -e "insert into servatrice.cockatrice_users (admin,name,password_sha512,active) values (1,'servatrice','jbB4kSWDmjaVzMNdU13n73SpdBCJTCJ/JYm5ZBZvfxlzbISbXir+e/aSvMz86KzOoaBfidxO0s6GVd8t00qC0TNPl+udHfECaF7MsA==',1);" +sed -i.bak -e "s/password=foobar/password=password/" -e "s/type=none/type=mysql/" -e "s/method=none/method=sql/" ~/servatrice.ini + +-- start the servatrice server +cd ~ +/usr/local/bin/servatrice & + + +You should be able to log in as a regular user using any account name. +You can login using the username "servatrice" and the password "password" as the first moderator + + +Things to consider doing: +learn linux! +update the servatrice.ini line that says "max_users_per_address=4" to something alittle higher (maybe max_users_per_address=8) +set your root password to something stong (sounds like a good idea) +if you expect to be running a server only, change your default runlevel to 3 From 94b0593623522717a2d4b84c3108204c710a9e7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=20Morschh=C3=A4user?= Date: Tue, 2 Apr 2013 18:27:22 +0200 Subject: [PATCH 2/5] Added FAQ from cockatrice wiki. --- doc/faq.txt | 122 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 doc/faq.txt diff --git a/doc/faq.txt b/doc/faq.txt new file mode 100644 index 00000000..fc784ce9 --- /dev/null +++ b/doc/faq.txt @@ -0,0 +1,122 @@ +How to update the card database +=============================== + +When a new set comes out, you need to update your card database to be able to +see the new cards in the deck editor and use them in the game. To do this, +open the Oracle tool in the Cockatrice folder. It's a stand-alone program and +is run directly out of the folder without running Cockatrice. + +When the Oracle tool is running, open the menu and select 'Download sets +information'. Use the suggested address and click OK. After at most a few +seconds, you should be presented a list of sets to be downloaded. Do not +uncheck the ones you already have: they should be downloaded again. Click +'Start download' and wait. When the process is finished, the database should +be up to date. + + +Change Card Art / Custom Card Art +================================= + +Is it possible to change the card art for a specif card, not by changing the +set order in my deck editor? + +YES! It is actually very simple. + +All you have to do is get a .JPG of the card you wish to change and name the +actual file of the image to the cards (exact) name and add ”.Full” to the end. +You can then take this new card image and replace the old one in your +downloaded image folder. + +NOTE: Image size does not matter. Try to use a high resolution .JPG of the +card you want to use for best quality. + +EXAMPLE: Let's say you wish to turn your M11 Sun Titan from its original art +to a promo version. + +If you are using Windows 7, you can find the default location for the +Cockatrice card art files under +C:\Program Files (x86)>Cockatrice>pics>downloadedPics +Once there, look for the folder of the +set for the card we are replacing. For this example, Sun Titan is in the M11 +folder. Open the folder and paste/replace your new “Promo” Sun Titan.full[.JPG] +into this folder, discarding the original copy. (If you have +not yet downloaded the original image of a card by selecting it in the deck +editor or playing it in an online game, the card image will not yet be there) + +Once you have the new card image in the proper folder, you can now start +Cockatrice (Or re-start if you already had the program open)and select the +deck editor to see your new card image. + +If you are changing the art of a card that has multiple versions in other +sets, make sure you put the new card in whatever folder (or set) is highest +on your card database set list. + +NOTE: Other players on Cockatrice will NOT see your new card image. They will +only see whatever version of the card is in their database. + + +Use Higher Resolution Cards +=========================== + +Can you get better/higher resolution card art than the default downloaded card +images already used? + +Yes! + +When you click on a card for the first time in the Deck Editor, Cockatrice +goes onto the internet and finds an image of that card from a database on +another website. + +If you find a higher resolution .JPG of a card that you wish to use on your +Cockatrice, you can replace the image with no problem. If you can find a card +image in the 3,000 by 1,000 pixel range, and save it as the cards (exact) name +and add .Full to the end. + +If you are using Windows 7, you can find the default location for the +Cockatrice card art files under C:\Program Files +(x86)>Cockatrice>pics>downloadedPics. Once there, look for the folder of the +set for the card you are replacing. (If you are not running Cockatrice as an +administrator, look in C:\Users\username\AppData\Local\VirtualStore\Program +Files (x86)\Cockatrice\pics\downloadedPics.) + +Open the folder of the set with the card, and paste/replace the new higher +resolution .JPG image with the old low quality one. + +This process is the same for changing cards to custom images. + +NOTE: Other Cockatrice players will not see your higher resolution card art, +they will only see the image they have in their own database. + + +Booster Drafts +============== +Cockatrice does not support booster drafts, so players need to use an +external service for this. + +Most people use http://ccgdecks.com/ so it's probably not a bad idea to +register an account there before joining a game in Cockatrice. + + +How to link a card in the Cockatrice chat. +========================================== + +To link a card in the Cockatrice chat, type out the full name of the card, +surrounded by the [card] and [/card] tags. + +For example: + +[card]Black Lotus[/card] + + +How to link a URL in the Cockatrice chat. +========================================= + +To link a URL in the Cockatrice chat, type out the url, surrounded by the +[url] and [/url] tags. + +For example: + +[url]http://www.cockatrice.de[/url] +[url]cockatrice.de[/url] + + From cf98f0cf17c2ad5e4bb840e6cf79a1707c5e7678 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=20Morschh=C3=A4user?= Date: Tue, 2 Apr 2013 18:29:12 +0200 Subject: [PATCH 3/5] Added shortcuts documentation. --- doc/shortcuts.txt | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 doc/shortcuts.txt diff --git a/doc/shortcuts.txt b/doc/shortcuts.txt new file mode 100644 index 00000000..3162af0f --- /dev/null +++ b/doc/shortcuts.txt @@ -0,0 +1,45 @@ +Keyboard Shortcuts +================== + +Keyboard Shortcuts can be used while playing a game on Cockatrice. Players use +them to do simple and recurring tasks without the use of looking though menus +to find the proper action. + +Shortcut Action +---------------------- +F3 View library +F4 View graveyard +Ctrl+F3 View sideboard +Ctrl+W View top car(s) of library (Choose a number) +Ctrl+S Shuffle deck +Ctrl+I Roll dice +Ctrl+M Draw 7, then mulligan successively +Ctrl+D Draw a card +Ctrl+E Draw Cards (Choose a number) +Ctrl+Shift+D Undo last draw +Ctrl+L Set Life (useful when adding or subtracting a large number of life) +F11 Minus 1 life +F12 Add 1 life +Ctrl+U Untap all permanents you control +Ctrl+R Remove all local arrows +Ctrl+T Brings up menu to Create a token +Ctrl+G Creates last token you made +(Select card) Ctrl+Del Move to graveyard +(Select card) Ctrl+A Attach Card (For equipment and auras) +(Select card) Ctrl+H Clone (Make copy of) selected card +(Select card) Ctrl++ Increase power +(Select card) Ctrl+- Decrease power +(Select card) Alt++ Increase toughness +(Select card) Alt+- Decrease toughness +(Select card) Ctrl+Alt++ Increase power and toughness +(Select card) Ctrl+Alt+- Decrease power and toughness +(Select card) Ctrl+P Set power and toughness +Ctrl+Enter (Return) Next turn +Ctrl+Space Move to next phase +F5 Untap step +F6 Draw step +F7 First main phase +F8 Beginning of combat step +F9 Second main phase +F10 End of turn step +F2 Concede game From b5d5e946498d27ebd1a4cd2968b586b45011c01f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=20Morschh=C3=A4user?= Date: Tue, 2 Apr 2013 18:29:43 +0200 Subject: [PATCH 4/5] Added documentation/howto for card database. --- doc/add_sets.txt | 57 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 doc/add_sets.txt diff --git a/doc/add_sets.txt b/doc/add_sets.txt new file mode 100644 index 00000000..599f96b0 --- /dev/null +++ b/doc/add_sets.txt @@ -0,0 +1,57 @@ +The oracle program creates the cockatrice card database and needs a set database to achieve this. +The set database is written in XML and has the following skeleton: + + + + http://www.wizards.com/global/images/magic/general/%1.jpg + http://gatherer.wizards.com/Pages/Search/Default.aspx?output=spoiler&method=text&set=["!longname!"] + + + Set Code + Set Name + + + + Another Set Code + Another Set Name + + + ... + + + +The full set database file called "set.xml" should be included in the cockatrice git-sources. + +* You could change the picture_url to another source if you want, e.g. if you have HQ scans or another alternative server. +* The set_url is the search URL for Wizard's Gatherer, where the oracle program will fetch it's information from. +* If the Gatherer changes, adapt the URL and keep in mind that '&', '"' and other special characters should be HTML encoded (like '&' and '"'). +* Further, the oracle replaces substrings included in '!' characters with information from the set entries, like '!longname!' with the set name. +* If you add a new set to the database, you have to create a new set entry like + + AVR + Avacyn Restored + +and update the date in the version string. If you set import="1" the set's checkbox in the oracle's GUI will be set, otherwise unset. + + +Here is a more detailed step by step manual found in the internet: + +1. Load the Oracle program that's installed with Cockatrice. The Oracle program can usually be found by click the Start button and going to All Programs > Cockatrice. +2. Click the File menu item and select 'Download sets information...' +3. Copy the URL from the 'Load sets' screen (the URL should be something like http://www.cockatrice.de/files/sets.xml) and paste it into your internet browser. +4. Right click on the web page and select Save As +5. Save the XML file to somewhere on your PC, preferably somewhere that's easy to get to +6. Right click on the XML file and select 'Open With...' and choose Notepad from the list +7. Before the end of the notepad document (should be something like ) add: + + RTR + Return to Ravnica + +8. Save and close the XML file +9. Back in the Oracle progam if the 'Load Sets' screen is still open click the Cancel button +10. Click the File menu item and click 'Load Sets from File' +11. Browse to where you saved the XML file and double click on it to select it +12. Click the Start Download button +13. Once the download is complete close the Oracle program and run Cockatrice. The Return to Ravnica cards should now be displayed. + +Hopefully the steps above are helpful and easy to follow. \ No newline at end of file From e3b1e801bebaf750344cd602a722de0f234cc004 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=20Morschh=C3=A4user?= Date: Tue, 2 Apr 2013 18:29:56 +0200 Subject: [PATCH 5/5] Added current sets.xml --- doc/sets.xml | 309 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 309 insertions(+) create mode 100644 doc/sets.xml diff --git a/doc/sets.xml b/doc/sets.xml new file mode 100644 index 00000000..2340b17b --- /dev/null +++ b/doc/sets.xml @@ -0,0 +1,309 @@ + + + http://www.wizards.com/global/images/magic/general/%1.jpg + http://gatherer.wizards.com/Pages/Search/Default.aspx?output=spoiler&method=text&set=["!longname!"] + + ARB + Alara Reborn + + + AL + Alliances + + + AQ + Antiquities + + + AP + Apocalypse + + + AN + Arabian Nights + + + BOK + Betrayers of Kamigawa + + + CHK + Champions of Kamigawa + + + CH + Chronicles + + + 6E + Classic Sixth Edition + + + CS + Coldsnap + + + CFX + Conflux + + + DS + Darksteel + + + DIS + Dissension + + + 8E + Eighth Edition + + + EVE + Eventide + + + EX + Exodus + + + FE + Fallen Empires + + + FD + Fifth Dawn + + + 5E + Fifth Edition + + + 4E + Fourth Edition + + + FUT + Future Sight + + + GP + Guildpact + + + HL + Homelands + + + IA + Ice Age + + + IN + Invasion + + + JU + Judgment + + + LG + Legends + + + LE + Legions + + + A + Limited Edition Alpha + + + B + Limited Edition Beta + + + LRW + Lorwyn + + + M10 + Magic 2010 + + + M11 + Magic 2011 + + + MM + Mercadian Masques + + + MI + Mirage + + + MR + Mirrodin + + + MOR + Morningtide + + + NE + Nemesis + + + 9E + Ninth Edition + + + OD + Odyssey + + + ON + Onslaught + + + PLC + Planar Chaos + + + PS + Planeshift + + + PT + Portal + + + P2 + Portal Second Age + + + P3 + Portal Three Kingdoms + + + PR + Promo set for Gatherer + + + PY + Prophecy + + + RAV + Ravnica: City of Guilds + + + R + Revised Edition + + + ROE + Rise of the Eldrazi + + + SOK + Saviors of Kamigawa + + + SOM + Scars of Mirrodin + + + SC + Scourge + + + 7E + Seventh Edition + + + SHM + Shadowmoor + + + ALA + Shards of Alara + + + ST + Starter 1999 + + + ST2K + Starter 2000 + + + SH + Stronghold + + + TE + Tempest + + + 10E + Tenth Edition + + + DK + The Dark + + + TSP + Time Spiral + + + TSB + Time Spiral "Timeshifted" + + + TO + Torment + + + UG + Unglued + + + UNH + Unhinged + + + U + Unlimited Edition + + + UD + Urza's Destiny + + + UL + Urza's Legacy + + + US + Urza's Saga + + + VI + Visions + + + WL + Weatherlight + + + WWK + Worldwake + + + ZEN + Zendikar + +