Merge pull request #3 from VanNostrand/documentation

Documentation-Branch
This commit is contained in:
Daenyth 2013-04-02 10:14:56 -07:00
commit 39624ec077
5 changed files with 593 additions and 0 deletions

57
doc/add_sets.txt Normal file
View file

@ -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:
<?xml version="1.0" encoding="UTF-8"?>
<cockatrice_setdatabase version="20100416">
<picture_url>http://www.wizards.com/global/images/magic/general/%1.jpg</picture_url>
<set_url>http://gatherer.wizards.com/Pages/Search/Default.aspx?output=spoiler&amp;method=text&amp;set=[&quot;!longname!&quot;]</set_url>
<set import="1">
<name>Set Code</name>
<longname>Set Name</longname>
</set>
<set import="1">
<name>Another Set Code</name>
<longname>Another Set Name</longname>
</set>
...
</cockatrice_setdatabase>
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 '&amp;' and '&quot;').
* 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
<set import="1">
<name>AVR</name>
<longname>Avacyn Restored</longname>
</set>
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 </cockatrice_set database>) add:
<set import="1">
<name>RTR</name>
<longname>Return to Ravnica</longname>
</set>
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.

122
doc/faq.txt Normal file
View file

@ -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]

View file

@ -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

309
doc/sets.xml Normal file
View file

@ -0,0 +1,309 @@
<?xml version="1.0" encoding="UTF-8"?>
<cockatrice_setdatabase version="20100416">
<picture_url>http://www.wizards.com/global/images/magic/general/%1.jpg</picture_url>
<set_url>http://gatherer.wizards.com/Pages/Search/Default.aspx?output=spoiler&amp;method=text&amp;set=[&quot;!longname!&quot;]</set_url>
<set import="1">
<name>ARB</name>
<longname>Alara Reborn</longname>
</set>
<set import="1">
<name>AL</name>
<longname>Alliances</longname>
</set>
<set import="1">
<name>AQ</name>
<longname>Antiquities</longname>
</set>
<set import="1">
<name>AP</name>
<longname>Apocalypse</longname>
</set>
<set import="1">
<name>AN</name>
<longname>Arabian Nights</longname>
</set>
<set import="1">
<name>BOK</name>
<longname>Betrayers of Kamigawa</longname>
</set>
<set import="1">
<name>CHK</name>
<longname>Champions of Kamigawa</longname>
</set>
<set import="1">
<name>CH</name>
<longname>Chronicles</longname>
</set>
<set import="1">
<name>6E</name>
<longname>Classic Sixth Edition</longname>
</set>
<set import="1">
<name>CS</name>
<longname>Coldsnap</longname>
</set>
<set import="1">
<name>CFX</name>
<longname>Conflux</longname>
</set>
<set import="1">
<name>DS</name>
<longname>Darksteel</longname>
</set>
<set import="1">
<name>DIS</name>
<longname>Dissension</longname>
</set>
<set import="1">
<name>8E</name>
<longname>Eighth Edition</longname>
</set>
<set import="1">
<name>EVE</name>
<longname>Eventide</longname>
</set>
<set import="1">
<name>EX</name>
<longname>Exodus</longname>
</set>
<set import="1">
<name>FE</name>
<longname>Fallen Empires</longname>
</set>
<set import="1">
<name>FD</name>
<longname>Fifth Dawn</longname>
</set>
<set import="1">
<name>5E</name>
<longname>Fifth Edition</longname>
</set>
<set import="1">
<name>4E</name>
<longname>Fourth Edition</longname>
</set>
<set import="1">
<name>FUT</name>
<longname>Future Sight</longname>
</set>
<set import="1">
<name>GP</name>
<longname>Guildpact</longname>
</set>
<set import="1">
<name>HL</name>
<longname>Homelands</longname>
</set>
<set import="1">
<name>IA</name>
<longname>Ice Age</longname>
</set>
<set import="1">
<name>IN</name>
<longname>Invasion</longname>
</set>
<set import="1">
<name>JU</name>
<longname>Judgment</longname>
</set>
<set import="1">
<name>LG</name>
<longname>Legends</longname>
</set>
<set import="1">
<name>LE</name>
<longname>Legions</longname>
</set>
<set import="1">
<name>A</name>
<longname>Limited Edition Alpha</longname>
</set>
<set import="1">
<name>B</name>
<longname>Limited Edition Beta</longname>
</set>
<set import="1">
<name>LRW</name>
<longname>Lorwyn</longname>
</set>
<set import="1">
<name>M10</name>
<longname>Magic 2010</longname>
</set>
<set import="1">
<name>M11</name>
<longname>Magic 2011</longname>
</set>
<set import="1">
<name>MM</name>
<longname>Mercadian Masques</longname>
</set>
<set import="1">
<name>MI</name>
<longname>Mirage</longname>
</set>
<set import="1">
<name>MR</name>
<longname>Mirrodin</longname>
</set>
<set import="1">
<name>MOR</name>
<longname>Morningtide</longname>
</set>
<set import="1">
<name>NE</name>
<longname>Nemesis</longname>
</set>
<set import="1">
<name>9E</name>
<longname>Ninth Edition</longname>
</set>
<set import="1">
<name>OD</name>
<longname>Odyssey</longname>
</set>
<set import="1">
<name>ON</name>
<longname>Onslaught</longname>
</set>
<set import="1">
<name>PLC</name>
<longname>Planar Chaos</longname>
</set>
<set import="1">
<name>PS</name>
<longname>Planeshift</longname>
</set>
<set import="1">
<name>PT</name>
<longname>Portal</longname>
</set>
<set import="1">
<name>P2</name>
<longname>Portal Second Age</longname>
</set>
<set import="1">
<name>P3</name>
<longname>Portal Three Kingdoms</longname>
</set>
<set import="1">
<name>PR</name>
<longname>Promo set for Gatherer</longname>
</set>
<set import="1">
<name>PY</name>
<longname>Prophecy</longname>
</set>
<set import="1">
<name>RAV</name>
<longname>Ravnica: City of Guilds</longname>
</set>
<set import="1">
<name>R</name>
<longname>Revised Edition</longname>
</set>
<set import="1">
<name>ROE</name>
<longname>Rise of the Eldrazi</longname>
</set>
<set import="1">
<name>SOK</name>
<longname>Saviors of Kamigawa</longname>
</set>
<set import="1">
<name>SOM</name>
<longname>Scars of Mirrodin</longname>
</set>
<set import="1">
<name>SC</name>
<longname>Scourge</longname>
</set>
<set import="1">
<name>7E</name>
<longname>Seventh Edition</longname>
</set>
<set import="1">
<name>SHM</name>
<longname>Shadowmoor</longname>
</set>
<set import="1">
<name>ALA</name>
<longname>Shards of Alara</longname>
</set>
<set import="1">
<name>ST</name>
<longname>Starter 1999</longname>
</set>
<set import="1">
<name>ST2K</name>
<longname>Starter 2000</longname>
</set>
<set import="1">
<name>SH</name>
<longname>Stronghold</longname>
</set>
<set import="1">
<name>TE</name>
<longname>Tempest</longname>
</set>
<set import="1">
<name>10E</name>
<longname>Tenth Edition</longname>
</set>
<set import="1">
<name>DK</name>
<longname>The Dark</longname>
</set>
<set import="1">
<name>TSP</name>
<longname>Time Spiral</longname>
</set>
<set import="1">
<name>TSB</name>
<longname>Time Spiral "Timeshifted"</longname>
</set>
<set import="1">
<name>TO</name>
<longname>Torment</longname>
</set>
<set import="0">
<name>UG</name>
<longname>Unglued</longname>
</set>
<set import="0">
<name>UNH</name>
<longname>Unhinged</longname>
</set>
<set import="1">
<name>U</name>
<longname>Unlimited Edition</longname>
</set>
<set import="1">
<name>UD</name>
<longname>Urza's Destiny</longname>
</set>
<set import="1">
<name>UL</name>
<longname>Urza's Legacy</longname>
</set>
<set import="1">
<name>US</name>
<longname>Urza's Saga</longname>
</set>
<set import="1">
<name>VI</name>
<longname>Visions</longname>
</set>
<set import="1">
<name>WL</name>
<longname>Weatherlight</longname>
</set>
<set import="1">
<name>WWK</name>
<longname>Worldwake</longname>
</set>
<set import="1">
<name>ZEN</name>
<longname>Zendikar</longname>
</set>
</cockatrice_setdatabase>

45
doc/shortcuts.txt Normal file
View file

@ -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