From 1208103e83342fa37670f919820fc4a201bd9566 Mon Sep 17 00:00:00 2001 From: Brendan Hagan Date: Wed, 10 Aug 2022 20:51:22 -0400 Subject: [PATCH 01/24] misc: initial readthedocs commit --- .readthedocs.yaml | 29 +++++++++++++++++++++++++++++ docs/conf.py | 3 +++ docs/index.rst | 21 +++++++++++++++++++++ docs/requirements.txt | 0 4 files changed, 53 insertions(+) create mode 100644 .readthedocs.yaml create mode 100644 docs/conf.py create mode 100644 docs/index.rst create mode 100644 docs/requirements.txt diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 00000000..89e036aa --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,29 @@ +# .readthedocs.yaml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Set the version of Python and other tools you might need +build: + os: ubuntu-20.04 + tools: + python: "3.9" + # You can also specify other tool versions: + # nodejs: "16" + # rust: "1.55" + # golang: "1.17" + +# Build documentation in the docs/ directory with Sphinx +sphinx: + configuration: docs/conf.py + +# If using Sphinx, optionally build your docs in additional formats such as PDF +# formats: +# - pdf + +# Optionally declare the Python requirements required to build your docs +# python: +# install: +# - requirements: docs/requirements.txt diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 00000000..52979645 --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,3 @@ +project = 'MagicSetEditor2' + +version = '2.3.1' diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 00000000..f912d846 --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,21 @@ +Documentation +============= + +Welcome to the Magic Set Editor technical documentation. +These documents describe the file formats and scirpting language used by the program. + +There is currently no information on how to ''use'' the program for making cards. + +--Topics-- +Using the program: +* [[doc/cli|Invoking MSE from the command line]] +Templates: +* [[doc/tutorial|Templating tutorial]] (comming soon) +* [[doc/file|File formats]] +* [[doc/type|Data types used in the files]] +* [[doc/script|Scripting language overview]] +* [[doc/function|Script function reference]] + +--Other information-- +* [[doc/about|MSE credits]] +* [[doc/about/license|License]] diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 00000000..e69de29b From 1814bbd236f74ae963c9c6ca64c2e76ebdc08f6c Mon Sep 17 00:00:00 2001 From: Brendan Hagan Date: Wed, 10 Aug 2022 21:20:31 -0400 Subject: [PATCH 02/24] misc: toctree validation --- docs/file/format.rst | 45 +++++++++++++++++++++++++++++++++++++++++ docs/file/index.rst | 48 ++++++++++++++++++++++++++++++++++++++++++++ docs/index.rst | 16 ++++++++++++--- 3 files changed, 106 insertions(+), 3 deletions(-) create mode 100644 docs/file/format.rst create mode 100644 docs/file/index.rst diff --git a/docs/file/format.rst b/docs/file/format.rst new file mode 100644 index 00000000..c794754c --- /dev/null +++ b/docs/file/format.rst @@ -0,0 +1,45 @@ +Heirarchical files + +The actual MSE data is stored in heirarchical data files, these are usually files with no extension. +For example set or locale. +These are just ordinary text files, but they use an UTF-8 encoding, that means you need to use an editor that supports UTF-8. +Most modern editors support UTF-8, Notepad does on Windows XP. + +--Syntax-- +The files use a heirarchical structure and are made up of keys and values. +A value can be either a simple text string: +>game: magic +Or a block containing more keys and values: +>card: +> name: My Card +> type: Creature + +Indentation is used to find out what belongs to what block. Indentation must be exactly one TAB per level, spaces are not allowed. + +When the value is longer then a single line it can be written indented on the following lines: +>text: +> T: Draw a card +> WW: Gain 1 life + +--Order-- + +Usually the order in which keys appear in a file doesn't matter. +However some keys, like @mse version@ and @type@ must come first because they influence how the following keys are interpreted. + +--Includes-- + +A heirachical file can contain a reference to another file: +>>>include file: filename +Where filename must be an absolute or relative [[type:filename]]. + +That file is included literally into the current one; except for indentation, the included file never escapes from the level the 'include file' line is on. + +--Example-- +For example, a [[type:set]] might look like this: +>game: magic +>style: new +>card: +> name: My Card +> type: Creature +>card: +> name: Another card diff --git a/docs/file/index.rst b/docs/file/index.rst new file mode 100644 index 00000000..fe9bcf6d --- /dev/null +++ b/docs/file/index.rst @@ -0,0 +1,48 @@ +File Formats +============ + +MSE uses several different types of [[file:format|data files]], usually organized into [[file:package]]s. + +--File types-- +The following types are stored in [[file:package]]s in the: + +* [[type:game]] +* [[type:stylesheet]] +* [[type:symbol font]] +* [[type:export template]] +* [[type:locale]] +* [[type:include]] + +The following types are stored in [[file:package]]s that can be located anywhere: + +* [[type:set]] +* [[type:installer]] + +The following types are stored diractly in [[file:format|heirarchical files]], they can be located anywhere: + +* [[type:symbol]] + +Data directories +---------------- + +The data files that come with Magic Set Editor are stored in [[file:package]]s in the ''data directory'', +these are usually subdirectories of that directory. + +There are two data directories, a ''global'' one with data files installed with the program, +and a ''local'' data directory for the current logged in user. +The latter is used for installing packages if the user doesn't have administrator priviliges. + +The location of the global data directory is +! On windows <<< +| Location %MSE_DIR%\data +| Usually C:\Program Files\Magic Set Editor 2\data +! On linux/unix <<< +| Location ??? + +The location of the local data directory is +! On windows <<< +| Location %USER_APPLICATION_DATA%\Magic Set Editor\data +| Usually C:\Documents and Settings\%USERNAME%\Application Data\Magic Set Editor\data + +.. toctree:: + format diff --git a/docs/index.rst b/docs/index.rst index f912d846..b0469b50 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -4,18 +4,28 @@ Documentation Welcome to the Magic Set Editor technical documentation. These documents describe the file formats and scirpting language used by the program. -There is currently no information on how to ''use'' the program for making cards. +There is currently no information on how to *use* the program for making cards. + +Topics +------ ---Topics-- Using the program: + * [[doc/cli|Invoking MSE from the command line]] + Templates: + +* :doc:`File Formats ` * [[doc/tutorial|Templating tutorial]] (comming soon) * [[doc/file|File formats]] * [[doc/type|Data types used in the files]] * [[doc/script|Scripting language overview]] * [[doc/function|Script function reference]] ---Other information-- +Other information +----------------- * [[doc/about|MSE credits]] * [[doc/about/license|License]] + +.. toctree:: + file/index From 4176f0af48b9a9c002b9177dd5e70013f78adc9e Mon Sep 17 00:00:00 2001 From: Brendan Hagan Date: Wed, 10 Aug 2022 22:16:02 -0400 Subject: [PATCH 03/24] misc: start with file directory --- docs/file/format.rst | 9 ++++++--- docs/file/index.rst | 40 +++++++++++++++++++++++----------------- docs/index.rst | 7 +++++-- 3 files changed, 34 insertions(+), 22 deletions(-) diff --git a/docs/file/format.rst b/docs/file/format.rst index c794754c..fcbebe23 100644 --- a/docs/file/format.rst +++ b/docs/file/format.rst @@ -1,11 +1,14 @@ -Heirarchical files +Heirarchical Files +================== The actual MSE data is stored in heirarchical data files, these are usually files with no extension. -For example set or locale. +For example :doc:`set ` or :doc:`locale `. These are just ordinary text files, but they use an UTF-8 encoding, that means you need to use an editor that supports UTF-8. Most modern editors support UTF-8, Notepad does on Windows XP. ---Syntax-- +Syntax +------ + The files use a heirarchical structure and are made up of keys and values. A value can be either a simple text string: >game: magic diff --git a/docs/file/index.rst b/docs/file/index.rst index fe9bcf6d..b3a58ffc 100644 --- a/docs/file/index.rst +++ b/docs/file/index.rst @@ -1,35 +1,37 @@ File Formats ============ -MSE uses several different types of [[file:format|data files]], usually organized into [[file:package]]s. +MSE uses several different types of :doc:`data files `, usually organized into :doc:`packages `. ---File types-- -The following types are stored in [[file:package]]s in the: +File Types +---------- -* [[type:game]] -* [[type:stylesheet]] -* [[type:symbol font]] -* [[type:export template]] -* [[type:locale]] -* [[type:include]] +The following types are stored in :doc:`packages ` in the: -The following types are stored in [[file:package]]s that can be located anywhere: +* :doc:`game ` +* :doc:`stylesheet ` +* :doc:`symbol font ` +* :doc:`export template ` +* :doc:`locale ` +* :doc:`include ` -* [[type:set]] -* [[type:installer]] +The following types are stored in :doc:`packages ` that can be located anywhere: -The following types are stored diractly in [[file:format|heirarchical files]], they can be located anywhere: +* :doc:`set ` +* :doc:`installer ` -* [[type:symbol]] +The following types are stored diractly in :doc:`hierarchical files `, they can be located anywhere: + +* :doc:`symbol ` Data directories ---------------- -The data files that come with Magic Set Editor are stored in [[file:package]]s in the ''data directory'', +The data files that come with Magic Set Editor are stored in :doc:`packages ` in the ``data`` directory, these are usually subdirectories of that directory. -There are two data directories, a ''global'' one with data files installed with the program, -and a ''local'' data directory for the current logged in user. +There are two data directories, a *global* one with data files installed with the program, +and a *local* data directory for the current logged in user. The latter is used for installing packages if the user doesn't have administrator priviliges. The location of the global data directory is @@ -45,4 +47,8 @@ The location of the local data directory is | Usually C:\Documents and Settings\%USERNAME%\Application Data\Magic Set Editor\data .. toctree:: + :hidden: + format + package + style_triangle diff --git a/docs/index.rst b/docs/index.rst index b0469b50..087247db 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -16,8 +16,6 @@ Using the program: Templates: * :doc:`File Formats ` -* [[doc/tutorial|Templating tutorial]] (comming soon) -* [[doc/file|File formats]] * [[doc/type|Data types used in the files]] * [[doc/script|Scripting language overview]] * [[doc/function|Script function reference]] @@ -28,4 +26,9 @@ Other information * [[doc/about/license|License]] .. toctree:: + :maxdepth: 2 + :hidden: + :caption: Documentation + file/index + type/index From 8b0d92da5ea5d14a9ce582f89862411cf6465534 Mon Sep 17 00:00:00 2001 From: Brendan Hagan Date: Wed, 10 Aug 2022 23:21:10 -0400 Subject: [PATCH 04/24] I hate fixed width tables, might wind up using list-tables more...? --- docs/about/credits.rst | 33 +++ docs/about/license.rst | 385 +++++++++++++++++++++++++++++++++++ docs/file/format.rst | 67 +++--- docs/file/package.rst | 23 +++ docs/file/style_triangle.rst | 0 docs/function/index.rst | 0 docs/index.rst | 56 +++-- docs/script/index.rst | 2 + docs/type/index.rst | 2 + 9 files changed, 518 insertions(+), 50 deletions(-) create mode 100644 docs/about/credits.rst create mode 100644 docs/about/license.rst create mode 100644 docs/file/package.rst create mode 100644 docs/file/style_triangle.rst create mode 100644 docs/function/index.rst create mode 100644 docs/script/index.rst create mode 100644 docs/type/index.rst diff --git a/docs/about/credits.rst b/docs/about/credits.rst new file mode 100644 index 00000000..0a5e2537 --- /dev/null +++ b/docs/about/credits.rst @@ -0,0 +1,33 @@ +Credits +======= + +Programming +----------- + +================== ================== +Twan van Laarhoven Main developer +coppro Linux programmer +================== ================== + +Template Development +-------------------- + +====================== ================================================== +Pichoro Template maintainer, keywords and lots more +Artfreakwiu Old style tokens, VS System, Pokemon, split cards +Guinea Pig Hybrid blending masks, Non-creature flip cards +TheWarden Collecting template images +Basilisk Card frames +Jeff Torres (Wolfwood) Vanguard, Flip cards, split cards +JrEye Magic keyword list +Neko_Asakami Multicolor blended flip cards, keywords +====================== ================================================== + +Resources and libraries +----------------------- + +===================================================== ====================== +`Boost `_ Boost C++ library +`wxWidgets `_ GUI library +`Mark James `_ Icons for the program +===================================================== ====================== diff --git a/docs/about/license.rst b/docs/about/license.rst new file mode 100644 index 00000000..7de7a899 --- /dev/null +++ b/docs/about/license.rst @@ -0,0 +1,385 @@ +GNU General Public License +========================== + +Magic Set Editor is licensed under the GNU General Public License version 2 or later + + +==Table of Contents== +* GNU GENERAL PUBLIC LICENSE + * Preamble + * TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + * How to Apply These Terms to Your New Programs + +
+ +Version 2, June 1991 :: + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +==Preamble== + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + +==TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION== + +0. + This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + +1. + You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + +2. + You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + +;a) +; You must cause the modified files to carry prominent notices +; stating that you changed the files and the date of any change. + + +;b) +; You must cause any work that you distribute or publish, that in +; whole or in part contains or is derived from the Program or any +; part thereof, to be licensed as a whole at no charge to all third +; parties under the terms of this License. + + +;c) +; If the modified program normally reads commands interactively +; when run, you must cause it, when started running for such +; interactive use in the most ordinary way, to print or display an +; announcement including an appropriate copyright notice and a +; notice that there is no warranty (or else, saying that you provide +; a warranty) and that users may redistribute the program under +; these conditions, and telling the user how to view a copy of this +; License. (Exception: if the Program itself is interactive but +; does not normally print such an announcement, your work based on +; the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + +3. + You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + +;a) +; Accompany it with the complete corresponding machine-readable +; source code, which must be distributed under the terms of Sections +; 1 and 2 above on a medium customarily used for software interchange; or, + + +;b) +; Accompany it with a written offer, valid for at least three +; years, to give any third party, for a charge no more than your +; cost of physically performing source distribution, a complete +; machine-readable copy of the corresponding source code, to be +; distributed under the terms of Sections 1 and 2 above on a medium +; customarily used for software interchange; or, + + +;c) +; Accompany it with the information you received as to the offer +; to distribute corresponding source code. (This alternative is +; allowed only for noncommercial distribution and only if you +; received the program in object code or executable form with such +; an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + +4. + You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + +5. + You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. + Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + +7. + If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + +8. + If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + +9. + The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + +10. + If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + +NO WARRANTY + + +11. + BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + +12. + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + +==END OF TERMS AND CONDITIONS== + + +==How to Apply These Terms to Your New Programs== + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + +] +] Copyright (C) +] +] This program is free software; you can redistribute it and/or modify +] it under the terms of the GNU General Public License as published by +] the Free Software Foundation; either version 2 of the License, or +] (at your option) any later version. +] +] This program is distributed in the hope that it will be useful, +] but WITHOUT ANY WARRANTY; without even the implied warranty of +] MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +] GNU General Public License for more details. +] +] You should have received a copy of the GNU General Public License +] along with this program; if not, write to the Free Software +] Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + +] Gnomovision version 69, Copyright (C) year name of author +] Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. +] This is free software, and you are welcome to redistribute it +] under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + +] Yoyodyne, Inc., hereby disclaims all copyright interest in the program +] `Gnomovision' (which makes passes at compilers) written by James Hacker. +] +] , 1 April 1989 +] Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/docs/file/format.rst b/docs/file/format.rst index fcbebe23..f7dbf85d 100644 --- a/docs/file/format.rst +++ b/docs/file/format.rst @@ -1,7 +1,7 @@ -Heirarchical Files +Hierarchical Files ================== -The actual MSE data is stored in heirarchical data files, these are usually files with no extension. +The actual MSE data is stored in hierarchical data files, these are usually files with no extension. For example :doc:`set ` or :doc:`locale `. These are just ordinary text files, but they use an UTF-8 encoding, that means you need to use an editor that supports UTF-8. Most modern editors support UTF-8, Notepad does on Windows XP. @@ -9,40 +9,51 @@ Most modern editors support UTF-8, Notepad does on Windows XP. Syntax ------ -The files use a heirarchical structure and are made up of keys and values. -A value can be either a simple text string: ->game: magic -Or a block containing more keys and values: ->card: -> name: My Card -> type: Creature +The files use a hierarchical structure and are made up of keys and values. +A value can be either a simple text string:: + + game: magic -Indentation is used to find out what belongs to what block. Indentation must be exactly one TAB per level, spaces are not allowed. +Or a block containing more keys and values:: -When the value is longer then a single line it can be written indented on the following lines: ->text: -> T: Draw a card -> WW: Gain 1 life + card: + name: My Card + type: Creature ---Order-- +Indentation is used to find out what belongs to what block. Indentation must be exactly one ``TAB`` per level, spaces are not allowed. + +When the value is longer then a single line it can be written indented on the following lines:: + + text: + At the beginning of your upkeep, you may gain 1 life. + WW, T: Gain 1 life + +Order +----- Usually the order in which keys appear in a file doesn't matter. -However some keys, like @mse version@ and @type@ must come first because they influence how the following keys are interpreted. +However some keys, like ``mse version`` and ``type`` must come first because they influence how the following keys are interpreted. + +Includes +-------- ---Includes-- +A hierachical file can contain a reference to another file:: + + include file: filename -A heirachical file can contain a reference to another file: ->>>include file: filename Where filename must be an absolute or relative [[type:filename]]. That file is included literally into the current one; except for indentation, the included file never escapes from the level the 'include file' line is on. ---Example-- -For example, a [[type:set]] might look like this: ->game: magic ->style: new ->card: -> name: My Card -> type: Creature ->card: -> name: Another card +Example +------- + +For example, a :doc:`set `` might look like this:: + + game: magic + style: new + card: + name: My Card + type: Creature + card: + name: Another card diff --git a/docs/file/package.rst b/docs/file/package.rst new file mode 100644 index 00000000..8714328e --- /dev/null +++ b/docs/file/package.rst @@ -0,0 +1,23 @@ +Packages +======== + +Most files used by Magic Set Editor are stored in *packages*. + +A package is either a zip file or simply a directory. + +A package has an extension to indicate its type, for example ``"*.mse-set"`` is a [[type:set]] file and ``"*.mse-symbol-font"`` is a [[type:symbol font]]. +To open a zipped package using a program like winzip you may need to rename it to ``"something.zip"`` + +Contents +-------- + +A package always contains a [[file:format|heirarchical data file]] with the same name as the package type and no extension. +For example ``"my-set.mse-set"`` contains a file called ``"set"``. + +A package can also contain other files like images. + +Examples +-------- + +The [[file:index|data directory]] contains packages in the form of directories. +Each of the subdirectories is a package. diff --git a/docs/file/style_triangle.rst b/docs/file/style_triangle.rst new file mode 100644 index 00000000..e69de29b diff --git a/docs/function/index.rst b/docs/function/index.rst new file mode 100644 index 00000000..e69de29b diff --git a/docs/index.rst b/docs/index.rst index 087247db..2703d43e 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,29 +1,13 @@ Documentation ============= -Welcome to the Magic Set Editor technical documentation. -These documents describe the file formats and scirpting language used by the program. - -There is currently no information on how to *use* the program for making cards. - -Topics ------- - -Using the program: - -* [[doc/cli|Invoking MSE from the command line]] - -Templates: - -* :doc:`File Formats ` -* [[doc/type|Data types used in the files]] -* [[doc/script|Scripting language overview]] -* [[doc/function|Script function reference]] +.. toctree:: + :hidden: + :caption: Links -Other information ------------------ -* [[doc/about|MSE credits]] -* [[doc/about/license|License]] + Releases + Forums + Original Website .. toctree:: :maxdepth: 2 @@ -32,3 +16,31 @@ Other information file/index type/index + script/index + function/index + +.. toctree:: + :hidden: + :caption: Other + + about/credits + License + + +What is Magic Set Editor? +------------------------- + +Magic Set Editor, or MSE for short, is a program with which you can design your own cards for popular trading card games. MSE can then generate images of those cards that you can print or upload to the internet. Magic Set Editor also has a statistics window that will give useful information about your set, like the average mana cost, number of rares, etc. When you have finished your set, you can export it to an HTML file to use on the Internet, or to Apprentice or CCG Lackey so you can play with your cards online. + +**Disclaimer**: MSE is intended for creating custom cards only, and should not be used to attempt the creation or distribution of counterfeits of real items produced by Wizards of the Coast, Konami, or other companies. Nor should any custom cards generated be passed off as if they are real in any setting. + +Features +-------- + +- Easily create your own cards for Magic: the Gathering, VS System, Yu-Gi-Oh!, and other games +- Create realistic looking images of your cards +- Analyze your set and find ways to improve it +- Play with your own cards in Apprentice and CCG Lackey +- Create professional looking 'spoilers' +- Keep all of your designs in one place +- Templates available up to M15 frame keep your cards up to date diff --git a/docs/script/index.rst b/docs/script/index.rst new file mode 100644 index 00000000..7659f86c --- /dev/null +++ b/docs/script/index.rst @@ -0,0 +1,2 @@ +Scripting Language +================== diff --git a/docs/type/index.rst b/docs/type/index.rst new file mode 100644 index 00000000..4d994298 --- /dev/null +++ b/docs/type/index.rst @@ -0,0 +1,2 @@ +Object Types +============ From 1fe8ab545d78cf393ba8ce6ec7c722178e7bb75d Mon Sep 17 00:00:00 2001 From: Brendan Hagan Date: Wed, 10 Aug 2022 23:41:36 -0400 Subject: [PATCH 05/24] misc: fix restructuredtext license formatting --- docs/about/license.rst | 237 +++++++++++++++++------------------------ 1 file changed, 98 insertions(+), 139 deletions(-) diff --git a/docs/about/license.rst b/docs/about/license.rst index 7de7a899..cb564e38 100644 --- a/docs/about/license.rst +++ b/docs/about/license.rst @@ -1,28 +1,21 @@ GNU General Public License ========================== -Magic Set Editor is licensed under the GNU General Public License version 2 or later +Magic Set Editor is licensed under the GNU General Public License version 2 or later. +==== -==Table of Contents== -* GNU GENERAL PUBLIC LICENSE - * Preamble - * TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - * How to Apply These Terms to Your New Programs +*Version 2, June 1991* +*Copyright © 1989, 1991 Free Software Foundation, Inc.* +*51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA* -
+Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. -Version 2, June 1991 :: +Preamble +~~~~~~~~ - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -==Preamble== - - The licenses for most software are designed to take away your +The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This @@ -32,49 +25,48 @@ using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. - When we speak of free software, we are referring to freedom, not +When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. - To protect your rights, we need to make restrictions that forbid +To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. - For example, if you distribute copies of such a program, whether +For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, +We protect your rights with two steps: **(1)** copyright the software, and +**(2)** offer you this license which gives you legal permission to copy, distribute and/or modify the software. - Also, for each author's protection and ours, we want to make certain +Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. - Finally, any free program is threatened constantly by software +Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. - The precise terms and conditions for copying, distribution and +The precise terms and conditions for copying, distribution and modification follow. +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -==TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION== - -0. - This License applies to any program or other work which contains +**0.** This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" @@ -91,8 +83,7 @@ is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. -1. - You may copy and distribute verbatim copies of the Program's +**1.** You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the @@ -103,35 +94,27 @@ along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. -2. - You may modify your copy or copies of the Program or any portion +**2.** You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: -;a) -; You must cause the modified files to carry prominent notices -; stating that you changed the files and the date of any change. - - -;b) -; You must cause any work that you distribute or publish, that in -; whole or in part contains or is derived from the Program or any -; part thereof, to be licensed as a whole at no charge to all third -; parties under the terms of this License. - - -;c) -; If the modified program normally reads commands interactively -; when run, you must cause it, when started running for such -; interactive use in the most ordinary way, to print or display an -; announcement including an appropriate copyright notice and a -; notice that there is no warranty (or else, saying that you provide -; a warranty) and that users may redistribute the program under -; these conditions, and telling the user how to view a copy of this -; License. (Exception: if the Program itself is interactive but -; does not normally print such an announcement, your work based on -; the Program is not required to print an announcement.) +* **a)** You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. +* **b)** You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. +* **c)** If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, @@ -153,33 +136,24 @@ with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. -3. - You may copy and distribute the Program (or a work based on it, +**3.** You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: - -;a) -; Accompany it with the complete corresponding machine-readable -; source code, which must be distributed under the terms of Sections -; 1 and 2 above on a medium customarily used for software interchange; or, - - -;b) -; Accompany it with a written offer, valid for at least three -; years, to give any third party, for a charge no more than your -; cost of physically performing source distribution, a complete -; machine-readable copy of the corresponding source code, to be -; distributed under the terms of Sections 1 and 2 above on a medium -; customarily used for software interchange; or, - - -;c) -; Accompany it with the information you received as to the offer -; to distribute corresponding source code. (This alternative is -; allowed only for noncommercial distribution and only if you -; received the program in object code or executable form with such -; an offer, in accord with Subsection b above.) +* **a)** Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, +* **b)** Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, +* **c)** Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source @@ -198,8 +172,7 @@ access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. -4. - You may not copy, modify, sublicense, or distribute the Program +**4.** You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. @@ -207,8 +180,7 @@ However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. -5. - You are not required to accept this License, since you have not +**5.** You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by @@ -217,8 +189,7 @@ Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. -6. - Each time you redistribute the Program (or any work based on the +**6.** Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further @@ -226,8 +197,7 @@ restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. -7. - If, as a consequence of a court judgment or allegation of patent +**7.** If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not @@ -259,9 +229,7 @@ impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. - -8. - If the distribution and/or use of the Program is restricted in +**8.** If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding @@ -269,9 +237,7 @@ those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. - -9. - The Free Software Foundation may publish revised and/or new versions +**9.** The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. @@ -284,9 +250,7 @@ Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. - -10. - If you wish to incorporate parts of the Program into other free +**10.** If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes @@ -294,12 +258,10 @@ make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. +NO WARRANTY +~~~~~~~~~~~ -NO WARRANTY - - -11. - BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +**11.** BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED @@ -309,9 +271,7 @@ TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - -12. - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +**12.** IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING @@ -321,65 +281,64 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -==END OF TERMS AND CONDITIONS== - +*END OF TERMS AND CONDITIONS* -==How to Apply These Terms to Your New Programs== +How to Apply These Terms to Your New Programs +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - If you develop a new program, and you want it to be of the greatest +If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. - To do so, attach the following notices to the program. It is safest +To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. -] -] Copyright (C) -] -] This program is free software; you can redistribute it and/or modify -] it under the terms of the GNU General Public License as published by -] the Free Software Foundation; either version 2 of the License, or -] (at your option) any later version. -] -] This program is distributed in the hope that it will be useful, -] but WITHOUT ANY WARRANTY; without even the implied warranty of -] MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -] GNU General Public License for more details. -] -] You should have received a copy of the GNU General Public License -] along with this program; if not, write to the Free Software -] Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: -] Gnomovision version 69, Copyright (C) year name of author -] Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. -] This is free software, and you are welcome to redistribute it -] under certain conditions; type `show c' for details. + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. -The hypothetical commands `show w' and `show c' should show the appropriate +The hypothetical commands `show w` and `show c` should show the appropriate parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be +be called something other than `show w' and `show c`; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: -] Yoyodyne, Inc., hereby disclaims all copyright interest in the program -] `Gnomovision' (which makes passes at compilers) written by James Hacker. -] -] , 1 April 1989 -] Ty Coon, President of Vice + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General +library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. From 1597ed6aaea014f510e337664fd26a92cfd2c8e4 Mon Sep 17 00:00:00 2001 From: Brendan Hagan Date: Thu, 11 Aug 2022 00:02:49 -0400 Subject: [PATCH 06/24] misc: remove old files --- doc/about/index.txt | 23 -- doc/about/license.txt | 384 -------------------------- doc/file/format.txt | 45 --- doc/file/index.txt | 39 --- doc/file/package.txt | 20 -- doc/file/style_triangle.txt | 19 -- docs/file/index.rst | 22 +- {doc => docs}/file/style-triangle.jpg | Bin docs/file/style_triangle.rst | 41 +++ 9 files changed, 51 insertions(+), 542 deletions(-) delete mode 100644 doc/about/index.txt delete mode 100644 doc/about/license.txt delete mode 100644 doc/file/format.txt delete mode 100644 doc/file/index.txt delete mode 100644 doc/file/package.txt delete mode 100644 doc/file/style_triangle.txt rename {doc => docs}/file/style-triangle.jpg (100%) diff --git a/doc/about/index.txt b/doc/about/index.txt deleted file mode 100644 index cd44af75..00000000 --- a/doc/about/index.txt +++ /dev/null @@ -1,23 +0,0 @@ -Magic Set Editor credits - -! Programming <<< -| [[user/1|Twan van Laarhoven]] Main developer -| [[user/430|coppro]] Linux programmer - -! Template development <<< -| [[user/14|Pichoro]] Template maintainer, keywords and lots more -| Artfreakwiu Old style tokens, VS System, Pokemon, split cards -| Guinea Pig Hybrid blending masks, Non-creature flip cards -| TheWarden Collecting template images -| Basilisk Card frames -| Jeff Torres (Wolfwood) Vanguard, Flip cards, split cards -| JrEye Magic keyword list -| Neko_Asakami Multicolor blended flip cards, keywords - -! Resources and libraries <<< -| [[http://boost.org|Boost]] Boost C++ library -| [[http://wxwidgets.org|wxWidgets]] GUI library -| [[http://famfamfam.com/lab/icons/silk/|Mark James]] Icons for the program - -! Alpha and beta testing <<< -| ''Too many people to mention!'' <<< diff --git a/doc/about/license.txt b/doc/about/license.txt deleted file mode 100644 index 3557979b..00000000 --- a/doc/about/license.txt +++ /dev/null @@ -1,384 +0,0 @@ -GNU General Public License - -Magic Set Editor is licensed under the GNU General Public License version 2 or later - - -==Table of Contents== -* GNU GENERAL PUBLIC LICENSE - * Preamble - * TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - * How to Apply These Terms to Your New Programs - -
- -Version 2, June 1991 - -]Copyright (C) 1989, 1991 Free Software Foundation, Inc. -]51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -] -]Everyone is permitted to copy and distribute verbatim copies -]of this license document, but changing it is not allowed. - -==Preamble== - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - -==TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION== - -0. - This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - -1. - You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - -2. - You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - -;a) -; You must cause the modified files to carry prominent notices -; stating that you changed the files and the date of any change. - - -;b) -; You must cause any work that you distribute or publish, that in -; whole or in part contains or is derived from the Program or any -; part thereof, to be licensed as a whole at no charge to all third -; parties under the terms of this License. - - -;c) -; If the modified program normally reads commands interactively -; when run, you must cause it, when started running for such -; interactive use in the most ordinary way, to print or display an -; announcement including an appropriate copyright notice and a -; notice that there is no warranty (or else, saying that you provide -; a warranty) and that users may redistribute the program under -; these conditions, and telling the user how to view a copy of this -; License. (Exception: if the Program itself is interactive but -; does not normally print such an announcement, your work based on -; the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - -3. - You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - -;a) -; Accompany it with the complete corresponding machine-readable -; source code, which must be distributed under the terms of Sections -; 1 and 2 above on a medium customarily used for software interchange; or, - - -;b) -; Accompany it with a written offer, valid for at least three -; years, to give any third party, for a charge no more than your -; cost of physically performing source distribution, a complete -; machine-readable copy of the corresponding source code, to be -; distributed under the terms of Sections 1 and 2 above on a medium -; customarily used for software interchange; or, - - -;c) -; Accompany it with the information you received as to the offer -; to distribute corresponding source code. (This alternative is -; allowed only for noncommercial distribution and only if you -; received the program in object code or executable form with such -; an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - -4. - You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - -5. - You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - -6. - Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - -7. - If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - -8. - If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - -9. - The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - -10. - If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - -NO WARRANTY - - -11. - BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - -12. - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - -==END OF TERMS AND CONDITIONS== - - -==How to Apply These Terms to Your New Programs== - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - -] -] Copyright (C) -] -] This program is free software; you can redistribute it and/or modify -] it under the terms of the GNU General Public License as published by -] the Free Software Foundation; either version 2 of the License, or -] (at your option) any later version. -] -] This program is distributed in the hope that it will be useful, -] but WITHOUT ANY WARRANTY; without even the implied warranty of -] MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -] GNU General Public License for more details. -] -] You should have received a copy of the GNU General Public License -] along with this program; if not, write to the Free Software -] Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - -] Gnomovision version 69, Copyright (C) year name of author -] Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. -] This is free software, and you are welcome to redistribute it -] under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - -] Yoyodyne, Inc., hereby disclaims all copyright interest in the program -] `Gnomovision' (which makes passes at compilers) written by James Hacker. -] -] , 1 April 1989 -] Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/doc/file/format.txt b/doc/file/format.txt deleted file mode 100644 index 27354b06..00000000 --- a/doc/file/format.txt +++ /dev/null @@ -1,45 +0,0 @@ -Heirarchical files - -The actual MSE data is stored in heirarchical data files, these are usually files with no extension. -For example set or locale. -These are just ordinary text files, but they use an UTF-8 encoding, that means you need to use an editor that supports UTF-8. -Most modern editors support UTF-8, Notepad does on Windows XP. - ---Syntax-- -The files use a heirarchical structure and are made up of keys and values. -A value can be either a simple text string: ->game: magic -Or a block containing more keys and values: ->card: -> name: My Card -> type: Creature - -Indentation is used to find out what belongs to what block. Indentation must be exactly one TAB per level, spaces are not allowed. - -When the value is longer then a single line it can be written indented on the following lines: ->text: -> T: Draw a card -> WW: Gain 1 life - ---Order-- - -Usually the order in which keys appear in a file doesn't matter. -However some keys, like @mse version@ and @type@ must come first because they influence how the following keys are interpreted. - ---Includes-- - -A heirachical file can contain a reference to another file: ->>>include file: filename -Where filename must be an absolute or relative [[type:filename]]. - -That file is included literally into the current one; except for indentation, the included file never escapes from the level the 'include file' line is on. - ---Example-- -For example, a [[type:set]] might look like this: ->game: magic ->style: new ->card: -> name: My Card -> type: Creature ->card: -> name: Another card diff --git a/doc/file/index.txt b/doc/file/index.txt deleted file mode 100644 index dd773ae1..00000000 --- a/doc/file/index.txt +++ /dev/null @@ -1,39 +0,0 @@ -Data files - -MSE uses several different types of [[file:format|data files]], usually organized into [[file:package]]s. - ---File types-- -The following types are stored in [[file:package]]s in the: -* [[type:game]] -* [[type:stylesheet]] -* [[type:symbol font]] -* [[type:export template]] -* [[type:locale]] -* [[type:include]] - -The following types are stored in [[file:package]]s that can be located anywhere: -* [[type:set]] -* [[type:installer]] - -The following types are stored diractly in [[file:format|heirarchical files]], they can be located anywhere: -* [[type:symbol]] - ---Data directories-- -The data files that come with Magic Set Editor are stored in [[file:package]]s in the ''data directory'', -these are usually subdirectories of that directory. - -There are two data directories, a ''global'' one with data files installed with the program, -and a ''local'' data directory for the current logged in user. -The latter is used for installing packages if the user doesn't have administrator priviliges. - -The location of the global data directory is -! On windows <<< -| Location %MSE_DIR%\data -| Usually C:\Program Files\Magic Set Editor 2\data -! On linux/unix <<< -| Location ??? - -The location of the local data directory is -! On windows <<< -| Location %USER_APPLICATION_DATA%\Magic Set Editor\data -| Usually C:\Documents and Settings\%USERNAME%\Application Data\Magic Set Editor\data diff --git a/doc/file/package.txt b/doc/file/package.txt deleted file mode 100644 index 426484f3..00000000 --- a/doc/file/package.txt +++ /dev/null @@ -1,20 +0,0 @@ -Packages - -Most files used by Magic Set Editor are stored in ''packages''. - -A package is either a zip file or simply a directory. - -A package has an extension to indicate its type, for example @"*.mse-set"@ is a [[type:set]] file and @"*.mse-symbol-font"@ is a [[type:symbol font]]. -To open a zipped package using a program like winzip you may need to rename it to @"something.zip"@ - ---Contents-- - -A package always contains a [[file:format|heirarchical data file]] with the same name as the package type and no extension. -For example @"my-set.mse-set"@ contains a file called @"set"@. - -A package can also contain other files like images. - ---Examples-- - -The [[file:index|data directory]] contains packages in the form of directories. -Each of the subdirectories is a package. diff --git a/doc/file/style_triangle.txt b/doc/file/style_triangle.txt deleted file mode 100644 index e20569e5..00000000 --- a/doc/file/style_triangle.txt +++ /dev/null @@ -1,19 +0,0 @@ -Style triangle - -A central idea of MSE is the separation of data and styling. - -Consider a single card, say "Forest". -This card could be printed in an old set, for example Fifth Edition, using an old style frame. -The ''same'' card can also be put into a new fram in for instance Ninth Edition. - -So the card (the data) is independent of the style, but both are based on the same game (description), i.e. Magic. - -This distinction is made on two levels. -The three different types of packages, [[type:game]], [[type:stylesheet]] and [[type:set]]. -They contain three different things, [[type:field]]s, [[type:style]]s and [[type:value]]s. - -This is illustrated in the diagram on the right and in the following table. -| Description Looks Data -| High level [[type:Game]] [[type:Stylesheet]] [[type:Set]] -| [[type:Card]] -| Low level [[type:Field]] [[type:Style]] [[type:Value]] diff --git a/docs/file/index.rst b/docs/file/index.rst index b3a58ffc..955425d4 100644 --- a/docs/file/index.rst +++ b/docs/file/index.rst @@ -24,7 +24,7 @@ The following types are stored diractly in :doc:`hierarchical files `, t * :doc:`symbol ` -Data directories +Data Directories ---------------- The data files that come with Magic Set Editor are stored in :doc:`packages ` in the ``data`` directory, @@ -34,17 +34,15 @@ There are two data directories, a *global* one with data files installed with th and a *local* data directory for the current logged in user. The latter is used for installing packages if the user doesn't have administrator priviliges. -The location of the global data directory is -! On windows <<< -| Location %MSE_DIR%\data -| Usually C:\Program Files\Magic Set Editor 2\data -! On linux/unix <<< -| Location ??? - -The location of the local data directory is -! On windows <<< -| Location %USER_APPLICATION_DATA%\Magic Set Editor\data -| Usually C:\Documents and Settings\%USERNAME%\Application Data\Magic Set Editor\data +.. list-table:: On Windows + :header-rows: 0 + :stub-columns: 1 + :align: left + + * - Global + - ``%MSE_DIR%\data`` + * - Local + - ``%AppData%\Magic Set Editor\data`` .. toctree:: :hidden: diff --git a/doc/file/style-triangle.jpg b/docs/file/style-triangle.jpg similarity index 100% rename from doc/file/style-triangle.jpg rename to docs/file/style-triangle.jpg diff --git a/docs/file/style_triangle.rst b/docs/file/style_triangle.rst index e69de29b..0a1caced 100644 --- a/docs/file/style_triangle.rst +++ b/docs/file/style_triangle.rst @@ -0,0 +1,41 @@ +Style Triangle +============== + +.. image:: style-triangle.jpg + :align: right + +A central idea of MSE is the separation of data and styling. + +Consider a single card, say "Forest". +This card could be printed in an old set, for example Fifth Edition, using an old style frame. +The *same* card can also be put into a new fram in for instance Ninth Edition. + +So the card (the data) is independent of the style, but both are based on the same game (description), i.e. Magic. + +This distinction is made on two levels. +The three different types of packages, [[type:game]], [[type:stylesheet]] and [[type:set]]. +They contain three different things, [[type:field]]s, [[type:style]]s and [[type:value]]s. + +This is illustrated in the diagram on the right and in the following table. + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - + - Description + - Looks + - Data + * - High Level + - :doc:`Game ` + - :doc:`Stylesheet ` + - :doc:`Set ` + * - + - + - + - :doc:`Card ` + * - Low Level + - :doc:`Field ` + - :doc:`Style ` + - :doc:`Value ` From 84ef2a317141ae1d1df4d0744117ae3fa66cc6b8 Mon Sep 17 00:00:00 2001 From: Brendan Hagan Date: Thu, 11 Aug 2022 00:13:54 -0400 Subject: [PATCH 07/24] misc: move style triangle to concepts top level section --- .../{file/style_triangle.rst => concepts/index.rst} | 9 ++++++--- docs/{file => concepts}/style-triangle.jpg | Bin docs/file/index.rst | 1 - docs/index.rst | 1 + 4 files changed, 7 insertions(+), 4 deletions(-) rename docs/{file/style_triangle.rst => concepts/index.rst} (93%) rename docs/{file => concepts}/style-triangle.jpg (100%) diff --git a/docs/file/style_triangle.rst b/docs/concepts/index.rst similarity index 93% rename from docs/file/style_triangle.rst rename to docs/concepts/index.rst index 0a1caced..f844f3f2 100644 --- a/docs/file/style_triangle.rst +++ b/docs/concepts/index.rst @@ -1,5 +1,8 @@ +Core Concepts +============= + Style Triangle -============== +-------------- .. image:: style-triangle.jpg :align: right @@ -24,8 +27,8 @@ This is illustrated in the diagram on the right and in the following table. :align: left * - - - Description - - Looks + - Definition + - Appearance - Data * - High Level - :doc:`Game ` diff --git a/docs/file/style-triangle.jpg b/docs/concepts/style-triangle.jpg similarity index 100% rename from docs/file/style-triangle.jpg rename to docs/concepts/style-triangle.jpg diff --git a/docs/file/index.rst b/docs/file/index.rst index 955425d4..8ec5b788 100644 --- a/docs/file/index.rst +++ b/docs/file/index.rst @@ -49,4 +49,3 @@ The latter is used for installing packages if the user doesn't have administrato format package - style_triangle diff --git a/docs/index.rst b/docs/index.rst index 2703d43e..87bdcc55 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -14,6 +14,7 @@ Documentation :hidden: :caption: Documentation + concepts/index file/index type/index script/index From 09efb757c430fd8872cdf9e18406d4d87e3776be Mon Sep 17 00:00:00 2001 From: Brendan Hagan Date: Thu, 11 Aug 2022 00:28:53 -0400 Subject: [PATCH 08/24] misc: sphinx configuration --- docs/conf.py | 18 ++++++++++++++++++ docs/logo.png | Bin 0 -> 5667 bytes 2 files changed, 18 insertions(+) create mode 100644 docs/logo.png diff --git a/docs/conf.py b/docs/conf.py index 52979645..5dc365c2 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,3 +1,21 @@ project = 'MagicSetEditor2' version = '2.3.1' +release = '2.3.1' + +html_logo = 'logo.png' + +html_theme_options = { + 'collapse_navigation': False, + 'style_external_links': True, + 'prev_next_buttons_location': 'both', + 'style_nav_header_background': '#aa2828', +} + +# html_static_path = ['_static'] +# html_css_files = [ +# 'css/custom.css' +# ] +# html_js_files = [ +# 'js/custom.js' +# ] diff --git a/docs/logo.png b/docs/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..919e470928c273eac8d74bd625e5f7f8056d8c9b GIT binary patch literal 5667 zcmV+;7ToEHP)F2?Pch1_cKV7AOb^HUGVIy@C7NdyE~1O!JG z4M+(VR|*(O85UU<7+4bwY6Sy!1q6B)3}^}%b_o|~85w#R6=xO+S11-uC=_QW8F(fc zc{LYoG8I!0D0mnpZ51t1C@6O*CwDg}cs4g`EiQFOIu$EN88%uCGEf>kW(zuGBQ;%S zGDHzbS{FrW3rctvMsyihb`DN(7h!uPQ*di#V}u+OiW?Y?2@9wj4!0c*q#F{f9Tcb> z8M7S|x*imYBN>(_8jCa+tRfh^A{4wM8nhx7uq_jc4Jn2wC7C%WmNzwxFfXY$Evq~= zvpqJoEh(oIAj2LI!y^>SBo)IX8qFmd$|)MrCmP5t6URF%%rh$EEiaNvGO0y5xI;Lw zQZTDdAkR%4^jQ|{PaO4W7|KUD(@QzgN-ODEHSAF;%x5n1X(#k`DCcH3^LRJxZZV8B zM5H-Rh*?RLP)e&+Mz>Z(XhpYrWv+5* zopo)_RY=lqRO)h0#dl@NZDs0sVC^qJ@`^LKgKgW5Q1XaK?~POQtXIZ`Y|Dyt)r@!B zm3!QpebtqE&XIQFm3-rxedm*R?38cssdLh+T zniOb?EOL|yc&8V7qz!GMC}fgbb&nB(o)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_ueGL7c%??-TRpt?HZUA7YlczZnj{Rb$0 z8W~R}5Zs6~SJwcF1C>holnIFJiBa$ZFgPd@4fI1uCm6Q2dV01vr#X;Fw&DZ$NuVcg z!RKC559U>mM6i#IjgF2F4-X9vylj&=`tR`I-o1GxHmCmK&r9%I$B@KP;OW1?)2D3< z>hNPp{gI>p7K00l_0v~|503t8e59hM7h~p2-_gGGd2LSF{}1U=gjPH!5i0-y002ov JPDHLkV1h{mq_6-0 literal 0 HcmV?d00001 From 9f6abb217c6411a3c73c02bcd54153d957d3d0c9 Mon Sep 17 00:00:00 2001 From: Brendan Hagan Date: Thu, 11 Aug 2022 00:34:58 -0400 Subject: [PATCH 09/24] misc: specify theme to make theme specific config work? --- docs/conf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/conf.py b/docs/conf.py index 5dc365c2..1cb35467 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -5,6 +5,7 @@ html_logo = 'logo.png' +html_theme = 'sphinx_rtd_theme' html_theme_options = { 'collapse_navigation': False, 'style_external_links': True, From f7984d62c7c6b484aff97d03eedb33d620dbd6f4 Mon Sep 17 00:00:00 2001 From: Brendan Hagan Date: Mon, 15 Aug 2022 21:58:12 -0400 Subject: [PATCH 10/24] misc: transparent logo --- docs/conf.py | 2 +- docs/logo.png | Bin 5667 -> 29659 bytes docs/logo_sml.psd | Bin 0 -> 59743 bytes 3 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 docs/logo_sml.psd diff --git a/docs/conf.py b/docs/conf.py index 1cb35467..1ace4eb3 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -10,7 +10,7 @@ 'collapse_navigation': False, 'style_external_links': True, 'prev_next_buttons_location': 'both', - 'style_nav_header_background': '#aa2828', + 'style_nav_header_background': '#2175bc', } # html_static_path = ['_static'] diff --git a/docs/logo.png b/docs/logo.png index 919e470928c273eac8d74bd625e5f7f8056d8c9b..7f45af508053e256f631f7f7781def51f27d71a3 100644 GIT binary patch literal 29659 zcme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q2dV01vr#X;Fw&DZ$NuVcg z!RKC559U>mM6i#IjgF2F4-X9vylj&=`tR`I-o1GxHmCmK&r9%I$B@KP;OW1?)2D3< z>hNPp{gI>p7K00l_0v~|503t8e59hM7h~p2-_gGGd2LSF{}1U=gjPH!5i0-y002ov JPDHLkV1h{mq_6-0 diff --git a/docs/logo_sml.psd b/docs/logo_sml.psd new file mode 100644 index 0000000000000000000000000000000000000000..448964b6418e109ce49311f949aae62f31349b65 GIT binary patch literal 59743 zcmeFa30zah`agWKk_C_@2??8&Em1^v0tjx%E{GyaY-wc)Ne}`JTZq@%RECL>T8 zpv=zA7U!qfDYLWWc>&5G`;_#YRB-@=F|wPz9iAnBS&;o4EWs`*I@T^YMa;%u=zKM(jk{*(_OjgFpR{Znz-*?-EJmmg9HHF$=|pK|6cF3uIZ zEfVMD6e!ZfA%&oc!=EXiE6vHz$&=>%MZG7I$7+u^&KPEapngEGLY$JHqgb4ilQna! z-DAhgvkMN!+u2T#D3hn>6y;3`bo(RA^A>nsns{DHzIdjmJ2a}hpR0$@Vo#3%A7Oxp zhpW4HfV;b1A!9lJP)0OZV|q${%D+>}3wi%oPENWkqxjz{<#|rMGSbrmGIA8zDfu%~ za&xm}X(^cbxfROOpBdEzuz_yRv+D8V#t{%9&&yAdr->ux%>=@9nJhgZHPti4GtJw} z)yF3#)iu@E+uhYqm@0Hl_ww?}5PJCer2G2eAVo*(v;R}k^K#M(F#CK~bozf-v>y9E z6}>x*k7@pU4nJu-Xl)@_KVcGYvC%aeAQJ3)JUoO>jPAll@N{aIAbi_P>@JpW8EV zqNfA|=Vaw5qI1&4Gra=c{*3%wz8+UZaB!?5CqtGco|(5OY_45INU*Pmzpt;W=X4MK zV)XJoD`!kmz2O6|#~2j`Cm0vqCI-eAt2ki>|K-5*3jUW1)-Udr5PdXW8h!=WOCi$F z@Cq({G+r8h1=mX<($DY;E`2m!8h!=WOCi$F@Cq({G+r8h1=mX<($DY;E`2m!8h!=W zOCi$F@Cq({G+r8h1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XCfQ={0xfOOdGT-wUOAu;{=kyOW$G(1p~8CpdZO*O`e&8DQl)ct=XZd#8$z;z;|kmPq4yX$~IVl zt&0W=)Ly(2RAIGXU{(vHLQ|i5(*@F@DQg}3h4zi@7uLk1+K7R4u(XQK2udv(Oj%0? z(!tWI=&&H)oS`Xa&LB+=b9j(z(_k*JX^`fo62pc<9re}?q=U~2DKK#We+a3G1BtLf zq{hy{!0a4IMLg3fHg+&Dr-VWcB^D0`X7M21la0(C9$nw;fn@OURTZ`mMzVb%6|BC> zG=ONz89-25tiH;%f-q&RAgHZaf0bzpVI)%sYTH`)0IL$8i2D2;a#Q|sOMHBFW9x_( ziFE`;(zK@X3T_g66}U-Iy`pVR-BoHZ(J9AZVx79HHC4`YqEYmm_&;2C)#?n*o3?I$ ztfOL>Z*8iD4_dan zuV-3*av|}1-)Ofs*462BwcrI)rKvVQb`Vxv{ks5PuT zqa})smfn0hdcwWEg_hnQA3k~TF*7Y)yZFMh-5ne)-JBdd)zfLArMb!Tr+OS;EM;_G zWa9tbQP7E_D%`14Cfm>ZrN;9nlUIQh=crvLeRPQnPY$N}#_bohm_ zm%snRi;@+&dFRx3hWHm@1r0)DZl>ya`uHD4URgBbG~}i#5Ua|ExZtSIPj8=tCrdWQd5b literal 0 HcmV?d00001 From 40bede23e74467c51dec141dc25f38f2d68a42db Mon Sep 17 00:00:00 2001 From: Brendan Hagan Date: Mon, 15 Aug 2022 22:23:45 -0400 Subject: [PATCH 11/24] misc: check behavior of include directive --- docs/script/index.rst | 62 ++++++++++++++++++++++++++++++++++++ docs/script/introduction.rst | 35 ++++++++++++++++++++ 2 files changed, 97 insertions(+) create mode 100644 docs/script/introduction.rst diff --git a/docs/script/index.rst b/docs/script/index.rst index 7659f86c..2ffe7826 100644 --- a/docs/script/index.rst +++ b/docs/script/index.rst @@ -1,2 +1,64 @@ Scripting Language ================== + +MSE uses a custom scripting language to add complicated behaviour to [[type:field]]s and [[type:style]]s. + +Topics +------ + +* [[script:introduction|Introduction to scripting]] +* [[script:Operators]] +* [[script:Variables]] +* [[script:Functions]] +* [[script:Default arguments]] +* [[script:Control structures]] +* [[script:Predefined variables]] +* [[script:Best practices]] + +See also: +* [[type:index|Data types used]] +* [[fun:index|Built in functions]] + +Syntax index +------------ + +| ``#comment`` Comments ignored by the parser +| ``123`` [[type:int|A literal number]] +| ``"stuff"`` [[type:string|A literal string]] +| ``[a,b,c]`` [[type:list|A literal list]] +| ``[a:b, c:d]`` [[type:map|A literal map]] +| ``{ expr }`` [[script:functions|Function definition]] +| ``fun(a:b, c:d)`` [[script:functions|Function call]] +| ``fun(value)`` [[script:functions|Function call with '``input``' argument]] +| ``fun@(a:b)`` [[script:default_arguments|Default arguments]] +| ``a.b`` [[script:operators|Property 'b' of 'a']] +| ``a[b]`` [[script:operators|Property 'value of b' of 'a']] +| ``-a`` [[script:operators|Negation]] +| ``a + b`` [[script:operators|Addition / concatenation]] +| ``a - b`` [[script:operators|Subtraction]] +| ``a * b`` [[script:operators|Multiplication]] +| ``a / b`` [[script:operators|Floating point division]] +| ``a div b`` [[script:operators|Integer division]] +| ``a mod b`` [[script:operators|Remainder]] +| ``a ^ b`` [[script:operators|Exponentiation]] +| ``not a`` [[type:boolean|Boolean not]] +| ``a and b`` [[type:boolean|Boolean conjunction]] +| ``a or b`` [[type:boolean|Boolean disjunction]] +| ``a xor b`` [[type:boolean|Boolean xor]] +| ``a == b`` [[script:operators|Comparison for equality]] +| ``a != b`` [[script:operators|Comparison for inequality]] +| ``a < b`` [[script:operators|Comparison]] +| ``a > b`` [[script:operators|Comparison]] +| ``a <= b`` [[script:operators|Comparison]] +| ``a >= b`` [[script:operators|Comparison]] +| ``a or else b`` Use ``a`` unless it is an error, then use ``b`` instead. +| ``min(a,b,c,...)`` [[script:operators|Smallest of the values]] +| ``max(a,b,c,...)`` [[script:operators|Largest of the values]] +| ``rgb(r,g,b)`` [[type:color|A color value]] +| ``rgba(r,g,b)`` [[type:color|A color value with transparency]] +| ``if x then y`` [[script:control structures|Conditional expresion]] +| ``if x then y else z`` [[script:control structures|Conditional expresion]] +| ``for x in list do y`` [[script:control structures|Loop over elements in a list]] +| ``for x from a to b do y`` [[script:control structures|Loop over numbers from a to b]] + +.. include:: introduction.rst diff --git a/docs/script/introduction.rst b/docs/script/introduction.rst new file mode 100644 index 00000000..8fd246e5 --- /dev/null +++ b/docs/script/introduction.rst @@ -0,0 +1,35 @@ +Scripting Introduction +---------------------- + +MSE uses a custom scripting language to add complicated behaviour to [[type:field]]s and [[type:style]]s. + +This documentation assumes that the reader has some programming experience. +In particular it is assumed that you know what 'functions', 'variables' and 'operators' are. + +Scripts in MSE are usually small, just a few lines. +A piece of script code is also called an *expression*. +Expressions can be *evaluated* to give a result. +For example the expression ``1 + 1`` will evaluate to ``2``. + +An important idea behind MSE is that it tries to be *pure*, +there are no global variables and there is no way to change properties of objects. +This means that when you evaluate an expression the result is always the same (unless it contains variable assignments). + +Basic elements of scripts are *constants*. +A constant is something with a fixed value. +Possible constants are: + +! Syntax Type +| ``nil`` Nothing +| ``true``, ``false`` [[type:boolean]] +| ``123`` [[type:int]] +| ``123.5`` [[type:double]] +| ``"abc"`` [[type:string]] +| ``rgb(255,0,0)`` [[type:color]] +| ``rgba(0,0,0,0)`` [[type:color]] +| ``[a,b,c]`` [[type:list]] + +Note: Strings, list and colors don't have to be constants, they can contain other code. + +The ``nil`` value has a special meaning, it is 'nothing'. +Adding ``nil`` to something has no effect (it returns 'something'), calling ``nil`` as a function just returns the input, etc. From a3f215034f773894983d1945e5ab4173446be0aa Mon Sep 17 00:00:00 2001 From: Brendan Hagan Date: Mon, 15 Aug 2022 22:56:41 -0400 Subject: [PATCH 12/24] misc: agonizing tables --- doc/script/index.txt | 56 --------- doc/script/introduction.txt | 34 ------ doc/script/operators.txt | 114 ------------------ docs/script/index.rst | 139 ++++++++++++++-------- docs/script/introduction.rst | 31 +++-- docs/script/operators.rst | 219 +++++++++++++++++++++++++++++++++++ 6 files changed, 330 insertions(+), 263 deletions(-) delete mode 100644 doc/script/index.txt delete mode 100644 doc/script/introduction.txt delete mode 100644 doc/script/operators.txt create mode 100644 docs/script/operators.rst diff --git a/doc/script/index.txt b/doc/script/index.txt deleted file mode 100644 index e36e22a8..00000000 --- a/doc/script/index.txt +++ /dev/null @@ -1,56 +0,0 @@ -Scripting language - -MSE uses a custom scripting language to add complicated behaviour to [[type:field]]s and [[type:style]]s. - ---Topics-- -* [[script:introduction|Introduction to scripting]] -* [[script:Operators]] -* [[script:Variables]] -* [[script:Functions]] -* [[script:Default arguments]] -* [[script:Control structures]] -* [[script:Predefined variables]] -* [[script:Best practices]] -See also: -* [[type:index|Data types used]] -* [[fun:index|Built in functions]] - ---Syntax index-- -| @#comment@ Comments ignored by the parser -| @123@ [[type:int|A literal number]] -| @"stuff"@ [[type:string|A literal string]] -| @[a,b,c]@ [[type:list|A literal list]] -| @[a:b, c:d]@ [[type:map|A literal map]] -| @{ expr }@ [[script:functions|Function definition]] -| @fun(a:b, c:d)@ [[script:functions|Function call]] -| @fun(value)@ [[script:functions|Function call with '@input@' argument]] -| @fun@@(a:b)@ [[script:default_arguments|Default arguments]] -| @a.b@ [[script:operators|Property 'b' of 'a']] -| @a[b]@ [[script:operators|Property 'value of b' of 'a']] -| @-a@ [[script:operators|Negation]] -| @a + b@ [[script:operators|Addition / concatenation]] -| @a - b@ [[script:operators|Subtraction]] -| @a * b@ [[script:operators|Multiplication]] -| @a / b@ [[script:operators|Floating point division]] -| @a div b@ [[script:operators|Integer division]] -| @a mod b@ [[script:operators|Remainder]] -| @a ^ b@ [[script:operators|Exponentiation]] -| @not a@ [[type:boolean|Boolean not]] -| @a and b@ [[type:boolean|Boolean conjunction]] -| @a or b@ [[type:boolean|Boolean disjunction]] -| @a xor b@ [[type:boolean|Boolean xor]] -| @a == b@ [[script:operators|Comparison for equality]] -| @a != b@ [[script:operators|Comparison for inequality]] -| @a < b@ [[script:operators|Comparison]] -| @a > b@ [[script:operators|Comparison]] -| @a <= b@ [[script:operators|Comparison]] -| @a >= b@ [[script:operators|Comparison]] -| @a or else b@ Use @a@ unless it is an error, then use @b@ instead. -| @min(a,b,c,...)@ [[script:operators|Smallest of the values]] -| @max(a,b,c,...)@ [[script:operators|Largest of the values]] -| @rgb(r,g,b)@ [[type:color|A color value]] -| @rgba(r,g,b)@ [[type:color|A color value with transparency]] -| @if x then y@ [[script:control structures|Conditional expresion]] -| @if x then y else z@ [[script:control structures|Conditional expresion]] -| @for x in list do y@ [[script:control structures|Loop over elements in a list]] -| @for x from a to b do y@ [[script:control structures|Loop over numbers from a to b]] diff --git a/doc/script/introduction.txt b/doc/script/introduction.txt deleted file mode 100644 index 4ec20585..00000000 --- a/doc/script/introduction.txt +++ /dev/null @@ -1,34 +0,0 @@ -Scripting introduction - -MSE uses a custom scripting language to add complicated behaviour to [[type:field]]s and [[type:style]]s. - -This documentation assumes that the reader has some programming experience. -In particular it is assumed that you know what 'functions', 'variables' and 'operators' are. - -Scripts in MSE are usually small, just a few lines. -A piece of script code is also called an ''expression''. -Expressions can be ''evaluated'' to give a result. -For example the expression @1 + 1@ will evaluate to @2@. - -An important idea behind MSE is that it tries to be ''pure'', -there are no global variables and there is no way to change properties of objects. -This means that when you evaluate an expression the result is always the same (unless it contains variable assignments). - -Basic elements of scripts are ''constants''. -A constant is something with a fixed value. -Possible constants are: -! Syntax Type -| @nil@ Nothing -| @true@, @false@ [[type:boolean]] -| @123@ [[type:int]] -| @123.5@ [[type:double]] -| @"abc"@ [[type:string]] -| @rgb(255,0,0)@ [[type:color]] -| @rgba(0,0,0,0)@ [[type:color]] -| @[a,b,c]@ [[type:list]] -Note: Strings, list and colors don't have to be constants, they can contain other code. - -The @nil@ value has a special meaning, it is 'nothing'. -Adding @nil@ to something has no effect (it returns 'something'), calling @nil@ as a function just returns the input, etc. - - diff --git a/doc/script/operators.txt b/doc/script/operators.txt deleted file mode 100644 index 7c121717..00000000 --- a/doc/script/operators.txt +++ /dev/null @@ -1,114 +0,0 @@ -Operators - -To get more complicated expressions you combine them using operators. - ---Basic mathematics-- -MSE script supports most basic mathamatical operators: -! Operator Example Description -| @a + b@ @3 + 2 == 5@
Add two numbers, - @"3" + "2" == "32"@ concatenate two strings or compose two functions (see below) -| @a - b@ @3 - 2 == 1@ Substract two numbers -| @a * b@ @3 * 2 == 6@ Multiply two numbers -| @a / b@ @3 / 2 == 1.5@ Divide two numbers. Does not round, always produces a [[type:double]]. -| @a div b@ @3 div 2 == 1@ DOC_MSE_VERSION: since 0.3.7 - Divide two numbers. Rounds towards zero, producing an [[type:int]]. -| @a mod b@ @3 mod 2 == 1@ Take the remainder after integer division (modulo) -| @a ^ b@ @3 ^ 2 == 9@ DOC_MSE_VERSION: since 0.3.7 - Exponentation, raise a to the power b.
The numbers can be [[type:double]]s, so to calculate a square root use @2^0.5 == 1.41421356237@. -| @-a@ @-(3 + 2) == -5@ Negate a number (make it negative if positive and vice versa) - -===The + operator=== -The @+@ operator has four functions -* It adds [[type:int]]s (also [[type:double]]s), @1+1 == 2@ -* It concatenates strings, @"1" + "1" == "11"@ -* It concatenates lists, @[1] + [1] == [1,1]@ -* It composes [[type:function]]s @(f + g) () == g( input: f() )@ - ---Comparison-- -It is also possible to compare values. All comparisons evaluate to either @true@ or @false@. -! Operator Example Description -| @a == b@ @1 + 1 == 2@
- @"x" == "x"@
- @1 + 1 == "2"@ Are two numbers or strings the same? @=@ can also be used instead. -| @a != b@ @1 + 1 != 3@
- @"x" != "y"@ Are two numbers or strings different? -| @a < b@ @1 < 2@
- @"x" < "y"@ Is a less than b? Uses [[http://en.wikipedia.org/wiki/Lexicographical_order|lexicographic order]] for strings. -| @a > b@ @2 > 1@
- @"y" > "x"@ Is a greater than b? -| @a <= b@ @1 <= 1@
- @"x" <= "y"@ Is a less than b or are they equal? -| @a >= b@ @2 >= 1@
- @"x" >= "x"@ Is a greater than b or are they equal? -| @min(a,b)@ @min(1,2) == 1@ Returns the smallest of two or more values. -| @max(a,b)@ @max(1,2) == 2@ Returns the largest of two or more values. - ---Booleans-- -[[type:Boolean]]s (for example from comparisons) can be combined using: -| @a and b@ Are both @a@ and @b@ true? -| @a or b@ Is at least one of @a@ and @b@ true? -| @a xor b@ Is exactly one of @a@ and @b@ true? -| @not a@ Is @a@ false? -In a table: -! @a@ @b@ a or b a and b a xor b -| @false@ @false@ @false@ @false@ @false@ -| @false@ @true@ @true@ @false@ @true@ -| @true@ @false@ @true@ @false@ @true@ -| @true@ @true@ @true@ @true@ @false@ - -The @and@ and @or@ operators use [[http://en.wikipedia.org/wiki/Short-circuit_evaluation|short-circuit evaluation]], which means that the second argument is only evaluated if the first argument does not suffice to determine the value of the expression. -For example -> true or card.field_that_does_not_exist -evaluates to @true@ instead of giving an error. - ---Grouping and order-- - -Operators are ordered as usual, so -> 1 + 2 * 3 == 1 + (2 * 3) == 7 -Operators can be grouped differently using parentheses. -> (1 + 2) * 3 == 3 * 3 == 9 - -The exact order of precedence is given in the following table, -higher in the table means that this operator binds tighter to its arguments, @*@ binds tighter then @+@. -| @a(...)@, @a.b@, @a[b]@ Function calls, property access, see below -| @-a@, @not@ Unary operators -| @^@ Exponentiation -| @*@, @/@, @div@, @mod@ Multiplication and division -| @+@, @-@ Addition and substraction -| @==@, @!=@, @<@, @>@, @<=@, @>=@ Comparisons -| @and@, @or@, @xor@ Boolean operators -| @:=@ Assignement, see below -| @;@ Sequence, see below - ---Properties-- -Properties of types, as described in the [[type:index|data type section]] of the documentation, can be accessed using the @.@ operator: -> set.cards # retrieve the 'cards' property of a set -The @[]@ operator has a similair purpose, only the property retrieved is determined by a string, so it can be changed: -> set["cards"] # same as above -> c := "cards" -> set[c] # again, the same - -Multiple uses of these operators can be combined, for example: -> set.cards[0].card_color # the card color of the first card in the set - -Note that a property named @card color@ is refered to as @card_color@ when using the @.@ operator, all spaces become underscores. -> style.padding left # syntax error -> style.padding_left # use this instead - ---Assignment and sequence-- -Values can be assigned to [[script:variables]] using the @:=@ operator: -> variable := 1 + 1 -The result of this expression is the value assigned, this can be used to assign to multiple variables: -> var1 := var2 := 1 + 1 -> # now var1 == 2 and var2 == 2 - -To combine multiple assignments into a single expression the ''sequencing operator'', @;@ can be used. -This first executes an expression, discards the result and then evaluates another one: -> var1 := 1 + 1 # assign -> ; # discard the result (i.e. 2) -> var1 * 2 # retrieve the value again, returns 4 -Semicolons at the end of a line can be omitted, so the above can also be written simply as: -> var1 := 1 + 1 -> var1 * 2 - - diff --git a/docs/script/index.rst b/docs/script/index.rst index 2ffe7826..4b525b2c 100644 --- a/docs/script/index.rst +++ b/docs/script/index.rst @@ -3,62 +3,101 @@ Scripting Language MSE uses a custom scripting language to add complicated behaviour to [[type:field]]s and [[type:style]]s. -Topics ------- - -* [[script:introduction|Introduction to scripting]] -* [[script:Operators]] -* [[script:Variables]] -* [[script:Functions]] -* [[script:Default arguments]] -* [[script:Control structures]] -* [[script:Predefined variables]] -* [[script:Best practices]] - See also: + * [[type:index|Data types used]] * [[fun:index|Built in functions]] Syntax index ------------ -| ``#comment`` Comments ignored by the parser -| ``123`` [[type:int|A literal number]] -| ``"stuff"`` [[type:string|A literal string]] -| ``[a,b,c]`` [[type:list|A literal list]] -| ``[a:b, c:d]`` [[type:map|A literal map]] -| ``{ expr }`` [[script:functions|Function definition]] -| ``fun(a:b, c:d)`` [[script:functions|Function call]] -| ``fun(value)`` [[script:functions|Function call with '``input``' argument]] -| ``fun@(a:b)`` [[script:default_arguments|Default arguments]] -| ``a.b`` [[script:operators|Property 'b' of 'a']] -| ``a[b]`` [[script:operators|Property 'value of b' of 'a']] -| ``-a`` [[script:operators|Negation]] -| ``a + b`` [[script:operators|Addition / concatenation]] -| ``a - b`` [[script:operators|Subtraction]] -| ``a * b`` [[script:operators|Multiplication]] -| ``a / b`` [[script:operators|Floating point division]] -| ``a div b`` [[script:operators|Integer division]] -| ``a mod b`` [[script:operators|Remainder]] -| ``a ^ b`` [[script:operators|Exponentiation]] -| ``not a`` [[type:boolean|Boolean not]] -| ``a and b`` [[type:boolean|Boolean conjunction]] -| ``a or b`` [[type:boolean|Boolean disjunction]] -| ``a xor b`` [[type:boolean|Boolean xor]] -| ``a == b`` [[script:operators|Comparison for equality]] -| ``a != b`` [[script:operators|Comparison for inequality]] -| ``a < b`` [[script:operators|Comparison]] -| ``a > b`` [[script:operators|Comparison]] -| ``a <= b`` [[script:operators|Comparison]] -| ``a >= b`` [[script:operators|Comparison]] -| ``a or else b`` Use ``a`` unless it is an error, then use ``b`` instead. -| ``min(a,b,c,...)`` [[script:operators|Smallest of the values]] -| ``max(a,b,c,...)`` [[script:operators|Largest of the values]] -| ``rgb(r,g,b)`` [[type:color|A color value]] -| ``rgba(r,g,b)`` [[type:color|A color value with transparency]] -| ``if x then y`` [[script:control structures|Conditional expresion]] -| ``if x then y else z`` [[script:control structures|Conditional expresion]] -| ``for x in list do y`` [[script:control structures|Loop over elements in a list]] -| ``for x from a to b do y`` [[script:control structures|Loop over numbers from a to b]] +.. list-table:: + :header-rows: 0 + :stub-columns: 1 + :align: left + + * - ``#comment`` + - Comments ignored by the parser + * - ``123`` + - [[type:int|A literal number]] + * - ``"stuff"`` + - [[type:string|A literal string]] + * - ``[a,b,c]`` + - [[type:list|A literal list]] + * - ``[a:b, c:d]`` + - [[type:map|A literal map]] + * - ``{ expr }`` + - [[script:functions|Function definition]] + * - ``fun(a:b, c:d)`` + - [[script:functions|Function call]] + * - ``fun(value)`` + - [[script:functions|Function call with '``input``' argument]] + * - ``fun@(a:b)`` + - [[script:default_arguments|Default arguments]] + * - ``a.b`` + - [[script:operators|Property 'b' of 'a']] + * - ``a[b]`` + - [[script:operators|Property 'value of b' of 'a']] + * - ``-a`` + - [[script:operators|Negation]] + * - ``a + b`` + - [[script:operators|Addition / concatenation]] + * - ``a - b`` + - [[script:operators|Subtraction]] + * - ``a * b`` + - [[script:operators|Multiplication]] + * - ``a / b`` + - [[script:operators|Floating point division]] + * - ``a div b`` + - [[script:operators|Integer division]] + * - ``a mod b`` + - [[script:operators|Remainder]] + * - ``a ^ b`` + - [[script:operators|Exponentiation]] + * - ``not a`` + - [[type:boolean|Boolean not]] + * - ``a and b`` + - [[type:boolean|Boolean conjunction]] + * - ``a or b`` + - [[type:boolean|Boolean disjunction]] + * - ``a xor b`` + - [[type:boolean|Boolean xor]] + * - ``a == b`` + - [[script:operators|Comparison for equality]] + * - ``a != b`` + - [[script:operators|Comparison for inequality]] + * - ``a < b`` + - [[script:operators|Comparison]] + * - ``a > b`` + - [[script:operators|Comparison]] + * - ``a <= b`` + - [[script:operators|Comparison]] + * - ``a >= b`` + - [[script:operators|Comparison]] + * - ``a or else b`` + - Use ``a`` unless it is an error, then use ``b`` instead. + * - ``min(a,b,c,...)`` + - [[script:operators|Smallest of the values]] + * - ``max(a,b,c,...)`` + - [[script:operators|Largest of the values]] + * - ``rgb(r,g,b)`` + - [[type:color|A color value]] + * - ``rgba(r,g,b)`` + - [[type:color|A color value with transparency]] + * - ``if x then y`` + - [[script:control structures|Conditional expresion]] + * - ``if x then y else z`` + - [[script:control structures|Conditional expresion]] + * - ``for x in list do y`` + - [[script:control structures|Loop over elements in a list]] + * - ``for x from a to b do y`` + - [[script:control structures|Loop over numbers from a to b]] .. include:: introduction.rst +.. include:: operators.rst +.. include:: variables.rst +.. include:: functions.rst +.. include:: default_arguments.rst +.. include:: control_structures.rst +.. include:: predefined_variables.rst +.. include:: best_practices.rst diff --git a/docs/script/introduction.rst b/docs/script/introduction.rst index 8fd246e5..cb75632d 100644 --- a/docs/script/introduction.rst +++ b/docs/script/introduction.rst @@ -19,15 +19,28 @@ Basic elements of scripts are *constants*. A constant is something with a fixed value. Possible constants are: -! Syntax Type -| ``nil`` Nothing -| ``true``, ``false`` [[type:boolean]] -| ``123`` [[type:int]] -| ``123.5`` [[type:double]] -| ``"abc"`` [[type:string]] -| ``rgb(255,0,0)`` [[type:color]] -| ``rgba(0,0,0,0)`` [[type:color]] -| ``[a,b,c]`` [[type:list]] +.. list-table:: + :header-rows: 1 + :align: left + + * - Syntax + - Type + * - ``nil`` + - Nothing + * - ``true``, ``false`` + - [[type:boolean]] + * - ``123`` + - [[type:int]] + * - ``123.5`` + - [[type:double]] + * - ``"abc"`` + - [[type:string]] + * - ``rgb(255,0,0)`` + - [[type:color]] + * - ``rgba(0,0,0,0)`` + - [[type:color]] + * - ``[a,b,c]`` + - [[type:list]] Note: Strings, list and colors don't have to be constants, they can contain other code. diff --git a/docs/script/operators.rst b/docs/script/operators.rst new file mode 100644 index 00000000..2573c1cb --- /dev/null +++ b/docs/script/operators.rst @@ -0,0 +1,219 @@ +Operators +--------- + +To get more complicated expressions you combine them using operators. + +Basic mathematics +~~~~~~~~~~~~~~~~~ + +MSE script supports most basic mathamatical operators: + +.. list-table:: + :header-rows: 1 + :align: left + + * - Operator + - Example + - Description + * - ``a + b`` + - | ``3 + 2 == 5`` + | ``"3" + "2" == "32"`` + - Add two numbers, concatenate two strings or compose two functions (see below) + * - ``a - b`` + - ``3 - 2 == 1`` + - Substract two numbers + * - ``a * b`` + - ``3 * 2 == 6`` + - Multiply two numbers + * - ``a / b`` + - ``3 / 2 == 1.5`` + - Divide two numbers. Does not round, always produces a [[type:double]]. + * - ``a div b`` + - ``3 div 2 == 1`` + - Divide two numbers. Rounds towards zero, producing an [[type:int]]. + * - ``a mod b`` + - ``3 mod 2 == 1`` + - Take the remainder after integer division (modulo) + * - ``a ^ b`` + - ``3 ^ 2 == 9`` + - Exponentation, raise a to the power b.
The numbers can be [[type:double]]s, so to calculate a square root use ``2^0.5 == 1.41421356237``. + * - ``-a`` + - ``-(3 + 2) == -5`` + - Negate a number (make it negative if positive and vice versa) + +The + operator +^^^^^^^^^^^^^^ + +The ``+`` operator has four functions +* It adds [[type:int]]s (also [[type:double]]s), ``1+1 == 2`` +* It concatenates strings, ``"1" + "1" == "11"`` +* It concatenates lists, ``[1] + [1] == [1,1]`` +* It composes [[type:function]]s ``(f + g) () == g( input: f() )`` + +Comparison +~~~~~~~~~~ + +It is also possible to compare values. All comparisons evaluate to either ``true`` or ``false``. + +.. list-table:: + :header-rows: 1 + :align: left + + * - Operator + - Example + - Description + * - ``a == b`` + - | ``1 + 1 == 2`` + | ``"x" == "x"`` + | ``1 + 1 == "2"`` + - Are two numbers or strings the same? ``=`` can also be used instead. + * - ``a != b`` + - | ``1 + 1 != 3`` + | ``"x" != "y"`` + - Are two numbers or strings different? + * - ``a < b`` + - | ``1 < 2`` + | ``"x" < "y"`` + - Is a less than b? Uses [[http://en.wikipedia.org/wiki/Lexicographical_order|lexicographic order]] for strings. + * - ``a > b`` + - | ``2 > 1`` + | ``"y" > "x"`` + - Is a greater than b? + * - ``a <= b`` + - | ``1 <= 1`` + | ``"x" <= "y"`` + - Is a less than b or are they equal? + * - ``a >= b`` + - | ``2 >= 1`` + | ``"x" >= "x"`` + - Is a greater than b or are they equal? + * - ``min(a,b)`` + - ``min(1,2) == 1`` + - Returns the smallest of two or more values. + * - ``max(a,b)`` + - ``max(1,2) == 2`` + - Returns the largest of two or more values. + +Booleans +~~~~~~~~ + +[[type:Boolean]]s (for example from comparisons) can be combined using: + +.. list-table:: + :header-rows: 0 + :align: left + + * - ``a and b`` + - Are both ``a`` and ``b`` true? + * - ``a or b`` + - Is at least one of ``a`` and ``b`` true? + * - ``a xor b`` + - Is exactly one of ``a`` and ``b`` true? + * - ``not a`` + - Is ``a`` false? + +In a table: + +.. list-table:: + :header-rows: 1 + :align: left + + * - ``a`` + - ``b`` + - ``a or b`` + - ``a and b`` + - ``a xor b`` + * - ``false`` + - ``false`` + - ``false`` + - ``false`` + - ``false`` + * - ``false`` + - ``true`` + - ``true`` + - ``false`` + - ``true`` + * - ``true`` + - ``false`` + - ``true`` + - ``false`` + - ``true`` + * - ``true`` + - ``true`` + - ``true`` + - ``true`` + - ``false`` + +The ``and`` and ``or`` operators use [[http://en.wikipedia.org/wiki/Short-circuit_evaluation|short-circuit evaluation]], which means that the second argument is only evaluated if the first argument does not suffice to determine the value of the expression. +For example +> true or card.field_that_does_not_exist +evaluates to ``true`` instead of giving an error. + +Grouping and order +~~~~~~~~~~~~~~~~~~ + +Operators are ordered as usual, so +> 1 + 2 * 3 == 1 + (2 * 3) == 7 +Operators can be grouped differently using parentheses. +> (1 + 2) * 3 == 3 * 3 == 9 + +The exact order of precedence is given in the following table, +higher in the table means that this operator binds tighter to its arguments, ``*`` binds tighter then ``+``. + +.. list-table:: + :header-rows: 0 + :align: left + + * - ``a(...)``, ``a.b``, ``a[b]`` + - Function calls, property access, see below + * - ``-a``, ``not`` + - Unary operators + * - ``^`` + - Exponentiation + * - ``*``, ``/``, ``div``, ``mod`` + - Multiplication and division + * - ``+``, ``-`` + - Addition and substraction + * - ``==``, ``!=``, ``<``, ``>``, ``<=``, ``>=`` + - Comparisons + * - ``and``, ``or``, ``xor`` + - Boolean operators + * - ``:=`` + - Assignement, see below + * - ``;`` + - Sequence, see below + +Properties +~~~~~~~~~~ + +Properties of types, as described in the [[type:index|data type section]] of the documentation, can be accessed using the ``.`` operator: +> set.cards # retrieve the 'cards' property of a set +The ``[]`` operator has a similair purpose, only the property retrieved is determined by a string, so it can be changed: +> set["cards"] # same as above +> c := "cards" +> set[c] # again, the same + +Multiple uses of these operators can be combined, for example: +> set.cards[0].card_color # the card color of the first card in the set + +Note that a property named ``card color`` is refered to as ``card_color`` when using the ``.`` operator, all spaces become underscores. +> style.padding left # syntax error +> style.padding_left # use this instead + +Assignment and sequence +~~~~~~~~~~~~~~~~~~~~~~~ + +Values can be assigned to [[script:variables]] using the ``:=`` operator: +> variable := 1 + 1 +The result of this expression is the value assigned, this can be used to assign to multiple variables: +> var1 := var2 := 1 + 1 +> # now var1 == 2 and var2 == 2 + +To combine multiple assignments into a single expression the ''sequencing operator'', ``;`` can be used. +This first executes an expression, discards the result and then evaluates another one: +> var1 := 1 + 1 # assign +> ; # discard the result (i.e. 2) +> var1 * 2 # retrieve the value again, returns 4 +Semicolons at the end of a line can be omitted, so the above can also be written simply as: +> var1 := 1 + 1 +> var1 * 2 From 3cb23436db4655509eeb13bf8cb0b51c3d40cc95 Mon Sep 17 00:00:00 2001 From: Brendan Hagan Date: Tue, 30 Aug 2022 21:36:30 -0400 Subject: [PATCH 13/24] misc: check header links --- docs/conf.py | 5 ++ docs/file/index.rst | 1 + docs/type/index.rst | 139 +++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 144 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 1ace4eb3..988f9100 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -20,3 +20,8 @@ # html_js_files = [ # 'js/custom.js' # ] + +# Trying to use a dummy lanaguage to test highlighting. +# It looks like it'll be possible to define a custom Lexer language type... +highlight_language = 'sh' +pygments_style = 'monokai' diff --git a/docs/file/index.rst b/docs/file/index.rst index 8ec5b788..db17d8ad 100644 --- a/docs/file/index.rst +++ b/docs/file/index.rst @@ -35,6 +35,7 @@ and a *local* data directory for the current logged in user. The latter is used for installing packages if the user doesn't have administrator priviliges. .. list-table:: On Windows + :class: center :header-rows: 0 :stub-columns: 1 :align: left diff --git a/docs/type/index.rst b/docs/type/index.rst index 4d994298..9235197b 100644 --- a/docs/type/index.rst +++ b/docs/type/index.rst @@ -1,2 +1,139 @@ -Object Types +Data Types ============ + +Magic Set Editor uses many data types in the files and in scripting. +There are for instance [[type:card]]s in [[type:set]]s, [[type:stylesheet]]s describing the layout of [[type:field]]s, etc. + +File Types +---------- + +These are the 'major' data types that are written directly to [[file:packages]]. + +.. list-table:: + :header-rows: 0 + :stub-columns: 1 + :align: left + + * - :doc:`Game <#game>` + - What information is on each card? + * - :doc:`Stylesheet <#stylesheet>` + - What do cards look like? + * - :doc:`Set <#set>` + - Sets of cards. + * - :ref:`Symbol font ` + - Fonts consisting of symbols, for instance mana symbols. + * - :ref:`Export template ` + - How to export sets to HTML files? + * - :doc:`Locale <#Locale>` + - Translations of MSE. + * - :doc:`Include <#Include>` + - Files to include in other templates. + * - :doc:`Installer <#Installer>` + - Installers containing several packages. + * - :doc:`Symbol <#Symbol>` + - Expansion symbols. + * - :doc:`Settings <#Settings>` + - MSE settings. + +--Compound types-- +These contain several properties, similair to the file types. But they are part of some other file type. + * - :doc:`field <#field>` + - A field description for cards. + * - :doc:`style <#style>` + - The styling and positioning of a field. + * - :doc:`value <#value>` + - The value in a field, for a particular card. + * - :doc:`card <#card>` + - A card containing values. + * - :doc:`keyword <#keyword>` + - A keyword. + * - :doc:`keyword mode <#keyword mode>` + - A possible mode for keywords. + * - :doc:`keyword param type <#keyword param type>` + - A type of parameters for keywords. + * - :doc:`statistics dimension <#statistics dimension>` + - A dimension for the statistics panel. + * - :doc:`statistics category <#statistics category>` + - A category for the statistics panel. + * - :doc:`word list <#word list>` + - A list of words that can be used for a drop down list in text fields. + * - :doc:`add cards script <#add cards script>` + - A script for convienently adding multiple cards to a set. + * - :doc:`font <#font>` + - Description of a font. + * - :doc:`symbol part <#symbol part>` + - Part of a :doc:`symbol <#symbol>`. + * - :doc:`control point <#control point>` + - A point on in a symbol part. + +--Collection types-- + * - :doc:`list <#list>` + - Lists of items + * item + * item + * item + * - :doc:`indexmap <#indexmap>` + - Lists indexed by field name + +
name:someone
type:something
+ * - :doc:`map <#map>` + - Lists indexed by other text + +--Script related-- + * - :doc:`script <#script>` + - A script to execute to update a field, or for initialization. + * - :doc:`scriptable <#scriptable>` + - A primitive type whose value can depend on a script. + * - :doc:`image <#image>` + - An image defined by a script. + * - :doc:`function <#function>` + - Functions in scripts. These have no direct representation in a file. + +--Enumerations-- + * - :doc:`alignment <#alignment>` + - Alignment of text and images. + * - :doc:`direction <#direction>` + - Direction of text. + * - :doc:`combine <#combine>` + - How to combine images with the background. + * - :doc:`symbol combine <#symbol combine>` + - How to combine [[type:symbol part|symbol shapes]] with the background. + * - :doc:`graph type <#graph type>` + - Type of statistics graphs. + +--Primitive types-- + * - :doc:`string <#string>` + - Text, @"abc"@ + * - :doc:`tagged string <#tagged string>` + - Text with tags + * - :doc:`filename <#filename>` + - Filenames + * - :doc:`regex <#regex>` + - Regular expression strings + * - :doc:`boolean <#boolean>` + - @true@ or @false@ + * - :doc:`int <#int>` + - Integer numbers, @1, 2, 100@ + * - :doc:`double <#double>` + - Real numbers, @1, 0.5, 21.3@ + * - :doc:`version <#version>` + - Version numbers + * - :doc:`color <#color>` + - Colors + * - :doc:`date <#date>` + - Dates/times + +Game +~~~~ + +Stylesheet +~~~~~~~~~~ + +Set +~~~ + +Symbol Font +~~~~~~~~~~~ + +Export Template +~~~~~~~~~~~~~~~ From d444da2e3d271c6f021c415accba23b48cfbf5c2 Mon Sep 17 00:00:00 2001 From: Brendan Hagan Date: Tue, 30 Aug 2022 22:37:59 -0400 Subject: [PATCH 14/24] misc: initial move of Types --- doc/type/add_cards_script.txt | 31 - doc/type/alignment.txt | 37 - doc/type/boolean.txt | 26 - doc/type/card.txt | 39 - doc/type/choice.txt | 43 - doc/type/choice_render_style.txt | 31 - doc/type/color.txt | 36 - doc/type/color_choice.txt | 13 - doc/type/combine.txt | 41 - doc/type/control_point.txt | 24 - doc/type/date.txt | 13 - doc/type/dependency.txt | 21 - doc/type/direction.txt | 20 - doc/type/double.txt | 16 - doc/type/export_template.txt | 52 - doc/type/field.txt | 129 - doc/type/filename.txt | 20 - doc/type/font.txt | 29 - doc/type/function.txt | 20 - doc/type/game.txt | 51 - doc/type/graph_type.txt | 21 - doc/type/image.txt | 28 - doc/type/include.txt | 22 - doc/type/index.txt | 69 - doc/type/indexmap.txt | 33 - doc/type/insert_symbol_menu.txt | 48 - doc/type/installer.txt | 0 doc/type/int.txt | 14 - doc/type/keyword.txt | 27 - doc/type/keyword_mode.txt | 22 - doc/type/keyword_param_reference_script.txt | 25 - doc/type/keyword_param_type.txt | 40 - doc/type/list.txt | 35 - doc/type/locale.txt | 65 - doc/type/localized_string.txt | 14 - doc/type/map.txt | 26 - doc/type/pack_item.txt | 25 - doc/type/pack_type.txt | 109 - doc/type/regex.txt | 10 - doc/type/script.txt | 19 - doc/type/scriptable.txt | 34 - doc/type/set.txt | 64 - doc/type/settings.txt | 13 - doc/type/statistics_category.txt | 29 - doc/type/statistics_dimension.txt | 48 - doc/type/string.txt | 41 - doc/type/style.txt | 168 -- doc/type/stylesheet.txt | 42 - doc/type/symbol.txt | 20 - doc/type/symbol_combine.txt | 19 - doc/type/symbol_font.txt | 55 - doc/type/symbol_font_reference.txt | 26 - doc/type/symbol_font_symbol.txt | 41 - doc/type/symbol_part.txt | 29 - doc/type/symbol_variation.txt | 46 - doc/type/tagged_string.txt | 61 - doc/type/text_layout.txt | 28 - doc/type/value.txt | 37 - doc/type/vector2d.txt | 15 - doc/type/version.txt | 11 - doc/type/word_list.txt | 18 - doc/type/word_list_word.txt | 34 - .../type/choice-render-style-both.png | Bin .../choice-render-style-checklist-both.png | Bin .../choice-render-style-checklist-image.png | Bin .../choice-render-style-checklist-text.png | Bin .../type/choice-render-style-hidden.png | Bin .../type/choice-render-style-image.png | Bin .../type/choice-render-style-list-both.png | Bin .../type/choice-render-style-list-image.png | Bin .../type/choice-render-style-list-text.png | Bin .../type/choice-render-style-text.png | Bin {doc => docs}/type/graph-type-bar.png | Bin {doc => docs}/type/graph-type-pie.png | Bin {doc => docs}/type/graph-type-scatter-pie.png | Bin {doc => docs}/type/graph-type-scatter.png | Bin {doc => docs}/type/graph-type-stack.png | Bin docs/type/index.rst | 2453 ++++++++++++++++- {doc => docs}/type/style-angle-examples.png | Bin {doc => docs}/type/style-angle.png | Bin {doc => docs}/type/style-positioning.png | Bin {doc => docs}/type/style-text-mask.png | Bin 82 files changed, 2426 insertions(+), 2250 deletions(-) delete mode 100644 doc/type/add_cards_script.txt delete mode 100644 doc/type/alignment.txt delete mode 100644 doc/type/boolean.txt delete mode 100644 doc/type/card.txt delete mode 100644 doc/type/choice.txt delete mode 100644 doc/type/choice_render_style.txt delete mode 100644 doc/type/color.txt delete mode 100644 doc/type/color_choice.txt delete mode 100644 doc/type/combine.txt delete mode 100644 doc/type/control_point.txt delete mode 100644 doc/type/date.txt delete mode 100644 doc/type/dependency.txt delete mode 100644 doc/type/direction.txt delete mode 100644 doc/type/double.txt delete mode 100644 doc/type/export_template.txt delete mode 100644 doc/type/field.txt delete mode 100644 doc/type/filename.txt delete mode 100644 doc/type/font.txt delete mode 100644 doc/type/function.txt delete mode 100644 doc/type/game.txt delete mode 100644 doc/type/graph_type.txt delete mode 100644 doc/type/image.txt delete mode 100644 doc/type/include.txt delete mode 100644 doc/type/index.txt delete mode 100644 doc/type/indexmap.txt delete mode 100644 doc/type/insert_symbol_menu.txt delete mode 100644 doc/type/installer.txt delete mode 100644 doc/type/int.txt delete mode 100644 doc/type/keyword.txt delete mode 100644 doc/type/keyword_mode.txt delete mode 100644 doc/type/keyword_param_reference_script.txt delete mode 100644 doc/type/keyword_param_type.txt delete mode 100644 doc/type/list.txt delete mode 100644 doc/type/locale.txt delete mode 100644 doc/type/localized_string.txt delete mode 100644 doc/type/map.txt delete mode 100644 doc/type/pack_item.txt delete mode 100644 doc/type/pack_type.txt delete mode 100644 doc/type/regex.txt delete mode 100644 doc/type/script.txt delete mode 100644 doc/type/scriptable.txt delete mode 100644 doc/type/set.txt delete mode 100644 doc/type/settings.txt delete mode 100644 doc/type/statistics_category.txt delete mode 100644 doc/type/statistics_dimension.txt delete mode 100644 doc/type/string.txt delete mode 100644 doc/type/style.txt delete mode 100644 doc/type/stylesheet.txt delete mode 100644 doc/type/symbol.txt delete mode 100644 doc/type/symbol_combine.txt delete mode 100644 doc/type/symbol_font.txt delete mode 100644 doc/type/symbol_font_reference.txt delete mode 100644 doc/type/symbol_font_symbol.txt delete mode 100644 doc/type/symbol_part.txt delete mode 100644 doc/type/symbol_variation.txt delete mode 100644 doc/type/tagged_string.txt delete mode 100644 doc/type/text_layout.txt delete mode 100644 doc/type/value.txt delete mode 100644 doc/type/vector2d.txt delete mode 100644 doc/type/version.txt delete mode 100644 doc/type/word_list.txt delete mode 100644 doc/type/word_list_word.txt rename {doc => docs}/type/choice-render-style-both.png (100%) rename {doc => docs}/type/choice-render-style-checklist-both.png (100%) rename {doc => docs}/type/choice-render-style-checklist-image.png (100%) rename {doc => docs}/type/choice-render-style-checklist-text.png (100%) rename {doc => docs}/type/choice-render-style-hidden.png (100%) rename {doc => docs}/type/choice-render-style-image.png (100%) rename {doc => docs}/type/choice-render-style-list-both.png (100%) rename {doc => docs}/type/choice-render-style-list-image.png (100%) rename {doc => docs}/type/choice-render-style-list-text.png (100%) rename {doc => docs}/type/choice-render-style-text.png (100%) rename {doc => docs}/type/graph-type-bar.png (100%) rename {doc => docs}/type/graph-type-pie.png (100%) rename {doc => docs}/type/graph-type-scatter-pie.png (100%) rename {doc => docs}/type/graph-type-scatter.png (100%) rename {doc => docs}/type/graph-type-stack.png (100%) rename {doc => docs}/type/style-angle-examples.png (100%) rename {doc => docs}/type/style-angle.png (100%) rename {doc => docs}/type/style-positioning.png (100%) rename {doc => docs}/type/style-text-mask.png (100%) diff --git a/doc/type/add_cards_script.txt b/doc/type/add_cards_script.txt deleted file mode 100644 index 93aaad1a..00000000 --- a/doc/type/add_cards_script.txt +++ /dev/null @@ -1,31 +0,0 @@ -Data type: add cards script - -DOC_MSE_VERSION: since 0.3.7 - ---Overview-- - -A script to add multiple cards to the set at once. - ---Properties-- -! Property Type Default Description -| @name@ [[type:string]] Name of this script; appears in the menu. -| @description@ [[type:string]] @""@ Description of this script; appears in the status bar. -| @enabled@ [[type:scriptable]] [[type:boolean]] @true@ Is this script enabled? -| @script@ [[type:script]] Script that produces the cards.
- This script should return a [[type:list]] of [[type:card]]s. - The [[fun:new_card]] function can be used to make new cards. - ---Example-- ->add cards script: -> name: &Basic Lands -> description: Adds 5 basic lands to the set. -> script: -> [ new_card([name: "Plains", super_type: "Basic Land", sub_type: "Plains"]) -> , new_card([name: "Island", super_type: "Basic Land", sub_type: "Island"]) -> , new_card([name: "Swamp", super_type: "Basic Land", sub_type: "Swamp"]) -> , new_card([name: "Mountain", super_type: "Basic Land", sub_type: "Mountain"]) -> , new_card([name: "Forest", super_type: "Basic Land", sub_type: "Forest"]) -> ] - -When invoked, this script will add the five basic lands to the set. - diff --git a/doc/type/alignment.txt b/doc/type/alignment.txt deleted file mode 100644 index 02a5a462..00000000 --- a/doc/type/alignment.txt +++ /dev/null @@ -1,37 +0,0 @@ -Enumeration: alignment - -DOC_MSE_VERSION: changed in 0.3.8 - -Specifies how text and images are aligned in boxes. -An alignment consists of: -* horizontal alignment -* vertical alignment -* (optional) how to fill the text box -* (optional) when to fill the text box - ---Script syntax-- -In scripts, alignment is passed around as a string. - ---Possible values-- -The value is a combination of one or more flags, separated by spaces. -These flags can appear in any order. -! Value Description -| @left@ Horizontally, align at the left -| @center@ Horizontally, align in the middle -| @right@ Horizontally, align at the right -| @top@ Vertically, align at the top -| @middle@ Vertically, align in the middle -| @bottom@ Vertically, align at the bottom -| @justify@ Fill the box exactly, by moving words apart/together. -| @justify-all@ Fill the box exactly, by moving individual characters apart/together. -| @stretch@ Fill the box exactly, by stretching the text.
- For images: stretch them, but preserve the aspect ratio. -| @if-overflow@ Only apply @justify@, @justify-all@ and @stretch@ when the box is overfull. -| @force@ Also justify text at the end of a line in a multiline text field.
- Normally only lines ending in a soft line break are justified. - ---Examples-- -> alignment: top left -> alignment: middle center -> alignment: top left force justify if-overflow -> alignment: { "middle" + " " + "left" } diff --git a/doc/type/boolean.txt b/doc/type/boolean.txt deleted file mode 100644 index c3e2f849..00000000 --- a/doc/type/boolean.txt +++ /dev/null @@ -1,26 +0,0 @@ -Primitive type: boolean - -A boolean is either @true@ or @false@. - -In a script, numbers are implicitly converted to booleans, a non-zero number is @true@, 0 is @false@. - -When converted to a number, @true@ becomes @1@ and @false@ becomes @0@. - -The strings @"yes"@ and @"no"@ can also be converted to booleans. - ---File syntax-- -> boolean: true -> boolean: false - ---Script syntax-- -> true or false - -The operators @or@, @and@ and @xor@ combine two booleans: -! @a@ @b@ a or b a and b a xor b -| @false@ @false@ @false@ @false@ @false@ -| @false@ @true@ @true@ @false@ @true@ -| @true@ @false@ @true@ @false@ @true@ -| @true@ @true@ @true@ @true@ @false@ - ---See also-- -| [[fun:to_boolean]] Convert a value to a boolean diff --git a/doc/type/card.txt b/doc/type/card.txt deleted file mode 100644 index c2b55e1d..00000000 --- a/doc/type/card.txt +++ /dev/null @@ -1,39 +0,0 @@ -Data type: card - ---Overview-- - -A '''card''' in a [[type:set]]. - ---Properties-- -! Property Type Default Description -| @stylesheet@ Name of a [[type:stylesheet]] ''none'' Use a different stylesheet for this card than the [[type:set]]'s default. -| @has styling@ [[type:boolean]] false This card has styling data different from the set's default. -| @styling data@ [[type:indexmap]] of [[type:value]]s false Styling data, based on the [[type:stylesheet]]'s @style fields@. -| @notes@ [[type:tagged string]] @""@ Notes for this card. -| @time created@ [[type:date]] ''now'' Time at which the card was created. -| @time modified@ [[type:date]] ''now'' Time at which the card was last modified. -| @extra data@ [[type:map]] of [[type:indexmap]]s of [[type:value]]s - Data for the 'extra card fields' of the stylesheet.
- This is first indexed by stylesheet name, then by field name. -| ''remaining keys'' [[type:indexmap]] of [[type:value]]s The remaining keys contain the data for the game's @card fields@.
- So for example @card.some_field@ corresponds to the value of the card field @some field@. - ---Examples-- - -With the following game: ->card field: -> type: text -> name: title ->card field: -> type: color -> name: card color - -A card could look like: ->card: -> stylesheet: new -> has styling: false -> notes: This card is not finished yet! -> styling data: -> extra large cards: true -> title: My Card -> card color: rgb(0,128,255) diff --git a/doc/type/choice.txt b/doc/type/choice.txt deleted file mode 100644 index 21be8b29..00000000 --- a/doc/type/choice.txt +++ /dev/null @@ -1,43 +0,0 @@ -Data type: choice for a choice field - -A possible choice for a choice [[type:field]]. - ---Properties-- -! Property Type Default Description -| @name@ [[type:string]] ''Required'' Name of this choice, displayed in the drop down list. -| @line below@ [[type:boolean]] @false@ Display a line below this item? -| @group choice@ [[type:string]] ''no'' Can this submenu of choices itself be selected? -| @choices@ [[type:list]] of [[type:choice]]s Submenu of choices. -| @enabled@ [[type:scriptable]] [[type:boolean]] Is this choice selectable? -| @type@ @"check"@ or @"radio"@ @"check"@ How should this choice be displayed? As a checkbox or a radio box?
- Only applies to multiple choice fields. - -A choice can also be given in a short form, in that case only the name is specified. - ---Names-- - -The full name of a choice is that of the choice and its parents, separated by spaces. -This is the value actually stored in values and manipulated by scripts. - -For example ->field: -> type: choice -> choice: -> name: large -> choice: red -> choice: blue -> choice: -> name: small -> group choice: just small -> choice: green -> choice: yellow - -The choice red is called @"large red"@, while green is @"small green"@. -The group choice 'just small' gets the name of the group, @"small"@. - ---Example-- -In short form: ->choice: apples -Is the same as: ->choice: -> name: apples diff --git a/doc/type/choice_render_style.txt b/doc/type/choice_render_style.txt deleted file mode 100644 index 6a0e174b..00000000 --- a/doc/type/choice_render_style.txt +++ /dev/null @@ -1,31 +0,0 @@ -Enumeration: render style - -A way to render a choice [[type:field]], see [[type:style]]. - ---Possible values-- -! Value Sketch Description -| @text@ - Rendered as text -| @image@ - Rendered as an image -| @both@ - Both an image and text -| @hidden@ - The box is hidden, but the value can still be edited. -| @image hidden@ - The box is hidden, but the value can still be edited. -| @checklist@ - A list of checkboxes, for multiple choice styles. -| @image checklist@ - A list of checkboxes with images instead of text. -| @both checklist@ - A list of checkboxes with both images and text. -| @text list@ - A list of the selected items, for multiple choice styles. -| @image list@ - A list of the selected items with images instead of text. -| @both list@ - A list of the selected items with both images and text. - ---Examples-- -> render style: image diff --git a/doc/type/color.txt b/doc/type/color.txt deleted file mode 100644 index bd9e97ff..00000000 --- a/doc/type/color.txt +++ /dev/null @@ -1,36 +0,0 @@ -Primitive type: color - ---Syntax-- -In files and scritps a color can be represented as -
rgb(red_component, green_component, blue_component)
-where red_component, green_component and blue_component are numbers between 0 and 255 (inclusive). - -In most places MSE also supports colors with a transparency value, notated as -
rgba(red_component, green_component, blue_component, alpha_component)
-An alpha value of @0@ indicates a transparent color, an alpha value of @255@ is completely opaque. - -You can also use HTML style hexadecimal colors, -
#rgb, #rgba, #rrggbb, #rrggbbaa
-For example, #ff0000 is red, as is #f00 - ---Named colors-- -MSE also supports named colors, for instance @"white"@ is the same as @rgb(255,255,255)@. -For a full list of supported colors, see [[https://docs.wxwidgets.org/3.0/classwx_colour_database.html|the wxWidgets documentation]]. -In addition, the named color @"transparent"@ stands for the completely transparent color, @rgba(0,0,0,0)@. - -In scripts named colors are represented as [[type:string]]s. - ---Examples-- -For example: -! Code Represents <<< -| @rgb(255,255,255)@ white
-| @rgb(0,0,0)@ black
-| @rgb(255,0,0)@ red
-| @rgb(0,255,0)@ green
-| @rgb(0,0,255)@ blue
-| @rgba(0,0,0,0)@ transparent
over
-| @rgba(255,0,0,128)@ transparent red
over
-| @rgba(0,0,255,192)@ transparent blue
over
- ---See also-- -| [[fun:to_color]] Convert any value to a color diff --git a/doc/type/color_choice.txt b/doc/type/color_choice.txt deleted file mode 100644 index d5742a9c..00000000 --- a/doc/type/color_choice.txt +++ /dev/null @@ -1,13 +0,0 @@ -Data type: choice for a color field - -A possible choice for a color [[type:field]]. - ---Properties-- -! Property Type Description -| @name@ [[type:string]] Name of this choice, displayed in the drop down list. -| @color@ opaque [[type:color]] Color this choice corresponds with. - ---Example-- ->choice: -> name: red -> color: rgb(255,0,0) diff --git a/doc/type/combine.txt b/doc/type/combine.txt deleted file mode 100644 index 4994475c..00000000 --- a/doc/type/combine.txt +++ /dev/null @@ -1,41 +0,0 @@ -Enumeration: image combine type - -This specifies how an image is to be combined with the background. -This is similair to the feature found in more advanced drawing programs. - -The formula's are from [[http://www.pegtop.net/delphi/articles/blendmodes/]]. - ---Script syntax-- -In scripts, combine modes are stored as a string. - ---Possible values-- -! Value Description -| @normal@ Normal behaviour, don't combine. -| @add@ -| @subtract@ -| @stamp@ -| @difference@ -| @negation@ -| @multiply@ -| @darken@ -| @lighten@ -| @color dodge@ -| @color burn@ -| @screen@ -| @overlay@ -| @hard light@ -| @soft light@ -| @reflect@ -| @glow@ -| @freeze@ -| @heat@ -| and Bitwise and -| or Bitwise or -| xor Bitwise xot -| @shadow@ Dark colors normally, white colors darken the background. -| @symmetric overlay@ @(overlay(a,b) + overlay(b,a)) / 2@ - ---Examples-- -> combine: overlay -> combine_image(image1: ..., image2: ..., combine: "shadow") - diff --git a/doc/type/control_point.txt b/doc/type/control_point.txt deleted file mode 100644 index 4a81bf52..00000000 --- a/doc/type/control_point.txt +++ /dev/null @@ -1,24 +0,0 @@ -Data type: symbol control point - ---Overview-- - -A single [[http://en.wikipedia.org/wiki/Bezier_curve|Bézier curve]] control point in a [[type:symbol part|symbol shape]]. - -A control point is a point on the polygon. -It also optionally has two 'handles' corresponding to the boxes attached with dotted lines in the editor. - -The control points of a shape are circular, the point after the last point in the list is the first point. - ---Properties-- -! Property Type Default Description -| @position@ [[type:vector2d]] Position of the control point. -| @lock@ @free@, @direction@ or @size@ @"free"@ - Is this point 'locked', i.e. is the relation between the two handles fixed?
- If @lock@ is @"direction"@ then the two handles must lie on a line.
- If @lock@ is @"direction"@ then the two handles must lie exactly oppisite each other on the same distance from the point. -| @line after@ @line@ or @curve@ @"line"@ Is the segment between this control point and the next one in the list a straight line or a cubic Bézier curve? -| @handle before@ [[type:vector2d]] Position of the handle for the segment between this point and the previous one, relative to the point's @position@.
Only when that point's @line after == "curve"@. -| @handle after@ [[type:vector2d]] Position of the handle for the segment between this point and the next one, relative to the point's @position@.
Only when @line after == "curve"@. - ---Example-- -Look at a symbol file made with the program. diff --git a/doc/type/date.txt b/doc/type/date.txt deleted file mode 100644 index 09056472..00000000 --- a/doc/type/date.txt +++ /dev/null @@ -1,13 +0,0 @@ -Primitive type: date and time - -DOC_MSE_VERSION: since 0.3.8 - -A point in time, consisting of a date and a time. -The file syntax uses [[http://en.wikipedia.org/wiki/ISO_8601|ISO 8601]] notation. - ---File syntax-- -> something: 2008-12-31 23:59:59 - ---See also-- -| [[fun:to_date]] Convert a value to a date -| [[fun:to_string]] Convert dates to strings diff --git a/doc/type/dependency.txt b/doc/type/dependency.txt deleted file mode 100644 index 774570aa..00000000 --- a/doc/type/dependency.txt +++ /dev/null @@ -1,21 +0,0 @@ -Data type: dependency - ---Overview-- - -[[type:Package]]s can depend on other packages. -For example a [[type:stylesheet]] needs a particular version of the corresponding [[type:game]] package, and maybe some additional [[type:include]]s. - ---Properties-- -! Property Type Description -| @package@ [[type:string]] Filename of the package this package depends on. -| @version@ [[type:version]] Minimal version of that package that is required. - -The two properties can also be written on a single line, separated by a space (see the examples). - ---Example-- -The magic-new stylesheet depends on a particular version of the game file: ->depends on: -> package: magic.mse-game -> version: 2007-06-06 -This can be written more compactly as ->depends on: magic.mse-game 2007-06-06 diff --git a/doc/type/direction.txt b/doc/type/direction.txt deleted file mode 100644 index 5a3e1c9f..00000000 --- a/doc/type/direction.txt +++ /dev/null @@ -1,20 +0,0 @@ -Enumeration: direction - -Specifies the direction of text flow in a text box. - ---Script syntax-- -In scripts, direction is passed around as a string. - ---Possible values-- -! Value Description -| @left to right@ Text starts at the left. -| @right to left@ Text starts at the right ''(currently not implemented)'' -| @top to bottom@ Text starts at the top, each character is on a new line. -| @bottom to top@ Text starts at the bottom ''(currently not implemented)'' -| @horizontal@ Same as @left to right@. -| @vertical@ Same as @top to bottom@. - ---Examples-- -> direction: horizontal -> direction: top to bottom - diff --git a/doc/type/double.txt b/doc/type/double.txt deleted file mode 100644 index 5a7c16ec..00000000 --- a/doc/type/double.txt +++ /dev/null @@ -1,16 +0,0 @@ -Primitive type: real number - -Real or floating point numbers are numbers with a decimal point. - -Conversion from integer to real numbers happens automatically in scripting. - ---File syntax-- -> something: 123 -> something: 0.5 - ---Script syntax-- -> 123.1 + 456 * -1 - ---See also-- -| [[type:int]] Integer numbers -| [[fun:to_real]] Convert a value to a real number diff --git a/doc/type/export_template.txt b/doc/type/export_template.txt deleted file mode 100644 index aafcae3d..00000000 --- a/doc/type/export_template.txt +++ /dev/null @@ -1,52 +0,0 @@ -File type: Export template - ---Overview-- - -An export template describes a way for a set to be exported to a HTML or other text files. - ---Package format-- -An export template is described in a [[file:package]] with the .mse-export-template file extension. -Its name should begin with game- where game is the name of the game the template is made for. -It should contain a [[file:format|data file]] called export-template with the following properties. - ---Properties-- -! Property Type Default Description -| '''Common to all packages''' <<< <<< <<< -| @mse version@ [[type:version]] ''required'' Version of MSE this export template is made for. -| @short name@ [[type:string]] file name A short name of this export template, for the 'new set' and style panel lists. -| @full name@ [[type:string]] file name A longer name of this export template. -| @icon@ [[type:filename]] ''none'' Filename of an icon / preview for this export template, for the 'export to HTML' dialog. -| @position hint@ [[type:int]] ∞ Where to place this item in the list? Lower numbers come first. -| @version@ [[type:version]] @0.0.0@ Version number of this package. -| @depends on@ [[type:list]] of [[type:dependency]]s - Packages this package depends on. - -| '''Specific to export template''' <<< <<< <<< -| @game@ Name of a [[type:game]] ''required'' Game this export template is made for -| @file type@ [[type:string]] @"HTML files (*.html)|*.html"@ - File type to use, this is a list separated by @|@ characters. - Alternatingly, a human description and a file pattern to match are given. -| @create directory@ [[type:boolean]] @false@ Should a directory for data files be created? This is required for some script function. -| @option fields@ [[type:list]] of [[type:field]]s Fields for additional options to show. -| @option style@ [[type:indexmap]] of [[type:style]]s Styling for the @option fields@. -| @script@ [[type:script]] Script that generates the text that will be written to the exported file. - -During the evaluation of the script the following variables are available: -| @game@ The current game. -| @style@ The current stylesheet. -| @set@ The set being exported. -| @cards@ The cards selected by the user. -| @options@ The values of the @option fields@. -| @directory@ Name of the directory created (if @create directory@ is set). - ---See also-- -The following functions are made specifically for exporting to html: -| [[fun:to_html]] Convert [[type:tagged text]] to html. -| [[fun:symbols_to_html]] Convert text to html using a [[type:symbol font]]. -| [[fun:to_text]] Remove all tags from tagged text. -| [[fun:copy_file]] Copy a file from the [[type:export template]] to the output directory. -| [[fun:write_text_file]] Write a text file to the output directory. -| [[fun:write_image_file]] Write an image file to the output directory. - ---Example-- -Look at the @"magic-spoiler.mse-export-template"@ for an example. diff --git a/doc/type/field.txt b/doc/type/field.txt deleted file mode 100644 index e43abd74..00000000 --- a/doc/type/field.txt +++ /dev/null @@ -1,129 +0,0 @@ -Data type: field - ---Overview-- - -A field is a description of a kind of 'container' to hold a value. - -For example the [[type:value]] of a 'text field' is a piece of text, that of a 'color field' a [[type:color]], etc. - -Things that are fields are, "card color" and "card name". -Not a particular color or name, but a description of what a card color and a card name are for a particular [[type:game]]. - -Fields are part of the [[file:style triangle]]: -| Description Looks Data -| [[type:Game]] [[type:Stylesheet]] [[type:Set]] -| '''Field''' [[type:Style]] [[type:Value]] - ---Properties-- -! Property Type Default Description -| @type@ One of: ''required'' Type of field. - * @text@ - * @choice@ - * @multiple choice@ - * @package choice@ - * @boolean@ - * @image@ - * @symbol@ - * @color@ - * @info@ -| @name@ [[type:string]] ''required'' Name of the field. -| @description@ [[type:localized string]] @""@ Description of the field, shown in the status bar when the mouse is over the field. -| @icon@ [[type:filename]] Filename of an icon for this field, used for automatically generated [[type:statistics category]]s. -| @editable@ [[type:boolean]] @true@ Can values of this field be edited? -| @save value@ [[type:boolean]] @true@ Should values of this field be saved to files? Should be disabled for values that are generated by scripts. -| @show statistics@ [[type:boolean]] @true@ Should a [[type:statistics dimension]] and [[type:statistics category|category]] be made for this field, - causing it to be listed on the statistics panel? -| @identifying@ [[type:boolean]] @false@ Does this field give the name of the [[type:card]] or [[type:set]]? -| @card list column@ [[type:int]] @0@ On what position in the card list should this field be put? -| @card list width@ [[type:int]] @100@ Width of the card list column in pixels. -| @card list visible@ [[type:boolean]] @false@ Should this field be shown in the card list by default? -| @card list allow@ [[type:boolean]] @true@ Should this field be allowed in the card list at all? -| @card list name@ [[type:localized string]] field name Alternate name to use for the card list, for example an abbreviation. -| @card list alignment@ [[type:alignment]] @left@ Alignment of the card list column. -| @sort script@ [[type:script]] Alternate way to sort the card list when using this column to sort the list. - -The @type@ determines what values of this field contain: -! Type Values contain Displayed as -| @text@ Text with markup (a [[type:tagged string]]) Text -| @choice@ A choice from a list Text or an image -| @multiple choice@ Zero or more choices from a list A single image or multiple images -| @package choice@ A choice from a list of installed [[type:package]]s Text and/or an image -| @boolean@ @yes@ or @no@ Text or an image or both -| @color@ Any color or a restricted selection from a list A box filled with the color -| @image@ Any image The image -| @symbol@ A [[type:symbol]] edited with the symbol editor The image -| @info@ An informational message, for example to group fields together. A box containing the label - -Additional properties are available, depending on the type of field: - -! Type Property Type Default Description -| @"text"@ @script@ [[type:script]] Script to apply to values of this field after each change.
- If the script evaluates to a constant (i.e. doesn't use @value@) then values in this field can effectively not be edited. -| ^^^ @default@ [[type:script]] Script to determine the value when it is in the default state (not edited). -| ^^^ @default name@ [[type:string]] @"Default"@ Name of the default state, currently not used. -| ^^^ @multi line@ [[type:boolean]] @false@ Can values of this field contain line breaks? - -| @"choice"@ @script@ [[type:script]] Script to apply to values of this field after each change.
- If the script evaluates to a constant (i.e. doesn't use @value@) then values in this field can effectively not be edited. -| ^^^ @default@ [[type:script]] Script to determine the value when it is in the default state (not edited). -| ^^^ @initial@ [[type:string]] Initial value for new values for this field. -| ^^^ @default name@ [[type:string]] @"Default"@ Name of the default state. -| ^^^ @choices@ [[type:list]] of [[type:choice]]s Possible values for this field. -| ^^^ @choice colors@ [[type:map]] of opaque [[type:color]]s Colors of the choices for statistics graphs. -| ^^^ @choice colors cardlist@ [[type:map]] of opaque [[type:color]]s Colors of the choices for lines in the card list,
see also the @card list color script@ property of [[type:game]]s. - -| @"multiple choice"@ <<< <<< <<< - '' Multiple choice fields have the same attributes as normal choice fields.''
- To refer to a combination of values in the initial attribute use @choice1, choice2, choice3@.
- These choices must appear in the same order as they do in the @choices@ property. - -| @"boolean"@ ''A boolean field is a choice field with the choices @"yes"@ and @"no"@.'' <<< <<< <<< - -| @"package choice"@ - @script@ [[type:script]] Script to apply to values of this field after each change.
- If the script evaluates to a constant (i.e. doesn't use @value@) then values in this field can effectively not be edited. -| ^^^ @match@ [[type:string]] ''required'' Filenames of the packages to match, can include wildcards @"*"@. For example @"magic-mana-*.mse-symbol-font"@. -| ^^^ @initial@ [[type:string]] ''required'' Initial package for new values for this field. -| ^^^ @reqired@ [[type:boolean]] @true@ Must a package always be selected? Or is it allowed to select nothing? -| ^^^ @empty name@ [[type:string]] @"None"@ Name of the empty state. Applies only if @required: false@. - -| @"color"@ @script@ [[type:script]] Script to apply to values of this field after each change.
- If the script evaluates to a constant (i.e. doesn't use @value@) then values in this field can effectively not be edited. -| ^^^ @default@ [[type:script]] Script to determine the value when it is in the default state (not edited). -| ^^^ @initial@ [[type:string]] Initial color for new values for this field. -| ^^^ @default name@ [[type:string]] @"Default"@ Name of the default state. -| ^^^ @allow custom@ [[type:boolean]] @true@ Are colors other then those from the choices allowed? -| ^^^ @choices@ [[type:list]] of [[type:color choice]]s Possible values for this field. - -| @"image"@ ''no extra properties'' <<< <<< <<< - -| @"symbol"@ ''no extra properties'' <<< <<< <<< - -| @"info"@ @script@ [[type:script]] Script to determine the value to show. - ---Example-- -The @title@ field gives the title of a set: ->set field: -> type: text -> name: title -> identifying: true - -The border color of cards can be selected from a list of choices, but other values are also possible. -The default is based on a set field. Statistics don't make much sense for the border color. ->card field: -> type: color -> name: border color -> default: set.border_color -> choice: -> name: black -> color: rgb(0,0,0) -> choice: -> name: white -> color: rgb(255,255,255) -> choice: -> name: silver -> color: rgb(128,128,128) -> choice: -> name: gold -> color: rgb(200,180,0) -> show statistics: false diff --git a/doc/type/filename.txt b/doc/type/filename.txt deleted file mode 100644 index bb0942b5..00000000 --- a/doc/type/filename.txt +++ /dev/null @@ -1,20 +0,0 @@ -Primitve type: filename - -Filenames are regular [[type:string]]s, pointing to a file. -There are two types of filenames, relative and absolute: -! Syntax Description -| path/to/file A relative file, this is retrieved from the current package. - i.e. for a filename in a stylesheet, the file is retrieved from that stylesheet. -| /package/path/to/file An absolute filename includes the name of the package. This is a package somewhere in the MSE data directory. - -Don't forget the double quotes (@""@) in scripts. - ---Dependencies-- -When using an absolute filename to refer to a file from another [[file:package]], -the [[type:dependency]] on that package must be declared. -For example, ->include file: /common.mse-include/something -Will give a warning message, unless the file also lists ->depends on: -> package: common.mse-include -> version: 2007-01-01 diff --git a/doc/type/font.txt b/doc/type/font.txt deleted file mode 100644 index ea3c24f3..00000000 --- a/doc/type/font.txt +++ /dev/null @@ -1,29 +0,0 @@ -Data type: font - ---Overview-- - -A reference to a normal [[type:font]] for drawing text. - ---Properties-- -! Property Type Default Description -| @name@ [[type:scriptable]] [[type:string]] ''required'' Name of the font as it appears in most text programs. -| @italic name@ [[type:scriptable]] [[type:string]] Optionally, a different font to use for italic text instead of the normal italic version of the font. -| @size@ [[type:scriptable]] [[type:double]] ''required'' Size of the font in points on a 96 DPI display. -| @scale down to@ [[type:double]] ∞ Minimum size in points to scale the size down to. -| @max stretch@ [[type:double]] @1.0@ Maximum multiplier by which the width of the text is compressed, so @max width: 0.5@ means the text can be compressed to half the normal width. -| @weight@ [[type:scriptable]] font weight @"normal"@ Weight of the font, one of @"normal"@ or @"bold"@. This can be changed locally by [[type:tagged string|tags]]. -| @style@ [[type:scriptable]] font style @"normal"@ Style of the font, one of @"normal"@ or @"italic"@. This can be changed locally by [[type:tagged string|tags]]. -| @underline@ [[type:scriptable]] [[type:boolean]] @false@ Should the font be underlined? -| @color@ [[type:scriptable]] [[type:color]] @rgb(0,0,0)@ What color should text be drawn in? -| @shadow color@ [[type:scriptable]] [[type:color]] @"transparent"@ Color for a shadow below the text. -| @shadow displacement x@ [[type:double]] @0@ Relative position of the shadow in pixels. -| @shadow displacement y@ [[type:double]] @0@ ^^^ -| @shadow blur@ [[type:double]] @0@ How much should the shadow be blurred? -| @separator color@ [[type:color]] @rgba(0,0,0,128)@ Color for @@ tags inserted by the [[fun:combined_editor]] function. - ---Example-- ->font: -> name: Times new Roman -> size: 17 -> weight: bold -> color: rgb(0,0,0) diff --git a/doc/type/function.txt b/doc/type/function.txt deleted file mode 100644 index cabaeea9..00000000 --- a/doc/type/function.txt +++ /dev/null @@ -1,20 +0,0 @@ -Primitive type: function - ---Overview-- -The [[script:index|scripting language]] allows you to define custom functions. - ---Syntax-- -A piece of code enclosed in curly braces defines a function. - -A function can be called using parentheses, for example @function(argument:value)@. - ---Composition-- -Functions can be composed using the @+@ operator, evaluating @a + b@ first evaluates @a@ and uses its result as @input@ for @b@: -> example := to_upper + { "result == {input}" } -> example("xyz") == "result == XYZ" - -Multiple functions can be changed together like this, this is especially convenient in combination with [[script:default arguments]]. - ---Example-- -> example := { a + b } -> example(a: 1, b: 2) == 3 diff --git a/doc/type/game.txt b/doc/type/game.txt deleted file mode 100644 index ce2d5088..00000000 --- a/doc/type/game.txt +++ /dev/null @@ -1,51 +0,0 @@ -File type: Game - ---Overview-- - -Games are part of the [[file:style triangle]]: -| Description Looks Data -| '''Game''' [[type:Stylesheet]] [[type:Set]] -| [[type:Field]] [[type:Style]] [[type:Value]] - -Games provide the ''description'', i.e. what kinds of things are on a card. - ---Package format-- - -A game is described in a [[file:package]] with the .mse-game file extension. -Such a package contains a [[file:format|data file]] called game that has the following properties. - ---Properties-- -! Property Type Default Description -| '''Common to all packages''' <<< <<< <<< -| @mse version@ [[type:version]] ''required'' Version of MSE this game is made for. -| @short name@ [[type:string]] file name A short name of this game, for the 'new set' list. -| @full name@ [[type:string]] file name A longer name of this game. -| @icon@ [[type:filename]] ''none'' Filename of an icon / preview for this game, for the 'new set' list. -| @position hint@ [[type:int]] ∞ Where to place this item in the 'new set' list? Lower numbers come first. -| @version@ [[type:version]] @0.0.0@ Version number of this package. -| @depends on@ [[type:list]] of [[type:dependency]]s - Packages this package depends on. - -| '''Specific to games''' <<< <<< <<< -| @init script@ [[type:script]] @;@ Script to run when this game is loaded,
can set variables - to be used by other scripts in this game or stylesheets using it. -| @set fields@ [[type:list]] of [[type:field]]s Fields for the styling panel. -| @default set style@ [[type:indexmap]] of [[type:style]]s Default style for the set fields, can be overridden by the stylesheet. -| @card fields@ [[type:list]] of [[type:field]]s Fields for each card. -| @card list color script@ [[type:script]] from fields Script that determines the color of an item in the card list.
If not set uses the @card list colors@ property of the first card field that has it. -| @statistics dimensions@ [[type:list]] of [[type:statistics dimension]]s from fields Dimensions for statistics, a dimension is roughly the same as an axis.
By default all card fields with 'show statistics' set to true are used. -| @statistics categories@ [[type:list]] of [[type:statistics category]]s from dimensions DOC_MSE_VERSION: not used since 0.3.6 - Choices shown on the statistics panel.
By default all statistics dimensions are used. -| @pack types@ [[type:list]] of [[type:pack type]]s DOC_MSE_VERSION: since 0.3.7 - The types of card packs that will be listed on the random booster panel. -| @has keywords@ [[type:boolean]] @false@ Does this game use keywords? Should the keywords tab be available? -| @keyword match script@ [[type:script]] @;@ Script to apply to the @match@ property of keywords. -| @keyword modes@ [[type:list]] of [[type:keyword mode]]s Choices for the 'mode' property of keywords. -| @keyword parameter types@ [[type:list]] of [[type:keyword param type]]s Types of parameters available to keywords. -| @keywords@ [[type:list]] of [[type:keyword]]s Standard keywords for this game. -| @word lists@ [[type:list]] of [[type:word list]]s Word lists that can be used by text fields. -| @add cards script@ [[type:list]] of [[type:add cards script]]s DOC_MSE_VERSION: since 0.3.7 - A list of scripts for conveniently adding multiple cards to a set. - ---Examples-- -Look at the game files in the standard MSE distribution for examples. diff --git a/doc/type/graph_type.txt b/doc/type/graph_type.txt deleted file mode 100644 index 4994a5f0..00000000 --- a/doc/type/graph_type.txt +++ /dev/null @@ -1,21 +0,0 @@ -Enumeration: graph type - -Types of graphs for the statistics panel. - ---Possible values-- -The value is one of the following options: -! Value Dimensions Sketch Description -| @bar@ 1 bar graph - One bar for each value on the axis, the height represent the number of cards with that value. -| @pie@ 1 pie graph - A pie graph, the size of the slice represents the numer of cards with a particular value. -| @stack@ 2 stack graph - One bar for each value on the first axis, bars for each value on axis2 are stacked on top of each other. -| @scatter@ 2 scatter graph - Scatter plot, the size of the circles corresponds to the number of cards with those two values. -| @scatter pie@ 3 scatter-pie graph - Scatter plot, the size of the circles corresponds to the number of cards with those two values. - Each circle is a small pie graph for the third axis. - ---Examples-- -> type: bar diff --git a/doc/type/image.txt b/doc/type/image.txt deleted file mode 100644 index b28eb775..00000000 --- a/doc/type/image.txt +++ /dev/null @@ -1,28 +0,0 @@ -Primitive type: image - -Images are generated using scripts. - -It is either given using a [[type:filename]] or as the output of a function. - ---File syntax-- -The syntax for files is similair to that of [[type:scriptable]] properties: -> image: image.png -> image: { "image.png" } -> image: { linear_blend(...) } - ---Script syntax-- -[[type:Filename]]s are implicitly converted to images as needed. - ---See also-- -The following functions transform images: -| [[fun:linear_blend]] Blend two images together using a linear gradient. -| [[fun:masked_blend]] Blend two images together using a third mask image. -| [[fun:combine_blend]] Blend two images together using a given [[type:combine|combining mode]]. -| [[fun:set_mask]] Set the transparancy mask of an image. -| [[fun:set_alpha]] Change the transparency of an image. -| [[fun:set_combine]] Chnage how the image should be combined with the background. -| [[fun:enlarge]] Enlarge an image by putting a border around it. -| [[fun:crop]] Crop an image, giving only a small subset of it. -| [[fun:drop_shadow]] Add a drop shadow to an image. -| [[fun:symbol_variation]] Render a variation of a [[type:symbol]]. -| [[fun:built_in_image]] Return an image built into the program. diff --git a/doc/type/include.txt b/doc/type/include.txt deleted file mode 100644 index d8d79f82..00000000 --- a/doc/type/include.txt +++ /dev/null @@ -1,22 +0,0 @@ -File type: Include package - ---Overview-- - -An include package contains files used by other packages, for example scripts or images. - ---Package format-- -An include package is described in a [[file:package]] with the .mse-include file extension. -It should contain a [[file:format|data file]] called include with the following properties. - ---Properties-- -! Property Type Default Description -| '''Common to all packages''' <<< <<< <<< -| @mse version@ [[type:version]] ''required'' Version of MSE this include package is made for. -| @short name@ [[type:string]] file name A short name of this include package, currently not used. -| @full name@ [[type:string]] file name A longer name of this include package, currently not used. -| @icon@ [[type:filename]] ''none'' Filename of an icon / preview for this export template, currently not used. -| @version@ [[type:version]] @0.0.0@ Version number of this package. -| @depends on@ [[type:list]] of [[type:dependency]]s - Packages this package depends on. - -No additional properties are available. diff --git a/doc/type/index.txt b/doc/type/index.txt deleted file mode 100644 index 0e94f6ac..00000000 --- a/doc/type/index.txt +++ /dev/null @@ -1,69 +0,0 @@ -Data types - -Magic Set Editor uses many data types in the files and in scripting. -There are for instance [[type:card]]s in [[type:set]]s, [[type:stylesheet]]s describing the layout of [[type:field]]s, etc. - ---File types-- -These are the 'major' data types that are written directly to [[file:package]]s. -| [[type:Game]] What information is on each card? -| [[type:Stylesheet]] What do cards look like? -| [[type:Set]] Sets of cards. -| [[type:Symbol font]] Fonts consisting of symbols, for instance mana symbols. -| [[type:Export template]] How to export sets to HTML files? -| [[type:Locale]] Translations of MSE. -| [[type:Include]] Files to include in other templates. -| [[type:Installer]] Installers containing several packages. -| [[type:Symbol]] Expansion symbols. -| [[type:Settings]] MSE settings. - ---Compound types-- -These contain several properties, similair to the file types. But they are part of some other file type. -| [[type:field]] A field description for cards. -| [[type:style]] The styling and positioning of a field. -| [[type:value]] The value in a field, for a particular card. -| [[type:card]] A card containing values. -| [[type:keyword]] A keyword. -| [[type:keyword mode]] A possible mode for keywords. -| [[type:keyword param type]] A type of parameters for keywords. -| [[type:statistics dimension]] A dimension for the statistics panel. -| [[type:statistics category]] A category for the statistics panel. -| [[type:word list]] A list of words that can be used for a drop down list in text fields. -| [[type:add cards script]] A script for convienently adding multiple cards to a set. -| [[type:font]] Description of a font. -| [[type:symbol part]] Part of a [[type:symbol]]. -| [[type:control point]] A point on in a symbol part. - ---Collection types-- -| [[type:list]] Lists of items - * item - * item - * item -| [[type:indexmap]] Lists indexed by field name - -
name:someone
type:something
-| [[type:map]] Lists indexed by other text - ---Script related-- -| [[type:script]] A script to execute to update a field, or for initialization. -| [[type:scriptable]] A primitive type whose value can depend on a script. -| [[type:image]] An image defined by a script. -| [[type:function]] Functions in scripts. These have no direct representation in a file. - ---Enumerations-- -| [[type:alignment]] Alignment of text and images. -| [[type:direction]] Direction of text. -| [[type:combine]] How to combine images with the background. -| [[type:symbol combine]] How to combine [[type:symbol part|symbol shapes]] with the background. -| [[type:graph type]] Type of statistics graphs. - ---Primitive types-- -| [[type:string]] Text, @"abc"@ -| [[type:tagged string]] Text with tags -| [[type:filename]] Filenames -| [[type:regex]] Regular expression strings -| [[type:boolean]] @true@ or @false@ -| [[type:int]] Integer numbers, @1, 2, 100@ -| [[type:double]] Real numbers, @1, 0.5, 21.3@ -| [[type:version]] Version numbers -| [[type:color]] Colors -| [[type:date]] Dates/times diff --git a/doc/type/indexmap.txt b/doc/type/indexmap.txt deleted file mode 100644 index d9a19577..00000000 --- a/doc/type/indexmap.txt +++ /dev/null @@ -1,33 +0,0 @@ -Collection type: field map - ---Overview-- - -A 'field map' is a [[type:map]], but indexed by [[type:field]]s. - -For instance if a game specifies the fields: ->field: -> type: text -> name: field1 ->field: -> type: color -> name: field2 - -Then the a field map of ''things'' for those fields would look like: ->field1: thing ->field2: thing - -A field map of [[type:style]]s would be: ->field1: # some text style for field1 goes here ->field2: # some color style for field2 goes here - -And a field map of [[type:value]]s would be: ->field1: text goes here ->field2: rgb(1,2,3) - ---Script syntax-- - -In a script field maps can be accessed like normal [[type:map]]s based on the field name. -So: ->card.field1 # retrieve the value of field1 ->card["field" + 1] # the same thing ->card_style.field2 # retrieve the styling for field2 diff --git a/doc/type/insert_symbol_menu.txt b/doc/type/insert_symbol_menu.txt deleted file mode 100644 index 99dd4532..00000000 --- a/doc/type/insert_symbol_menu.txt +++ /dev/null @@ -1,48 +0,0 @@ -Data type: "insert symbol" menu. - ---Overview-- - -A description of the "Insert symbol" menu for a specific [[type:symbol font]]. - -The menu consists of a number of entries, either items, separators or submenus. - ---Properties-- -! Property Type Default Description -| @type@ One of: @"code"@ or @"submenu"@ What type of menu item is this? - * @code@, inserts a symbol with the given code. - * @custom@, pops up a dialog where the user can choose a code to insert. - * @line@, a separating line. - * @submenu@, a submenu. -| @name@ [[type:string]] ''required'' Name of this menu item, corresponding to the code to insert. -| @label@ [[type:localized string]] name Label to show in the menu. -| @prompt@ [[type:localized string]] Prompt to use for the pop up box with @custom@ type -| @items@ [[type:list]] of [[type:insert symbol menu|submenu items]] Items in the submenu, when items are present the @type@ is set to @"submenu"@. - -For custom items the dialog will be titled with the @label@ and have message text @prompt@. - ---Examples-- -A menu for magic mana symbols (simplified). Containing all types of items. ->insert symbol menu: -> item: -> type: custom -> name: Generic -> prompt: How much generic mana? -> item: -> type: line -> item: W -> item: U -> item: B -> item: R -> item: G -> item: -> label: Complex -> name: cplx -> item: -> type: line -> item: -> name: hybrid -> item: W/U -> item: U/B -> item: B/R -> item: R/G -> item: G/W diff --git a/doc/type/installer.txt b/doc/type/installer.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/doc/type/int.txt b/doc/type/int.txt deleted file mode 100644 index 42d9554f..00000000 --- a/doc/type/int.txt +++ /dev/null @@ -1,14 +0,0 @@ -Primitive type: integer number - -Integer numbers are numbers without a decimal point. -In many cases negative numbers don't make sense, but the program never complains about them. - ---File syntax-- -> something: 123 - ---Script syntax-- -> 123 + 456 * -1 - ---See also-- -| [[type:double]] Number type that can contain fractional values. -| [[fun:to_int]] Convert a value to an integer number diff --git a/doc/type/keyword.txt b/doc/type/keyword.txt deleted file mode 100644 index 6489b8fe..00000000 --- a/doc/type/keyword.txt +++ /dev/null @@ -1,27 +0,0 @@ -Data type: keyword - ---Overview-- - -A keyword in a [[type:set]] or a [[type:game]]. - -A keyword is something that matches a piece of text, and optionally some kind of reminder text can be shown. - ---Properties-- -! Property Type Default Description -| @keyword@ [[type:string]] ''required'' Name of the keyword. -| @match@ [[type:string]] ''required'' String to match. -| @reminder@ [[type:scriptable]] [[type:string]] ''required'' Script to generate the reminder text of this keyword. -| @rules@ [[type:string]] @""@ Explanation or additional rules for this keyword. -| @mode@ Name of a [[type:keyword mode]] Mode of this keyword. - -The match string can include parameters, @"type"@ where @"type"@ is the name of a [[type:keyword param type|keyword parameter type]] in the game. -These will match according to the @match@ property of that parameter type. - -When expanding the reminder text @param1@ refers to the first parameter in the match string, @param2@ to the second, etc. - ---Example-- ->keyword: -> keyword: Equip -> match: Equip cost -> mode: core -> reminder: {param1}: Attach to target creature you control. Equip only as a sorcery. diff --git a/doc/type/keyword_mode.txt b/doc/type/keyword_mode.txt deleted file mode 100644 index 4bb11288..00000000 --- a/doc/type/keyword_mode.txt +++ /dev/null @@ -1,22 +0,0 @@ -Data type: keyword mode - ---Overview-- - -A mode for [[type:keyword]]s. - -This becomes a choice in the 'mode' box on the keywords panel. - -The idea behind modes is that a mode indicates what type of keyword it is, for example an "official" keyword, a "simple" keyword or a "custom" keyword. -This information can then be used to determine whether to expand the reminder text. - ---Properties-- -! Property Type Default Description -| @name@ [[type:string]] ''required'' Name of the mode, this is shown in the box and used in scripts. -| @description@ [[type:string]] @""@ A description of this mode. -| @is default@ [[type:boolean]] @false@ Is this the default mode for new keywords? - ---Example-- ->keyword mode: -> name: custom -> description: Custom keywords -> is default: true diff --git a/doc/type/keyword_param_reference_script.txt b/doc/type/keyword_param_reference_script.txt deleted file mode 100644 index 59919b87..00000000 --- a/doc/type/keyword_param_reference_script.txt +++ /dev/null @@ -1,25 +0,0 @@ -Data type: keyword parameter reference script - ---Overview-- - -A way to use a [[type:keyword param type|keyword parameter]] in a [[type:keyword]]'s reminder text. - -Usually the parameters are included as @"{param1}"@, etc. -But in some cases for instance a function should be applied, @"{fun(param1)}"@. - -To make this easy for the user, a menu of choices is provided, this type describes such a choice. - ---Properties-- -! Property Type Default Description -| @name@ [[type:string]] ''required'' Name of the parameter type. -| @description@ [[type:string]] ''required'' A description of the reference script. -| @script@ [[type:script]] ''required'' Script that generates the code using the parameter.
- This means you will likely need to do some escaping.
- In the script, @input@ refers to the name of the parameter, for example @"param1"@. - ---Example-- -Apply the [[fun:english_number]] function to the parameter: ->refer script: -> name: as words -> description: (one, two, three) -> script: \{english_number({input})\} diff --git a/doc/type/keyword_param_type.txt b/doc/type/keyword_param_type.txt deleted file mode 100644 index 52829d7e..00000000 --- a/doc/type/keyword_param_type.txt +++ /dev/null @@ -1,40 +0,0 @@ -Data type: keyword parameter type - ---Overview-- - -A type of parameter that can be used in a [[type:keyword]]. - ---Properties-- -! Property Type Default Description -| @name@ [[type:string]] ''required'' Name of the parameter type. -| @description@ [[type:string]] ''required'' Description of the parameter type. -| @placeholder@ [[type:string]] @name@ of this param type Placeholder to use for empty parameters, the name is used if this is empty. -| @optional@ [[type:boolean]] @true@ Is a placeholder used when a keyword is encountered with no parameter,
for example @"Cycling "@ would become @"Cycling cost"@. -| @match@ [[type:regex]] ''required'' Regular expression that this param type matches. -| @separator before is@ [[type:regex]] @""@ Regular expression of separator before parameters of this type. -| @separator after is@ [[type:regex]] @""@ Regular expression of separator after parameters of this type. -| @eat separator@ [[type:boolean]] @true@ Allow the user to 'type over' the separator.
- For example if the separator is @" "@ in the keyword @"Cycling"@, and the user types @"Cycling"@, - a space and a placeholder is automatically inserted, making @"Cycling "@. - If the user now presses space the cursor is only moved, no additional space is inserted, the space is 'eaten'. -| @script@ [[type:script]] Script to apply to parameters of this type before substituting them back into the text. -| @reminder script@ [[type:script]] Script to apply to parameters of this type before using them in the reminder text. -| @example@ [[type:string]] Example for in the keyword editor, currently not used. -| @refer scripts@ [[type:list]] of [[type:keyword param reference script]]s - Scripts for inserting parameters of this type into the reminder text. - To make this easy for the user, a menu of ways to use a parameter is provided. - ---Example-- -The 'number' parameter type. It matches a sequence of digits. -It can be included in the reminder text directly, or by applying some function first. ->keyword parameter type: -> name: number -> match: [0-9]+ -> refer script: -> name: normal -> description: (1,2,3) -> script: \{{input}\} -> refer script: -> name: as words -> description: (one, two, three) -> script: \{english_number({input})\} diff --git a/doc/type/list.txt b/doc/type/list.txt deleted file mode 100644 index addf7c94..00000000 --- a/doc/type/list.txt +++ /dev/null @@ -1,35 +0,0 @@ -Collection type: List - ---File syntax-- -In files a list is represented as multiple keys, one for each element. -The keys are all in the singular for of the name of the list, -if the list is named for instance @symbols@ each key will be named @symbol@. ->symbol: -> # first symbol here ->symbol: -> # second symbol here -># etc. - ---Script syntax-- -In a script lists can be declared using square brackets. -> [] # An empty list -> [1] # A list with a single element, the value 1 -> [1,2] # A list with two elements - -Lists can be accessed using either the bracket operator, or the dot operator. -The first element of a list is numbered 0, the next 1, etc. -> list.0 # The first element of the list 'list' -> list[0] # The same thing -> list[0+0] # The same thing - -It is possible to iterate over lists using the @for each@ construct: -> for each x in [1,2,3] do "x = {x}. " -evaluates to: -> "x = 1. x = 2. x = 3. " - ---Functions-- -There are several functions for working with lists: -| [[fun:position]] Find the position of an element in a list -| [[fun:number_of_items]] Return the number of items in a list -| [[fun:sort_list]] Sort a list -| [[fun:filter_list]] Filter a list, keeping only elements that match a predicate diff --git a/doc/type/locale.txt b/doc/type/locale.txt deleted file mode 100644 index d943204f..00000000 --- a/doc/type/locale.txt +++ /dev/null @@ -1,65 +0,0 @@ -File type: Locale - ---Overview-- - -A locale gives a translation of the user interface of the program. - ---Package format-- - -A locale is described in a [[file:package]] with the .mse-locale file extension. -Such a package contains a data file called locale that has the following properties. -There are usually no other files in the package. - ---Properties-- -! Property Type Default Description -| '''Common to all packages''' <<< <<< <<< -| @mse version@ [[type:version]] ''required'' Version of MSE this locale is made for. -| @short name@ [[type:string]] file name A short name of this locale, for the options dialog. -| @full name@ [[type:string]] file name A longer name of this locale. -| @icon@ [[type:filename]] ''none'' Filename of an icon / preview for this locale, currently not used. -| @version@ [[type:version]] @0.0.0@ Version number of this package. - -| '''Specific to locales''' <<< <<< <<< -| @menu@ [[type:map]] of [[type:string]]s Translations of menu items.
- Menu items can contain shortcut keys (like Ctrl+C for copy) by using a ''single'' TAB between the text and the shortcut key.
- Keys to use with Alt+Something (displayed underlined) can be specified &
- For example - >>>new set: &New... Ctrl+N -| @help@ [[type:map]] of [[type:string]]s Translations of help texts for the status bar. -| @tool@ [[type:map]] of [[type:string]]s Translations of toolbar item texts. -| @tooltip@ [[type:map]] of [[type:string]]s Translations of tooltips for toolbar items. -| @label@ [[type:map]] of [[type:string]]s Labels of controls in the GUI. -| @button@ [[type:map]] of [[type:string]]s Labels of buttons in the GUI. -| @title@ [[type:map]] of [[type:string]]s Titles of windows. -| @action@ [[type:map]] of [[type:string]]s Names of actions for undo/redo, things like "typing" and "add card". -| @error@ [[type:map]] of [[type:string]]s Error messages. -| @type@ [[type:map]] of [[type:string]]s Types of objects for error messages. -| @game@ [[type:map]] of [[type:map]] of [[type:string]]s - Deprecated since MSE 2.1.3, use @localized_...@ instead.
- Translations for specific [[type:game]]s.
- Field names and field descriptions are looked up in the locale, if they are found the translation is used, otherwise the value from the game file.
- Extra keys not present in the English locale can be added here. -| @stylesheet@ [[type:map]] of [[type:map]] of [[type:string]]s - Deprecated since MSE 2.1.3, use @localized_...@ instead.
- Translations for specific [[type:stylesheet]]s. -| @symbol font@ [[type:map]] of [[type:map]] of [[type:string]]s - Deprecated since MSE 2.1.3, use @localized_...@ instead.
- Translations for specific [[type:symbol font]]s, in particular the "insert symbol" menu. - -Some of the items can contain placeholders for other values, for example: -> undo: &Undo%s Ctrl+Z -The @%s@ is replaced by the name of the action to undo. -This @%s@ should be used in exactly those entries that also contain it in the English locale. - ---Examples-- -Look at the @"en.mse-locale"@ file in the standard MSE distribution for an example. - ---Translating MSE-- -To translate the MSE user interface: -* Create a copy of the @"en.mse-locale"@ directory, name it @"**.mse-locale"@, where @"**"@ is a two or three letter [[http://en.wikipedia.org/wiki/ISO_language_code|ISO language code]]. -* Open the @"locale"@ file with Notepad (or another program that supports UTF-8), and translate the strings. -* Add new keys for game, stylesheet or symbol font specific keys as described above. -* Save the file, select the new locale from Edit->Preferences. -* Restart MSE, and make sure everything looks right. -* Submit the new locale to the [[http://magicseteditor.sourceforge.net/forum/7|MSE forum]. -* Maintain the locale when new versions of MSE come out. A new version may have new user interface items and therefore new keys. diff --git a/doc/type/localized_string.txt b/doc/type/localized_string.txt deleted file mode 100644 index b171a088..00000000 --- a/doc/type/localized_string.txt +++ /dev/null @@ -1,14 +0,0 @@ -Localized strings - -A 'localized string' is a [[type:map]] of [[type::string]]s, indexed by locale name. -It is used to translate games and stylesheets to other user interface languages. - -Localized strings can be given with a @localized@ prefix on the property name. -For example, a field has a @description@ which is a [[type::string]], and a @localized_description@ for localized variants. So - ->field: -> name: cost -> description: How much this card costs -> localized description: -> en_US: How much this card costs -> nl_NL: Hoeveel deze kaart kost diff --git a/doc/type/map.txt b/doc/type/map.txt deleted file mode 100644 index 9dca952d..00000000 --- a/doc/type/map.txt +++ /dev/null @@ -1,26 +0,0 @@ -Collection type: Map - -A map is like a [[type:list]] with [[type:string]] keys. - ---File syntax-- -In files a map is represented as key/value pairs. -For instance a map of [[type:color]]s could be: ->some map: -> red: rgb(255,0,0) -> green: rgb(0,255,0) -> blue: rgb(0,0,255) - ---Script syntax-- -In a script maps can be declared using square brackets. -> [] # An empty map -> [key:1] # A map with a single element, the value 1 under the key "key" -> [red:rgb(255,0,0), green:rgb(0,255,0)] # A map with two elements - -Like lists, maps can be accessed using either the bracket operator, or the dot operator. -> map.key # The elment named "key" -> map["k"+"ey"] # The same thing - -It is possible to iterate over the values maps using the @for@ construct: -> for each x in [one: 1, two: 2] do "x = {x}. " -evaluates to: -> "x = 1. x = 2. " diff --git a/doc/type/pack_item.txt b/doc/type/pack_item.txt deleted file mode 100644 index f4b8291d..00000000 --- a/doc/type/pack_item.txt +++ /dev/null @@ -1,25 +0,0 @@ -Data type: card pack item - -DOC_MSE_VERSION: since 0.3.8 - ---Overview-- - -A reference to another [[type:pack type]], from which one or more cards are chosen. - ---Properties-- -! Property Type Default Description -| @name@ Name of a [[type:pack item]] ''required'' Name of the pack item to include in this pack. -| @amount@ [[type:scriptable]] [[type:int]] 1 How many of those cards are in the pack? -| @weight@ [[type:scriptable]] [[type:double]] 1 How 'important' is this item? - Items with a higher weight will be chosen more often. - Cards from @filter@ will have a weight of 1. - ---Examples-- ->item: -> name: common -> amount: 11 - -Include 11 commons in this [[type:pack type|pack]]. - ->item: common -Short form. Include a single common in this pack. diff --git a/doc/type/pack_type.txt b/doc/type/pack_type.txt deleted file mode 100644 index 27e4d328..00000000 --- a/doc/type/pack_type.txt +++ /dev/null @@ -1,109 +0,0 @@ -Data type: card pack type - -DOC_MSE_VERSION: since 0.3.8 - ---Overview-- - -A type of card packs. For instance "booster" and "tournament pack" are card pack types. - -A pack type contains either: -* a filter for selecting the desired kind of cards from the set. -* one or more [[type:pack item]]s, indicating what kinds and how many cards are in the pack. -* a combination of the above. - ---Properties-- -! Property Type Default Description -| @name@ [[type:string]] Name of this card pack type. - Other pack types can refer to this name. -| @select@ see below see below How are instances of this pack generated? -| @enabled@ [[type:scriptable]] [[type:boolean]] @true@ Is this pack type enabled, i.e. can the user select it? -| @selectable@ [[type:boolean]] @true@ Is this pack selectable from the list of packs in the user interface? -| @summary@ [[type:boolean]] @true@ Is a summary of the total number of cards shown in the second panel in the user interface?
- Note: this only applies to pack types that have the @filter@ property set. -| @filter@ [[type:script]] ''optional'' Condition that a card must satisfy to be included in this pack type. -| @items@ [[type:list]] of [[type:pack item]]s The items to include in this pack. - ---Selection-- - -The @select@ property specifies how instances of this pack are generated. -When the user selects that he wants 3 copies of pack X, then MSE will generate three ''instances'' of that pack. -How that happens depends on the @select@ property: - -! @select@ Description -| @all@ Each instance of this pack type contains all of the filtered cards and @items@.
- In general, @select: all@ is used for the selectable pack types, while other @select@ types are used for the rest of the packs.
- This is the default for pack types with @items@. -| @replace@ Each instance of this pack type contains a single card or @item@, chosen at random with replacement. - The probability of picking an item is proportional to its @weight@, all filtered cards have weight 1. -| @no replace@ Each instance of this pack type contains a single card or @item@, chosen at random without replacement. - This means that the same card or item will not be chosen twice (if the set is large enough).
- This is the default for pack types with a @filter@. -| @proportional@ Each instance of this pack type contains a single filtered card or @item@, chosen with probability proportional to the number of choices for the card/item. - The choice is made with replacement. -| @nonempty@ Each instance of this pack type contains a single filtered card or @item@, - but items that contain no cards will be ignored. - The choice is made with replacement. -| @equal@ Instead of choosing cards and items at random, they are chosen to make their numbers as equal as possible. -| @equal proportional@ A combination of @equal@ and @proportional@. -| @equal nonempty@ A combination of @equal@ and @nonempty@. -| @first@ If there are any cards, the first is always chosen, otherwise the first ''nonempty'' item is used.
- @select: first@ can be used to make a kind of if statement: "If there are any X cards then use those, otherwise use Y cards". - ---Examples-- ->pack item: -> name: rare -> select: no replace # this is optional, 'no replace' is the default -> filter: card.rarity == "rare" - -Rare cards are those with the rarity value of @"rare"@. -The cards are chosen without replacement, so in a single pack the same rare will not occur twice. - ->pack item: -> name: basic land -> select: equal -> filter: card.rarity == "basic land" - -Basic land cards are selected in equal amounts: -Say a set contains two basic lands: "Good Land" and "Bad Land". -Then if 6 basic lands are selected, there will always be exactly 3 "Good Lands" and 3 "Bad Lands". -If an odd number of basic lands are selected then the amounts will be as close as possible to being equal. - - ->pack type: -> name: booster pack -> select: all # this is optional, 'all' is the default -> item: -> name: rare -> amount: 1 -> item: -> name: uncommon -> amount: 3 -> item: -> name: common -> amount: 11 - -A Magic booster pack contains 1 rare, 3 uncommons and 11 commons. - ->pack type: -> name: special or else common -> select: first -> item: special -> item: common - -If there are any special cards in the set, then "special or else common" will be a special card, otherwise it will be a common. - ->pack type: -> name: rare or mythic rare -> select: proportional -> item: -> name: rare -> weight: 2 -> item: -> name: mythic rare -> weight: 1 - -In Magic, individual "mythic rares" are twice as rare as normal rare cards. -Since there are also less mythic rares, this does not mean that each booster pack has a 33% percent chance of containing a mythic rare. -Instead the probability of a mythic rare is -@number_of_mythics / (number_of_rares * 2 + number_of_mythics)@. -So, for example if there are 20 rares in a set and only 5 mythic rares, then one in 9 "rare or mythic rare" cards will be a mythic rare. diff --git a/doc/type/regex.txt b/doc/type/regex.txt deleted file mode 100644 index f9d1ca81..00000000 --- a/doc/type/regex.txt +++ /dev/null @@ -1,10 +0,0 @@ -Primitive type: regular expression - -Regular expressions (regexes) are things that can match parts of [[type:string]]s. - -Regexes are represented by normal [[type:string]]s. -Note that to escape something in a regex the backslash is used, in script code this also needs to be escaped. -For example, in a script, the regex matching a single backslash is @"\\\\"@. - -For more information, see -[[http://www.wxwidgets.org/manuals/stable/wx_wxresyn.html|the wxWidgets regular expression documentation]]. diff --git a/doc/type/script.txt b/doc/type/script.txt deleted file mode 100644 index 171605a5..00000000 --- a/doc/type/script.txt +++ /dev/null @@ -1,19 +0,0 @@ -Data type: script - ---Overview-- - -A script object is a piece of code written in the [[script:index|MSE scripting language]]. - ---File syntax-- - -A script is given in the same way as a [[type:string]]. - ---Example-- -A simple [[type:field]] script that converts everything to upper case: ->script: to_upper(value) - -A larger script, changes @"y"@s to @"x"@s and @"a"@s to @"b"@s: ->script: -> new_value := replace(value, match: "x", replace: "y") -> new_value := replace(value, match: "a", replace: "b") -> new_value diff --git a/doc/type/scriptable.txt b/doc/type/scriptable.txt deleted file mode 100644 index b0f4e973..00000000 --- a/doc/type/scriptable.txt +++ /dev/null @@ -1,34 +0,0 @@ -Data type: scriptable - ---Overview-- - -Many [[type:style]] properties are ''scriptable''; their value can be changed by a script. - -Consider for example: ->left: 123 -This defines that the left coordinate of a field is 123 pixels. -To script this you can write: ->left: { if card.name == "" then 100 else 123 } -Now the left position depends on whether or not the name is empty. - ---File syntax-- -A 'scriptable something' can take three forms: -# It can be a regular 'something' - >something: 123 -# It can be a script that produces 'something', enclosed in curly braces: - >something: {100 + 23} -# It can be a script that produces 'something', indented and preceded by @script:@: - >something: - > script: 100 + 23 - -Note: To use a multiline script the following does not work: ->something: { 100 + -> 23 } -If the script has multiple lines, it must start on a new line, and be indented with a TAB: ->something: -> { 100 + -> 23 } -or ->something: -> script: 100 + -> 23 diff --git a/doc/type/set.txt b/doc/type/set.txt deleted file mode 100644 index bbf9e0f2..00000000 --- a/doc/type/set.txt +++ /dev/null @@ -1,64 +0,0 @@ -File type: Set - ---Overview-- - -Sets are part of the [[file:style triangle]]: -| Description Looks Data -| [[type:Game]] [[type:Stylesheet]] '''Set''' -| [[type:Field]] [[type:Style]] [[type:Value]] - ---Package format-- -A set is described in a [[file:package]] with the .mse-set file extension, -such a package contains a data file called set. - ---Properties-- -! Property Type Default Description -| '''Common to all packages''' <<< <<< <<< -| @mse version@ [[type:version]] ''required'' Version of MSE this set is made with. -| @short name@ [[type:string]] file name Name of this set. -| @depends on@ [[type:list]] of [[type:dependency]]s - Packages this package depends on. - -| '''Specific to sets''' <<< <<< <<< -| @game@ Name of a [[type:game]] ''required'' The game this set is made for. -| @stylesheet@ Name of a [[type:stylesheet]] ''required'' The default style for drawing cards in this set.
- This is without the game name or extension, so @"new"@ refers to the package @"gamename-new.mse-style"@. -| @set info@ [[type:indexmap]] of [[type:value]]s The data for the [[prop:game:set fields]] defined in the game. -| @styling@ [[type:map]] of [[type:indexmap]]s of [[type:value]]s - Data for the 'extra fields' of the stylesheet.
- This is first indexed by stylesheet name, then by field name.
- Data is given not only for the set's stylesheet but also for those of cards. -| @cards@ [[type:list] of [[type:card]]s The cards in the set. -| @keywords@ [[type:list] of [[type:keyword]]s The custom keywords in the set. -| @pack types@ [[type:list]] of [[type:pack type]]s DOC_MSE_VERSION: since 0.3.8 - The custom card pack types in the set. - ---Example-- - -If the game looks like: ->mse version: 0.3.4 ->name: my game ->set field: -> name: copyright -> type: text ->card field: -> name: card name -> type: text ->card field: -> name: power -> type: text -The the a set file would looks like: ->mse version: 0.3.4 ->game: my game ->name: my set ->set info: -> copyright: something ->extra set info: -> name of style: -> name of field: something ->card: -> card name: first card -> power: 100 ->card: -> card name: second card -> power: 50 diff --git a/doc/type/settings.txt b/doc/type/settings.txt deleted file mode 100644 index 87a7850b..00000000 --- a/doc/type/settings.txt +++ /dev/null @@ -1,13 +0,0 @@ -File type: Settings - ---Overview-- - -The MSE settings are stored in a separate file. - ---Location-- - -On Windows XP the settings are located in: -> "C:\Documents and Settings\Application Data\Magic Set Editor\mse8.config" - ---Properties-- -See the settings file for the properties. diff --git a/doc/type/statistics_category.txt b/doc/type/statistics_category.txt deleted file mode 100644 index 0e599bfd..00000000 --- a/doc/type/statistics_category.txt +++ /dev/null @@ -1,29 +0,0 @@ -Data type: statistics category - -DOC_MSE_VERSION: not used since 0.3.6 - ---Overview-- - -A category in the statistics panel. -This is a single choice in the list on the left of that panel. - -Statistics dimensions are automatically generated for all [[type:statistics dimension]]s a [[type:game]]. - ---Properties-- -! Property Type Default Description -| @name@ [[type:string]] ''required'' Name of this category. -| @description@ [[type:localized string]] @""@ A description of the category, currently not used. -| @position hint@ [[type:string]] @0@ Hint for ordering category, lower numbers are at the top of the list. -| @icon@ [[type:filename]] Filename of an icon for this category, the image should be 21x21 pixels. -| @type@ [[type:graph type]] @"bar"@ Type of graph to use. -| @dimensions@ [[type:list]] of names of [[type:statistics dimension]]s - Dimensions for the axes of the graph.
- The number of dimensions must be the same as that needed for the [[type:graph type]]. - ---Example-- -A graph with power on the horizontal axis, toughness on the vertical axis: ->statistics category: -> name: power/toughness -> type: scatter -> dimension: power -> dimension: toughness diff --git a/doc/type/statistics_dimension.txt b/doc/type/statistics_dimension.txt deleted file mode 100644 index 47ffa00a..00000000 --- a/doc/type/statistics_dimension.txt +++ /dev/null @@ -1,48 +0,0 @@ -Data type: statistics dimension - ---Overview-- - -A dimension or axis for the statistics panel. - -One or more dimensions are combined in a graph, these combinations are called [[type:statistics category]]s. - -Statistics dimensions are automatically generated for all card fields in a [[type:game]] that don't set @show statistics@ to @false@. - -Categories are also automatically generated from dimensions. - ---Properties-- -! Property Type Default Description -| @name@ [[type:string]] ''required'' Name of this dimension, used as an axis label and a label for automatically generated categories. -| @description@ [[type:localized string]] @""@ A description of the dimension, currently not used. -| @position hint@ [[type:string]] @0@ Hint for ordering dimensions. -| @icon@ [[type:filename]] Filename of an icon for this dimension. -| @script@ [[type:script]] ''required'' Script that generates a value for each card in the set. -| @numeric@ [[type:boolean]] @false@ Is the value always a number? -| @bin size@ [[type:double]] ''none'' For numeric dimensions: group numbers together into bins this large.
- For example with @bin size: 5@, values @1@ and @3@ both get put under @"1-5"@. -| @show empty@ [[type:boolean]] @false@ Should cards with the value @""@ be included? -| @split list@ [[type:boolean]] @false@ Indicates the value is a list of the form @"item1, item2"@. The card is put under both items. -| @colors@ [[type:map]] of opaque [[type:color]]s Colors to use for specific values -| @groups@ [[type:list]] of [[type:string]]s Values to always show, and the order to show them in. - ---Example-- -Automatically generated statistics dimensions look like this: ->statistics dimension: -> name: power -> script: card.power - -Specify a specific order and color of values, otherwise they are ordered alphabeticaly and groups with no cards are not shown: ->statistics dimension: -> name: color -> script: card.color -> group: white -> group: blue -> group: black -> group: red -> group: green -> colors: -> white: rgb(255,255,255) -> blue: rgb(0,0,255) -> black: rgb(0,0,0) -> red: rgb(255,0,0) -> green: rgb(0,255,0) diff --git a/doc/type/string.txt b/doc/type/string.txt deleted file mode 100644 index 52bce929..00000000 --- a/doc/type/string.txt +++ /dev/null @@ -1,41 +0,0 @@ -Primitive type: character string - -A string is just a piece of text. - ---File syntax-- -In files, strings are written just as their value: -> string: this is some string -The whitespace at the beginning is removed by the program. -Multiline strings are written on a new line, indented by a TAB: -> string: -> This is a very long string -> It contains a line break. - ---Script syntax-- -In scripts, strings are written between double quotes, @"this is a string"@. -The backslash character is used to escape values: -! Code Represents -| @\"@ A " character -| @\{@ A { character -| @\n@ A newline character (line break) -| @\\@ A backslash -| @\<@ An escaped < for [[type:tagged string]]s. - -Sections between curly braces are interpreted as script code, that is concatentated with the string, for example -> "ab{1 + 1}c" == "ab2c" -This can be nested arbitrarily. - -The @+@ operator concatenates strings. Numbers and most other values are automatically converted to strings when needed. This conversion can be forced with the [[fun:to_string]] function. - -Using the @[]@ or @.@ operator characters in a string can be selected. 0 is the first character: -> "xyz"[0] == "x" -> "xyz".0 == "x" # same thing -> "xyz".1 == "y" -> "xyz".2 == "z" -It is an error to select characters outside the string -> "xyz".10 # error - ---See also-- -| [[type:tagged string]] A string containg tags. -| [[fun:to_string]] Convert any value to a [[type:string]] - diff --git a/doc/type/style.txt b/doc/type/style.txt deleted file mode 100644 index 0907c6e4..00000000 --- a/doc/type/style.txt +++ /dev/null @@ -1,168 +0,0 @@ -Data type: style - ---Overview-- - -A style specifies how a [[type:field]] should look, -things like position, size, fonts, colors, etc. - -Styles are part of the [[file:style triangle]]: -| Description Looks Data -| [[type:Game]] [[type:Stylesheet]] [[type:Set]] -| [[type:Field]] '''Style''' [[type:Value]] - ---Positioning-- - - -A style specifies the position of a box for the content. -To specify the horizontal location ''two'' of @left@, @width@ and @right@ must be specified. - -For example: -> left: 10 -> width: 20 -Implies that @right@ is 30 pixels. - -Similarly: -> left: 10 -> right: 30 -Implies the @width@ is 20. - -The same holds for the vertical location and size; @top@, @height@ and @bottom@. - ---Rotation-- -Rotating a box can be done with the @angle@ property. -The angle gives a counter clockwise rotation in degrees of the box. -The box is rotated such that the corner for which the position is specified is at the correct position after rotating. - -Here are some examples: - -| - >red box: - > width: 30 - > height: 25 - > left: 10 - > top: 20 - > angle: 30 - - >green box: - > width: 25 - > height: 30 - > left: 10 - > top: 80 - > angle: 90 - - >blue box: - > width: 30 - > height: 25 - > right: 90 - > bottom: 30 - > angle: 30 - - >yellow box: - > width: 20 - > height: 35 - > right: 60 - > bottom: 60 - > angle: 180 - - ---Properties-- -! Property Type Default Description -| @z index@ [[type:int]] @0@ Stacking of this box, fields with a higher @z index@ are placed on top of those with a lower index. -| @tab index@ [[type:int]] @0@ Index for moving through the fields with the tab key, fields with a lower tab index come first. Otherwise the order is from top to bottom and then left to right. -| @left@ [[type:scriptable]] [[type:double]] ''Required'' Distance between left edge of the box and the left of the card in pixels. -| @width@ [[type:scriptable]] [[type:double]] ''Required'' Width of the box in pixels. -| @right@ [[type:scriptable]] [[type:double]] ''Required'' Distance between right edge of the box and the ''left'' of the card in pixels. -| @top@ [[type:scriptable]] [[type:double]] ''Required'' Distance between top edge of the box and the top of the card in pixels. -| @height@ [[type:scriptable]] [[type:double]] ''Required'' Height of the box in pixels. -| @bottom@ [[type:scriptable]] [[type:double]] ''Required'' Distance between bottom edge of the box and the ''top'' of the card in pixels. -| @angle@ [[type:scriptable]] [[type:int]] @0@ Rotation of this box, in degrees counter clockwise. -| @visible@ [[type:scriptable]] [[type:boolean]] @true@ Is this field visible at all? -| @mask@ [[type:image|scriptable image]] ''none'' A mask to apply to the box, black areas in the mask become transparent, similar to [[fun:set_mask]]. - -The rest of the properties depend on the type of [[type:field]] this style is for. -! Type Property Type Default Description -| @"text"@ @font@ [[type:font]] ''Required'' Font to render the text. -| ^^^ @symbol font@ [[type:symbol font]] Font to render symbols in the text (optional). -| ^^^ @always symbol@ [[type:boolean]] @false@ Should all text be rendered with symbols?
- Text that is not supported by the symbol font is still rendered as normal text. -| ^^^ @allow formating@ [[type:boolean]] @true@ Is custom formating (bold, italic) allowed? -| ^^^ @alignment@ [[type:scriptable]] [[type:alignment]] @top left@ Alignment of the text. -| ^^^ @direction@ [[type:direction]] @"left to right"@ Direction in which the text flows. If set to @"vertical"@ it is as if a line break is inserted after each character. -| ^^^ @padding left@ [[type:scriptable]] [[type:double]] @0@ Padding between the text and the border of the box, in pixels. -| ^^^ @padding right@ ^^^ ^^^ ^^^ -| ^^^ @padding top@ ^^^ ^^^ ^^^ -| ^^^ @padding bottom@ ^^^ ^^^ ^^^ -| ^^^ @padding left min@ [[type:scriptable]] [[type:double]] ∞ Minimal padding around the field.
When the text is scaled down the padding is scaled as well, but it becomes no smaller than this. -| ^^^ @padding right min@ ^^^ ^^^ ^^^ -| ^^^ @padding top min@ ^^^ ^^^ ^^^ -| ^^^ @padding bottom min@ ^^^ ^^^ ^^^ -| ^^^ @line height soft@ [[type:scriptable]] [[type:double]] @1@ Multiplier for the line height of 'soft' line breaks. These are breaks caused by wrapping around lines that are too long.
- A line height of @0@ means all lines are in the same position, @1@ is normal behaviour, @2@ skips a line, etc. -| ^^^ @line height hard@ [[type:scriptable]] [[type:double]] @1@ Multiplier for the line height of 'hard' line breaks. These are breaks caused by the enter key. -| ^^^ @line height line@ [[type:scriptable]] [[type:double]] @1@ Multiplier for the line height of 'soft' line breaks. These are breaks caused by @"\n"@ tags. -| ^^^ @line height soft max@ [[type:scriptable]] [[type:double]] ''disabled'' When there is still vertical room in the text box, increase the line heights to at most these values to spread the text more evenly. -| ^^^ @line height hard max@ ^^^ ^^^ ^^^ -| ^^^ @line height line max@ ^^^ ^^^ ^^^ -| ^^^ @paragraph height@ [[type:double]] ''flexible'' The height of paragraphs. If specified, each paragraph is given this much space, and aligned inside that space as specified by @alignment@.
- A paragraph break is any line break that is not soft (i.e. caused by word wrap or a @@ break). -| ^^^ @mask@ [[type:image|scriptable image]] ''none'' A mask that indicates where in the box text can be placed.
- Text is never put in black areas of the box:
-
- The same mask image is also used to determine the size and shape of the box. - To include a certain pixel in the size/shape but not allow text to be placed there, it can be made dark gray (a value less than 128). -| ^^^ @layout@ [[type:text layout]] ''automatic'' When read from a script, gives information on the layout of text in this box. -| ^^^ @content width@ [[type:double]] ''automatic'' When read from a script, gives the width of the current content in this box. Equivalent to @layout.width@ -| ^^^ @content height@ [[type:double]] ''automatic'' When read from a script, gives the height of the current content in this box. Equivalent to @layout.height@ -| ^^^ @content lines@ [[type:int]] ''automatic'' When read from a script, gives the number of lines of the current content in this box. Equivalent to @length(layout.lines)@ - -! <<< <<< <<< <<< -| @"choice"@,
@"multiple choice"@,
@"boolean"@ - @popup style@ @"drop down"@ or @"in place"@ @"drop down"@ Where to place the drop down box for editing the value.
- @"drop down"@ places the box below the field, similar to normal combo boxes.
- @"in place"@ places the box at the mouse coordinates. -| ^^^ @render style@ [[type:choice render style]] @"text"@ How should the field be rendered? -| ^^^ @combine@ [[type:combine]] @"normal"@ How to combine the image with the background? Can be overridden using the [[fun:set_combine]] function. -| ^^^ @alignment@ [[type:alignment]] @"stretch"@ Alignment of text and images in the box. -| ^^^ @font@ [[type:font]] Font to use for rendering text (depending on @render style@) -| ^^^ @image@ [[type:image|scriptable image]] Image to show (depending on @render style@).
- The script will be called with @input@ set to the value to determine an image for. -| ^^^ @choice images@ [[type:map]] of [[type:image]]s An alternative way to specify what image to show.
- For each [[type:choice]] a separate image is specified. -| ^^^ @content width@ [[type:double]] ''automatic'' When read from a script, gives the width of the current choice image in this box.
- This is only useful when the alignment is changed, otherwise it is always equal the box size itself. -| ^^^ @content height@ [[type:double]] ''automatic'' When read from a script, gives the height of the current choice image in this box. -| @"multiple choice"@ - @direction@ [[type:scriptable]] [[type:direction]] @"left to right"@ Direction the items are laid out in, only when @render style@ is @list@. -| ^^^ @spacing@ [[type:scriptable]] [[type:double]] @0@ Spacing between the items. - -! <<< <<< <<< <<< -| @"package choice"@ -| ^^^ @font@ [[type:font]] Font to use for rendering text. - -! <<< <<< <<< <<< -| @"color"@ @radius@ [[type:double]] @0@ Radius of rounded corners for the box in pixels. -| ^^^ @left width@ [[type:double]] ∞ Draw only this many pixels from the side, creating a box with a hole in it, or a card border. -| ^^^ @right width@ ^^^ ^^^ ^^^ -| ^^^ @top width@ ^^^ ^^^ ^^^ -| ^^^ @bottom width@ ^^^ ^^^ ^^^ -| ^^^ @combine@ [[type:combine]] @"normal"@ How to combine the color with the background? Only applies when a mask is used. - -! <<< <<< <<< <<< -| @"image"@ @default@ [[type:image|scriptable image]] ''none'' A default image to use when the card has none. - -! <<< <<< <<< <<< -| @"symbol"@ @variations@ [[type:list]] of [[type:symbol variation]]s Available variations of the symbol, a variation describes color and border size. -| ^^^ @min aspect ratio@ [[type:double]] @1@ Bounds for the aspect ratio, @width/height@ symbols can take. This can be used to make non-square symbols. -| ^^^ @max aspect ratio@ [[type:double]] @1@ ^^^ - -! <<< <<< <<< <<< -| @"info"@ @font@ [[type:font]] ''Required'' Font to render the text. -| ^^^ @alignment@ [[type:scriptable]] [[type:alignment]] @top left@ Alignment of the text. -| ^^^ @padding left@ [[type:double]] @0@ Padding between the text and the border of the box, in pixels. -| ^^^ @padding right@ ^^^ ^^^ ^^^ -| ^^^ @padding top@ ^^^ ^^^ ^^^ -| ^^^ @padding bottom@ ^^^ ^^^ ^^^ -| ^^^ @background color@ opaque [[type:color]] @rgb(255,255,255)@ Background color for the box, can be used to make it stand out. - ---Example-- - diff --git a/doc/type/stylesheet.txt b/doc/type/stylesheet.txt deleted file mode 100644 index 07c3f614..00000000 --- a/doc/type/stylesheet.txt +++ /dev/null @@ -1,42 +0,0 @@ -File type: Stylesheet - ---Overview-- - -Stylesheets are part of the [[file:style triangle]]: -| Description Looks Data -| [[type:Game]] '''Stylesheet''' [[type:Set]] -| [[type:Field]] [[type:Style]] [[type:Value]] - -Stylesheets provide the ''look and feel'' of cards. - ---Package format-- -A stylesheet is described in a [[file:package]] with the .mse-style file extension, -such a package contains a data file called style. - ---Properties-- -! Property Type Default Description -| '''Common to all packages''' <<< <<< <<< -| @mse version@ [[type:version]] ''required'' Version of MSE this stylesheet is made for. -| @short name@ [[type:string]] file name A short name of this stylesheet, for the 'new set' and style panel lists. -| @full name@ [[type:string]] file name A longer name of this stylesheet. -| @icon@ [[type:filename]] ''none'' Filename of an icon / preview for this stylesheet, for the 'new set' and style panel lists. -| @position hint@ [[type:int]] ∞ Where to place this item in the list? Lower numbers come first. -| @version@ [[type:version]] @0.0.0@ Version number of this package. -| @depends on@ [[type:list]] of [[type:dependency]]s - Packages this package depends on. - -| '''Specific to stylesheets''' <<< <<< <<< -| @game@ Name of a [[type:game]] ''required'' Game this stylesheet is made for -| @card width@ [[type:double]] 100 Width of cards in pixels -| @card height@ [[type:double]] 100 Height of cards in pixels -| @card dpi@ [[type:double]] 96 Resolution of cards in dots-per-inch -| @card background@ [[type:color]] white Background color of cards -| @init script@ [[type:script]] @;@ Script to run when this stylesheet is loaded, after the game's init script. -| @styling fields@ [[type:list]] of [[type:field]]s Fields for styling options, shown on the 'style' panel. -| @styling style@ [[type:indexmap]] of [[type:style]]s Styles for the styling fields. -| @set info style@ [[type:indexmap]] of [[type:style]]s game.default_set_style Styling for the 'set info' panel -| @card style@ [[type:indexmap]] of [[type:style]]s Styles for the card fields defined in the game -| @extra card fields@ [[type:list]] of [[type:field]]s Additional fields to add to each card.
- These fields are intended for things like lines and boxes, whose value is determined automatically. -| @extra card style@ [[type:indexmap] of [[type:style]]s Styling for the extra card fields - diff --git a/doc/type/symbol.txt b/doc/type/symbol.txt deleted file mode 100644 index 34db1acd..00000000 --- a/doc/type/symbol.txt +++ /dev/null @@ -1,20 +0,0 @@ -File type: Symbol - ---Overview-- - -A symbol file contains a symbol created with the symbol editor. - -Symbols are not stored in packages, the data file is directly written to a @".mse-symbol"@ file. - ---Coordinates-- - -Various parts of a symbol use [[type:vector2d|coordinates]]. -These are pairs of numbers in the range @0@ to @1@. @(0,0)@ is the top-left of the symbol, @(1,1)@ the bottom-right. - ---Properties-- -! Property Type Default Description -| @mse version@ [[type:version]] ''required'' Version of MSE this symbol is made with. -| @parts@ [[type:list]] of [[type:symbol part]]s The parts in this symbol. - ---Example-- -Look at a file made with the program. diff --git a/doc/type/symbol_combine.txt b/doc/type/symbol_combine.txt deleted file mode 100644 index 8aa2b972..00000000 --- a/doc/type/symbol_combine.txt +++ /dev/null @@ -1,19 +0,0 @@ -Enumeration: symbol combine - -Specifies how symbol shapes are combined with those below it - ---Script syntax-- -In scripts, symbol combine modes are passed around as a string. - ---Possible values-- -The value is one of the following options: -! Value Description -| @overlap@ Place this shape on top of those below it.
Further combine options only apply to this shape. -| @merge@ Marge this shape with the one below it, they are considered a single shape for further combining. -| @subtract@ Subtract this shape from the one below it. -| @intersection@ Take the intersection of this shape and the one below it, only areas that are in both shapes remain. -| @difference@ Take the difference of this shape and the one below it, only areas that are in exactly one of the shapes remain. -| @border@ Use this shape as additional border for the shape below it. - ---Examples-- -> combine: overlap diff --git a/doc/type/symbol_font.txt b/doc/type/symbol_font.txt deleted file mode 100644 index c4b44396..00000000 --- a/doc/type/symbol_font.txt +++ /dev/null @@ -1,55 +0,0 @@ -File type: Symbol font - ---Overview-- - -A symbol font is a font for drawing with images. -Each [[type:symbol font symbol|symbol-font-symbol]] in the font is an image. - -A symbol font is referenced in [[type:stylesheet]]s using a [[type:symbol font reference]]. - ---Splitting-- - -A piece of text drawn with the symbol font is split into separate symbols. -The list of symbols in the font is scanned from top to bottom to find matches. - -If the text is for instance "W/GR" and "W/G" should be rendered as a single symbol, then it should appear before the symbol "W". -Otherwise the "W" is seen as a symbol and the program continues with rendering "/GR". - ---Font size-- - -A symbol font is drawn using a specific point size, similar to normal fonts. -Usually the images that make up the font are given in a very high resolution, for example 200x200. -This resolution could correspond to a point size of for instance 150pt. - -When the symbol is drawn at for instance 12pt the image well then be scaled down to @200/150*12 == 16@ pixels. - -Sizes like margin, padding and font size are given in 'pixels per point'. If for instance -> text margin left: 0.1 -is specified, and the symbol is rendered at 12pt, the margin will be @12*0.1 == 1.2@ pixels. - ---Package format-- - -A symbol font is described in a [[file:package]] with the .mse-symbol-font file extension. -Such a package contains a [[file:format|data file]] called symbol-font that has the following properties. - ---Properties-- -! Property Type Default Description -| '''Common to all packages''' <<< <<< <<< -| @mse version@ [[type:version]] ''required'' Version of MSE this symbol font is made for. -| @short name@ [[type:string]] file name A short name of this symbol font, currently not used by the program. -| @full name@ [[type:string]] file name A longer name of this symbol font, currently not used by the program. -| @icon@ [[type:filename]] ''none'' Filename of an icon, currently not used by the program. -| @version@ [[type:version]] @0.0.0@ Version number of this package. -| @depends on@ [[type:list]] of [[type:dependency]]s - Packages this package depends on. - -| '''Specific to symbol fonts''' <<< <<< <<< -| @image font size@ [[type:double]] @12@ To what point size do the images correspond? -| @horizontal space@ [[type:double]] @0@ Horizontal spacing between symbols, in pixels. -| @vertical space@ [[type:double]] @0@ Vertical spacing between symbols, in pixels. -| @symbols@ [[type:list]] of [[type:symbol font symbol]]s Symbols that make up this font. -| @scale text@ [[type:boolean]] @false@ Should text be scaled down to fit in a symbol? -| @insert symbol menu@ [[type:insert symbol menu|"insert symbol" menu]] ''none'' A description of the menu to insert a symbol into the text. - ---Examples-- -See for instance the @"magic-mana-small.mse-symbol-font"@ package in the MSE distribution. diff --git a/doc/type/symbol_font_reference.txt b/doc/type/symbol_font_reference.txt deleted file mode 100644 index f9f4efd7..00000000 --- a/doc/type/symbol_font_reference.txt +++ /dev/null @@ -1,26 +0,0 @@ -Data type: symbol font reference - ---Overview-- - -A reference to a [[type:symbol font]]. - -In [[type:stylesheet]]s the symbol fonts are not included inline, instead they are referenced by their package name. - ---Properties-- -! Property Type Default Description -| @name@ [[type:scriptable]] Name of a [[type:symbol font]] - ''required'' Name of the symbol font package to use (without the extension). -| @size@ [[type:scriptable]] [[type:double]] 12 Size in points to render the symbols with. -| @scale down to@ [[type:double]] 1 Minimum size in points to scale the size down to. -| @alignment@ [[type:scriptable]] [[type:alignment]] @"middle center"@ Alignment of symbols in a line of text. - ---Example-- ->symbol font: -> name: magic-mana-small -> size: 10 -> alignment: top left -The name can be scripted: ->symbol font: -> name: { if set.use_larga_mana_symbols then "magic-mana-large" else "magic-mana-small" } -> size: 10 -> alignment: top left diff --git a/doc/type/symbol_font_symbol.txt b/doc/type/symbol_font_symbol.txt deleted file mode 100644 index 275d58f3..00000000 --- a/doc/type/symbol_font_symbol.txt +++ /dev/null @@ -1,41 +0,0 @@ -Data type: symbol font symbol - ---Overview-- - -A single symbol in a [[type:symbol font]]. - ---Properties-- -! Property Type Default Description -| @image font size@ [[type:double]] value from symbol font To what point size does the images correspond? -| @code@ [[type:string]] or [[type:regex]] ''required'' Text this symbol matches. -| @regex@ [[type:boolean]] @false@ Is the code a regular expression (as opposed to a string)? -| @image@ [[type:scriptable]] [[type:image]] ''required'' Image of this symbol. -| @enabled@ [[type:scriptable]] [[type:boolean]] @true@ Is this symbol actually used?
- This can be scripted to optionally disable certain symbols.
- If multiple symbols with the same code are given disabling the first switches to the second one. -| @draw text@ [[type:int]] @-1@ The index of the captured regex expression to draw as text, or -1 to not draw text.
For example with the code @"x([a-z])"@ and @draw text: 1@ the text of the symbol @"xb"@ will be @"b"@. -| @text font@ [[type:font]] Font to use for drawing text on symbols. The font size is in font points per text box font point. -| @text alignment@ [[type:alignment]] @"middle center"@ How should text be aligned on the symbol? -| @text margin left@ [[type:double]] @0@ Margin on the left of the text in pixels per point. -| @text margin right@ [[type:double]] @0@ Margin on the right of the text in pixels per point. -| @text margin top@ [[type:double]] @0@ Margin on the top of the text in pixels per point. -| @text margin bottom@ [[type:double]] @0@ Margin on the bottom of the text in pixels per point. - - ---Examples-- -A symbol with text: ->symbol: -> image: blank.png -> code: . -> regex: true -> text font: Arial - -Two symbols for the same code, which one is used depends on a function from the [[type:stylesheet]]. -It is recommended to only use functions in @enabled@, so each stylesheet can determine how the font should be used. ->symbol: -> code: T -> image: mana_t_old.png -> enabled: { use_old_tap_symbol() } ->symbol: -> code: T -> image: mana_t.png diff --git a/doc/type/symbol_part.txt b/doc/type/symbol_part.txt deleted file mode 100644 index 9351b420..00000000 --- a/doc/type/symbol_part.txt +++ /dev/null @@ -1,29 +0,0 @@ -Data type: symbol part - ---Overview-- - -A part of a symbol, corresponds to an item you see in the list on the left of the editor. - ---Properties-- -! Property Type Default Description -| @type@ One of: @"shape"@ What type of symbol part is this? - * @shape@ - * @group@ - * @symmetry@ -| @name@ [[type:string]] @""@ The name of this part, for the part list. - -The rest of the properties depends on the @type@. - -! Type Property Type Default Description -| @"shape"@ @combine@ [[type:symbol combine]] @"overlap"@ How to combine the shape with those below it? -| ^^^ @points@ [[type:list]] of [[type:control point]]s The points that form this shape -| @"symmetry"@ @kind@ @rotation@ or @reflection@ @"rotation"@ What kind of symmetry is this? -| ^^^ @copies@ [[type:int]] 2 How many times is the original copied (including the original itself)? -| ^^^ @center@ [[type:vector2d]] Coordinates of the center of symmetry. -| ^^^ @handle@ [[type:vector2d]] Direction perpendicular to the 'mirror' (this is a direction, so relative to the center). -| @"group"@ and @"symmetry"@ - @parts@ [[type:list]] of [[type:symbol part]]s Parts in this group. - - ---Example-- -Look at a symbol file made with the program. diff --git a/doc/type/symbol_variation.txt b/doc/type/symbol_variation.txt deleted file mode 100644 index cc237af6..00000000 --- a/doc/type/symbol_variation.txt +++ /dev/null @@ -1,46 +0,0 @@ -Data type: symbol variation - ---Overview-- - -A variation of a symbol, describes color and border. - ---Properties-- -! Property Type Default Description -| @name@ [[type:string]] ''Required'' Name of this variation, refered to by the [[fun:symbol_variation]] function. -| @border radius@ [[type:double]] @0.05@ Border radius of the symbol. -| @fill type@ @solid@ or @linear gradient@ or @radial gradient@ - @"solid"@ How to fill the symbol. - -Depending on the @fill type@ there are additional properties: -! Fill type Property Type Description -| @"solid"@ @fill color@ [[type:color]] Color to use for filling the symbol. -| ^^^ @border color@ [[type:color]] Color to use for the border of the symbol. -| @"linear gradient"@ @fill color 1@ [[type:color]] Color to use for filling the symbol at the center of the gradient. -| ^^^ @border color 1@ [[type:color]] Color to use for the border of the symbol at the center of the gradient. -| ^^^ @fill color 2@ [[type:color]] Color to use for filling the symbol at the ends of the gradient. -| ^^^ @border color 2@ [[type:color]] Color to use for the border of the symbol at the ends of the gradient. -| ^^^ @center x@, @center y@ [[type:double]] Position of the center point of the gradient (in the range 0 to 1) -| ^^^ @end x@, @end y@ [[type:double]] Position of the end point of the gradient (in the range 0 to 1) -| @"radial gradient"@ @fill color 1@ [[type:color]] Color to use for filling the symbol at the center of the symbol. -| ^^^ @border color 1@ [[type:color]] Color to use for the border of the symbol at the center of the symbol. -| ^^^ @fill color 2@ [[type:color]] Color to use for filling the symbol at the edges of the symbol. -| ^^^ @border color 2@ [[type:color]] Color to use for the border of the symbol at the edges of the symbol. - ---Examples-- -'Common' and 'uncommon' magic expansion symbol styles: ->variation: -> name: common -> border radius: 0.10 -> # White border, black fill -> fill type: solid -> fill color: rgb(0,0,0) -> border color: rgb(255,255,255) ->variation: -> name: uncommon -> border radius: 0.05 -> fill type: linear gradient -> # Black border, silver gradient fill -> fill color 1: rgb(224,224,224) -> fill color 2: rgb(84, 84, 84) -> border color 1: rgb(0, 0, 0) -> border color 2: rgb(0, 0, 0) diff --git a/doc/type/tagged_string.txt b/doc/type/tagged_string.txt deleted file mode 100644 index 30d88752..00000000 --- a/doc/type/tagged_string.txt +++ /dev/null @@ -1,61 +0,0 @@ -Data type: string with tags - ---Syntax-- -Strings in [[type:value|text values]] can contain markup tags. -These tags affect the presentation and sometimes the behaviour of the text. - -A tag is something like @"some text"@, similar to HTML. -Tags are closed by the same tag with a @/@ before it. - -To represent the character @"<"@ in a tagged string use @"\<"@ in script code. -This is written as the character with code 1 in files. - ---Basic markup-- -! Tag Description -| @@ The text inside the tag is bold. -| @@ The text inside the tag is italic. -| @@ The text inside the tag is rendered as symbols, if a [[prop:style:symbol font]] is set for the text box. -| @@ The text inside the tag is rendered with the given [[type:color]]. -| @@ The text inside the tag is rendered with the given font size in points, for example @"text"@ makes the text 12 points. The text is scaled down proportionally when it does not fit in a text box and the @scale down to@ attribute allows it. -| @@ The text inside the tag is rendered with the given font family. -| @@ The block inside the tag is aligned with the given horizontal [[type:alignment]] -| @@ The block inside the tag has additional left, right (optional), and top (optional) margins of the specified size in pixels. -| @
  • @ The text inside the tag is treated as a list marker, meaning that if the line wraps it will be indented to match the content of the @
  • @ tag. -| @@ Line breaks inside this tag use the [[prop:style:line height line]], and they show a horizontal line. -| @@ Line breaks inside this tag use the [[prop:style:soft line height]]. -| @@ An atomic piece of text. The cursor can never be inside it; it is selected as a whole. - The program automatically inserts @@. -| @@ The text inside the tag is rendered in a monospace font. This is used for syntax highlighting script code. -| @@ The text inside the tag is highlighted as a keyword in source code. -| @@ The text inside the tag is highlighted as a string in source code. - ---Other tags-- -! Tag Description -| @@ Indicates that the text inside it is a keyword. This tag is automatically inserted by - The [[fun:expand_keywords]] function.
    - There are four versions, indicating whether or not reminder text is shown: - * @@, Reminder text hidden, by default - * @@, Reminder text shown, by default - * @@, Reminder hidden manually - * @@, Reminder shown manually -| @@ A separator between fields. This tag is automatically inserted by the [[fun:combined_editor]] function.
    - Inserting this tag manually will confuse that function!
    - This tag can never be selected, and its contents can not be edited. -| @@ At the beginning of a string, indicates a part that can not be selected. This tag is automatically inserted by the [[fun:combined_editor]] function. -| @@ At the end of a string, indicates a part that can not be selected. This tag is automatically inserted by the [[fun:combined_editor]] function. -| @@ Like @@, only hidden. This is inserted by [[fun:combined_editor]] -| @@ Text who's width is ignored for alignment, similar to @@, but not a separator. -| @@ Indicate that the text inside the tag should be selected from a [[type:word list]]. - The ??? must be the name of a word list in the game. -| @@ The text inside the tag is an error, and is shown with a red wavy underline. -| @@ A spelling error, marked by the [[fun::check_spelling]] function. - The ??? part indicates the language used for spelling checking. -| any other tag Other tags are ignored. - - ---Related functions-- -The following script functions deal with tags: -| [[fun:tag_contents]] Change the contents of a specific tag. -| [[fun:remove_tag]] Remove a tag, keep the contents. -| [[fun:remove_tags]] Remove all tags from tagged text. -| [[fun:to_text]] Remove all tags from tagged text, and convert it to a [[type:string]]. diff --git a/doc/type/text_layout.txt b/doc/type/text_layout.txt deleted file mode 100644 index 7853b980..00000000 --- a/doc/type/text_layout.txt +++ /dev/null @@ -1,28 +0,0 @@ -Data type: text layout info - -DOC_MSE_VERSION: since 2.0.2 - -This type contains information on rendered text. - -The text is devided into 'lines', 'paragraphs' and 'blocks. -A line is a line on the screen. -A paragraph is one or more lines, ending in an explicit line break, a "\n" in the text. -A block is one or more paragraphs, ending in a line, "\n". - -It is possible to dig deeper into blocks, for example - -> card_style.text.layout.blocks[1].lines[0].middle - -Is the middle of the first line of the second block. - ---Properties-- -! Property Type Description -| @width@ [[type:double]] Width of this line or group of lines in pixels. -| @height@ [[type:double]] Height of this line or group of lines in pixels. -| @top@ [[type:double]] Top y coordinate -| @middle@ [[type:double]] Middle y coordinate -| @bottom@ [[type:double]] Bottom y coordinate -| @lines@ [[type:list]] of [[type:text layout]]s The lines in this part of the text. -| @paragraphs@ [[type:list]] of [[type:text layout]]s The paragraphs in this part of the text. -| @blocks@ [[type:list]] of [[type:text layout]]s The blocks in this part of the text. -| @separators@ [[type:list]] of [[type:double]]s The y coordinates of separators between blocks. diff --git a/doc/type/value.txt b/doc/type/value.txt deleted file mode 100644 index 508756b1..00000000 --- a/doc/type/value.txt +++ /dev/null @@ -1,37 +0,0 @@ -Data type: Field value - ---Overview-- - -A value is something that is 'stored in' a [[type:field]]. - -Values are part of the [[file:style triangle]]: -| Description Looks Data -| [[type:Game]] [[type:Stylesheet]] [[type:Set]] -| [[type:Field]] [[type:Style]] '''Value''' - ---Possible types-- - -The type of a value depends on the corresponding field: -! Field type Value data type Description -| @"text"@ [[type:tagged string]] A piece of text, possibly with markup. -| @"choice"@ [[type:string]] One of the choices of the field. -| @"multiple choice"@ [[type:string]] A list of choices from the field, separated by commas.
    - For example: @"red, green, blue"@. -| @"package choice"@ Name of a package The (file)name of a package, including the extension. -| @"boolean"@ @"yes"@ or @"no"@ This can be directly used as a [[type:boolean]] value in scripts. -| @"image"@ [[type:filename]] Filename of an image file in the [[type:set]] package. -| @"symbol"@ [[type:filename]] Filename of a [[type:symbol]] file in the [[type:set]] package.
    - When accessed from a script, image fields can be directly used as [[type:image]]s. -| @"color"@ opaque [[type:color]] A color. -| @"info"@ [[type:string]] A label for the information box. - ---Example-- -For the field: ->field: -> type: choice -> name: card color -> choice: red -> choice: green -> choice: blue -A value could be: ->card color: red diff --git a/doc/type/vector2d.txt b/doc/type/vector2d.txt deleted file mode 100644 index a4f38183..00000000 --- a/doc/type/vector2d.txt +++ /dev/null @@ -1,15 +0,0 @@ -Data type: two dimensional vector - -A coordinate or direction in a symbol. -This is a pair of [[type:double]]s. - -The coordinates are usually in the range @0@ to @1@. -@(0,0)@ is the top-left of the symbol, @(1,1)@ the bottom-right. - ---File syntax-- -> (x-coordinate,y-coordinate) -For example -> (0.5,0.5) - ---Script syntax-- -Vectors can not be represented in script syntax. diff --git a/doc/type/version.txt b/doc/type/version.txt deleted file mode 100644 index 2cbc8199..00000000 --- a/doc/type/version.txt +++ /dev/null @@ -1,11 +0,0 @@ -Primitive type: version number - ---File syntax-- -A version number consists of three components, in the form "a.b.c". -Higher numbers mean newer versions. - -The version number can also be a date, of the form "YYYY-MM-DD" - ---Examples-- -> version: 1.2.3 -> version: 2007-07-12 diff --git a/doc/type/word_list.txt b/doc/type/word_list.txt deleted file mode 100644 index 861b78b2..00000000 --- a/doc/type/word_list.txt +++ /dev/null @@ -1,18 +0,0 @@ -Data type: word list - -A list of words. Used for drop down lists in the text editor, for example for card types. - ---Properties-- -! Property Type Default Description -| @name@ [[type:string]] ''Required'' Name of this word list, refered to using a @""@ tag. -| @words@ [[type:list]] of [[type:word list word]]s ''Required'' The words in the list - ---Example-- ->word list: -> name: type -> word: Creature -> word: Spell -> word: Artifact -This can be used with for example: -> @"Creature"@ -Which gives the creature choice, and that can be changed with a drop down list. diff --git a/doc/type/word_list_word.txt b/doc/type/word_list_word.txt deleted file mode 100644 index ef5166da..00000000 --- a/doc/type/word_list_word.txt +++ /dev/null @@ -1,34 +0,0 @@ -Data type: word list word - -A word in a [[type:word list]]. - ---Properties-- -! Property Type Default Description -| @name@ [[type:string]] ''Required'' The word. -| @line below@ [[type:boolean]] @false@ Display a line below this item in the list? -| @is prefix@ [[type:boolean]] @false@ Should this word be used as a prefix before another word from the list?
    - Think "Legendary ". Note the space after it, words are directly concatenated. -| @words@ [[type:list]] of [[type:word list word]]s A submenu. If given, the @name@ of this word is only used as a label for the menu. -| @script@ [[type:script]] ''Optional'' A script that determines zero or more words.
    - The result should be a list of comma separated words, for example @"x,y,z"@ specifies three words. - The words are included in the parent menu, not a sub menu. - -A word can also be given in a short form, in that case only the name is specified. - ---Example-- -In short form: ->word: xyz -Is the same as: ->word: -> name: xyz - -Using a script, ->word: -> script: "red,green,blue" -> line below: true -Is the same as ->word: blue ->word: green ->word: -> name: red -> line below: true diff --git a/doc/type/choice-render-style-both.png b/docs/type/choice-render-style-both.png similarity index 100% rename from doc/type/choice-render-style-both.png rename to docs/type/choice-render-style-both.png diff --git a/doc/type/choice-render-style-checklist-both.png b/docs/type/choice-render-style-checklist-both.png similarity index 100% rename from doc/type/choice-render-style-checklist-both.png rename to docs/type/choice-render-style-checklist-both.png diff --git a/doc/type/choice-render-style-checklist-image.png b/docs/type/choice-render-style-checklist-image.png similarity index 100% rename from doc/type/choice-render-style-checklist-image.png rename to docs/type/choice-render-style-checklist-image.png diff --git a/doc/type/choice-render-style-checklist-text.png b/docs/type/choice-render-style-checklist-text.png similarity index 100% rename from doc/type/choice-render-style-checklist-text.png rename to docs/type/choice-render-style-checklist-text.png diff --git a/doc/type/choice-render-style-hidden.png b/docs/type/choice-render-style-hidden.png similarity index 100% rename from doc/type/choice-render-style-hidden.png rename to docs/type/choice-render-style-hidden.png diff --git a/doc/type/choice-render-style-image.png b/docs/type/choice-render-style-image.png similarity index 100% rename from doc/type/choice-render-style-image.png rename to docs/type/choice-render-style-image.png diff --git a/doc/type/choice-render-style-list-both.png b/docs/type/choice-render-style-list-both.png similarity index 100% rename from doc/type/choice-render-style-list-both.png rename to docs/type/choice-render-style-list-both.png diff --git a/doc/type/choice-render-style-list-image.png b/docs/type/choice-render-style-list-image.png similarity index 100% rename from doc/type/choice-render-style-list-image.png rename to docs/type/choice-render-style-list-image.png diff --git a/doc/type/choice-render-style-list-text.png b/docs/type/choice-render-style-list-text.png similarity index 100% rename from doc/type/choice-render-style-list-text.png rename to docs/type/choice-render-style-list-text.png diff --git a/doc/type/choice-render-style-text.png b/docs/type/choice-render-style-text.png similarity index 100% rename from doc/type/choice-render-style-text.png rename to docs/type/choice-render-style-text.png diff --git a/doc/type/graph-type-bar.png b/docs/type/graph-type-bar.png similarity index 100% rename from doc/type/graph-type-bar.png rename to docs/type/graph-type-bar.png diff --git a/doc/type/graph-type-pie.png b/docs/type/graph-type-pie.png similarity index 100% rename from doc/type/graph-type-pie.png rename to docs/type/graph-type-pie.png diff --git a/doc/type/graph-type-scatter-pie.png b/docs/type/graph-type-scatter-pie.png similarity index 100% rename from doc/type/graph-type-scatter-pie.png rename to docs/type/graph-type-scatter-pie.png diff --git a/doc/type/graph-type-scatter.png b/docs/type/graph-type-scatter.png similarity index 100% rename from doc/type/graph-type-scatter.png rename to docs/type/graph-type-scatter.png diff --git a/doc/type/graph-type-stack.png b/docs/type/graph-type-stack.png similarity index 100% rename from doc/type/graph-type-stack.png rename to docs/type/graph-type-stack.png diff --git a/docs/type/index.rst b/docs/type/index.rst index 9235197b..a550aa29 100644 --- a/docs/type/index.rst +++ b/docs/type/index.rst @@ -35,8 +35,686 @@ These are the 'major' data types that are written directly to [[file:packages]]. * - :doc:`Settings <#Settings>` - MSE settings. ---Compound types-- +Game +~~~~ + +--Overview-- + +Games are part of the [[file:style triangle]]: +| Description Looks Data +| '''Game''' [[type:Stylesheet]] [[type:Set]] +| [[type:Field]] [[type:Style]] [[type:Value]] + +Games provide the ''description'', i.e. what kinds of things are on a card. + +--Package format-- + +A game is described in a [[file:package]] with the .mse-game file extension. +Such a package contains a [[file:format|data file]] called game that has the following properties. + +--Properties-- +! Property Type Default Description +| '''Common to all packages''' <<< <<< <<< +| @mse version@ [[type:version]] ''required'' Version of MSE this game is made for. +| @short name@ [[type:string]] file name A short name of this game, for the 'new set' list. +| @full name@ [[type:string]] file name A longer name of this game. +| @icon@ [[type:filename]] ''none'' Filename of an icon / preview for this game, for the 'new set' list. +| @position hint@ [[type:int]] ∞ Where to place this item in the 'new set' list? Lower numbers come first. +| @version@ [[type:version]] @0.0.0@ Version number of this package. +| @depends on@ [[type:list]] of [[type:dependency]]s + Packages this package depends on. + +| '''Specific to games''' <<< <<< <<< +| @init script@ [[type:script]] @;@ Script to run when this game is loaded,
    can set variables + to be used by other scripts in this game or stylesheets using it. +| @set fields@ [[type:list]] of [[type:field]]s Fields for the styling panel. +| @default set style@ [[type:indexmap]] of [[type:style]]s Default style for the set fields, can be overridden by the stylesheet. +| @card fields@ [[type:list]] of [[type:field]]s Fields for each card. +| @card list color script@ [[type:script]] from fields Script that determines the color of an item in the card list.
    If not set uses the @card list colors@ property of the first card field that has it. +| @statistics dimensions@ [[type:list]] of [[type:statistics dimension]]s from fields Dimensions for statistics, a dimension is roughly the same as an axis.
    By default all card fields with 'show statistics' set to true are used. +| @statistics categories@ [[type:list]] of [[type:statistics category]]s from dimensions DOC_MSE_VERSION: not used since 0.3.6 + Choices shown on the statistics panel.
    By default all statistics dimensions are used. +| @pack types@ [[type:list]] of [[type:pack type]]s DOC_MSE_VERSION: since 0.3.7 + The types of card packs that will be listed on the random booster panel. +| @has keywords@ [[type:boolean]] @false@ Does this game use keywords? Should the keywords tab be available? +| @keyword match script@ [[type:script]] @;@ Script to apply to the @match@ property of keywords. +| @keyword modes@ [[type:list]] of [[type:keyword mode]]s Choices for the 'mode' property of keywords. +| @keyword parameter types@ [[type:list]] of [[type:keyword param type]]s Types of parameters available to keywords. +| @keywords@ [[type:list]] of [[type:keyword]]s Standard keywords for this game. +| @word lists@ [[type:list]] of [[type:word list]]s Word lists that can be used by text fields. +| @add cards script@ [[type:list]] of [[type:add cards script]]s DOC_MSE_VERSION: since 0.3.7 + A list of scripts for conveniently adding multiple cards to a set. + +--Examples-- +Look at the game files in the standard MSE distribution for examples. + +Stylesheet +~~~~~~~~~~ + +--Overview-- + +Stylesheets are part of the [[file:style triangle]]: +| Description Looks Data +| [[type:Game]] '''Stylesheet''' [[type:Set]] +| [[type:Field]] [[type:Style]] [[type:Value]] + +Stylesheets provide the ''look and feel'' of cards. + +--Package format-- +A stylesheet is described in a [[file:package]] with the .mse-style file extension, +such a package contains a data file called style. + +--Properties-- +! Property Type Default Description +| '''Common to all packages''' <<< <<< <<< +| @mse version@ [[type:version]] ''required'' Version of MSE this stylesheet is made for. +| @short name@ [[type:string]] file name A short name of this stylesheet, for the 'new set' and style panel lists. +| @full name@ [[type:string]] file name A longer name of this stylesheet. +| @icon@ [[type:filename]] ''none'' Filename of an icon / preview for this stylesheet, for the 'new set' and style panel lists. +| @position hint@ [[type:int]] ∞ Where to place this item in the list? Lower numbers come first. +| @version@ [[type:version]] @0.0.0@ Version number of this package. +| @depends on@ [[type:list]] of [[type:dependency]]s + Packages this package depends on. + +| '''Specific to stylesheets''' <<< <<< <<< +| @game@ Name of a [[type:game]] ''required'' Game this stylesheet is made for +| @card width@ [[type:double]] 100 Width of cards in pixels +| @card height@ [[type:double]] 100 Height of cards in pixels +| @card dpi@ [[type:double]] 96 Resolution of cards in dots-per-inch +| @card background@ [[type:color]] white Background color of cards +| @init script@ [[type:script]] @;@ Script to run when this stylesheet is loaded, after the game's init script. +| @styling fields@ [[type:list]] of [[type:field]]s Fields for styling options, shown on the 'style' panel. +| @styling style@ [[type:indexmap]] of [[type:style]]s Styles for the styling fields. +| @set info style@ [[type:indexmap]] of [[type:style]]s game.default_set_style Styling for the 'set info' panel +| @card style@ [[type:indexmap]] of [[type:style]]s Styles for the card fields defined in the game +| @extra card fields@ [[type:list]] of [[type:field]]s Additional fields to add to each card.
    + These fields are intended for things like lines and boxes, whose value is determined automatically. +| @extra card style@ [[type:indexmap] of [[type:style]]s Styling for the extra card fields + +Set +~~~ + +--Overview-- + +Sets are part of the [[file:style triangle]]: +| Description Looks Data +| [[type:Game]] [[type:Stylesheet]] '''Set''' +| [[type:Field]] [[type:Style]] [[type:Value]] + +--Package format-- +A set is described in a [[file:package]] with the .mse-set file extension, +such a package contains a data file called set. + +--Properties-- +! Property Type Default Description +| '''Common to all packages''' <<< <<< <<< +| @mse version@ [[type:version]] ''required'' Version of MSE this set is made with. +| @short name@ [[type:string]] file name Name of this set. +| @depends on@ [[type:list]] of [[type:dependency]]s + Packages this package depends on. + +| '''Specific to sets''' <<< <<< <<< +| @game@ Name of a [[type:game]] ''required'' The game this set is made for. +| @stylesheet@ Name of a [[type:stylesheet]] ''required'' The default style for drawing cards in this set.
    + This is without the game name or extension, so @"new"@ refers to the package @"gamename-new.mse-style"@. +| @set info@ [[type:indexmap]] of [[type:value]]s The data for the [[prop:game:set fields]] defined in the game. +| @styling@ [[type:map]] of [[type:indexmap]]s of [[type:value]]s + Data for the 'extra fields' of the stylesheet.
    + This is first indexed by stylesheet name, then by field name.
    + Data is given not only for the set's stylesheet but also for those of cards. +| @cards@ [[type:list] of [[type:card]]s The cards in the set. +| @keywords@ [[type:list] of [[type:keyword]]s The custom keywords in the set. +| @pack types@ [[type:list]] of [[type:pack type]]s DOC_MSE_VERSION: since 0.3.8 + The custom card pack types in the set. + +--Example-- + +If the game looks like: +>mse version: 0.3.4 +>name: my game +>set field: +> name: copyright +> type: text +>card field: +> name: card name +> type: text +>card field: +> name: power +> type: text +The the a set file would looks like: +>mse version: 0.3.4 +>game: my game +>name: my set +>set info: +> copyright: something +>extra set info: +> name of style: +> name of field: something +>card: +> card name: first card +> power: 100 +>card: +> card name: second card +> power: 50 + +Pack Type +~~~~~~~~~ + +DOC_MSE_VERSION: since 0.3.8 + +--Overview-- + +A type of card packs. For instance "booster" and "tournament pack" are card pack types. + +A pack type contains either: +* a filter for selecting the desired kind of cards from the set. +* one or more [[type:pack item]]s, indicating what kinds and how many cards are in the pack. +* a combination of the above. + +--Properties-- +! Property Type Default Description +| @name@ [[type:string]] Name of this card pack type. + Other pack types can refer to this name. +| @select@ see below see below How are instances of this pack generated? +| @enabled@ [[type:scriptable]] [[type:boolean]] @true@ Is this pack type enabled, i.e. can the user select it? +| @selectable@ [[type:boolean]] @true@ Is this pack selectable from the list of packs in the user interface? +| @summary@ [[type:boolean]] @true@ Is a summary of the total number of cards shown in the second panel in the user interface?
    + Note: this only applies to pack types that have the @filter@ property set. +| @filter@ [[type:script]] ''optional'' Condition that a card must satisfy to be included in this pack type. +| @items@ [[type:list]] of [[type:pack item]]s The items to include in this pack. + +--Selection-- + +The @select@ property specifies how instances of this pack are generated. +When the user selects that he wants 3 copies of pack X, then MSE will generate three ''instances'' of that pack. +How that happens depends on the @select@ property: + +! @select@ Description +| @all@ Each instance of this pack type contains all of the filtered cards and @items@.
    + In general, @select: all@ is used for the selectable pack types, while other @select@ types are used for the rest of the packs.
    + This is the default for pack types with @items@. +| @replace@ Each instance of this pack type contains a single card or @item@, chosen at random with replacement. + The probability of picking an item is proportional to its @weight@, all filtered cards have weight 1. +| @no replace@ Each instance of this pack type contains a single card or @item@, chosen at random without replacement. + This means that the same card or item will not be chosen twice (if the set is large enough).
    + This is the default for pack types with a @filter@. +| @proportional@ Each instance of this pack type contains a single filtered card or @item@, chosen with probability proportional to the number of choices for the card/item. + The choice is made with replacement. +| @nonempty@ Each instance of this pack type contains a single filtered card or @item@, + but items that contain no cards will be ignored. + The choice is made with replacement. +| @equal@ Instead of choosing cards and items at random, they are chosen to make their numbers as equal as possible. +| @equal proportional@ A combination of @equal@ and @proportional@. +| @equal nonempty@ A combination of @equal@ and @nonempty@. +| @first@ If there are any cards, the first is always chosen, otherwise the first ''nonempty'' item is used.
    + @select: first@ can be used to make a kind of if statement: "If there are any X cards then use those, otherwise use Y cards". + +--Examples-- +>pack item: +> name: rare +> select: no replace # this is optional, 'no replace' is the default +> filter: card.rarity == "rare" + +Rare cards are those with the rarity value of @"rare"@. +The cards are chosen without replacement, so in a single pack the same rare will not occur twice. + +>pack item: +> name: basic land +> select: equal +> filter: card.rarity == "basic land" + +Basic land cards are selected in equal amounts: +Say a set contains two basic lands: "Good Land" and "Bad Land". +Then if 6 basic lands are selected, there will always be exactly 3 "Good Lands" and 3 "Bad Lands". +If an odd number of basic lands are selected then the amounts will be as close as possible to being equal. + + +>pack type: +> name: booster pack +> select: all # this is optional, 'all' is the default +> item: +> name: rare +> amount: 1 +> item: +> name: uncommon +> amount: 3 +> item: +> name: common +> amount: 11 + +A Magic booster pack contains 1 rare, 3 uncommons and 11 commons. + +>pack type: +> name: special or else common +> select: first +> item: special +> item: common + +If there are any special cards in the set, then "special or else common" will be a special card, otherwise it will be a common. + +>pack type: +> name: rare or mythic rare +> select: proportional +> item: +> name: rare +> weight: 2 +> item: +> name: mythic rare +> weight: 1 + +In Magic, individual "mythic rares" are twice as rare as normal rare cards. +Since there are also less mythic rares, this does not mean that each booster pack has a 33% percent chance of containing a mythic rare. +Instead the probability of a mythic rare is +@number_of_mythics / (number_of_rares * 2 + number_of_mythics)@. +So, for example if there are 20 rares in a set and only 5 mythic rares, then one in 9 "rare or mythic rare" cards will be a mythic rare. + +Pack Item +_________ + +DOC_MSE_VERSION: since 0.3.8 + +--Overview-- + +A reference to another [[type:pack type]], from which one or more cards are chosen. + +--Properties-- +! Property Type Default Description +| @name@ Name of a [[type:pack item]] ''required'' Name of the pack item to include in this pack. +| @amount@ [[type:scriptable]] [[type:int]] 1 How many of those cards are in the pack? +| @weight@ [[type:scriptable]] [[type:double]] 1 How 'important' is this item? + Items with a higher weight will be chosen more often. + Cards from @filter@ will have a weight of 1. + +--Examples-- +>item: +> name: common +> amount: 11 + +Include 11 commons in this [[type:pack type|pack]]. + +>item: common +Short form. Include a single common in this pack. + + +Symbol Font +~~~~~~~~~~~ + +--Overview-- + +A symbol font is a font for drawing with images. +Each [[type:symbol font symbol|symbol-font-symbol]] in the font is an image. + +A symbol font is referenced in [[type:stylesheet]]s using a [[type:symbol font reference]]. + +--Splitting-- + +A piece of text drawn with the symbol font is split into separate symbols. +The list of symbols in the font is scanned from top to bottom to find matches. + +If the text is for instance "W/GR" and "W/G" should be rendered as a single symbol, then it should appear before the symbol "W". +Otherwise the "W" is seen as a symbol and the program continues with rendering "/GR". + +--Font size-- + +A symbol font is drawn using a specific point size, similar to normal fonts. +Usually the images that make up the font are given in a very high resolution, for example 200x200. +This resolution could correspond to a point size of for instance 150pt. + +When the symbol is drawn at for instance 12pt the image well then be scaled down to @200/150*12 == 16@ pixels. + +Sizes like margin, padding and font size are given in 'pixels per point'. If for instance +> text margin left: 0.1 +is specified, and the symbol is rendered at 12pt, the margin will be @12*0.1 == 1.2@ pixels. + +--Package format-- + +A symbol font is described in a [[file:package]] with the .mse-symbol-font file extension. +Such a package contains a [[file:format|data file]] called symbol-font that has the following properties. + +--Properties-- +! Property Type Default Description +| '''Common to all packages''' <<< <<< <<< +| @mse version@ [[type:version]] ''required'' Version of MSE this symbol font is made for. +| @short name@ [[type:string]] file name A short name of this symbol font, currently not used by the program. +| @full name@ [[type:string]] file name A longer name of this symbol font, currently not used by the program. +| @icon@ [[type:filename]] ''none'' Filename of an icon, currently not used by the program. +| @version@ [[type:version]] @0.0.0@ Version number of this package. +| @depends on@ [[type:list]] of [[type:dependency]]s + Packages this package depends on. + +| '''Specific to symbol fonts''' <<< <<< <<< +| @image font size@ [[type:double]] @12@ To what point size do the images correspond? +| @horizontal space@ [[type:double]] @0@ Horizontal spacing between symbols, in pixels. +| @vertical space@ [[type:double]] @0@ Vertical spacing between symbols, in pixels. +| @symbols@ [[type:list]] of [[type:symbol font symbol]]s Symbols that make up this font. +| @scale text@ [[type:boolean]] @false@ Should text be scaled down to fit in a symbol? +| @insert symbol menu@ [[type:insert symbol menu|"insert symbol" menu]] ''none'' A description of the menu to insert a symbol into the text. + +--Examples-- +See for instance the @"magic-mana-small.mse-symbol-font"@ package in the MSE distribution. + +Symbol Font Reference +_____________________ + +--Overview-- + +A reference to a [[type:symbol font]]. + +In [[type:stylesheet]]s the symbol fonts are not included inline, instead they are referenced by their package name. + +--Properties-- +! Property Type Default Description +| @name@ [[type:scriptable]] Name of a [[type:symbol font]] + ''required'' Name of the symbol font package to use (without the extension). +| @size@ [[type:scriptable]] [[type:double]] 12 Size in points to render the symbols with. +| @scale down to@ [[type:double]] 1 Minimum size in points to scale the size down to. +| @alignment@ [[type:scriptable]] [[type:alignment]] @"middle center"@ Alignment of symbols in a line of text. + +--Example-- +>symbol font: +> name: magic-mana-small +> size: 10 +> alignment: top left +The name can be scripted: +>symbol font: +> name: { if set.use_larga_mana_symbols then "magic-mana-large" else "magic-mana-small" } +> size: 10 +> alignment: top left + +Symbol Font Symbol +__________________ + +--Overview-- + +A single symbol in a [[type:symbol font]]. + +--Properties-- +! Property Type Default Description +| @image font size@ [[type:double]] value from symbol font To what point size does the images correspond? +| @code@ [[type:string]] or [[type:regex]] ''required'' Text this symbol matches. +| @regex@ [[type:boolean]] @false@ Is the code a regular expression (as opposed to a string)? +| @image@ [[type:scriptable]] [[type:image]] ''required'' Image of this symbol. +| @enabled@ [[type:scriptable]] [[type:boolean]] @true@ Is this symbol actually used?
    + This can be scripted to optionally disable certain symbols.
    + If multiple symbols with the same code are given disabling the first switches to the second one. +| @draw text@ [[type:int]] @-1@ The index of the captured regex expression to draw as text, or -1 to not draw text.
    For example with the code @"x([a-z])"@ and @draw text: 1@ the text of the symbol @"xb"@ will be @"b"@. +| @text font@ [[type:font]] Font to use for drawing text on symbols. The font size is in font points per text box font point. +| @text alignment@ [[type:alignment]] @"middle center"@ How should text be aligned on the symbol? +| @text margin left@ [[type:double]] @0@ Margin on the left of the text in pixels per point. +| @text margin right@ [[type:double]] @0@ Margin on the right of the text in pixels per point. +| @text margin top@ [[type:double]] @0@ Margin on the top of the text in pixels per point. +| @text margin bottom@ [[type:double]] @0@ Margin on the bottom of the text in pixels per point. + + +--Examples-- +A symbol with text: +>symbol: +> image: blank.png +> code: . +> regex: true +> text font: Arial + +Two symbols for the same code, which one is used depends on a function from the [[type:stylesheet]]. +It is recommended to only use functions in @enabled@, so each stylesheet can determine how the font should be used. +>symbol: +> code: T +> image: mana_t_old.png +> enabled: { use_old_tap_symbol() } +>symbol: +> code: T +> image: mana_t.png + + +Insert Symbol Menu +__________________ + +--Overview-- + +A description of the "Insert symbol" menu for a specific [[type:symbol font]]. + +The menu consists of a number of entries, either items, separators or submenus. + +--Properties-- +! Property Type Default Description +| @type@ One of: @"code"@ or @"submenu"@ What type of menu item is this? + * @code@, inserts a symbol with the given code. + * @custom@, pops up a dialog where the user can choose a code to insert. + * @line@, a separating line. + * @submenu@, a submenu. +| @name@ [[type:string]] ''required'' Name of this menu item, corresponding to the code to insert. +| @label@ [[type:localized string]] name Label to show in the menu. +| @prompt@ [[type:localized string]] Prompt to use for the pop up box with @custom@ type +| @items@ [[type:list]] of [[type:insert symbol menu|submenu items]] Items in the submenu, when items are present the @type@ is set to @"submenu"@. + +For custom items the dialog will be titled with the @label@ and have message text @prompt@. + +--Examples-- +A menu for magic mana symbols (simplified). Containing all types of items. +>insert symbol menu: +> item: +> type: custom +> name: Generic +> prompt: How much generic mana? +> item: +> type: line +> item: W +> item: U +> item: B +> item: R +> item: G +> item: +> label: Complex +> name: cplx +> item: +> type: line +> item: +> name: hybrid +> item: W/U +> item: U/B +> item: B/R +> item: R/G +> item: G/W + + +Export Template +~~~~~~~~~~~~~~~ + +--Overview-- + +An export template describes a way for a set to be exported to a HTML or other text files. + +--Package format-- +An export template is described in a [[file:package]] with the .mse-export-template file extension. +Its name should begin with game- where game is the name of the game the template is made for. +It should contain a [[file:format|data file]] called export-template with the following properties. + +--Properties-- +! Property Type Default Description +| '''Common to all packages''' <<< <<< <<< +| @mse version@ [[type:version]] ''required'' Version of MSE this export template is made for. +| @short name@ [[type:string]] file name A short name of this export template, for the 'new set' and style panel lists. +| @full name@ [[type:string]] file name A longer name of this export template. +| @icon@ [[type:filename]] ''none'' Filename of an icon / preview for this export template, for the 'export to HTML' dialog. +| @position hint@ [[type:int]] ∞ Where to place this item in the list? Lower numbers come first. +| @version@ [[type:version]] @0.0.0@ Version number of this package. +| @depends on@ [[type:list]] of [[type:dependency]]s + Packages this package depends on. + +| '''Specific to export template''' <<< <<< <<< +| @game@ Name of a [[type:game]] ''required'' Game this export template is made for +| @file type@ [[type:string]] @"HTML files (*.html)|*.html"@ + File type to use, this is a list separated by @|@ characters. + Alternatingly, a human description and a file pattern to match are given. +| @create directory@ [[type:boolean]] @false@ Should a directory for data files be created? This is required for some script function. +| @option fields@ [[type:list]] of [[type:field]]s Fields for additional options to show. +| @option style@ [[type:indexmap]] of [[type:style]]s Styling for the @option fields@. +| @script@ [[type:script]] Script that generates the text that will be written to the exported file. + +During the evaluation of the script the following variables are available: +| @game@ The current game. +| @style@ The current stylesheet. +| @set@ The set being exported. +| @cards@ The cards selected by the user. +| @options@ The values of the @option fields@. +| @directory@ Name of the directory created (if @create directory@ is set). + +--See also-- +The following functions are made specifically for exporting to html: +| [[fun:to_html]] Convert [[type:tagged text]] to html. +| [[fun:symbols_to_html]] Convert text to html using a [[type:symbol font]]. +| [[fun:to_text]] Remove all tags from tagged text. +| [[fun:copy_file]] Copy a file from the [[type:export template]] to the output directory. +| [[fun:write_text_file]] Write a text file to the output directory. +| [[fun:write_image_file]] Write an image file to the output directory. + +--Example-- +Look at the @"magic-spoiler.mse-export-template"@ for an example. + +Locale +~~~~~~ + +--Overview-- + +A locale gives a translation of the user interface of the program. + +--Package format-- + +A locale is described in a [[file:package]] with the .mse-locale file extension. +Such a package contains a data file called locale that has the following properties. +There are usually no other files in the package. + +--Properties-- +! Property Type Default Description +| '''Common to all packages''' <<< <<< <<< +| @mse version@ [[type:version]] ''required'' Version of MSE this locale is made for. +| @short name@ [[type:string]] file name A short name of this locale, for the options dialog. +| @full name@ [[type:string]] file name A longer name of this locale. +| @icon@ [[type:filename]] ''none'' Filename of an icon / preview for this locale, currently not used. +| @version@ [[type:version]] @0.0.0@ Version number of this package. + +| '''Specific to locales''' <<< <<< <<< +| @menu@ [[type:map]] of [[type:string]]s Translations of menu items.
    + Menu items can contain shortcut keys (like Ctrl+C for copy) by using a ''single'' TAB between the text and the shortcut key.
    + Keys to use with Alt+Something (displayed underlined) can be specified &
    + For example + >>>new set: &New... Ctrl+N +| @help@ [[type:map]] of [[type:string]]s Translations of help texts for the status bar. +| @tool@ [[type:map]] of [[type:string]]s Translations of toolbar item texts. +| @tooltip@ [[type:map]] of [[type:string]]s Translations of tooltips for toolbar items. +| @label@ [[type:map]] of [[type:string]]s Labels of controls in the GUI. +| @button@ [[type:map]] of [[type:string]]s Labels of buttons in the GUI. +| @title@ [[type:map]] of [[type:string]]s Titles of windows. +| @action@ [[type:map]] of [[type:string]]s Names of actions for undo/redo, things like "typing" and "add card". +| @error@ [[type:map]] of [[type:string]]s Error messages. +| @type@ [[type:map]] of [[type:string]]s Types of objects for error messages. +| @game@ [[type:map]] of [[type:map]] of [[type:string]]s + Deprecated since MSE 2.1.3, use @localized_...@ instead.
    + Translations for specific [[type:game]]s.
    + Field names and field descriptions are looked up in the locale, if they are found the translation is used, otherwise the value from the game file.
    + Extra keys not present in the English locale can be added here. +| @stylesheet@ [[type:map]] of [[type:map]] of [[type:string]]s + Deprecated since MSE 2.1.3, use @localized_...@ instead.
    + Translations for specific [[type:stylesheet]]s. +| @symbol font@ [[type:map]] of [[type:map]] of [[type:string]]s + Deprecated since MSE 2.1.3, use @localized_...@ instead.
    + Translations for specific [[type:symbol font]]s, in particular the "insert symbol" menu. + +Some of the items can contain placeholders for other values, for example: +> undo: &Undo%s Ctrl+Z +The @%s@ is replaced by the name of the action to undo. +This @%s@ should be used in exactly those entries that also contain it in the English locale. + +--Examples-- +Look at the @"en.mse-locale"@ file in the standard MSE distribution for an example. + +--Translating MSE-- +To translate the MSE user interface: +* Create a copy of the @"en.mse-locale"@ directory, name it @"**.mse-locale"@, where @"**"@ is a two or three letter [[http://en.wikipedia.org/wiki/ISO_language_code|ISO language code]]. +* Open the @"locale"@ file with Notepad (or another program that supports UTF-8), and translate the strings. +* Add new keys for game, stylesheet or symbol font specific keys as described above. +* Save the file, select the new locale from Edit->Preferences. +* Restart MSE, and make sure everything looks right. +* Submit the new locale to the [[http://magicseteditor.sourceforge.net/forum/7|MSE forum]. +* Maintain the locale when new versions of MSE come out. A new version may have new user interface items and therefore new keys. + +Include +~~~~~~~ + +--Overview-- + +An include package contains files used by other packages, for example scripts or images. + +--Package format-- +An include package is described in a [[file:package]] with the .mse-include file extension. +It should contain a [[file:format|data file]] called include with the following properties. + +--Properties-- +! Property Type Default Description +| '''Common to all packages''' <<< <<< <<< +| @mse version@ [[type:version]] ''required'' Version of MSE this include package is made for. +| @short name@ [[type:string]] file name A short name of this include package, currently not used. +| @full name@ [[type:string]] file name A longer name of this include package, currently not used. +| @icon@ [[type:filename]] ''none'' Filename of an icon / preview for this export template, currently not used. +| @version@ [[type:version]] @0.0.0@ Version number of this package. +| @depends on@ [[type:list]] of [[type:dependency]]s + Packages this package depends on. + +No additional properties are available. + +Installer +~~~~~~~~~ + +BLANK + +Symbol +~~~~~~ + +--Overview-- + +A symbol file contains a symbol created with the symbol editor. + +Symbols are not stored in packages, the data file is directly written to a @".mse-symbol"@ file. + +--Coordinates-- + +Various parts of a symbol use [[type:vector2d|coordinates]]. +These are pairs of numbers in the range @0@ to @1@. @(0,0)@ is the top-left of the symbol, @(1,1)@ the bottom-right. + +--Properties-- +! Property Type Default Description +| @mse version@ [[type:version]] ''required'' Version of MSE this symbol is made with. +| @parts@ [[type:list]] of [[type:symbol part]]s The parts in this symbol. + +--Example-- +Look at a file made with the program. + + +Settings +~~~~~~~~ + +--Overview-- + +The MSE settings are stored in a separate file. + +--Location-- + +On Windows XP the settings are located in: +> "C:\Documents and Settings\Application Data\Magic Set Editor\mse8.config" + +--Properties-- +See the settings file for the properties. + + +Compound Types +-------------- + These contain several properties, similair to the file types. But they are part of some other file type. + +.. list-table:: + :header-rows: 0 + :stub-columns: 1 + :align: left + * - :doc:`field <#field>` - A field description for cards. * - :doc:`style <#style>` @@ -53,8 +731,6 @@ These contain several properties, similair to the file types. But they are part - A type of parameters for keywords. * - :doc:`statistics dimension <#statistics dimension>` - A dimension for the statistics panel. - * - :doc:`statistics category <#statistics category>` - - A category for the statistics panel. * - :doc:`word list <#word list>` - A list of words that can be used for a drop down list in text fields. * - :doc:`add cards script <#add cards script>` @@ -66,20 +742,1031 @@ These contain several properties, similair to the file types. But they are part * - :doc:`control point <#control point>` - A point on in a symbol part. ---Collection types-- - * - :doc:`list <#list>` - - Lists of items - * item - * item - * item - * - :doc:`indexmap <#indexmap>` - - Lists indexed by field name - -
    name:someone
    type:something
    - * - :doc:`map <#map>` - - Lists indexed by other text +Field +~~~~~ + +--Overview-- + +A field is a description of a kind of 'container' to hold a value. + +For example the [[type:value]] of a 'text field' is a piece of text, that of a 'color field' a [[type:color]], etc. + +Things that are fields are, "card color" and "card name". +Not a particular color or name, but a description of what a card color and a card name are for a particular [[type:game]]. + +Fields are part of the [[file:style triangle]]: +| Description Looks Data +| [[type:Game]] [[type:Stylesheet]] [[type:Set]] +| '''Field''' [[type:Style]] [[type:Value]] + +--Properties-- +! Property Type Default Description +| @type@ One of: ''required'' Type of field. + * @text@ + * @choice@ + * @multiple choice@ + * @package choice@ + * @boolean@ + * @image@ + * @symbol@ + * @color@ + * @info@ +| @name@ [[type:string]] ''required'' Name of the field. +| @description@ [[type:localized string]] @""@ Description of the field, shown in the status bar when the mouse is over the field. +| @icon@ [[type:filename]] Filename of an icon for this field, used for automatically generated [[type:statistics category]]s. +| @editable@ [[type:boolean]] @true@ Can values of this field be edited? +| @save value@ [[type:boolean]] @true@ Should values of this field be saved to files? Should be disabled for values that are generated by scripts. +| @show statistics@ [[type:boolean]] @true@ Should a [[type:statistics dimension]] and [[type:statistics category|category]] be made for this field, + causing it to be listed on the statistics panel? +| @identifying@ [[type:boolean]] @false@ Does this field give the name of the [[type:card]] or [[type:set]]? +| @card list column@ [[type:int]] @0@ On what position in the card list should this field be put? +| @card list width@ [[type:int]] @100@ Width of the card list column in pixels. +| @card list visible@ [[type:boolean]] @false@ Should this field be shown in the card list by default? +| @card list allow@ [[type:boolean]] @true@ Should this field be allowed in the card list at all? +| @card list name@ [[type:localized string]] field name Alternate name to use for the card list, for example an abbreviation. +| @card list alignment@ [[type:alignment]] @left@ Alignment of the card list column. +| @sort script@ [[type:script]] Alternate way to sort the card list when using this column to sort the list. + +The @type@ determines what values of this field contain: +! Type Values contain Displayed as +| @text@ Text with markup (a [[type:tagged string]]) Text +| @choice@ A choice from a list Text or an image +| @multiple choice@ Zero or more choices from a list A single image or multiple images +| @package choice@ A choice from a list of installed [[type:package]]s Text and/or an image +| @boolean@ @yes@ or @no@ Text or an image or both +| @color@ Any color or a restricted selection from a list A box filled with the color +| @image@ Any image The image +| @symbol@ A [[type:symbol]] edited with the symbol editor The image +| @info@ An informational message, for example to group fields together. A box containing the label + +Additional properties are available, depending on the type of field: + +! Type Property Type Default Description +| @"text"@ @script@ [[type:script]] Script to apply to values of this field after each change.
    + If the script evaluates to a constant (i.e. doesn't use @value@) then values in this field can effectively not be edited. +| ^^^ @default@ [[type:script]] Script to determine the value when it is in the default state (not edited). +| ^^^ @default name@ [[type:string]] @"Default"@ Name of the default state, currently not used. +| ^^^ @multi line@ [[type:boolean]] @false@ Can values of this field contain line breaks? + +| @"choice"@ @script@ [[type:script]] Script to apply to values of this field after each change.
    + If the script evaluates to a constant (i.e. doesn't use @value@) then values in this field can effectively not be edited. +| ^^^ @default@ [[type:script]] Script to determine the value when it is in the default state (not edited). +| ^^^ @initial@ [[type:string]] Initial value for new values for this field. +| ^^^ @default name@ [[type:string]] @"Default"@ Name of the default state. +| ^^^ @choices@ [[type:list]] of [[type:choice]]s Possible values for this field. +| ^^^ @choice colors@ [[type:map]] of opaque [[type:color]]s Colors of the choices for statistics graphs. +| ^^^ @choice colors cardlist@ [[type:map]] of opaque [[type:color]]s Colors of the choices for lines in the card list,
    see also the @card list color script@ property of [[type:game]]s. + +| @"multiple choice"@ <<< <<< <<< + '' Multiple choice fields have the same attributes as normal choice fields.''
    + To refer to a combination of values in the initial attribute use @choice1, choice2, choice3@.
    + These choices must appear in the same order as they do in the @choices@ property. + +| @"boolean"@ ''A boolean field is a choice field with the choices @"yes"@ and @"no"@.'' <<< <<< <<< + +| @"package choice"@ + @script@ [[type:script]] Script to apply to values of this field after each change.
    + If the script evaluates to a constant (i.e. doesn't use @value@) then values in this field can effectively not be edited. +| ^^^ @match@ [[type:string]] ''required'' Filenames of the packages to match, can include wildcards @"*"@. For example @"magic-mana-*.mse-symbol-font"@. +| ^^^ @initial@ [[type:string]] ''required'' Initial package for new values for this field. +| ^^^ @reqired@ [[type:boolean]] @true@ Must a package always be selected? Or is it allowed to select nothing? +| ^^^ @empty name@ [[type:string]] @"None"@ Name of the empty state. Applies only if @required: false@. + +| @"color"@ @script@ [[type:script]] Script to apply to values of this field after each change.
    + If the script evaluates to a constant (i.e. doesn't use @value@) then values in this field can effectively not be edited. +| ^^^ @default@ [[type:script]] Script to determine the value when it is in the default state (not edited). +| ^^^ @initial@ [[type:string]] Initial color for new values for this field. +| ^^^ @default name@ [[type:string]] @"Default"@ Name of the default state. +| ^^^ @allow custom@ [[type:boolean]] @true@ Are colors other then those from the choices allowed? +| ^^^ @choices@ [[type:list]] of [[type:color choice]]s Possible values for this field. + +| @"image"@ ''no extra properties'' <<< <<< <<< + +| @"symbol"@ ''no extra properties'' <<< <<< <<< + +| @"info"@ @script@ [[type:script]] Script to determine the value to show. + +--Example-- +The @title@ field gives the title of a set: +>set field: +> type: text +> name: title +> identifying: true + +The border color of cards can be selected from a list of choices, but other values are also possible. +The default is based on a set field. Statistics don't make much sense for the border color. +>card field: +> type: color +> name: border color +> default: set.border_color +> choice: +> name: black +> color: rgb(0,0,0) +> choice: +> name: white +> color: rgb(255,255,255) +> choice: +> name: silver +> color: rgb(128,128,128) +> choice: +> name: gold +> color: rgb(200,180,0) +> show statistics: false + + +Style +~~~~~ + +--Overview-- + +A style specifies how a [[type:field]] should look, +things like position, size, fonts, colors, etc. + +Styles are part of the [[file:style triangle]]: +| Description Looks Data +| [[type:Game]] [[type:Stylesheet]] [[type:Set]] +| [[type:Field]] '''Style''' [[type:Value]] + +--Positioning-- + + +A style specifies the position of a box for the content. +To specify the horizontal location ''two'' of @left@, @width@ and @right@ must be specified. + +For example: +> left: 10 +> width: 20 +Implies that @right@ is 30 pixels. + +Similarly: +> left: 10 +> right: 30 +Implies the @width@ is 20. + +The same holds for the vertical location and size; @top@, @height@ and @bottom@. + +--Rotation-- +Rotating a box can be done with the @angle@ property. +The angle gives a counter clockwise rotation in degrees of the box. +The box is rotated such that the corner for which the position is specified is at the correct position after rotating. + +Here are some examples: + +| + >red box: + > width: 30 + > height: 25 + > left: 10 + > top: 20 + > angle: 30 + + >green box: + > width: 25 + > height: 30 + > left: 10 + > top: 80 + > angle: 90 + + >blue box: + > width: 30 + > height: 25 + > right: 90 + > bottom: 30 + > angle: 30 + + >yellow box: + > width: 20 + > height: 35 + > right: 60 + > bottom: 60 + > angle: 180 + + +--Properties-- +! Property Type Default Description +| @z index@ [[type:int]] @0@ Stacking of this box, fields with a higher @z index@ are placed on top of those with a lower index. +| @tab index@ [[type:int]] @0@ Index for moving through the fields with the tab key, fields with a lower tab index come first. Otherwise the order is from top to bottom and then left to right. +| @left@ [[type:scriptable]] [[type:double]] ''Required'' Distance between left edge of the box and the left of the card in pixels. +| @width@ [[type:scriptable]] [[type:double]] ''Required'' Width of the box in pixels. +| @right@ [[type:scriptable]] [[type:double]] ''Required'' Distance between right edge of the box and the ''left'' of the card in pixels. +| @top@ [[type:scriptable]] [[type:double]] ''Required'' Distance between top edge of the box and the top of the card in pixels. +| @height@ [[type:scriptable]] [[type:double]] ''Required'' Height of the box in pixels. +| @bottom@ [[type:scriptable]] [[type:double]] ''Required'' Distance between bottom edge of the box and the ''top'' of the card in pixels. +| @angle@ [[type:scriptable]] [[type:int]] @0@ Rotation of this box, in degrees counter clockwise. +| @visible@ [[type:scriptable]] [[type:boolean]] @true@ Is this field visible at all? +| @mask@ [[type:image|scriptable image]] ''none'' A mask to apply to the box, black areas in the mask become transparent, similar to [[fun:set_mask]]. + +The rest of the properties depend on the type of [[type:field]] this style is for. +! Type Property Type Default Description +| @"text"@ @font@ [[type:font]] ''Required'' Font to render the text. +| ^^^ @symbol font@ [[type:symbol font]] Font to render symbols in the text (optional). +| ^^^ @always symbol@ [[type:boolean]] @false@ Should all text be rendered with symbols?
    + Text that is not supported by the symbol font is still rendered as normal text. +| ^^^ @allow formating@ [[type:boolean]] @true@ Is custom formating (bold, italic) allowed? +| ^^^ @alignment@ [[type:scriptable]] [[type:alignment]] @top left@ Alignment of the text. +| ^^^ @direction@ [[type:direction]] @"left to right"@ Direction in which the text flows. If set to @"vertical"@ it is as if a line break is inserted after each character. +| ^^^ @padding left@ [[type:scriptable]] [[type:double]] @0@ Padding between the text and the border of the box, in pixels. +| ^^^ @padding right@ ^^^ ^^^ ^^^ +| ^^^ @padding top@ ^^^ ^^^ ^^^ +| ^^^ @padding bottom@ ^^^ ^^^ ^^^ +| ^^^ @padding left min@ [[type:scriptable]] [[type:double]] ∞ Minimal padding around the field.
    When the text is scaled down the padding is scaled as well, but it becomes no smaller than this. +| ^^^ @padding right min@ ^^^ ^^^ ^^^ +| ^^^ @padding top min@ ^^^ ^^^ ^^^ +| ^^^ @padding bottom min@ ^^^ ^^^ ^^^ +| ^^^ @line height soft@ [[type:scriptable]] [[type:double]] @1@ Multiplier for the line height of 'soft' line breaks. These are breaks caused by wrapping around lines that are too long.
    + A line height of @0@ means all lines are in the same position, @1@ is normal behaviour, @2@ skips a line, etc. +| ^^^ @line height hard@ [[type:scriptable]] [[type:double]] @1@ Multiplier for the line height of 'hard' line breaks. These are breaks caused by the enter key. +| ^^^ @line height line@ [[type:scriptable]] [[type:double]] @1@ Multiplier for the line height of 'soft' line breaks. These are breaks caused by @"\n"@ tags. +| ^^^ @line height soft max@ [[type:scriptable]] [[type:double]] ''disabled'' When there is still vertical room in the text box, increase the line heights to at most these values to spread the text more evenly. +| ^^^ @line height hard max@ ^^^ ^^^ ^^^ +| ^^^ @line height line max@ ^^^ ^^^ ^^^ +| ^^^ @paragraph height@ [[type:double]] ''flexible'' The height of paragraphs. If specified, each paragraph is given this much space, and aligned inside that space as specified by @alignment@.
    + A paragraph break is any line break that is not soft (i.e. caused by word wrap or a @@ break). +| ^^^ @mask@ [[type:image|scriptable image]] ''none'' A mask that indicates where in the box text can be placed.
    + Text is never put in black areas of the box:
    +
    + The same mask image is also used to determine the size and shape of the box. + To include a certain pixel in the size/shape but not allow text to be placed there, it can be made dark gray (a value less than 128). +| ^^^ @layout@ [[type:text layout]] ''automatic'' When read from a script, gives information on the layout of text in this box. +| ^^^ @content width@ [[type:double]] ''automatic'' When read from a script, gives the width of the current content in this box. Equivalent to @layout.width@ +| ^^^ @content height@ [[type:double]] ''automatic'' When read from a script, gives the height of the current content in this box. Equivalent to @layout.height@ +| ^^^ @content lines@ [[type:int]] ''automatic'' When read from a script, gives the number of lines of the current content in this box. Equivalent to @length(layout.lines)@ + +! <<< <<< <<< <<< +| @"choice"@,
    @"multiple choice"@,
    @"boolean"@ + @popup style@ @"drop down"@ or @"in place"@ @"drop down"@ Where to place the drop down box for editing the value.
    + @"drop down"@ places the box below the field, similar to normal combo boxes.
    + @"in place"@ places the box at the mouse coordinates. +| ^^^ @render style@ [[type:render style]] @"text"@ How should the field be rendered? +| ^^^ @combine@ [[type:combine]] @"normal"@ How to combine the image with the background? Can be overridden using the [[fun:set_combine]] function. +| ^^^ @alignment@ [[type:alignment]] @"stretch"@ Alignment of text and images in the box. +| ^^^ @font@ [[type:font]] Font to use for rendering text (depending on @render style@) +| ^^^ @image@ [[type:image|scriptable image]] Image to show (depending on @render style@).
    + The script will be called with @input@ set to the value to determine an image for. +| ^^^ @choice images@ [[type:map]] of [[type:image]]s An alternative way to specify what image to show.
    + For each [[type:choice]] a separate image is specified. +| ^^^ @content width@ [[type:double]] ''automatic'' When read from a script, gives the width of the current choice image in this box.
    + This is only useful when the alignment is changed, otherwise it is always equal the box size itself. +| ^^^ @content height@ [[type:double]] ''automatic'' When read from a script, gives the height of the current choice image in this box. +| @"multiple choice"@ + @direction@ [[type:scriptable]] [[type:direction]] @"left to right"@ Direction the items are laid out in, only when @render style@ is @list@. +| ^^^ @spacing@ [[type:scriptable]] [[type:double]] @0@ Spacing between the items. + +! <<< <<< <<< <<< +| @"package choice"@ +| ^^^ @font@ [[type:font]] Font to use for rendering text. + +! <<< <<< <<< <<< +| @"color"@ @radius@ [[type:double]] @0@ Radius of rounded corners for the box in pixels. +| ^^^ @left width@ [[type:double]] ∞ Draw only this many pixels from the side, creating a box with a hole in it, or a card border. +| ^^^ @right width@ ^^^ ^^^ ^^^ +| ^^^ @top width@ ^^^ ^^^ ^^^ +| ^^^ @bottom width@ ^^^ ^^^ ^^^ +| ^^^ @combine@ [[type:combine]] @"normal"@ How to combine the color with the background? Only applies when a mask is used. + +! <<< <<< <<< <<< +| @"image"@ @default@ [[type:image|scriptable image]] ''none'' A default image to use when the card has none. + +! <<< <<< <<< <<< +| @"symbol"@ @variations@ [[type:list]] of [[type:symbol variation]]s Available variations of the symbol, a variation describes color and border size. +| ^^^ @min aspect ratio@ [[type:double]] @1@ Bounds for the aspect ratio, @width/height@ symbols can take. This can be used to make non-square symbols. +| ^^^ @max aspect ratio@ [[type:double]] @1@ ^^^ + +! <<< <<< <<< <<< +| @"info"@ @font@ [[type:font]] ''Required'' Font to render the text. +| ^^^ @alignment@ [[type:scriptable]] [[type:alignment]] @top left@ Alignment of the text. +| ^^^ @padding left@ [[type:double]] @0@ Padding between the text and the border of the box, in pixels. +| ^^^ @padding right@ ^^^ ^^^ ^^^ +| ^^^ @padding top@ ^^^ ^^^ ^^^ +| ^^^ @padding bottom@ ^^^ ^^^ ^^^ +| ^^^ @background color@ opaque [[type:color]] @rgb(255,255,255)@ Background color for the box, can be used to make it stand out. + +--Example-- + + +Render Style +____________ + +A way to render a choice [[type:field]], see [[type:style]]. + +--Possible values-- +! Value Sketch Description +| @text@ + Rendered as text +| @image@ + Rendered as an image +| @both@ + Both an image and text +| @hidden@ + The box is hidden, but the value can still be edited. +| @image hidden@ + The box is hidden, but the value can still be edited. +| @checklist@ + A list of checkboxes, for multiple choice styles. +| @image checklist@ + A list of checkboxes with images instead of text. +| @both checklist@ + A list of checkboxes with both images and text. +| @text list@ + A list of the selected items, for multiple choice styles. +| @image list@ + A list of the selected items with images instead of text. +| @both list@ + A list of the selected items with both images and text. + +--Examples-- +> render style: image + +Symbol Variation +________________ + +--Overview-- + +A variation of a symbol, describes color and border. + +--Properties-- +! Property Type Default Description +| @name@ [[type:string]] ''Required'' Name of this variation, refered to by the [[fun:symbol_variation]] function. +| @border radius@ [[type:double]] @0.05@ Border radius of the symbol. +| @fill type@ @solid@ or @linear gradient@ or @radial gradient@ + @"solid"@ How to fill the symbol. + +Depending on the @fill type@ there are additional properties: +! Fill type Property Type Description +| @"solid"@ @fill color@ [[type:color]] Color to use for filling the symbol. +| ^^^ @border color@ [[type:color]] Color to use for the border of the symbol. +| @"linear gradient"@ @fill color 1@ [[type:color]] Color to use for filling the symbol at the center of the gradient. +| ^^^ @border color 1@ [[type:color]] Color to use for the border of the symbol at the center of the gradient. +| ^^^ @fill color 2@ [[type:color]] Color to use for filling the symbol at the ends of the gradient. +| ^^^ @border color 2@ [[type:color]] Color to use for the border of the symbol at the ends of the gradient. +| ^^^ @center x@, @center y@ [[type:double]] Position of the center point of the gradient (in the range 0 to 1) +| ^^^ @end x@, @end y@ [[type:double]] Position of the end point of the gradient (in the range 0 to 1) +| @"radial gradient"@ @fill color 1@ [[type:color]] Color to use for filling the symbol at the center of the symbol. +| ^^^ @border color 1@ [[type:color]] Color to use for the border of the symbol at the center of the symbol. +| ^^^ @fill color 2@ [[type:color]] Color to use for filling the symbol at the edges of the symbol. +| ^^^ @border color 2@ [[type:color]] Color to use for the border of the symbol at the edges of the symbol. + +--Examples-- +'Common' and 'uncommon' magic expansion symbol styles: +>variation: +> name: common +> border radius: 0.10 +> # White border, black fill +> fill type: solid +> fill color: rgb(0,0,0) +> border color: rgb(255,255,255) +>variation: +> name: uncommon +> border radius: 0.05 +> fill type: linear gradient +> # Black border, silver gradient fill +> fill color 1: rgb(224,224,224) +> fill color 2: rgb(84, 84, 84) +> border color 1: rgb(0, 0, 0) +> border color 2: rgb(0, 0, 0) + +Text Layout +___________ + +DOC_MSE_VERSION: since 2.0.2 + +This type contains information on rendered text. + +The text is devided into 'lines', 'paragraphs' and 'blocks. +A line is a line on the screen. +A paragraph is one or more lines, ending in an explicit line break, a "\n" in the text. +A block is one or more paragraphs, ending in a line, "\n". + +It is possible to dig deeper into blocks, for example + +> card_style.text.layout.blocks[1].lines[0].middle + +Is the middle of the first line of the second block. + +--Properties-- +! Property Type Description +| @width@ [[type:double]] Width of this line or group of lines in pixels. +| @height@ [[type:double]] Height of this line or group of lines in pixels. +| @top@ [[type:double]] Top y coordinate +| @middle@ [[type:double]] Middle y coordinate +| @bottom@ [[type:double]] Bottom y coordinate +| @lines@ [[type:list]] of [[type:text layout]]s The lines in this part of the text. +| @paragraphs@ [[type:list]] of [[type:text layout]]s The paragraphs in this part of the text. +| @blocks@ [[type:list]] of [[type:text layout]]s The blocks in this part of the text. +| @separators@ [[type:list]] of [[type:double]]s The y coordinates of separators between blocks. + + + +Value +~~~~~ + +--Overview-- + +A value is something that is 'stored in' a [[type:field]]. + +Values are part of the [[file:style triangle]]: +| Description Looks Data +| [[type:Game]] [[type:Stylesheet]] [[type:Set]] +| [[type:Field]] [[type:Style]] '''Value''' + +--Possible types-- + +The type of a value depends on the corresponding field: +! Field type Value data type Description +| @"text"@ [[type:tagged string]] A piece of text, possibly with markup. +| @"choice"@ [[type:string]] One of the choices of the field. +| @"multiple choice"@ [[type:string]] A list of choices from the field, separated by commas.
    + For example: @"red, green, blue"@. +| @"package choice"@ Name of a package The (file)name of a package, including the extension. +| @"boolean"@ @"yes"@ or @"no"@ This can be directly used as a [[type:boolean]] value in scripts. +| @"image"@ [[type:filename]] Filename of an image file in the [[type:set]] package. +| @"symbol"@ [[type:filename]] Filename of a [[type:symbol]] file in the [[type:set]] package.
    + When accessed from a script, image fields can be directly used as [[type:image]]s. +| @"color"@ opaque [[type:color]] A color. +| @"info"@ [[type:string]] A label for the information box. + +--Example-- +For the field: +>field: +> type: choice +> name: card color +> choice: red +> choice: green +> choice: blue +A value could be: +>card color: red + + +Card +~~~~ + +--Overview-- + +A '''card''' in a [[type:set]]. + +--Properties-- +! Property Type Default Description +| @stylesheet@ Name of a [[type:stylesheet]] ''none'' Use a different stylesheet for this card than the [[type:set]]'s default. +| @has styling@ [[type:boolean]] false This card has styling data different from the set's default. +| @styling data@ [[type:indexmap]] of [[type:value]]s false Styling data, based on the [[type:stylesheet]]'s @style fields@. +| @notes@ [[type:tagged string]] @""@ Notes for this card. +| @time created@ [[type:date]] ''now'' Time at which the card was created. +| @time modified@ [[type:date]] ''now'' Time at which the card was last modified. +| @extra data@ [[type:map]] of [[type:indexmap]]s of [[type:value]]s + Data for the 'extra card fields' of the stylesheet.
    + This is first indexed by stylesheet name, then by field name. +| ''remaining keys'' [[type:indexmap]] of [[type:value]]s The remaining keys contain the data for the game's @card fields@.
    + So for example @card.some_field@ corresponds to the value of the card field @some field@. + +--Examples-- + +With the following game: +>card field: +> type: text +> name: title +>card field: +> type: color +> name: card color + +A card could look like: +>card: +> stylesheet: new +> has styling: false +> notes: This card is not finished yet! +> styling data: +> extra large cards: true +> title: My Card +> card color: rgb(0,128,255) + + +Keyword +~~~~~~~ + +--Overview-- + +A keyword in a [[type:set]] or a [[type:game]]. + +A keyword is something that matches a piece of text, and optionally some kind of reminder text can be shown. + +--Properties-- +! Property Type Default Description +| @keyword@ [[type:string]] ''required'' Name of the keyword. +| @match@ [[type:string]] ''required'' String to match. +| @reminder@ [[type:scriptable]] [[type:string]] ''required'' Script to generate the reminder text of this keyword. +| @rules@ [[type:string]] @""@ Explanation or additional rules for this keyword. +| @mode@ Name of a [[type:keyword mode]] Mode of this keyword. + +The match string can include parameters, @"type"@ where @"type"@ is the name of a [[type:keyword param type|keyword parameter type]] in the game. +These will match according to the @match@ property of that parameter type. + +When expanding the reminder text @param1@ refers to the first parameter in the match string, @param2@ to the second, etc. + +--Example-- +>keyword: +> keyword: Equip +> match: Equip cost +> mode: core +> reminder: {param1}: Attach to target creature you control. Equip only as a sorcery. + + +Keyword Mode +~~~~~~~~~~~~ + +--Overview-- + +A mode for [[type:keyword]]s. + +This becomes a choice in the 'mode' box on the keywords panel. + +The idea behind modes is that a mode indicates what type of keyword it is, for example an "official" keyword, a "simple" keyword or a "custom" keyword. +This information can then be used to determine whether to expand the reminder text. + +--Properties-- +! Property Type Default Description +| @name@ [[type:string]] ''required'' Name of the mode, this is shown in the box and used in scripts. +| @description@ [[type:string]] @""@ A description of this mode. +| @is default@ [[type:boolean]] @false@ Is this the default mode for new keywords? + +--Example-- +>keyword mode: +> name: custom +> description: Custom keywords +> is default: true + + +Keyword Param Type +~~~~~~~~~~~~~~~~~~ + +--Overview-- + +A type of parameter that can be used in a [[type:keyword]]. + +--Properties-- +! Property Type Default Description +| @name@ [[type:string]] ''required'' Name of the parameter type. +| @description@ [[type:string]] ''required'' Description of the parameter type. +| @placeholder@ [[type:string]] @name@ of this param type Placeholder to use for empty parameters, the name is used if this is empty. +| @optional@ [[type:boolean]] @true@ Is a placeholder used when a keyword is encountered with no parameter,
    for example @"Cycling "@ would become @"Cycling cost"@. +| @match@ [[type:regex]] ''required'' Regular expression that this param type matches. +| @separator before is@ [[type:regex]] @""@ Regular expression of separator before parameters of this type. +| @separator after is@ [[type:regex]] @""@ Regular expression of separator after parameters of this type. +| @eat separator@ [[type:boolean]] @true@ Allow the user to 'type over' the separator.
    + For example if the separator is @" "@ in the keyword @"Cycling"@, and the user types @"Cycling"@, + a space and a placeholder is automatically inserted, making @"Cycling "@. + If the user now presses space the cursor is only moved, no additional space is inserted, the space is 'eaten'. +| @script@ [[type:script]] Script to apply to parameters of this type before substituting them back into the text. +| @reminder script@ [[type:script]] Script to apply to parameters of this type before using them in the reminder text. +| @example@ [[type:string]] Example for in the keyword editor, currently not used. +| @refer scripts@ [[type:list]] of [[type:keyword param reference script]]s + Scripts for inserting parameters of this type into the reminder text. + To make this easy for the user, a menu of ways to use a parameter is provided. + +--Example-- +The 'number' parameter type. It matches a sequence of digits. +It can be included in the reminder text directly, or by applying some function first. +>keyword parameter type: +> name: number +> match: [0-9]+ +> refer script: +> name: normal +> description: (1,2,3) +> script: \{{input}\} +> refer script: +> name: as words +> description: (one, two, three) +> script: \{english_number({input})\} + +Keyword Param Reference Script +______________________________ + +--Overview-- + +A way to use a [[type:keyword param type|keyword parameter]] in a [[type:keyword]]'s reminder text. + +Usually the parameters are included as @"{param1}"@, etc. +But in some cases for instance a function should be applied, @"{fun(param1)}"@. + +To make this easy for the user, a menu of choices is provided, this type describes such a choice. + +--Properties-- +! Property Type Default Description +| @name@ [[type:string]] ''required'' Name of the parameter type. +| @description@ [[type:string]] ''required'' A description of the reference script. +| @script@ [[type:script]] ''required'' Script that generates the code using the parameter.
    + This means you will likely need to do some escaping.
    + In the script, @input@ refers to the name of the parameter, for example @"param1"@. + +--Example-- +Apply the [[fun:english_number]] function to the parameter: +>refer script: +> name: as words +> description: (one, two, three) +> script: \{english_number({input})\} + + + +Statistics Dimension +~~~~~~~~~~~~~~~~~~~~ + +--Overview-- + +A dimension or axis for the statistics panel. + +One or more dimensions are combined in a graph, these combinations are called [[type:statistics category]]s. + +Statistics dimensions are automatically generated for all card fields in a [[type:game]] that don't set @show statistics@ to @false@. + +Categories are also automatically generated from dimensions. + +--Properties-- +! Property Type Default Description +| @name@ [[type:string]] ''required'' Name of this dimension, used as an axis label and a label for automatically generated categories. +| @description@ [[type:localized string]] @""@ A description of the dimension, currently not used. +| @position hint@ [[type:string]] @0@ Hint for ordering dimensions. +| @icon@ [[type:filename]] Filename of an icon for this dimension. +| @script@ [[type:script]] ''required'' Script that generates a value for each card in the set. +| @numeric@ [[type:boolean]] @false@ Is the value always a number? +| @bin size@ [[type:double]] ''none'' For numeric dimensions: group numbers together into bins this large.
    + For example with @bin size: 5@, values @1@ and @3@ both get put under @"1-5"@. +| @show empty@ [[type:boolean]] @false@ Should cards with the value @""@ be included? +| @split list@ [[type:boolean]] @false@ Indicates the value is a list of the form @"item1, item2"@. The card is put under both items. +| @colors@ [[type:map]] of opaque [[type:color]]s Colors to use for specific values +| @groups@ [[type:list]] of [[type:string]]s Values to always show, and the order to show them in. + +--Example-- +Automatically generated statistics dimensions look like this: +>statistics dimension: +> name: power +> script: card.power + +Specify a specific order and color of values, otherwise they are ordered alphabeticaly and groups with no cards are not shown: +>statistics dimension: +> name: color +> script: card.color +> group: white +> group: blue +> group: black +> group: red +> group: green +> colors: +> white: rgb(255,255,255) +> blue: rgb(0,0,255) +> black: rgb(0,0,0) +> red: rgb(255,0,0) +> green: rgb(0,255,0) + +Word List +~~~~~~~~~ + +A list of words. Used for drop down lists in the text editor, for example for card types. + +--Properties-- +! Property Type Default Description +| @name@ [[type:string]] ''Required'' Name of this word list, refered to using a @""@ tag. +| @words@ [[type:list]] of [[type:word list word]]s ''Required'' The words in the list + +--Example-- +>word list: +> name: type +> word: Creature +> word: Spell +> word: Artifact +This can be used with for example: +> @"Creature"@ +Which gives the creature choice, and that can be changed with a drop down list. + +Word List Word +~~~~~~~~~~~~~~ + +A word in a [[type:word list]]. + +--Properties-- +! Property Type Default Description +| @name@ [[type:string]] ''Required'' The word. +| @line below@ [[type:boolean]] @false@ Display a line below this item in the list? +| @is prefix@ [[type:boolean]] @false@ Should this word be used as a prefix before another word from the list?
    + Think "Legendary ". Note the space after it, words are directly concatenated. +| @words@ [[type:list]] of [[type:word list word]]s A submenu. If given, the @name@ of this word is only used as a label for the menu. +| @script@ [[type:script]] ''Optional'' A script that determines zero or more words.
    + The result should be a list of comma separated words, for example @"x,y,z"@ specifies three words. + The words are included in the parent menu, not a sub menu. + +A word can also be given in a short form, in that case only the name is specified. + +--Example-- +In short form: +>word: xyz +Is the same as: +>word: +> name: xyz + +Using a script, +>word: +> script: "red,green,blue" +> line below: true +Is the same as +>word: blue +>word: green +>word: +> name: red +> line below: true + + +Add Cards Script +~~~~~~~~~~~~~~~~ + +DOC_MSE_VERSION: since 0.3.7 + +--Overview-- + +A script to add multiple cards to the set at once. + +--Properties-- +! Property Type Default Description +| @name@ [[type:string]] Name of this script; appears in the menu. +| @description@ [[type:string]] @""@ Description of this script; appears in the status bar. +| @enabled@ [[type:scriptable]] [[type:boolean]] @true@ Is this script enabled? +| @script@ [[type:script]] Script that produces the cards.
    + This script should return a [[type:list]] of [[type:card]]s. + The [[fun:new_card]] function can be used to make new cards. + +--Example-- +>add cards script: +> name: &Basic Lands +> description: Adds 5 basic lands to the set. +> script: +> [ new_card([name: "Plains", super_type: "Basic Land", sub_type: "Plains"]) +> , new_card([name: "Island", super_type: "Basic Land", sub_type: "Island"]) +> , new_card([name: "Swamp", super_type: "Basic Land", sub_type: "Swamp"]) +> , new_card([name: "Mountain", super_type: "Basic Land", sub_type: "Mountain"]) +> , new_card([name: "Forest", super_type: "Basic Land", sub_type: "Forest"]) +> ] + +When invoked, this script will add the five basic lands to the set. + + + +Font +~~~~ + +--Overview-- + +A reference to a normal [[type:font]] for drawing text. + +--Properties-- +! Property Type Default Description +| @name@ [[type:scriptable]] [[type:string]] ''required'' Name of the font as it appears in most text programs. +| @italic name@ [[type:scriptable]] [[type:string]] Optionally, a different font to use for italic text instead of the normal italic version of the font. +| @size@ [[type:scriptable]] [[type:double]] ''required'' Size of the font in points on a 96 DPI display. +| @scale down to@ [[type:double]] ∞ Minimum size in points to scale the size down to. +| @max stretch@ [[type:double]] @1.0@ Maximum multiplier by which the width of the text is compressed, so @max width: 0.5@ means the text can be compressed to half the normal width. +| @weight@ [[type:scriptable]] font weight @"normal"@ Weight of the font, one of @"normal"@ or @"bold"@. This can be changed locally by [[type:tagged string|tags]]. +| @style@ [[type:scriptable]] font style @"normal"@ Style of the font, one of @"normal"@ or @"italic"@. This can be changed locally by [[type:tagged string|tags]]. +| @underline@ [[type:scriptable]] [[type:boolean]] @false@ Should the font be underlined? +| @color@ [[type:scriptable]] [[type:color]] @rgb(0,0,0)@ What color should text be drawn in? +| @shadow color@ [[type:scriptable]] [[type:color]] @"transparent"@ Color for a shadow below the text. +| @shadow displacement x@ [[type:double]] @0@ Relative position of the shadow in pixels. +| @shadow displacement y@ [[type:double]] @0@ ^^^ +| @shadow blur@ [[type:double]] @0@ How much should the shadow be blurred? +| @separator color@ [[type:color]] @rgba(0,0,0,128)@ Color for @@ tags inserted by the [[fun:combined_editor]] function. + +--Example-- +>font: +> name: Times new Roman +> size: 17 +> weight: bold +> color: rgb(0,0,0) + + +Symbol Part +~~~~~~~~~~~ + +--Overview-- + +A part of a symbol, corresponds to an item you see in the list on the left of the editor. + +--Properties-- +! Property Type Default Description +| @type@ One of: @"shape"@ What type of symbol part is this? + * @shape@ + * @group@ + * @symmetry@ +| @name@ [[type:string]] @""@ The name of this part, for the part list. + +The rest of the properties depends on the @type@. + +! Type Property Type Default Description +| @"shape"@ @combine@ [[type:symbol combine]] @"overlap"@ How to combine the shape with those below it? +| ^^^ @points@ [[type:list]] of [[type:control point]]s The points that form this shape +| @"symmetry"@ @kind@ @rotation@ or @reflection@ @"rotation"@ What kind of symmetry is this? +| ^^^ @copies@ [[type:int]] 2 How many times is the original copied (including the original itself)? +| ^^^ @center@ [[type:vector2d]] Coordinates of the center of symmetry. +| ^^^ @handle@ [[type:vector2d]] Direction perpendicular to the 'mirror' (this is a direction, so relative to the center). +| @"group"@ and @"symmetry"@ + @parts@ [[type:list]] of [[type:symbol part]]s Parts in this group. + + +--Example-- +Look at a symbol file made with the program. + + +Control Point +~~~~~~~~~~~~~ + +--Overview-- + +A single [[http://en.wikipedia.org/wiki/Bezier_curve|Bézier curve]] control point in a [[type:symbol part|symbol shape]]. + +A control point is a point on the polygon. +It also optionally has two 'handles' corresponding to the boxes attached with dotted lines in the editor. + +The control points of a shape are circular, the point after the last point in the list is the first point. + +--Properties-- +! Property Type Default Description +| @position@ [[type:vector2d]] Position of the control point. +| @lock@ @free@, @direction@ or @size@ @"free"@ + Is this point 'locked', i.e. is the relation between the two handles fixed?
    + If @lock@ is @"direction"@ then the two handles must lie on a line.
    + If @lock@ is @"direction"@ then the two handles must lie exactly oppisite each other on the same distance from the point. +| @line after@ @line@ or @curve@ @"line"@ Is the segment between this control point and the next one in the list a straight line or a cubic Bézier curve? +| @handle before@ [[type:vector2d]] Position of the handle for the segment between this point and the previous one, relative to the point's @position@.
    Only when that point's @line after == "curve"@. +| @handle after@ [[type:vector2d]] Position of the handle for the segment between this point and the next one, relative to the point's @position@.
    Only when @line after == "curve"@. + +--Example-- +Look at a symbol file made with the program. + + + + + + + + + + + + + + + + + + + + +Collection Types +---------------- + +.. list-table:: + :header-rows: 0 + :stub-columns: 1 + :align: left + + * - :doc:`list <#list>` + - Lists of items + * item + * item + * item + * - :doc:`indexmap <#indexmap>` + - Lists indexed by field name + +
    name:someone
    type:something
    + * - :doc:`map <#map>` + - Lists indexed by other text + +List +~~~~ + +--File syntax-- +In files a list is represented as multiple keys, one for each element. +The keys are all in the singular for of the name of the list, +if the list is named for instance @symbols@ each key will be named @symbol@. +>symbol: +> # first symbol here +>symbol: +> # second symbol here +># etc. + +--Script syntax-- +In a script lists can be declared using square brackets. +> [] # An empty list +> [1] # A list with a single element, the value 1 +> [1,2] # A list with two elements + +Lists can be accessed using either the bracket operator, or the dot operator. +The first element of a list is numbered 0, the next 1, etc. +> list.0 # The first element of the list 'list' +> list[0] # The same thing +> list[0+0] # The same thing + +It is possible to iterate over lists using the @for each@ construct: +> for each x in [1,2,3] do "x = {x}. " +evaluates to: +> "x = 1. x = 2. x = 3. " + +--Functions-- +There are several functions for working with lists: +| [[fun:position]] Find the position of an element in a list +| [[fun:number_of_items]] Return the number of items in a list +| [[fun:sort_list]] Sort a list +| [[fun:filter_list]] Filter a list, keeping only elements that match a predicate + + +Field Map +~~~~~~~~~ + +--Overview-- + +A 'field map' is a [[type:map]], but indexed by [[type:field]]s. + +For instance if a game specifies the fields: +>field: +> type: text +> name: field1 +>field: +> type: color +> name: field2 + +Then the a field map of ''things'' for those fields would look like: +>field1: thing +>field2: thing + +A field map of [[type:style]]s would be: +>field1: # some text style for field1 goes here +>field2: # some color style for field2 goes here + +And a field map of [[type:value]]s would be: +>field1: text goes here +>field2: rgb(1,2,3) + +--Script syntax-- + +In a script field maps can be accessed like normal [[type:map]]s based on the field name. +So: +>card.field1 # retrieve the value of field1 +>card["field" + 1] # the same thing +>card_style.field2 # retrieve the styling for field2 + + +Map +~~~ + +A map is like a [[type:list]] with [[type:string]] keys. + +--File syntax-- +In files a map is represented as key/value pairs. +For instance a map of [[type:color]]s could be: +>some map: +> red: rgb(255,0,0) +> green: rgb(0,255,0) +> blue: rgb(0,0,255) + +--Script syntax-- +In a script maps can be declared using square brackets. +> [] # An empty map +> [key:1] # A map with a single element, the value 1 under the key "key" +> [red:rgb(255,0,0), green:rgb(0,255,0)] # A map with two elements + +Like lists, maps can be accessed using either the bracket operator, or the dot operator. +> map.key # The elment named "key" +> map["k"+"ey"] # The same thing + +It is possible to iterate over the values maps using the @for@ construct: +> for each x in [one: 1, two: 2] do "x = {x}. " +evaluates to: +> "x = 1. x = 2. " + + + + + + + + + + + + + + + + + + + + + + + +Script Related +-------------- + +.. list-table:: + :header-rows: 0 + :stub-columns: 1 + :align: left ---Script related-- * - :doc:`script <#script>` - A script to execute to update a field, or for initialization. * - :doc:`scriptable <#scriptable>` @@ -89,7 +1776,145 @@ These contain several properties, similair to the file types. But they are part * - :doc:`function <#function>` - Functions in scripts. These have no direct representation in a file. ---Enumerations-- +Script +~~~~~~ + +--Overview-- + +A script object is a piece of code written in the [[script:index|MSE scripting language]]. + +--File syntax-- + +A script is given in the same way as a [[type:string]]. + +--Example-- +A simple [[type:field]] script that converts everything to upper case: +>script: to_upper(value) + +A larger script, changes @"y"@s to @"x"@s and @"a"@s to @"b"@s: +>script: +> new_value := replace(value, match: "x", replace: "y") +> new_value := replace(value, match: "a", replace: "b") +> new_value + + +Scriptable +~~~~~~~~~~ + +--Overview-- + +Many [[type:style]] properties are ''scriptable''; their value can be changed by a script. + +Consider for example: +>left: 123 +This defines that the left coordinate of a field is 123 pixels. +To script this you can write: +>left: { if card.name == "" then 100 else 123 } +Now the left position depends on whether or not the name is empty. + +--File syntax-- +A 'scriptable something' can take three forms: +# It can be a regular 'something' + >something: 123 +# It can be a script that produces 'something', enclosed in curly braces: + >something: {100 + 23} +# It can be a script that produces 'something', indented and preceded by @script:@: + >something: + > script: 100 + 23 + +Note: To use a multiline script the following does not work: +>something: { 100 + +> 23 } +If the script has multiple lines, it must start on a new line, and be indented with a TAB: +>something: +> { 100 + +> 23 } +or +>something: +> script: 100 + +> 23 + + +Image +~~~~~ + +Images are generated using scripts. + +It is either given using a [[type:filename]] or as the output of a function. + +--File syntax-- +The syntax for files is similair to that of [[type:scriptable]] properties: +> image: image.png +> image: { "image.png" } +> image: { linear_blend(...) } + +--Script syntax-- +[[type:Filename]]s are implicitly converted to images as needed. + +--See also-- +The following functions transform images: +| [[fun:linear_blend]] Blend two images together using a linear gradient. +| [[fun:masked_blend]] Blend two images together using a third mask image. +| [[fun:combine_blend]] Blend two images together using a given [[type:combine|combining mode]]. +| [[fun:set_mask]] Set the transparancy mask of an image. +| [[fun:set_alpha]] Change the transparency of an image. +| [[fun:set_combine]] Chnage how the image should be combined with the background. +| [[fun:enlarge]] Enlarge an image by putting a border around it. +| [[fun:crop]] Crop an image, giving only a small subset of it. +| [[fun:drop_shadow]] Add a drop shadow to an image. +| [[fun:symbol_variation]] Render a variation of a [[type:symbol]]. +| [[fun:built_in_image]] Return an image built into the program. + + +Function +~~~~~~~~ + +--Overview-- +The [[script:index|scripting language]] allows you to define custom functions. + +--Syntax-- +A piece of code enclosed in curly braces defines a function. + +A function can be called using parentheses, for example @function(argument:value)@. + +--Composition-- +Functions can be composed using the @+@ operator, evaluating @a + b@ first evaluates @a@ and uses its result as @input@ for @b@: +> example := to_upper + { "result == {input}" } +> example("xyz") == "result == XYZ" + +Multiple functions can be changed together like this, this is especially convenient in combination with [[script:default arguments]]. + +--Example-- +> example := { a + b } +> example(a: 1, b: 2) == 3 + + + + + + + + + + + + + + + + + + + + +Enumerations +------------ + +.. list-table:: + :header-rows: 0 + :stub-columns: 1 + :align: left + * - :doc:`alignment <#alignment>` - Alignment of text and images. * - :doc:`direction <#direction>` @@ -101,7 +1926,185 @@ These contain several properties, similair to the file types. But they are part * - :doc:`graph type <#graph type>` - Type of statistics graphs. ---Primitive types-- +Alignment +~~~~~~~~~ + +DOC_MSE_VERSION: changed in 0.3.8 + +Specifies how text and images are aligned in boxes. +An alignment consists of: +* horizontal alignment +* vertical alignment +* (optional) how to fill the text box +* (optional) when to fill the text box + +--Script syntax-- +In scripts, alignment is passed around as a string. + +--Possible values-- +The value is a combination of one or more flags, separated by spaces. +These flags can appear in any order. +! Value Description +| @left@ Horizontally, align at the left +| @center@ Horizontally, align in the middle +| @right@ Horizontally, align at the right +| @top@ Vertically, align at the top +| @middle@ Vertically, align in the middle +| @bottom@ Vertically, align at the bottom +| @justify@ Fill the box exactly, by moving words apart/together. +| @justify-all@ Fill the box exactly, by moving individual characters apart/together. +| @stretch@ Fill the box exactly, by stretching the text.
    + For images: stretch them, but preserve the aspect ratio. +| @if-overflow@ Only apply @justify@, @justify-all@ and @stretch@ when the box is overfull. +| @force@ Also justify text at the end of a line in a multiline text field.
    + Normally only lines ending in a soft line break are justified. + +--Examples-- +> alignment: top left +> alignment: middle center +> alignment: top left force justify if-overflow +> alignment: { "middle" + " " + "left" } + + +Direction +~~~~~~~~~ + +Specifies the direction of text flow in a text box. + +--Script syntax-- +In scripts, direction is passed around as a string. + +--Possible values-- +! Value Description +| @left to right@ Text starts at the left. +| @right to left@ Text starts at the right ''(currently not implemented)'' +| @top to bottom@ Text starts at the top, each character is on a new line. +| @bottom to top@ Text starts at the bottom ''(currently not implemented)'' +| @horizontal@ Same as @left to right@. +| @vertical@ Same as @top to bottom@. + +--Examples-- +> direction: horizontal +> direction: top to bottom + + +Combine +~~~~~~~ + +This specifies how an image is to be combined with the background. +This is similair to the feature found in more advanced drawing programs. + +The formula's are from [[http://www.pegtop.net/delphi/articles/blendmodes/]]. + +--Script syntax-- +In scripts, combine modes are stored as a string. + +--Possible values-- +! Value Description +| @normal@ Normal behaviour, don't combine. +| @add@ +| @subtract@ +| @stamp@ +| @difference@ +| @negation@ +| @multiply@ +| @darken@ +| @lighten@ +| @color dodge@ +| @color burn@ +| @screen@ +| @overlay@ +| @hard light@ +| @soft light@ +| @reflect@ +| @glow@ +| @freeze@ +| @heat@ +| and Bitwise and +| or Bitwise or +| xor Bitwise xot +| @shadow@ Dark colors normally, white colors darken the background. +| @symmetric overlay@ @(overlay(a,b) + overlay(b,a)) / 2@ + +--Examples-- +> combine: overlay +> combine_image(image1: ..., image2: ..., combine: "shadow") + + + +Symbol Combine +~~~~~~~~~~~~~~ + +Specifies how symbol shapes are combined with those below it + +--Script syntax-- +In scripts, symbol combine modes are passed around as a string. + +--Possible values-- +The value is one of the following options: +! Value Description +| @overlap@ Place this shape on top of those below it.
    Further combine options only apply to this shape. +| @merge@ Marge this shape with the one below it, they are considered a single shape for further combining. +| @subtract@ Subtract this shape from the one below it. +| @intersection@ Take the intersection of this shape and the one below it, only areas that are in both shapes remain. +| @difference@ Take the difference of this shape and the one below it, only areas that are in exactly one of the shapes remain. +| @border@ Use this shape as additional border for the shape below it. + +--Examples-- +> combine: overlap + + +Graph Type +~~~~~~~~~~ + +Types of graphs for the statistics panel. + +--Possible values-- +The value is one of the following options: +! Value Dimensions Sketch Description +| @bar@ 1 bar graph + One bar for each value on the axis, the height represent the number of cards with that value. +| @pie@ 1 pie graph + A pie graph, the size of the slice represents the numer of cards with a particular value. +| @stack@ 2 stack graph + One bar for each value on the first axis, bars for each value on axis2 are stacked on top of each other. +| @scatter@ 2 scatter graph + Scatter plot, the size of the circles corresponds to the number of cards with those two values. +| @scatter pie@ 3 scatter-pie graph + Scatter plot, the size of the circles corresponds to the number of cards with those two values. + Each circle is a small pie graph for the third axis. + +--Examples-- +> type: bar + + + + + + + + + + + + + + + + + + + + + +Primitive Types +--------------- + +.. list-table:: + :header-rows: 0 + :stub-columns: 1 + :align: left + * - :doc:`string <#string>` - Text, @"abc"@ * - :doc:`tagged string <#tagged string>` @@ -123,17 +2126,413 @@ These contain several properties, similair to the file types. But they are part * - :doc:`date <#date>` - Dates/times -Game -~~~~ +String +~~~~~~ -Stylesheet -~~~~~~~~~~ +A string is just a piece of text. -Set +--File syntax-- +In files, strings are written just as their value: +> string: this is some string +The whitespace at the beginning is removed by the program. +Multiline strings are written on a new line, indented by a TAB: +> string: +> This is a very long string +> It contains a line break. + +--Script syntax-- +In scripts, strings are written between double quotes, @"this is a string"@. +The backslash character is used to escape values: +! Code Represents +| @\"@ A " character +| @\{@ A { character +| @\n@ A newline character (line break) +| @\\@ A backslash +| @\<@ An escaped < for [[type:tagged string]]s. + +Sections between curly braces are interpreted as script code, that is concatentated with the string, for example +> "ab{1 + 1}c" == "ab2c" +This can be nested arbitrarily. + +The @+@ operator concatenates strings. Numbers and most other values are automatically converted to strings when needed. This conversion can be forced with the [[fun:to_string]] function. + +Using the @[]@ or @.@ operator characters in a string can be selected. 0 is the first character: +> "xyz"[0] == "x" +> "xyz".0 == "x" # same thing +> "xyz".1 == "y" +> "xyz".2 == "z" +It is an error to select characters outside the string +> "xyz".10 # error + +--See also-- +| [[type:tagged string]] A string containg tags. +| [[fun:to_string]] Convert any value to a [[type:string]] + + +Tagged String +~~~~~~~~~~~~~ + +--Syntax-- +Strings in [[type:value|text values]] can contain markup tags. +These tags affect the presentation and sometimes the behaviour of the text. + +A tag is something like @"some text"@, similar to HTML. +Tags are closed by the same tag with a @/@ before it. + +To represent the character @"<"@ in a tagged string use @"\<"@ in script code. +This is written as the character with code 1 in files. + +--Basic markup-- +! Tag Description +| @@ The text inside the tag is bold. +| @@ The text inside the tag is italic. +| @@ The text inside the tag is rendered as symbols, if a [[prop:style:symbol font]] is set for the text box. +| @@ The text inside the tag is rendered with the given [[type:color]]. +| @@ The text inside the tag is rendered with the given font size in points, for example @"text"@ makes the text 12 points. The text is scaled down proportionally when it does not fit in a text box and the @scale down to@ attribute allows it. +| @@ The text inside the tag is rendered with the given font family. +| @@ The block inside the tag is aligned with the given horizontal [[type:alignment]] +| @@ The block inside the tag has additional left, right (optional), and top (optional) margins of the specified size in pixels. +| @
  • @ The text inside the tag is treated as a list marker, meaning that if the line wraps it will be indented to match the content of the @
  • @ tag. +| @@ Line breaks inside this tag use the [[prop:style:line height line]], and they show a horizontal line. +| @@ Line breaks inside this tag use the [[prop:style:soft line height]]. +| @@ An atomic piece of text. The cursor can never be inside it; it is selected as a whole. + The program automatically inserts @@. +| @@ The text inside the tag is rendered in a monospace font. This is used for syntax highlighting script code. +| @@ The text inside the tag is highlighted as a keyword in source code. +| @@ The text inside the tag is highlighted as a string in source code. + +--Other tags-- +! Tag Description +| @@ Indicates that the text inside it is a keyword. This tag is automatically inserted by + The [[fun:expand_keywords]] function.
    + There are four versions, indicating whether or not reminder text is shown: + * @@, Reminder text hidden, by default + * @@, Reminder text shown, by default + * @@, Reminder hidden manually + * @@, Reminder shown manually +| @@ A separator between fields. This tag is automatically inserted by the [[fun:combined_editor]] function.
    + Inserting this tag manually will confuse that function!
    + This tag can never be selected, and its contents can not be edited. +| @@ At the beginning of a string, indicates a part that can not be selected. This tag is automatically inserted by the [[fun:combined_editor]] function. +| @@ At the end of a string, indicates a part that can not be selected. This tag is automatically inserted by the [[fun:combined_editor]] function. +| @@ Like @@, only hidden. This is inserted by [[fun:combined_editor]] +| @@ Text who's width is ignored for alignment, similar to @@, but not a separator. +| @@ Indicate that the text inside the tag should be selected from a [[type:word list]]. + The ??? must be the name of a word list in the game. +| @@ The text inside the tag is an error, and is shown with a red wavy underline. +| @@ A spelling error, marked by the [[fun::check_spelling]] function. + The ??? part indicates the language used for spelling checking. +| any other tag Other tags are ignored. + + +--Related functions-- +The following script functions deal with tags: +| [[fun:tag_contents]] Change the contents of a specific tag. +| [[fun:remove_tag]] Remove a tag, keep the contents. +| [[fun:remove_tags]] Remove all tags from tagged text. +| [[fun:to_text]] Remove all tags from tagged text, and convert it to a [[type:string]]. + + +Localized String +~~~~~~~~~~~~~~~~ + +A 'localized string' is a [[type:map]] of [[type::string]]s, indexed by locale name. +It is used to translate games and stylesheets to other user interface languages. + +Localized strings can be given with a @localized@ prefix on the property name. +For example, a field has a @description@ which is a [[type::string]], and a @localized_description@ for localized variants. So + +>field: +> name: cost +> description: How much this card costs +> localized description: +> en_US: How much this card costs +> nl_NL: Hoeveel deze kaart kost + + +Filename +~~~~~~~~ + +Filenames are regular [[type:string]]s, pointing to a file. +There are two types of filenames, relative and absolute: +! Syntax Description +| path/to/file A relative file, this is retrieved from the current package. + i.e. for a filename in a stylesheet, the file is retrieved from that stylesheet. +| /package/path/to/file An absolute filename includes the name of the package. This is a package somewhere in the MSE data directory. + +Don't forget the double quotes (@""@) in scripts. + +--Dependencies-- +When using an absolute filename to refer to a file from another [[file:package]], +the [[type:dependency]] on that package must be declared. +For example, +>include file: /common.mse-include/something +Will give a warning message, unless the file also lists +>depends on: +> package: common.mse-include +> version: 2007-01-01 + + +Dependency +__________ + +--Overview-- + +[[type:Package]]s can depend on other packages. +For example a [[type:stylesheet]] needs a particular version of the corresponding [[type:game]] package, and maybe some additional [[type:include]]s. + +--Properties-- +! Property Type Description +| @package@ [[type:string]] Filename of the package this package depends on. +| @version@ [[type:version]] Minimal version of that package that is required. + +The two properties can also be written on a single line, separated by a space (see the examples). + +--Example-- +The magic-new stylesheet depends on a particular version of the game file: +>depends on: +> package: magic.mse-game +> version: 2007-06-06 +This can be written more compactly as +>depends on: magic.mse-game 2007-06-06 + + + +Regex +~~~~~ + +Regular expressions (regexes) are things that can match parts of [[type:string]]s. + +Regexes are represented by normal [[type:string]]s. +Note that to escape something in a regex the backslash is used, in script code this also needs to be escaped. +For example, in a script, the regex matching a single backslash is @"\\\\"@. + +For more information, see +[[http://www.wxwidgets.org/manuals/stable/wx_wxresyn.html|the wxWidgets regular expression documentation]]. + + +Boolean +~~~~~~~ + +A boolean is either @true@ or @false@. + +In a script, numbers are implicitly converted to booleans, a non-zero number is @true@, 0 is @false@. + +When converted to a number, @true@ becomes @1@ and @false@ becomes @0@. + +The strings @"yes"@ and @"no"@ can also be converted to booleans. + +--File syntax-- +> boolean: true +> boolean: false + +--Script syntax-- +> true or false + +The operators @or@, @and@ and @xor@ combine two booleans: +! @a@ @b@ a or b a and b a xor b +| @false@ @false@ @false@ @false@ @false@ +| @false@ @true@ @true@ @false@ @true@ +| @true@ @false@ @true@ @false@ @true@ +| @true@ @true@ @true@ @true@ @false@ + +--See also-- +| [[fun:to_boolean]] Convert a value to a boolean + + +Int ~~~ -Symbol Font -~~~~~~~~~~~ +Integer numbers are numbers without a decimal point. +In many cases negative numbers don't make sense, but the program never complains about them. + +--File syntax-- +> something: 123 + +--Script syntax-- +> 123 + 456 * -1 + +--See also-- +| [[type:double]] Number type that can contain fractional values. +| [[fun:to_int]] Convert a value to an integer number + + +Double +~~~~~~ + +Real or floating point numbers are numbers with a decimal point. + +Conversion from integer to real numbers happens automatically in scripting. + +--File syntax-- +> something: 123 +> something: 0.5 + +--Script syntax-- +> 123.1 + 456 * -1 + +--See also-- +| [[type:int]] Integer numbers +| [[fun:to_real]] Convert a value to a real number + + +Version +~~~~~~~ + +--File syntax-- +A version number consists of three components, in the form "a.b.c". +Higher numbers mean newer versions. + +The version number can also be a date, of the form "YYYY-MM-DD" + +--Examples-- +> version: 1.2.3 +> version: 2007-07-12 + + +Color +~~~~~ + +--Syntax-- +In files and scritps a color can be represented as +
    rgb(red_component, green_component, blue_component)
    +where red_component, green_component and blue_component are numbers between 0 and 255 (inclusive). + +In most places MSE also supports colors with a transparency value, notated as +
    rgba(red_component, green_component, blue_component, alpha_component)
    +An alpha value of @0@ indicates a transparent color, an alpha value of @255@ is completely opaque. + +You can also use HTML style hexadecimal colors, +
    #rgb, #rgba, #rrggbb, #rrggbbaa
    +For example, #ff0000 is red, as is #f00 + +--Named colors-- +MSE also supports named colors, for instance @"white"@ is the same as @rgb(255,255,255)@. +For a full list of supported colors, see [[https://docs.wxwidgets.org/3.0/classwx_colour_database.html|the wxWidgets documentation]]. +In addition, the named color @"transparent"@ stands for the completely transparent color, @rgba(0,0,0,0)@. + +In scripts named colors are represented as [[type:string]]s. + +--Examples-- +For example: +! Code Represents <<< +| @rgb(255,255,255)@ white
    +| @rgb(0,0,0)@ black
    +| @rgb(255,0,0)@ red
    +| @rgb(0,255,0)@ green
    +| @rgb(0,0,255)@ blue
    +| @rgba(0,0,0,0)@ transparent
    over
    +| @rgba(255,0,0,128)@ transparent red
    over
    +| @rgba(0,0,255,192)@ transparent blue
    over
    + +--See also-- +| [[fun:to_color]] Convert any value to a color + +Date +~~~~ + +DOC_MSE_VERSION: since 0.3.8 + +A point in time, consisting of a date and a time. +The file syntax uses [[http://en.wikipedia.org/wiki/ISO_8601|ISO 8601]] notation. + +--File syntax-- +> something: 2008-12-31 23:59:59 + +--See also-- +| [[fun:to_date]] Convert a value to a date +| [[fun:to_string]] Convert dates to strings + + + +Choice +~~~~~~ + +A possible choice for a choice [[type:field]]. + +--Properties-- +! Property Type Default Description +| @name@ [[type:string]] ''Required'' Name of this choice, displayed in the drop down list. +| @line below@ [[type:boolean]] @false@ Display a line below this item? +| @group choice@ [[type:string]] ''no'' Can this submenu of choices itself be selected? +| @choices@ [[type:list]] of [[type:choice]]s Submenu of choices. +| @enabled@ [[type:scriptable]] [[type:boolean]] Is this choice selectable? +| @type@ @"check"@ or @"radio"@ @"check"@ How should this choice be displayed? As a checkbox or a radio box?
    + Only applies to multiple choice fields. + +A choice can also be given in a short form, in that case only the name is specified. + +--Names-- + +The full name of a choice is that of the choice and its parents, separated by spaces. +This is the value actually stored in values and manipulated by scripts. + +For example +>field: +> type: choice +> choice: +> name: large +> choice: red +> choice: blue +> choice: +> name: small +> group choice: just small +> choice: green +> choice: yellow + +The choice red is called @"large red"@, while green is @"small green"@. +The group choice 'just small' gets the name of the group, @"small"@. + +--Example-- +In short form: +>choice: apples +Is the same as: +>choice: +> name: apples + +Color Choice +~~~~~~~~~~~~ + +A possible choice for a color [[type:field]]. + +--Properties-- +! Property Type Description +| @name@ [[type:string]] Name of this choice, displayed in the drop down list. +| @color@ opaque [[type:color]] Color this choice corresponds with. + +--Example-- +>choice: +> name: red +> color: rgb(255,0,0) + + +Vector2D +~~~~~~~~ + +AKA: Two Dimensional Vector + +A coordinate or direction in a symbol. +This is a pair of [[type:double]]s. + +The coordinates are usually in the range @0@ to @1@. +@(0,0)@ is the top-left of the symbol, @(1,1)@ the bottom-right. + +--File syntax-- +> (x-coordinate,y-coordinate) +For example +> (0.5,0.5) + +--Script syntax-- +Vectors can not be represented in script syntax. + + + + + + + + + + + -Export Template -~~~~~~~~~~~~~~~ diff --git a/doc/type/style-angle-examples.png b/docs/type/style-angle-examples.png similarity index 100% rename from doc/type/style-angle-examples.png rename to docs/type/style-angle-examples.png diff --git a/doc/type/style-angle.png b/docs/type/style-angle.png similarity index 100% rename from doc/type/style-angle.png rename to docs/type/style-angle.png diff --git a/doc/type/style-positioning.png b/docs/type/style-positioning.png similarity index 100% rename from doc/type/style-positioning.png rename to docs/type/style-positioning.png diff --git a/doc/type/style-text-mask.png b/docs/type/style-text-mask.png similarity index 100% rename from doc/type/style-text-mask.png rename to docs/type/style-text-mask.png From da76b5137199e6df2300c0348ac2c1c5211c616c Mon Sep 17 00:00:00 2001 From: Brendan Hagan Date: Wed, 31 Aug 2022 20:09:59 -0400 Subject: [PATCH 15/24] misc: start converting tables --- docs/type/index.rst | 3163 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 2536 insertions(+), 627 deletions(-) diff --git a/docs/type/index.rst b/docs/type/index.rst index a550aa29..83388923 100644 --- a/docs/type/index.rst +++ b/docs/type/index.rst @@ -41,9 +41,21 @@ Game --Overview-- Games are part of the [[file:style triangle]]: -| Description Looks Data -| '''Game''' [[type:Stylesheet]] [[type:Set]] -| [[type:Field]] [[type:Style]] [[type:Value]] + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Description + - Looks + - Data + * - '''Game''' + - [[type:Stylesheet]] + - [[type:Set]] + * - [[type:Field]] + - [[type:Style]] + - [[type:Value]] Games provide the ''description'', i.e. what kinds of things are on a card. @@ -53,36 +65,114 @@ A game is described in a [[file:package]] with the .mse-game file exten Such a package contains a [[file:format|data file]] called game that has the following properties. --Properties-- -! Property Type Default Description -| '''Common to all packages''' <<< <<< <<< -| @mse version@ [[type:version]] ''required'' Version of MSE this game is made for. -| @short name@ [[type:string]] file name A short name of this game, for the 'new set' list. -| @full name@ [[type:string]] file name A longer name of this game. -| @icon@ [[type:filename]] ''none'' Filename of an icon / preview for this game, for the 'new set' list. -| @position hint@ [[type:int]] ∞ Where to place this item in the 'new set' list? Lower numbers come first. -| @version@ [[type:version]] @0.0.0@ Version number of this package. -| @depends on@ [[type:list]] of [[type:dependency]]s + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Property + - Type + - Default + - Description + * - '''Common to all packages''' + - <<< + - <<< + - <<< + * - @mse version@ + - [[type:version]] + - ''required'' + - Version of MSE this game is made for. + * - @short name@ + - [[type:string]] + - file name + - A short name of this game, for the 'new set' list. + * - @full name@ + - [[type:string]] + - file name + - A longer name of this game. + * - @icon@ + - [[type:filename]] + - ''none'' + - Filename of an icon / preview for this game, for the 'new set' list. + * - @position hint@ + - [[type:int]] + - ∞ + - Where to place this item in the 'new set' list? Lower numbers come first. + * - @version@ + - [[type:version]] + - @0.0.0@ + - Version number of this package. + * - @depends on@ + - [[type:list]] of [[type:dependency]]s Packages this package depends on. - -| '''Specific to games''' <<< <<< <<< -| @init script@ [[type:script]] @;@ Script to run when this game is loaded,
    can set variables + * - '''Specific to games''' + - <<< + - <<< + - <<< + * - @init script@ + - [[type:script]] + - @;@ + - Script to run when this game is loaded,
    can set variables to be used by other scripts in this game or stylesheets using it. -| @set fields@ [[type:list]] of [[type:field]]s Fields for the styling panel. -| @default set style@ [[type:indexmap]] of [[type:style]]s Default style for the set fields, can be overridden by the stylesheet. -| @card fields@ [[type:list]] of [[type:field]]s Fields for each card. -| @card list color script@ [[type:script]] from fields Script that determines the color of an item in the card list.
    If not set uses the @card list colors@ property of the first card field that has it. -| @statistics dimensions@ [[type:list]] of [[type:statistics dimension]]s from fields Dimensions for statistics, a dimension is roughly the same as an axis.
    By default all card fields with 'show statistics' set to true are used. -| @statistics categories@ [[type:list]] of [[type:statistics category]]s from dimensions DOC_MSE_VERSION: not used since 0.3.6 + * - @set fields@ + - [[type:list]] of [[type:field]]s + - + - Fields for the styling panel. + * - @default set style@ + - [[type:indexmap]] of [[type:style]]s + - + - Default style for the set fields, can be overridden by the stylesheet. + * - @card fields@ + - [[type:list]] of [[type:field]]s + - + - Fields for each card. + * - @card list color script@ + - [[type:script]] + - from fields + - Script that determines the color of an item in the card list.
    If not set uses the @card list colors@ property of the first card field that has it. + * - @statistics dimensions@ + - [[type:list]] of [[type:statistics dimension]]s + - from fields + - Dimensions for statistics, a dimension is roughly the same as an axis.
    By default all card fields with 'show statistics' set to true are used. + * - @statistics categories@ + - [[type:list]] of [[type:statistics category]]s + - from dimensions + - DOC_MSE_VERSION: not used since 0.3.6 Choices shown on the statistics panel.
    By default all statistics dimensions are used. -| @pack types@ [[type:list]] of [[type:pack type]]s DOC_MSE_VERSION: since 0.3.7 + * - @pack types@ + - [[type:list]] of [[type:pack type]]s + - + - DOC_MSE_VERSION: since 0.3.7 The types of card packs that will be listed on the random booster panel. -| @has keywords@ [[type:boolean]] @false@ Does this game use keywords? Should the keywords tab be available? -| @keyword match script@ [[type:script]] @;@ Script to apply to the @match@ property of keywords. -| @keyword modes@ [[type:list]] of [[type:keyword mode]]s Choices for the 'mode' property of keywords. -| @keyword parameter types@ [[type:list]] of [[type:keyword param type]]s Types of parameters available to keywords. -| @keywords@ [[type:list]] of [[type:keyword]]s Standard keywords for this game. -| @word lists@ [[type:list]] of [[type:word list]]s Word lists that can be used by text fields. -| @add cards script@ [[type:list]] of [[type:add cards script]]s DOC_MSE_VERSION: since 0.3.7 + * - @has keywords@ + - [[type:boolean]] + - @false@ + - Does this game use keywords? Should the keywords tab be available? + * - @keyword match script@ + - [[type:script]] + - @;@ + - Script to apply to the @match@ property of keywords. + * - @keyword modes@ + - [[type:list]] of [[type:keyword mode]]s + - + - Choices for the 'mode' property of keywords. + * - @keyword parameter types@ + - [[type:list]] of [[type:keyword param type]]s + - + - Types of parameters available to keywords. + * - @keywords@ + - [[type:list]] of [[type:keyword]]s + - + - Standard keywords for this game. + * - @word lists@ + - [[type:list]] of [[type:word list]]s + - + - Word lists that can be used by text fields. + * - @add cards script@ + - [[type:list]] of [[type:add cards script]]s + - + - DOC_MSE_VERSION: since 0.3.7 A list of scripts for conveniently adding multiple cards to a set. --Examples-- @@ -94,9 +184,21 @@ Stylesheet --Overview-- Stylesheets are part of the [[file:style triangle]]: -| Description Looks Data -| [[type:Game]] '''Stylesheet''' [[type:Set]] -| [[type:Field]] [[type:Style]] [[type:Value]] + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Description + - Looks + - Data + * - [[type:Game]] + - '''Stylesheet''' + - [[type:Set]] + * - [[type:Field]] + - [[type:Style]] + - [[type:Value]] Stylesheets provide the ''look and feel'' of cards. @@ -105,31 +207,101 @@ A stylesheet is described in a [[file:package]] with the .mse-style fil such a package contains a data file called style. --Properties-- -! Property Type Default Description -| '''Common to all packages''' <<< <<< <<< -| @mse version@ [[type:version]] ''required'' Version of MSE this stylesheet is made for. -| @short name@ [[type:string]] file name A short name of this stylesheet, for the 'new set' and style panel lists. -| @full name@ [[type:string]] file name A longer name of this stylesheet. -| @icon@ [[type:filename]] ''none'' Filename of an icon / preview for this stylesheet, for the 'new set' and style panel lists. -| @position hint@ [[type:int]] ∞ Where to place this item in the list? Lower numbers come first. -| @version@ [[type:version]] @0.0.0@ Version number of this package. -| @depends on@ [[type:list]] of [[type:dependency]]s + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Property + - Type + - Default + - Description + * - '''Common to all packages''' + - <<< + - <<< + - <<< + * - @mse version@ + - [[type:version]] + - ''required'' + - Version of MSE this stylesheet is made for. + * - @short name@ + - [[type:string]] + - file name + - A short name of this stylesheet, for the 'new set' and style panel lists. + * - @full name@ + - [[type:string]] + - file name + - A longer name of this stylesheet. + * - @icon@ + - [[type:filename]] + - ''none'' + - Filename of an icon / preview for this stylesheet, for the 'new set' and style panel lists. + * - @position hint@ + - [[type:int]] + - ∞ + - Where to place this item in the list? Lower numbers come first. + * - @version@ + - [[type:version]] + - @0.0.0@ + - Version number of this package. + * - @depends on@ + - [[type:list]] of [[type:dependency]]s Packages this package depends on. -| '''Specific to stylesheets''' <<< <<< <<< -| @game@ Name of a [[type:game]] ''required'' Game this stylesheet is made for -| @card width@ [[type:double]] 100 Width of cards in pixels -| @card height@ [[type:double]] 100 Height of cards in pixels -| @card dpi@ [[type:double]] 96 Resolution of cards in dots-per-inch -| @card background@ [[type:color]] white Background color of cards -| @init script@ [[type:script]] @;@ Script to run when this stylesheet is loaded, after the game's init script. -| @styling fields@ [[type:list]] of [[type:field]]s Fields for styling options, shown on the 'style' panel. -| @styling style@ [[type:indexmap]] of [[type:style]]s Styles for the styling fields. -| @set info style@ [[type:indexmap]] of [[type:style]]s game.default_set_style Styling for the 'set info' panel -| @card style@ [[type:indexmap]] of [[type:style]]s Styles for the card fields defined in the game -| @extra card fields@ [[type:list]] of [[type:field]]s Additional fields to add to each card.
    + * - '''Specific to stylesheets''' + - <<< + - <<< + - <<< + * - @game@ + - Name of a [[type:game]] + - ''required'' + - Game this stylesheet is made for + * - @card width@ + - [[type:double]] + - 100 + - Width of cards in pixels + * - @card height@ + - [[type:double]] + - 100 + - Height of cards in pixels + * - @card dpi@ + - [[type:double]] + - 96 + - Resolution of cards in dots-per-inch + * - @card background@ + - [[type:color]] + - white + - Background color of cards + * - @init script@ + - [[type:script]] + - @;@ + - Script to run when this stylesheet is loaded, after the game's init script. + * - @styling fields@ + - [[type:list]] of [[type:field]]s + - + - Fields for styling options, shown on the 'style' panel. + * - @styling style@ + - [[type:indexmap]] of [[type:style]]s + - + - Styles for the styling fields. + * - @set info style@ + - [[type:indexmap]] of [[type:style]]s + - game.default_set_style + - Styling for the 'set info' panel + * - @card style@ + - [[type:indexmap]] of [[type:style]]s + - + - Styles for the card fields defined in the game + * - @extra card fields@ + - [[type:list]] of [[type:field]]s + - + - Additional fields to add to each card.
    These fields are intended for things like lines and boxes, whose value is determined automatically. -| @extra card style@ [[type:indexmap] of [[type:style]]s Styling for the extra card fields + * - @extra card style@ + - [[type:indexmap] of [[type:style]]s + - + - Styling for the extra card fields Set ~~~ @@ -137,34 +309,86 @@ Set --Overview-- Sets are part of the [[file:style triangle]]: -| Description Looks Data -| [[type:Game]] [[type:Stylesheet]] '''Set''' -| [[type:Field]] [[type:Style]] [[type:Value]] + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Description + - Looks + - Data + * - [[type:Game]] + - [[type:Stylesheet]] + - '''Set''' + * - [[type:Field]] + - [[type:Style]] + - [[type:Value]] --Package format-- A set is described in a [[file:package]] with the .mse-set file extension, such a package contains a data file called set. --Properties-- -! Property Type Default Description -| '''Common to all packages''' <<< <<< <<< -| @mse version@ [[type:version]] ''required'' Version of MSE this set is made with. -| @short name@ [[type:string]] file name Name of this set. -| @depends on@ [[type:list]] of [[type:dependency]]s + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Property + - Type + - Default + - Description + * - '''Common to all packages''' + - <<< + - <<< + - <<< + * - @mse version@ + - [[type:version]] + - ''required'' + - Version of MSE this set is made with. + * - @short name@ + - [[type:string]] + - file name + - Name of this set. + * - @depends on@ + - [[type:list]] of [[type:dependency]]s Packages this package depends on. - -| '''Specific to sets''' <<< <<< <<< -| @game@ Name of a [[type:game]] ''required'' The game this set is made for. -| @stylesheet@ Name of a [[type:stylesheet]] ''required'' The default style for drawing cards in this set.
    + * - '''Specific to sets''' + - <<< + - <<< + - <<< + * - @game@ + - Name of a [[type:game]] + - ''required'' + - The game this set is made for. + * - @stylesheet@ + - Name of a [[type:stylesheet]] + - ''required'' + - The default style for drawing cards in this set.
    This is without the game name or extension, so @"new"@ refers to the package @"gamename-new.mse-style"@. -| @set info@ [[type:indexmap]] of [[type:value]]s The data for the [[prop:game:set fields]] defined in the game. -| @styling@ [[type:map]] of [[type:indexmap]]s of [[type:value]]s + * - @set info@ + - [[type:indexmap]] of [[type:value]]s + - + - The data for the [[prop:game:set fields]] defined in the game. + * - @styling@ + - [[type:map]] of [[type:indexmap]]s of [[type:value]]s Data for the 'extra fields' of the stylesheet.
    This is first indexed by stylesheet name, then by field name.
    Data is given not only for the set's stylesheet but also for those of cards. -| @cards@ [[type:list] of [[type:card]]s The cards in the set. -| @keywords@ [[type:list] of [[type:keyword]]s The custom keywords in the set. -| @pack types@ [[type:list]] of [[type:pack type]]s DOC_MSE_VERSION: since 0.3.8 + * - @cards@ + - [[type:list] of [[type:card]]s + - + - The cards in the set. + * - @keywords@ + - [[type:list] of [[type:keyword]]s + - + - The custom keywords in the set. + * - @pack types@ + - [[type:list]] of [[type:pack type]]s + - + - DOC_MSE_VERSION: since 0.3.8 The custom card pack types in the set. --Example-- @@ -212,16 +436,46 @@ A pack type contains either: * a combination of the above. --Properties-- -! Property Type Default Description -| @name@ [[type:string]] Name of this card pack type. + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Property + - Type + - Default + - Description + * - @name@ + - [[type:string]] + - + - Name of this card pack type. Other pack types can refer to this name. -| @select@ see below see below How are instances of this pack generated? -| @enabled@ [[type:scriptable]] [[type:boolean]] @true@ Is this pack type enabled, i.e. can the user select it? -| @selectable@ [[type:boolean]] @true@ Is this pack selectable from the list of packs in the user interface? -| @summary@ [[type:boolean]] @true@ Is a summary of the total number of cards shown in the second panel in the user interface?
    + * - @select@ + - see below + - see below + - How are instances of this pack generated? + * - @enabled@ + - [[type:scriptable]] [[type:boolean]] + - @true@ + - Is this pack type enabled, i.e. can the user select it? + * - @selectable@ + - [[type:boolean]] + - @true@ + - Is this pack selectable from the list of packs in the user interface? + * - @summary@ + - [[type:boolean]] + - @true@ + - Is a summary of the total number of cards shown in the second panel in the user interface?
    Note: this only applies to pack types that have the @filter@ property set. -| @filter@ [[type:script]] ''optional'' Condition that a card must satisfy to be included in this pack type. -| @items@ [[type:list]] of [[type:pack item]]s The items to include in this pack. + * - @filter@ + - [[type:script]] + - ''optional'' + - Condition that a card must satisfy to be included in this pack type. + * - @items@ + - [[type:list]] of [[type:pack item]]s + - + - The items to include in this pack. --Selection-- @@ -229,24 +483,39 @@ The @select@ property specifies how instances of this pack are generated. When the user selects that he wants 3 copies of pack X, then MSE will generate three ''instances'' of that pack. How that happens depends on the @select@ property: -! @select@ Description -| @all@ Each instance of this pack type contains all of the filtered cards and @items@.
    +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - @select@ + - Description + * - @all@ + - Each instance of this pack type contains all of the filtered cards and @items@.
    In general, @select: all@ is used for the selectable pack types, while other @select@ types are used for the rest of the packs.
    This is the default for pack types with @items@. -| @replace@ Each instance of this pack type contains a single card or @item@, chosen at random with replacement. + * - @replace@ + - Each instance of this pack type contains a single card or @item@, chosen at random with replacement. The probability of picking an item is proportional to its @weight@, all filtered cards have weight 1. -| @no replace@ Each instance of this pack type contains a single card or @item@, chosen at random without replacement. + * - @no replace@ + - Each instance of this pack type contains a single card or @item@, chosen at random without replacement. This means that the same card or item will not be chosen twice (if the set is large enough).
    This is the default for pack types with a @filter@. -| @proportional@ Each instance of this pack type contains a single filtered card or @item@, chosen with probability proportional to the number of choices for the card/item. + * - @proportional@ + - Each instance of this pack type contains a single filtered card or @item@, chosen with probability proportional to the number of choices for the card/item. The choice is made with replacement. -| @nonempty@ Each instance of this pack type contains a single filtered card or @item@, + * - @nonempty@ + - Each instance of this pack type contains a single filtered card or @item@, but items that contain no cards will be ignored. The choice is made with replacement. -| @equal@ Instead of choosing cards and items at random, they are chosen to make their numbers as equal as possible. -| @equal proportional@ A combination of @equal@ and @proportional@. -| @equal nonempty@ A combination of @equal@ and @nonempty@. -| @first@ If there are any cards, the first is always chosen, otherwise the first ''nonempty'' item is used.
    + * - @equal@ + - Instead of choosing cards and items at random, they are chosen to make their numbers as equal as possible. + * - @equal proportional@ + - A combination of @equal@ and @proportional@. + * - @equal nonempty@ + - A combination of @equal@ and @nonempty@. + * - @first@ + - If there are any cards, the first is always chosen, otherwise the first ''nonempty'' item is used.
    @select: first@ can be used to make a kind of if statement: "If there are any X cards then use those, otherwise use Y cards". --Examples-- @@ -318,10 +587,28 @@ DOC_MSE_VERSION: since 0.3.8 A reference to another [[type:pack type]], from which one or more cards are chosen. --Properties-- -! Property Type Default Description -| @name@ Name of a [[type:pack item]] ''required'' Name of the pack item to include in this pack. -| @amount@ [[type:scriptable]] [[type:int]] 1 How many of those cards are in the pack? -| @weight@ [[type:scriptable]] [[type:double]] 1 How 'important' is this item? + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Property + - Type + - Default + - Description + * - @name@ + - Name of a [[type:pack item]] + - ''required'' + - Name of the pack item to include in this pack. + * - @amount@ + - [[type:scriptable]] [[type:int]] + - 1 + - How many of those cards are in the pack? + * - @weight@ + - [[type:scriptable]] [[type:double]] + - 1 + - How 'important' is this item? Items with a higher weight will be chosen more often. Cards from @filter@ will have a weight of 1. @@ -372,23 +659,71 @@ A symbol font is described in a [[file:package]] with the .mse-symbol-fontsymbol-font that has the following properties. --Properties-- -! Property Type Default Description -| '''Common to all packages''' <<< <<< <<< -| @mse version@ [[type:version]] ''required'' Version of MSE this symbol font is made for. -| @short name@ [[type:string]] file name A short name of this symbol font, currently not used by the program. -| @full name@ [[type:string]] file name A longer name of this symbol font, currently not used by the program. -| @icon@ [[type:filename]] ''none'' Filename of an icon, currently not used by the program. -| @version@ [[type:version]] @0.0.0@ Version number of this package. -| @depends on@ [[type:list]] of [[type:dependency]]s + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Property + - Type + - Default + - Description + * - '''Common to all packages''' + - <<< + - <<< + - <<< + * - @mse version@ + - [[type:version]] + - ''required'' + - Version of MSE this symbol font is made for. + * - @short name@ + - [[type:string]] + - file name + - A short name of this symbol font, currently not used by the program. + * - @full name@ + - [[type:string]] + - file name + - A longer name of this symbol font, currently not used by the program. + * - @icon@ + - [[type:filename]] + - ''none'' + - Filename of an icon, currently not used by the program. + * - @version@ + - [[type:version]] + - @0.0.0@ + - Version number of this package. + * - @depends on@ + - [[type:list]] of [[type:dependency]]s Packages this package depends on. - -| '''Specific to symbol fonts''' <<< <<< <<< -| @image font size@ [[type:double]] @12@ To what point size do the images correspond? -| @horizontal space@ [[type:double]] @0@ Horizontal spacing between symbols, in pixels. -| @vertical space@ [[type:double]] @0@ Vertical spacing between symbols, in pixels. -| @symbols@ [[type:list]] of [[type:symbol font symbol]]s Symbols that make up this font. -| @scale text@ [[type:boolean]] @false@ Should text be scaled down to fit in a symbol? -| @insert symbol menu@ [[type:insert symbol menu|"insert symbol" menu]] ''none'' A description of the menu to insert a symbol into the text. + * - '''Specific to symbol fonts''' + - <<< + - <<< + - <<< + * - @image font size@ + - [[type:double]] + - @12@ + - To what point size do the images correspond? + * - @horizontal space@ + - [[type:double]] + - @0@ + - Horizontal spacing between symbols, in pixels. + * - @vertical space@ + - [[type:double]] + - @0@ + - Vertical spacing between symbols, in pixels. + * - @symbols@ + - [[type:list]] of [[type:symbol font symbol]]s + - + - Symbols that make up this font. + * - @scale text@ + - [[type:boolean]] + - @false@ + - Should text be scaled down to fit in a symbol? + * - @insert symbol menu@ + - [[type:insert symbol menu|"insert symbol" menu]] + - ''none'' + - A description of the menu to insert a symbol into the text. --Examples-- See for instance the @"magic-mana-small.mse-symbol-font"@ package in the MSE distribution. @@ -403,12 +738,31 @@ A reference to a [[type:symbol font]]. In [[type:stylesheet]]s the symbol fonts are not included inline, instead they are referenced by their package name. --Properties-- -! Property Type Default Description -| @name@ [[type:scriptable]] Name of a [[type:symbol font]] + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Property + - Type + - Default + - Description + * - @name@ + - [[type:scriptable]] Name of a [[type:symbol font]] ''required'' Name of the symbol font package to use (without the extension). -| @size@ [[type:scriptable]] [[type:double]] 12 Size in points to render the symbols with. -| @scale down to@ [[type:double]] 1 Minimum size in points to scale the size down to. -| @alignment@ [[type:scriptable]] [[type:alignment]] @"middle center"@ Alignment of symbols in a line of text. + * - @size@ + - [[type:scriptable]] [[type:double]] + - 12 + - Size in points to render the symbols with. + * - @scale down to@ + - [[type:double]] + - 1 + - Minimum size in points to scale the size down to. + * - @alignment@ + - [[type:scriptable]] [[type:alignment]] + - @"middle center"@ + - Alignment of symbols in a line of text. --Example-- >symbol font: @@ -429,21 +783,66 @@ __________________ A single symbol in a [[type:symbol font]]. --Properties-- -! Property Type Default Description -| @image font size@ [[type:double]] value from symbol font To what point size does the images correspond? -| @code@ [[type:string]] or [[type:regex]] ''required'' Text this symbol matches. -| @regex@ [[type:boolean]] @false@ Is the code a regular expression (as opposed to a string)? -| @image@ [[type:scriptable]] [[type:image]] ''required'' Image of this symbol. -| @enabled@ [[type:scriptable]] [[type:boolean]] @true@ Is this symbol actually used?
    + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Property + - Type + - Default + - Description + * - @image font size@ + - [[type:double]] + - value from symbol font + - To what point size does the images correspond? + * - @code@ + - [[type:string]] or [[type:regex]] + - ''required'' + - Text this symbol matches. + * - @regex@ + - [[type:boolean]] + - @false@ + - Is the code a regular expression (as opposed to a string)? + * - @image@ + - [[type:scriptable]] [[type:image]] + - ''required'' + - Image of this symbol. + * - @enabled@ + - [[type:scriptable]] [[type:boolean]] + - @true@ + - Is this symbol actually used?
    This can be scripted to optionally disable certain symbols.
    If multiple symbols with the same code are given disabling the first switches to the second one. -| @draw text@ [[type:int]] @-1@ The index of the captured regex expression to draw as text, or -1 to not draw text.
    For example with the code @"x([a-z])"@ and @draw text: 1@ the text of the symbol @"xb"@ will be @"b"@. -| @text font@ [[type:font]] Font to use for drawing text on symbols. The font size is in font points per text box font point. -| @text alignment@ [[type:alignment]] @"middle center"@ How should text be aligned on the symbol? -| @text margin left@ [[type:double]] @0@ Margin on the left of the text in pixels per point. -| @text margin right@ [[type:double]] @0@ Margin on the right of the text in pixels per point. -| @text margin top@ [[type:double]] @0@ Margin on the top of the text in pixels per point. -| @text margin bottom@ [[type:double]] @0@ Margin on the bottom of the text in pixels per point. + * - @draw text@ + - [[type:int]] + - @-1@ + - The index of the captured regex expression to draw as text, or -1 to not draw text.
    For example with the code @"x([a-z])"@ and @draw text: 1@ the text of the symbol @"xb"@ will be @"b"@. + * - @text font@ + - [[type:font]] + - + - Font to use for drawing text on symbols. The font size is in font points per text box font point. + * - @text alignment@ + - [[type:alignment]] + - @"middle center"@ + - How should text be aligned on the symbol? + * - @text margin left@ + - [[type:double]] + - @0@ + - Margin on the left of the text in pixels per point. + * - @text margin right@ + - [[type:double]] + - @0@ + - Margin on the right of the text in pixels per point. + * - @text margin top@ + - [[type:double]] + - @0@ + - Margin on the top of the text in pixels per point. + * - @text margin bottom@ + - [[type:double]] + - @0@ + - Margin on the bottom of the text in pixels per point. --Examples-- @@ -475,16 +874,40 @@ A description of the "Insert symbol" menu for a specific [[type:symbol font]]. The menu consists of a number of entries, either items, separators or submenus. --Properties-- -! Property Type Default Description -| @type@ One of: @"code"@ or @"submenu"@ What type of menu item is this? + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Property + - Type + - Default + - Description + * - @type@ + - One of: + - @"code"@ or @"submenu"@ + - What type of menu item is this? * @code@, inserts a symbol with the given code. * @custom@, pops up a dialog where the user can choose a code to insert. * @line@, a separating line. * @submenu@, a submenu. -| @name@ [[type:string]] ''required'' Name of this menu item, corresponding to the code to insert. -| @label@ [[type:localized string]] name Label to show in the menu. -| @prompt@ [[type:localized string]] Prompt to use for the pop up box with @custom@ type -| @items@ [[type:list]] of [[type:insert symbol menu|submenu items]] Items in the submenu, when items are present the @type@ is set to @"submenu"@. + * - @name@ + - [[type:string]] + - ''required'' + - Name of this menu item, corresponding to the code to insert. + * - @label@ + - [[type:localized string]] + - name + - Label to show in the menu. + * - @prompt@ + - [[type:localized string]] + - + - Prompt to use for the pop up box with @custom@ type + * - @items@ + - [[type:list]] of [[type:insert symbol menu|submenu items]] + - + - Items in the submenu, when items are present the @type@ is set to @"submenu"@. For custom items the dialog will be titled with the @label@ and have message text @prompt@. @@ -529,43 +952,117 @@ Its name should begin with game- where game is the name o It should contain a [[file:format|data file]] called export-template with the following properties. --Properties-- -! Property Type Default Description -| '''Common to all packages''' <<< <<< <<< -| @mse version@ [[type:version]] ''required'' Version of MSE this export template is made for. -| @short name@ [[type:string]] file name A short name of this export template, for the 'new set' and style panel lists. -| @full name@ [[type:string]] file name A longer name of this export template. -| @icon@ [[type:filename]] ''none'' Filename of an icon / preview for this export template, for the 'export to HTML' dialog. -| @position hint@ [[type:int]] ∞ Where to place this item in the list? Lower numbers come first. -| @version@ [[type:version]] @0.0.0@ Version number of this package. -| @depends on@ [[type:list]] of [[type:dependency]]s + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Property + - Type + - Default + - Description + * - '''Common to all packages''' + - <<< + - <<< + - <<< + * - @mse version@ + - [[type:version]] + - ''required'' + - Version of MSE this export template is made for. + * - @short name@ + - [[type:string]] + - file name + - A short name of this export template, for the 'new set' and style panel lists. + * - @full name@ + - [[type:string]] + - file name + - A longer name of this export template. + * - @icon@ + - [[type:filename]] + - ''none'' + - Filename of an icon / preview for this export template, for the 'export to HTML' dialog. + * - @position hint@ + - [[type:int]] + - ∞ + - Where to place this item in the list? Lower numbers come first. + * - @version@ + - [[type:version]] + - @0.0.0@ + - Version number of this package. + * - @depends on@ + - [[type:list]] of [[type:dependency]]s Packages this package depends on. - -| '''Specific to export template''' <<< <<< <<< -| @game@ Name of a [[type:game]] ''required'' Game this export template is made for -| @file type@ [[type:string]] @"HTML files (*.html)|*.html"@ + * - '''Specific to export template''' + - <<< + - <<< + - <<< + * - @game@ + - Name of a [[type:game]] + - ''required'' + - Game this export template is made for + * - @file type@ + - [[type:string]] + - @"HTML files (*.html)|*.html"@ File type to use, this is a list separated by @|@ characters. Alternatingly, a human description and a file pattern to match are given. -| @create directory@ [[type:boolean]] @false@ Should a directory for data files be created? This is required for some script function. -| @option fields@ [[type:list]] of [[type:field]]s Fields for additional options to show. -| @option style@ [[type:indexmap]] of [[type:style]]s Styling for the @option fields@. -| @script@ [[type:script]] Script that generates the text that will be written to the exported file. + * - @create directory@ + - [[type:boolean]] + - @false@ + - Should a directory for data files be created? This is required for some script function. + * - @option fields@ + - [[type:list]] of [[type:field]]s + - + - Fields for additional options to show. + * - @option style@ + - [[type:indexmap]] of [[type:style]]s + - + - Styling for the @option fields@. + * - @script@ + - [[type:script]] + - + - Script that generates the text that will be written to the exported file. During the evaluation of the script the following variables are available: -| @game@ The current game. -| @style@ The current stylesheet. -| @set@ The set being exported. -| @cards@ The cards selected by the user. -| @options@ The values of the @option fields@. -| @directory@ Name of the directory created (if @create directory@ is set). + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - @game@ + - The current game. + * - @style@ + - The current stylesheet. + * - @set@ + - The set being exported. + * - @cards@ + - The cards selected by the user. + * - @options@ + - The values of the @option fields@. + * - @directory@ + - Name of the directory created (if @create directory@ is set). --See also-- The following functions are made specifically for exporting to html: -| [[fun:to_html]] Convert [[type:tagged text]] to html. -| [[fun:symbols_to_html]] Convert text to html using a [[type:symbol font]]. -| [[fun:to_text]] Remove all tags from tagged text. -| [[fun:copy_file]] Copy a file from the [[type:export template]] to the output directory. -| [[fun:write_text_file]] Write a text file to the output directory. -| [[fun:write_image_file]] Write an image file to the output directory. + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - [[fun:to_html]] + - Convert [[type:tagged text]] to html. + * - [[fun:symbols_to_html]] + - Convert text to html using a [[type:symbol font]]. + * - [[fun:to_text]] + - Remove all tags from tagged text. + * - [[fun:copy_file]] + - Copy a file from the [[type:export template]] to the output directory. + * - [[fun:write_text_file]] + - Write a text file to the output directory. + * - [[fun:write_image_file]] + - Write an image file to the output directory. --Example-- Look at the @"magic-spoiler.mse-export-template"@ for an example. @@ -584,38 +1081,100 @@ Such a package contains a data file called locale that has the followin There are usually no other files in the package. --Properties-- -! Property Type Default Description -| '''Common to all packages''' <<< <<< <<< -| @mse version@ [[type:version]] ''required'' Version of MSE this locale is made for. -| @short name@ [[type:string]] file name A short name of this locale, for the options dialog. -| @full name@ [[type:string]] file name A longer name of this locale. -| @icon@ [[type:filename]] ''none'' Filename of an icon / preview for this locale, currently not used. -| @version@ [[type:version]] @0.0.0@ Version number of this package. - -| '''Specific to locales''' <<< <<< <<< -| @menu@ [[type:map]] of [[type:string]]s Translations of menu items.
    + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Property + - Type + - Default + - Description + * - '''Common to all packages''' + - <<< + - <<< + - <<< + * - @mse version@ + - [[type:version]] + - ''required'' + - Version of MSE this locale is made for. + * - @short name@ + - [[type:string]] + - file name + - A short name of this locale, for the options dialog. + * - @full name@ + - [[type:string]] + - file name + - A longer name of this locale. + * - @icon@ + - [[type:filename]] + - ''none'' + - Filename of an icon / preview for this locale, currently not used. + * - @version@ + - [[type:version]] + - @0.0.0@ + - Version number of this package. + * - '''Specific to locales''' + - <<< + - <<< + - <<< + * - @menu@ + - [[type:map]] of [[type:string]]s + - + - Translations of menu items.
    Menu items can contain shortcut keys (like Ctrl+C for copy) by using a ''single'' TAB between the text and the shortcut key.
    Keys to use with Alt+Something (displayed underlined) can be specified &
    For example >>>new set: &New... Ctrl+N -| @help@ [[type:map]] of [[type:string]]s Translations of help texts for the status bar. -| @tool@ [[type:map]] of [[type:string]]s Translations of toolbar item texts. -| @tooltip@ [[type:map]] of [[type:string]]s Translations of tooltips for toolbar items. -| @label@ [[type:map]] of [[type:string]]s Labels of controls in the GUI. -| @button@ [[type:map]] of [[type:string]]s Labels of buttons in the GUI. -| @title@ [[type:map]] of [[type:string]]s Titles of windows. -| @action@ [[type:map]] of [[type:string]]s Names of actions for undo/redo, things like "typing" and "add card". -| @error@ [[type:map]] of [[type:string]]s Error messages. -| @type@ [[type:map]] of [[type:string]]s Types of objects for error messages. -| @game@ [[type:map]] of [[type:map]] of [[type:string]]s + * - @help@ + - [[type:map]] of [[type:string]]s + - + - Translations of help texts for the status bar. + * - @tool@ + - [[type:map]] of [[type:string]]s + - + - Translations of toolbar item texts. + * - @tooltip@ + - [[type:map]] of [[type:string]]s + - + - Translations of tooltips for toolbar items. + * - @label@ + - [[type:map]] of [[type:string]]s + - + - Labels of controls in the GUI. + * - @button@ + - [[type:map]] of [[type:string]]s + - + - Labels of buttons in the GUI. + * - @title@ + - [[type:map]] of [[type:string]]s + - + - Titles of windows. + * - @action@ + - [[type:map]] of [[type:string]]s + - + - Names of actions for undo/redo, things like "typing" and "add card". + * - @error@ + - [[type:map]] of [[type:string]]s + - + - Error messages. + * - @type@ + - [[type:map]] of [[type:string]]s + - + - Types of objects for error messages. + * - @game@ + - [[type:map]] of [[type:map]] of [[type:string]]s Deprecated since MSE 2.1.3, use @localized_...@ instead.
    Translations for specific [[type:game]]s.
    Field names and field descriptions are looked up in the locale, if they are found the translation is used, otherwise the value from the game file.
    Extra keys not present in the English locale can be added here. -| @stylesheet@ [[type:map]] of [[type:map]] of [[type:string]]s + * - @stylesheet@ + - [[type:map]] of [[type:map]] of [[type:string]]s Deprecated since MSE 2.1.3, use @localized_...@ instead.
    Translations for specific [[type:stylesheet]]s. -| @symbol font@ [[type:map]] of [[type:map]] of [[type:string]]s + * - @symbol font@ + - [[type:map]] of [[type:map]] of [[type:string]]s Deprecated since MSE 2.1.3, use @localized_...@ instead.
    Translations for specific [[type:symbol font]]s, in particular the "insert symbol" menu. @@ -649,14 +1208,42 @@ An include package is described in a [[file:package]] with the .mse-include< It should contain a [[file:format|data file]] called include with the following properties. --Properties-- -! Property Type Default Description -| '''Common to all packages''' <<< <<< <<< -| @mse version@ [[type:version]] ''required'' Version of MSE this include package is made for. -| @short name@ [[type:string]] file name A short name of this include package, currently not used. -| @full name@ [[type:string]] file name A longer name of this include package, currently not used. -| @icon@ [[type:filename]] ''none'' Filename of an icon / preview for this export template, currently not used. -| @version@ [[type:version]] @0.0.0@ Version number of this package. -| @depends on@ [[type:list]] of [[type:dependency]]s + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Property + - Type + - Default + - Description + * - '''Common to all packages''' + - <<< + - <<< + - <<< + * - @mse version@ + - [[type:version]] + - ''required'' + - Version of MSE this include package is made for. + * - @short name@ + - [[type:string]] + - file name + - A short name of this include package, currently not used. + * - @full name@ + - [[type:string]] + - file name + - A longer name of this include package, currently not used. + * - @icon@ + - [[type:filename]] + - ''none'' + - Filename of an icon / preview for this export template, currently not used. + * - @version@ + - [[type:version]] + - @0.0.0@ + - Version number of this package. + * - @depends on@ + - [[type:list]] of [[type:dependency]]s Packages this package depends on. No additional properties are available. @@ -681,9 +1268,24 @@ Various parts of a symbol use [[type:vector2d|coordinates]]. These are pairs of numbers in the range @0@ to @1@. @(0,0)@ is the top-left of the symbol, @(1,1)@ the bottom-right. --Properties-- -! Property Type Default Description -| @mse version@ [[type:version]] ''required'' Version of MSE this symbol is made with. -| @parts@ [[type:list]] of [[type:symbol part]]s The parts in this symbol. + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Property + - Type + - Default + - Description + * - @mse version@ + - [[type:version]] + - ''required'' + - Version of MSE this symbol is made with. + * - @parts@ + - [[type:list]] of [[type:symbol part]]s + - + - The parts in this symbol. --Example-- Look at a file made with the program. @@ -755,13 +1357,37 @@ Things that are fields are, "card color" and "card name". Not a particular color or name, but a description of what a card color and a card name are for a particular [[type:game]]. Fields are part of the [[file:style triangle]]: -| Description Looks Data -| [[type:Game]] [[type:Stylesheet]] [[type:Set]] -| '''Field''' [[type:Style]] [[type:Value]] + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Description + - Looks + - Data + * - [[type:Game]] + - [[type:Stylesheet]] + - [[type:Set]] + * - '''Field''' + - [[type:Style]] + - [[type:Value]] --Properties-- -! Property Type Default Description -| @type@ One of: ''required'' Type of field. + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Property + - Type + - Default + - Description + * - @type@ + - One of: + - ''required'' + - Type of field. * @text@ * @choice@ * @multiple choice@ @@ -771,80 +1397,253 @@ Fields are part of the [[file:style triangle]]: * @symbol@ * @color@ * @info@ -| @name@ [[type:string]] ''required'' Name of the field. -| @description@ [[type:localized string]] @""@ Description of the field, shown in the status bar when the mouse is over the field. -| @icon@ [[type:filename]] Filename of an icon for this field, used for automatically generated [[type:statistics category]]s. -| @editable@ [[type:boolean]] @true@ Can values of this field be edited? -| @save value@ [[type:boolean]] @true@ Should values of this field be saved to files? Should be disabled for values that are generated by scripts. -| @show statistics@ [[type:boolean]] @true@ Should a [[type:statistics dimension]] and [[type:statistics category|category]] be made for this field, + * - @name@ + - [[type:string]] + - ''required'' + - Name of the field. + * - @description@ + - [[type:localized string]] + - @""@ + - Description of the field, shown in the status bar when the mouse is over the field. + * - @icon@ + - [[type:filename]] + - + - Filename of an icon for this field, used for automatically generated [[type:statistics category]]s. + * - @editable@ + - [[type:boolean]] + - @true@ + - Can values of this field be edited? + * - @save value@ + - [[type:boolean]] + - @true@ + - Should values of this field be saved to files? Should be disabled for values that are generated by scripts. + * - @show statistics@ + - [[type:boolean]] + - @true@ + - Should a [[type:statistics dimension]] and [[type:statistics category|category]] be made for this field, causing it to be listed on the statistics panel? -| @identifying@ [[type:boolean]] @false@ Does this field give the name of the [[type:card]] or [[type:set]]? -| @card list column@ [[type:int]] @0@ On what position in the card list should this field be put? -| @card list width@ [[type:int]] @100@ Width of the card list column in pixels. -| @card list visible@ [[type:boolean]] @false@ Should this field be shown in the card list by default? -| @card list allow@ [[type:boolean]] @true@ Should this field be allowed in the card list at all? -| @card list name@ [[type:localized string]] field name Alternate name to use for the card list, for example an abbreviation. -| @card list alignment@ [[type:alignment]] @left@ Alignment of the card list column. -| @sort script@ [[type:script]] Alternate way to sort the card list when using this column to sort the list. + * - @identifying@ + - [[type:boolean]] + - @false@ + - Does this field give the name of the [[type:card]] or [[type:set]]? + * - @card list column@ + - [[type:int]] + - @0@ + - On what position in the card list should this field be put? + * - @card list width@ + - [[type:int]] + - @100@ + - Width of the card list column in pixels. + * - @card list visible@ + - [[type:boolean]] + - @false@ + - Should this field be shown in the card list by default? + * - @card list allow@ + - [[type:boolean]] + - @true@ + - Should this field be allowed in the card list at all? + * - @card list name@ + - [[type:localized string]] + - field name + - Alternate name to use for the card list, for example an abbreviation. + * - @card list alignment@ + - [[type:alignment]] + - @left@ + - Alignment of the card list column. + * - @sort script@ + - [[type:script]] + - + - Alternate way to sort the card list when using this column to sort the list. The @type@ determines what values of this field contain: -! Type Values contain Displayed as -| @text@ Text with markup (a [[type:tagged string]]) Text -| @choice@ A choice from a list Text or an image -| @multiple choice@ Zero or more choices from a list A single image or multiple images -| @package choice@ A choice from a list of installed [[type:package]]s Text and/or an image -| @boolean@ @yes@ or @no@ Text or an image or both -| @color@ Any color or a restricted selection from a list A box filled with the color -| @image@ Any image The image -| @symbol@ A [[type:symbol]] edited with the symbol editor The image -| @info@ An informational message, for example to group fields together. A box containing the label + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Type + - Values contain + - Displayed as + * - @text@ + - Text with markup (a [[type:tagged string]]) + - Text + * - @choice@ + - A choice from a list + - Text or an image + * - @multiple choice@ + - Zero or more choices from a list + - A single image or multiple images + * - @package choice@ + - A choice from a list of installed [[type:package]]s + - Text and/or an image + * - @boolean@ + - @yes@ or @no@ + - Text or an image or both + * - @color@ + - Any color or a restricted selection from a list + - A box filled with the color + * - @image@ + - Any image + - The image + * - @symbol@ + - A [[type:symbol]] edited with the symbol editor + - The image + * - @info@ + - An informational message, for example to group fields together. + - A box containing the label Additional properties are available, depending on the type of field: -! Type Property Type Default Description -| @"text"@ @script@ [[type:script]] Script to apply to values of this field after each change.
    +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Type + - Property + - Type + - Default + - Description + * - @"text"@ + - @script@ + - [[type:script]] + - + - Script to apply to values of this field after each change.
    If the script evaluates to a constant (i.e. doesn't use @value@) then values in this field can effectively not be edited. -| ^^^ @default@ [[type:script]] Script to determine the value when it is in the default state (not edited). -| ^^^ @default name@ [[type:string]] @"Default"@ Name of the default state, currently not used. -| ^^^ @multi line@ [[type:boolean]] @false@ Can values of this field contain line breaks? - -| @"choice"@ @script@ [[type:script]] Script to apply to values of this field after each change.
    + * - ^^^ + - @default@ + - [[type:script]] + - + - Script to determine the value when it is in the default state (not edited). + * - ^^^ + - @default name@ + - [[type:string]] + - @"Default"@ + - Name of the default state, currently not used. + * - ^^^ + - @multi line@ + - [[type:boolean]] + - @false@ + - Can values of this field contain line breaks? + * - @"choice"@ + - @script@ + - [[type:script]] + - + - Script to apply to values of this field after each change.
    If the script evaluates to a constant (i.e. doesn't use @value@) then values in this field can effectively not be edited. -| ^^^ @default@ [[type:script]] Script to determine the value when it is in the default state (not edited). -| ^^^ @initial@ [[type:string]] Initial value for new values for this field. -| ^^^ @default name@ [[type:string]] @"Default"@ Name of the default state. -| ^^^ @choices@ [[type:list]] of [[type:choice]]s Possible values for this field. -| ^^^ @choice colors@ [[type:map]] of opaque [[type:color]]s Colors of the choices for statistics graphs. -| ^^^ @choice colors cardlist@ [[type:map]] of opaque [[type:color]]s Colors of the choices for lines in the card list,
    see also the @card list color script@ property of [[type:game]]s. - -| @"multiple choice"@ <<< <<< <<< + * - ^^^ + - @default@ + - [[type:script]] + - + - Script to determine the value when it is in the default state (not edited). + * - ^^^ + - @initial@ + - [[type:string]] + - + - Initial value for new values for this field. + * - ^^^ + - @default name@ + - [[type:string]] + - @"Default"@ + - Name of the default state. + * - ^^^ + - @choices@ + - [[type:list]] of [[type:choice]]s + - + - Possible values for this field. + * - ^^^ + - @choice colors@ + - [[type:map]] of opaque [[type:color]]s + - + - Colors of the choices for statistics graphs. + * - ^^^ + - @choice colors cardlist@ + - [[type:map]] of opaque [[type:color]]s + - + - Colors of the choices for lines in the card list,
    see also the @card list color script@ property of [[type:game]]s. + * - @"multiple choice"@ + - + - <<< + - <<< + - <<< '' Multiple choice fields have the same attributes as normal choice fields.''
    To refer to a combination of values in the initial attribute use @choice1, choice2, choice3@.
    These choices must appear in the same order as they do in the @choices@ property. - -| @"boolean"@ ''A boolean field is a choice field with the choices @"yes"@ and @"no"@.'' <<< <<< <<< - -| @"package choice"@ + * - @"boolean"@ + - ''A boolean field is a choice field with the choices @"yes"@ and @"no"@.'' + - <<< + - <<< + - <<< + * - @"package choice"@ @script@ [[type:script]] Script to apply to values of this field after each change.
    If the script evaluates to a constant (i.e. doesn't use @value@) then values in this field can effectively not be edited. -| ^^^ @match@ [[type:string]] ''required'' Filenames of the packages to match, can include wildcards @"*"@. For example @"magic-mana-*.mse-symbol-font"@. -| ^^^ @initial@ [[type:string]] ''required'' Initial package for new values for this field. -| ^^^ @reqired@ [[type:boolean]] @true@ Must a package always be selected? Or is it allowed to select nothing? -| ^^^ @empty name@ [[type:string]] @"None"@ Name of the empty state. Applies only if @required: false@. - -| @"color"@ @script@ [[type:script]] Script to apply to values of this field after each change.
    + * - ^^^ + - @match@ + - [[type:string]] + - ''required'' + - Filenames of the packages to match, can include wildcards @"*"@. For example @"magic-mana-*.mse-symbol-font"@. + * - ^^^ + - @initial@ + - [[type:string]] + - ''required'' + - Initial package for new values for this field. + * - ^^^ + - @reqired@ + - [[type:boolean]] + - @true@ + - Must a package always be selected? Or is it allowed to select nothing? + * - ^^^ + - @empty name@ + - [[type:string]] + - @"None"@ + - Name of the empty state. Applies only if @required: false@. + * - @"color"@ + - @script@ + - [[type:script]] + - + - Script to apply to values of this field after each change.
    If the script evaluates to a constant (i.e. doesn't use @value@) then values in this field can effectively not be edited. -| ^^^ @default@ [[type:script]] Script to determine the value when it is in the default state (not edited). -| ^^^ @initial@ [[type:string]] Initial color for new values for this field. -| ^^^ @default name@ [[type:string]] @"Default"@ Name of the default state. -| ^^^ @allow custom@ [[type:boolean]] @true@ Are colors other then those from the choices allowed? -| ^^^ @choices@ [[type:list]] of [[type:color choice]]s Possible values for this field. - -| @"image"@ ''no extra properties'' <<< <<< <<< - -| @"symbol"@ ''no extra properties'' <<< <<< <<< - -| @"info"@ @script@ [[type:script]] Script to determine the value to show. + * - ^^^ + - @default@ + - [[type:script]] + - + - Script to determine the value when it is in the default state (not edited). + * - ^^^ + - @initial@ + - [[type:string]] + - + - Initial color for new values for this field. + * - ^^^ + - @default name@ + - [[type:string]] + - @"Default"@ + - Name of the default state. + * - ^^^ + - @allow custom@ + - [[type:boolean]] + - @true@ + - Are colors other then those from the choices allowed? + * - ^^^ + - @choices@ + - [[type:list]] of [[type:color choice]]s + - + - Possible values for this field. + * - @"image"@ + - ''no extra properties'' + - <<< + - <<< + - <<< + * - @"symbol"@ + - ''no extra properties'' + - <<< + - <<< + - <<< + * - @"info"@ + - @script@ + - [[type:script]] + - + - Script to determine the value to show. --Example-- The @title@ field gives the title of a set: @@ -883,9 +1682,21 @@ A style specifies how a [[type:field]] should look, things like position, size, fonts, colors, etc. Styles are part of the [[file:style triangle]]: -| Description Looks Data -| [[type:Game]] [[type:Stylesheet]] [[type:Set]] -| [[type:Field]] '''Style''' [[type:Value]] + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Description + - Looks + - Data + * - [[type:Game]] + - [[type:Stylesheet]] + - [[type:Set]] + * - [[type:Field]] + - '''Style''' + - [[type:Value]] --Positioning-- @@ -943,103 +1754,367 @@ Here are some examples: --Properties-- -! Property Type Default Description -| @z index@ [[type:int]] @0@ Stacking of this box, fields with a higher @z index@ are placed on top of those with a lower index. -| @tab index@ [[type:int]] @0@ Index for moving through the fields with the tab key, fields with a lower tab index come first. Otherwise the order is from top to bottom and then left to right. -| @left@ [[type:scriptable]] [[type:double]] ''Required'' Distance between left edge of the box and the left of the card in pixels. -| @width@ [[type:scriptable]] [[type:double]] ''Required'' Width of the box in pixels. -| @right@ [[type:scriptable]] [[type:double]] ''Required'' Distance between right edge of the box and the ''left'' of the card in pixels. -| @top@ [[type:scriptable]] [[type:double]] ''Required'' Distance between top edge of the box and the top of the card in pixels. -| @height@ [[type:scriptable]] [[type:double]] ''Required'' Height of the box in pixels. -| @bottom@ [[type:scriptable]] [[type:double]] ''Required'' Distance between bottom edge of the box and the ''top'' of the card in pixels. -| @angle@ [[type:scriptable]] [[type:int]] @0@ Rotation of this box, in degrees counter clockwise. -| @visible@ [[type:scriptable]] [[type:boolean]] @true@ Is this field visible at all? -| @mask@ [[type:image|scriptable image]] ''none'' A mask to apply to the box, black areas in the mask become transparent, similar to [[fun:set_mask]]. + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Property + - Type + - Default + - Description + * - @z index@ + - [[type:int]] + - @0@ + - Stacking of this box, fields with a higher @z index@ are placed on top of those with a lower index. + * - @tab index@ + - [[type:int]] + - @0@ + - Index for moving through the fields with the tab key, fields with a lower tab index come first. Otherwise the order is from top to bottom and then left to right. + * - @left@ + - [[type:scriptable]] [[type:double]] + - ''Required'' + - Distance between left edge of the box and the left of the card in pixels. + * - @width@ + - [[type:scriptable]] [[type:double]] + - ''Required'' + - Width of the box in pixels. + * - @right@ + - [[type:scriptable]] [[type:double]] + - ''Required'' + - Distance between right edge of the box and the ''left'' of the card in pixels. + * - @top@ + - [[type:scriptable]] [[type:double]] + - ''Required'' + - Distance between top edge of the box and the top of the card in pixels. + * - @height@ + - [[type:scriptable]] [[type:double]] + - ''Required'' + - Height of the box in pixels. + * - @bottom@ + - [[type:scriptable]] [[type:double]] + - ''Required'' + - Distance between bottom edge of the box and the ''top'' of the card in pixels. + * - @angle@ + - [[type:scriptable]] [[type:int]] + - @0@ + - Rotation of this box, in degrees counter clockwise. + * - @visible@ + - [[type:scriptable]] [[type:boolean]] + - @true@ + - Is this field visible at all? + * - @mask@ + - [[type:image|scriptable image]] + - ''none'' + - A mask to apply to the box, black areas in the mask become transparent, similar to [[fun:set_mask]]. The rest of the properties depend on the type of [[type:field]] this style is for. -! Type Property Type Default Description -| @"text"@ @font@ [[type:font]] ''Required'' Font to render the text. -| ^^^ @symbol font@ [[type:symbol font]] Font to render symbols in the text (optional). -| ^^^ @always symbol@ [[type:boolean]] @false@ Should all text be rendered with symbols?
    + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Type + - Property + - Type + - Default + - Description + * - @"text"@ + - @font@ + - [[type:font]] + - ''Required'' + - Font to render the text. + * - ^^^ + - @symbol font@ + - [[type:symbol font]] + - + - Font to render symbols in the text (optional). + * - ^^^ + - @always symbol@ + - [[type:boolean]] + - @false@ + - Should all text be rendered with symbols?
    Text that is not supported by the symbol font is still rendered as normal text. -| ^^^ @allow formating@ [[type:boolean]] @true@ Is custom formating (bold, italic) allowed? -| ^^^ @alignment@ [[type:scriptable]] [[type:alignment]] @top left@ Alignment of the text. -| ^^^ @direction@ [[type:direction]] @"left to right"@ Direction in which the text flows. If set to @"vertical"@ it is as if a line break is inserted after each character. -| ^^^ @padding left@ [[type:scriptable]] [[type:double]] @0@ Padding between the text and the border of the box, in pixels. -| ^^^ @padding right@ ^^^ ^^^ ^^^ -| ^^^ @padding top@ ^^^ ^^^ ^^^ -| ^^^ @padding bottom@ ^^^ ^^^ ^^^ -| ^^^ @padding left min@ [[type:scriptable]] [[type:double]] ∞ Minimal padding around the field.
    When the text is scaled down the padding is scaled as well, but it becomes no smaller than this. -| ^^^ @padding right min@ ^^^ ^^^ ^^^ -| ^^^ @padding top min@ ^^^ ^^^ ^^^ -| ^^^ @padding bottom min@ ^^^ ^^^ ^^^ -| ^^^ @line height soft@ [[type:scriptable]] [[type:double]] @1@ Multiplier for the line height of 'soft' line breaks. These are breaks caused by wrapping around lines that are too long.
    + * - ^^^ + - @allow formating@ + - [[type:boolean]] + - @true@ + - Is custom formating (bold, italic) allowed? + * - ^^^ + - @alignment@ + - [[type:scriptable]] [[type:alignment]] + - @top left@ + - Alignment of the text. + * - ^^^ + - @direction@ + - [[type:direction]] + - @"left to right"@ + - Direction in which the text flows. If set to @"vertical"@ it is as if a line break is inserted after each character. + * - ^^^ + - @padding left@ + - [[type:scriptable]] [[type:double]] + - @0@ + - Padding between the text and the border of the box, in pixels. + * - ^^^ + - @padding right@ + - ^^^ + - ^^^ + - ^^^ + * - ^^^ + - @padding top@ + - ^^^ + - ^^^ + - ^^^ + * - ^^^ + - @padding bottom@ + - ^^^ + - ^^^ + - ^^^ + * - ^^^ + - @padding left min@ + - [[type:scriptable]] [[type:double]] + - ∞ + - Minimal padding around the field.
    When the text is scaled down the padding is scaled as well, but it becomes no smaller than this. + * - ^^^ + - @padding right min@ + - ^^^ + - ^^^ + - ^^^ + * - ^^^ + - @padding top min@ + - ^^^ + - ^^^ + - ^^^ + * - ^^^ + - @padding bottom min@ + - ^^^ + - ^^^ + - ^^^ + * - ^^^ + - @line height soft@ + - [[type:scriptable]] [[type:double]] + - @1@ + - Multiplier for the line height of 'soft' line breaks. These are breaks caused by wrapping around lines that are too long.
    A line height of @0@ means all lines are in the same position, @1@ is normal behaviour, @2@ skips a line, etc. -| ^^^ @line height hard@ [[type:scriptable]] [[type:double]] @1@ Multiplier for the line height of 'hard' line breaks. These are breaks caused by the enter key. -| ^^^ @line height line@ [[type:scriptable]] [[type:double]] @1@ Multiplier for the line height of 'soft' line breaks. These are breaks caused by @"\n"@ tags. -| ^^^ @line height soft max@ [[type:scriptable]] [[type:double]] ''disabled'' When there is still vertical room in the text box, increase the line heights to at most these values to spread the text more evenly. -| ^^^ @line height hard max@ ^^^ ^^^ ^^^ -| ^^^ @line height line max@ ^^^ ^^^ ^^^ -| ^^^ @paragraph height@ [[type:double]] ''flexible'' The height of paragraphs. If specified, each paragraph is given this much space, and aligned inside that space as specified by @alignment@.
    + * - ^^^ + - @line height hard@ + - [[type:scriptable]] [[type:double]] + - @1@ + - Multiplier for the line height of 'hard' line breaks. These are breaks caused by the enter key. + * - ^^^ + - @line height line@ + - [[type:scriptable]] [[type:double]] + - @1@ + - Multiplier for the line height of 'soft' line breaks. These are breaks caused by @"\n"@ tags. + * - ^^^ + - @line height soft max@ + - [[type:scriptable]] [[type:double]] + - ''disabled'' + - When there is still vertical room in the text box, increase the line heights to at most these values to spread the text more evenly. + * - ^^^ + - @line height hard max@ + - ^^^ + - ^^^ + - ^^^ + * - ^^^ + - @line height line max@ + - ^^^ + - ^^^ + - ^^^ + * - ^^^ + - @paragraph height@ + - [[type:double]] + - ''flexible'' + - The height of paragraphs. If specified, each paragraph is given this much space, and aligned inside that space as specified by @alignment@.
    A paragraph break is any line break that is not soft (i.e. caused by word wrap or a @@ break). -| ^^^ @mask@ [[type:image|scriptable image]] ''none'' A mask that indicates where in the box text can be placed.
    + * - ^^^ + - @mask@ + - [[type:image|scriptable image]] + - ''none'' + - A mask that indicates where in the box text can be placed.
    Text is never put in black areas of the box:

    The same mask image is also used to determine the size and shape of the box. To include a certain pixel in the size/shape but not allow text to be placed there, it can be made dark gray (a value less than 128). -| ^^^ @layout@ [[type:text layout]] ''automatic'' When read from a script, gives information on the layout of text in this box. -| ^^^ @content width@ [[type:double]] ''automatic'' When read from a script, gives the width of the current content in this box. Equivalent to @layout.width@ -| ^^^ @content height@ [[type:double]] ''automatic'' When read from a script, gives the height of the current content in this box. Equivalent to @layout.height@ -| ^^^ @content lines@ [[type:int]] ''automatic'' When read from a script, gives the number of lines of the current content in this box. Equivalent to @length(layout.lines)@ + * - ^^^ + - @layout@ + - [[type:text layout]] + - ''automatic'' + - When read from a script, gives information on the layout of text in this box. + * - ^^^ + - @content width@ + - [[type:double]] + - ''automatic'' + - When read from a script, gives the width of the current content in this box. Equivalent to @layout.width@ + * - ^^^ + - @content height@ + - [[type:double]] + - ''automatic'' + - When read from a script, gives the height of the current content in this box. Equivalent to @layout.height@ + * - ^^^ + - @content lines@ + - [[type:int]] + - ''automatic'' + - When read from a script, gives the number of lines of the current content in this box. Equivalent to @length(layout.lines)@ ! <<< <<< <<< <<< -| @"choice"@,
    @"multiple choice"@,
    @"boolean"@ + * - @"choice"@,
    @"multiple choice"@,
    @"boolean"@ @popup style@ @"drop down"@ or @"in place"@ @"drop down"@ Where to place the drop down box for editing the value.
    @"drop down"@ places the box below the field, similar to normal combo boxes.
    @"in place"@ places the box at the mouse coordinates. -| ^^^ @render style@ [[type:render style]] @"text"@ How should the field be rendered? -| ^^^ @combine@ [[type:combine]] @"normal"@ How to combine the image with the background? Can be overridden using the [[fun:set_combine]] function. -| ^^^ @alignment@ [[type:alignment]] @"stretch"@ Alignment of text and images in the box. -| ^^^ @font@ [[type:font]] Font to use for rendering text (depending on @render style@) -| ^^^ @image@ [[type:image|scriptable image]] Image to show (depending on @render style@).
    + * - ^^^ + - @render style@ + - [[type:render style]] + - @"text"@ + - How should the field be rendered? + * - ^^^ + - @combine@ + - [[type:combine]] + - @"normal"@ + - How to combine the image with the background? Can be overridden using the [[fun:set_combine]] function. + * - ^^^ + - @alignment@ + - [[type:alignment]] + - @"stretch"@ + - Alignment of text and images in the box. + * - ^^^ + - @font@ + - [[type:font]] + - + - Font to use for rendering text (depending on @render style@) + * - ^^^ + - @image@ + - [[type:image|scriptable image]] + - + - Image to show (depending on @render style@).
    The script will be called with @input@ set to the value to determine an image for. -| ^^^ @choice images@ [[type:map]] of [[type:image]]s An alternative way to specify what image to show.
    + * - ^^^ + - @choice images@ + - [[type:map]] of [[type:image]]s + - + - An alternative way to specify what image to show.
    For each [[type:choice]] a separate image is specified. -| ^^^ @content width@ [[type:double]] ''automatic'' When read from a script, gives the width of the current choice image in this box.
    + * - ^^^ + - @content width@ + - [[type:double]] + - ''automatic'' + - When read from a script, gives the width of the current choice image in this box.
    This is only useful when the alignment is changed, otherwise it is always equal the box size itself. -| ^^^ @content height@ [[type:double]] ''automatic'' When read from a script, gives the height of the current choice image in this box. -| @"multiple choice"@ + * - ^^^ + - @content height@ + - [[type:double]] + - ''automatic'' + - When read from a script, gives the height of the current choice image in this box. + * - @"multiple choice"@ @direction@ [[type:scriptable]] [[type:direction]] @"left to right"@ Direction the items are laid out in, only when @render style@ is @list@. -| ^^^ @spacing@ [[type:scriptable]] [[type:double]] @0@ Spacing between the items. + * - ^^^ + - @spacing@ + - [[type:scriptable]] [[type:double]] + - @0@ + - Spacing between the items. ! <<< <<< <<< <<< -| @"package choice"@ -| ^^^ @font@ [[type:font]] Font to use for rendering text. + * - @"package choice"@ + * - ^^^ + - @font@ + - [[type:font]] + - + - Font to use for rendering text. ! <<< <<< <<< <<< -| @"color"@ @radius@ [[type:double]] @0@ Radius of rounded corners for the box in pixels. -| ^^^ @left width@ [[type:double]] ∞ Draw only this many pixels from the side, creating a box with a hole in it, or a card border. -| ^^^ @right width@ ^^^ ^^^ ^^^ -| ^^^ @top width@ ^^^ ^^^ ^^^ -| ^^^ @bottom width@ ^^^ ^^^ ^^^ -| ^^^ @combine@ [[type:combine]] @"normal"@ How to combine the color with the background? Only applies when a mask is used. + * - @"color"@ + - @radius@ + - [[type:double]] + - @0@ + - Radius of rounded corners for the box in pixels. + * - ^^^ + - @left width@ + - [[type:double]] + - ∞ + - Draw only this many pixels from the side, creating a box with a hole in it, or a card border. + * - ^^^ + - @right width@ + - ^^^ + - ^^^ + - ^^^ + * - ^^^ + - @top width@ + - ^^^ + - ^^^ + - ^^^ + * - ^^^ + - @bottom width@ + - ^^^ + - ^^^ + - ^^^ + * - ^^^ + - @combine@ + - [[type:combine]] + - @"normal"@ + - How to combine the color with the background? Only applies when a mask is used. ! <<< <<< <<< <<< -| @"image"@ @default@ [[type:image|scriptable image]] ''none'' A default image to use when the card has none. + * - @"image"@ + - @default@ + - [[type:image|scriptable image]] + - ''none'' + - A default image to use when the card has none. ! <<< <<< <<< <<< -| @"symbol"@ @variations@ [[type:list]] of [[type:symbol variation]]s Available variations of the symbol, a variation describes color and border size. -| ^^^ @min aspect ratio@ [[type:double]] @1@ Bounds for the aspect ratio, @width/height@ symbols can take. This can be used to make non-square symbols. -| ^^^ @max aspect ratio@ [[type:double]] @1@ ^^^ + * - @"symbol"@ + - @variations@ + - [[type:list]] of [[type:symbol variation]]s + - + - Available variations of the symbol, a variation describes color and border size. + * - ^^^ + - @min aspect ratio@ + - [[type:double]] + - @1@ + - Bounds for the aspect ratio, @width/height@ symbols can take. This can be used to make non-square symbols. + * - ^^^ + - @max aspect ratio@ + - [[type:double]] + - @1@ + - ^^^ ! <<< <<< <<< <<< -| @"info"@ @font@ [[type:font]] ''Required'' Font to render the text. -| ^^^ @alignment@ [[type:scriptable]] [[type:alignment]] @top left@ Alignment of the text. -| ^^^ @padding left@ [[type:double]] @0@ Padding between the text and the border of the box, in pixels. -| ^^^ @padding right@ ^^^ ^^^ ^^^ -| ^^^ @padding top@ ^^^ ^^^ ^^^ -| ^^^ @padding bottom@ ^^^ ^^^ ^^^ -| ^^^ @background color@ opaque [[type:color]] @rgb(255,255,255)@ Background color for the box, can be used to make it stand out. + * - @"info"@ + - @font@ + - [[type:font]] + - ''Required'' + - Font to render the text. + * - ^^^ + - @alignment@ + - [[type:scriptable]] [[type:alignment]] + - @top left@ + - Alignment of the text. + * - ^^^ + - @padding left@ + - [[type:double]] + - @0@ + - Padding between the text and the border of the box, in pixels. + * - ^^^ + - @padding right@ + - ^^^ + - ^^^ + - ^^^ + * - ^^^ + - @padding top@ + - ^^^ + - ^^^ + - ^^^ + * - ^^^ + - @padding bottom@ + - ^^^ + - ^^^ + - ^^^ + * - ^^^ + - @background color@ + - opaque [[type:color]] + - @rgb(255,255,255)@ + - Background color for the box, can be used to make it stand out. --Example-- @@ -1050,28 +2125,47 @@ ____________ A way to render a choice [[type:field]], see [[type:style]]. --Possible values-- -! Value Sketch Description -| @text@ + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Value + - Sketch + - Description + * - @text@ + - Rendered as text -| @image@ + * - @image@ + - Rendered as an image -| @both@ + * - @both@ + - Both an image and text -| @hidden@ + * - @hidden@ + - The box is hidden, but the value can still be edited. -| @image hidden@ + * - @image hidden@ + - The box is hidden, but the value can still be edited. -| @checklist@ + * - @checklist@ + - A list of checkboxes, for multiple choice styles. -| @image checklist@ + * - @image checklist@ + - A list of checkboxes with images instead of text. -| @both checklist@ + * - @both checklist@ + - A list of checkboxes with both images and text. -| @text list@ + * - @text list@ + - A list of the selected items, for multiple choice styles. -| @image list@ + * - @image list@ + - A list of the selected items with images instead of text. -| @both list@ + * - @both list@ + - A list of the selected items with both images and text. --Examples-- @@ -1085,26 +2179,87 @@ ________________ A variation of a symbol, describes color and border. --Properties-- -! Property Type Default Description -| @name@ [[type:string]] ''Required'' Name of this variation, refered to by the [[fun:symbol_variation]] function. -| @border radius@ [[type:double]] @0.05@ Border radius of the symbol. -| @fill type@ @solid@ or @linear gradient@ or @radial gradient@ + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Property + - Type + - Default + - Description + * - @name@ + - [[type:string]] + - ''Required'' + - Name of this variation, refered to by the [[fun:symbol_variation]] function. + * - @border radius@ + - [[type:double]] + - @0.05@ + - Border radius of the symbol. + * - @fill type@ + - @solid@ or @linear gradient@ or @radial gradient@ @"solid"@ How to fill the symbol. Depending on the @fill type@ there are additional properties: -! Fill type Property Type Description -| @"solid"@ @fill color@ [[type:color]] Color to use for filling the symbol. -| ^^^ @border color@ [[type:color]] Color to use for the border of the symbol. -| @"linear gradient"@ @fill color 1@ [[type:color]] Color to use for filling the symbol at the center of the gradient. -| ^^^ @border color 1@ [[type:color]] Color to use for the border of the symbol at the center of the gradient. -| ^^^ @fill color 2@ [[type:color]] Color to use for filling the symbol at the ends of the gradient. -| ^^^ @border color 2@ [[type:color]] Color to use for the border of the symbol at the ends of the gradient. -| ^^^ @center x@, @center y@ [[type:double]] Position of the center point of the gradient (in the range 0 to 1) -| ^^^ @end x@, @end y@ [[type:double]] Position of the end point of the gradient (in the range 0 to 1) -| @"radial gradient"@ @fill color 1@ [[type:color]] Color to use for filling the symbol at the center of the symbol. -| ^^^ @border color 1@ [[type:color]] Color to use for the border of the symbol at the center of the symbol. -| ^^^ @fill color 2@ [[type:color]] Color to use for filling the symbol at the edges of the symbol. -| ^^^ @border color 2@ [[type:color]] Color to use for the border of the symbol at the edges of the symbol. + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Fill type + - Property + - Type + - Description + * - @"solid"@ + - @fill color@ + - [[type:color]] + - Color to use for filling the symbol. + * - ^^^ + - @border color@ + - [[type:color]] + - Color to use for the border of the symbol. + * - @"linear gradient"@ + - @fill color 1@ + - [[type:color]] + - Color to use for filling the symbol at the center of the gradient. + * - ^^^ + - @border color 1@ + - [[type:color]] + - Color to use for the border of the symbol at the center of the gradient. + * - ^^^ + - @fill color 2@ + - [[type:color]] + - Color to use for filling the symbol at the ends of the gradient. + * - ^^^ + - @border color 2@ + - [[type:color]] + - Color to use for the border of the symbol at the ends of the gradient. + * - ^^^ + - @center x@, @center y@ + - [[type:double]] + - Position of the center point of the gradient (in the range 0 to 1) + * - ^^^ + - @end x@, @end y@ + - [[type:double]] + - Position of the end point of the gradient (in the range 0 to 1) + * - @"radial gradient"@ + - @fill color 1@ + - [[type:color]] + - Color to use for filling the symbol at the center of the symbol. + * - ^^^ + - @border color 1@ + - [[type:color]] + - Color to use for the border of the symbol at the center of the symbol. + * - ^^^ + - @fill color 2@ + - [[type:color]] + - Color to use for filling the symbol at the edges of the symbol. + * - ^^^ + - @border color 2@ + - [[type:color]] + - Color to use for the border of the symbol at the edges of the symbol. --Examples-- 'Common' and 'uncommon' magic expansion symbol styles: @@ -1144,16 +2299,42 @@ It is possible to dig deeper into blocks, for example Is the middle of the first line of the second block. --Properties-- -! Property Type Description -| @width@ [[type:double]] Width of this line or group of lines in pixels. -| @height@ [[type:double]] Height of this line or group of lines in pixels. -| @top@ [[type:double]] Top y coordinate -| @middle@ [[type:double]] Middle y coordinate -| @bottom@ [[type:double]] Bottom y coordinate -| @lines@ [[type:list]] of [[type:text layout]]s The lines in this part of the text. -| @paragraphs@ [[type:list]] of [[type:text layout]]s The paragraphs in this part of the text. -| @blocks@ [[type:list]] of [[type:text layout]]s The blocks in this part of the text. -| @separators@ [[type:list]] of [[type:double]]s The y coordinates of separators between blocks. + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Property + - Type + - Description + * - @width@ + - [[type:double]] + - Width of this line or group of lines in pixels. + * - @height@ + - [[type:double]] + - Height of this line or group of lines in pixels. + * - @top@ + - [[type:double]] + - Top y coordinate + * - @middle@ + - [[type:double]] + - Middle y coordinate + * - @bottom@ + - [[type:double]] + - Bottom y coordinate + * - @lines@ + - [[type:list]] of [[type:text layout]]s + - The lines in this part of the text. + * - @paragraphs@ + - [[type:list]] of [[type:text layout]]s + - The paragraphs in this part of the text. + * - @blocks@ + - [[type:list]] of [[type:text layout]]s + - The blocks in this part of the text. + * - @separators@ + - [[type:list]] of [[type:double]]s + - The y coordinates of separators between blocks. @@ -1165,25 +2346,63 @@ Value A value is something that is 'stored in' a [[type:field]]. Values are part of the [[file:style triangle]]: -| Description Looks Data -| [[type:Game]] [[type:Stylesheet]] [[type:Set]] -| [[type:Field]] [[type:Style]] '''Value''' + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Description + - Looks + - Data + * - [[type:Game]] + - [[type:Stylesheet]] + - [[type:Set]] + * - [[type:Field]] + - [[type:Style]] + - '''Value''' --Possible types-- The type of a value depends on the corresponding field: -! Field type Value data type Description -| @"text"@ [[type:tagged string]] A piece of text, possibly with markup. -| @"choice"@ [[type:string]] One of the choices of the field. -| @"multiple choice"@ [[type:string]] A list of choices from the field, separated by commas.
    + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Field type + - Value data type + - Description + * - @"text"@ + - [[type:tagged string]] + - A piece of text, possibly with markup. + * - @"choice"@ + - [[type:string]] + - One of the choices of the field. + * - @"multiple choice"@ + - [[type:string]] + - A list of choices from the field, separated by commas.
    For example: @"red, green, blue"@. -| @"package choice"@ Name of a package The (file)name of a package, including the extension. -| @"boolean"@ @"yes"@ or @"no"@ This can be directly used as a [[type:boolean]] value in scripts. -| @"image"@ [[type:filename]] Filename of an image file in the [[type:set]] package. -| @"symbol"@ [[type:filename]] Filename of a [[type:symbol]] file in the [[type:set]] package.
    + * - @"package choice"@ + - Name of a package + - The (file)name of a package, including the extension. + * - @"boolean"@ + - @"yes"@ or @"no"@ + - This can be directly used as a [[type:boolean]] value in scripts. + * - @"image"@ + - [[type:filename]] + - Filename of an image file in the [[type:set]] package. + * - @"symbol"@ + - [[type:filename]] + - Filename of a [[type:symbol]] file in the [[type:set]] package.
    When accessed from a script, image fields can be directly used as [[type:image]]s. -| @"color"@ opaque [[type:color]] A color. -| @"info"@ [[type:string]] A label for the information box. + * - @"color"@ + - opaque [[type:color]] + - A color. + * - @"info"@ + - [[type:string]] + - A label for the information box. --Example-- For the field: @@ -1205,17 +2424,48 @@ Card A '''card''' in a [[type:set]]. --Properties-- -! Property Type Default Description -| @stylesheet@ Name of a [[type:stylesheet]] ''none'' Use a different stylesheet for this card than the [[type:set]]'s default. -| @has styling@ [[type:boolean]] false This card has styling data different from the set's default. -| @styling data@ [[type:indexmap]] of [[type:value]]s false Styling data, based on the [[type:stylesheet]]'s @style fields@. -| @notes@ [[type:tagged string]] @""@ Notes for this card. -| @time created@ [[type:date]] ''now'' Time at which the card was created. -| @time modified@ [[type:date]] ''now'' Time at which the card was last modified. -| @extra data@ [[type:map]] of [[type:indexmap]]s of [[type:value]]s + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Property + - Type + - Default + - Description + * - @stylesheet@ + - Name of a [[type:stylesheet]] + - ''none'' + - Use a different stylesheet for this card than the [[type:set]]'s default. + * - @has styling@ + - [[type:boolean]] + - false + - This card has styling data different from the set's default. + * - @styling data@ + - [[type:indexmap]] of [[type:value]]s + - false + - Styling data, based on the [[type:stylesheet]]'s @style fields@. + * - @notes@ + - [[type:tagged string]] + - @""@ + - Notes for this card. + * - @time created@ + - [[type:date]] + - ''now'' + - Time at which the card was created. + * - @time modified@ + - [[type:date]] + - ''now'' + - Time at which the card was last modified. + * - @extra data@ + - [[type:map]] of [[type:indexmap]]s of [[type:value]]s Data for the 'extra card fields' of the stylesheet.
    This is first indexed by stylesheet name, then by field name. -| ''remaining keys'' [[type:indexmap]] of [[type:value]]s The remaining keys contain the data for the game's @card fields@.
    + * - ''remaining keys'' + - [[type:indexmap]] of [[type:value]]s + - + - The remaining keys contain the data for the game's @card fields@.
    So for example @card.some_field@ corresponds to the value of the card field @some field@. --Examples-- @@ -1249,12 +2499,36 @@ A keyword in a [[type:set]] or a [[type:game]]. A keyword is something that matches a piece of text, and optionally some kind of reminder text can be shown. --Properties-- -! Property Type Default Description -| @keyword@ [[type:string]] ''required'' Name of the keyword. -| @match@ [[type:string]] ''required'' String to match. -| @reminder@ [[type:scriptable]] [[type:string]] ''required'' Script to generate the reminder text of this keyword. -| @rules@ [[type:string]] @""@ Explanation or additional rules for this keyword. -| @mode@ Name of a [[type:keyword mode]] Mode of this keyword. + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Property + - Type + - Default + - Description + * - @keyword@ + - [[type:string]] + - ''required'' + - Name of the keyword. + * - @match@ + - [[type:string]] + - ''required'' + - String to match. + * - @reminder@ + - [[type:scriptable]] [[type:string]] + - ''required'' + - Script to generate the reminder text of this keyword. + * - @rules@ + - [[type:string]] + - @""@ + - Explanation or additional rules for this keyword. + * - @mode@ + - Name of a [[type:keyword mode]] + - + - Mode of this keyword. The match string can include parameters, @"type"@ where @"type"@ is the name of a [[type:keyword param type|keyword parameter type]] in the game. These will match according to the @match@ property of that parameter type. @@ -1282,10 +2556,28 @@ The idea behind modes is that a mode indicates what type of keyword it is, for e This information can then be used to determine whether to expand the reminder text. --Properties-- -! Property Type Default Description -| @name@ [[type:string]] ''required'' Name of the mode, this is shown in the box and used in scripts. -| @description@ [[type:string]] @""@ A description of this mode. -| @is default@ [[type:boolean]] @false@ Is this the default mode for new keywords? + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Property + - Type + - Default + - Description + * - @name@ + - [[type:string]] + - ''required'' + - Name of the mode, this is shown in the box and used in scripts. + * - @description@ + - [[type:string]] + - @""@ + - A description of this mode. + * - @is default@ + - [[type:boolean]] + - @false@ + - Is this the default mode for new keywords? --Example-- >keyword mode: @@ -1302,22 +2594,65 @@ Keyword Param Type A type of parameter that can be used in a [[type:keyword]]. --Properties-- -! Property Type Default Description -| @name@ [[type:string]] ''required'' Name of the parameter type. -| @description@ [[type:string]] ''required'' Description of the parameter type. -| @placeholder@ [[type:string]] @name@ of this param type Placeholder to use for empty parameters, the name is used if this is empty. -| @optional@ [[type:boolean]] @true@ Is a placeholder used when a keyword is encountered with no parameter,
    for example @"Cycling "@ would become @"Cycling cost"@. -| @match@ [[type:regex]] ''required'' Regular expression that this param type matches. -| @separator before is@ [[type:regex]] @""@ Regular expression of separator before parameters of this type. -| @separator after is@ [[type:regex]] @""@ Regular expression of separator after parameters of this type. -| @eat separator@ [[type:boolean]] @true@ Allow the user to 'type over' the separator.
    + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Property + - Type + - Default + - Description + * - @name@ + - [[type:string]] + - ''required'' + - Name of the parameter type. + * - @description@ + - [[type:string]] + - ''required'' + - Description of the parameter type. + * - @placeholder@ + - [[type:string]] + - @name@ of this param type + - Placeholder to use for empty parameters, the name is used if this is empty. + * - @optional@ + - [[type:boolean]] + - @true@ + - Is a placeholder used when a keyword is encountered with no parameter,
    for example @"Cycling "@ would become @"Cycling cost"@. + * - @match@ + - [[type:regex]] + - ''required'' + - Regular expression that this param type matches. + * - @separator before is@ + - [[type:regex]] + - @""@ + - Regular expression of separator before parameters of this type. + * - @separator after is@ + - [[type:regex]] + - @""@ + - Regular expression of separator after parameters of this type. + * - @eat separator@ + - [[type:boolean]] + - @true@ + - Allow the user to 'type over' the separator.
    For example if the separator is @" "@ in the keyword @"Cycling"@, and the user types @"Cycling"@, a space and a placeholder is automatically inserted, making @"Cycling "@. If the user now presses space the cursor is only moved, no additional space is inserted, the space is 'eaten'. -| @script@ [[type:script]] Script to apply to parameters of this type before substituting them back into the text. -| @reminder script@ [[type:script]] Script to apply to parameters of this type before using them in the reminder text. -| @example@ [[type:string]] Example for in the keyword editor, currently not used. -| @refer scripts@ [[type:list]] of [[type:keyword param reference script]]s + * - @script@ + - [[type:script]] + - + - Script to apply to parameters of this type before substituting them back into the text. + * - @reminder script@ + - [[type:script]] + - + - Script to apply to parameters of this type before using them in the reminder text. + * - @example@ + - [[type:string]] + - + - Example for in the keyword editor, currently not used. + * - @refer scripts@ + - [[type:list]] of [[type:keyword param reference script]]s Scripts for inserting parameters of this type into the reminder text. To make this easy for the user, a menu of ways to use a parameter is provided. @@ -1349,10 +2684,28 @@ But in some cases for instance a function should be applied, @"{fun(param1)}"@. To make this easy for the user, a menu of choices is provided, this type describes such a choice. --Properties-- -! Property Type Default Description -| @name@ [[type:string]] ''required'' Name of the parameter type. -| @description@ [[type:string]] ''required'' A description of the reference script. -| @script@ [[type:script]] ''required'' Script that generates the code using the parameter.
    + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Property + - Type + - Default + - Description + * - @name@ + - [[type:string]] + - ''required'' + - Name of the parameter type. + * - @description@ + - [[type:string]] + - ''required'' + - A description of the reference script. + * - @script@ + - [[type:script]] + - ''required'' + - Script that generates the code using the parameter.
    This means you will likely need to do some escaping.
    In the script, @input@ refers to the name of the parameter, for example @"param1"@. @@ -1379,19 +2732,61 @@ Statistics dimensions are automatically generated for all card fields in a [[typ Categories are also automatically generated from dimensions. --Properties-- -! Property Type Default Description -| @name@ [[type:string]] ''required'' Name of this dimension, used as an axis label and a label for automatically generated categories. -| @description@ [[type:localized string]] @""@ A description of the dimension, currently not used. -| @position hint@ [[type:string]] @0@ Hint for ordering dimensions. -| @icon@ [[type:filename]] Filename of an icon for this dimension. -| @script@ [[type:script]] ''required'' Script that generates a value for each card in the set. -| @numeric@ [[type:boolean]] @false@ Is the value always a number? -| @bin size@ [[type:double]] ''none'' For numeric dimensions: group numbers together into bins this large.
    + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Property + - Type + - Default + - Description + * - @name@ + - [[type:string]] + - ''required'' + - Name of this dimension, used as an axis label and a label for automatically generated categories. + * - @description@ + - [[type:localized string]] + - @""@ + - A description of the dimension, currently not used. + * - @position hint@ + - [[type:string]] + - @0@ + - Hint for ordering dimensions. + * - @icon@ + - [[type:filename]] + - + - Filename of an icon for this dimension. + * - @script@ + - [[type:script]] + - ''required'' + - Script that generates a value for each card in the set. + * - @numeric@ + - [[type:boolean]] + - @false@ + - Is the value always a number? + * - @bin size@ + - [[type:double]] + - ''none'' + - For numeric dimensions: group numbers together into bins this large.
    For example with @bin size: 5@, values @1@ and @3@ both get put under @"1-5"@. -| @show empty@ [[type:boolean]] @false@ Should cards with the value @""@ be included? -| @split list@ [[type:boolean]] @false@ Indicates the value is a list of the form @"item1, item2"@. The card is put under both items. -| @colors@ [[type:map]] of opaque [[type:color]]s Colors to use for specific values -| @groups@ [[type:list]] of [[type:string]]s Values to always show, and the order to show them in. + * - @show empty@ + - [[type:boolean]] + - @false@ + - Should cards with the value @""@ be included? + * - @split list@ + - [[type:boolean]] + - @false@ + - Indicates the value is a list of the form @"item1, item2"@. The card is put under both items. + * - @colors@ + - [[type:map]] of opaque [[type:color]]s + - + - Colors to use for specific values + * - @groups@ + - [[type:list]] of [[type:string]]s + - + - Values to always show, and the order to show them in. --Example-- Automatically generated statistics dimensions look like this: @@ -1421,9 +2816,24 @@ Word List A list of words. Used for drop down lists in the text editor, for example for card types. --Properties-- -! Property Type Default Description -| @name@ [[type:string]] ''Required'' Name of this word list, refered to using a @""@ tag. -| @words@ [[type:list]] of [[type:word list word]]s ''Required'' The words in the list + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Property + - Type + - Default + - Description + * - @name@ + - [[type:string]] + - ''Required'' + - Name of this word list, refered to using a @""@ tag. + * - @words@ + - [[type:list]] of [[type:word list word]]s + - ''Required'' + - The words in the list --Example-- >word list: @@ -1441,13 +2851,37 @@ Word List Word A word in a [[type:word list]]. --Properties-- -! Property Type Default Description -| @name@ [[type:string]] ''Required'' The word. -| @line below@ [[type:boolean]] @false@ Display a line below this item in the list? -| @is prefix@ [[type:boolean]] @false@ Should this word be used as a prefix before another word from the list?
    + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Property + - Type + - Default + - Description + * - @name@ + - [[type:string]] + - ''Required'' + - The word. + * - @line below@ + - [[type:boolean]] + - @false@ + - Display a line below this item in the list? + * - @is prefix@ + - [[type:boolean]] + - @false@ + - Should this word be used as a prefix before another word from the list?
    Think "Legendary ". Note the space after it, words are directly concatenated. -| @words@ [[type:list]] of [[type:word list word]]s A submenu. If given, the @name@ of this word is only used as a label for the menu. -| @script@ [[type:script]] ''Optional'' A script that determines zero or more words.
    + * - @words@ + - [[type:list]] of [[type:word list word]]s + - + - A submenu. If given, the @name@ of this word is only used as a label for the menu. + * - @script@ + - [[type:script]] + - ''Optional'' + - A script that determines zero or more words.
    The result should be a list of comma separated words, for example @"x,y,z"@ specifies three words. The words are included in the parent menu, not a sub menu. @@ -1482,11 +2916,32 @@ DOC_MSE_VERSION: since 0.3.7 A script to add multiple cards to the set at once. --Properties-- -! Property Type Default Description -| @name@ [[type:string]] Name of this script; appears in the menu. -| @description@ [[type:string]] @""@ Description of this script; appears in the status bar. -| @enabled@ [[type:scriptable]] [[type:boolean]] @true@ Is this script enabled? -| @script@ [[type:script]] Script that produces the cards.
    + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Property + - Type + - Default + - Description + * - @name@ + - [[type:string]] + - + - Name of this script; appears in the menu. + * - @description@ + - [[type:string]] + - @""@ + - Description of this script; appears in the status bar. + * - @enabled@ + - [[type:scriptable]] [[type:boolean]] + - @true@ + - Is this script enabled? + * - @script@ + - [[type:script]] + - + - Script that produces the cards.
    This script should return a [[type:list]] of [[type:card]]s. The [[fun:new_card]] function can be used to make new cards. @@ -1514,21 +2969,72 @@ Font A reference to a normal [[type:font]] for drawing text. --Properties-- -! Property Type Default Description -| @name@ [[type:scriptable]] [[type:string]] ''required'' Name of the font as it appears in most text programs. -| @italic name@ [[type:scriptable]] [[type:string]] Optionally, a different font to use for italic text instead of the normal italic version of the font. -| @size@ [[type:scriptable]] [[type:double]] ''required'' Size of the font in points on a 96 DPI display. -| @scale down to@ [[type:double]] ∞ Minimum size in points to scale the size down to. -| @max stretch@ [[type:double]] @1.0@ Maximum multiplier by which the width of the text is compressed, so @max width: 0.5@ means the text can be compressed to half the normal width. -| @weight@ [[type:scriptable]] font weight @"normal"@ Weight of the font, one of @"normal"@ or @"bold"@. This can be changed locally by [[type:tagged string|tags]]. -| @style@ [[type:scriptable]] font style @"normal"@ Style of the font, one of @"normal"@ or @"italic"@. This can be changed locally by [[type:tagged string|tags]]. -| @underline@ [[type:scriptable]] [[type:boolean]] @false@ Should the font be underlined? -| @color@ [[type:scriptable]] [[type:color]] @rgb(0,0,0)@ What color should text be drawn in? -| @shadow color@ [[type:scriptable]] [[type:color]] @"transparent"@ Color for a shadow below the text. -| @shadow displacement x@ [[type:double]] @0@ Relative position of the shadow in pixels. -| @shadow displacement y@ [[type:double]] @0@ ^^^ -| @shadow blur@ [[type:double]] @0@ How much should the shadow be blurred? -| @separator color@ [[type:color]] @rgba(0,0,0,128)@ Color for @@ tags inserted by the [[fun:combined_editor]] function. + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Property + - Type + - Default + - Description + * - @name@ + - [[type:scriptable]] [[type:string]] + - ''required'' + - Name of the font as it appears in most text programs. + * - @italic name@ + - [[type:scriptable]] [[type:string]] + - + - Optionally, a different font to use for italic text instead of the normal italic version of the font. + * - @size@ + - [[type:scriptable]] [[type:double]] + - ''required'' + - Size of the font in points on a 96 DPI display. + * - @scale down to@ + - [[type:double]] + - ∞ + - Minimum size in points to scale the size down to. + * - @max stretch@ + - [[type:double]] + - @1.0@ + - Maximum multiplier by which the width of the text is compressed, so @max width: 0.5@ means the text can be compressed to half the normal width. + * - @weight@ + - [[type:scriptable]] font weight + - @"normal"@ + - Weight of the font, one of @"normal"@ or @"bold"@. This can be changed locally by [[type:tagged string|tags]]. + * - @style@ + - [[type:scriptable]] font style + - @"normal"@ + - Style of the font, one of @"normal"@ or @"italic"@. This can be changed locally by [[type:tagged string|tags]]. + * - @underline@ + - [[type:scriptable]] [[type:boolean]] + - @false@ + - Should the font be underlined? + * - @color@ + - [[type:scriptable]] [[type:color]] + - @rgb(0,0,0)@ + - What color should text be drawn in? + * - @shadow color@ + - [[type:scriptable]] [[type:color]] + - @"transparent"@ + - Color for a shadow below the text. + * - @shadow displacement x@ + - [[type:double]] + - @0@ + - Relative position of the shadow in pixels. + * - @shadow displacement y@ + - [[type:double]] + - @0@ + - ^^^ + * - @shadow blur@ + - [[type:double]] + - @0@ + - How much should the shadow be blurred? + * - @separator color@ + - [[type:color]] + - @rgba(0,0,0,128)@ + - Color for @@ tags inserted by the [[fun:combined_editor]] function. --Example-- >font: @@ -1546,23 +3052,71 @@ Symbol Part A part of a symbol, corresponds to an item you see in the list on the left of the editor. --Properties-- -! Property Type Default Description -| @type@ One of: @"shape"@ What type of symbol part is this? + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Property + - Type + - Default + - Description + * - @type@ + - One of: + - @"shape"@ + - What type of symbol part is this? * @shape@ * @group@ * @symmetry@ -| @name@ [[type:string]] @""@ The name of this part, for the part list. + * - @name@ + - [[type:string]] + - @""@ + - The name of this part, for the part list. The rest of the properties depends on the @type@. -! Type Property Type Default Description -| @"shape"@ @combine@ [[type:symbol combine]] @"overlap"@ How to combine the shape with those below it? -| ^^^ @points@ [[type:list]] of [[type:control point]]s The points that form this shape -| @"symmetry"@ @kind@ @rotation@ or @reflection@ @"rotation"@ What kind of symmetry is this? -| ^^^ @copies@ [[type:int]] 2 How many times is the original copied (including the original itself)? -| ^^^ @center@ [[type:vector2d]] Coordinates of the center of symmetry. -| ^^^ @handle@ [[type:vector2d]] Direction perpendicular to the 'mirror' (this is a direction, so relative to the center). -| @"group"@ and @"symmetry"@ +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Type + - Property + - Type + - Default + - Description + * - @"shape"@ + - @combine@ + - [[type:symbol combine]] + - @"overlap"@ + - How to combine the shape with those below it? + * - ^^^ + - @points@ + - [[type:list]] of [[type:control point]]s + - + - The points that form this shape + * - @"symmetry"@ + - @kind@ + - @rotation@ or @reflection@ + - @"rotation"@ + - What kind of symmetry is this? + * - ^^^ + - @copies@ + - [[type:int]] + - 2 + - How many times is the original copied (including the original itself)? + * - ^^^ + - @center@ + - [[type:vector2d]] + - + - Coordinates of the center of symmetry. + * - ^^^ + - @handle@ + - [[type:vector2d]] + - + - Direction perpendicular to the 'mirror' (this is a direction, so relative to the center). + * - @"group"@ and @"symmetry"@ @parts@ [[type:list]] of [[type:symbol part]]s Parts in this group. @@ -1583,15 +3137,38 @@ It also optionally has two 'handles' corresponding to the boxes attached with do The control points of a shape are circular, the point after the last point in the list is the first point. --Properties-- -! Property Type Default Description -| @position@ [[type:vector2d]] Position of the control point. -| @lock@ @free@, @direction@ or @size@ @"free"@ + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Property + - Type + - Default + - Description + * - @position@ + - [[type:vector2d]] + - + - Position of the control point. + * - @lock@ + - @free@, @direction@ or @size@ + - @"free"@ Is this point 'locked', i.e. is the relation between the two handles fixed?
    If @lock@ is @"direction"@ then the two handles must lie on a line.
    If @lock@ is @"direction"@ then the two handles must lie exactly oppisite each other on the same distance from the point. -| @line after@ @line@ or @curve@ @"line"@ Is the segment between this control point and the next one in the list a straight line or a cubic Bézier curve? -| @handle before@ [[type:vector2d]] Position of the handle for the segment between this point and the previous one, relative to the point's @position@.
    Only when that point's @line after == "curve"@. -| @handle after@ [[type:vector2d]] Position of the handle for the segment between this point and the next one, relative to the point's @position@.
    Only when @line after == "curve"@. + * - @line after@ + - @line@ or @curve@ + - @"line"@ + - Is the segment between this control point and the next one in the list a straight line or a cubic Bézier curve? + * - @handle before@ + - [[type:vector2d]] + - + - Position of the handle for the segment between this point and the previous one, relative to the point's @position@.
    Only when that point's @line after == "curve"@. + * - @handle after@ + - [[type:vector2d]] + - + - Position of the handle for the segment between this point and the next one, relative to the point's @position@.
    Only when @line after == "curve"@. --Example-- Look at a symbol file made with the program. @@ -1667,10 +3244,20 @@ evaluates to: --Functions-- There are several functions for working with lists: -| [[fun:position]] Find the position of an element in a list -| [[fun:number_of_items]] Return the number of items in a list -| [[fun:sort_list]] Sort a list -| [[fun:filter_list]] Filter a list, keeping only elements that match a predicate + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - [[fun:position]] + - Find the position of an element in a list + * - [[fun:number_of_items]] + - Return the number of items in a list + * - [[fun:sort_list]] + - Sort a list + * - [[fun:filter_list]] + - Filter a list, keeping only elements that match a predicate Field Map @@ -1853,17 +3440,34 @@ The syntax for files is similair to that of [[type:scriptable]] properties: --See also-- The following functions transform images: -| [[fun:linear_blend]] Blend two images together using a linear gradient. -| [[fun:masked_blend]] Blend two images together using a third mask image. -| [[fun:combine_blend]] Blend two images together using a given [[type:combine|combining mode]]. -| [[fun:set_mask]] Set the transparancy mask of an image. -| [[fun:set_alpha]] Change the transparency of an image. -| [[fun:set_combine]] Chnage how the image should be combined with the background. -| [[fun:enlarge]] Enlarge an image by putting a border around it. -| [[fun:crop]] Crop an image, giving only a small subset of it. -| [[fun:drop_shadow]] Add a drop shadow to an image. -| [[fun:symbol_variation]] Render a variation of a [[type:symbol]]. -| [[fun:built_in_image]] Return an image built into the program. + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - [[fun:linear_blend]] + - Blend two images together using a linear gradient. + * - [[fun:masked_blend]] + - Blend two images together using a third mask image. + * - [[fun:combine_blend]] + - Blend two images together using a given [[type:combine|combining mode]]. + * - [[fun:set_mask]] + - Set the transparancy mask of an image. + * - [[fun:set_alpha]] + - Change the transparency of an image. + * - [[fun:set_combine]] + - Chnage how the image should be combined with the background. + * - [[fun:enlarge]] + - Enlarge an image by putting a border around it. + * - [[fun:crop]] + - Crop an image, giving only a small subset of it. + * - [[fun:drop_shadow]] + - Add a drop shadow to an image. + * - [[fun:symbol_variation]] + - Render a variation of a [[type:symbol]]. + * - [[fun:built_in_image]] + - Return an image built into the program. Function @@ -1944,19 +3548,37 @@ In scripts, alignment is passed around as a string. --Possible values-- The value is a combination of one or more flags, separated by spaces. These flags can appear in any order. -! Value Description -| @left@ Horizontally, align at the left -| @center@ Horizontally, align in the middle -| @right@ Horizontally, align at the right -| @top@ Vertically, align at the top -| @middle@ Vertically, align in the middle -| @bottom@ Vertically, align at the bottom -| @justify@ Fill the box exactly, by moving words apart/together. -| @justify-all@ Fill the box exactly, by moving individual characters apart/together. -| @stretch@ Fill the box exactly, by stretching the text.
    + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Value + - Description + * - @left@ + - Horizontally, align at the left + * - @center@ + - Horizontally, align in the middle + * - @right@ + - Horizontally, align at the right + * - @top@ + - Vertically, align at the top + * - @middle@ + - Vertically, align in the middle + * - @bottom@ + - Vertically, align at the bottom + * - @justify@ + - Fill the box exactly, by moving words apart/together. + * - @justify-all@ + - Fill the box exactly, by moving individual characters apart/together. + * - @stretch@ + - Fill the box exactly, by stretching the text.
    For images: stretch them, but preserve the aspect ratio. -| @if-overflow@ Only apply @justify@, @justify-all@ and @stretch@ when the box is overfull. -| @force@ Also justify text at the end of a line in a multiline text field.
    + * - @if-overflow@ + - Only apply @justify@, @justify-all@ and @stretch@ when the box is overfull. + * - @force@ + - Also justify text at the end of a line in a multiline text field.
    Normally only lines ending in a soft line break are justified. --Examples-- @@ -1975,13 +3597,26 @@ Specifies the direction of text flow in a text box. In scripts, direction is passed around as a string. --Possible values-- -! Value Description -| @left to right@ Text starts at the left. -| @right to left@ Text starts at the right ''(currently not implemented)'' -| @top to bottom@ Text starts at the top, each character is on a new line. -| @bottom to top@ Text starts at the bottom ''(currently not implemented)'' -| @horizontal@ Same as @left to right@. -| @vertical@ Same as @top to bottom@. + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Value + - Description + * - @left to right@ + - Text starts at the left. + * - @right to left@ + - Text starts at the right ''(currently not implemented)'' + * - @top to bottom@ + - Text starts at the top, each character is on a new line. + * - @bottom to top@ + - Text starts at the bottom ''(currently not implemented)'' + * - @horizontal@ + - Same as @left to right@. + * - @vertical@ + - Same as @top to bottom@. --Examples-- > direction: horizontal @@ -2000,31 +3635,62 @@ The formula's are from [[http://www.pegtop.net/delphi/articles/blendmodes/]]. In scripts, combine modes are stored as a string. --Possible values-- -! Value Description -| @normal@ Normal behaviour, don't combine. -| @add@ -| @subtract@ -| @stamp@ -| @difference@ -| @negation@ -| @multiply@ -| @darken@ -| @lighten@ -| @color dodge@ -| @color burn@ -| @screen@ -| @overlay@ -| @hard light@ -| @soft light@ -| @reflect@ -| @glow@ -| @freeze@ -| @heat@ -| and Bitwise and -| or Bitwise or -| xor Bitwise xot -| @shadow@ Dark colors normally, white colors darken the background. -| @symmetric overlay@ @(overlay(a,b) + overlay(b,a)) / 2@ + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Value + - Description + * - @normal@ + - Normal behaviour, don't combine. + * - @add@ + - + * - @subtract@ + - + * - @stamp@ + - + * - @difference@ + - + * - @negation@ + - + * - @multiply@ + - + * - @darken@ + - + * - @lighten@ + - + * - @color dodge@ + - + * - @color burn@ + - + * - @screen@ + - + * - @overlay@ + - + * - @hard light@ + - + * - @soft light@ + - + * - @reflect@ + - + * - @glow@ + - + * - @freeze@ + - + * - @heat@ + - + * - and + - Bitwise and + * - or + - Bitwise or + * - xor + - Bitwise xot + * - @shadow@ + - Dark colors normally, white colors darken the background. + * - @symmetric overlay@ + - @(overlay(a,b) + overlay(b,a)) / 2@ --Examples-- > combine: overlay @@ -2042,13 +3708,26 @@ In scripts, symbol combine modes are passed around as a string. --Possible values-- The value is one of the following options: -! Value Description -| @overlap@ Place this shape on top of those below it.
    Further combine options only apply to this shape. -| @merge@ Marge this shape with the one below it, they are considered a single shape for further combining. -| @subtract@ Subtract this shape from the one below it. -| @intersection@ Take the intersection of this shape and the one below it, only areas that are in both shapes remain. -| @difference@ Take the difference of this shape and the one below it, only areas that are in exactly one of the shapes remain. -| @border@ Use this shape as additional border for the shape below it. + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Value + - Description + * - @overlap@ + - Place this shape on top of those below it.
    Further combine options only apply to this shape. + * - @merge@ + - Marge this shape with the one below it, they are considered a single shape for further combining. + * - @subtract@ + - Subtract this shape from the one below it. + * - @intersection@ + - Take the intersection of this shape and the one below it, only areas that are in both shapes remain. + * - @difference@ + - Take the difference of this shape and the one below it, only areas that are in exactly one of the shapes remain. + * - @border@ + - Use this shape as additional border for the shape below it. --Examples-- > combine: overlap @@ -2061,16 +3740,35 @@ Types of graphs for the statistics panel. --Possible values-- The value is one of the following options: -! Value Dimensions Sketch Description -| @bar@ 1 bar graph + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Value + - Dimensions + - Sketch + - Description + * - @bar@ + - 1 + - bar graph One bar for each value on the axis, the height represent the number of cards with that value. -| @pie@ 1 pie graph + * - @pie@ + - 1 + - pie graph A pie graph, the size of the slice represents the numer of cards with a particular value. -| @stack@ 2 stack graph + * - @stack@ + - 2 + - stack graph One bar for each value on the first axis, bars for each value on axis2 are stacked on top of each other. -| @scatter@ 2 scatter graph + * - @scatter@ + - 2 + - scatter graph Scatter plot, the size of the circles corresponds to the number of cards with those two values. -| @scatter pie@ 3 scatter-pie graph + * - @scatter pie@ + - 3 + - scatter-pie graph Scatter plot, the size of the circles corresponds to the number of cards with those two values. Each circle is a small pie graph for the third axis. @@ -2143,12 +3841,24 @@ Multiline strings are written on a new line, indented by a TAB: --Script syntax-- In scripts, strings are written between double quotes, @"this is a string"@. The backslash character is used to escape values: -! Code Represents -| @\"@ A " character -| @\{@ A { character -| @\n@ A newline character (line break) -| @\\@ A backslash -| @\<@ An escaped < for [[type:tagged string]]s. + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Code + - Represents + * - @\"@ + - A " character + * - @\{@ + - A { character + * - @\n@ + - A newline character (line break) + * - @\\@ + - A backslash + * - @\<@ + - An escaped < for [[type:tagged string]]s. Sections between curly braces are interpreted as script code, that is concatentated with the string, for example > "ab{1 + 1}c" == "ab2c" @@ -2165,8 +3875,16 @@ It is an error to select characters outside the string > "xyz".10 # error --See also-- -| [[type:tagged string]] A string containg tags. -| [[fun:to_string]] Convert any value to a [[type:string]] + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - [[type:tagged string]] + - A string containg tags. + * - [[fun:to_string]] + - Convert any value to a [[type:string]] Tagged String @@ -2183,54 +3901,103 @@ To represent the character @"<"@ in a tagged string use @"\<"@ in script code. This is written as the character with code 1 in files. --Basic markup-- -! Tag Description -| @@ The text inside the tag is bold. -| @@ The text inside the tag is italic. -| @@ The text inside the tag is rendered as symbols, if a [[prop:style:symbol font]] is set for the text box. -| @@ The text inside the tag is rendered with the given [[type:color]]. -| @@ The text inside the tag is rendered with the given font size in points, for example @"text"@ makes the text 12 points. The text is scaled down proportionally when it does not fit in a text box and the @scale down to@ attribute allows it. -| @@ The text inside the tag is rendered with the given font family. -| @@ The block inside the tag is aligned with the given horizontal [[type:alignment]] -| @@ The block inside the tag has additional left, right (optional), and top (optional) margins of the specified size in pixels. -| @
  • @ The text inside the tag is treated as a list marker, meaning that if the line wraps it will be indented to match the content of the @
  • @ tag. -| @@ Line breaks inside this tag use the [[prop:style:line height line]], and they show a horizontal line. -| @@ Line breaks inside this tag use the [[prop:style:soft line height]]. -| @@ An atomic piece of text. The cursor can never be inside it; it is selected as a whole. + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Tag + - Description + * - @@ + - The text inside the tag is bold. + * - @@ + - The text inside the tag is italic. + * - @@ + - The text inside the tag is rendered as symbols, if a [[prop:style:symbol font]] is set for the text box. + * - @@ + - The text inside the tag is rendered with the given [[type:color]]. + * - @@ + - The text inside the tag is rendered with the given font size in points, for example @"text"@ makes the text 12 points. The text is scaled down proportionally when it does not fit in a text box and the @scale down to@ attribute allows it. + * - @@ + - The text inside the tag is rendered with the given font family. + * - @@ + - The block inside the tag is aligned with the given horizontal [[type:alignment]] + * - @@ + - The block inside the tag has additional left, right (optional), and top (optional) margins of the specified size in pixels. + * - @
  • @ + - The text inside the tag is treated as a list marker, meaning that if the line wraps it will be indented to match the content of the @
  • @ tag. + * - @@ + - Line breaks inside this tag use the [[prop:style:line height line]], and they show a horizontal line. + * - @@ + - Line breaks inside this tag use the [[prop:style:soft line height]]. + * - @@ + - An atomic piece of text. The cursor can never be inside it; it is selected as a whole. The program automatically inserts @@. -| @@ The text inside the tag is rendered in a monospace font. This is used for syntax highlighting script code. -| @@ The text inside the tag is highlighted as a keyword in source code. -| @@ The text inside the tag is highlighted as a string in source code. + * - @@ + - The text inside the tag is rendered in a monospace font. This is used for syntax highlighting script code. + * - @@ + - The text inside the tag is highlighted as a keyword in source code. + * - @@ + - The text inside the tag is highlighted as a string in source code. --Other tags-- -! Tag Description -| @@ Indicates that the text inside it is a keyword. This tag is automatically inserted by + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Tag + - Description + * - @@ + - Indicates that the text inside it is a keyword. This tag is automatically inserted by The [[fun:expand_keywords]] function.
    There are four versions, indicating whether or not reminder text is shown: * @@, Reminder text hidden, by default * @@, Reminder text shown, by default * @@, Reminder hidden manually * @@, Reminder shown manually -| @@ A separator between fields. This tag is automatically inserted by the [[fun:combined_editor]] function.
    + * - @@ + - A separator between fields. This tag is automatically inserted by the [[fun:combined_editor]] function.
    Inserting this tag manually will confuse that function!
    This tag can never be selected, and its contents can not be edited. -| @@ At the beginning of a string, indicates a part that can not be selected. This tag is automatically inserted by the [[fun:combined_editor]] function. -| @@ At the end of a string, indicates a part that can not be selected. This tag is automatically inserted by the [[fun:combined_editor]] function. -| @@ Like @@, only hidden. This is inserted by [[fun:combined_editor]] -| @@ Text who's width is ignored for alignment, similar to @@, but not a separator. -| @@ Indicate that the text inside the tag should be selected from a [[type:word list]]. + * - @@ + - At the beginning of a string, indicates a part that can not be selected. This tag is automatically inserted by the [[fun:combined_editor]] function. + * - @@ + - At the end of a string, indicates a part that can not be selected. This tag is automatically inserted by the [[fun:combined_editor]] function. + * - @@ + - Like @@, only hidden. This is inserted by [[fun:combined_editor]] + * - @@ + - Text who's width is ignored for alignment, similar to @@, but not a separator. + * - @@ + - Indicate that the text inside the tag should be selected from a [[type:word list]]. The ??? must be the name of a word list in the game. -| @@ The text inside the tag is an error, and is shown with a red wavy underline. -| @@ A spelling error, marked by the [[fun::check_spelling]] function. + * - @@ + - The text inside the tag is an error, and is shown with a red wavy underline. + * - @@ + - A spelling error, marked by the [[fun::check_spelling]] function. The ??? part indicates the language used for spelling checking. -| any other tag Other tags are ignored. + * - any other tag + - Other tags are ignored. --Related functions-- The following script functions deal with tags: -| [[fun:tag_contents]] Change the contents of a specific tag. -| [[fun:remove_tag]] Remove a tag, keep the contents. -| [[fun:remove_tags]] Remove all tags from tagged text. -| [[fun:to_text]] Remove all tags from tagged text, and convert it to a [[type:string]]. + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - [[fun:tag_contents]] + - Change the contents of a specific tag. + * - [[fun:remove_tag]] + - Remove a tag, keep the contents. + * - [[fun:remove_tags]] + - Remove all tags from tagged text. + * - [[fun:to_text]] + - Remove all tags from tagged text, and convert it to a [[type:string]]. Localized String @@ -2255,10 +4022,19 @@ Filename Filenames are regular [[type:string]]s, pointing to a file. There are two types of filenames, relative and absolute: -! Syntax Description -| path/to/file A relative file, this is retrieved from the current package. + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Syntax + - Description + * - path/to/file + - A relative file, this is retrieved from the current package. i.e. for a filename in a stylesheet, the file is retrieved from that stylesheet. -| /package/path/to/file An absolute filename includes the name of the package. This is a package somewhere in the MSE data directory. + * - /package/path/to/file + - An absolute filename includes the name of the package. This is a package somewhere in the MSE data directory. Don't forget the double quotes (@""@) in scripts. @@ -2282,9 +4058,21 @@ __________ For example a [[type:stylesheet]] needs a particular version of the corresponding [[type:game]] package, and maybe some additional [[type:include]]s. --Properties-- -! Property Type Description -| @package@ [[type:string]] Filename of the package this package depends on. -| @version@ [[type:version]] Minimal version of that package that is required. + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Property + - Type + - Description + * - @package@ + - [[type:string]] + - Filename of the package this package depends on. + * - @version@ + - [[type:version]] + - Minimal version of that package that is required. The two properties can also be written on a single line, separated by a space (see the examples). @@ -2330,14 +4118,47 @@ The strings @"yes"@ and @"no"@ can also be converted to booleans. > true or false The operators @or@, @and@ and @xor@ combine two booleans: -! @a@ @b@ a or b a and b a xor b -| @false@ @false@ @false@ @false@ @false@ -| @false@ @true@ @true@ @false@ @true@ -| @true@ @false@ @true@ @false@ @true@ -| @true@ @true@ @true@ @true@ @false@ + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - @a@ + - @b@ + - a or b + - a and b + - a xor b + * - @false@ + - @false@ + - @false@ + - @false@ + - @false@ + * - @false@ + - @true@ + - @true@ + - @false@ + - @true@ + * - @true@ + - @false@ + - @true@ + - @false@ + - @true@ + * - @true@ + - @true@ + - @true@ + - @true@ + - @false@ --See also-- -| [[fun:to_boolean]] Convert a value to a boolean + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - [[fun:to_boolean]] + - Convert a value to a boolean Int @@ -2353,8 +4174,16 @@ In many cases negative numbers don't make sense, but the program never complains > 123 + 456 * -1 --See also-- -| [[type:double]] Number type that can contain fractional values. -| [[fun:to_int]] Convert a value to an integer number + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - [[type:double]] + - Number type that can contain fractional values. + * - [[fun:to_int]] + - Convert a value to an integer number Double @@ -2372,8 +4201,16 @@ Conversion from integer to real numbers happens automatically in scripting. > 123.1 + 456 * -1 --See also-- -| [[type:int]] Integer numbers -| [[fun:to_real]] Convert a value to a real number + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - [[type:int]] + - Integer numbers + * - [[fun:to_real]] + - Convert a value to a real number Version @@ -2415,18 +4252,43 @@ In scripts named colors are represented as [[type:string]]s. --Examples-- For example: -! Code Represents <<< -| @rgb(255,255,255)@ white
    -| @rgb(0,0,0)@ black
    -| @rgb(255,0,0)@ red
    -| @rgb(0,255,0)@ green
    -| @rgb(0,0,255)@ blue
    -| @rgba(0,0,0,0)@ transparent
    over
    -| @rgba(255,0,0,128)@ transparent red
    over
    -| @rgba(0,0,255,192)@ transparent blue
    over
    + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Code + - Represents + - <<< + * - @rgb(255,255,255)@ + - white + -
    + * - @rgb(0,0,0)@ + - black + -
    + * - @rgb(255,0,0)@ + - red + -
    + * - @rgb(0,255,0)@ + - green + -
    + * - @rgb(0,0,255)@ + - blue + -
    + * - @rgba(0,0,0,0)@ + - transparent + -
    over
    + * - @rgba(255,0,0,128)@ + - transparent red + -
    over
    + * - @rgba(0,0,255,192)@ + - transparent blue + -
    over
    --See also-- -| [[fun:to_color]] Convert any value to a color + * - [[fun:to_color]] + - Convert any value to a color Date ~~~~ @@ -2440,8 +4302,16 @@ The file syntax uses [[http://en.wikipedia.org/wiki/ISO_8601|ISO 8601]] notation > something: 2008-12-31 23:59:59 --See also-- -| [[fun:to_date]] Convert a value to a date -| [[fun:to_string]] Convert dates to strings + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - [[fun:to_date]] + - Convert a value to a date + * - [[fun:to_string]] + - Convert dates to strings @@ -2451,13 +4321,40 @@ Choice A possible choice for a choice [[type:field]]. --Properties-- -! Property Type Default Description -| @name@ [[type:string]] ''Required'' Name of this choice, displayed in the drop down list. -| @line below@ [[type:boolean]] @false@ Display a line below this item? -| @group choice@ [[type:string]] ''no'' Can this submenu of choices itself be selected? -| @choices@ [[type:list]] of [[type:choice]]s Submenu of choices. -| @enabled@ [[type:scriptable]] [[type:boolean]] Is this choice selectable? -| @type@ @"check"@ or @"radio"@ @"check"@ How should this choice be displayed? As a checkbox or a radio box?
    + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Property + - Type + - Default + - Description + * - @name@ + - [[type:string]] + - ''Required'' + - Name of this choice, displayed in the drop down list. + * - @line below@ + - [[type:boolean]] + - @false@ + - Display a line below this item? + * - @group choice@ + - [[type:string]] + - ''no'' + - Can this submenu of choices itself be selected? + * - @choices@ + - [[type:list]] of [[type:choice]]s + - + - Submenu of choices. + * - @enabled@ + - [[type:scriptable]] [[type:boolean]] + - + - Is this choice selectable? + * - @type@ + - @"check"@ or @"radio"@ + - @"check"@ + - How should this choice be displayed? As a checkbox or a radio box?
    Only applies to multiple choice fields. A choice can also be given in a short form, in that case only the name is specified. @@ -2496,9 +4393,21 @@ Color Choice A possible choice for a color [[type:field]]. --Properties-- -! Property Type Description -| @name@ [[type:string]] Name of this choice, displayed in the drop down list. -| @color@ opaque [[type:color]] Color this choice corresponds with. + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :align: left + + * - Property + - Type + - Description + * - @name@ + - [[type:string]] + - Name of this choice, displayed in the drop down list. + * - @color@ + - opaque [[type:color]] + - Color this choice corresponds with. --Example-- >choice: From 5e7f49523d049c635e40bd94b92cd0354da445fb Mon Sep 17 00:00:00 2001 From: Brendan Hagan Date: Wed, 31 Aug 2022 20:11:52 -0400 Subject: [PATCH 16/24] misc: code block batch conversion --- docs/type/index.rst | 1032 +++++++++++++++++++++++++++---------------- 1 file changed, 660 insertions(+), 372 deletions(-) diff --git a/docs/type/index.rst b/docs/type/index.rst index 83388923..dfd46895 100644 --- a/docs/type/index.rst +++ b/docs/type/index.rst @@ -394,32 +394,38 @@ such a package contains a data file called set. --Example-- If the game looks like: ->mse version: 0.3.4 ->name: my game ->set field: -> name: copyright -> type: text ->card field: -> name: card name -> type: text ->card field: -> name: power -> type: text + +.. code-block:: + + mse version: 0.3.4 + name: my game + set field: + name: copyright + type: text + card field: + name: card name + type: text + card field: + name: power + type: text The the a set file would looks like: ->mse version: 0.3.4 ->game: my game ->name: my set ->set info: -> copyright: something ->extra set info: -> name of style: -> name of field: something ->card: -> card name: first card -> power: 100 ->card: -> card name: second card -> power: 50 + +.. code-block:: + + mse version: 0.3.4 + game: my game + name: my set + set info: + copyright: something + extra set info: + name of style: + name of field: something + card: + card name: first card + power: 100 + card: + card name: second card + power: 50 Pack Type ~~~~~~~~~ @@ -519,18 +525,24 @@ How that happens depends on the @select@ property: @select: first@ can be used to make a kind of if statement: "If there are any X cards then use those, otherwise use Y cards". --Examples-- ->pack item: -> name: rare -> select: no replace # this is optional, 'no replace' is the default -> filter: card.rarity == "rare" + +.. code-block:: + + pack item: + name: rare + select: no replace # this is optional, 'no replace' is the default + filter: card.rarity == "rare" Rare cards are those with the rarity value of @"rare"@. The cards are chosen without replacement, so in a single pack the same rare will not occur twice. ->pack item: -> name: basic land -> select: equal -> filter: card.rarity == "basic land" + +.. code-block:: + + pack item: + name: basic land + select: equal + filter: card.rarity == "basic land" Basic land cards are selected in equal amounts: Say a set contains two basic lands: "Good Land" and "Bad Land". @@ -538,38 +550,47 @@ Then if 6 basic lands are selected, there will always be exactly 3 "Good Lands" If an odd number of basic lands are selected then the amounts will be as close as possible to being equal. ->pack type: -> name: booster pack -> select: all # this is optional, 'all' is the default -> item: -> name: rare -> amount: 1 -> item: -> name: uncommon -> amount: 3 -> item: -> name: common -> amount: 11 + +.. code-block:: + + pack type: + name: booster pack + select: all # this is optional, 'all' is the default + item: + name: rare + amount: 1 + item: + name: uncommon + amount: 3 + item: + name: common + amount: 11 A Magic booster pack contains 1 rare, 3 uncommons and 11 commons. ->pack type: -> name: special or else common -> select: first -> item: special -> item: common + +.. code-block:: + + pack type: + name: special or else common + select: first + item: special + item: common If there are any special cards in the set, then "special or else common" will be a special card, otherwise it will be a common. ->pack type: -> name: rare or mythic rare -> select: proportional -> item: -> name: rare -> weight: 2 -> item: -> name: mythic rare -> weight: 1 + +.. code-block:: + + pack type: + name: rare or mythic rare + select: proportional + item: + name: rare + weight: 2 + item: + name: mythic rare + weight: 1 In Magic, individual "mythic rares" are twice as rare as normal rare cards. Since there are also less mythic rares, this does not mean that each booster pack has a 33% percent chance of containing a mythic rare. @@ -613,13 +634,19 @@ A reference to another [[type:pack type]], from which one or more cards are chos Cards from @filter@ will have a weight of 1. --Examples-- ->item: -> name: common -> amount: 11 + +.. code-block:: + + item: + name: common + amount: 11 Include 11 commons in this [[type:pack type|pack]]. ->item: common + +.. code-block:: + + item: common Short form. Include a single common in this pack. @@ -650,7 +677,10 @@ This resolution could correspond to a point size of for instance 150pt. When the symbol is drawn at for instance 12pt the image well then be scaled down to @200/150*12 == 16@ pixels. Sizes like margin, padding and font size are given in 'pixels per point'. If for instance -> text margin left: 0.1 + +.. code-block:: + + text margin left: 0.1 is specified, and the symbol is rendered at 12pt, the margin will be @12*0.1 == 1.2@ pixels. --Package format-- @@ -765,15 +795,21 @@ In [[type:stylesheet]]s the symbol fonts are not included inline, instead they a - Alignment of symbols in a line of text. --Example-- ->symbol font: -> name: magic-mana-small -> size: 10 -> alignment: top left + +.. code-block:: + + symbol font: + name: magic-mana-small + size: 10 + alignment: top left The name can be scripted: ->symbol font: -> name: { if set.use_larga_mana_symbols then "magic-mana-large" else "magic-mana-small" } -> size: 10 -> alignment: top left + +.. code-block:: + + symbol font: + name: { if set.use_larga_mana_symbols then "magic-mana-large" else "magic-mana-small" } + size: 10 + alignment: top left Symbol Font Symbol __________________ @@ -847,21 +883,27 @@ A single symbol in a [[type:symbol font]]. --Examples-- A symbol with text: ->symbol: -> image: blank.png -> code: . -> regex: true -> text font: Arial + +.. code-block:: + + symbol: + image: blank.png + code: . + regex: true + text font: Arial Two symbols for the same code, which one is used depends on a function from the [[type:stylesheet]]. It is recommended to only use functions in @enabled@, so each stylesheet can determine how the font should be used. ->symbol: -> code: T -> image: mana_t_old.png -> enabled: { use_old_tap_symbol() } ->symbol: -> code: T -> image: mana_t.png + +.. code-block:: + + symbol: + code: T + image: mana_t_old.png + enabled: { use_old_tap_symbol() } + symbol: + code: T + image: mana_t.png Insert Symbol Menu @@ -913,30 +955,33 @@ For custom items the dialog will be titled with the @label@ and have message tex --Examples-- A menu for magic mana symbols (simplified). Containing all types of items. ->insert symbol menu: -> item: -> type: custom -> name: Generic -> prompt: How much generic mana? -> item: -> type: line -> item: W -> item: U -> item: B -> item: R -> item: G -> item: -> label: Complex -> name: cplx -> item: -> type: line -> item: -> name: hybrid -> item: W/U -> item: U/B -> item: B/R -> item: R/G -> item: G/W + +.. code-block:: + + insert symbol menu: + item: + type: custom + name: Generic + prompt: How much generic mana? + item: + type: line + item: W + item: U + item: B + item: R + item: G + item: + label: Complex + name: cplx + item: + type: line + item: + name: hybrid + item: W/U + item: U/B + item: B/R + item: R/G + item: G/W Export Template @@ -1179,7 +1224,10 @@ There are usually no other files in the package. Translations for specific [[type:symbol font]]s, in particular the "insert symbol" menu. Some of the items can contain placeholders for other values, for example: -> undo: &Undo%s Ctrl+Z + +.. code-block:: + + undo: &Undo%s Ctrl+Z The @%s@ is replaced by the name of the action to undo. This @%s@ should be used in exactly those entries that also contain it in the English locale. @@ -1301,7 +1349,10 @@ The MSE settings are stored in a separate file. --Location-- On Windows XP the settings are located in: -> "C:\Documents and Settings\Application Data\Magic Set Editor\mse8.config" + +.. code-block:: + + "C:\Documents and Settings\Application Data\Magic Set Editor\mse8.config" --Properties-- See the settings file for the properties. @@ -1647,30 +1698,36 @@ Additional properties are available, depending on the type of field: --Example-- The @title@ field gives the title of a set: ->set field: -> type: text -> name: title -> identifying: true + +.. code-block:: + + set field: + type: text + name: title + identifying: true The border color of cards can be selected from a list of choices, but other values are also possible. The default is based on a set field. Statistics don't make much sense for the border color. ->card field: -> type: color -> name: border color -> default: set.border_color -> choice: -> name: black -> color: rgb(0,0,0) -> choice: -> name: white -> color: rgb(255,255,255) -> choice: -> name: silver -> color: rgb(128,128,128) -> choice: -> name: gold -> color: rgb(200,180,0) -> show statistics: false + +.. code-block:: + + card field: + type: color + name: border color + default: set.border_color + choice: + name: black + color: rgb(0,0,0) + choice: + name: white + color: rgb(255,255,255) + choice: + name: silver + color: rgb(128,128,128) + choice: + name: gold + color: rgb(200,180,0) + show statistics: false Style @@ -1705,13 +1762,19 @@ A style specifies the position of a box for the content. To specify the horizontal location ''two'' of @left@, @width@ and @right@ must be specified. For example: -> left: 10 -> width: 20 + +.. code-block:: + + left: 10 + width: 20 Implies that @right@ is 30 pixels. Similarly: -> left: 10 -> right: 30 + +.. code-block:: + + left: 10 + right: 30 Implies the @width@ is 20. The same holds for the vertical location and size; @top@, @height@ and @bottom@. @@ -2169,7 +2232,10 @@ A way to render a choice [[type:field]], see [[type:style]]. A list of the selected items with both images and text. --Examples-- -> render style: image + +.. code-block:: + + render style: image Symbol Variation ________________ @@ -2263,22 +2329,25 @@ Depending on the @fill type@ there are additional properties: --Examples-- 'Common' and 'uncommon' magic expansion symbol styles: ->variation: -> name: common -> border radius: 0.10 -> # White border, black fill -> fill type: solid -> fill color: rgb(0,0,0) -> border color: rgb(255,255,255) ->variation: -> name: uncommon -> border radius: 0.05 -> fill type: linear gradient -> # Black border, silver gradient fill -> fill color 1: rgb(224,224,224) -> fill color 2: rgb(84, 84, 84) -> border color 1: rgb(0, 0, 0) -> border color 2: rgb(0, 0, 0) + +.. code-block:: + + variation: + name: common + border radius: 0.10 + # White border, black fill + fill type: solid + fill color: rgb(0,0,0) + border color: rgb(255,255,255) + variation: + name: uncommon + border radius: 0.05 + fill type: linear gradient + # Black border, silver gradient fill + fill color 1: rgb(224,224,224) + fill color 2: rgb(84, 84, 84) + border color 1: rgb(0, 0, 0) + border color 2: rgb(0, 0, 0) Text Layout ___________ @@ -2294,7 +2363,10 @@ A block is one or more paragraphs, ending in a line, "\n". It is possible to dig deeper into blocks, for example -> card_style.text.layout.blocks[1].lines[0].middle + +.. code-block:: + + card_style.text.layout.blocks[1].lines[0].middle Is the middle of the first line of the second block. @@ -2406,14 +2478,20 @@ The type of a value depends on the corresponding field: --Example-- For the field: ->field: -> type: choice -> name: card color -> choice: red -> choice: green -> choice: blue + +.. code-block:: + + field: + type: choice + name: card color + choice: red + choice: green + choice: blue A value could be: ->card color: red + +.. code-block:: + + card color: red Card @@ -2471,22 +2549,28 @@ A '''card''' in a [[type:set]]. --Examples-- With the following game: ->card field: -> type: text -> name: title ->card field: -> type: color -> name: card color + +.. code-block:: + + card field: + type: text + name: title + card field: + type: color + name: card color A card could look like: ->card: -> stylesheet: new -> has styling: false -> notes: This card is not finished yet! -> styling data: -> extra large cards: true -> title: My Card -> card color: rgb(0,128,255) + +.. code-block:: + + card: + stylesheet: new + has styling: false + notes: This card is not finished yet! + styling data: + extra large cards: true + title: My Card + card color: rgb(0,128,255) Keyword @@ -2536,11 +2620,14 @@ These will match according to the @match@ property of that parameter type. When expanding the reminder text @param1@ refers to the first parameter in the match string, @param2@ to the second, etc. --Example-- ->keyword: -> keyword: Equip -> match: Equip cost -> mode: core -> reminder: {param1}: Attach to target creature you control. Equip only as a sorcery. + +.. code-block:: + + keyword: + keyword: Equip + match: Equip cost + mode: core + reminder: {param1}: Attach to target creature you control. Equip only as a sorcery. Keyword Mode @@ -2580,10 +2667,13 @@ This information can then be used to determine whether to expand the reminder te - Is this the default mode for new keywords? --Example-- ->keyword mode: -> name: custom -> description: Custom keywords -> is default: true + +.. code-block:: + + keyword mode: + name: custom + description: Custom keywords + is default: true Keyword Param Type @@ -2659,17 +2749,20 @@ A type of parameter that can be used in a [[type:keyword]]. --Example-- The 'number' parameter type. It matches a sequence of digits. It can be included in the reminder text directly, or by applying some function first. ->keyword parameter type: -> name: number -> match: [0-9]+ -> refer script: -> name: normal -> description: (1,2,3) -> script: \{{input}\} -> refer script: -> name: as words -> description: (one, two, three) -> script: \{english_number({input})\} + +.. code-block:: + + keyword parameter type: + name: number + match: [0-9]+ + refer script: + name: normal + description: (1,2,3) + script: \{{input}\} + refer script: + name: as words + description: (one, two, three) + script: \{english_number({input})\} Keyword Param Reference Script ______________________________ @@ -2711,10 +2804,13 @@ To make this easy for the user, a menu of choices is provided, this type describ --Example-- Apply the [[fun:english_number]] function to the parameter: ->refer script: -> name: as words -> description: (one, two, three) -> script: \{english_number({input})\} + +.. code-block:: + + refer script: + name: as words + description: (one, two, three) + script: \{english_number({input})\} @@ -2790,25 +2886,31 @@ Categories are also automatically generated from dimensions. --Example-- Automatically generated statistics dimensions look like this: ->statistics dimension: -> name: power -> script: card.power + +.. code-block:: + + statistics dimension: + name: power + script: card.power Specify a specific order and color of values, otherwise they are ordered alphabeticaly and groups with no cards are not shown: ->statistics dimension: -> name: color -> script: card.color -> group: white -> group: blue -> group: black -> group: red -> group: green -> colors: -> white: rgb(255,255,255) -> blue: rgb(0,0,255) -> black: rgb(0,0,0) -> red: rgb(255,0,0) -> green: rgb(0,255,0) + +.. code-block:: + + statistics dimension: + name: color + script: card.color + group: white + group: blue + group: black + group: red + group: green + colors: + white: rgb(255,255,255) + blue: rgb(0,0,255) + black: rgb(0,0,0) + red: rgb(255,0,0) + green: rgb(0,255,0) Word List ~~~~~~~~~ @@ -2836,13 +2938,19 @@ A list of words. Used for drop down lists in the text editor, for example for ca - The words in the list --Example-- ->word list: -> name: type -> word: Creature -> word: Spell -> word: Artifact + +.. code-block:: + + word list: + name: type + word: Creature + word: Spell + word: Artifact This can be used with for example: -> @"Creature"@ + +.. code-block:: + + @"Creature"@ Which gives the creature choice, and that can be changed with a drop down list. Word List Word @@ -2889,21 +2997,33 @@ A word can also be given in a short form, in that case only the name is specifie --Example-- In short form: ->word: xyz + +.. code-block:: + + word: xyz Is the same as: ->word: -> name: xyz + +.. code-block:: + + word: + name: xyz Using a script, ->word: -> script: "red,green,blue" -> line below: true + +.. code-block:: + + word: + script: "red,green,blue" + line below: true Is the same as ->word: blue ->word: green ->word: -> name: red -> line below: true + +.. code-block:: + + word: blue + word: green + word: + name: red + line below: true Add Cards Script @@ -2946,16 +3066,19 @@ A script to add multiple cards to the set at once. The [[fun:new_card]] function can be used to make new cards. --Example-- ->add cards script: -> name: &Basic Lands -> description: Adds 5 basic lands to the set. -> script: -> [ new_card([name: "Plains", super_type: "Basic Land", sub_type: "Plains"]) -> , new_card([name: "Island", super_type: "Basic Land", sub_type: "Island"]) -> , new_card([name: "Swamp", super_type: "Basic Land", sub_type: "Swamp"]) -> , new_card([name: "Mountain", super_type: "Basic Land", sub_type: "Mountain"]) -> , new_card([name: "Forest", super_type: "Basic Land", sub_type: "Forest"]) -> ] + +.. code-block:: + + add cards script: + name: &Basic Lands + description: Adds 5 basic lands to the set. + script: + [ new_card([name: "Plains", super_type: "Basic Land", sub_type: "Plains"]) + , new_card([name: "Island", super_type: "Basic Land", sub_type: "Island"]) + , new_card([name: "Swamp", super_type: "Basic Land", sub_type: "Swamp"]) + , new_card([name: "Mountain", super_type: "Basic Land", sub_type: "Mountain"]) + , new_card([name: "Forest", super_type: "Basic Land", sub_type: "Forest"]) + ] When invoked, this script will add the five basic lands to the set. @@ -3037,11 +3160,14 @@ A reference to a normal [[type:font]] for drawing text. - Color for @@ tags inserted by the [[fun:combined_editor]] function. --Example-- ->font: -> name: Times new Roman -> size: 17 -> weight: bold -> color: rgb(0,0,0) + +.. code-block:: + + font: + name: Times new Roman + size: 17 + weight: bold + color: rgb(0,0,0) Symbol Part @@ -3219,28 +3345,43 @@ List In files a list is represented as multiple keys, one for each element. The keys are all in the singular for of the name of the list, if the list is named for instance @symbols@ each key will be named @symbol@. ->symbol: -> # first symbol here ->symbol: -> # second symbol here -># etc. + +.. code-block:: + + symbol: + # first symbol here + symbol: + # second symbol here + # etc. --Script syntax-- In a script lists can be declared using square brackets. -> [] # An empty list -> [1] # A list with a single element, the value 1 -> [1,2] # A list with two elements + +.. code-block:: + + [] # An empty list + [1] # A list with a single element, the value 1 + [1,2] # A list with two elements Lists can be accessed using either the bracket operator, or the dot operator. The first element of a list is numbered 0, the next 1, etc. -> list.0 # The first element of the list 'list' -> list[0] # The same thing -> list[0+0] # The same thing + +.. code-block:: + + list.0 # The first element of the list 'list' + list[0] # The same thing + list[0+0] # The same thing It is possible to iterate over lists using the @for each@ construct: -> for each x in [1,2,3] do "x = {x}. " + +.. code-block:: + + for each x in [1,2,3] do "x = {x}. " evaluates to: -> "x = 1. x = 2. x = 3. " + +.. code-block:: + + "x = 1. x = 2. x = 3. " --Functions-- There are several functions for working with lists: @@ -3268,32 +3409,47 @@ Field Map A 'field map' is a [[type:map]], but indexed by [[type:field]]s. For instance if a game specifies the fields: ->field: -> type: text -> name: field1 ->field: -> type: color -> name: field2 + +.. code-block:: + + field: + type: text + name: field1 + field: + type: color + name: field2 Then the a field map of ''things'' for those fields would look like: ->field1: thing ->field2: thing + +.. code-block:: + + field1: thing + field2: thing A field map of [[type:style]]s would be: ->field1: # some text style for field1 goes here ->field2: # some color style for field2 goes here + +.. code-block:: + + field1: # some text style for field1 goes here + field2: # some color style for field2 goes here And a field map of [[type:value]]s would be: ->field1: text goes here ->field2: rgb(1,2,3) + +.. code-block:: + + field1: text goes here + field2: rgb(1,2,3) --Script syntax-- In a script field maps can be accessed like normal [[type:map]]s based on the field name. So: ->card.field1 # retrieve the value of field1 ->card["field" + 1] # the same thing ->card_style.field2 # retrieve the styling for field2 + +.. code-block:: + + card.field1 # retrieve the value of field1 + card["field" + 1] # the same thing + card_style.field2 # retrieve the styling for field2 Map @@ -3304,25 +3460,40 @@ A map is like a [[type:list]] with [[type:string]] keys. --File syntax-- In files a map is represented as key/value pairs. For instance a map of [[type:color]]s could be: ->some map: -> red: rgb(255,0,0) -> green: rgb(0,255,0) -> blue: rgb(0,0,255) + +.. code-block:: + + some map: + red: rgb(255,0,0) + green: rgb(0,255,0) + blue: rgb(0,0,255) --Script syntax-- In a script maps can be declared using square brackets. -> [] # An empty map -> [key:1] # A map with a single element, the value 1 under the key "key" -> [red:rgb(255,0,0), green:rgb(0,255,0)] # A map with two elements + +.. code-block:: + + [] # An empty map + [key:1] # A map with a single element, the value 1 under the key "key" + [red:rgb(255,0,0), green:rgb(0,255,0)] # A map with two elements Like lists, maps can be accessed using either the bracket operator, or the dot operator. -> map.key # The elment named "key" -> map["k"+"ey"] # The same thing + +.. code-block:: + + map.key # The elment named "key" + map["k"+"ey"] # The same thing It is possible to iterate over the values maps using the @for@ construct: -> for each x in [one: 1, two: 2] do "x = {x}. " + +.. code-block:: + + for each x in [one: 1, two: 2] do "x = {x}. " evaluates to: -> "x = 1. x = 2. " + +.. code-block:: + + "x = 1. x = 2. " @@ -3376,13 +3547,19 @@ A script is given in the same way as a [[type:string]]. --Example-- A simple [[type:field]] script that converts everything to upper case: ->script: to_upper(value) + +.. code-block:: + + script: to_upper(value) A larger script, changes @"y"@s to @"x"@s and @"a"@s to @"b"@s: ->script: -> new_value := replace(value, match: "x", replace: "y") -> new_value := replace(value, match: "a", replace: "b") -> new_value + +.. code-block:: + + script: + new_value := replace(value, match: "x", replace: "y") + new_value := replace(value, match: "a", replace: "b") + new_value Scriptable @@ -3393,10 +3570,16 @@ Scriptable Many [[type:style]] properties are ''scriptable''; their value can be changed by a script. Consider for example: ->left: 123 + +.. code-block:: + + left: 123 This defines that the left coordinate of a field is 123 pixels. To script this you can write: ->left: { if card.name == "" then 100 else 123 } + +.. code-block:: + + left: { if card.name == "" then 100 else 123 } Now the left position depends on whether or not the name is empty. --File syntax-- @@ -3410,16 +3593,25 @@ A 'scriptable something' can take three forms: > script: 100 + 23 Note: To use a multiline script the following does not work: ->something: { 100 + -> 23 } + +.. code-block:: + + something: { 100 + + 23 } If the script has multiple lines, it must start on a new line, and be indented with a TAB: ->something: -> { 100 + -> 23 } + +.. code-block:: + + something: + { 100 + + 23 } or ->something: -> script: 100 + -> 23 + +.. code-block:: + + something: + script: 100 + + 23 Image @@ -3431,9 +3623,12 @@ It is either given using a [[type:filename]] or as the output of a function. --File syntax-- The syntax for files is similair to that of [[type:scriptable]] properties: -> image: image.png -> image: { "image.png" } -> image: { linear_blend(...) } + +.. code-block:: + + image: image.png + image: { "image.png" } + image: { linear_blend(...) } --Script syntax-- [[type:Filename]]s are implicitly converted to images as needed. @@ -3483,14 +3678,20 @@ A function can be called using parentheses, for example @function(argument:value --Composition-- Functions can be composed using the @+@ operator, evaluating @a + b@ first evaluates @a@ and uses its result as @input@ for @b@: -> example := to_upper + { "result == {input}" } -> example("xyz") == "result == XYZ" + +.. code-block:: + + example := to_upper + { "result == {input}" } + example("xyz") == "result == XYZ" Multiple functions can be changed together like this, this is especially convenient in combination with [[script:default arguments]]. --Example-- -> example := { a + b } -> example(a: 1, b: 2) == 3 + +.. code-block:: + + example := { a + b } + example(a: 1, b: 2) == 3 @@ -3582,10 +3783,13 @@ These flags can appear in any order. Normally only lines ending in a soft line break are justified. --Examples-- -> alignment: top left -> alignment: middle center -> alignment: top left force justify if-overflow -> alignment: { "middle" + " " + "left" } + +.. code-block:: + + alignment: top left + alignment: middle center + alignment: top left force justify if-overflow + alignment: { "middle" + " " + "left" } Direction @@ -3619,8 +3823,11 @@ In scripts, direction is passed around as a string. - Same as @top to bottom@. --Examples-- -> direction: horizontal -> direction: top to bottom + +.. code-block:: + + direction: horizontal + direction: top to bottom Combine @@ -3693,8 +3900,11 @@ In scripts, combine modes are stored as a string. - @(overlay(a,b) + overlay(b,a)) / 2@ --Examples-- -> combine: overlay -> combine_image(image1: ..., image2: ..., combine: "shadow") + +.. code-block:: + + combine: overlay + combine_image(image1: ..., image2: ..., combine: "shadow") @@ -3730,7 +3940,10 @@ The value is one of the following options: - Use this shape as additional border for the shape below it. --Examples-- -> combine: overlap + +.. code-block:: + + combine: overlap Graph Type @@ -3773,7 +3986,10 @@ The value is one of the following options: Each circle is a small pie graph for the third axis. --Examples-- -> type: bar + +.. code-block:: + + type: bar @@ -3831,12 +4047,18 @@ A string is just a piece of text. --File syntax-- In files, strings are written just as their value: -> string: this is some string + +.. code-block:: + + string: this is some string The whitespace at the beginning is removed by the program. Multiline strings are written on a new line, indented by a TAB: -> string: -> This is a very long string -> It contains a line break. + +.. code-block:: + + string: + This is a very long string + It contains a line break. --Script syntax-- In scripts, strings are written between double quotes, @"this is a string"@. @@ -3861,18 +4083,27 @@ The backslash character is used to escape values: - An escaped < for [[type:tagged string]]s. Sections between curly braces are interpreted as script code, that is concatentated with the string, for example -> "ab{1 + 1}c" == "ab2c" + +.. code-block:: + + "ab{1 + 1}c" == "ab2c" This can be nested arbitrarily. The @+@ operator concatenates strings. Numbers and most other values are automatically converted to strings when needed. This conversion can be forced with the [[fun:to_string]] function. Using the @[]@ or @.@ operator characters in a string can be selected. 0 is the first character: -> "xyz"[0] == "x" -> "xyz".0 == "x" # same thing -> "xyz".1 == "y" -> "xyz".2 == "z" + +.. code-block:: + + "xyz"[0] == "x" + "xyz".0 == "x" # same thing + "xyz".1 == "y" + "xyz".2 == "z" It is an error to select characters outside the string -> "xyz".10 # error + +.. code-block:: + + "xyz".10 # error --See also-- @@ -4009,12 +4240,15 @@ It is used to translate games and stylesheets to other user interface languages. Localized strings can be given with a @localized@ prefix on the property name. For example, a field has a @description@ which is a [[type::string]], and a @localized_description@ for localized variants. So ->field: -> name: cost -> description: How much this card costs -> localized description: -> en_US: How much this card costs -> nl_NL: Hoeveel deze kaart kost + +.. code-block:: + + field: + name: cost + description: How much this card costs + localized description: + en_US: How much this card costs + nl_NL: Hoeveel deze kaart kost Filename @@ -4042,11 +4276,17 @@ Don't forget the double quotes (@""@) in scripts. When using an absolute filename to refer to a file from another [[file:package]], the [[type:dependency]] on that package must be declared. For example, ->include file: /common.mse-include/something + +.. code-block:: + + include file: /common.mse-include/something Will give a warning message, unless the file also lists ->depends on: -> package: common.mse-include -> version: 2007-01-01 + +.. code-block:: + + depends on: + package: common.mse-include + version: 2007-01-01 Dependency @@ -4078,11 +4318,17 @@ The two properties can also be written on a single line, separated by a space (s --Example-- The magic-new stylesheet depends on a particular version of the game file: ->depends on: -> package: magic.mse-game -> version: 2007-06-06 + +.. code-block:: + + depends on: + package: magic.mse-game + version: 2007-06-06 This can be written more compactly as ->depends on: magic.mse-game 2007-06-06 + +.. code-block:: + + depends on: magic.mse-game 2007-06-06 @@ -4111,11 +4357,17 @@ When converted to a number, @true@ becomes @1@ and @false@ becomes @0@. The strings @"yes"@ and @"no"@ can also be converted to booleans. --File syntax-- -> boolean: true -> boolean: false + +.. code-block:: + + boolean: true + boolean: false --Script syntax-- -> true or false + +.. code-block:: + + true or false The operators @or@, @and@ and @xor@ combine two booleans: @@ -4168,10 +4420,16 @@ Integer numbers are numbers without a decimal point. In many cases negative numbers don't make sense, but the program never complains about them. --File syntax-- -> something: 123 + +.. code-block:: + + something: 123 --Script syntax-- -> 123 + 456 * -1 + +.. code-block:: + + 123 + 456 * -1 --See also-- @@ -4194,11 +4452,17 @@ Real or floating point numbers are numbers with a decimal point. Conversion from integer to real numbers happens automatically in scripting. --File syntax-- -> something: 123 -> something: 0.5 + +.. code-block:: + + something: 123 + something: 0.5 --Script syntax-- -> 123.1 + 456 * -1 + +.. code-block:: + + 123.1 + 456 * -1 --See also-- @@ -4223,8 +4487,11 @@ Higher numbers mean newer versions. The version number can also be a date, of the form "YYYY-MM-DD" --Examples-- -> version: 1.2.3 -> version: 2007-07-12 + +.. code-block:: + + version: 1.2.3 + version: 2007-07-12 Color @@ -4299,7 +4566,10 @@ A point in time, consisting of a date and a time. The file syntax uses [[http://en.wikipedia.org/wiki/ISO_8601|ISO 8601]] notation. --File syntax-- -> something: 2008-12-31 23:59:59 + +.. code-block:: + + something: 2008-12-31 23:59:59 --See also-- @@ -4365,27 +4635,36 @@ The full name of a choice is that of the choice and its parents, separated by sp This is the value actually stored in values and manipulated by scripts. For example ->field: -> type: choice -> choice: -> name: large -> choice: red -> choice: blue -> choice: -> name: small -> group choice: just small -> choice: green -> choice: yellow + +.. code-block:: + + field: + type: choice + choice: + name: large + choice: red + choice: blue + choice: + name: small + group choice: just small + choice: green + choice: yellow The choice red is called @"large red"@, while green is @"small green"@. The group choice 'just small' gets the name of the group, @"small"@. --Example-- In short form: ->choice: apples + +.. code-block:: + + choice: apples Is the same as: ->choice: -> name: apples + +.. code-block:: + + choice: + name: apples Color Choice ~~~~~~~~~~~~ @@ -4410,9 +4689,12 @@ A possible choice for a color [[type:field]]. - Color this choice corresponds with. --Example-- ->choice: -> name: red -> color: rgb(255,0,0) + +.. code-block:: + + choice: + name: red + color: rgb(255,0,0) Vector2D @@ -4427,9 +4709,15 @@ The coordinates are usually in the range @0@ to @1@. @(0,0)@ is the top-left of the symbol, @(1,1)@ the bottom-right. --File syntax-- -> (x-coordinate,y-coordinate) + +.. code-block:: + + (x-coordinate,y-coordinate) For example -> (0.5,0.5) + +.. code-block:: + + (0.5,0.5) --Script syntax-- Vectors can not be represented in script syntax. From 15be8c4b1465910fc63f64080b069c891801afb0 Mon Sep 17 00:00:00 2001 From: Brendan Hagan Date: Wed, 31 Aug 2022 20:25:04 -0400 Subject: [PATCH 17/24] code blocks, sub-sub-sub-headers --- docs/type/index.rst | 1971 ++++++++++++++++++++++--------------------- 1 file changed, 988 insertions(+), 983 deletions(-) diff --git a/docs/type/index.rst b/docs/type/index.rst index dfd46895..6c3b79c3 100644 --- a/docs/type/index.rst +++ b/docs/type/index.rst @@ -4,6 +4,11 @@ Data Types Magic Set Editor uses many data types in the files and in scripting. There are for instance [[type:card]]s in [[type:set]]s, [[type:stylesheet]]s describing the layout of [[type:field]]s, etc. +1. :doc:`set <#set>` +2. :ref:`set` +3. :ref:`sets ` + + File Types ---------- @@ -38,7 +43,7 @@ These are the 'major' data types that are written directly to [[file:packages]]. Game ~~~~ ---Overview-- +**Overview** Games are part of the [[file:style triangle]]: @@ -59,12 +64,12 @@ Games are part of the [[file:style triangle]]: Games provide the ''description'', i.e. what kinds of things are on a card. ---Package format-- +**Package format** A game is described in a [[file:package]] with the .mse-game file extension. Such a package contains a [[file:format|data file]] called game that has the following properties. ---Properties-- +**Properties** .. list-table:: :header-rows: 1 @@ -79,109 +84,109 @@ Such a package contains a [[file:format|data file]] called game that ha - <<< - <<< - <<< - * - @mse version@ + * - ``mse version`` - [[type:version]] - ''required'' - Version of MSE this game is made for. - * - @short name@ + * - ``short name`` - [[type:string]] - file name - A short name of this game, for the 'new set' list. - * - @full name@ + * - ``full name`` - [[type:string]] - file name - A longer name of this game. - * - @icon@ + * - ``icon`` - [[type:filename]] - ''none'' - Filename of an icon / preview for this game, for the 'new set' list. - * - @position hint@ + * - ``position hint`` - [[type:int]] - ∞ - Where to place this item in the 'new set' list? Lower numbers come first. - * - @version@ + * - ``version`` - [[type:version]] - - @0.0.0@ + - ``0.0.0`` - Version number of this package. - * - @depends on@ + * - ``depends on`` - [[type:list]] of [[type:dependency]]s Packages this package depends on. * - '''Specific to games''' - <<< - <<< - <<< - * - @init script@ + * - ``init script`` - [[type:script]] - - @;@ + - ``;`` - Script to run when this game is loaded,
    can set variables to be used by other scripts in this game or stylesheets using it. - * - @set fields@ + * - ``set fields`` - [[type:list]] of [[type:field]]s - - Fields for the styling panel. - * - @default set style@ + * - ``default set style`` - [[type:indexmap]] of [[type:style]]s - - Default style for the set fields, can be overridden by the stylesheet. - * - @card fields@ + * - ``card fields`` - [[type:list]] of [[type:field]]s - - Fields for each card. - * - @card list color script@ + * - ``card list color script`` - [[type:script]] - from fields - - Script that determines the color of an item in the card list.
    If not set uses the @card list colors@ property of the first card field that has it. - * - @statistics dimensions@ + - Script that determines the color of an item in the card list.
    If not set uses the ``card list colors`` property of the first card field that has it. + * - ``statistics dimensions`` - [[type:list]] of [[type:statistics dimension]]s - from fields - Dimensions for statistics, a dimension is roughly the same as an axis.
    By default all card fields with 'show statistics' set to true are used. - * - @statistics categories@ + * - ``statistics categories`` - [[type:list]] of [[type:statistics category]]s - from dimensions - DOC_MSE_VERSION: not used since 0.3.6 Choices shown on the statistics panel.
    By default all statistics dimensions are used. - * - @pack types@ + * - ``pack types`` - [[type:list]] of [[type:pack type]]s - - DOC_MSE_VERSION: since 0.3.7 The types of card packs that will be listed on the random booster panel. - * - @has keywords@ + * - ``has keywords`` - [[type:boolean]] - - @false@ + - ``false`` - Does this game use keywords? Should the keywords tab be available? - * - @keyword match script@ + * - ``keyword match script`` - [[type:script]] - - @;@ - - Script to apply to the @match@ property of keywords. - * - @keyword modes@ + - ``;`` + - Script to apply to the ``match`` property of keywords. + * - ``keyword modes`` - [[type:list]] of [[type:keyword mode]]s - - Choices for the 'mode' property of keywords. - * - @keyword parameter types@ + * - ``keyword parameter types`` - [[type:list]] of [[type:keyword param type]]s - - Types of parameters available to keywords. - * - @keywords@ + * - ``keywords`` - [[type:list]] of [[type:keyword]]s - - Standard keywords for this game. - * - @word lists@ + * - ``word lists`` - [[type:list]] of [[type:word list]]s - - Word lists that can be used by text fields. - * - @add cards script@ + * - ``add cards script`` - [[type:list]] of [[type:add cards script]]s - - DOC_MSE_VERSION: since 0.3.7 A list of scripts for conveniently adding multiple cards to a set. ---Examples-- +**Examples** Look at the game files in the standard MSE distribution for examples. Stylesheet ~~~~~~~~~~ ---Overview-- +**Overview** Stylesheets are part of the [[file:style triangle]]: @@ -202,11 +207,11 @@ Stylesheets are part of the [[file:style triangle]]: Stylesheets provide the ''look and feel'' of cards. ---Package format-- +**Package format** A stylesheet is described in a [[file:package]] with the .mse-style file extension, such a package contains a data file called style. ---Properties-- +**Properties** .. list-table:: :header-rows: 1 @@ -221,31 +226,31 @@ such a package contains a data file called style. - <<< - <<< - <<< - * - @mse version@ + * - ``mse version`` - [[type:version]] - ''required'' - Version of MSE this stylesheet is made for. - * - @short name@ + * - ``short name`` - [[type:string]] - file name - A short name of this stylesheet, for the 'new set' and style panel lists. - * - @full name@ + * - ``full name`` - [[type:string]] - file name - A longer name of this stylesheet. - * - @icon@ + * - ``icon`` - [[type:filename]] - ''none'' - Filename of an icon / preview for this stylesheet, for the 'new set' and style panel lists. - * - @position hint@ + * - ``position hint`` - [[type:int]] - ∞ - Where to place this item in the list? Lower numbers come first. - * - @version@ + * - ``version`` - [[type:version]] - - @0.0.0@ + - ``0.0.0`` - Version number of this package. - * - @depends on@ + * - ``depends on`` - [[type:list]] of [[type:dependency]]s Packages this package depends on. @@ -253,52 +258,52 @@ such a package contains a data file called style. - <<< - <<< - <<< - * - @game@ + * - ``game`` - Name of a [[type:game]] - ''required'' - Game this stylesheet is made for - * - @card width@ + * - ``card width`` - [[type:double]] - 100 - Width of cards in pixels - * - @card height@ + * - ``card height`` - [[type:double]] - 100 - Height of cards in pixels - * - @card dpi@ + * - ``card dpi`` - [[type:double]] - 96 - Resolution of cards in dots-per-inch - * - @card background@ + * - ``card background`` - [[type:color]] - white - Background color of cards - * - @init script@ + * - ``init script`` - [[type:script]] - - @;@ + - ``;`` - Script to run when this stylesheet is loaded, after the game's init script. - * - @styling fields@ + * - ``styling fields`` - [[type:list]] of [[type:field]]s - - Fields for styling options, shown on the 'style' panel. - * - @styling style@ + * - ``styling style`` - [[type:indexmap]] of [[type:style]]s - - Styles for the styling fields. - * - @set info style@ + * - ``set info style`` - [[type:indexmap]] of [[type:style]]s - game.default_set_style - Styling for the 'set info' panel - * - @card style@ + * - ``card style`` - [[type:indexmap]] of [[type:style]]s - - Styles for the card fields defined in the game - * - @extra card fields@ + * - ``extra card fields`` - [[type:list]] of [[type:field]]s - - Additional fields to add to each card.
    These fields are intended for things like lines and boxes, whose value is determined automatically. - * - @extra card style@ + * - ``extra card style`` - [[type:indexmap] of [[type:style]]s - - Styling for the extra card fields @@ -306,7 +311,7 @@ such a package contains a data file called style. Set ~~~ ---Overview-- +**Overview** Sets are part of the [[file:style triangle]]: @@ -325,11 +330,11 @@ Sets are part of the [[file:style triangle]]: - [[type:Style]] - [[type:Value]] ---Package format-- +**Package format** A set is described in a [[file:package]] with the .mse-set file extension, such a package contains a data file called set. ---Properties-- +**Properties** .. list-table:: :header-rows: 1 @@ -344,54 +349,54 @@ such a package contains a data file called set. - <<< - <<< - <<< - * - @mse version@ + * - ``mse version`` - [[type:version]] - ''required'' - Version of MSE this set is made with. - * - @short name@ + * - ``short name`` - [[type:string]] - file name - Name of this set. - * - @depends on@ + * - ``depends on`` - [[type:list]] of [[type:dependency]]s Packages this package depends on. * - '''Specific to sets''' - <<< - <<< - <<< - * - @game@ + * - ``game`` - Name of a [[type:game]] - ''required'' - The game this set is made for. - * - @stylesheet@ + * - ``stylesheet`` - Name of a [[type:stylesheet]] - ''required'' - The default style for drawing cards in this set.
    - This is without the game name or extension, so @"new"@ refers to the package @"gamename-new.mse-style"@. - * - @set info@ + This is without the game name or extension, so ``"new"@ refers to the package @"gamename-new.mse-style"``. + * - ``set info`` - [[type:indexmap]] of [[type:value]]s - - The data for the [[prop:game:set fields]] defined in the game. - * - @styling@ + * - ``styling`` - [[type:map]] of [[type:indexmap]]s of [[type:value]]s Data for the 'extra fields' of the stylesheet.
    This is first indexed by stylesheet name, then by field name.
    Data is given not only for the set's stylesheet but also for those of cards. - * - @cards@ + * - ``cards`` - [[type:list] of [[type:card]]s - - The cards in the set. - * - @keywords@ + * - ``keywords`` - [[type:list] of [[type:keyword]]s - - The custom keywords in the set. - * - @pack types@ + * - ``pack types`` - [[type:list]] of [[type:pack type]]s - - DOC_MSE_VERSION: since 0.3.8 The custom card pack types in the set. ---Example-- +**Example** If the game looks like: @@ -432,7 +437,7 @@ Pack Type DOC_MSE_VERSION: since 0.3.8 ---Overview-- +**Overview** A type of card packs. For instance "booster" and "tournament pack" are card pack types. @@ -441,7 +446,7 @@ A pack type contains either: * one or more [[type:pack item]]s, indicating what kinds and how many cards are in the pack. * a combination of the above. ---Properties-- +**Properties** .. list-table:: :header-rows: 1 @@ -452,79 +457,79 @@ A pack type contains either: - Type - Default - Description - * - @name@ + * - ``name`` - [[type:string]] - - Name of this card pack type. Other pack types can refer to this name. - * - @select@ + * - ``select`` - see below - see below - How are instances of this pack generated? - * - @enabled@ + * - ``enabled`` - [[type:scriptable]] [[type:boolean]] - - @true@ + - ``true`` - Is this pack type enabled, i.e. can the user select it? - * - @selectable@ + * - ``selectable`` - [[type:boolean]] - - @true@ + - ``true`` - Is this pack selectable from the list of packs in the user interface? - * - @summary@ + * - ``summary`` - [[type:boolean]] - - @true@ + - ``true`` - Is a summary of the total number of cards shown in the second panel in the user interface?
    - Note: this only applies to pack types that have the @filter@ property set. - * - @filter@ + Note: this only applies to pack types that have the ``filter`` property set. + * - ``filter`` - [[type:script]] - ''optional'' - Condition that a card must satisfy to be included in this pack type. - * - @items@ + * - ``items`` - [[type:list]] of [[type:pack item]]s - - The items to include in this pack. ---Selection-- +**Selection** -The @select@ property specifies how instances of this pack are generated. +The ``select`` property specifies how instances of this pack are generated. When the user selects that he wants 3 copies of pack X, then MSE will generate three ''instances'' of that pack. -How that happens depends on the @select@ property: +How that happens depends on the ``select`` property: .. list-table:: :header-rows: 1 :stub-columns: 1 :align: left - * - @select@ + * - ``select`` - Description - * - @all@ - - Each instance of this pack type contains all of the filtered cards and @items@.
    - In general, @select: all@ is used for the selectable pack types, while other @select@ types are used for the rest of the packs.
    - This is the default for pack types with @items@. - * - @replace@ - - Each instance of this pack type contains a single card or @item@, chosen at random with replacement. - The probability of picking an item is proportional to its @weight@, all filtered cards have weight 1. - * - @no replace@ - - Each instance of this pack type contains a single card or @item@, chosen at random without replacement. + * - ``all`` + - Each instance of this pack type contains all of the filtered cards and ``items``.
    + In general, ``select: all@ is used for the selectable pack types, while other @select`` types are used for the rest of the packs.
    + This is the default for pack types with ``items``. + * - ``replace`` + - Each instance of this pack type contains a single card or ``item``, chosen at random with replacement. + The probability of picking an item is proportional to its ``weight``, all filtered cards have weight 1. + * - ``no replace`` + - Each instance of this pack type contains a single card or ``item``, chosen at random without replacement. This means that the same card or item will not be chosen twice (if the set is large enough).
    - This is the default for pack types with a @filter@. - * - @proportional@ - - Each instance of this pack type contains a single filtered card or @item@, chosen with probability proportional to the number of choices for the card/item. + This is the default for pack types with a ``filter``. + * - ``proportional`` + - Each instance of this pack type contains a single filtered card or ``item``, chosen with probability proportional to the number of choices for the card/item. The choice is made with replacement. - * - @nonempty@ - - Each instance of this pack type contains a single filtered card or @item@, + * - ``nonempty`` + - Each instance of this pack type contains a single filtered card or ``item``, but items that contain no cards will be ignored. The choice is made with replacement. - * - @equal@ + * - ``equal`` - Instead of choosing cards and items at random, they are chosen to make their numbers as equal as possible. - * - @equal proportional@ - - A combination of @equal@ and @proportional@. - * - @equal nonempty@ - - A combination of @equal@ and @nonempty@. - * - @first@ + * - ``equal proportional`` + - A combination of ``equal@ and @proportional``. + * - ``equal nonempty`` + - A combination of ``equal@ and @nonempty``. + * - ``first`` - If there are any cards, the first is always chosen, otherwise the first ''nonempty'' item is used.
    - @select: first@ can be used to make a kind of if statement: "If there are any X cards then use those, otherwise use Y cards". + ``select: first`` can be used to make a kind of if statement: "If there are any X cards then use those, otherwise use Y cards". ---Examples-- +**Examples** .. code-block:: @@ -533,7 +538,7 @@ How that happens depends on the @select@ property: select: no replace # this is optional, 'no replace' is the default filter: card.rarity == "rare" -Rare cards are those with the rarity value of @"rare"@. +Rare cards are those with the rarity value of ``"rare"``. The cards are chosen without replacement, so in a single pack the same rare will not occur twice. @@ -595,7 +600,7 @@ If there are any special cards in the set, then "special or else common" will be In Magic, individual "mythic rares" are twice as rare as normal rare cards. Since there are also less mythic rares, this does not mean that each booster pack has a 33% percent chance of containing a mythic rare. Instead the probability of a mythic rare is -@number_of_mythics / (number_of_rares * 2 + number_of_mythics)@. +``number_of_mythics / (number_of_rares * 2 + number_of_mythics)``. So, for example if there are 20 rares in a set and only 5 mythic rares, then one in 9 "rare or mythic rare" cards will be a mythic rare. Pack Item @@ -603,11 +608,11 @@ _________ DOC_MSE_VERSION: since 0.3.8 ---Overview-- +**Overview** A reference to another [[type:pack type]], from which one or more cards are chosen. ---Properties-- +**Properties** .. list-table:: :header-rows: 1 @@ -618,22 +623,22 @@ A reference to another [[type:pack type]], from which one or more cards are chos - Type - Default - Description - * - @name@ + * - ``name`` - Name of a [[type:pack item]] - ''required'' - Name of the pack item to include in this pack. - * - @amount@ + * - ``amount`` - [[type:scriptable]] [[type:int]] - 1 - How many of those cards are in the pack? - * - @weight@ + * - ``weight`` - [[type:scriptable]] [[type:double]] - 1 - How 'important' is this item? Items with a higher weight will be chosen more often. - Cards from @filter@ will have a weight of 1. + Cards from ``filter`` will have a weight of 1. ---Examples-- +**Examples** .. code-block:: @@ -653,14 +658,14 @@ Short form. Include a single common in this pack. Symbol Font ~~~~~~~~~~~ ---Overview-- +**Overview** A symbol font is a font for drawing with images. Each [[type:symbol font symbol|symbol-font-symbol]] in the font is an image. A symbol font is referenced in [[type:stylesheet]]s using a [[type:symbol font reference]]. ---Splitting-- +**Splitting** A piece of text drawn with the symbol font is split into separate symbols. The list of symbols in the font is scanned from top to bottom to find matches. @@ -668,27 +673,27 @@ The list of symbols in the font is scanned from top to bottom to find matches. If the text is for instance "W/GR" and "W/G" should be rendered as a single symbol, then it should appear before the symbol "W". Otherwise the "W" is seen as a symbol and the program continues with rendering "/GR". ---Font size-- +**Font size** A symbol font is drawn using a specific point size, similar to normal fonts. Usually the images that make up the font are given in a very high resolution, for example 200x200. This resolution could correspond to a point size of for instance 150pt. -When the symbol is drawn at for instance 12pt the image well then be scaled down to @200/150*12 == 16@ pixels. +When the symbol is drawn at for instance 12pt the image well then be scaled down to ``200/150*12 == 16`` pixels. Sizes like margin, padding and font size are given in 'pixels per point'. If for instance .. code-block:: text margin left: 0.1 -is specified, and the symbol is rendered at 12pt, the margin will be @12*0.1 == 1.2@ pixels. +is specified, and the symbol is rendered at 12pt, the margin will be ``12*0.1 == 1.2`` pixels. ---Package format-- +**Package format** A symbol font is described in a [[file:package]] with the .mse-symbol-font file extension. Such a package contains a [[file:format|data file]] called symbol-font that has the following properties. ---Properties-- +**Properties** .. list-table:: :header-rows: 1 @@ -703,71 +708,71 @@ Such a package contains a [[file:format|data file]] called symbol-font - <<< - <<< - <<< - * - @mse version@ + * - ``mse version`` - [[type:version]] - ''required'' - Version of MSE this symbol font is made for. - * - @short name@ + * - ``short name`` - [[type:string]] - file name - A short name of this symbol font, currently not used by the program. - * - @full name@ + * - ``full name`` - [[type:string]] - file name - A longer name of this symbol font, currently not used by the program. - * - @icon@ + * - ``icon`` - [[type:filename]] - ''none'' - Filename of an icon, currently not used by the program. - * - @version@ + * - ``version`` - [[type:version]] - - @0.0.0@ + - ``0.0.0`` - Version number of this package. - * - @depends on@ + * - ``depends on`` - [[type:list]] of [[type:dependency]]s Packages this package depends on. * - '''Specific to symbol fonts''' - <<< - <<< - <<< - * - @image font size@ + * - ``image font size`` - [[type:double]] - - @12@ + - ``12`` - To what point size do the images correspond? - * - @horizontal space@ + * - ``horizontal space`` - [[type:double]] - - @0@ + - ``0`` - Horizontal spacing between symbols, in pixels. - * - @vertical space@ + * - ``vertical space`` - [[type:double]] - - @0@ + - ``0`` - Vertical spacing between symbols, in pixels. - * - @symbols@ + * - ``symbols`` - [[type:list]] of [[type:symbol font symbol]]s - - Symbols that make up this font. - * - @scale text@ + * - ``scale text`` - [[type:boolean]] - - @false@ + - ``false`` - Should text be scaled down to fit in a symbol? - * - @insert symbol menu@ + * - ``insert symbol menu`` - [[type:insert symbol menu|"insert symbol" menu]] - ''none'' - A description of the menu to insert a symbol into the text. ---Examples-- -See for instance the @"magic-mana-small.mse-symbol-font"@ package in the MSE distribution. +**Examples** +See for instance the ``"magic-mana-small.mse-symbol-font"`` package in the MSE distribution. Symbol Font Reference _____________________ ---Overview-- +**Overview** A reference to a [[type:symbol font]]. In [[type:stylesheet]]s the symbol fonts are not included inline, instead they are referenced by their package name. ---Properties-- +**Properties** .. list-table:: :header-rows: 1 @@ -778,23 +783,23 @@ In [[type:stylesheet]]s the symbol fonts are not included inline, instead they a - Type - Default - Description - * - @name@ + * - ``name`` - [[type:scriptable]] Name of a [[type:symbol font]] ''required'' Name of the symbol font package to use (without the extension). - * - @size@ + * - ``size`` - [[type:scriptable]] [[type:double]] - 12 - Size in points to render the symbols with. - * - @scale down to@ + * - ``scale down to`` - [[type:double]] - 1 - Minimum size in points to scale the size down to. - * - @alignment@ + * - ``alignment`` - [[type:scriptable]] [[type:alignment]] - - @"middle center"@ + - ``"middle center"`` - Alignment of symbols in a line of text. ---Example-- +**Example** .. code-block:: @@ -814,11 +819,11 @@ The name can be scripted: Symbol Font Symbol __________________ ---Overview-- +**Overview** A single symbol in a [[type:symbol font]]. ---Properties-- +**Properties** .. list-table:: :header-rows: 1 @@ -829,59 +834,59 @@ A single symbol in a [[type:symbol font]]. - Type - Default - Description - * - @image font size@ + * - ``image font size`` - [[type:double]] - value from symbol font - To what point size does the images correspond? - * - @code@ + * - ``code`` - [[type:string]] or [[type:regex]] - ''required'' - Text this symbol matches. - * - @regex@ + * - ``regex`` - [[type:boolean]] - - @false@ + - ``false`` - Is the code a regular expression (as opposed to a string)? - * - @image@ + * - ``image`` - [[type:scriptable]] [[type:image]] - ''required'' - Image of this symbol. - * - @enabled@ + * - ``enabled`` - [[type:scriptable]] [[type:boolean]] - - @true@ + - ``true`` - Is this symbol actually used?
    This can be scripted to optionally disable certain symbols.
    If multiple symbols with the same code are given disabling the first switches to the second one. - * - @draw text@ + * - ``draw text`` - [[type:int]] - - @-1@ - - The index of the captured regex expression to draw as text, or -1 to not draw text.
    For example with the code @"x([a-z])"@ and @draw text: 1@ the text of the symbol @"xb"@ will be @"b"@. - * - @text font@ + - ``-1`` + - The index of the captured regex expression to draw as text, or -1 to not draw text.
    For example with the code ``"x([a-z])"@ and @draw text: 1@ the text of the symbol @"xb"@ will be @"b"``. + * - ``text font`` - [[type:font]] - - Font to use for drawing text on symbols. The font size is in font points per text box font point. - * - @text alignment@ + * - ``text alignment`` - [[type:alignment]] - - @"middle center"@ + - ``"middle center"`` - How should text be aligned on the symbol? - * - @text margin left@ + * - ``text margin left`` - [[type:double]] - - @0@ + - ``0`` - Margin on the left of the text in pixels per point. - * - @text margin right@ + * - ``text margin right`` - [[type:double]] - - @0@ + - ``0`` - Margin on the right of the text in pixels per point. - * - @text margin top@ + * - ``text margin top`` - [[type:double]] - - @0@ + - ``0`` - Margin on the top of the text in pixels per point. - * - @text margin bottom@ + * - ``text margin bottom`` - [[type:double]] - - @0@ + - ``0`` - Margin on the bottom of the text in pixels per point. ---Examples-- +**Examples** A symbol with text: .. code-block:: @@ -893,7 +898,7 @@ A symbol with text: text font: Arial Two symbols for the same code, which one is used depends on a function from the [[type:stylesheet]]. -It is recommended to only use functions in @enabled@, so each stylesheet can determine how the font should be used. +It is recommended to only use functions in ``enabled``, so each stylesheet can determine how the font should be used. .. code-block:: @@ -909,13 +914,13 @@ It is recommended to only use functions in @enabled@, so each stylesheet can det Insert Symbol Menu __________________ ---Overview-- +**Overview** A description of the "Insert symbol" menu for a specific [[type:symbol font]]. The menu consists of a number of entries, either items, separators or submenus. ---Properties-- +**Properties** .. list-table:: :header-rows: 1 @@ -926,34 +931,34 @@ The menu consists of a number of entries, either items, separators or submenus. - Type - Default - Description - * - @type@ + * - ``type`` - One of: - - @"code"@ or @"submenu"@ + - ``"code"@ or @"submenu"`` - What type of menu item is this? - * @code@, inserts a symbol with the given code. - * @custom@, pops up a dialog where the user can choose a code to insert. - * @line@, a separating line. - * @submenu@, a submenu. - * - @name@ + * ``code``, inserts a symbol with the given code. + * ``custom``, pops up a dialog where the user can choose a code to insert. + * ``line``, a separating line. + * ``submenu``, a submenu. + * - ``name`` - [[type:string]] - ''required'' - Name of this menu item, corresponding to the code to insert. - * - @label@ + * - ``label`` - [[type:localized string]] - name - Label to show in the menu. - * - @prompt@ + * - ``prompt`` - [[type:localized string]] - - - Prompt to use for the pop up box with @custom@ type - * - @items@ + - Prompt to use for the pop up box with ``custom`` type + * - ``items`` - [[type:list]] of [[type:insert symbol menu|submenu items]] - - - Items in the submenu, when items are present the @type@ is set to @"submenu"@. + - Items in the submenu, when items are present the ``type@ is set to @"submenu"``. -For custom items the dialog will be titled with the @label@ and have message text @prompt@. +For custom items the dialog will be titled with the ``label@ and have message text @prompt``. ---Examples-- +**Examples** A menu for magic mana symbols (simplified). Containing all types of items. .. code-block:: @@ -987,16 +992,16 @@ A menu for magic mana symbols (simplified). Containing all types of items. Export Template ~~~~~~~~~~~~~~~ ---Overview-- +**Overview** An export template describes a way for a set to be exported to a HTML or other text files. ---Package format-- +**Package format** An export template is described in a [[file:package]] with the .mse-export-template file extension. Its name should begin with game- where game is the name of the game the template is made for. It should contain a [[file:format|data file]] called export-template with the following properties. ---Properties-- +**Properties** .. list-table:: :header-rows: 1 @@ -1011,59 +1016,59 @@ It should contain a [[file:format|data file]] called export-template wi - <<< - <<< - <<< - * - @mse version@ + * - ``mse version`` - [[type:version]] - ''required'' - Version of MSE this export template is made for. - * - @short name@ + * - ``short name`` - [[type:string]] - file name - A short name of this export template, for the 'new set' and style panel lists. - * - @full name@ + * - ``full name`` - [[type:string]] - file name - A longer name of this export template. - * - @icon@ + * - ``icon`` - [[type:filename]] - ''none'' - Filename of an icon / preview for this export template, for the 'export to HTML' dialog. - * - @position hint@ + * - ``position hint`` - [[type:int]] - ∞ - Where to place this item in the list? Lower numbers come first. - * - @version@ + * - ``version`` - [[type:version]] - - @0.0.0@ + - ``0.0.0`` - Version number of this package. - * - @depends on@ + * - ``depends on`` - [[type:list]] of [[type:dependency]]s Packages this package depends on. * - '''Specific to export template''' - <<< - <<< - <<< - * - @game@ + * - ``game`` - Name of a [[type:game]] - ''required'' - Game this export template is made for - * - @file type@ + * - ``file type`` - [[type:string]] - - @"HTML files (*.html)|*.html"@ - File type to use, this is a list separated by @|@ characters. + - ``"HTML files (*.html)|*.html"`` + File type to use, this is a list separated by ``|`` characters. Alternatingly, a human description and a file pattern to match are given. - * - @create directory@ + * - ``create directory`` - [[type:boolean]] - - @false@ + - ``false`` - Should a directory for data files be created? This is required for some script function. - * - @option fields@ + * - ``option fields`` - [[type:list]] of [[type:field]]s - - Fields for additional options to show. - * - @option style@ + * - ``option style`` - [[type:indexmap]] of [[type:style]]s - - - Styling for the @option fields@. - * - @script@ + - Styling for the ``option fields``. + * - ``script`` - [[type:script]] - - Script that generates the text that will be written to the exported file. @@ -1075,20 +1080,20 @@ During the evaluation of the script the following variables are available: :stub-columns: 1 :align: left - * - @game@ + * - ``game`` - The current game. - * - @style@ + * - ``style`` - The current stylesheet. - * - @set@ + * - ``set`` - The set being exported. - * - @cards@ + * - ``cards`` - The cards selected by the user. - * - @options@ - - The values of the @option fields@. - * - @directory@ - - Name of the directory created (if @create directory@ is set). + * - ``options`` + - The values of the ``option fields``. + * - ``directory`` + - Name of the directory created (if ``create directory`` is set). ---See also-- +**See also** The following functions are made specifically for exporting to html: .. list-table:: @@ -1109,23 +1114,23 @@ The following functions are made specifically for exporting to html: * - [[fun:write_image_file]] - Write an image file to the output directory. ---Example-- -Look at the @"magic-spoiler.mse-export-template"@ for an example. +**Example** +Look at the ``"magic-spoiler.mse-export-template"`` for an example. Locale ~~~~~~ ---Overview-- +**Overview** A locale gives a translation of the user interface of the program. ---Package format-- +**Package format** A locale is described in a [[file:package]] with the .mse-locale file extension. Such a package contains a data file called locale that has the following properties. There are usually no other files in the package. ---Properties-- +**Properties** .. list-table:: :header-rows: 1 @@ -1140,31 +1145,31 @@ There are usually no other files in the package. - <<< - <<< - <<< - * - @mse version@ + * - ``mse version`` - [[type:version]] - ''required'' - Version of MSE this locale is made for. - * - @short name@ + * - ``short name`` - [[type:string]] - file name - A short name of this locale, for the options dialog. - * - @full name@ + * - ``full name`` - [[type:string]] - file name - A longer name of this locale. - * - @icon@ + * - ``icon`` - [[type:filename]] - ''none'' - Filename of an icon / preview for this locale, currently not used. - * - @version@ + * - ``version`` - [[type:version]] - - @0.0.0@ + - ``0.0.0`` - Version number of this package. * - '''Specific to locales''' - <<< - <<< - <<< - * - @menu@ + * - ``menu`` - [[type:map]] of [[type:string]]s - - Translations of menu items.
    @@ -1172,55 +1177,55 @@ There are usually no other files in the package. Keys to use with Alt+Something (displayed underlined) can be specified &
    For example >>>new set: &New... Ctrl+N - * - @help@ + * - ``help`` - [[type:map]] of [[type:string]]s - - Translations of help texts for the status bar. - * - @tool@ + * - ``tool`` - [[type:map]] of [[type:string]]s - - Translations of toolbar item texts. - * - @tooltip@ + * - ``tooltip`` - [[type:map]] of [[type:string]]s - - Translations of tooltips for toolbar items. - * - @label@ + * - ``label`` - [[type:map]] of [[type:string]]s - - Labels of controls in the GUI. - * - @button@ + * - ``button`` - [[type:map]] of [[type:string]]s - - Labels of buttons in the GUI. - * - @title@ + * - ``title`` - [[type:map]] of [[type:string]]s - - Titles of windows. - * - @action@ + * - ``action`` - [[type:map]] of [[type:string]]s - - Names of actions for undo/redo, things like "typing" and "add card". - * - @error@ + * - ``error`` - [[type:map]] of [[type:string]]s - - Error messages. - * - @type@ + * - ``type`` - [[type:map]] of [[type:string]]s - - Types of objects for error messages. - * - @game@ + * - ``game`` - [[type:map]] of [[type:map]] of [[type:string]]s - Deprecated since MSE 2.1.3, use @localized_...@ instead.
    + Deprecated since MSE 2.1.3, use ``localized_...`` instead.
    Translations for specific [[type:game]]s.
    Field names and field descriptions are looked up in the locale, if they are found the translation is used, otherwise the value from the game file.
    Extra keys not present in the English locale can be added here. - * - @stylesheet@ + * - ``stylesheet`` - [[type:map]] of [[type:map]] of [[type:string]]s - Deprecated since MSE 2.1.3, use @localized_...@ instead.
    + Deprecated since MSE 2.1.3, use ``localized_...`` instead.
    Translations for specific [[type:stylesheet]]s. - * - @symbol font@ + * - ``symbol font`` - [[type:map]] of [[type:map]] of [[type:string]]s - Deprecated since MSE 2.1.3, use @localized_...@ instead.
    + Deprecated since MSE 2.1.3, use ``localized_...`` instead.
    Translations for specific [[type:symbol font]]s, in particular the "insert symbol" menu. Some of the items can contain placeholders for other values, for example: @@ -1228,16 +1233,16 @@ Some of the items can contain placeholders for other values, for example: .. code-block:: undo: &Undo%s Ctrl+Z -The @%s@ is replaced by the name of the action to undo. -This @%s@ should be used in exactly those entries that also contain it in the English locale. +The ``%s`` is replaced by the name of the action to undo. +This ``%s`` should be used in exactly those entries that also contain it in the English locale. ---Examples-- -Look at the @"en.mse-locale"@ file in the standard MSE distribution for an example. +**Examples** +Look at the ``"en.mse-locale"`` file in the standard MSE distribution for an example. ---Translating MSE-- +**Translating MSE** To translate the MSE user interface: -* Create a copy of the @"en.mse-locale"@ directory, name it @"**.mse-locale"@, where @"**"@ is a two or three letter [[http://en.wikipedia.org/wiki/ISO_language_code|ISO language code]]. -* Open the @"locale"@ file with Notepad (or another program that supports UTF-8), and translate the strings. +* Create a copy of the ``"en.mse-locale"@ directory, name it @"**.mse-locale"@, where @"**"`` is a two or three letter [[http://en.wikipedia.org/wiki/ISO_language_code|ISO language code]]. +* Open the ``"locale"`` file with Notepad (or another program that supports UTF-8), and translate the strings. * Add new keys for game, stylesheet or symbol font specific keys as described above. * Save the file, select the new locale from Edit->Preferences. * Restart MSE, and make sure everything looks right. @@ -1247,15 +1252,15 @@ To translate the MSE user interface: Include ~~~~~~~ ---Overview-- +**Overview** An include package contains files used by other packages, for example scripts or images. ---Package format-- +**Package format** An include package is described in a [[file:package]] with the .mse-include file extension. It should contain a [[file:format|data file]] called include with the following properties. ---Properties-- +**Properties** .. list-table:: :header-rows: 1 @@ -1270,27 +1275,27 @@ It should contain a [[file:format|data file]] called include with the f - <<< - <<< - <<< - * - @mse version@ + * - ``mse version`` - [[type:version]] - ''required'' - Version of MSE this include package is made for. - * - @short name@ + * - ``short name`` - [[type:string]] - file name - A short name of this include package, currently not used. - * - @full name@ + * - ``full name`` - [[type:string]] - file name - A longer name of this include package, currently not used. - * - @icon@ + * - ``icon`` - [[type:filename]] - ''none'' - Filename of an icon / preview for this export template, currently not used. - * - @version@ + * - ``version`` - [[type:version]] - - @0.0.0@ + - ``0.0.0`` - Version number of this package. - * - @depends on@ + * - ``depends on`` - [[type:list]] of [[type:dependency]]s Packages this package depends on. @@ -1304,18 +1309,18 @@ BLANK Symbol ~~~~~~ ---Overview-- +**Overview** A symbol file contains a symbol created with the symbol editor. -Symbols are not stored in packages, the data file is directly written to a @".mse-symbol"@ file. +Symbols are not stored in packages, the data file is directly written to a ``".mse-symbol"`` file. ---Coordinates-- +**Coordinates** Various parts of a symbol use [[type:vector2d|coordinates]]. -These are pairs of numbers in the range @0@ to @1@. @(0,0)@ is the top-left of the symbol, @(1,1)@ the bottom-right. +These are pairs of numbers in the range ``0@ to @1@. @(0,0)@ is the top-left of the symbol, @(1,1)`` the bottom-right. ---Properties-- +**Properties** .. list-table:: :header-rows: 1 @@ -1326,27 +1331,27 @@ These are pairs of numbers in the range @0@ to @1@. @(0,0)@ is the top-left of t - Type - Default - Description - * - @mse version@ + * - ``mse version`` - [[type:version]] - ''required'' - Version of MSE this symbol is made with. - * - @parts@ + * - ``parts`` - [[type:list]] of [[type:symbol part]]s - - The parts in this symbol. ---Example-- +**Example** Look at a file made with the program. Settings ~~~~~~~~ ---Overview-- +**Overview** The MSE settings are stored in a separate file. ---Location-- +**Location** On Windows XP the settings are located in: @@ -1354,7 +1359,7 @@ On Windows XP the settings are located in: "C:\Documents and Settings\Application Data\Magic Set Editor\mse8.config" ---Properties-- +**Properties** See the settings file for the properties. @@ -1398,7 +1403,7 @@ These contain several properties, similair to the file types. But they are part Field ~~~~~ ---Overview-- +**Overview** A field is a description of a kind of 'container' to hold a value. @@ -1424,7 +1429,7 @@ Fields are part of the [[file:style triangle]]: - [[type:Style]] - [[type:Value]] ---Properties-- +**Properties** .. list-table:: :header-rows: 1 @@ -1435,78 +1440,78 @@ Fields are part of the [[file:style triangle]]: - Type - Default - Description - * - @type@ + * - ``type`` - One of: - ''required'' - Type of field. - * @text@ - * @choice@ - * @multiple choice@ - * @package choice@ - * @boolean@ - * @image@ - * @symbol@ - * @color@ - * @info@ - * - @name@ + * ``text`` + * ``choice`` + * ``multiple choice`` + * ``package choice`` + * ``boolean`` + * ``image`` + * ``symbol`` + * ``color`` + * ``info`` + * - ``name`` - [[type:string]] - ''required'' - Name of the field. - * - @description@ + * - ``description`` - [[type:localized string]] - - @""@ + - ``""`` - Description of the field, shown in the status bar when the mouse is over the field. - * - @icon@ + * - ``icon`` - [[type:filename]] - - Filename of an icon for this field, used for automatically generated [[type:statistics category]]s. - * - @editable@ + * - ``editable`` - [[type:boolean]] - - @true@ + - ``true`` - Can values of this field be edited? - * - @save value@ + * - ``save value`` - [[type:boolean]] - - @true@ + - ``true`` - Should values of this field be saved to files? Should be disabled for values that are generated by scripts. - * - @show statistics@ + * - ``show statistics`` - [[type:boolean]] - - @true@ + - ``true`` - Should a [[type:statistics dimension]] and [[type:statistics category|category]] be made for this field, causing it to be listed on the statistics panel? - * - @identifying@ + * - ``identifying`` - [[type:boolean]] - - @false@ + - ``false`` - Does this field give the name of the [[type:card]] or [[type:set]]? - * - @card list column@ + * - ``card list column`` - [[type:int]] - - @0@ + - ``0`` - On what position in the card list should this field be put? - * - @card list width@ + * - ``card list width`` - [[type:int]] - - @100@ + - ``100`` - Width of the card list column in pixels. - * - @card list visible@ + * - ``card list visible`` - [[type:boolean]] - - @false@ + - ``false`` - Should this field be shown in the card list by default? - * - @card list allow@ + * - ``card list allow`` - [[type:boolean]] - - @true@ + - ``true`` - Should this field be allowed in the card list at all? - * - @card list name@ + * - ``card list name`` - [[type:localized string]] - field name - Alternate name to use for the card list, for example an abbreviation. - * - @card list alignment@ + * - ``card list alignment`` - [[type:alignment]] - - @left@ + - ``left`` - Alignment of the card list column. - * - @sort script@ + * - ``sort script`` - [[type:script]] - - Alternate way to sort the card list when using this column to sort the list. -The @type@ determines what values of this field contain: +The ``type`` determines what values of this field contain: .. list-table:: :header-rows: 1 @@ -1516,31 +1521,31 @@ The @type@ determines what values of this field contain: * - Type - Values contain - Displayed as - * - @text@ + * - ``text`` - Text with markup (a [[type:tagged string]]) - Text - * - @choice@ + * - ``choice`` - A choice from a list - Text or an image - * - @multiple choice@ + * - ``multiple choice`` - Zero or more choices from a list - A single image or multiple images - * - @package choice@ + * - ``package choice`` - A choice from a list of installed [[type:package]]s - Text and/or an image - * - @boolean@ - - @yes@ or @no@ + * - ``boolean`` + - ``yes@ or @no`` - Text or an image or both - * - @color@ + * - ``color`` - Any color or a restricted selection from a list - A box filled with the color - * - @image@ + * - ``image`` - Any image - The image - * - @symbol@ + * - ``symbol`` - A [[type:symbol]] edited with the symbol editor - The image - * - @info@ + * - ``info`` - An informational message, for example to group fields together. - A box containing the label @@ -1556,148 +1561,148 @@ Additional properties are available, depending on the type of field: - Type - Default - Description - * - @"text"@ - - @script@ + * - ``"text"`` + - ``script`` - [[type:script]] - - Script to apply to values of this field after each change.
    - If the script evaluates to a constant (i.e. doesn't use @value@) then values in this field can effectively not be edited. + If the script evaluates to a constant (i.e. doesn't use ``value``) then values in this field can effectively not be edited. * - ^^^ - - @default@ + - ``default`` - [[type:script]] - - Script to determine the value when it is in the default state (not edited). * - ^^^ - - @default name@ + - ``default name`` - [[type:string]] - - @"Default"@ + - ``"Default"`` - Name of the default state, currently not used. * - ^^^ - - @multi line@ + - ``multi line`` - [[type:boolean]] - - @false@ + - ``false`` - Can values of this field contain line breaks? - * - @"choice"@ - - @script@ + * - ``"choice"`` + - ``script`` - [[type:script]] - - Script to apply to values of this field after each change.
    - If the script evaluates to a constant (i.e. doesn't use @value@) then values in this field can effectively not be edited. + If the script evaluates to a constant (i.e. doesn't use ``value``) then values in this field can effectively not be edited. * - ^^^ - - @default@ + - ``default`` - [[type:script]] - - Script to determine the value when it is in the default state (not edited). * - ^^^ - - @initial@ + - ``initial`` - [[type:string]] - - Initial value for new values for this field. * - ^^^ - - @default name@ + - ``default name`` - [[type:string]] - - @"Default"@ + - ``"Default"`` - Name of the default state. * - ^^^ - - @choices@ + - ``choices`` - [[type:list]] of [[type:choice]]s - - Possible values for this field. * - ^^^ - - @choice colors@ + - ``choice colors`` - [[type:map]] of opaque [[type:color]]s - - Colors of the choices for statistics graphs. * - ^^^ - - @choice colors cardlist@ + - ``choice colors cardlist`` - [[type:map]] of opaque [[type:color]]s - - - Colors of the choices for lines in the card list,
    see also the @card list color script@ property of [[type:game]]s. - * - @"multiple choice"@ + - Colors of the choices for lines in the card list,
    see also the ``card list color script`` property of [[type:game]]s. + * - ``"multiple choice"`` - - <<< - <<< - <<< '' Multiple choice fields have the same attributes as normal choice fields.''
    - To refer to a combination of values in the initial attribute use @choice1, choice2, choice3@.
    - These choices must appear in the same order as they do in the @choices@ property. - * - @"boolean"@ - - ''A boolean field is a choice field with the choices @"yes"@ and @"no"@.'' + To refer to a combination of values in the initial attribute use ``choice1, choice2, choice3``.
    + These choices must appear in the same order as they do in the ``choices`` property. + * - ``"boolean"`` + - ''A boolean field is a choice field with the choices ``"yes"@ and @"no"``.'' - <<< - <<< - <<< - * - @"package choice"@ - @script@ [[type:script]] Script to apply to values of this field after each change.
    - If the script evaluates to a constant (i.e. doesn't use @value@) then values in this field can effectively not be edited. + * - ``"package choice"`` + ``script`` [[type:script]] Script to apply to values of this field after each change.
    + If the script evaluates to a constant (i.e. doesn't use ``value``) then values in this field can effectively not be edited. * - ^^^ - - @match@ + - ``match`` - [[type:string]] - ''required'' - - Filenames of the packages to match, can include wildcards @"*"@. For example @"magic-mana-*.mse-symbol-font"@. + - Filenames of the packages to match, can include wildcards ``"*"@. For example @"magic-mana-*.mse-symbol-font"``. * - ^^^ - - @initial@ + - ``initial`` - [[type:string]] - ''required'' - Initial package for new values for this field. * - ^^^ - - @reqired@ + - ``reqired`` - [[type:boolean]] - - @true@ + - ``true`` - Must a package always be selected? Or is it allowed to select nothing? * - ^^^ - - @empty name@ + - ``empty name`` - [[type:string]] - - @"None"@ - - Name of the empty state. Applies only if @required: false@. - * - @"color"@ - - @script@ + - ``"None"`` + - Name of the empty state. Applies only if ``required: false``. + * - ``"color"`` + - ``script`` - [[type:script]] - - Script to apply to values of this field after each change.
    - If the script evaluates to a constant (i.e. doesn't use @value@) then values in this field can effectively not be edited. + If the script evaluates to a constant (i.e. doesn't use ``value``) then values in this field can effectively not be edited. * - ^^^ - - @default@ + - ``default`` - [[type:script]] - - Script to determine the value when it is in the default state (not edited). * - ^^^ - - @initial@ + - ``initial`` - [[type:string]] - - Initial color for new values for this field. * - ^^^ - - @default name@ + - ``default name`` - [[type:string]] - - @"Default"@ + - ``"Default"`` - Name of the default state. * - ^^^ - - @allow custom@ + - ``allow custom`` - [[type:boolean]] - - @true@ + - ``true`` - Are colors other then those from the choices allowed? * - ^^^ - - @choices@ + - ``choices`` - [[type:list]] of [[type:color choice]]s - - Possible values for this field. - * - @"image"@ + * - ``"image"`` - ''no extra properties'' - <<< - <<< - <<< - * - @"symbol"@ + * - ``"symbol"`` - ''no extra properties'' - <<< - <<< - <<< - * - @"info"@ - - @script@ + * - ``"info"`` + - ``script`` - [[type:script]] - - Script to determine the value to show. ---Example-- -The @title@ field gives the title of a set: +**Example** +The ``title`` field gives the title of a set: .. code-block:: @@ -1733,7 +1738,7 @@ The default is based on a set field. Statistics don't make much sense for the bo Style ~~~~~ ---Overview-- +**Overview** A style specifies how a [[type:field]] should look, things like position, size, fonts, colors, etc. @@ -1755,11 +1760,11 @@ Styles are part of the [[file:style triangle]]: - '''Style''' - [[type:Value]] ---Positioning-- +**Positioning** A style specifies the position of a box for the content. -To specify the horizontal location ''two'' of @left@, @width@ and @right@ must be specified. +To specify the horizontal location ''two'' of ``left@, @width@ and @right`` must be specified. For example: @@ -1767,7 +1772,7 @@ For example: left: 10 width: 20 -Implies that @right@ is 30 pixels. +Implies that ``right`` is 30 pixels. Similarly: @@ -1775,12 +1780,12 @@ Similarly: left: 10 right: 30 -Implies the @width@ is 20. +Implies the ``width`` is 20. -The same holds for the vertical location and size; @top@, @height@ and @bottom@. +The same holds for the vertical location and size; ``top@, @height@ and @bottom``. ---Rotation-- -Rotating a box can be done with the @angle@ property. +**Rotation** +Rotating a box can be done with the ``angle`` property. The angle gives a counter clockwise rotation in degrees of the box. The box is rotated such that the corner for which the position is specified is at the correct position after rotating. @@ -1816,7 +1821,7 @@ Here are some examples: > angle: 180 ---Properties-- +**Properties** .. list-table:: :header-rows: 1 @@ -1827,47 +1832,47 @@ Here are some examples: - Type - Default - Description - * - @z index@ + * - ``z index`` - [[type:int]] - - @0@ - - Stacking of this box, fields with a higher @z index@ are placed on top of those with a lower index. - * - @tab index@ + - ``0`` + - Stacking of this box, fields with a higher ``z index`` are placed on top of those with a lower index. + * - ``tab index`` - [[type:int]] - - @0@ + - ``0`` - Index for moving through the fields with the tab key, fields with a lower tab index come first. Otherwise the order is from top to bottom and then left to right. - * - @left@ + * - ``left`` - [[type:scriptable]] [[type:double]] - ''Required'' - Distance between left edge of the box and the left of the card in pixels. - * - @width@ + * - ``width`` - [[type:scriptable]] [[type:double]] - ''Required'' - Width of the box in pixels. - * - @right@ + * - ``right`` - [[type:scriptable]] [[type:double]] - ''Required'' - Distance between right edge of the box and the ''left'' of the card in pixels. - * - @top@ + * - ``top`` - [[type:scriptable]] [[type:double]] - ''Required'' - Distance between top edge of the box and the top of the card in pixels. - * - @height@ + * - ``height`` - [[type:scriptable]] [[type:double]] - ''Required'' - Height of the box in pixels. - * - @bottom@ + * - ``bottom`` - [[type:scriptable]] [[type:double]] - ''Required'' - Distance between bottom edge of the box and the ''top'' of the card in pixels. - * - @angle@ + * - ``angle`` - [[type:scriptable]] [[type:int]] - - @0@ + - ``0`` - Rotation of this box, in degrees counter clockwise. - * - @visible@ + * - ``visible`` - [[type:scriptable]] [[type:boolean]] - - @true@ + - ``true`` - Is this field visible at all? - * - @mask@ + * - ``mask`` - [[type:image|scriptable image]] - ''none'' - A mask to apply to the box, black areas in the mask become transparent, similar to [[fun:set_mask]]. @@ -1884,116 +1889,116 @@ The rest of the properties depend on the type of [[type:field]] this style is fo - Type - Default - Description - * - @"text"@ - - @font@ + * - ``"text"`` + - ``font`` - [[type:font]] - ''Required'' - Font to render the text. * - ^^^ - - @symbol font@ + - ``symbol font`` - [[type:symbol font]] - - Font to render symbols in the text (optional). * - ^^^ - - @always symbol@ + - ``always symbol`` - [[type:boolean]] - - @false@ + - ``false`` - Should all text be rendered with symbols?
    Text that is not supported by the symbol font is still rendered as normal text. * - ^^^ - - @allow formating@ + - ``allow formating`` - [[type:boolean]] - - @true@ + - ``true`` - Is custom formating (bold, italic) allowed? * - ^^^ - - @alignment@ + - ``alignment`` - [[type:scriptable]] [[type:alignment]] - - @top left@ + - ``top left`` - Alignment of the text. * - ^^^ - - @direction@ + - ``direction`` - [[type:direction]] - - @"left to right"@ - - Direction in which the text flows. If set to @"vertical"@ it is as if a line break is inserted after each character. + - ``"left to right"`` + - Direction in which the text flows. If set to ``"vertical"`` it is as if a line break is inserted after each character. * - ^^^ - - @padding left@ + - ``padding left`` - [[type:scriptable]] [[type:double]] - - @0@ + - ``0`` - Padding between the text and the border of the box, in pixels. * - ^^^ - - @padding right@ + - ``padding right`` - ^^^ - ^^^ - ^^^ * - ^^^ - - @padding top@ + - ``padding top`` - ^^^ - ^^^ - ^^^ * - ^^^ - - @padding bottom@ + - ``padding bottom`` - ^^^ - ^^^ - ^^^ * - ^^^ - - @padding left min@ + - ``padding left min`` - [[type:scriptable]] [[type:double]] - ∞ - Minimal padding around the field.
    When the text is scaled down the padding is scaled as well, but it becomes no smaller than this. * - ^^^ - - @padding right min@ + - ``padding right min`` - ^^^ - ^^^ - ^^^ * - ^^^ - - @padding top min@ + - ``padding top min`` - ^^^ - ^^^ - ^^^ * - ^^^ - - @padding bottom min@ + - ``padding bottom min`` - ^^^ - ^^^ - ^^^ * - ^^^ - - @line height soft@ + - ``line height soft`` - [[type:scriptable]] [[type:double]] - - @1@ + - ``1`` - Multiplier for the line height of 'soft' line breaks. These are breaks caused by wrapping around lines that are too long.
    - A line height of @0@ means all lines are in the same position, @1@ is normal behaviour, @2@ skips a line, etc. + A line height of ``0@ means all lines are in the same position, @1@ is normal behaviour, @2`` skips a line, etc. * - ^^^ - - @line height hard@ + - ``line height hard`` - [[type:scriptable]] [[type:double]] - - @1@ + - ``1`` - Multiplier for the line height of 'hard' line breaks. These are breaks caused by the enter key. * - ^^^ - - @line height line@ + - ``line height line`` - [[type:scriptable]] [[type:double]] - - @1@ - - Multiplier for the line height of 'soft' line breaks. These are breaks caused by @"\n"@ tags. + - ``1`` + - Multiplier for the line height of 'soft' line breaks. These are breaks caused by ``"\n"`` tags. * - ^^^ - - @line height soft max@ + - ``line height soft max`` - [[type:scriptable]] [[type:double]] - ''disabled'' - When there is still vertical room in the text box, increase the line heights to at most these values to spread the text more evenly. * - ^^^ - - @line height hard max@ + - ``line height hard max`` - ^^^ - ^^^ - ^^^ * - ^^^ - - @line height line max@ + - ``line height line max`` - ^^^ - ^^^ - ^^^ * - ^^^ - - @paragraph height@ + - ``paragraph height`` - [[type:double]] - ''flexible'' - - The height of paragraphs. If specified, each paragraph is given this much space, and aligned inside that space as specified by @alignment@.
    - A paragraph break is any line break that is not soft (i.e. caused by word wrap or a @@ break). + - The height of paragraphs. If specified, each paragraph is given this much space, and aligned inside that space as specified by ``alignment``.
    + A paragraph break is any line break that is not soft (i.e. caused by word wrap or a ```` break). * - ^^^ - - @mask@ + - ``mask`` - [[type:image|scriptable image]] - ''none'' - A mask that indicates where in the box text can be placed.
    @@ -2002,184 +2007,184 @@ The rest of the properties depend on the type of [[type:field]] this style is fo The same mask image is also used to determine the size and shape of the box. To include a certain pixel in the size/shape but not allow text to be placed there, it can be made dark gray (a value less than 128). * - ^^^ - - @layout@ + - ``layout`` - [[type:text layout]] - ''automatic'' - When read from a script, gives information on the layout of text in this box. * - ^^^ - - @content width@ + - ``content width`` - [[type:double]] - ''automatic'' - - When read from a script, gives the width of the current content in this box. Equivalent to @layout.width@ + - When read from a script, gives the width of the current content in this box. Equivalent to ``layout.width`` * - ^^^ - - @content height@ + - ``content height`` - [[type:double]] - ''automatic'' - - When read from a script, gives the height of the current content in this box. Equivalent to @layout.height@ + - When read from a script, gives the height of the current content in this box. Equivalent to ``layout.height`` * - ^^^ - - @content lines@ + - ``content lines`` - [[type:int]] - ''automatic'' - - When read from a script, gives the number of lines of the current content in this box. Equivalent to @length(layout.lines)@ + - When read from a script, gives the number of lines of the current content in this box. Equivalent to ``length(layout.lines)`` ! <<< <<< <<< <<< - * - @"choice"@,
    @"multiple choice"@,
    @"boolean"@ - @popup style@ @"drop down"@ or @"in place"@ @"drop down"@ Where to place the drop down box for editing the value.
    - @"drop down"@ places the box below the field, similar to normal combo boxes.
    - @"in place"@ places the box at the mouse coordinates. + * - ``"choice"@,
    @"multiple choice"@,
    @"boolean"`` + ``popup style@ @"drop down"@ or @"in place"@ @"drop down"`` Where to place the drop down box for editing the value.
    + ``"drop down"`` places the box below the field, similar to normal combo boxes.
    + ``"in place"`` places the box at the mouse coordinates. * - ^^^ - - @render style@ + - ``render style`` - [[type:render style]] - - @"text"@ + - ``"text"`` - How should the field be rendered? * - ^^^ - - @combine@ + - ``combine`` - [[type:combine]] - - @"normal"@ + - ``"normal"`` - How to combine the image with the background? Can be overridden using the [[fun:set_combine]] function. * - ^^^ - - @alignment@ + - ``alignment`` - [[type:alignment]] - - @"stretch"@ + - ``"stretch"`` - Alignment of text and images in the box. * - ^^^ - - @font@ + - ``font`` - [[type:font]] - - - Font to use for rendering text (depending on @render style@) + - Font to use for rendering text (depending on ``render style``) * - ^^^ - - @image@ + - ``image`` - [[type:image|scriptable image]] - - - Image to show (depending on @render style@).
    - The script will be called with @input@ set to the value to determine an image for. + - Image to show (depending on ``render style``).
    + The script will be called with ``input`` set to the value to determine an image for. * - ^^^ - - @choice images@ + - ``choice images`` - [[type:map]] of [[type:image]]s - - An alternative way to specify what image to show.
    For each [[type:choice]] a separate image is specified. * - ^^^ - - @content width@ + - ``content width`` - [[type:double]] - ''automatic'' - When read from a script, gives the width of the current choice image in this box.
    This is only useful when the alignment is changed, otherwise it is always equal the box size itself. * - ^^^ - - @content height@ + - ``content height`` - [[type:double]] - ''automatic'' - When read from a script, gives the height of the current choice image in this box. - * - @"multiple choice"@ - @direction@ [[type:scriptable]] [[type:direction]] @"left to right"@ Direction the items are laid out in, only when @render style@ is @list@. + * - ``"multiple choice"`` + ``direction@ [[type:scriptable]] [[type:direction]] @"left to right"@ Direction the items are laid out in, only when @render style@ is @list``. * - ^^^ - - @spacing@ + - ``spacing`` - [[type:scriptable]] [[type:double]] - - @0@ + - ``0`` - Spacing between the items. ! <<< <<< <<< <<< - * - @"package choice"@ + * - ``"package choice"`` * - ^^^ - - @font@ + - ``font`` - [[type:font]] - - Font to use for rendering text. ! <<< <<< <<< <<< - * - @"color"@ - - @radius@ + * - ``"color"`` + - ``radius`` - [[type:double]] - - @0@ + - ``0`` - Radius of rounded corners for the box in pixels. * - ^^^ - - @left width@ + - ``left width`` - [[type:double]] - ∞ - Draw only this many pixels from the side, creating a box with a hole in it, or a card border. * - ^^^ - - @right width@ + - ``right width`` - ^^^ - ^^^ - ^^^ * - ^^^ - - @top width@ + - ``top width`` - ^^^ - ^^^ - ^^^ * - ^^^ - - @bottom width@ + - ``bottom width`` - ^^^ - ^^^ - ^^^ * - ^^^ - - @combine@ + - ``combine`` - [[type:combine]] - - @"normal"@ + - ``"normal"`` - How to combine the color with the background? Only applies when a mask is used. ! <<< <<< <<< <<< - * - @"image"@ - - @default@ + * - ``"image"`` + - ``default`` - [[type:image|scriptable image]] - ''none'' - A default image to use when the card has none. ! <<< <<< <<< <<< - * - @"symbol"@ - - @variations@ + * - ``"symbol"`` + - ``variations`` - [[type:list]] of [[type:symbol variation]]s - - Available variations of the symbol, a variation describes color and border size. * - ^^^ - - @min aspect ratio@ + - ``min aspect ratio`` - [[type:double]] - - @1@ - - Bounds for the aspect ratio, @width/height@ symbols can take. This can be used to make non-square symbols. + - ``1`` + - Bounds for the aspect ratio, ``width/height`` symbols can take. This can be used to make non-square symbols. * - ^^^ - - @max aspect ratio@ + - ``max aspect ratio`` - [[type:double]] - - @1@ + - ``1`` - ^^^ ! <<< <<< <<< <<< - * - @"info"@ - - @font@ + * - ``"info"`` + - ``font`` - [[type:font]] - ''Required'' - Font to render the text. * - ^^^ - - @alignment@ + - ``alignment`` - [[type:scriptable]] [[type:alignment]] - - @top left@ + - ``top left`` - Alignment of the text. * - ^^^ - - @padding left@ + - ``padding left`` - [[type:double]] - - @0@ + - ``0`` - Padding between the text and the border of the box, in pixels. * - ^^^ - - @padding right@ + - ``padding right`` - ^^^ - ^^^ - ^^^ * - ^^^ - - @padding top@ + - ``padding top`` - ^^^ - ^^^ - ^^^ * - ^^^ - - @padding bottom@ + - ``padding bottom`` - ^^^ - ^^^ - ^^^ * - ^^^ - - @background color@ + - ``background color`` - opaque [[type:color]] - - @rgb(255,255,255)@ + - ``rgb(255,255,255)`` - Background color for the box, can be used to make it stand out. ---Example-- +**Example** Render Style @@ -2187,7 +2192,7 @@ ____________ A way to render a choice [[type:field]], see [[type:style]]. ---Possible values-- +**Possible values** .. list-table:: :header-rows: 1 @@ -2197,41 +2202,41 @@ A way to render a choice [[type:field]], see [[type:style]]. * - Value - Sketch - Description - * - @text@ + * - ``text`` - Rendered as text - * - @image@ + * - ``image`` - Rendered as an image - * - @both@ + * - ``both`` - Both an image and text - * - @hidden@ + * - ``hidden`` - The box is hidden, but the value can still be edited. - * - @image hidden@ + * - ``image hidden`` - The box is hidden, but the value can still be edited. - * - @checklist@ + * - ``checklist`` - A list of checkboxes, for multiple choice styles. - * - @image checklist@ + * - ``image checklist`` - A list of checkboxes with images instead of text. - * - @both checklist@ + * - ``both checklist`` - A list of checkboxes with both images and text. - * - @text list@ + * - ``text list`` - A list of the selected items, for multiple choice styles. - * - @image list@ + * - ``image list`` - A list of the selected items with images instead of text. - * - @both list@ + * - ``both list`` - A list of the selected items with both images and text. ---Examples-- +**Examples** .. code-block:: @@ -2240,11 +2245,11 @@ A way to render a choice [[type:field]], see [[type:style]]. Symbol Variation ________________ ---Overview-- +**Overview** A variation of a symbol, describes color and border. ---Properties-- +**Properties** .. list-table:: :header-rows: 1 @@ -2255,19 +2260,19 @@ A variation of a symbol, describes color and border. - Type - Default - Description - * - @name@ + * - ``name`` - [[type:string]] - ''Required'' - Name of this variation, refered to by the [[fun:symbol_variation]] function. - * - @border radius@ + * - ``border radius`` - [[type:double]] - - @0.05@ + - ``0.05`` - Border radius of the symbol. - * - @fill type@ - - @solid@ or @linear gradient@ or @radial gradient@ - @"solid"@ How to fill the symbol. + * - ``fill type`` + - ``solid@ or @linear gradient@ or @radial gradient`` + ``"solid"`` How to fill the symbol. -Depending on the @fill type@ there are additional properties: +Depending on the ``fill type`` there are additional properties: .. list-table:: :header-rows: 1 @@ -2278,56 +2283,56 @@ Depending on the @fill type@ there are additional properties: - Property - Type - Description - * - @"solid"@ - - @fill color@ + * - ``"solid"`` + - ``fill color`` - [[type:color]] - Color to use for filling the symbol. * - ^^^ - - @border color@ + - ``border color`` - [[type:color]] - Color to use for the border of the symbol. - * - @"linear gradient"@ - - @fill color 1@ + * - ``"linear gradient"`` + - ``fill color 1`` - [[type:color]] - Color to use for filling the symbol at the center of the gradient. * - ^^^ - - @border color 1@ + - ``border color 1`` - [[type:color]] - Color to use for the border of the symbol at the center of the gradient. * - ^^^ - - @fill color 2@ + - ``fill color 2`` - [[type:color]] - Color to use for filling the symbol at the ends of the gradient. * - ^^^ - - @border color 2@ + - ``border color 2`` - [[type:color]] - Color to use for the border of the symbol at the ends of the gradient. * - ^^^ - - @center x@, @center y@ + - ``center x@, @center y`` - [[type:double]] - Position of the center point of the gradient (in the range 0 to 1) * - ^^^ - - @end x@, @end y@ + - ``end x@, @end y`` - [[type:double]] - Position of the end point of the gradient (in the range 0 to 1) - * - @"radial gradient"@ - - @fill color 1@ + * - ``"radial gradient"`` + - ``fill color 1`` - [[type:color]] - Color to use for filling the symbol at the center of the symbol. * - ^^^ - - @border color 1@ + - ``border color 1`` - [[type:color]] - Color to use for the border of the symbol at the center of the symbol. * - ^^^ - - @fill color 2@ + - ``fill color 2`` - [[type:color]] - Color to use for filling the symbol at the edges of the symbol. * - ^^^ - - @border color 2@ + - ``border color 2`` - [[type:color]] - Color to use for the border of the symbol at the edges of the symbol. ---Examples-- +**Examples** 'Common' and 'uncommon' magic expansion symbol styles: .. code-block:: @@ -2370,7 +2375,7 @@ It is possible to dig deeper into blocks, for example Is the middle of the first line of the second block. ---Properties-- +**Properties** .. list-table:: :header-rows: 1 @@ -2380,31 +2385,31 @@ Is the middle of the first line of the second block. * - Property - Type - Description - * - @width@ + * - ``width`` - [[type:double]] - Width of this line or group of lines in pixels. - * - @height@ + * - ``height`` - [[type:double]] - Height of this line or group of lines in pixels. - * - @top@ + * - ``top`` - [[type:double]] - Top y coordinate - * - @middle@ + * - ``middle`` - [[type:double]] - Middle y coordinate - * - @bottom@ + * - ``bottom`` - [[type:double]] - Bottom y coordinate - * - @lines@ + * - ``lines`` - [[type:list]] of [[type:text layout]]s - The lines in this part of the text. - * - @paragraphs@ + * - ``paragraphs`` - [[type:list]] of [[type:text layout]]s - The paragraphs in this part of the text. - * - @blocks@ + * - ``blocks`` - [[type:list]] of [[type:text layout]]s - The blocks in this part of the text. - * - @separators@ + * - ``separators`` - [[type:list]] of [[type:double]]s - The y coordinates of separators between blocks. @@ -2413,7 +2418,7 @@ Is the middle of the first line of the second block. Value ~~~~~ ---Overview-- +**Overview** A value is something that is 'stored in' a [[type:field]]. @@ -2434,7 +2439,7 @@ Values are part of the [[file:style triangle]]: - [[type:Style]] - '''Value''' ---Possible types-- +**Possible types** The type of a value depends on the corresponding field: @@ -2446,37 +2451,37 @@ The type of a value depends on the corresponding field: * - Field type - Value data type - Description - * - @"text"@ + * - ``"text"`` - [[type:tagged string]] - A piece of text, possibly with markup. - * - @"choice"@ + * - ``"choice"`` - [[type:string]] - One of the choices of the field. - * - @"multiple choice"@ + * - ``"multiple choice"`` - [[type:string]] - A list of choices from the field, separated by commas.
    - For example: @"red, green, blue"@. - * - @"package choice"@ + For example: ``"red, green, blue"``. + * - ``"package choice"`` - Name of a package - The (file)name of a package, including the extension. - * - @"boolean"@ - - @"yes"@ or @"no"@ + * - ``"boolean"`` + - ``"yes"@ or @"no"`` - This can be directly used as a [[type:boolean]] value in scripts. - * - @"image"@ + * - ``"image"`` - [[type:filename]] - Filename of an image file in the [[type:set]] package. - * - @"symbol"@ + * - ``"symbol"`` - [[type:filename]] - Filename of a [[type:symbol]] file in the [[type:set]] package.
    When accessed from a script, image fields can be directly used as [[type:image]]s. - * - @"color"@ + * - ``"color"`` - opaque [[type:color]] - A color. - * - @"info"@ + * - ``"info"`` - [[type:string]] - A label for the information box. ---Example-- +**Example** For the field: .. code-block:: @@ -2497,11 +2502,11 @@ A value could be: Card ~~~~ ---Overview-- +**Overview** A '''card''' in a [[type:set]]. ---Properties-- +**Properties** .. list-table:: :header-rows: 1 @@ -2512,41 +2517,41 @@ A '''card''' in a [[type:set]]. - Type - Default - Description - * - @stylesheet@ + * - ``stylesheet`` - Name of a [[type:stylesheet]] - ''none'' - Use a different stylesheet for this card than the [[type:set]]'s default. - * - @has styling@ + * - ``has styling`` - [[type:boolean]] - false - This card has styling data different from the set's default. - * - @styling data@ + * - ``styling data`` - [[type:indexmap]] of [[type:value]]s - false - - Styling data, based on the [[type:stylesheet]]'s @style fields@. - * - @notes@ + - Styling data, based on the [[type:stylesheet]]'s ``style fields``. + * - ``notes`` - [[type:tagged string]] - - @""@ + - ``""`` - Notes for this card. - * - @time created@ + * - ``time created`` - [[type:date]] - ''now'' - Time at which the card was created. - * - @time modified@ + * - ``time modified`` - [[type:date]] - ''now'' - Time at which the card was last modified. - * - @extra data@ + * - ``extra data`` - [[type:map]] of [[type:indexmap]]s of [[type:value]]s Data for the 'extra card fields' of the stylesheet.
    This is first indexed by stylesheet name, then by field name. * - ''remaining keys'' - [[type:indexmap]] of [[type:value]]s - - - The remaining keys contain the data for the game's @card fields@.
    - So for example @card.some_field@ corresponds to the value of the card field @some field@. + - The remaining keys contain the data for the game's ``card fields``.
    + So for example ``card.some_field@ corresponds to the value of the card field @some field``. ---Examples-- +**Examples** With the following game: @@ -2576,13 +2581,13 @@ A card could look like: Keyword ~~~~~~~ ---Overview-- +**Overview** A keyword in a [[type:set]] or a [[type:game]]. A keyword is something that matches a piece of text, and optionally some kind of reminder text can be shown. ---Properties-- +**Properties** .. list-table:: :header-rows: 1 @@ -2593,33 +2598,33 @@ A keyword is something that matches a piece of text, and optionally some kind of - Type - Default - Description - * - @keyword@ + * - ``keyword`` - [[type:string]] - ''required'' - Name of the keyword. - * - @match@ + * - ``match`` - [[type:string]] - ''required'' - String to match. - * - @reminder@ + * - ``reminder`` - [[type:scriptable]] [[type:string]] - ''required'' - Script to generate the reminder text of this keyword. - * - @rules@ + * - ``rules`` - [[type:string]] - - @""@ + - ``""`` - Explanation or additional rules for this keyword. - * - @mode@ + * - ``mode`` - Name of a [[type:keyword mode]] - - Mode of this keyword. -The match string can include parameters, @"type"@ where @"type"@ is the name of a [[type:keyword param type|keyword parameter type]] in the game. -These will match according to the @match@ property of that parameter type. +The match string can include parameters, ``"type"@ where @"type"`` is the name of a [[type:keyword param type|keyword parameter type]] in the game. +These will match according to the ``match`` property of that parameter type. -When expanding the reminder text @param1@ refers to the first parameter in the match string, @param2@ to the second, etc. +When expanding the reminder text ``param1@ refers to the first parameter in the match string, @param2`` to the second, etc. ---Example-- +**Example** .. code-block:: @@ -2633,7 +2638,7 @@ When expanding the reminder text @param1@ refers to the first parameter in the m Keyword Mode ~~~~~~~~~~~~ ---Overview-- +**Overview** A mode for [[type:keyword]]s. @@ -2642,7 +2647,7 @@ This becomes a choice in the 'mode' box on the keywords panel. The idea behind modes is that a mode indicates what type of keyword it is, for example an "official" keyword, a "simple" keyword or a "custom" keyword. This information can then be used to determine whether to expand the reminder text. ---Properties-- +**Properties** .. list-table:: :header-rows: 1 @@ -2653,20 +2658,20 @@ This information can then be used to determine whether to expand the reminder te - Type - Default - Description - * - @name@ + * - ``name`` - [[type:string]] - ''required'' - Name of the mode, this is shown in the box and used in scripts. - * - @description@ + * - ``description`` - [[type:string]] - - @""@ + - ``""`` - A description of this mode. - * - @is default@ + * - ``is default`` - [[type:boolean]] - - @false@ + - ``false`` - Is this the default mode for new keywords? ---Example-- +**Example** .. code-block:: @@ -2679,11 +2684,11 @@ This information can then be used to determine whether to expand the reminder te Keyword Param Type ~~~~~~~~~~~~~~~~~~ ---Overview-- +**Overview** A type of parameter that can be used in a [[type:keyword]]. ---Properties-- +**Properties** .. list-table:: :header-rows: 1 @@ -2694,59 +2699,59 @@ A type of parameter that can be used in a [[type:keyword]]. - Type - Default - Description - * - @name@ + * - ``name`` - [[type:string]] - ''required'' - Name of the parameter type. - * - @description@ + * - ``description`` - [[type:string]] - ''required'' - Description of the parameter type. - * - @placeholder@ + * - ``placeholder`` - [[type:string]] - - @name@ of this param type + - ``name`` of this param type - Placeholder to use for empty parameters, the name is used if this is empty. - * - @optional@ + * - ``optional`` - [[type:boolean]] - - @true@ - - Is a placeholder used when a keyword is encountered with no parameter,
    for example @"Cycling "@ would become @"Cycling cost"@. - * - @match@ + - ``true`` + - Is a placeholder used when a keyword is encountered with no parameter,
    for example ``"Cycling "@ would become @"Cycling cost"``. + * - ``match`` - [[type:regex]] - ''required'' - Regular expression that this param type matches. - * - @separator before is@ + * - ``separator before is`` - [[type:regex]] - - @""@ + - ``""`` - Regular expression of separator before parameters of this type. - * - @separator after is@ + * - ``separator after is`` - [[type:regex]] - - @""@ + - ``""`` - Regular expression of separator after parameters of this type. - * - @eat separator@ + * - ``eat separator`` - [[type:boolean]] - - @true@ + - ``true`` - Allow the user to 'type over' the separator.
    - For example if the separator is @" "@ in the keyword @"Cycling"@, and the user types @"Cycling"@, - a space and a placeholder is automatically inserted, making @"Cycling "@. + For example if the separator is ``" "@ in the keyword @"Cycling"@, and the user types @"Cycling"``, + a space and a placeholder is automatically inserted, making ``"Cycling "``. If the user now presses space the cursor is only moved, no additional space is inserted, the space is 'eaten'. - * - @script@ + * - ``script`` - [[type:script]] - - Script to apply to parameters of this type before substituting them back into the text. - * - @reminder script@ + * - ``reminder script`` - [[type:script]] - - Script to apply to parameters of this type before using them in the reminder text. - * - @example@ + * - ``example`` - [[type:string]] - - Example for in the keyword editor, currently not used. - * - @refer scripts@ + * - ``refer scripts`` - [[type:list]] of [[type:keyword param reference script]]s Scripts for inserting parameters of this type into the reminder text. To make this easy for the user, a menu of ways to use a parameter is provided. ---Example-- +**Example** The 'number' parameter type. It matches a sequence of digits. It can be included in the reminder text directly, or by applying some function first. @@ -2767,16 +2772,16 @@ It can be included in the reminder text directly, or by applying some function f Keyword Param Reference Script ______________________________ ---Overview-- +**Overview** A way to use a [[type:keyword param type|keyword parameter]] in a [[type:keyword]]'s reminder text. -Usually the parameters are included as @"{param1}"@, etc. -But in some cases for instance a function should be applied, @"{fun(param1)}"@. +Usually the parameters are included as ``"{param1}"``, etc. +But in some cases for instance a function should be applied, ``"{fun(param1)}"``. To make this easy for the user, a menu of choices is provided, this type describes such a choice. ---Properties-- +**Properties** .. list-table:: :header-rows: 1 @@ -2787,22 +2792,22 @@ To make this easy for the user, a menu of choices is provided, this type describ - Type - Default - Description - * - @name@ + * - ``name`` - [[type:string]] - ''required'' - Name of the parameter type. - * - @description@ + * - ``description`` - [[type:string]] - ''required'' - A description of the reference script. - * - @script@ + * - ``script`` - [[type:script]] - ''required'' - Script that generates the code using the parameter.
    This means you will likely need to do some escaping.
    - In the script, @input@ refers to the name of the parameter, for example @"param1"@. + In the script, ``input@ refers to the name of the parameter, for example @"param1"``. ---Example-- +**Example** Apply the [[fun:english_number]] function to the parameter: .. code-block:: @@ -2817,17 +2822,17 @@ Apply the [[fun:english_number]] function to the parameter: Statistics Dimension ~~~~~~~~~~~~~~~~~~~~ ---Overview-- +**Overview** A dimension or axis for the statistics panel. One or more dimensions are combined in a graph, these combinations are called [[type:statistics category]]s. -Statistics dimensions are automatically generated for all card fields in a [[type:game]] that don't set @show statistics@ to @false@. +Statistics dimensions are automatically generated for all card fields in a [[type:game]] that don't set ``show statistics@ to @false``. Categories are also automatically generated from dimensions. ---Properties-- +**Properties** .. list-table:: :header-rows: 1 @@ -2838,53 +2843,53 @@ Categories are also automatically generated from dimensions. - Type - Default - Description - * - @name@ + * - ``name`` - [[type:string]] - ''required'' - Name of this dimension, used as an axis label and a label for automatically generated categories. - * - @description@ + * - ``description`` - [[type:localized string]] - - @""@ + - ``""`` - A description of the dimension, currently not used. - * - @position hint@ + * - ``position hint`` - [[type:string]] - - @0@ + - ``0`` - Hint for ordering dimensions. - * - @icon@ + * - ``icon`` - [[type:filename]] - - Filename of an icon for this dimension. - * - @script@ + * - ``script`` - [[type:script]] - ''required'' - Script that generates a value for each card in the set. - * - @numeric@ + * - ``numeric`` - [[type:boolean]] - - @false@ + - ``false`` - Is the value always a number? - * - @bin size@ + * - ``bin size`` - [[type:double]] - ''none'' - For numeric dimensions: group numbers together into bins this large.
    - For example with @bin size: 5@, values @1@ and @3@ both get put under @"1-5"@. - * - @show empty@ + For example with ``bin size: 5@, values @1@ and @3@ both get put under @"1-5"``. + * - ``show empty`` - [[type:boolean]] - - @false@ - - Should cards with the value @""@ be included? - * - @split list@ + - ``false`` + - Should cards with the value ``""`` be included? + * - ``split list`` - [[type:boolean]] - - @false@ - - Indicates the value is a list of the form @"item1, item2"@. The card is put under both items. - * - @colors@ + - ``false`` + - Indicates the value is a list of the form ``"item1, item2"``. The card is put under both items. + * - ``colors`` - [[type:map]] of opaque [[type:color]]s - - Colors to use for specific values - * - @groups@ + * - ``groups`` - [[type:list]] of [[type:string]]s - - Values to always show, and the order to show them in. ---Example-- +**Example** Automatically generated statistics dimensions look like this: .. code-block:: @@ -2917,7 +2922,7 @@ Word List A list of words. Used for drop down lists in the text editor, for example for card types. ---Properties-- +**Properties** .. list-table:: :header-rows: 1 @@ -2928,16 +2933,16 @@ A list of words. Used for drop down lists in the text editor, for example for ca - Type - Default - Description - * - @name@ + * - ``name`` - [[type:string]] - ''Required'' - - Name of this word list, refered to using a @""@ tag. - * - @words@ + - Name of this word list, refered to using a ``""`` tag. + * - ``words`` - [[type:list]] of [[type:word list word]]s - ''Required'' - The words in the list ---Example-- +**Example** .. code-block:: @@ -2950,7 +2955,7 @@ This can be used with for example: .. code-block:: - @"Creature"@ + ``"Creature"`` Which gives the creature choice, and that can be changed with a drop down list. Word List Word @@ -2958,7 +2963,7 @@ Word List Word A word in a [[type:word list]]. ---Properties-- +**Properties** .. list-table:: :header-rows: 1 @@ -2969,33 +2974,33 @@ A word in a [[type:word list]]. - Type - Default - Description - * - @name@ + * - ``name`` - [[type:string]] - ''Required'' - The word. - * - @line below@ + * - ``line below`` - [[type:boolean]] - - @false@ + - ``false`` - Display a line below this item in the list? - * - @is prefix@ + * - ``is prefix`` - [[type:boolean]] - - @false@ + - ``false`` - Should this word be used as a prefix before another word from the list?
    Think "Legendary ". Note the space after it, words are directly concatenated. - * - @words@ + * - ``words`` - [[type:list]] of [[type:word list word]]s - - - A submenu. If given, the @name@ of this word is only used as a label for the menu. - * - @script@ + - A submenu. If given, the ``name`` of this word is only used as a label for the menu. + * - ``script`` - [[type:script]] - ''Optional'' - A script that determines zero or more words.
    - The result should be a list of comma separated words, for example @"x,y,z"@ specifies three words. + The result should be a list of comma separated words, for example ``"x,y,z"`` specifies three words. The words are included in the parent menu, not a sub menu. A word can also be given in a short form, in that case only the name is specified. ---Example-- +**Example** In short form: .. code-block:: @@ -3031,11 +3036,11 @@ Add Cards Script DOC_MSE_VERSION: since 0.3.7 ---Overview-- +**Overview** A script to add multiple cards to the set at once. ---Properties-- +**Properties** .. list-table:: :header-rows: 1 @@ -3046,26 +3051,26 @@ A script to add multiple cards to the set at once. - Type - Default - Description - * - @name@ + * - ``name`` - [[type:string]] - - Name of this script; appears in the menu. - * - @description@ + * - ``description`` - [[type:string]] - - @""@ + - ``""`` - Description of this script; appears in the status bar. - * - @enabled@ + * - ``enabled`` - [[type:scriptable]] [[type:boolean]] - - @true@ + - ``true`` - Is this script enabled? - * - @script@ + * - ``script`` - [[type:script]] - - Script that produces the cards.
    This script should return a [[type:list]] of [[type:card]]s. The [[fun:new_card]] function can be used to make new cards. ---Example-- +**Example** .. code-block:: @@ -3087,11 +3092,11 @@ When invoked, this script will add the five basic lands to the set. Font ~~~~ ---Overview-- +**Overview** A reference to a normal [[type:font]] for drawing text. ---Properties-- +**Properties** .. list-table:: :header-rows: 1 @@ -3102,64 +3107,64 @@ A reference to a normal [[type:font]] for drawing text. - Type - Default - Description - * - @name@ + * - ``name`` - [[type:scriptable]] [[type:string]] - ''required'' - Name of the font as it appears in most text programs. - * - @italic name@ + * - ``italic name`` - [[type:scriptable]] [[type:string]] - - Optionally, a different font to use for italic text instead of the normal italic version of the font. - * - @size@ + * - ``size`` - [[type:scriptable]] [[type:double]] - ''required'' - Size of the font in points on a 96 DPI display. - * - @scale down to@ + * - ``scale down to`` - [[type:double]] - ∞ - Minimum size in points to scale the size down to. - * - @max stretch@ + * - ``max stretch`` - [[type:double]] - - @1.0@ - - Maximum multiplier by which the width of the text is compressed, so @max width: 0.5@ means the text can be compressed to half the normal width. - * - @weight@ + - ``1.0`` + - Maximum multiplier by which the width of the text is compressed, so ``max width: 0.5`` means the text can be compressed to half the normal width. + * - ``weight`` - [[type:scriptable]] font weight - - @"normal"@ - - Weight of the font, one of @"normal"@ or @"bold"@. This can be changed locally by [[type:tagged string|tags]]. - * - @style@ + - ``"normal"`` + - Weight of the font, one of ``"normal"@ or @"bold"``. This can be changed locally by [[type:tagged string|tags]]. + * - ``style`` - [[type:scriptable]] font style - - @"normal"@ - - Style of the font, one of @"normal"@ or @"italic"@. This can be changed locally by [[type:tagged string|tags]]. - * - @underline@ + - ``"normal"`` + - Style of the font, one of ``"normal"@ or @"italic"``. This can be changed locally by [[type:tagged string|tags]]. + * - ``underline`` - [[type:scriptable]] [[type:boolean]] - - @false@ + - ``false`` - Should the font be underlined? - * - @color@ + * - ``color`` - [[type:scriptable]] [[type:color]] - - @rgb(0,0,0)@ + - ``rgb(0,0,0)`` - What color should text be drawn in? - * - @shadow color@ + * - ``shadow color`` - [[type:scriptable]] [[type:color]] - - @"transparent"@ + - ``"transparent"`` - Color for a shadow below the text. - * - @shadow displacement x@ + * - ``shadow displacement x`` - [[type:double]] - - @0@ + - ``0`` - Relative position of the shadow in pixels. - * - @shadow displacement y@ + * - ``shadow displacement y`` - [[type:double]] - - @0@ + - ``0`` - ^^^ - * - @shadow blur@ + * - ``shadow blur`` - [[type:double]] - - @0@ + - ``0`` - How much should the shadow be blurred? - * - @separator color@ + * - ``separator color`` - [[type:color]] - - @rgba(0,0,0,128)@ - - Color for @@ tags inserted by the [[fun:combined_editor]] function. + - ``rgba(0,0,0,128)`` + - Color for ```` tags inserted by the [[fun:combined_editor]] function. ---Example-- +**Example** .. code-block:: @@ -3173,11 +3178,11 @@ A reference to a normal [[type:font]] for drawing text. Symbol Part ~~~~~~~~~~~ ---Overview-- +**Overview** A part of a symbol, corresponds to an item you see in the list on the left of the editor. ---Properties-- +**Properties** .. list-table:: :header-rows: 1 @@ -3188,19 +3193,19 @@ A part of a symbol, corresponds to an item you see in the list on the left of th - Type - Default - Description - * - @type@ + * - ``type`` - One of: - - @"shape"@ + - ``"shape"`` - What type of symbol part is this? - * @shape@ - * @group@ - * @symmetry@ - * - @name@ + * ``shape`` + * ``group`` + * ``symmetry`` + * - ``name`` - [[type:string]] - - @""@ + - ``""`` - The name of this part, for the part list. -The rest of the properties depends on the @type@. +The rest of the properties depends on the ``type``. .. list-table:: :header-rows: 1 @@ -3212,48 +3217,48 @@ The rest of the properties depends on the @type@. - Type - Default - Description - * - @"shape"@ - - @combine@ + * - ``"shape"`` + - ``combine`` - [[type:symbol combine]] - - @"overlap"@ + - ``"overlap"`` - How to combine the shape with those below it? * - ^^^ - - @points@ + - ``points`` - [[type:list]] of [[type:control point]]s - - The points that form this shape - * - @"symmetry"@ - - @kind@ - - @rotation@ or @reflection@ - - @"rotation"@ + * - ``"symmetry"`` + - ``kind`` + - ``rotation@ or @reflection`` + - ``"rotation"`` - What kind of symmetry is this? * - ^^^ - - @copies@ + - ``copies`` - [[type:int]] - 2 - How many times is the original copied (including the original itself)? * - ^^^ - - @center@ + - ``center`` - [[type:vector2d]] - - Coordinates of the center of symmetry. * - ^^^ - - @handle@ + - ``handle`` - [[type:vector2d]] - - Direction perpendicular to the 'mirror' (this is a direction, so relative to the center). - * - @"group"@ and @"symmetry"@ - @parts@ [[type:list]] of [[type:symbol part]]s Parts in this group. + * - ``"group"@ and @"symmetry"`` + ``parts`` [[type:list]] of [[type:symbol part]]s Parts in this group. ---Example-- +**Example** Look at a symbol file made with the program. Control Point ~~~~~~~~~~~~~ ---Overview-- +**Overview** A single [[http://en.wikipedia.org/wiki/Bezier_curve|Bézier curve]] control point in a [[type:symbol part|symbol shape]]. @@ -3262,7 +3267,7 @@ It also optionally has two 'handles' corresponding to the boxes attached with do The control points of a shape are circular, the point after the last point in the list is the first point. ---Properties-- +**Properties** .. list-table:: :header-rows: 1 @@ -3273,30 +3278,30 @@ The control points of a shape are circular, the point after the last point in th - Type - Default - Description - * - @position@ + * - ``position`` - [[type:vector2d]] - - Position of the control point. - * - @lock@ - - @free@, @direction@ or @size@ - - @"free"@ + * - ``lock`` + - ``free@, @direction@ or @size`` + - ``"free"`` Is this point 'locked', i.e. is the relation between the two handles fixed?
    - If @lock@ is @"direction"@ then the two handles must lie on a line.
    - If @lock@ is @"direction"@ then the two handles must lie exactly oppisite each other on the same distance from the point. - * - @line after@ - - @line@ or @curve@ - - @"line"@ + If ``lock@ is @"direction"`` then the two handles must lie on a line.
    + If ``lock@ is @"direction"`` then the two handles must lie exactly oppisite each other on the same distance from the point. + * - ``line after`` + - ``line@ or @curve`` + - ``"line"`` - Is the segment between this control point and the next one in the list a straight line or a cubic Bézier curve? - * - @handle before@ + * - ``handle before`` - [[type:vector2d]] - - - Position of the handle for the segment between this point and the previous one, relative to the point's @position@.
    Only when that point's @line after == "curve"@. - * - @handle after@ + - Position of the handle for the segment between this point and the previous one, relative to the point's ``position@.
    Only when that point's @line after == "curve"``. + * - ``handle after`` - [[type:vector2d]] - - - Position of the handle for the segment between this point and the next one, relative to the point's @position@.
    Only when @line after == "curve"@. + - Position of the handle for the segment between this point and the next one, relative to the point's ``position@.
    Only when @line after == "curve"``. ---Example-- +**Example** Look at a symbol file made with the program. @@ -3341,10 +3346,10 @@ Collection Types List ~~~~ ---File syntax-- +**File syntax** In files a list is represented as multiple keys, one for each element. The keys are all in the singular for of the name of the list, -if the list is named for instance @symbols@ each key will be named @symbol@. +if the list is named for instance ``symbols@ each key will be named @symbol``. .. code-block:: @@ -3354,7 +3359,7 @@ if the list is named for instance @symbols@ each key will be named @symbol@. # second symbol here # etc. ---Script syntax-- +**Script syntax** In a script lists can be declared using square brackets. .. code-block:: @@ -3372,7 +3377,7 @@ The first element of a list is numbered 0, the next 1, etc. list[0] # The same thing list[0+0] # The same thing -It is possible to iterate over lists using the @for each@ construct: +It is possible to iterate over lists using the ``for each`` construct: .. code-block:: @@ -3383,7 +3388,7 @@ evaluates to: "x = 1. x = 2. x = 3. " ---Functions-- +**Functions** There are several functions for working with lists: .. list-table:: @@ -3404,7 +3409,7 @@ There are several functions for working with lists: Field Map ~~~~~~~~~ ---Overview-- +**Overview** A 'field map' is a [[type:map]], but indexed by [[type:field]]s. @@ -3440,7 +3445,7 @@ And a field map of [[type:value]]s would be: field1: text goes here field2: rgb(1,2,3) ---Script syntax-- +**Script syntax** In a script field maps can be accessed like normal [[type:map]]s based on the field name. So: @@ -3457,7 +3462,7 @@ Map A map is like a [[type:list]] with [[type:string]] keys. ---File syntax-- +**File syntax** In files a map is represented as key/value pairs. For instance a map of [[type:color]]s could be: @@ -3468,7 +3473,7 @@ For instance a map of [[type:color]]s could be: green: rgb(0,255,0) blue: rgb(0,0,255) ---Script syntax-- +**Script syntax** In a script maps can be declared using square brackets. .. code-block:: @@ -3484,7 +3489,7 @@ Like lists, maps can be accessed using either the bracket operator, or the dot o map.key # The elment named "key" map["k"+"ey"] # The same thing -It is possible to iterate over the values maps using the @for@ construct: +It is possible to iterate over the values maps using the ``for`` construct: .. code-block:: @@ -3537,22 +3542,22 @@ Script Related Script ~~~~~~ ---Overview-- +**Overview** A script object is a piece of code written in the [[script:index|MSE scripting language]]. ---File syntax-- +**File syntax** A script is given in the same way as a [[type:string]]. ---Example-- +**Example** A simple [[type:field]] script that converts everything to upper case: .. code-block:: script: to_upper(value) -A larger script, changes @"y"@s to @"x"@s and @"a"@s to @"b"@s: +A larger script, changes ``"y"@s to @"x"@s and @"a"@s to @"b"``s: .. code-block:: @@ -3565,7 +3570,7 @@ A larger script, changes @"y"@s to @"x"@s and @"a"@s to @"b"@s: Scriptable ~~~~~~~~~~ ---Overview-- +**Overview** Many [[type:style]] properties are ''scriptable''; their value can be changed by a script. @@ -3582,13 +3587,13 @@ To script this you can write: left: { if card.name == "" then 100 else 123 } Now the left position depends on whether or not the name is empty. ---File syntax-- +**File syntax** A 'scriptable something' can take three forms: # It can be a regular 'something' >something: 123 # It can be a script that produces 'something', enclosed in curly braces: >something: {100 + 23} -# It can be a script that produces 'something', indented and preceded by @script:@: +# It can be a script that produces 'something', indented and preceded by ``script:``: >something: > script: 100 + 23 @@ -3621,7 +3626,7 @@ Images are generated using scripts. It is either given using a [[type:filename]] or as the output of a function. ---File syntax-- +**File syntax** The syntax for files is similair to that of [[type:scriptable]] properties: .. code-block:: @@ -3630,10 +3635,10 @@ The syntax for files is similair to that of [[type:scriptable]] properties: image: { "image.png" } image: { linear_blend(...) } ---Script syntax-- +**Script syntax** [[type:Filename]]s are implicitly converted to images as needed. ---See also-- +**See also** The following functions transform images: .. list-table:: @@ -3668,16 +3673,16 @@ The following functions transform images: Function ~~~~~~~~ ---Overview-- +**Overview** The [[script:index|scripting language]] allows you to define custom functions. ---Syntax-- +**Syntax** A piece of code enclosed in curly braces defines a function. -A function can be called using parentheses, for example @function(argument:value)@. +A function can be called using parentheses, for example ``function(argument:value)``. ---Composition-- -Functions can be composed using the @+@ operator, evaluating @a + b@ first evaluates @a@ and uses its result as @input@ for @b@: +**Composition** +Functions can be composed using the ``+@ operator, evaluating @a + b@ first evaluates @a@ and uses its result as @input@ for @b``: .. code-block:: @@ -3686,7 +3691,7 @@ Functions can be composed using the @+@ operator, evaluating @a + b@ first evalu Multiple functions can be changed together like this, this is especially convenient in combination with [[script:default arguments]]. ---Example-- +**Example** .. code-block:: @@ -3743,10 +3748,10 @@ An alignment consists of: * (optional) how to fill the text box * (optional) when to fill the text box ---Script syntax-- +**Script syntax** In scripts, alignment is passed around as a string. ---Possible values-- +**Possible values** The value is a combination of one or more flags, separated by spaces. These flags can appear in any order. @@ -3757,32 +3762,32 @@ These flags can appear in any order. * - Value - Description - * - @left@ + * - ``left`` - Horizontally, align at the left - * - @center@ + * - ``center`` - Horizontally, align in the middle - * - @right@ + * - ``right`` - Horizontally, align at the right - * - @top@ + * - ``top`` - Vertically, align at the top - * - @middle@ + * - ``middle`` - Vertically, align in the middle - * - @bottom@ + * - ``bottom`` - Vertically, align at the bottom - * - @justify@ + * - ``justify`` - Fill the box exactly, by moving words apart/together. - * - @justify-all@ + * - ``justify-all`` - Fill the box exactly, by moving individual characters apart/together. - * - @stretch@ + * - ``stretch`` - Fill the box exactly, by stretching the text.
    For images: stretch them, but preserve the aspect ratio. - * - @if-overflow@ - - Only apply @justify@, @justify-all@ and @stretch@ when the box is overfull. - * - @force@ + * - ``if-overflow`` + - Only apply ``justify@, @justify-all@ and @stretch`` when the box is overfull. + * - ``force`` - Also justify text at the end of a line in a multiline text field.
    Normally only lines ending in a soft line break are justified. ---Examples-- +**Examples** .. code-block:: @@ -3797,10 +3802,10 @@ Direction Specifies the direction of text flow in a text box. ---Script syntax-- +**Script syntax** In scripts, direction is passed around as a string. ---Possible values-- +**Possible values** .. list-table:: :header-rows: 1 @@ -3809,20 +3814,20 @@ In scripts, direction is passed around as a string. * - Value - Description - * - @left to right@ + * - ``left to right`` - Text starts at the left. - * - @right to left@ + * - ``right to left`` - Text starts at the right ''(currently not implemented)'' - * - @top to bottom@ + * - ``top to bottom`` - Text starts at the top, each character is on a new line. - * - @bottom to top@ + * - ``bottom to top`` - Text starts at the bottom ''(currently not implemented)'' - * - @horizontal@ - - Same as @left to right@. - * - @vertical@ - - Same as @top to bottom@. + * - ``horizontal`` + - Same as ``left to right``. + * - ``vertical`` + - Same as ``top to bottom``. ---Examples-- +**Examples** .. code-block:: @@ -3838,10 +3843,10 @@ This is similair to the feature found in more advanced drawing programs. The formula's are from [[http://www.pegtop.net/delphi/articles/blendmodes/]]. ---Script syntax-- +**Script syntax** In scripts, combine modes are stored as a string. ---Possible values-- +**Possible values** .. list-table:: :header-rows: 1 @@ -3850,43 +3855,43 @@ In scripts, combine modes are stored as a string. * - Value - Description - * - @normal@ + * - ``normal`` - Normal behaviour, don't combine. - * - @add@ + * - ``add`` - - * - @subtract@ + * - ``subtract`` - - * - @stamp@ + * - ``stamp`` - - * - @difference@ + * - ``difference`` - - * - @negation@ + * - ``negation`` - - * - @multiply@ + * - ``multiply`` - - * - @darken@ + * - ``darken`` - - * - @lighten@ + * - ``lighten`` - - * - @color dodge@ + * - ``color dodge`` - - * - @color burn@ + * - ``color burn`` - - * - @screen@ + * - ``screen`` - - * - @overlay@ + * - ``overlay`` - - * - @hard light@ + * - ``hard light`` - - * - @soft light@ + * - ``soft light`` - - * - @reflect@ + * - ``reflect`` - - * - @glow@ + * - ``glow`` - - * - @freeze@ + * - ``freeze`` - - * - @heat@ + * - ``heat`` - * - and - Bitwise and @@ -3894,12 +3899,12 @@ In scripts, combine modes are stored as a string. - Bitwise or * - xor - Bitwise xot - * - @shadow@ + * - ``shadow`` - Dark colors normally, white colors darken the background. - * - @symmetric overlay@ - - @(overlay(a,b) + overlay(b,a)) / 2@ + * - ``symmetric overlay`` + - ``(overlay(a,b) + overlay(b,a)) / 2`` ---Examples-- +**Examples** .. code-block:: @@ -3913,10 +3918,10 @@ Symbol Combine Specifies how symbol shapes are combined with those below it ---Script syntax-- +**Script syntax** In scripts, symbol combine modes are passed around as a string. ---Possible values-- +**Possible values** The value is one of the following options: .. list-table:: @@ -3926,20 +3931,20 @@ The value is one of the following options: * - Value - Description - * - @overlap@ + * - ``overlap`` - Place this shape on top of those below it.
    Further combine options only apply to this shape. - * - @merge@ + * - ``merge`` - Marge this shape with the one below it, they are considered a single shape for further combining. - * - @subtract@ + * - ``subtract`` - Subtract this shape from the one below it. - * - @intersection@ + * - ``intersection`` - Take the intersection of this shape and the one below it, only areas that are in both shapes remain. - * - @difference@ + * - ``difference`` - Take the difference of this shape and the one below it, only areas that are in exactly one of the shapes remain. - * - @border@ + * - ``border`` - Use this shape as additional border for the shape below it. ---Examples-- +**Examples** .. code-block:: @@ -3951,7 +3956,7 @@ Graph Type Types of graphs for the statistics panel. ---Possible values-- +**Possible values** The value is one of the following options: .. list-table:: @@ -3963,29 +3968,29 @@ The value is one of the following options: - Dimensions - Sketch - Description - * - @bar@ + * - ``bar`` - 1 - bar graph One bar for each value on the axis, the height represent the number of cards with that value. - * - @pie@ + * - ``pie`` - 1 - pie graph A pie graph, the size of the slice represents the numer of cards with a particular value. - * - @stack@ + * - ``stack`` - 2 - stack graph One bar for each value on the first axis, bars for each value on axis2 are stacked on top of each other. - * - @scatter@ + * - ``scatter`` - 2 - scatter graph Scatter plot, the size of the circles corresponds to the number of cards with those two values. - * - @scatter pie@ + * - ``scatter pie`` - 3 - scatter-pie graph Scatter plot, the size of the circles corresponds to the number of cards with those two values. Each circle is a small pie graph for the third axis. ---Examples-- +**Examples** .. code-block:: @@ -4020,7 +4025,7 @@ Primitive Types :align: left * - :doc:`string <#string>` - - Text, @"abc"@ + - Text, ``"abc"`` * - :doc:`tagged string <#tagged string>` - Text with tags * - :doc:`filename <#filename>` @@ -4028,11 +4033,11 @@ Primitive Types * - :doc:`regex <#regex>` - Regular expression strings * - :doc:`boolean <#boolean>` - - @true@ or @false@ + - ``true@ or @false`` * - :doc:`int <#int>` - - Integer numbers, @1, 2, 100@ + - Integer numbers, ``1, 2, 100`` * - :doc:`double <#double>` - - Real numbers, @1, 0.5, 21.3@ + - Real numbers, ``1, 0.5, 21.3`` * - :doc:`version <#version>` - Version numbers * - :doc:`color <#color>` @@ -4045,7 +4050,7 @@ String A string is just a piece of text. ---File syntax-- +**File syntax** In files, strings are written just as their value: .. code-block:: @@ -4060,8 +4065,8 @@ Multiline strings are written on a new line, indented by a TAB: This is a very long string It contains a line break. ---Script syntax-- -In scripts, strings are written between double quotes, @"this is a string"@. +**Script syntax** +In scripts, strings are written between double quotes, ``"this is a string"``. The backslash character is used to escape values: .. list-table:: @@ -4071,15 +4076,15 @@ The backslash character is used to escape values: * - Code - Represents - * - @\"@ + * - ``\"`` - A " character - * - @\{@ + * - ``\{`` - A { character - * - @\n@ + * - ``\n`` - A newline character (line break) - * - @\\@ + * - ``\\`` - A backslash - * - @\<@ + * - ``\<`` - An escaped < for [[type:tagged string]]s. Sections between curly braces are interpreted as script code, that is concatentated with the string, for example @@ -4089,9 +4094,9 @@ Sections between curly braces are interpreted as script code, that is concatenta "ab{1 + 1}c" == "ab2c" This can be nested arbitrarily. -The @+@ operator concatenates strings. Numbers and most other values are automatically converted to strings when needed. This conversion can be forced with the [[fun:to_string]] function. +The ``+`` operator concatenates strings. Numbers and most other values are automatically converted to strings when needed. This conversion can be forced with the [[fun:to_string]] function. -Using the @[]@ or @.@ operator characters in a string can be selected. 0 is the first character: +Using the ``[]@ or @.`` operator characters in a string can be selected. 0 is the first character: .. code-block:: @@ -4105,7 +4110,7 @@ It is an error to select characters outside the string "xyz".10 # error ---See also-- +**See also** .. list-table:: :header-rows: 1 @@ -4121,17 +4126,17 @@ It is an error to select characters outside the string Tagged String ~~~~~~~~~~~~~ ---Syntax-- +**Syntax** Strings in [[type:value|text values]] can contain markup tags. These tags affect the presentation and sometimes the behaviour of the text. -A tag is something like @"some text"@, similar to HTML. -Tags are closed by the same tag with a @/@ before it. +A tag is something like ``"some text"``, similar to HTML. +Tags are closed by the same tag with a ``/`` before it. -To represent the character @"<"@ in a tagged string use @"\<"@ in script code. +To represent the character ``"<"@ in a tagged string use @"\<"`` in script code. This is written as the character with code 1 in files. ---Basic markup-- +**Basic markup** .. list-table:: :header-rows: 1 @@ -4140,39 +4145,39 @@ This is written as the character with code 1 in files. * - Tag - Description - * - @@ + * - ```` - The text inside the tag is bold. - * - @@ + * - ```` - The text inside the tag is italic. - * - @@ + * - ```` - The text inside the tag is rendered as symbols, if a [[prop:style:symbol font]] is set for the text box. - * - @@ + * - ```` - The text inside the tag is rendered with the given [[type:color]]. - * - @@ - - The text inside the tag is rendered with the given font size in points, for example @"text"@ makes the text 12 points. The text is scaled down proportionally when it does not fit in a text box and the @scale down to@ attribute allows it. - * - @@ + * - ```` + - The text inside the tag is rendered with the given font size in points, for example ``"text"@ makes the text 12 points. The text is scaled down proportionally when it does not fit in a text box and the @scale down to`` attribute allows it. + * - ```` - The text inside the tag is rendered with the given font family. - * - @@ + * - ```` - The block inside the tag is aligned with the given horizontal [[type:alignment]] - * - @@ + * - ```` - The block inside the tag has additional left, right (optional), and top (optional) margins of the specified size in pixels. - * - @
  • @ - - The text inside the tag is treated as a list marker, meaning that if the line wraps it will be indented to match the content of the @
  • @ tag. - * - @@ + * - ``
  • `` + - The text inside the tag is treated as a list marker, meaning that if the line wraps it will be indented to match the content of the ``
  • `` tag. + * - ```` - Line breaks inside this tag use the [[prop:style:line height line]], and they show a horizontal line. - * - @@ + * - ```` - Line breaks inside this tag use the [[prop:style:soft line height]]. - * - @@ + * - ```` - An atomic piece of text. The cursor can never be inside it; it is selected as a whole. - The program automatically inserts @@. - * - @@ + The program automatically inserts ````. + * - ```` - The text inside the tag is rendered in a monospace font. This is used for syntax highlighting script code. - * - @@ + * - ```` - The text inside the tag is highlighted as a keyword in source code. - * - @@ + * - ```` - The text inside the tag is highlighted as a string in source code. ---Other tags-- +**Other tags** .. list-table:: :header-rows: 1 @@ -4181,39 +4186,39 @@ This is written as the character with code 1 in files. * - Tag - Description - * - @@ + * - ```` - Indicates that the text inside it is a keyword. This tag is automatically inserted by The [[fun:expand_keywords]] function.
    There are four versions, indicating whether or not reminder text is shown: - * @@, Reminder text hidden, by default - * @@, Reminder text shown, by default - * @@, Reminder hidden manually - * @@, Reminder shown manually - * - @@ + * ````, Reminder text hidden, by default + * ````, Reminder text shown, by default + * ````, Reminder hidden manually + * ````, Reminder shown manually + * - ```` - A separator between fields. This tag is automatically inserted by the [[fun:combined_editor]] function.
    Inserting this tag manually will confuse that function!
    This tag can never be selected, and its contents can not be edited. - * - @@ + * - ```` - At the beginning of a string, indicates a part that can not be selected. This tag is automatically inserted by the [[fun:combined_editor]] function. - * - @@ + * - ```` - At the end of a string, indicates a part that can not be selected. This tag is automatically inserted by the [[fun:combined_editor]] function. - * - @@ - - Like @@, only hidden. This is inserted by [[fun:combined_editor]] - * - @@ - - Text who's width is ignored for alignment, similar to @@, but not a separator. - * - @@ + * - ```` + - Like ````, only hidden. This is inserted by [[fun:combined_editor]] + * - ```` + - Text who's width is ignored for alignment, similar to ````, but not a separator. + * - ```` - Indicate that the text inside the tag should be selected from a [[type:word list]]. The ??? must be the name of a word list in the game. - * - @@ + * - ```` - The text inside the tag is an error, and is shown with a red wavy underline. - * - @@ + * - ```` - A spelling error, marked by the [[fun::check_spelling]] function. The ??? part indicates the language used for spelling checking. * - any other tag - Other tags are ignored. ---Related functions-- +**Related functions** The following script functions deal with tags: .. list-table:: @@ -4237,8 +4242,8 @@ Localized String A 'localized string' is a [[type:map]] of [[type::string]]s, indexed by locale name. It is used to translate games and stylesheets to other user interface languages. -Localized strings can be given with a @localized@ prefix on the property name. -For example, a field has a @description@ which is a [[type::string]], and a @localized_description@ for localized variants. So +Localized strings can be given with a ``localized`` prefix on the property name. +For example, a field has a ``description@ which is a [[type::string]], and a @localized_description`` for localized variants. So .. code-block:: @@ -4270,9 +4275,9 @@ There are two types of filenames, relative and absolute: * - /package/path/to/file - An absolute filename includes the name of the package. This is a package somewhere in the MSE data directory. -Don't forget the double quotes (@""@) in scripts. +Don't forget the double quotes (``""``) in scripts. ---Dependencies-- +**Dependencies** When using an absolute filename to refer to a file from another [[file:package]], the [[type:dependency]] on that package must be declared. For example, @@ -4292,12 +4297,12 @@ Will give a warning message, unless the file also lists Dependency __________ ---Overview-- +**Overview** [[type:Package]]s can depend on other packages. For example a [[type:stylesheet]] needs a particular version of the corresponding [[type:game]] package, and maybe some additional [[type:include]]s. ---Properties-- +**Properties** .. list-table:: :header-rows: 1 @@ -4307,16 +4312,16 @@ For example a [[type:stylesheet]] needs a particular version of the correspondin * - Property - Type - Description - * - @package@ + * - ``package`` - [[type:string]] - Filename of the package this package depends on. - * - @version@ + * - ``version`` - [[type:version]] - Minimal version of that package that is required. The two properties can also be written on a single line, separated by a space (see the examples). ---Example-- +**Example** The magic-new stylesheet depends on a particular version of the game file: .. code-block:: @@ -4339,7 +4344,7 @@ Regular expressions (regexes) are things that can match parts of [[type:string]] Regexes are represented by normal [[type:string]]s. Note that to escape something in a regex the backslash is used, in script code this also needs to be escaped. -For example, in a script, the regex matching a single backslash is @"\\\\"@. +For example, in a script, the regex matching a single backslash is ``"\\\\"``. For more information, see [[http://www.wxwidgets.org/manuals/stable/wx_wxresyn.html|the wxWidgets regular expression documentation]]. @@ -4348,61 +4353,61 @@ For more information, see Boolean ~~~~~~~ -A boolean is either @true@ or @false@. +A boolean is either ``true@ or @false``. -In a script, numbers are implicitly converted to booleans, a non-zero number is @true@, 0 is @false@. +In a script, numbers are implicitly converted to booleans, a non-zero number is ``true@, 0 is @false``. -When converted to a number, @true@ becomes @1@ and @false@ becomes @0@. +When converted to a number, ``true@ becomes @1@ and @false@ becomes @0``. -The strings @"yes"@ and @"no"@ can also be converted to booleans. +The strings ``"yes"@ and @"no"`` can also be converted to booleans. ---File syntax-- +**File syntax** .. code-block:: boolean: true boolean: false ---Script syntax-- +**Script syntax** .. code-block:: true or false -The operators @or@, @and@ and @xor@ combine two booleans: +The operators ``or@, @and@ and @xor`` combine two booleans: .. list-table:: :header-rows: 1 :stub-columns: 1 :align: left - * - @a@ - - @b@ + * - ``a`` + - ``b`` - a or b - a and b - a xor b - * - @false@ - - @false@ - - @false@ - - @false@ - - @false@ - * - @false@ - - @true@ - - @true@ - - @false@ - - @true@ - * - @true@ - - @false@ - - @true@ - - @false@ - - @true@ - * - @true@ - - @true@ - - @true@ - - @true@ - - @false@ - ---See also-- + * - ``false`` + - ``false`` + - ``false`` + - ``false`` + - ``false`` + * - ``false`` + - ``true`` + - ``true`` + - ``false`` + - ``true`` + * - ``true`` + - ``false`` + - ``true`` + - ``false`` + - ``true`` + * - ``true`` + - ``true`` + - ``true`` + - ``true`` + - ``false`` + +**See also** .. list-table:: :header-rows: 1 @@ -4419,19 +4424,19 @@ Int Integer numbers are numbers without a decimal point. In many cases negative numbers don't make sense, but the program never complains about them. ---File syntax-- +**File syntax** .. code-block:: something: 123 ---Script syntax-- +**Script syntax** .. code-block:: 123 + 456 * -1 ---See also-- +**See also** .. list-table:: :header-rows: 1 @@ -4451,20 +4456,20 @@ Real or floating point numbers are numbers with a decimal point. Conversion from integer to real numbers happens automatically in scripting. ---File syntax-- +**File syntax** .. code-block:: something: 123 something: 0.5 ---Script syntax-- +**Script syntax** .. code-block:: 123.1 + 456 * -1 ---See also-- +**See also** .. list-table:: :header-rows: 1 @@ -4480,13 +4485,13 @@ Conversion from integer to real numbers happens automatically in scripting. Version ~~~~~~~ ---File syntax-- +**File syntax** A version number consists of three components, in the form "a.b.c". Higher numbers mean newer versions. The version number can also be a date, of the form "YYYY-MM-DD" ---Examples-- +**Examples** .. code-block:: @@ -4497,27 +4502,27 @@ The version number can also be a date, of the form "YYYY-MM-DD" Color ~~~~~ ---Syntax-- +**Syntax** In files and scritps a color can be represented as
    rgb(red_component, green_component, blue_component)
    where red_component, green_component and blue_component are numbers between 0 and 255 (inclusive). In most places MSE also supports colors with a transparency value, notated as
    rgba(red_component, green_component, blue_component, alpha_component)
    -An alpha value of @0@ indicates a transparent color, an alpha value of @255@ is completely opaque. +An alpha value of ``0@ indicates a transparent color, an alpha value of @255`` is completely opaque. You can also use HTML style hexadecimal colors,
    #rgb, #rgba, #rrggbb, #rrggbbaa
    For example, #ff0000 is red, as is #f00 ---Named colors-- -MSE also supports named colors, for instance @"white"@ is the same as @rgb(255,255,255)@. +**Named colors** +MSE also supports named colors, for instance ``"white"@ is the same as @rgb(255,255,255)``. For a full list of supported colors, see [[https://docs.wxwidgets.org/3.0/classwx_colour_database.html|the wxWidgets documentation]]. -In addition, the named color @"transparent"@ stands for the completely transparent color, @rgba(0,0,0,0)@. +In addition, the named color ``"transparent"@ stands for the completely transparent color, @rgba(0,0,0,0)``. In scripts named colors are represented as [[type:string]]s. ---Examples-- +**Examples** For example: .. list-table:: @@ -4528,32 +4533,32 @@ For example: * - Code - Represents - <<< - * - @rgb(255,255,255)@ + * - ``rgb(255,255,255)`` - white -
    - * - @rgb(0,0,0)@ + * - ``rgb(0,0,0)`` - black -
    - * - @rgb(255,0,0)@ + * - ``rgb(255,0,0)`` - red -
    - * - @rgb(0,255,0)@ + * - ``rgb(0,255,0)`` - green -
    - * - @rgb(0,0,255)@ + * - ``rgb(0,0,255)`` - blue -
    - * - @rgba(0,0,0,0)@ + * - ``rgba(0,0,0,0)`` - transparent -
    over
    - * - @rgba(255,0,0,128)@ + * - ``rgba(255,0,0,128)`` - transparent red -
    over
    - * - @rgba(0,0,255,192)@ + * - ``rgba(0,0,255,192)`` - transparent blue -
    over
    ---See also-- +**See also** * - [[fun:to_color]] - Convert any value to a color @@ -4565,13 +4570,13 @@ DOC_MSE_VERSION: since 0.3.8 A point in time, consisting of a date and a time. The file syntax uses [[http://en.wikipedia.org/wiki/ISO_8601|ISO 8601]] notation. ---File syntax-- +**File syntax** .. code-block:: something: 2008-12-31 23:59:59 ---See also-- +**See also** .. list-table:: :header-rows: 1 @@ -4590,7 +4595,7 @@ Choice A possible choice for a choice [[type:field]]. ---Properties-- +**Properties** .. list-table:: :header-rows: 1 @@ -4601,35 +4606,35 @@ A possible choice for a choice [[type:field]]. - Type - Default - Description - * - @name@ + * - ``name`` - [[type:string]] - ''Required'' - Name of this choice, displayed in the drop down list. - * - @line below@ + * - ``line below`` - [[type:boolean]] - - @false@ + - ``false`` - Display a line below this item? - * - @group choice@ + * - ``group choice`` - [[type:string]] - ''no'' - Can this submenu of choices itself be selected? - * - @choices@ + * - ``choices`` - [[type:list]] of [[type:choice]]s - - Submenu of choices. - * - @enabled@ + * - ``enabled`` - [[type:scriptable]] [[type:boolean]] - - Is this choice selectable? - * - @type@ - - @"check"@ or @"radio"@ - - @"check"@ + * - ``type`` + - ``"check"@ or @"radio"`` + - ``"check"`` - How should this choice be displayed? As a checkbox or a radio box?
    Only applies to multiple choice fields. A choice can also be given in a short form, in that case only the name is specified. ---Names-- +**Names** The full name of a choice is that of the choice and its parents, separated by spaces. This is the value actually stored in values and manipulated by scripts. @@ -4650,10 +4655,10 @@ For example choice: green choice: yellow -The choice red is called @"large red"@, while green is @"small green"@. -The group choice 'just small' gets the name of the group, @"small"@. +The choice red is called ``"large red"@, while green is @"small green"``. +The group choice 'just small' gets the name of the group, ``"small"``. ---Example-- +**Example** In short form: .. code-block:: @@ -4671,7 +4676,7 @@ Color Choice A possible choice for a color [[type:field]]. ---Properties-- +**Properties** .. list-table:: :header-rows: 1 @@ -4681,14 +4686,14 @@ A possible choice for a color [[type:field]]. * - Property - Type - Description - * - @name@ + * - ``name`` - [[type:string]] - Name of this choice, displayed in the drop down list. - * - @color@ + * - ``color`` - opaque [[type:color]] - Color this choice corresponds with. ---Example-- +**Example** .. code-block:: @@ -4705,10 +4710,10 @@ AKA: Two Dimensional Vector A coordinate or direction in a symbol. This is a pair of [[type:double]]s. -The coordinates are usually in the range @0@ to @1@. -@(0,0)@ is the top-left of the symbol, @(1,1)@ the bottom-right. +The coordinates are usually in the range ``0@ to @1``. +``(0,0)@ is the top-left of the symbol, @(1,1)`` the bottom-right. ---File syntax-- +**File syntax** .. code-block:: @@ -4719,7 +4724,7 @@ For example (0.5,0.5) ---Script syntax-- +**Script syntax** Vectors can not be represented in script syntax. From 1372c1fa4659309bb76e3376e450ceb2d8ce4044 Mon Sep 17 00:00:00 2001 From: Brendan Hagan Date: Wed, 31 Aug 2022 20:34:11 -0400 Subject: [PATCH 18/24] add autosectionlabel, change language to julia --- docs/conf.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 988f9100..c222625e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -13,6 +13,10 @@ 'style_nav_header_background': '#2175bc', } +extensions = [ + 'sphinx.ext.autosectionlabel', +] + # html_static_path = ['_static'] # html_css_files = [ # 'css/custom.css' @@ -23,5 +27,5 @@ # Trying to use a dummy lanaguage to test highlighting. # It looks like it'll be possible to define a custom Lexer language type... -highlight_language = 'sh' +highlight_language = 'julia' pygments_style = 'monokai' From 70b456029eb1ba58f9e417a45c3cbe664d320717 Mon Sep 17 00:00:00 2001 From: Brendan Hagan Date: Wed, 31 Aug 2022 20:52:41 -0400 Subject: [PATCH 19/24] custom css --- docs/_static/css/custom.css | 17 +++++++++++++++++ docs/conf.py | 8 ++++---- 2 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 docs/_static/css/custom.css diff --git a/docs/_static/css/custom.css b/docs/_static/css/custom.css new file mode 100644 index 00000000..308d5f91 --- /dev/null +++ b/docs/_static/css/custom.css @@ -0,0 +1,17 @@ +.wy-nav-content { + max-width: 1200px; +} + + +.rst-content code, .rst-content tt, code { + font-size: 85%; +} + +.rst-content h1, +.rst-content h2, +.rst-content h3, +.rst-content h4, +.rst-content h5, +.rst-content h6 { + margin-left: -0.8em; +} diff --git a/docs/conf.py b/docs/conf.py index c222625e..4a646735 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -17,10 +17,10 @@ 'sphinx.ext.autosectionlabel', ] -# html_static_path = ['_static'] -# html_css_files = [ -# 'css/custom.css' -# ] +html_static_path = ['_static'] +html_css_files = [ + 'css/custom.css' +] # html_js_files = [ # 'js/custom.js' # ] From ced480ff39cc67dec8b097d02a5bc3fa4918ac0f Mon Sep 17 00:00:00 2001 From: Brendan Hagan Date: Wed, 31 Aug 2022 21:11:39 -0400 Subject: [PATCH 20/24] misc: initial doc/ref adjustments? --- docs/type/index.rst | 1080 +++++++++++++++++++++---------------------- 1 file changed, 540 insertions(+), 540 deletions(-) diff --git a/docs/type/index.rst b/docs/type/index.rst index 6c3b79c3..362f6f39 100644 --- a/docs/type/index.rst +++ b/docs/type/index.rst @@ -2,7 +2,7 @@ Data Types ============ Magic Set Editor uses many data types in the files and in scripting. -There are for instance [[type:card]]s in [[type:set]]s, [[type:stylesheet]]s describing the layout of [[type:field]]s, etc. +There are for instance :ref:`card`s in :ref:`set`s, :ref:`stylesheet`s describing the layout of :ref:`field`s, etc. 1. :doc:`set <#set>` 2. :ref:`set` @@ -12,32 +12,32 @@ There are for instance [[type:card]]s in [[type:set]]s, [[type:stylesheet]]s des File Types ---------- -These are the 'major' data types that are written directly to [[file:packages]]. +These are the 'major' data types that are written directly to :doc:`/file/packages`. .. list-table:: :header-rows: 0 :stub-columns: 1 :align: left - * - :doc:`Game <#game>` + * - :ref:`game` - What information is on each card? - * - :doc:`Stylesheet <#stylesheet>` + * - :ref:`stylesheet` - What do cards look like? - * - :doc:`Set <#set>` + * - :ref:`set` - Sets of cards. - * - :ref:`Symbol font ` + * - :ref:`symbol font` - Fonts consisting of symbols, for instance mana symbols. - * - :ref:`Export template ` + * - :ref:`export template` - How to export sets to HTML files? - * - :doc:`Locale <#Locale>` + * - :ref:`locale` - Translations of MSE. - * - :doc:`Include <#Include>` + * - :ref:`include` - Files to include in other templates. - * - :doc:`Installer <#Installer>` + * - :ref:`installer` - Installers containing several packages. - * - :doc:`Symbol <#Symbol>` + * - :ref:`symbol` - Expansion symbols. - * - :doc:`Settings <#Settings>` + * - :ref:`settings` - MSE settings. Game @@ -45,7 +45,7 @@ Game **Overview** -Games are part of the [[file:style triangle]]: +Games are part of the :doc:`/file/style triangle`: .. list-table:: :header-rows: 1 @@ -56,18 +56,18 @@ Games are part of the [[file:style triangle]]: - Looks - Data * - '''Game''' - - [[type:Stylesheet]] - - [[type:Set]] - * - [[type:Field]] - - [[type:Style]] - - [[type:Value]] + - :ref:`Stylesheet` + - :ref:`Set` + * - :ref:`Field` + - :ref:`Style` + - :ref:`Value` Games provide the ''description'', i.e. what kinds of things are on a card. **Package format** -A game is described in a [[file:package]] with the .mse-game file extension. -Such a package contains a [[file:format|data file]] called game that has the following properties. +A game is described in a :doc:`/file/package` with the .mse-game file extension. +Such a package contains a :doc:`/file/format|data file` called game that has the following properties. **Properties** @@ -85,97 +85,97 @@ Such a package contains a [[file:format|data file]] called game that ha - <<< - <<< * - ``mse version`` - - [[type:version]] + - :ref:`version` - ''required'' - Version of MSE this game is made for. * - ``short name`` - - [[type:string]] + - :ref:`string` - file name - A short name of this game, for the 'new set' list. * - ``full name`` - - [[type:string]] + - :ref:`string` - file name - A longer name of this game. * - ``icon`` - - [[type:filename]] + - :ref:`filename` - ''none'' - Filename of an icon / preview for this game, for the 'new set' list. * - ``position hint`` - - [[type:int]] + - :ref:`int` - ∞ - Where to place this item in the 'new set' list? Lower numbers come first. * - ``version`` - - [[type:version]] + - :ref:`version` - ``0.0.0`` - Version number of this package. * - ``depends on`` - - [[type:list]] of [[type:dependency]]s + - :ref:`list` of :ref:`dependency`s Packages this package depends on. * - '''Specific to games''' - <<< - <<< - <<< * - ``init script`` - - [[type:script]] + - :ref:`script` - ``;`` - Script to run when this game is loaded,
    can set variables to be used by other scripts in this game or stylesheets using it. * - ``set fields`` - - [[type:list]] of [[type:field]]s + - :ref:`list` of :ref:`field`s - - Fields for the styling panel. * - ``default set style`` - - [[type:indexmap]] of [[type:style]]s + - :ref:`indexmap` of :ref:`style`s - - Default style for the set fields, can be overridden by the stylesheet. * - ``card fields`` - - [[type:list]] of [[type:field]]s + - :ref:`list` of :ref:`field`s - - Fields for each card. * - ``card list color script`` - - [[type:script]] + - :ref:`script` - from fields - Script that determines the color of an item in the card list.
    If not set uses the ``card list colors`` property of the first card field that has it. * - ``statistics dimensions`` - - [[type:list]] of [[type:statistics dimension]]s + - :ref:`list` of :ref:`statistics dimension`s - from fields - Dimensions for statistics, a dimension is roughly the same as an axis.
    By default all card fields with 'show statistics' set to true are used. * - ``statistics categories`` - - [[type:list]] of [[type:statistics category]]s + - :ref:`list` of :ref:`statistics category`s - from dimensions - DOC_MSE_VERSION: not used since 0.3.6 Choices shown on the statistics panel.
    By default all statistics dimensions are used. * - ``pack types`` - - [[type:list]] of [[type:pack type]]s + - :ref:`list` of :ref:`pack type`s - - DOC_MSE_VERSION: since 0.3.7 The types of card packs that will be listed on the random booster panel. * - ``has keywords`` - - [[type:boolean]] + - :ref:`boolean` - ``false`` - Does this game use keywords? Should the keywords tab be available? * - ``keyword match script`` - - [[type:script]] + - :ref:`script` - ``;`` - Script to apply to the ``match`` property of keywords. * - ``keyword modes`` - - [[type:list]] of [[type:keyword mode]]s + - :ref:`list` of :ref:`keyword mode`s - - Choices for the 'mode' property of keywords. * - ``keyword parameter types`` - - [[type:list]] of [[type:keyword param type]]s + - :ref:`list` of :ref:`keyword param type`s - - Types of parameters available to keywords. * - ``keywords`` - - [[type:list]] of [[type:keyword]]s + - :ref:`list` of :ref:`keyword`s - - Standard keywords for this game. * - ``word lists`` - - [[type:list]] of [[type:word list]]s + - :ref:`list` of :ref:`word list`s - - Word lists that can be used by text fields. * - ``add cards script`` - - [[type:list]] of [[type:add cards script]]s + - :ref:`list` of :ref:`add cards script`s - - DOC_MSE_VERSION: since 0.3.7 A list of scripts for conveniently adding multiple cards to a set. @@ -188,7 +188,7 @@ Stylesheet **Overview** -Stylesheets are part of the [[file:style triangle]]: +Stylesheets are part of the :doc:`/file/style triangle`: .. list-table:: :header-rows: 1 @@ -198,17 +198,17 @@ Stylesheets are part of the [[file:style triangle]]: * - Description - Looks - Data - * - [[type:Game]] + * - :ref:`Game` - '''Stylesheet''' - - [[type:Set]] - * - [[type:Field]] - - [[type:Style]] - - [[type:Value]] + - :ref:`Set` + * - :ref:`Field` + - :ref:`Style` + - :ref:`Value` Stylesheets provide the ''look and feel'' of cards. **Package format** -A stylesheet is described in a [[file:package]] with the .mse-style file extension, +A stylesheet is described in a :doc:`/file/package` with the .mse-style file extension, such a package contains a data file called style. **Properties** @@ -227,31 +227,31 @@ such a package contains a data file called style. - <<< - <<< * - ``mse version`` - - [[type:version]] + - :ref:`version` - ''required'' - Version of MSE this stylesheet is made for. * - ``short name`` - - [[type:string]] + - :ref:`string` - file name - A short name of this stylesheet, for the 'new set' and style panel lists. * - ``full name`` - - [[type:string]] + - :ref:`string` - file name - A longer name of this stylesheet. * - ``icon`` - - [[type:filename]] + - :ref:`filename` - ''none'' - Filename of an icon / preview for this stylesheet, for the 'new set' and style panel lists. * - ``position hint`` - - [[type:int]] + - :ref:`int` - ∞ - Where to place this item in the list? Lower numbers come first. * - ``version`` - - [[type:version]] + - :ref:`version` - ``0.0.0`` - Version number of this package. * - ``depends on`` - - [[type:list]] of [[type:dependency]]s + - :ref:`list` of :ref:`dependency`s Packages this package depends on. * - '''Specific to stylesheets''' @@ -259,52 +259,52 @@ such a package contains a data file called style. - <<< - <<< * - ``game`` - - Name of a [[type:game]] + - Name of a :ref:`game` - ''required'' - Game this stylesheet is made for * - ``card width`` - - [[type:double]] + - :ref:`double` - 100 - Width of cards in pixels * - ``card height`` - - [[type:double]] + - :ref:`double` - 100 - Height of cards in pixels * - ``card dpi`` - - [[type:double]] + - :ref:`double` - 96 - Resolution of cards in dots-per-inch * - ``card background`` - - [[type:color]] + - :ref:`color` - white - Background color of cards * - ``init script`` - - [[type:script]] + - :ref:`script` - ``;`` - Script to run when this stylesheet is loaded, after the game's init script. * - ``styling fields`` - - [[type:list]] of [[type:field]]s + - :ref:`list` of :ref:`field`s - - Fields for styling options, shown on the 'style' panel. * - ``styling style`` - - [[type:indexmap]] of [[type:style]]s + - :ref:`indexmap` of :ref:`style`s - - Styles for the styling fields. * - ``set info style`` - - [[type:indexmap]] of [[type:style]]s + - :ref:`indexmap` of :ref:`style`s - game.default_set_style - Styling for the 'set info' panel * - ``card style`` - - [[type:indexmap]] of [[type:style]]s + - :ref:`indexmap` of :ref:`style`s - - Styles for the card fields defined in the game * - ``extra card fields`` - - [[type:list]] of [[type:field]]s + - :ref:`list` of :ref:`field`s - - Additional fields to add to each card.
    These fields are intended for things like lines and boxes, whose value is determined automatically. * - ``extra card style`` - - [[type:indexmap] of [[type:style]]s + - :ref:`indexmap] of :ref:`style`s - - Styling for the extra card fields @@ -313,7 +313,7 @@ Set **Overview** -Sets are part of the [[file:style triangle]]: +Sets are part of the :doc:`/file/style triangle`: .. list-table:: :header-rows: 1 @@ -323,15 +323,15 @@ Sets are part of the [[file:style triangle]]: * - Description - Looks - Data - * - [[type:Game]] - - [[type:Stylesheet]] + * - :ref:`Game` + - :ref:`Stylesheet` - '''Set''' - * - [[type:Field]] - - [[type:Style]] - - [[type:Value]] + * - :ref:`Field` + - :ref:`Style` + - :ref:`Value` **Package format** -A set is described in a [[file:package]] with the .mse-set file extension, +A set is described in a :doc:`/file/package` with the .mse-set file extension, such a package contains a data file called set. **Properties** @@ -350,48 +350,48 @@ such a package contains a data file called set. - <<< - <<< * - ``mse version`` - - [[type:version]] + - :ref:`version` - ''required'' - Version of MSE this set is made with. * - ``short name`` - - [[type:string]] + - :ref:`string` - file name - Name of this set. * - ``depends on`` - - [[type:list]] of [[type:dependency]]s + - :ref:`list` of :ref:`dependency`s Packages this package depends on. * - '''Specific to sets''' - <<< - <<< - <<< * - ``game`` - - Name of a [[type:game]] + - Name of a :ref:`game` - ''required'' - The game this set is made for. * - ``stylesheet`` - - Name of a [[type:stylesheet]] + - Name of a :ref:`stylesheet` - ''required'' - The default style for drawing cards in this set.
    This is without the game name or extension, so ``"new"@ refers to the package @"gamename-new.mse-style"``. * - ``set info`` - - [[type:indexmap]] of [[type:value]]s + - :ref:`indexmap` of :ref:`value`s - - - The data for the [[prop:game:set fields]] defined in the game. + - The data for the [[prop:game:set fields` defined in the game. * - ``styling`` - - [[type:map]] of [[type:indexmap]]s of [[type:value]]s + - :ref:`map` of :ref:`indexmap`s of :ref:`value`s Data for the 'extra fields' of the stylesheet.
    This is first indexed by stylesheet name, then by field name.
    Data is given not only for the set's stylesheet but also for those of cards. * - ``cards`` - - [[type:list] of [[type:card]]s + - :ref:`list] of :ref:`card`s - - The cards in the set. * - ``keywords`` - - [[type:list] of [[type:keyword]]s + - :ref:`list] of :ref:`keyword`s - - The custom keywords in the set. * - ``pack types`` - - [[type:list]] of [[type:pack type]]s + - :ref:`list` of :ref:`pack type`s - - DOC_MSE_VERSION: since 0.3.8 The custom card pack types in the set. @@ -443,7 +443,7 @@ A type of card packs. For instance "booster" and "tournament pack" are card pack A pack type contains either: * a filter for selecting the desired kind of cards from the set. -* one or more [[type:pack item]]s, indicating what kinds and how many cards are in the pack. +* one or more :ref:`pack item`s, indicating what kinds and how many cards are in the pack. * a combination of the above. **Properties** @@ -458,7 +458,7 @@ A pack type contains either: - Default - Description * - ``name`` - - [[type:string]] + - :ref:`string` - - Name of this card pack type. Other pack types can refer to this name. @@ -467,24 +467,24 @@ A pack type contains either: - see below - How are instances of this pack generated? * - ``enabled`` - - [[type:scriptable]] [[type:boolean]] + - :ref:`scriptable` :ref:`boolean` - ``true`` - Is this pack type enabled, i.e. can the user select it? * - ``selectable`` - - [[type:boolean]] + - :ref:`boolean` - ``true`` - Is this pack selectable from the list of packs in the user interface? * - ``summary`` - - [[type:boolean]] + - :ref:`boolean` - ``true`` - Is a summary of the total number of cards shown in the second panel in the user interface?
    Note: this only applies to pack types that have the ``filter`` property set. * - ``filter`` - - [[type:script]] + - :ref:`script` - ''optional'' - Condition that a card must satisfy to be included in this pack type. * - ``items`` - - [[type:list]] of [[type:pack item]]s + - :ref:`list` of :ref:`pack item`s - - The items to include in this pack. @@ -610,7 +610,7 @@ DOC_MSE_VERSION: since 0.3.8 **Overview** -A reference to another [[type:pack type]], from which one or more cards are chosen. +A reference to another :ref:`pack type`, from which one or more cards are chosen. **Properties** @@ -624,15 +624,15 @@ A reference to another [[type:pack type]], from which one or more cards are chos - Default - Description * - ``name`` - - Name of a [[type:pack item]] + - Name of a :ref:`pack item` - ''required'' - Name of the pack item to include in this pack. * - ``amount`` - - [[type:scriptable]] [[type:int]] + - :ref:`scriptable` :ref:`int` - 1 - How many of those cards are in the pack? * - ``weight`` - - [[type:scriptable]] [[type:double]] + - :ref:`scriptable` :ref:`double` - 1 - How 'important' is this item? Items with a higher weight will be chosen more often. @@ -646,7 +646,7 @@ A reference to another [[type:pack type]], from which one or more cards are chos name: common amount: 11 -Include 11 commons in this [[type:pack type|pack]]. +Include 11 commons in this :ref:`pack type|pack`. .. code-block:: @@ -661,9 +661,9 @@ Symbol Font **Overview** A symbol font is a font for drawing with images. -Each [[type:symbol font symbol|symbol-font-symbol]] in the font is an image. +Each :ref:`symbol font symbol|symbol-font-symbol` in the font is an image. -A symbol font is referenced in [[type:stylesheet]]s using a [[type:symbol font reference]]. +A symbol font is referenced in :ref:`stylesheet`s using a :ref:`symbol font reference`. **Splitting** @@ -690,8 +690,8 @@ is specified, and the symbol is rendered at 12pt, the margin will be ``12*0.1 == **Package format** -A symbol font is described in a [[file:package]] with the .mse-symbol-font file extension. -Such a package contains a [[file:format|data file]] called symbol-font that has the following properties. +A symbol font is described in a :doc:`/file/package` with the .mse-symbol-font file extension. +Such a package contains a :doc:`/file/format|data file` called symbol-font that has the following properties. **Properties** @@ -709,54 +709,54 @@ Such a package contains a [[file:format|data file]] called symbol-font - <<< - <<< * - ``mse version`` - - [[type:version]] + - :ref:`version` - ''required'' - Version of MSE this symbol font is made for. * - ``short name`` - - [[type:string]] + - :ref:`string` - file name - A short name of this symbol font, currently not used by the program. * - ``full name`` - - [[type:string]] + - :ref:`string` - file name - A longer name of this symbol font, currently not used by the program. * - ``icon`` - - [[type:filename]] + - :ref:`filename` - ''none'' - Filename of an icon, currently not used by the program. * - ``version`` - - [[type:version]] + - :ref:`version` - ``0.0.0`` - Version number of this package. * - ``depends on`` - - [[type:list]] of [[type:dependency]]s + - :ref:`list` of :ref:`dependency`s Packages this package depends on. * - '''Specific to symbol fonts''' - <<< - <<< - <<< * - ``image font size`` - - [[type:double]] + - :ref:`double` - ``12`` - To what point size do the images correspond? * - ``horizontal space`` - - [[type:double]] + - :ref:`double` - ``0`` - Horizontal spacing between symbols, in pixels. * - ``vertical space`` - - [[type:double]] + - :ref:`double` - ``0`` - Vertical spacing between symbols, in pixels. * - ``symbols`` - - [[type:list]] of [[type:symbol font symbol]]s + - :ref:`list` of :ref:`symbol font symbol`s - - Symbols that make up this font. * - ``scale text`` - - [[type:boolean]] + - :ref:`boolean` - ``false`` - Should text be scaled down to fit in a symbol? * - ``insert symbol menu`` - - [[type:insert symbol menu|"insert symbol" menu]] + - :ref:`insert symbol menu|"insert symbol" menu` - ''none'' - A description of the menu to insert a symbol into the text. @@ -768,9 +768,9 @@ _____________________ **Overview** -A reference to a [[type:symbol font]]. +A reference to a :ref:`symbol font`. -In [[type:stylesheet]]s the symbol fonts are not included inline, instead they are referenced by their package name. +In :ref:`stylesheet`s the symbol fonts are not included inline, instead they are referenced by their package name. **Properties** @@ -784,18 +784,18 @@ In [[type:stylesheet]]s the symbol fonts are not included inline, instead they a - Default - Description * - ``name`` - - [[type:scriptable]] Name of a [[type:symbol font]] + - :ref:`scriptable` Name of a :ref:`symbol font` ''required'' Name of the symbol font package to use (without the extension). * - ``size`` - - [[type:scriptable]] [[type:double]] + - :ref:`scriptable` :ref:`double` - 12 - Size in points to render the symbols with. * - ``scale down to`` - - [[type:double]] + - :ref:`double` - 1 - Minimum size in points to scale the size down to. * - ``alignment`` - - [[type:scriptable]] [[type:alignment]] + - :ref:`scriptable` :ref:`alignment` - ``"middle center"`` - Alignment of symbols in a line of text. @@ -821,7 +821,7 @@ __________________ **Overview** -A single symbol in a [[type:symbol font]]. +A single symbol in a :ref:`symbol font`. **Properties** @@ -835,53 +835,53 @@ A single symbol in a [[type:symbol font]]. - Default - Description * - ``image font size`` - - [[type:double]] + - :ref:`double` - value from symbol font - To what point size does the images correspond? * - ``code`` - - [[type:string]] or [[type:regex]] + - :ref:`string` or :ref:`regex` - ''required'' - Text this symbol matches. * - ``regex`` - - [[type:boolean]] + - :ref:`boolean` - ``false`` - Is the code a regular expression (as opposed to a string)? * - ``image`` - - [[type:scriptable]] [[type:image]] + - :ref:`scriptable` :ref:`image` - ''required'' - Image of this symbol. * - ``enabled`` - - [[type:scriptable]] [[type:boolean]] + - :ref:`scriptable` :ref:`boolean` - ``true`` - Is this symbol actually used?
    This can be scripted to optionally disable certain symbols.
    If multiple symbols with the same code are given disabling the first switches to the second one. * - ``draw text`` - - [[type:int]] + - :ref:`int` - ``-1`` - The index of the captured regex expression to draw as text, or -1 to not draw text.
    For example with the code ``"x([a-z])"@ and @draw text: 1@ the text of the symbol @"xb"@ will be @"b"``. * - ``text font`` - - [[type:font]] + - :ref:`font` - - Font to use for drawing text on symbols. The font size is in font points per text box font point. * - ``text alignment`` - - [[type:alignment]] + - :ref:`alignment` - ``"middle center"`` - How should text be aligned on the symbol? * - ``text margin left`` - - [[type:double]] + - :ref:`double` - ``0`` - Margin on the left of the text in pixels per point. * - ``text margin right`` - - [[type:double]] + - :ref:`double` - ``0`` - Margin on the right of the text in pixels per point. * - ``text margin top`` - - [[type:double]] + - :ref:`double` - ``0`` - Margin on the top of the text in pixels per point. * - ``text margin bottom`` - - [[type:double]] + - :ref:`double` - ``0`` - Margin on the bottom of the text in pixels per point. @@ -897,7 +897,7 @@ A symbol with text: regex: true text font: Arial -Two symbols for the same code, which one is used depends on a function from the [[type:stylesheet]]. +Two symbols for the same code, which one is used depends on a function from the :ref:`stylesheet`. It is recommended to only use functions in ``enabled``, so each stylesheet can determine how the font should be used. .. code-block:: @@ -916,7 +916,7 @@ __________________ **Overview** -A description of the "Insert symbol" menu for a specific [[type:symbol font]]. +A description of the "Insert symbol" menu for a specific :ref:`symbol font`. The menu consists of a number of entries, either items, separators or submenus. @@ -940,19 +940,19 @@ The menu consists of a number of entries, either items, separators or submenus. * ``line``, a separating line. * ``submenu``, a submenu. * - ``name`` - - [[type:string]] + - :ref:`string` - ''required'' - Name of this menu item, corresponding to the code to insert. * - ``label`` - - [[type:localized string]] + - :ref:`localized string` - name - Label to show in the menu. * - ``prompt`` - - [[type:localized string]] + - :ref:`localized string` - - Prompt to use for the pop up box with ``custom`` type * - ``items`` - - [[type:list]] of [[type:insert symbol menu|submenu items]] + - :ref:`list` of :ref:`insert symbol menu|submenu items` - - Items in the submenu, when items are present the ``type@ is set to @"submenu"``. @@ -997,9 +997,9 @@ Export Template An export template describes a way for a set to be exported to a HTML or other text files. **Package format** -An export template is described in a [[file:package]] with the .mse-export-template file extension. +An export template is described in a :doc:`/file/package` with the .mse-export-template file extension. Its name should begin with game- where game is the name of the game the template is made for. -It should contain a [[file:format|data file]] called export-template with the following properties. +It should contain a :doc:`/file/format|data file` called export-template with the following properties. **Properties** @@ -1017,59 +1017,59 @@ It should contain a [[file:format|data file]] called export-template wi - <<< - <<< * - ``mse version`` - - [[type:version]] + - :ref:`version` - ''required'' - Version of MSE this export template is made for. * - ``short name`` - - [[type:string]] + - :ref:`string` - file name - A short name of this export template, for the 'new set' and style panel lists. * - ``full name`` - - [[type:string]] + - :ref:`string` - file name - A longer name of this export template. * - ``icon`` - - [[type:filename]] + - :ref:`filename` - ''none'' - Filename of an icon / preview for this export template, for the 'export to HTML' dialog. * - ``position hint`` - - [[type:int]] + - :ref:`int` - ∞ - Where to place this item in the list? Lower numbers come first. * - ``version`` - - [[type:version]] + - :ref:`version` - ``0.0.0`` - Version number of this package. * - ``depends on`` - - [[type:list]] of [[type:dependency]]s + - :ref:`list` of :ref:`dependency`s Packages this package depends on. * - '''Specific to export template''' - <<< - <<< - <<< * - ``game`` - - Name of a [[type:game]] + - Name of a :ref:`game` - ''required'' - Game this export template is made for * - ``file type`` - - [[type:string]] + - :ref:`string` - ``"HTML files (*.html)|*.html"`` File type to use, this is a list separated by ``|`` characters. Alternatingly, a human description and a file pattern to match are given. * - ``create directory`` - - [[type:boolean]] + - :ref:`boolean` - ``false`` - Should a directory for data files be created? This is required for some script function. * - ``option fields`` - - [[type:list]] of [[type:field]]s + - :ref:`list` of :ref:`field`s - - Fields for additional options to show. * - ``option style`` - - [[type:indexmap]] of [[type:style]]s + - :ref:`indexmap` of :ref:`style`s - - Styling for the ``option fields``. * - ``script`` - - [[type:script]] + - :ref:`script` - - Script that generates the text that will be written to the exported file. @@ -1101,17 +1101,17 @@ The following functions are made specifically for exporting to html: :stub-columns: 1 :align: left - * - [[fun:to_html]] - - Convert [[type:tagged text]] to html. - * - [[fun:symbols_to_html]] - - Convert text to html using a [[type:symbol font]]. - * - [[fun:to_text]] + * - :doc:`/function#to_html` + - Convert :ref:`tagged text` to html. + * - :doc:`/function#symbols_to_html` + - Convert text to html using a :ref:`symbol font`. + * - :doc:`/function#to_text` - Remove all tags from tagged text. - * - [[fun:copy_file]] - - Copy a file from the [[type:export template]] to the output directory. - * - [[fun:write_text_file]] + * - :doc:`/function#copy_file` + - Copy a file from the :ref:`export template` to the output directory. + * - :doc:`/function#write_text_file` - Write a text file to the output directory. - * - [[fun:write_image_file]] + * - :doc:`/function#write_image_file` - Write an image file to the output directory. **Example** @@ -1126,7 +1126,7 @@ A locale gives a translation of the user interface of the program. **Package format** -A locale is described in a [[file:package]] with the .mse-locale file extension. +A locale is described in a :doc:`/file/package` with the .mse-locale file extension. Such a package contains a data file called locale that has the following properties. There are usually no other files in the package. @@ -1146,23 +1146,23 @@ There are usually no other files in the package. - <<< - <<< * - ``mse version`` - - [[type:version]] + - :ref:`version` - ''required'' - Version of MSE this locale is made for. * - ``short name`` - - [[type:string]] + - :ref:`string` - file name - A short name of this locale, for the options dialog. * - ``full name`` - - [[type:string]] + - :ref:`string` - file name - A longer name of this locale. * - ``icon`` - - [[type:filename]] + - :ref:`filename` - ''none'' - Filename of an icon / preview for this locale, currently not used. * - ``version`` - - [[type:version]] + - :ref:`version` - ``0.0.0`` - Version number of this package. * - '''Specific to locales''' @@ -1170,7 +1170,7 @@ There are usually no other files in the package. - <<< - <<< * - ``menu`` - - [[type:map]] of [[type:string]]s + - :ref:`map` of :ref:`string`s - - Translations of menu items.
    Menu items can contain shortcut keys (like Ctrl+C for copy) by using a ''single'' TAB between the text and the shortcut key.
    @@ -1178,55 +1178,55 @@ There are usually no other files in the package. For example >>>new set: &New... Ctrl+N * - ``help`` - - [[type:map]] of [[type:string]]s + - :ref:`map` of :ref:`string`s - - Translations of help texts for the status bar. * - ``tool`` - - [[type:map]] of [[type:string]]s + - :ref:`map` of :ref:`string`s - - Translations of toolbar item texts. * - ``tooltip`` - - [[type:map]] of [[type:string]]s + - :ref:`map` of :ref:`string`s - - Translations of tooltips for toolbar items. * - ``label`` - - [[type:map]] of [[type:string]]s + - :ref:`map` of :ref:`string`s - - Labels of controls in the GUI. * - ``button`` - - [[type:map]] of [[type:string]]s + - :ref:`map` of :ref:`string`s - - Labels of buttons in the GUI. * - ``title`` - - [[type:map]] of [[type:string]]s + - :ref:`map` of :ref:`string`s - - Titles of windows. * - ``action`` - - [[type:map]] of [[type:string]]s + - :ref:`map` of :ref:`string`s - - Names of actions for undo/redo, things like "typing" and "add card". * - ``error`` - - [[type:map]] of [[type:string]]s + - :ref:`map` of :ref:`string`s - - Error messages. * - ``type`` - - [[type:map]] of [[type:string]]s + - :ref:`map` of :ref:`string`s - - Types of objects for error messages. * - ``game`` - - [[type:map]] of [[type:map]] of [[type:string]]s + - :ref:`map` of :ref:`map` of :ref:`string`s Deprecated since MSE 2.1.3, use ``localized_...`` instead.
    - Translations for specific [[type:game]]s.
    + Translations for specific :ref:`game`s.
    Field names and field descriptions are looked up in the locale, if they are found the translation is used, otherwise the value from the game file.
    Extra keys not present in the English locale can be added here. * - ``stylesheet`` - - [[type:map]] of [[type:map]] of [[type:string]]s + - :ref:`map` of :ref:`map` of :ref:`string`s Deprecated since MSE 2.1.3, use ``localized_...`` instead.
    - Translations for specific [[type:stylesheet]]s. + Translations for specific :ref:`stylesheet`s. * - ``symbol font`` - - [[type:map]] of [[type:map]] of [[type:string]]s + - :ref:`map` of :ref:`map` of :ref:`string`s Deprecated since MSE 2.1.3, use ``localized_...`` instead.
    - Translations for specific [[type:symbol font]]s, in particular the "insert symbol" menu. + Translations for specific :ref:`symbol font`s, in particular the "insert symbol" menu. Some of the items can contain placeholders for other values, for example: @@ -1241,7 +1241,7 @@ Look at the ``"en.mse-locale"`` file in the standard MSE distribution for an exa **Translating MSE** To translate the MSE user interface: -* Create a copy of the ``"en.mse-locale"@ directory, name it @"**.mse-locale"@, where @"**"`` is a two or three letter [[http://en.wikipedia.org/wiki/ISO_language_code|ISO language code]]. +* Create a copy of the ``"en.mse-locale"@ directory, name it @"**.mse-locale"@, where @"**"`` is a two or three letter [[http://en.wikipedia.org/wiki/ISO_language_code|ISO language code`. * Open the ``"locale"`` file with Notepad (or another program that supports UTF-8), and translate the strings. * Add new keys for game, stylesheet or symbol font specific keys as described above. * Save the file, select the new locale from Edit->Preferences. @@ -1257,8 +1257,8 @@ Include An include package contains files used by other packages, for example scripts or images. **Package format** -An include package is described in a [[file:package]] with the .mse-include file extension. -It should contain a [[file:format|data file]] called include with the following properties. +An include package is described in a :doc:`/file/package` with the .mse-include file extension. +It should contain a :doc:`/file/format|data file` called include with the following properties. **Properties** @@ -1276,27 +1276,27 @@ It should contain a [[file:format|data file]] called include with the f - <<< - <<< * - ``mse version`` - - [[type:version]] + - :ref:`version` - ''required'' - Version of MSE this include package is made for. * - ``short name`` - - [[type:string]] + - :ref:`string` - file name - A short name of this include package, currently not used. * - ``full name`` - - [[type:string]] + - :ref:`string` - file name - A longer name of this include package, currently not used. * - ``icon`` - - [[type:filename]] + - :ref:`filename` - ''none'' - Filename of an icon / preview for this export template, currently not used. * - ``version`` - - [[type:version]] + - :ref:`version` - ``0.0.0`` - Version number of this package. * - ``depends on`` - - [[type:list]] of [[type:dependency]]s + - :ref:`list` of :ref:`dependency`s Packages this package depends on. No additional properties are available. @@ -1317,7 +1317,7 @@ Symbols are not stored in packages, the data file is directly written to a ``".m **Coordinates** -Various parts of a symbol use [[type:vector2d|coordinates]]. +Various parts of a symbol use :ref:`vector2d|coordinates`. These are pairs of numbers in the range ``0@ to @1@. @(0,0)@ is the top-left of the symbol, @(1,1)`` the bottom-right. **Properties** @@ -1332,11 +1332,11 @@ These are pairs of numbers in the range ``0@ to @1@. @(0,0)@ is the top-left of - Default - Description * - ``mse version`` - - [[type:version]] + - :ref:`version` - ''required'' - Version of MSE this symbol is made with. * - ``parts`` - - [[type:list]] of [[type:symbol part]]s + - :ref:`list` of :ref:`symbol part`s - - The parts in this symbol. @@ -1407,12 +1407,12 @@ Field A field is a description of a kind of 'container' to hold a value. -For example the [[type:value]] of a 'text field' is a piece of text, that of a 'color field' a [[type:color]], etc. +For example the :ref:`value` of a 'text field' is a piece of text, that of a 'color field' a :ref:`color`, etc. Things that are fields are, "card color" and "card name". -Not a particular color or name, but a description of what a card color and a card name are for a particular [[type:game]]. +Not a particular color or name, but a description of what a card color and a card name are for a particular :ref:`game`. -Fields are part of the [[file:style triangle]]: +Fields are part of the :doc:`/file/style triangle`: .. list-table:: :header-rows: 1 @@ -1422,12 +1422,12 @@ Fields are part of the [[file:style triangle]]: * - Description - Looks - Data - * - [[type:Game]] - - [[type:Stylesheet]] - - [[type:Set]] + * - :ref:`Game` + - :ref:`Stylesheet` + - :ref:`Set` * - '''Field''' - - [[type:Style]] - - [[type:Value]] + - :ref:`Style` + - :ref:`Value` **Properties** @@ -1454,60 +1454,60 @@ Fields are part of the [[file:style triangle]]: * ``color`` * ``info`` * - ``name`` - - [[type:string]] + - :ref:`string` - ''required'' - Name of the field. * - ``description`` - - [[type:localized string]] + - :ref:`localized string` - ``""`` - Description of the field, shown in the status bar when the mouse is over the field. * - ``icon`` - - [[type:filename]] + - :ref:`filename` - - - Filename of an icon for this field, used for automatically generated [[type:statistics category]]s. + - Filename of an icon for this field, used for automatically generated :ref:`statistics category`s. * - ``editable`` - - [[type:boolean]] + - :ref:`boolean` - ``true`` - Can values of this field be edited? * - ``save value`` - - [[type:boolean]] + - :ref:`boolean` - ``true`` - Should values of this field be saved to files? Should be disabled for values that are generated by scripts. * - ``show statistics`` - - [[type:boolean]] + - :ref:`boolean` - ``true`` - - Should a [[type:statistics dimension]] and [[type:statistics category|category]] be made for this field, + - Should a :ref:`statistics dimension` and :ref:`statistics category|category` be made for this field, causing it to be listed on the statistics panel? * - ``identifying`` - - [[type:boolean]] + - :ref:`boolean` - ``false`` - - Does this field give the name of the [[type:card]] or [[type:set]]? + - Does this field give the name of the :ref:`card` or :ref:`set`? * - ``card list column`` - - [[type:int]] + - :ref:`int` - ``0`` - On what position in the card list should this field be put? * - ``card list width`` - - [[type:int]] + - :ref:`int` - ``100`` - Width of the card list column in pixels. * - ``card list visible`` - - [[type:boolean]] + - :ref:`boolean` - ``false`` - Should this field be shown in the card list by default? * - ``card list allow`` - - [[type:boolean]] + - :ref:`boolean` - ``true`` - Should this field be allowed in the card list at all? * - ``card list name`` - - [[type:localized string]] + - :ref:`localized string` - field name - Alternate name to use for the card list, for example an abbreviation. * - ``card list alignment`` - - [[type:alignment]] + - :ref:`alignment` - ``left`` - Alignment of the card list column. * - ``sort script`` - - [[type:script]] + - :ref:`script` - - Alternate way to sort the card list when using this column to sort the list. @@ -1522,7 +1522,7 @@ The ``type`` determines what values of this field contain: - Values contain - Displayed as * - ``text`` - - Text with markup (a [[type:tagged string]]) + - Text with markup (a :ref:`tagged string`) - Text * - ``choice`` - A choice from a list @@ -1531,7 +1531,7 @@ The ``type`` determines what values of this field contain: - Zero or more choices from a list - A single image or multiple images * - ``package choice`` - - A choice from a list of installed [[type:package]]s + - A choice from a list of installed :ref:`package`s - Text and/or an image * - ``boolean`` - ``yes@ or @no`` @@ -1543,7 +1543,7 @@ The ``type`` determines what values of this field contain: - Any image - The image * - ``symbol`` - - A [[type:symbol]] edited with the symbol editor + - A :ref:`symbol` edited with the symbol editor - The image * - ``info`` - An informational message, for example to group fields together. @@ -1563,61 +1563,61 @@ Additional properties are available, depending on the type of field: - Description * - ``"text"`` - ``script`` - - [[type:script]] + - :ref:`script` - - Script to apply to values of this field after each change.
    If the script evaluates to a constant (i.e. doesn't use ``value``) then values in this field can effectively not be edited. * - ^^^ - ``default`` - - [[type:script]] + - :ref:`script` - - Script to determine the value when it is in the default state (not edited). * - ^^^ - ``default name`` - - [[type:string]] + - :ref:`string` - ``"Default"`` - Name of the default state, currently not used. * - ^^^ - ``multi line`` - - [[type:boolean]] + - :ref:`boolean` - ``false`` - Can values of this field contain line breaks? * - ``"choice"`` - ``script`` - - [[type:script]] + - :ref:`script` - - Script to apply to values of this field after each change.
    If the script evaluates to a constant (i.e. doesn't use ``value``) then values in this field can effectively not be edited. * - ^^^ - ``default`` - - [[type:script]] + - :ref:`script` - - Script to determine the value when it is in the default state (not edited). * - ^^^ - ``initial`` - - [[type:string]] + - :ref:`string` - - Initial value for new values for this field. * - ^^^ - ``default name`` - - [[type:string]] + - :ref:`string` - ``"Default"`` - Name of the default state. * - ^^^ - ``choices`` - - [[type:list]] of [[type:choice]]s + - :ref:`list` of :ref:`choice`s - - Possible values for this field. * - ^^^ - ``choice colors`` - - [[type:map]] of opaque [[type:color]]s + - :ref:`map` of opaque :ref:`color`s - - Colors of the choices for statistics graphs. * - ^^^ - ``choice colors cardlist`` - - [[type:map]] of opaque [[type:color]]s + - :ref:`map` of opaque :ref:`color`s - - - Colors of the choices for lines in the card list,
    see also the ``card list color script`` property of [[type:game]]s. + - Colors of the choices for lines in the card list,
    see also the ``card list color script`` property of :ref:`game`s. * - ``"multiple choice"`` - - <<< @@ -1632,57 +1632,57 @@ Additional properties are available, depending on the type of field: - <<< - <<< * - ``"package choice"`` - ``script`` [[type:script]] Script to apply to values of this field after each change.
    + ``script`` :ref:`script` Script to apply to values of this field after each change.
    If the script evaluates to a constant (i.e. doesn't use ``value``) then values in this field can effectively not be edited. * - ^^^ - ``match`` - - [[type:string]] + - :ref:`string` - ''required'' - Filenames of the packages to match, can include wildcards ``"*"@. For example @"magic-mana-*.mse-symbol-font"``. * - ^^^ - ``initial`` - - [[type:string]] + - :ref:`string` - ''required'' - Initial package for new values for this field. * - ^^^ - ``reqired`` - - [[type:boolean]] + - :ref:`boolean` - ``true`` - Must a package always be selected? Or is it allowed to select nothing? * - ^^^ - ``empty name`` - - [[type:string]] + - :ref:`string` - ``"None"`` - Name of the empty state. Applies only if ``required: false``. * - ``"color"`` - ``script`` - - [[type:script]] + - :ref:`script` - - Script to apply to values of this field after each change.
    If the script evaluates to a constant (i.e. doesn't use ``value``) then values in this field can effectively not be edited. * - ^^^ - ``default`` - - [[type:script]] + - :ref:`script` - - Script to determine the value when it is in the default state (not edited). * - ^^^ - ``initial`` - - [[type:string]] + - :ref:`string` - - Initial color for new values for this field. * - ^^^ - ``default name`` - - [[type:string]] + - :ref:`string` - ``"Default"`` - Name of the default state. * - ^^^ - ``allow custom`` - - [[type:boolean]] + - :ref:`boolean` - ``true`` - Are colors other then those from the choices allowed? * - ^^^ - ``choices`` - - [[type:list]] of [[type:color choice]]s + - :ref:`list` of :ref:`color choice`s - - Possible values for this field. * - ``"image"`` @@ -1697,7 +1697,7 @@ Additional properties are available, depending on the type of field: - <<< * - ``"info"`` - ``script`` - - [[type:script]] + - :ref:`script` - - Script to determine the value to show. @@ -1740,10 +1740,10 @@ Style **Overview** -A style specifies how a [[type:field]] should look, +A style specifies how a :ref:`field` should look, things like position, size, fonts, colors, etc. -Styles are part of the [[file:style triangle]]: +Styles are part of the :doc:`/file/style triangle`: .. list-table:: :header-rows: 1 @@ -1753,12 +1753,12 @@ Styles are part of the [[file:style triangle]]: * - Description - Looks - Data - * - [[type:Game]] - - [[type:Stylesheet]] - - [[type:Set]] - * - [[type:Field]] + * - :ref:`Game` + - :ref:`Stylesheet` + - :ref:`Set` + * - :ref:`Field` - '''Style''' - - [[type:Value]] + - :ref:`Value` **Positioning** @@ -1833,51 +1833,51 @@ Here are some examples: - Default - Description * - ``z index`` - - [[type:int]] + - :ref:`int` - ``0`` - Stacking of this box, fields with a higher ``z index`` are placed on top of those with a lower index. * - ``tab index`` - - [[type:int]] + - :ref:`int` - ``0`` - Index for moving through the fields with the tab key, fields with a lower tab index come first. Otherwise the order is from top to bottom and then left to right. * - ``left`` - - [[type:scriptable]] [[type:double]] + - :ref:`scriptable` :ref:`double` - ''Required'' - Distance between left edge of the box and the left of the card in pixels. * - ``width`` - - [[type:scriptable]] [[type:double]] + - :ref:`scriptable` :ref:`double` - ''Required'' - Width of the box in pixels. * - ``right`` - - [[type:scriptable]] [[type:double]] + - :ref:`scriptable` :ref:`double` - ''Required'' - Distance between right edge of the box and the ''left'' of the card in pixels. * - ``top`` - - [[type:scriptable]] [[type:double]] + - :ref:`scriptable` :ref:`double` - ''Required'' - Distance between top edge of the box and the top of the card in pixels. * - ``height`` - - [[type:scriptable]] [[type:double]] + - :ref:`scriptable` :ref:`double` - ''Required'' - Height of the box in pixels. * - ``bottom`` - - [[type:scriptable]] [[type:double]] + - :ref:`scriptable` :ref:`double` - ''Required'' - Distance between bottom edge of the box and the ''top'' of the card in pixels. * - ``angle`` - - [[type:scriptable]] [[type:int]] + - :ref:`scriptable` :ref:`int` - ``0`` - Rotation of this box, in degrees counter clockwise. * - ``visible`` - - [[type:scriptable]] [[type:boolean]] + - :ref:`scriptable` :ref:`boolean` - ``true`` - Is this field visible at all? * - ``mask`` - - [[type:image|scriptable image]] + - :ref:`image|scriptable image` - ''none'' - - A mask to apply to the box, black areas in the mask become transparent, similar to [[fun:set_mask]]. + - A mask to apply to the box, black areas in the mask become transparent, similar to :doc:`/function#set_mask`. -The rest of the properties depend on the type of [[type:field]] this style is for. +The rest of the properties depend on the type of :ref:`field` this style is for. .. list-table:: :header-rows: 1 @@ -1891,38 +1891,38 @@ The rest of the properties depend on the type of [[type:field]] this style is fo - Description * - ``"text"`` - ``font`` - - [[type:font]] + - :ref:`font` - ''Required'' - Font to render the text. * - ^^^ - ``symbol font`` - - [[type:symbol font]] + - :ref:`symbol font` - - Font to render symbols in the text (optional). * - ^^^ - ``always symbol`` - - [[type:boolean]] + - :ref:`boolean` - ``false`` - Should all text be rendered with symbols?
    Text that is not supported by the symbol font is still rendered as normal text. * - ^^^ - ``allow formating`` - - [[type:boolean]] + - :ref:`boolean` - ``true`` - Is custom formating (bold, italic) allowed? * - ^^^ - ``alignment`` - - [[type:scriptable]] [[type:alignment]] + - :ref:`scriptable` :ref:`alignment` - ``top left`` - Alignment of the text. * - ^^^ - ``direction`` - - [[type:direction]] + - :ref:`direction` - ``"left to right"`` - Direction in which the text flows. If set to ``"vertical"`` it is as if a line break is inserted after each character. * - ^^^ - ``padding left`` - - [[type:scriptable]] [[type:double]] + - :ref:`scriptable` :ref:`double` - ``0`` - Padding between the text and the border of the box, in pixels. * - ^^^ @@ -1942,7 +1942,7 @@ The rest of the properties depend on the type of [[type:field]] this style is fo - ^^^ * - ^^^ - ``padding left min`` - - [[type:scriptable]] [[type:double]] + - :ref:`scriptable` :ref:`double` - ∞ - Minimal padding around the field.
    When the text is scaled down the padding is scaled as well, but it becomes no smaller than this. * - ^^^ @@ -1962,23 +1962,23 @@ The rest of the properties depend on the type of [[type:field]] this style is fo - ^^^ * - ^^^ - ``line height soft`` - - [[type:scriptable]] [[type:double]] + - :ref:`scriptable` :ref:`double` - ``1`` - Multiplier for the line height of 'soft' line breaks. These are breaks caused by wrapping around lines that are too long.
    A line height of ``0@ means all lines are in the same position, @1@ is normal behaviour, @2`` skips a line, etc. * - ^^^ - ``line height hard`` - - [[type:scriptable]] [[type:double]] + - :ref:`scriptable` :ref:`double` - ``1`` - Multiplier for the line height of 'hard' line breaks. These are breaks caused by the enter key. * - ^^^ - ``line height line`` - - [[type:scriptable]] [[type:double]] + - :ref:`scriptable` :ref:`double` - ``1`` - Multiplier for the line height of 'soft' line breaks. These are breaks caused by ``"\n"`` tags. * - ^^^ - ``line height soft max`` - - [[type:scriptable]] [[type:double]] + - :ref:`scriptable` :ref:`double` - ''disabled'' - When there is still vertical room in the text box, increase the line heights to at most these values to spread the text more evenly. * - ^^^ @@ -1993,13 +1993,13 @@ The rest of the properties depend on the type of [[type:field]] this style is fo - ^^^ * - ^^^ - ``paragraph height`` - - [[type:double]] + - :ref:`double` - ''flexible'' - The height of paragraphs. If specified, each paragraph is given this much space, and aligned inside that space as specified by ``alignment``.
    A paragraph break is any line break that is not soft (i.e. caused by word wrap or a ```` break). * - ^^^ - ``mask`` - - [[type:image|scriptable image]] + - :ref:`image|scriptable image` - ''none'' - A mask that indicates where in the box text can be placed.
    Text is never put in black areas of the box:
    @@ -2008,22 +2008,22 @@ The rest of the properties depend on the type of [[type:field]] this style is fo To include a certain pixel in the size/shape but not allow text to be placed there, it can be made dark gray (a value less than 128). * - ^^^ - ``layout`` - - [[type:text layout]] + - :ref:`text layout` - ''automatic'' - When read from a script, gives information on the layout of text in this box. * - ^^^ - ``content width`` - - [[type:double]] + - :ref:`double` - ''automatic'' - When read from a script, gives the width of the current content in this box. Equivalent to ``layout.width`` * - ^^^ - ``content height`` - - [[type:double]] + - :ref:`double` - ''automatic'' - When read from a script, gives the height of the current content in this box. Equivalent to ``layout.height`` * - ^^^ - ``content lines`` - - [[type:int]] + - :ref:`int` - ''automatic'' - When read from a script, gives the number of lines of the current content in this box. Equivalent to ``length(layout.lines)`` @@ -2034,52 +2034,52 @@ The rest of the properties depend on the type of [[type:field]] this style is fo ``"in place"`` places the box at the mouse coordinates. * - ^^^ - ``render style`` - - [[type:render style]] + - :ref:`render style` - ``"text"`` - How should the field be rendered? * - ^^^ - ``combine`` - - [[type:combine]] + - :ref:`combine` - ``"normal"`` - - How to combine the image with the background? Can be overridden using the [[fun:set_combine]] function. + - How to combine the image with the background? Can be overridden using the :doc:`/function#set_combine` function. * - ^^^ - ``alignment`` - - [[type:alignment]] + - :ref:`alignment` - ``"stretch"`` - Alignment of text and images in the box. * - ^^^ - ``font`` - - [[type:font]] + - :ref:`font` - - Font to use for rendering text (depending on ``render style``) * - ^^^ - ``image`` - - [[type:image|scriptable image]] + - :ref:`image|scriptable image` - - Image to show (depending on ``render style``).
    The script will be called with ``input`` set to the value to determine an image for. * - ^^^ - ``choice images`` - - [[type:map]] of [[type:image]]s + - :ref:`map` of :ref:`image`s - - An alternative way to specify what image to show.
    - For each [[type:choice]] a separate image is specified. + For each :ref:`choice` a separate image is specified. * - ^^^ - ``content width`` - - [[type:double]] + - :ref:`double` - ''automatic'' - When read from a script, gives the width of the current choice image in this box.
    This is only useful when the alignment is changed, otherwise it is always equal the box size itself. * - ^^^ - ``content height`` - - [[type:double]] + - :ref:`double` - ''automatic'' - When read from a script, gives the height of the current choice image in this box. * - ``"multiple choice"`` - ``direction@ [[type:scriptable]] [[type:direction]] @"left to right"@ Direction the items are laid out in, only when @render style@ is @list``. + ``direction@ :ref:`scriptable` :ref:`direction` @"left to right"@ Direction the items are laid out in, only when @render style@ is @list``. * - ^^^ - ``spacing`` - - [[type:scriptable]] [[type:double]] + - :ref:`scriptable` :ref:`double` - ``0`` - Spacing between the items. @@ -2087,19 +2087,19 @@ The rest of the properties depend on the type of [[type:field]] this style is fo * - ``"package choice"`` * - ^^^ - ``font`` - - [[type:font]] + - :ref:`font` - - Font to use for rendering text. ! <<< <<< <<< <<< * - ``"color"`` - ``radius`` - - [[type:double]] + - :ref:`double` - ``0`` - Radius of rounded corners for the box in pixels. * - ^^^ - ``left width`` - - [[type:double]] + - :ref:`double` - ∞ - Draw only this many pixels from the side, creating a box with a hole in it, or a card border. * - ^^^ @@ -2119,48 +2119,48 @@ The rest of the properties depend on the type of [[type:field]] this style is fo - ^^^ * - ^^^ - ``combine`` - - [[type:combine]] + - :ref:`combine` - ``"normal"`` - How to combine the color with the background? Only applies when a mask is used. ! <<< <<< <<< <<< * - ``"image"`` - ``default`` - - [[type:image|scriptable image]] + - :ref:`image|scriptable image` - ''none'' - A default image to use when the card has none. ! <<< <<< <<< <<< * - ``"symbol"`` - ``variations`` - - [[type:list]] of [[type:symbol variation]]s + - :ref:`list` of :ref:`symbol variation`s - - Available variations of the symbol, a variation describes color and border size. * - ^^^ - ``min aspect ratio`` - - [[type:double]] + - :ref:`double` - ``1`` - Bounds for the aspect ratio, ``width/height`` symbols can take. This can be used to make non-square symbols. * - ^^^ - ``max aspect ratio`` - - [[type:double]] + - :ref:`double` - ``1`` - ^^^ ! <<< <<< <<< <<< * - ``"info"`` - ``font`` - - [[type:font]] + - :ref:`font` - ''Required'' - Font to render the text. * - ^^^ - ``alignment`` - - [[type:scriptable]] [[type:alignment]] + - :ref:`scriptable` :ref:`alignment` - ``top left`` - Alignment of the text. * - ^^^ - ``padding left`` - - [[type:double]] + - :ref:`double` - ``0`` - Padding between the text and the border of the box, in pixels. * - ^^^ @@ -2180,7 +2180,7 @@ The rest of the properties depend on the type of [[type:field]] this style is fo - ^^^ * - ^^^ - ``background color`` - - opaque [[type:color]] + - opaque :ref:`color` - ``rgb(255,255,255)`` - Background color for the box, can be used to make it stand out. @@ -2190,7 +2190,7 @@ The rest of the properties depend on the type of [[type:field]] this style is fo Render Style ____________ -A way to render a choice [[type:field]], see [[type:style]]. +A way to render a choice :ref:`field`, see :ref:`style`. **Possible values** @@ -2261,11 +2261,11 @@ A variation of a symbol, describes color and border. - Default - Description * - ``name`` - - [[type:string]] + - :ref:`string` - ''Required'' - - Name of this variation, refered to by the [[fun:symbol_variation]] function. + - Name of this variation, refered to by the :doc:`/function#symbol_variation` function. * - ``border radius`` - - [[type:double]] + - :ref:`double` - ``0.05`` - Border radius of the symbol. * - ``fill type`` @@ -2285,51 +2285,51 @@ Depending on the ``fill type`` there are additional properties: - Description * - ``"solid"`` - ``fill color`` - - [[type:color]] + - :ref:`color` - Color to use for filling the symbol. * - ^^^ - ``border color`` - - [[type:color]] + - :ref:`color` - Color to use for the border of the symbol. * - ``"linear gradient"`` - ``fill color 1`` - - [[type:color]] + - :ref:`color` - Color to use for filling the symbol at the center of the gradient. * - ^^^ - ``border color 1`` - - [[type:color]] + - :ref:`color` - Color to use for the border of the symbol at the center of the gradient. * - ^^^ - ``fill color 2`` - - [[type:color]] + - :ref:`color` - Color to use for filling the symbol at the ends of the gradient. * - ^^^ - ``border color 2`` - - [[type:color]] + - :ref:`color` - Color to use for the border of the symbol at the ends of the gradient. * - ^^^ - ``center x@, @center y`` - - [[type:double]] + - :ref:`double` - Position of the center point of the gradient (in the range 0 to 1) * - ^^^ - ``end x@, @end y`` - - [[type:double]] + - :ref:`double` - Position of the end point of the gradient (in the range 0 to 1) * - ``"radial gradient"`` - ``fill color 1`` - - [[type:color]] + - :ref:`color` - Color to use for filling the symbol at the center of the symbol. * - ^^^ - ``border color 1`` - - [[type:color]] + - :ref:`color` - Color to use for the border of the symbol at the center of the symbol. * - ^^^ - ``fill color 2`` - - [[type:color]] + - :ref:`color` - Color to use for filling the symbol at the edges of the symbol. * - ^^^ - ``border color 2`` - - [[type:color]] + - :ref:`color` - Color to use for the border of the symbol at the edges of the symbol. **Examples** @@ -2386,31 +2386,31 @@ Is the middle of the first line of the second block. - Type - Description * - ``width`` - - [[type:double]] + - :ref:`double` - Width of this line or group of lines in pixels. * - ``height`` - - [[type:double]] + - :ref:`double` - Height of this line or group of lines in pixels. * - ``top`` - - [[type:double]] + - :ref:`double` - Top y coordinate * - ``middle`` - - [[type:double]] + - :ref:`double` - Middle y coordinate * - ``bottom`` - - [[type:double]] + - :ref:`double` - Bottom y coordinate * - ``lines`` - - [[type:list]] of [[type:text layout]]s + - :ref:`list` of :ref:`text layout`s - The lines in this part of the text. * - ``paragraphs`` - - [[type:list]] of [[type:text layout]]s + - :ref:`list` of :ref:`text layout`s - The paragraphs in this part of the text. * - ``blocks`` - - [[type:list]] of [[type:text layout]]s + - :ref:`list` of :ref:`text layout`s - The blocks in this part of the text. * - ``separators`` - - [[type:list]] of [[type:double]]s + - :ref:`list` of :ref:`double`s - The y coordinates of separators between blocks. @@ -2420,9 +2420,9 @@ Value **Overview** -A value is something that is 'stored in' a [[type:field]]. +A value is something that is 'stored in' a :ref:`field`. -Values are part of the [[file:style triangle]]: +Values are part of the :doc:`/file/style triangle`: .. list-table:: :header-rows: 1 @@ -2432,11 +2432,11 @@ Values are part of the [[file:style triangle]]: * - Description - Looks - Data - * - [[type:Game]] - - [[type:Stylesheet]] - - [[type:Set]] - * - [[type:Field]] - - [[type:Style]] + * - :ref:`Game` + - :ref:`Stylesheet` + - :ref:`Set` + * - :ref:`Field` + - :ref:`Style` - '''Value''' **Possible types** @@ -2452,13 +2452,13 @@ The type of a value depends on the corresponding field: - Value data type - Description * - ``"text"`` - - [[type:tagged string]] + - :ref:`tagged string` - A piece of text, possibly with markup. * - ``"choice"`` - - [[type:string]] + - :ref:`string` - One of the choices of the field. * - ``"multiple choice"`` - - [[type:string]] + - :ref:`string` - A list of choices from the field, separated by commas.
    For example: ``"red, green, blue"``. * - ``"package choice"`` @@ -2466,19 +2466,19 @@ The type of a value depends on the corresponding field: - The (file)name of a package, including the extension. * - ``"boolean"`` - ``"yes"@ or @"no"`` - - This can be directly used as a [[type:boolean]] value in scripts. + - This can be directly used as a :ref:`boolean` value in scripts. * - ``"image"`` - - [[type:filename]] - - Filename of an image file in the [[type:set]] package. + - :ref:`filename` + - Filename of an image file in the :ref:`set` package. * - ``"symbol"`` - - [[type:filename]] - - Filename of a [[type:symbol]] file in the [[type:set]] package.
    - When accessed from a script, image fields can be directly used as [[type:image]]s. + - :ref:`filename` + - Filename of a :ref:`symbol` file in the :ref:`set` package.
    + When accessed from a script, image fields can be directly used as :ref:`image`s. * - ``"color"`` - - opaque [[type:color]] + - opaque :ref:`color` - A color. * - ``"info"`` - - [[type:string]] + - :ref:`string` - A label for the information box. **Example** @@ -2504,7 +2504,7 @@ Card **Overview** -A '''card''' in a [[type:set]]. +A '''card''' in a :ref:`set`. **Properties** @@ -2518,35 +2518,35 @@ A '''card''' in a [[type:set]]. - Default - Description * - ``stylesheet`` - - Name of a [[type:stylesheet]] + - Name of a :ref:`stylesheet` - ''none'' - - Use a different stylesheet for this card than the [[type:set]]'s default. + - Use a different stylesheet for this card than the :ref:`set`'s default. * - ``has styling`` - - [[type:boolean]] + - :ref:`boolean` - false - This card has styling data different from the set's default. * - ``styling data`` - - [[type:indexmap]] of [[type:value]]s + - :ref:`indexmap` of :ref:`value`s - false - - Styling data, based on the [[type:stylesheet]]'s ``style fields``. + - Styling data, based on the :ref:`stylesheet`'s ``style fields``. * - ``notes`` - - [[type:tagged string]] + - :ref:`tagged string` - ``""`` - Notes for this card. * - ``time created`` - - [[type:date]] + - :ref:`date` - ''now'' - Time at which the card was created. * - ``time modified`` - - [[type:date]] + - :ref:`date` - ''now'' - Time at which the card was last modified. * - ``extra data`` - - [[type:map]] of [[type:indexmap]]s of [[type:value]]s + - :ref:`map` of :ref:`indexmap`s of :ref:`value`s Data for the 'extra card fields' of the stylesheet.
    This is first indexed by stylesheet name, then by field name. * - ''remaining keys'' - - [[type:indexmap]] of [[type:value]]s + - :ref:`indexmap` of :ref:`value`s - - The remaining keys contain the data for the game's ``card fields``.
    So for example ``card.some_field@ corresponds to the value of the card field @some field``. @@ -2583,7 +2583,7 @@ Keyword **Overview** -A keyword in a [[type:set]] or a [[type:game]]. +A keyword in a :ref:`set` or a :ref:`game`. A keyword is something that matches a piece of text, and optionally some kind of reminder text can be shown. @@ -2599,27 +2599,27 @@ A keyword is something that matches a piece of text, and optionally some kind of - Default - Description * - ``keyword`` - - [[type:string]] + - :ref:`string` - ''required'' - Name of the keyword. * - ``match`` - - [[type:string]] + - :ref:`string` - ''required'' - String to match. * - ``reminder`` - - [[type:scriptable]] [[type:string]] + - :ref:`scriptable` :ref:`string` - ''required'' - Script to generate the reminder text of this keyword. * - ``rules`` - - [[type:string]] + - :ref:`string` - ``""`` - Explanation or additional rules for this keyword. * - ``mode`` - - Name of a [[type:keyword mode]] + - Name of a :ref:`keyword mode` - - Mode of this keyword. -The match string can include parameters, ``"type"@ where @"type"`` is the name of a [[type:keyword param type|keyword parameter type]] in the game. +The match string can include parameters, ``"type"@ where @"type"`` is the name of a :ref:`keyword param type|keyword parameter type` in the game. These will match according to the ``match`` property of that parameter type. When expanding the reminder text ``param1@ refers to the first parameter in the match string, @param2`` to the second, etc. @@ -2640,7 +2640,7 @@ Keyword Mode **Overview** -A mode for [[type:keyword]]s. +A mode for :ref:`keyword`s. This becomes a choice in the 'mode' box on the keywords panel. @@ -2659,15 +2659,15 @@ This information can then be used to determine whether to expand the reminder te - Default - Description * - ``name`` - - [[type:string]] + - :ref:`string` - ''required'' - Name of the mode, this is shown in the box and used in scripts. * - ``description`` - - [[type:string]] + - :ref:`string` - ``""`` - A description of this mode. * - ``is default`` - - [[type:boolean]] + - :ref:`boolean` - ``false`` - Is this the default mode for new keywords? @@ -2686,7 +2686,7 @@ Keyword Param Type **Overview** -A type of parameter that can be used in a [[type:keyword]]. +A type of parameter that can be used in a :ref:`keyword`. **Properties** @@ -2700,54 +2700,54 @@ A type of parameter that can be used in a [[type:keyword]]. - Default - Description * - ``name`` - - [[type:string]] + - :ref:`string` - ''required'' - Name of the parameter type. * - ``description`` - - [[type:string]] + - :ref:`string` - ''required'' - Description of the parameter type. * - ``placeholder`` - - [[type:string]] + - :ref:`string` - ``name`` of this param type - Placeholder to use for empty parameters, the name is used if this is empty. * - ``optional`` - - [[type:boolean]] + - :ref:`boolean` - ``true`` - Is a placeholder used when a keyword is encountered with no parameter,
    for example ``"Cycling "@ would become @"Cycling cost"``. * - ``match`` - - [[type:regex]] + - :ref:`regex` - ''required'' - Regular expression that this param type matches. * - ``separator before is`` - - [[type:regex]] + - :ref:`regex` - ``""`` - Regular expression of separator before parameters of this type. * - ``separator after is`` - - [[type:regex]] + - :ref:`regex` - ``""`` - Regular expression of separator after parameters of this type. * - ``eat separator`` - - [[type:boolean]] + - :ref:`boolean` - ``true`` - Allow the user to 'type over' the separator.
    For example if the separator is ``" "@ in the keyword @"Cycling"@, and the user types @"Cycling"``, a space and a placeholder is automatically inserted, making ``"Cycling "``. If the user now presses space the cursor is only moved, no additional space is inserted, the space is 'eaten'. * - ``script`` - - [[type:script]] + - :ref:`script` - - Script to apply to parameters of this type before substituting them back into the text. * - ``reminder script`` - - [[type:script]] + - :ref:`script` - - Script to apply to parameters of this type before using them in the reminder text. * - ``example`` - - [[type:string]] + - :ref:`string` - - Example for in the keyword editor, currently not used. * - ``refer scripts`` - - [[type:list]] of [[type:keyword param reference script]]s + - :ref:`list` of :ref:`keyword param reference script`s Scripts for inserting parameters of this type into the reminder text. To make this easy for the user, a menu of ways to use a parameter is provided. @@ -2774,7 +2774,7 @@ ______________________________ **Overview** -A way to use a [[type:keyword param type|keyword parameter]] in a [[type:keyword]]'s reminder text. +A way to use a :ref:`keyword param type|keyword parameter` in a :ref:`keyword`'s reminder text. Usually the parameters are included as ``"{param1}"``, etc. But in some cases for instance a function should be applied, ``"{fun(param1)}"``. @@ -2793,22 +2793,22 @@ To make this easy for the user, a menu of choices is provided, this type describ - Default - Description * - ``name`` - - [[type:string]] + - :ref:`string` - ''required'' - Name of the parameter type. * - ``description`` - - [[type:string]] + - :ref:`string` - ''required'' - A description of the reference script. * - ``script`` - - [[type:script]] + - :ref:`script` - ''required'' - Script that generates the code using the parameter.
    This means you will likely need to do some escaping.
    In the script, ``input@ refers to the name of the parameter, for example @"param1"``. **Example** -Apply the [[fun:english_number]] function to the parameter: +Apply the :doc:`/function#english_number` function to the parameter: .. code-block:: @@ -2826,9 +2826,9 @@ Statistics Dimension A dimension or axis for the statistics panel. -One or more dimensions are combined in a graph, these combinations are called [[type:statistics category]]s. +One or more dimensions are combined in a graph, these combinations are called :ref:`statistics category`s. -Statistics dimensions are automatically generated for all card fields in a [[type:game]] that don't set ``show statistics@ to @false``. +Statistics dimensions are automatically generated for all card fields in a :ref:`game` that don't set ``show statistics@ to @false``. Categories are also automatically generated from dimensions. @@ -2844,48 +2844,48 @@ Categories are also automatically generated from dimensions. - Default - Description * - ``name`` - - [[type:string]] + - :ref:`string` - ''required'' - Name of this dimension, used as an axis label and a label for automatically generated categories. * - ``description`` - - [[type:localized string]] + - :ref:`localized string` - ``""`` - A description of the dimension, currently not used. * - ``position hint`` - - [[type:string]] + - :ref:`string` - ``0`` - Hint for ordering dimensions. * - ``icon`` - - [[type:filename]] + - :ref:`filename` - - Filename of an icon for this dimension. * - ``script`` - - [[type:script]] + - :ref:`script` - ''required'' - Script that generates a value for each card in the set. * - ``numeric`` - - [[type:boolean]] + - :ref:`boolean` - ``false`` - Is the value always a number? * - ``bin size`` - - [[type:double]] + - :ref:`double` - ''none'' - For numeric dimensions: group numbers together into bins this large.
    For example with ``bin size: 5@, values @1@ and @3@ both get put under @"1-5"``. * - ``show empty`` - - [[type:boolean]] + - :ref:`boolean` - ``false`` - Should cards with the value ``""`` be included? * - ``split list`` - - [[type:boolean]] + - :ref:`boolean` - ``false`` - Indicates the value is a list of the form ``"item1, item2"``. The card is put under both items. * - ``colors`` - - [[type:map]] of opaque [[type:color]]s + - :ref:`map` of opaque :ref:`color`s - - Colors to use for specific values * - ``groups`` - - [[type:list]] of [[type:string]]s + - :ref:`list` of :ref:`string`s - - Values to always show, and the order to show them in. @@ -2934,11 +2934,11 @@ A list of words. Used for drop down lists in the text editor, for example for ca - Default - Description * - ``name`` - - [[type:string]] + - :ref:`string` - ''Required'' - Name of this word list, refered to using a ``""`` tag. * - ``words`` - - [[type:list]] of [[type:word list word]]s + - :ref:`list` of :ref:`word list word`s - ''Required'' - The words in the list @@ -2961,7 +2961,7 @@ Which gives the creature choice, and that can be changed with a drop down list. Word List Word ~~~~~~~~~~~~~~ -A word in a [[type:word list]]. +A word in a :ref:`word list`. **Properties** @@ -2975,24 +2975,24 @@ A word in a [[type:word list]]. - Default - Description * - ``name`` - - [[type:string]] + - :ref:`string` - ''Required'' - The word. * - ``line below`` - - [[type:boolean]] + - :ref:`boolean` - ``false`` - Display a line below this item in the list? * - ``is prefix`` - - [[type:boolean]] + - :ref:`boolean` - ``false`` - Should this word be used as a prefix before another word from the list?
    Think "Legendary ". Note the space after it, words are directly concatenated. * - ``words`` - - [[type:list]] of [[type:word list word]]s + - :ref:`list` of :ref:`word list word`s - - A submenu. If given, the ``name`` of this word is only used as a label for the menu. * - ``script`` - - [[type:script]] + - :ref:`script` - ''Optional'' - A script that determines zero or more words.
    The result should be a list of comma separated words, for example ``"x,y,z"`` specifies three words. @@ -3052,23 +3052,23 @@ A script to add multiple cards to the set at once. - Default - Description * - ``name`` - - [[type:string]] + - :ref:`string` - - Name of this script; appears in the menu. * - ``description`` - - [[type:string]] + - :ref:`string` - ``""`` - Description of this script; appears in the status bar. * - ``enabled`` - - [[type:scriptable]] [[type:boolean]] + - :ref:`scriptable` :ref:`boolean` - ``true`` - Is this script enabled? * - ``script`` - - [[type:script]] + - :ref:`script` - - Script that produces the cards.
    - This script should return a [[type:list]] of [[type:card]]s. - The [[fun:new_card]] function can be used to make new cards. + This script should return a :ref:`list` of :ref:`card`s. + The :doc:`/function#new_card` function can be used to make new cards. **Example** @@ -3094,7 +3094,7 @@ Font **Overview** -A reference to a normal [[type:font]] for drawing text. +A reference to a normal :ref:`font` for drawing text. **Properties** @@ -3108,61 +3108,61 @@ A reference to a normal [[type:font]] for drawing text. - Default - Description * - ``name`` - - [[type:scriptable]] [[type:string]] + - :ref:`scriptable` :ref:`string` - ''required'' - Name of the font as it appears in most text programs. * - ``italic name`` - - [[type:scriptable]] [[type:string]] + - :ref:`scriptable` :ref:`string` - - Optionally, a different font to use for italic text instead of the normal italic version of the font. * - ``size`` - - [[type:scriptable]] [[type:double]] + - :ref:`scriptable` :ref:`double` - ''required'' - Size of the font in points on a 96 DPI display. * - ``scale down to`` - - [[type:double]] + - :ref:`double` - ∞ - Minimum size in points to scale the size down to. * - ``max stretch`` - - [[type:double]] + - :ref:`double` - ``1.0`` - Maximum multiplier by which the width of the text is compressed, so ``max width: 0.5`` means the text can be compressed to half the normal width. * - ``weight`` - - [[type:scriptable]] font weight + - :ref:`scriptable` font weight - ``"normal"`` - - Weight of the font, one of ``"normal"@ or @"bold"``. This can be changed locally by [[type:tagged string|tags]]. + - Weight of the font, one of ``"normal"@ or @"bold"``. This can be changed locally by :ref:`tagged string|tags`. * - ``style`` - - [[type:scriptable]] font style + - :ref:`scriptable` font style - ``"normal"`` - - Style of the font, one of ``"normal"@ or @"italic"``. This can be changed locally by [[type:tagged string|tags]]. + - Style of the font, one of ``"normal"@ or @"italic"``. This can be changed locally by :ref:`tagged string|tags`. * - ``underline`` - - [[type:scriptable]] [[type:boolean]] + - :ref:`scriptable` :ref:`boolean` - ``false`` - Should the font be underlined? * - ``color`` - - [[type:scriptable]] [[type:color]] + - :ref:`scriptable` :ref:`color` - ``rgb(0,0,0)`` - What color should text be drawn in? * - ``shadow color`` - - [[type:scriptable]] [[type:color]] + - :ref:`scriptable` :ref:`color` - ``"transparent"`` - Color for a shadow below the text. * - ``shadow displacement x`` - - [[type:double]] + - :ref:`double` - ``0`` - Relative position of the shadow in pixels. * - ``shadow displacement y`` - - [[type:double]] + - :ref:`double` - ``0`` - ^^^ * - ``shadow blur`` - - [[type:double]] + - :ref:`double` - ``0`` - How much should the shadow be blurred? * - ``separator color`` - - [[type:color]] + - :ref:`color` - ``rgba(0,0,0,128)`` - - Color for ```` tags inserted by the [[fun:combined_editor]] function. + - Color for ```` tags inserted by the :doc:`/function#combined_editor` function. **Example** @@ -3201,7 +3201,7 @@ A part of a symbol, corresponds to an item you see in the list on the left of th * ``group`` * ``symmetry`` * - ``name`` - - [[type:string]] + - :ref:`string` - ``""`` - The name of this part, for the part list. @@ -3219,12 +3219,12 @@ The rest of the properties depends on the ``type``. - Description * - ``"shape"`` - ``combine`` - - [[type:symbol combine]] + - :ref:`symbol combine` - ``"overlap"`` - How to combine the shape with those below it? * - ^^^ - ``points`` - - [[type:list]] of [[type:control point]]s + - :ref:`list` of :ref:`control point`s - - The points that form this shape * - ``"symmetry"`` @@ -3234,21 +3234,21 @@ The rest of the properties depends on the ``type``. - What kind of symmetry is this? * - ^^^ - ``copies`` - - [[type:int]] + - :ref:`int` - 2 - How many times is the original copied (including the original itself)? * - ^^^ - ``center`` - - [[type:vector2d]] + - :ref:`vector2d` - - Coordinates of the center of symmetry. * - ^^^ - ``handle`` - - [[type:vector2d]] + - :ref:`vector2d` - - Direction perpendicular to the 'mirror' (this is a direction, so relative to the center). * - ``"group"@ and @"symmetry"`` - ``parts`` [[type:list]] of [[type:symbol part]]s Parts in this group. + ``parts`` :ref:`list` of :ref:`symbol part`s Parts in this group. **Example** @@ -3260,7 +3260,7 @@ Control Point **Overview** -A single [[http://en.wikipedia.org/wiki/Bezier_curve|Bézier curve]] control point in a [[type:symbol part|symbol shape]]. +A single [[http://en.wikipedia.org/wiki/Bezier_curve|Bézier curve` control point in a :ref:`symbol part|symbol shape`. A control point is a point on the polygon. It also optionally has two 'handles' corresponding to the boxes attached with dotted lines in the editor. @@ -3279,7 +3279,7 @@ The control points of a shape are circular, the point after the last point in th - Default - Description * - ``position`` - - [[type:vector2d]] + - :ref:`vector2d` - - Position of the control point. * - ``lock`` @@ -3293,11 +3293,11 @@ The control points of a shape are circular, the point after the last point in th - ``"line"`` - Is the segment between this control point and the next one in the list a straight line or a cubic Bézier curve? * - ``handle before`` - - [[type:vector2d]] + - :ref:`vector2d` - - Position of the handle for the segment between this point and the previous one, relative to the point's ``position@.
    Only when that point's @line after == "curve"``. * - ``handle after`` - - [[type:vector2d]] + - :ref:`vector2d` - - Position of the handle for the segment between this point and the next one, relative to the point's ``position@.
    Only when @line after == "curve"``. @@ -3396,13 +3396,13 @@ There are several functions for working with lists: :stub-columns: 1 :align: left - * - [[fun:position]] + * - :doc:`/function#position` - Find the position of an element in a list - * - [[fun:number_of_items]] + * - :doc:`/function#number_of_items` - Return the number of items in a list - * - [[fun:sort_list]] + * - :doc:`/function#sort_list` - Sort a list - * - [[fun:filter_list]] + * - :doc:`/function#filter_list` - Filter a list, keeping only elements that match a predicate @@ -3411,7 +3411,7 @@ Field Map **Overview** -A 'field map' is a [[type:map]], but indexed by [[type:field]]s. +A 'field map' is a :ref:`map`, but indexed by :ref:`field`s. For instance if a game specifies the fields: @@ -3431,14 +3431,14 @@ Then the a field map of ''things'' for those fields would look like: field1: thing field2: thing -A field map of [[type:style]]s would be: +A field map of :ref:`style`s would be: .. code-block:: field1: # some text style for field1 goes here field2: # some color style for field2 goes here -And a field map of [[type:value]]s would be: +And a field map of :ref:`value`s would be: .. code-block:: @@ -3447,7 +3447,7 @@ And a field map of [[type:value]]s would be: **Script syntax** -In a script field maps can be accessed like normal [[type:map]]s based on the field name. +In a script field maps can be accessed like normal :ref:`map`s based on the field name. So: .. code-block:: @@ -3460,11 +3460,11 @@ So: Map ~~~ -A map is like a [[type:list]] with [[type:string]] keys. +A map is like a :ref:`list` with :ref:`string` keys. **File syntax** In files a map is represented as key/value pairs. -For instance a map of [[type:color]]s could be: +For instance a map of :ref:`color`s could be: .. code-block:: @@ -3544,14 +3544,14 @@ Script **Overview** -A script object is a piece of code written in the [[script:index|MSE scripting language]]. +A script object is a piece of code written in the [[script:index|MSE scripting language`. **File syntax** -A script is given in the same way as a [[type:string]]. +A script is given in the same way as a :ref:`string`. **Example** -A simple [[type:field]] script that converts everything to upper case: +A simple :ref:`field` script that converts everything to upper case: .. code-block:: @@ -3572,7 +3572,7 @@ Scriptable **Overview** -Many [[type:style]] properties are ''scriptable''; their value can be changed by a script. +Many :ref:`style` properties are ''scriptable''; their value can be changed by a script. Consider for example: @@ -3624,10 +3624,10 @@ Image Images are generated using scripts. -It is either given using a [[type:filename]] or as the output of a function. +It is either given using a :ref:`filename` or as the output of a function. **File syntax** -The syntax for files is similair to that of [[type:scriptable]] properties: +The syntax for files is similair to that of :ref:`scriptable` properties: .. code-block:: @@ -3636,7 +3636,7 @@ The syntax for files is similair to that of [[type:scriptable]] properties: image: { linear_blend(...) } **Script syntax** -[[type:Filename]]s are implicitly converted to images as needed. +:ref:`Filename`s are implicitly converted to images as needed. **See also** The following functions transform images: @@ -3646,27 +3646,27 @@ The following functions transform images: :stub-columns: 1 :align: left - * - [[fun:linear_blend]] + * - :doc:`/function#linear_blend` - Blend two images together using a linear gradient. - * - [[fun:masked_blend]] + * - :doc:`/function#masked_blend` - Blend two images together using a third mask image. - * - [[fun:combine_blend]] - - Blend two images together using a given [[type:combine|combining mode]]. - * - [[fun:set_mask]] + * - :doc:`/function#combine_blend` + - Blend two images together using a given :ref:`combine|combining mode`. + * - :doc:`/function#set_mask` - Set the transparancy mask of an image. - * - [[fun:set_alpha]] + * - :doc:`/function#set_alpha` - Change the transparency of an image. - * - [[fun:set_combine]] + * - :doc:`/function#set_combine` - Chnage how the image should be combined with the background. - * - [[fun:enlarge]] + * - :doc:`/function#enlarge` - Enlarge an image by putting a border around it. - * - [[fun:crop]] + * - :doc:`/function#crop` - Crop an image, giving only a small subset of it. - * - [[fun:drop_shadow]] + * - :doc:`/function#drop_shadow` - Add a drop shadow to an image. - * - [[fun:symbol_variation]] - - Render a variation of a [[type:symbol]]. - * - [[fun:built_in_image]] + * - :doc:`/function#symbol_variation` + - Render a variation of a :ref:`symbol`. + * - :doc:`/function#built_in_image` - Return an image built into the program. @@ -3674,7 +3674,7 @@ Function ~~~~~~~~ **Overview** -The [[script:index|scripting language]] allows you to define custom functions. +The [[script:index|scripting language` allows you to define custom functions. **Syntax** A piece of code enclosed in curly braces defines a function. @@ -3689,7 +3689,7 @@ Functions can be composed using the ``+@ operator, evaluating @a + b@ first eval example := to_upper + { "result == {input}" } example("xyz") == "result == XYZ" -Multiple functions can be changed together like this, this is especially convenient in combination with [[script:default arguments]]. +Multiple functions can be changed together like this, this is especially convenient in combination with [[script:default arguments`. **Example** @@ -3732,7 +3732,7 @@ Enumerations * - :doc:`combine <#combine>` - How to combine images with the background. * - :doc:`symbol combine <#symbol combine>` - - How to combine [[type:symbol part|symbol shapes]] with the background. + - How to combine :ref:`symbol part|symbol shapes` with the background. * - :doc:`graph type <#graph type>` - Type of statistics graphs. @@ -3841,7 +3841,7 @@ Combine This specifies how an image is to be combined with the background. This is similair to the feature found in more advanced drawing programs. -The formula's are from [[http://www.pegtop.net/delphi/articles/blendmodes/]]. +The formula's are from [[http://www.pegtop.net/delphi/articles/blendmodes/`. **Script syntax** In scripts, combine modes are stored as a string. @@ -4085,7 +4085,7 @@ The backslash character is used to escape values: * - ``\\`` - A backslash * - ``\<`` - - An escaped < for [[type:tagged string]]s. + - An escaped < for :ref:`tagged string`s. Sections between curly braces are interpreted as script code, that is concatentated with the string, for example @@ -4094,7 +4094,7 @@ Sections between curly braces are interpreted as script code, that is concatenta "ab{1 + 1}c" == "ab2c" This can be nested arbitrarily. -The ``+`` operator concatenates strings. Numbers and most other values are automatically converted to strings when needed. This conversion can be forced with the [[fun:to_string]] function. +The ``+`` operator concatenates strings. Numbers and most other values are automatically converted to strings when needed. This conversion can be forced with the :doc:`/function#to_string` function. Using the ``[]@ or @.`` operator characters in a string can be selected. 0 is the first character: @@ -4117,17 +4117,17 @@ It is an error to select characters outside the string :stub-columns: 1 :align: left - * - [[type:tagged string]] + * - :ref:`tagged string` - A string containg tags. - * - [[fun:to_string]] - - Convert any value to a [[type:string]] + * - :doc:`/function#to_string` + - Convert any value to a :ref:`string` Tagged String ~~~~~~~~~~~~~ **Syntax** -Strings in [[type:value|text values]] can contain markup tags. +Strings in :ref:`value|text values` can contain markup tags. These tags affect the presentation and sometimes the behaviour of the text. A tag is something like ``"some text"``, similar to HTML. @@ -4150,23 +4150,23 @@ This is written as the character with code 1 in files. * - ```` - The text inside the tag is italic. * - ```` - - The text inside the tag is rendered as symbols, if a [[prop:style:symbol font]] is set for the text box. + - The text inside the tag is rendered as symbols, if a [[prop:style:symbol font` is set for the text box. * - ```` - - The text inside the tag is rendered with the given [[type:color]]. + - The text inside the tag is rendered with the given :ref:`color`. * - ```` - The text inside the tag is rendered with the given font size in points, for example ``"text"@ makes the text 12 points. The text is scaled down proportionally when it does not fit in a text box and the @scale down to`` attribute allows it. * - ```` - The text inside the tag is rendered with the given font family. * - ```` - - The block inside the tag is aligned with the given horizontal [[type:alignment]] + - The block inside the tag is aligned with the given horizontal :ref:`alignment` * - ```` - The block inside the tag has additional left, right (optional), and top (optional) margins of the specified size in pixels. * - ``
  • `` - The text inside the tag is treated as a list marker, meaning that if the line wraps it will be indented to match the content of the ``
  • `` tag. * - ```` - - Line breaks inside this tag use the [[prop:style:line height line]], and they show a horizontal line. + - Line breaks inside this tag use the [[prop:style:line height line`, and they show a horizontal line. * - ```` - - Line breaks inside this tag use the [[prop:style:soft line height]]. + - Line breaks inside this tag use the [[prop:style:soft line height`. * - ```` - An atomic piece of text. The cursor can never be inside it; it is selected as a whole. The program automatically inserts ````. @@ -4188,31 +4188,31 @@ This is written as the character with code 1 in files. - Description * - ```` - Indicates that the text inside it is a keyword. This tag is automatically inserted by - The [[fun:expand_keywords]] function.
    + The :doc:`/function#expand_keywords` function.
    There are four versions, indicating whether or not reminder text is shown: * ````, Reminder text hidden, by default * ````, Reminder text shown, by default * ````, Reminder hidden manually * ````, Reminder shown manually * - ```` - - A separator between fields. This tag is automatically inserted by the [[fun:combined_editor]] function.
    + - A separator between fields. This tag is automatically inserted by the :doc:`/function#combined_editor` function.
    Inserting this tag manually will confuse that function!
    This tag can never be selected, and its contents can not be edited. * - ```` - - At the beginning of a string, indicates a part that can not be selected. This tag is automatically inserted by the [[fun:combined_editor]] function. + - At the beginning of a string, indicates a part that can not be selected. This tag is automatically inserted by the :doc:`/function#combined_editor` function. * - ```` - - At the end of a string, indicates a part that can not be selected. This tag is automatically inserted by the [[fun:combined_editor]] function. + - At the end of a string, indicates a part that can not be selected. This tag is automatically inserted by the :doc:`/function#combined_editor` function. * - ```` - - Like ````, only hidden. This is inserted by [[fun:combined_editor]] + - Like ````, only hidden. This is inserted by :doc:`/function#combined_editor` * - ```` - Text who's width is ignored for alignment, similar to ````, but not a separator. * - ```` - - Indicate that the text inside the tag should be selected from a [[type:word list]]. + - Indicate that the text inside the tag should be selected from a :ref:`word list`. The ??? must be the name of a word list in the game. * - ```` - The text inside the tag is an error, and is shown with a red wavy underline. * - ```` - - A spelling error, marked by the [[fun::check_spelling]] function. + - A spelling error, marked by the :doc:`/function#:check_spelling` function. The ??? part indicates the language used for spelling checking. * - any other tag - Other tags are ignored. @@ -4226,24 +4226,24 @@ The following script functions deal with tags: :stub-columns: 1 :align: left - * - [[fun:tag_contents]] + * - :doc:`/function#tag_contents` - Change the contents of a specific tag. - * - [[fun:remove_tag]] + * - :doc:`/function#remove_tag` - Remove a tag, keep the contents. - * - [[fun:remove_tags]] + * - :doc:`/function#remove_tags` - Remove all tags from tagged text. - * - [[fun:to_text]] - - Remove all tags from tagged text, and convert it to a [[type:string]]. + * - :doc:`/function#to_text` + - Remove all tags from tagged text, and convert it to a :ref:`string`. Localized String ~~~~~~~~~~~~~~~~ -A 'localized string' is a [[type:map]] of [[type::string]]s, indexed by locale name. +A 'localized string' is a :ref:`map` of :ref:`:string`s, indexed by locale name. It is used to translate games and stylesheets to other user interface languages. Localized strings can be given with a ``localized`` prefix on the property name. -For example, a field has a ``description@ which is a [[type::string]], and a @localized_description`` for localized variants. So +For example, a field has a ``description@ which is a :ref:`:string`, and a @localized_description`` for localized variants. So .. code-block:: @@ -4259,7 +4259,7 @@ For example, a field has a ``description@ which is a [[type::string]], and a @lo Filename ~~~~~~~~ -Filenames are regular [[type:string]]s, pointing to a file. +Filenames are regular :ref:`string`s, pointing to a file. There are two types of filenames, relative and absolute: .. list-table:: @@ -4278,8 +4278,8 @@ There are two types of filenames, relative and absolute: Don't forget the double quotes (``""``) in scripts. **Dependencies** -When using an absolute filename to refer to a file from another [[file:package]], -the [[type:dependency]] on that package must be declared. +When using an absolute filename to refer to a file from another :doc:`/file/package`, +the :ref:`dependency` on that package must be declared. For example, .. code-block:: @@ -4299,8 +4299,8 @@ __________ **Overview** -[[type:Package]]s can depend on other packages. -For example a [[type:stylesheet]] needs a particular version of the corresponding [[type:game]] package, and maybe some additional [[type:include]]s. +:ref:`Package`s can depend on other packages. +For example a :ref:`stylesheet` needs a particular version of the corresponding :ref:`game` package, and maybe some additional :ref:`include`s. **Properties** @@ -4313,10 +4313,10 @@ For example a [[type:stylesheet]] needs a particular version of the correspondin - Type - Description * - ``package`` - - [[type:string]] + - :ref:`string` - Filename of the package this package depends on. * - ``version`` - - [[type:version]] + - :ref:`version` - Minimal version of that package that is required. The two properties can also be written on a single line, separated by a space (see the examples). @@ -4340,14 +4340,14 @@ This can be written more compactly as Regex ~~~~~ -Regular expressions (regexes) are things that can match parts of [[type:string]]s. +Regular expressions (regexes) are things that can match parts of :ref:`string`s. -Regexes are represented by normal [[type:string]]s. +Regexes are represented by normal :ref:`string`s. Note that to escape something in a regex the backslash is used, in script code this also needs to be escaped. For example, in a script, the regex matching a single backslash is ``"\\\\"``. For more information, see -[[http://www.wxwidgets.org/manuals/stable/wx_wxresyn.html|the wxWidgets regular expression documentation]]. +[[http://www.wxwidgets.org/manuals/stable/wx_wxresyn.html|the wxWidgets regular expression documentation`. Boolean @@ -4414,7 +4414,7 @@ The operators ``or@, @and@ and @xor`` combine two booleans: :stub-columns: 1 :align: left - * - [[fun:to_boolean]] + * - :doc:`/function#to_boolean` - Convert a value to a boolean @@ -4443,9 +4443,9 @@ In many cases negative numbers don't make sense, but the program never complains :stub-columns: 1 :align: left - * - [[type:double]] + * - :ref:`double` - Number type that can contain fractional values. - * - [[fun:to_int]] + * - :doc:`/function#to_int` - Convert a value to an integer number @@ -4476,9 +4476,9 @@ Conversion from integer to real numbers happens automatically in scripting. :stub-columns: 1 :align: left - * - [[type:int]] + * - :ref:`int` - Integer numbers - * - [[fun:to_real]] + * - :doc:`/function#to_real` - Convert a value to a real number @@ -4517,10 +4517,10 @@ For example, #ff0000 is red, as is #f00 **Named colors** MSE also supports named colors, for instance ``"white"@ is the same as @rgb(255,255,255)``. -For a full list of supported colors, see [[https://docs.wxwidgets.org/3.0/classwx_colour_database.html|the wxWidgets documentation]]. +For a full list of supported colors, see [[https://docs.wxwidgets.org/3.0/classwx_colour_database.html|the wxWidgets documentation`. In addition, the named color ``"transparent"@ stands for the completely transparent color, @rgba(0,0,0,0)``. -In scripts named colors are represented as [[type:string]]s. +In scripts named colors are represented as :ref:`string`s. **Examples** For example: @@ -4559,7 +4559,7 @@ For example: -
    over
    **See also** - * - [[fun:to_color]] + * - :doc:`/function#to_color` - Convert any value to a color Date @@ -4568,7 +4568,7 @@ Date DOC_MSE_VERSION: since 0.3.8 A point in time, consisting of a date and a time. -The file syntax uses [[http://en.wikipedia.org/wiki/ISO_8601|ISO 8601]] notation. +The file syntax uses [[http://en.wikipedia.org/wiki/ISO_8601|ISO 8601` notation. **File syntax** @@ -4583,9 +4583,9 @@ The file syntax uses [[http://en.wikipedia.org/wiki/ISO_8601|ISO 8601]] notation :stub-columns: 1 :align: left - * - [[fun:to_date]] + * - :doc:`/function#to_date` - Convert a value to a date - * - [[fun:to_string]] + * - :doc:`/function#to_string` - Convert dates to strings @@ -4593,7 +4593,7 @@ The file syntax uses [[http://en.wikipedia.org/wiki/ISO_8601|ISO 8601]] notation Choice ~~~~~~ -A possible choice for a choice [[type:field]]. +A possible choice for a choice :ref:`field`. **Properties** @@ -4607,23 +4607,23 @@ A possible choice for a choice [[type:field]]. - Default - Description * - ``name`` - - [[type:string]] + - :ref:`string` - ''Required'' - Name of this choice, displayed in the drop down list. * - ``line below`` - - [[type:boolean]] + - :ref:`boolean` - ``false`` - Display a line below this item? * - ``group choice`` - - [[type:string]] + - :ref:`string` - ''no'' - Can this submenu of choices itself be selected? * - ``choices`` - - [[type:list]] of [[type:choice]]s + - :ref:`list` of :ref:`choice`s - - Submenu of choices. * - ``enabled`` - - [[type:scriptable]] [[type:boolean]] + - :ref:`scriptable` :ref:`boolean` - - Is this choice selectable? * - ``type`` @@ -4674,7 +4674,7 @@ Is the same as: Color Choice ~~~~~~~~~~~~ -A possible choice for a color [[type:field]]. +A possible choice for a color :ref:`field`. **Properties** @@ -4687,10 +4687,10 @@ A possible choice for a color [[type:field]]. - Type - Description * - ``name`` - - [[type:string]] + - :ref:`string` - Name of this choice, displayed in the drop down list. * - ``color`` - - opaque [[type:color]] + - opaque :ref:`color` - Color this choice corresponds with. **Example** @@ -4708,7 +4708,7 @@ Vector2D AKA: Two Dimensional Vector A coordinate or direction in a symbol. -This is a pair of [[type:double]]s. +This is a pair of :ref:`double`s. The coordinates are usually in the range ``0@ to @1``. ``(0,0)@ is the top-left of the symbol, @(1,1)`` the bottom-right. From d36a6da3499b0c4b6e6211bd01030e99f223a941 Mon Sep 17 00:00:00 2001 From: Brendan Hagan Date: Wed, 31 Aug 2022 21:12:18 -0400 Subject: [PATCH 21/24] fix: additional inline code --- docs/type/index.rst | 124 ++++++++++++++++++++++---------------------- 1 file changed, 62 insertions(+), 62 deletions(-) diff --git a/docs/type/index.rst b/docs/type/index.rst index 362f6f39..f3b1fa27 100644 --- a/docs/type/index.rst +++ b/docs/type/index.rst @@ -372,7 +372,7 @@ such a package contains a data file called set. - Name of a :ref:`stylesheet` - ''required'' - The default style for drawing cards in this set.
    - This is without the game name or extension, so ``"new"@ refers to the package @"gamename-new.mse-style"``. + This is without the game name or extension, so ``"new"`` refers to the package ``"gamename-new.mse-style"``. * - ``set info`` - :ref:`indexmap` of :ref:`value`s - @@ -503,7 +503,7 @@ How that happens depends on the ``select`` property: - Description * - ``all`` - Each instance of this pack type contains all of the filtered cards and ``items``.
    - In general, ``select: all@ is used for the selectable pack types, while other @select`` types are used for the rest of the packs.
    + In general, ``select: all`` is used for the selectable pack types, while other ``select`` types are used for the rest of the packs.
    This is the default for pack types with ``items``. * - ``replace`` - Each instance of this pack type contains a single card or ``item``, chosen at random with replacement. @@ -522,9 +522,9 @@ How that happens depends on the ``select`` property: * - ``equal`` - Instead of choosing cards and items at random, they are chosen to make their numbers as equal as possible. * - ``equal proportional`` - - A combination of ``equal@ and @proportional``. + - A combination of ``equal`` and ``proportional``. * - ``equal nonempty`` - - A combination of ``equal@ and @nonempty``. + - A combination of ``equal`` and ``nonempty``. * - ``first`` - If there are any cards, the first is always chosen, otherwise the first ''nonempty'' item is used.
    ``select: first`` can be used to make a kind of if statement: "If there are any X cards then use those, otherwise use Y cards". @@ -859,7 +859,7 @@ A single symbol in a :ref:`symbol font`. * - ``draw text`` - :ref:`int` - ``-1`` - - The index of the captured regex expression to draw as text, or -1 to not draw text.
    For example with the code ``"x([a-z])"@ and @draw text: 1@ the text of the symbol @"xb"@ will be @"b"``. + - The index of the captured regex expression to draw as text, or -1 to not draw text.
    For example with the code ``"x([a-z])"`` and ``draw text: 1`` the text of the symbol ``"xb"`` will be ``"b"``. * - ``text font`` - :ref:`font` - @@ -933,7 +933,7 @@ The menu consists of a number of entries, either items, separators or submenus. - Description * - ``type`` - One of: - - ``"code"@ or @"submenu"`` + - ``"code"`` or ``"submenu"`` - What type of menu item is this? * ``code``, inserts a symbol with the given code. * ``custom``, pops up a dialog where the user can choose a code to insert. @@ -954,9 +954,9 @@ The menu consists of a number of entries, either items, separators or submenus. * - ``items`` - :ref:`list` of :ref:`insert symbol menu|submenu items` - - - Items in the submenu, when items are present the ``type@ is set to @"submenu"``. + - Items in the submenu, when items are present the ``type`` is set to ``"submenu"``. -For custom items the dialog will be titled with the ``label@ and have message text @prompt``. +For custom items the dialog will be titled with the ``label`` and have message text ``prompt``. **Examples** A menu for magic mana symbols (simplified). Containing all types of items. @@ -1241,7 +1241,7 @@ Look at the ``"en.mse-locale"`` file in the standard MSE distribution for an exa **Translating MSE** To translate the MSE user interface: -* Create a copy of the ``"en.mse-locale"@ directory, name it @"**.mse-locale"@, where @"**"`` is a two or three letter [[http://en.wikipedia.org/wiki/ISO_language_code|ISO language code`. +* Create a copy of the ``"en.mse-locale"`` directory, name it ``"**.mse-locale"``, where ``"**"`` is a two or three letter [[http://en.wikipedia.org/wiki/ISO_language_code|ISO language code`. * Open the ``"locale"`` file with Notepad (or another program that supports UTF-8), and translate the strings. * Add new keys for game, stylesheet or symbol font specific keys as described above. * Save the file, select the new locale from Edit->Preferences. @@ -1318,7 +1318,7 @@ Symbols are not stored in packages, the data file is directly written to a ``".m **Coordinates** Various parts of a symbol use :ref:`vector2d|coordinates`. -These are pairs of numbers in the range ``0@ to @1@. @(0,0)@ is the top-left of the symbol, @(1,1)`` the bottom-right. +These are pairs of numbers in the range ``0`` to ``1``. ``(0,0)`` is the top-left of the symbol, ``(1,1)`` the bottom-right. **Properties** @@ -1534,7 +1534,7 @@ The ``type`` determines what values of this field contain: - A choice from a list of installed :ref:`package`s - Text and/or an image * - ``boolean`` - - ``yes@ or @no`` + - ``yes`` or ``no`` - Text or an image or both * - ``color`` - Any color or a restricted selection from a list @@ -1627,7 +1627,7 @@ Additional properties are available, depending on the type of field: To refer to a combination of values in the initial attribute use ``choice1, choice2, choice3``.
    These choices must appear in the same order as they do in the ``choices`` property. * - ``"boolean"`` - - ''A boolean field is a choice field with the choices ``"yes"@ and @"no"``.'' + - ''A boolean field is a choice field with the choices ``"yes"`` and ``"no"``.'' - <<< - <<< - <<< @@ -1638,7 +1638,7 @@ Additional properties are available, depending on the type of field: - ``match`` - :ref:`string` - ''required'' - - Filenames of the packages to match, can include wildcards ``"*"@. For example @"magic-mana-*.mse-symbol-font"``. + - Filenames of the packages to match, can include wildcards ``"*"``. For example ``"magic-mana-*.mse-symbol-font"``. * - ^^^ - ``initial`` - :ref:`string` @@ -1764,7 +1764,7 @@ Styles are part of the :doc:`/file/style triangle`: A style specifies the position of a box for the content. -To specify the horizontal location ''two'' of ``left@, @width@ and @right`` must be specified. +To specify the horizontal location ''two'' of ``left``, ``width`` and ``right`` must be specified. For example: @@ -1782,7 +1782,7 @@ Similarly: right: 30 Implies the ``width`` is 20. -The same holds for the vertical location and size; ``top@, @height@ and @bottom``. +The same holds for the vertical location and size; ``top``, ``height`` and ``bottom``. **Rotation** Rotating a box can be done with the ``angle`` property. @@ -1965,7 +1965,7 @@ The rest of the properties depend on the type of :ref:`field` this style is for. - :ref:`scriptable` :ref:`double` - ``1`` - Multiplier for the line height of 'soft' line breaks. These are breaks caused by wrapping around lines that are too long.
    - A line height of ``0@ means all lines are in the same position, @1@ is normal behaviour, @2`` skips a line, etc. + A line height of ``0`` means all lines are in the same position, ``1`` is normal behaviour, ``2`` skips a line, etc. * - ^^^ - ``line height hard`` - :ref:`scriptable` :ref:`double` @@ -2028,8 +2028,8 @@ The rest of the properties depend on the type of :ref:`field` this style is for. - When read from a script, gives the number of lines of the current content in this box. Equivalent to ``length(layout.lines)`` ! <<< <<< <<< <<< - * - ``"choice"@,
    @"multiple choice"@,
    @"boolean"`` - ``popup style@ @"drop down"@ or @"in place"@ @"drop down"`` Where to place the drop down box for editing the value.
    + * - ``"choice"``,
    ``"multiple choice"``,
    ``"boolean"`` + ``popup style`` ``"drop down"`` or ``"in place"`` ``"drop down"`` Where to place the drop down box for editing the value.
    ``"drop down"`` places the box below the field, similar to normal combo boxes.
    ``"in place"`` places the box at the mouse coordinates. * - ^^^ @@ -2076,7 +2076,7 @@ The rest of the properties depend on the type of :ref:`field` this style is for. - ''automatic'' - When read from a script, gives the height of the current choice image in this box. * - ``"multiple choice"`` - ``direction@ :ref:`scriptable` :ref:`direction` @"left to right"@ Direction the items are laid out in, only when @render style@ is @list``. + ``direction`` :ref:`scriptable` :ref:`direction` ``"left to right"`` Direction the items are laid out in, only when ``render style`` is ``list``. * - ^^^ - ``spacing`` - :ref:`scriptable` :ref:`double` @@ -2269,7 +2269,7 @@ A variation of a symbol, describes color and border. - ``0.05`` - Border radius of the symbol. * - ``fill type`` - - ``solid@ or @linear gradient@ or @radial gradient`` + - ``solid`` or ``linear gradient`` or ``radial gradient`` ``"solid"`` How to fill the symbol. Depending on the ``fill type`` there are additional properties: @@ -2308,11 +2308,11 @@ Depending on the ``fill type`` there are additional properties: - :ref:`color` - Color to use for the border of the symbol at the ends of the gradient. * - ^^^ - - ``center x@, @center y`` + - ``center x``, ``center y`` - :ref:`double` - Position of the center point of the gradient (in the range 0 to 1) * - ^^^ - - ``end x@, @end y`` + - ``end x``, ``end y`` - :ref:`double` - Position of the end point of the gradient (in the range 0 to 1) * - ``"radial gradient"`` @@ -2465,7 +2465,7 @@ The type of a value depends on the corresponding field: - Name of a package - The (file)name of a package, including the extension. * - ``"boolean"`` - - ``"yes"@ or @"no"`` + - ``"yes"`` or ``"no"`` - This can be directly used as a :ref:`boolean` value in scripts. * - ``"image"`` - :ref:`filename` @@ -2549,7 +2549,7 @@ A '''card''' in a :ref:`set`. - :ref:`indexmap` of :ref:`value`s - - The remaining keys contain the data for the game's ``card fields``.
    - So for example ``card.some_field@ corresponds to the value of the card field @some field``. + So for example ``card.some_field`` corresponds to the value of the card field ``some field``. **Examples** @@ -2619,10 +2619,10 @@ A keyword is something that matches a piece of text, and optionally some kind of - - Mode of this keyword. -The match string can include parameters, ``"type"@ where @"type"`` is the name of a :ref:`keyword param type|keyword parameter type` in the game. +The match string can include parameters, ``"type"`` where ``"type"`` is the name of a :ref:`keyword param type|keyword parameter type` in the game. These will match according to the ``match`` property of that parameter type. -When expanding the reminder text ``param1@ refers to the first parameter in the match string, @param2`` to the second, etc. +When expanding the reminder text ``param1`` refers to the first parameter in the match string, ``param2`` to the second, etc. **Example** @@ -2714,7 +2714,7 @@ A type of parameter that can be used in a :ref:`keyword`. * - ``optional`` - :ref:`boolean` - ``true`` - - Is a placeholder used when a keyword is encountered with no parameter,
    for example ``"Cycling "@ would become @"Cycling cost"``. + - Is a placeholder used when a keyword is encountered with no parameter,
    for example ``"Cycling "`` would become ``"Cycling cost"``. * - ``match`` - :ref:`regex` - ''required'' @@ -2731,7 +2731,7 @@ A type of parameter that can be used in a :ref:`keyword`. - :ref:`boolean` - ``true`` - Allow the user to 'type over' the separator.
    - For example if the separator is ``" "@ in the keyword @"Cycling"@, and the user types @"Cycling"``, + For example if the separator is ``" "`` in the keyword ``"Cycling"``, and the user types ``"Cycling"``, a space and a placeholder is automatically inserted, making ``"Cycling "``. If the user now presses space the cursor is only moved, no additional space is inserted, the space is 'eaten'. * - ``script`` @@ -2805,7 +2805,7 @@ To make this easy for the user, a menu of choices is provided, this type describ - ''required'' - Script that generates the code using the parameter.
    This means you will likely need to do some escaping.
    - In the script, ``input@ refers to the name of the parameter, for example @"param1"``. + In the script, ``input`` refers to the name of the parameter, for example ``"param1"``. **Example** Apply the :doc:`/function#english_number` function to the parameter: @@ -2828,7 +2828,7 @@ A dimension or axis for the statistics panel. One or more dimensions are combined in a graph, these combinations are called :ref:`statistics category`s. -Statistics dimensions are automatically generated for all card fields in a :ref:`game` that don't set ``show statistics@ to @false``. +Statistics dimensions are automatically generated for all card fields in a :ref:`game` that don't set ``show statistics`` to ``false``. Categories are also automatically generated from dimensions. @@ -2871,7 +2871,7 @@ Categories are also automatically generated from dimensions. - :ref:`double` - ''none'' - For numeric dimensions: group numbers together into bins this large.
    - For example with ``bin size: 5@, values @1@ and @3@ both get put under @"1-5"``. + For example with ``bin size: 5``, values ``1`` and ``3`` both get put under ``"1-5"``. * - ``show empty`` - :ref:`boolean` - ``false`` @@ -3130,11 +3130,11 @@ A reference to a normal :ref:`font` for drawing text. * - ``weight`` - :ref:`scriptable` font weight - ``"normal"`` - - Weight of the font, one of ``"normal"@ or @"bold"``. This can be changed locally by :ref:`tagged string|tags`. + - Weight of the font, one of ``"normal"`` or ``"bold"``. This can be changed locally by :ref:`tagged string|tags`. * - ``style`` - :ref:`scriptable` font style - ``"normal"`` - - Style of the font, one of ``"normal"@ or @"italic"``. This can be changed locally by :ref:`tagged string|tags`. + - Style of the font, one of ``"normal"`` or ``"italic"``. This can be changed locally by :ref:`tagged string|tags`. * - ``underline`` - :ref:`scriptable` :ref:`boolean` - ``false`` @@ -3229,7 +3229,7 @@ The rest of the properties depends on the ``type``. - The points that form this shape * - ``"symmetry"`` - ``kind`` - - ``rotation@ or @reflection`` + - ``rotation`` or ``reflection`` - ``"rotation"`` - What kind of symmetry is this? * - ^^^ @@ -3247,7 +3247,7 @@ The rest of the properties depends on the ``type``. - :ref:`vector2d` - - Direction perpendicular to the 'mirror' (this is a direction, so relative to the center). - * - ``"group"@ and @"symmetry"`` + * - ``"group"`` and ``"symmetry"`` ``parts`` :ref:`list` of :ref:`symbol part`s Parts in this group. @@ -3283,23 +3283,23 @@ The control points of a shape are circular, the point after the last point in th - - Position of the control point. * - ``lock`` - - ``free@, @direction@ or @size`` + - ``free``, ``direction`` or ``size`` - ``"free"`` Is this point 'locked', i.e. is the relation between the two handles fixed?
    - If ``lock@ is @"direction"`` then the two handles must lie on a line.
    - If ``lock@ is @"direction"`` then the two handles must lie exactly oppisite each other on the same distance from the point. + If ``lock`` is ``"direction"`` then the two handles must lie on a line.
    + If ``lock`` is ``"direction"`` then the two handles must lie exactly oppisite each other on the same distance from the point. * - ``line after`` - - ``line@ or @curve`` + - ``line`` or ``curve`` - ``"line"`` - Is the segment between this control point and the next one in the list a straight line or a cubic Bézier curve? * - ``handle before`` - :ref:`vector2d` - - - Position of the handle for the segment between this point and the previous one, relative to the point's ``position@.
    Only when that point's @line after == "curve"``. + - Position of the handle for the segment between this point and the previous one, relative to the point's ``position``.
    Only when that point's ``line after == "curve"``. * - ``handle after`` - :ref:`vector2d` - - - Position of the handle for the segment between this point and the next one, relative to the point's ``position@.
    Only when @line after == "curve"``. + - Position of the handle for the segment between this point and the next one, relative to the point's ``position``.
    Only when ``line after == "curve"``. **Example** Look at a symbol file made with the program. @@ -3349,7 +3349,7 @@ List **File syntax** In files a list is represented as multiple keys, one for each element. The keys are all in the singular for of the name of the list, -if the list is named for instance ``symbols@ each key will be named @symbol``. +if the list is named for instance ``symbols`` each key will be named ``symbol``. .. code-block:: @@ -3557,7 +3557,7 @@ A simple :ref:`field` script that converts everything to upper case: script: to_upper(value) -A larger script, changes ``"y"@s to @"x"@s and @"a"@s to @"b"``s: +A larger script, changes ``"y"``s to ``"x"``s and ``"a"``s to ``"b"``s: .. code-block:: @@ -3682,7 +3682,7 @@ A piece of code enclosed in curly braces defines a function. A function can be called using parentheses, for example ``function(argument:value)``. **Composition** -Functions can be composed using the ``+@ operator, evaluating @a + b@ first evaluates @a@ and uses its result as @input@ for @b``: +Functions can be composed using the ``+`` operator, evaluating ``a + b`` first evaluates ``a`` and uses its result as ``input`` for ``b``: .. code-block:: @@ -3782,7 +3782,7 @@ These flags can appear in any order. - Fill the box exactly, by stretching the text.
    For images: stretch them, but preserve the aspect ratio. * - ``if-overflow`` - - Only apply ``justify@, @justify-all@ and @stretch`` when the box is overfull. + - Only apply ``justify``, ``justify-all`` and ``stretch`` when the box is overfull. * - ``force`` - Also justify text at the end of a line in a multiline text field.
    Normally only lines ending in a soft line break are justified. @@ -4033,7 +4033,7 @@ Primitive Types * - :doc:`regex <#regex>` - Regular expression strings * - :doc:`boolean <#boolean>` - - ``true@ or @false`` + - ``true`` or ``false`` * - :doc:`int <#int>` - Integer numbers, ``1, 2, 100`` * - :doc:`double <#double>` @@ -4096,7 +4096,7 @@ This can be nested arbitrarily. The ``+`` operator concatenates strings. Numbers and most other values are automatically converted to strings when needed. This conversion can be forced with the :doc:`/function#to_string` function. -Using the ``[]@ or @.`` operator characters in a string can be selected. 0 is the first character: +Using the ``[]`` or ``.`` operator characters in a string can be selected. 0 is the first character: .. code-block:: @@ -4133,7 +4133,7 @@ These tags affect the presentation and sometimes the behaviour of the text. A tag is something like ``"some text"``, similar to HTML. Tags are closed by the same tag with a ``/`` before it. -To represent the character ``"<"@ in a tagged string use @"\<"`` in script code. +To represent the character ``"<"`` in a tagged string use ``"\<"`` in script code. This is written as the character with code 1 in files. **Basic markup** @@ -4154,7 +4154,7 @@ This is written as the character with code 1 in files. * - ```` - The text inside the tag is rendered with the given :ref:`color`. * - ```` - - The text inside the tag is rendered with the given font size in points, for example ``"text"@ makes the text 12 points. The text is scaled down proportionally when it does not fit in a text box and the @scale down to`` attribute allows it. + - The text inside the tag is rendered with the given font size in points, for example ``"text"`` makes the text 12 points. The text is scaled down proportionally when it does not fit in a text box and the ``scale down to`` attribute allows it. * - ```` - The text inside the tag is rendered with the given font family. * - ```` @@ -4243,7 +4243,7 @@ A 'localized string' is a :ref:`map` of :ref:`:string`s, indexed by locale name. It is used to translate games and stylesheets to other user interface languages. Localized strings can be given with a ``localized`` prefix on the property name. -For example, a field has a ``description@ which is a :ref:`:string`, and a @localized_description`` for localized variants. So +For example, a field has a ``description`` which is a :ref:`:string`, and a ``localized_description`` for localized variants. So .. code-block:: @@ -4353,13 +4353,13 @@ For more information, see Boolean ~~~~~~~ -A boolean is either ``true@ or @false``. +A boolean is either ``true`` or ``false``. -In a script, numbers are implicitly converted to booleans, a non-zero number is ``true@, 0 is @false``. +In a script, numbers are implicitly converted to booleans, a non-zero number is ``true``, 0 is ``false``. -When converted to a number, ``true@ becomes @1@ and @false@ becomes @0``. +When converted to a number, ``true`` becomes ``1`` and ``false`` becomes ``0``. -The strings ``"yes"@ and @"no"`` can also be converted to booleans. +The strings ``"yes"`` and ``"no"`` can also be converted to booleans. **File syntax** @@ -4374,7 +4374,7 @@ The strings ``"yes"@ and @"no"`` can also be converted to booleans. true or false -The operators ``or@, @and@ and @xor`` combine two booleans: +The operators ``or``, ``and`` and ``xor`` combine two booleans: .. list-table:: :header-rows: 1 @@ -4509,16 +4509,16 @@ where red_component, green_component and blue_component are numbers between 0 an In most places MSE also supports colors with a transparency value, notated as
    rgba(red_component, green_component, blue_component, alpha_component)
    -An alpha value of ``0@ indicates a transparent color, an alpha value of @255`` is completely opaque. +An alpha value of ``0`` indicates a transparent color, an alpha value of ``255`` is completely opaque. You can also use HTML style hexadecimal colors,
    #rgb, #rgba, #rrggbb, #rrggbbaa
    For example, #ff0000 is red, as is #f00 **Named colors** -MSE also supports named colors, for instance ``"white"@ is the same as @rgb(255,255,255)``. +MSE also supports named colors, for instance ``"white"`` is the same as ``rgb(255,255,255)``. For a full list of supported colors, see [[https://docs.wxwidgets.org/3.0/classwx_colour_database.html|the wxWidgets documentation`. -In addition, the named color ``"transparent"@ stands for the completely transparent color, @rgba(0,0,0,0)``. +In addition, the named color ``"transparent"`` stands for the completely transparent color, ``rgba(0,0,0,0)``. In scripts named colors are represented as :ref:`string`s. @@ -4627,7 +4627,7 @@ A possible choice for a choice :ref:`field`. - - Is this choice selectable? * - ``type`` - - ``"check"@ or @"radio"`` + - ``"check"`` or ``"radio"`` - ``"check"`` - How should this choice be displayed? As a checkbox or a radio box?
    Only applies to multiple choice fields. @@ -4655,7 +4655,7 @@ For example choice: green choice: yellow -The choice red is called ``"large red"@, while green is @"small green"``. +The choice red is called ``"large red"``, while green is ``"small green"``. The group choice 'just small' gets the name of the group, ``"small"``. **Example** @@ -4710,8 +4710,8 @@ AKA: Two Dimensional Vector A coordinate or direction in a symbol. This is a pair of :ref:`double`s. -The coordinates are usually in the range ``0@ to @1``. -``(0,0)@ is the top-left of the symbol, @(1,1)`` the bottom-right. +The coordinates are usually in the range ``0`` to ``1``. +``(0,0)`` is the top-left of the symbol, ``(1,1)`` the bottom-right. **File syntax** From 22b858ccba5ce5c4c087a04c0674744786f0c198 Mon Sep 17 00:00:00 2001 From: Brendan Hagan Date: Wed, 31 Aug 2022 21:15:17 -0400 Subject: [PATCH 22/24] try cross doc references --- docs/type/index.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/type/index.rst b/docs/type/index.rst index f3b1fa27..86ecc2c2 100644 --- a/docs/type/index.rst +++ b/docs/type/index.rst @@ -45,17 +45,17 @@ Game **Overview** -Games are part of the :doc:`/file/style triangle`: +Games are part of the :doc:`/concepts#style-triangle` (:ref:`/concepts#style-triangle`): .. list-table:: :header-rows: 1 - :stub-columns: 1 + :stub-columns: 0 :align: left * - Description - Looks - Data - * - '''Game''' + * - :ref:`Game` - :ref:`Stylesheet` - :ref:`Set` * - :ref:`Field` From ebd0b74f37681f3eae10171e7d590973840d43eb Mon Sep 17 00:00:00 2001 From: Brendan Hagan Date: Wed, 31 Aug 2022 21:31:28 -0400 Subject: [PATCH 23/24] multi-line table cells, tags --- docs/type/index.rst | 498 ++++++++++++++++++++++---------------------- 1 file changed, 249 insertions(+), 249 deletions(-) diff --git a/docs/type/index.rst b/docs/type/index.rst index 86ecc2c2..491b5943 100644 --- a/docs/type/index.rst +++ b/docs/type/index.rst @@ -45,7 +45,7 @@ Game **Overview** -Games are part of the :doc:`/concepts#style-triangle` (:ref:`/concepts#style-triangle`): +Games are part of the :doc:`/concepts#style-triangle`: .. list-table:: :header-rows: 1 @@ -55,7 +55,7 @@ Games are part of the :doc:`/concepts#style-triangle` (:ref:`/concepts#style-tri * - Description - Looks - Data - * - :ref:`Game` + * - **:ref:`Game`** - :ref:`Stylesheet` - :ref:`Set` * - :ref:`Field` @@ -66,8 +66,8 @@ Games provide the ''description'', i.e. what kinds of things are on a card. **Package format** -A game is described in a :doc:`/file/package` with the .mse-game file extension. -Such a package contains a :doc:`/file/format|data file` called game that has the following properties. +A game is described in a :doc:`/file/package` with the ``.mse-game`` file extension. +Such a package contains a :doc:`/file/format|data file` called ``game`` that has the following properties. **Properties** @@ -109,8 +109,8 @@ Such a package contains a :doc:`/file/format|data file` called game tha - ``0.0.0`` - Version number of this package. * - ``depends on`` - - :ref:`list` of :ref:`dependency`s - Packages this package depends on. + - | :ref:`list` of :ref:`dependency`s + | Packages this package depends on. * - '''Specific to games''' - <<< - <<< @@ -118,8 +118,8 @@ Such a package contains a :doc:`/file/format|data file` called game tha * - ``init script`` - :ref:`script` - ``;`` - - Script to run when this game is loaded,
    can set variables - to be used by other scripts in this game or stylesheets using it. + - | Script to run when this game is loaded,
    can set variables + | to be used by other scripts in this game or stylesheets using it. * - ``set fields`` - :ref:`list` of :ref:`field`s - @@ -143,13 +143,13 @@ Such a package contains a :doc:`/file/format|data file` called game tha * - ``statistics categories`` - :ref:`list` of :ref:`statistics category`s - from dimensions - - DOC_MSE_VERSION: not used since 0.3.6 - Choices shown on the statistics panel.
    By default all statistics dimensions are used. + - | DOC_MSE_VERSION: not used since 0.3.6 + | Choices shown on the statistics panel.
    By default all statistics dimensions are used. * - ``pack types`` - :ref:`list` of :ref:`pack type`s - - - DOC_MSE_VERSION: since 0.3.7 - The types of card packs that will be listed on the random booster panel. + - | DOC_MSE_VERSION: since 0.3.7 + | The types of card packs that will be listed on the random booster panel. * - ``has keywords`` - :ref:`boolean` - ``false`` @@ -177,8 +177,8 @@ Such a package contains a :doc:`/file/format|data file` called game tha * - ``add cards script`` - :ref:`list` of :ref:`add cards script`s - - - DOC_MSE_VERSION: since 0.3.7 - A list of scripts for conveniently adding multiple cards to a set. + - | DOC_MSE_VERSION: since 0.3.7 + | A list of scripts for conveniently adding multiple cards to a set. **Examples** Look at the game files in the standard MSE distribution for examples. @@ -192,14 +192,14 @@ Stylesheets are part of the :doc:`/file/style triangle`: .. list-table:: :header-rows: 1 - :stub-columns: 1 + :stub-columns: 0 :align: left * - Description - Looks - Data * - :ref:`Game` - - '''Stylesheet''' + - **:ref:`Stylesheet`** - :ref:`Set` * - :ref:`Field` - :ref:`Style` @@ -208,8 +208,8 @@ Stylesheets are part of the :doc:`/file/style triangle`: Stylesheets provide the ''look and feel'' of cards. **Package format** -A stylesheet is described in a :doc:`/file/package` with the .mse-style file extension, -such a package contains a data file called style. +A stylesheet is described in a :doc:`/file/package` with the ``.mse-style`` file extension, +such a package contains a data file called ``style``. **Properties** @@ -251,9 +251,8 @@ such a package contains a data file called style. - ``0.0.0`` - Version number of this package. * - ``depends on`` - - :ref:`list` of :ref:`dependency`s - Packages this package depends on. - + - | :ref:`list` of :ref:`dependency`s + | Packages this package depends on. * - '''Specific to stylesheets''' - <<< - <<< @@ -301,10 +300,10 @@ such a package contains a data file called style. * - ``extra card fields`` - :ref:`list` of :ref:`field`s - - - Additional fields to add to each card.
    - These fields are intended for things like lines and boxes, whose value is determined automatically. + - | Additional fields to add to each card.
    + | These fields are intended for things like lines and boxes, whose value is determined automatically. * - ``extra card style`` - - :ref:`indexmap] of :ref:`style`s + - :ref:`indexmap`` of :ref:`style`s - - Styling for the extra card fields @@ -317,7 +316,7 @@ Sets are part of the :doc:`/file/style triangle`: .. list-table:: :header-rows: 1 - :stub-columns: 1 + :stub-columns: 0 :align: left * - Description @@ -325,14 +324,14 @@ Sets are part of the :doc:`/file/style triangle`: - Data * - :ref:`Game` - :ref:`Stylesheet` - - '''Set''' + - **:ref:`Set`** * - :ref:`Field` - :ref:`Style` - :ref:`Value` **Package format** -A set is described in a :doc:`/file/package` with the .mse-set file extension, -such a package contains a data file called set. +A set is described in a :doc:`/file/package` with the ``.mse-set`` file extension, +such a package contains a data file called ``set``. **Properties** @@ -358,8 +357,8 @@ such a package contains a data file called set. - file name - Name of this set. * - ``depends on`` - - :ref:`list` of :ref:`dependency`s - Packages this package depends on. + - | :ref:`list` of :ref:`dependency`s + | Packages this package depends on. * - '''Specific to sets''' - <<< - <<< @@ -371,17 +370,17 @@ such a package contains a data file called set. * - ``stylesheet`` - Name of a :ref:`stylesheet` - ''required'' - - The default style for drawing cards in this set.
    - This is without the game name or extension, so ``"new"`` refers to the package ``"gamename-new.mse-style"``. + - | The default style for drawing cards in this set.
    + | This is without the game name or extension, so ``"new"`` refers to the package ``"gamename-new.mse-style"``. * - ``set info`` - :ref:`indexmap` of :ref:`value`s - - The data for the [[prop:game:set fields` defined in the game. * - ``styling`` - - :ref:`map` of :ref:`indexmap`s of :ref:`value`s - Data for the 'extra fields' of the stylesheet.
    - This is first indexed by stylesheet name, then by field name.
    - Data is given not only for the set's stylesheet but also for those of cards. + - | :ref:`map` of :ref:`indexmap`s of :ref:`value`s + | Data for the 'extra fields' of the stylesheet.
    + | This is first indexed by stylesheet name, then by field name.
    + | Data is given not only for the set's stylesheet but also for those of cards. * - ``cards`` - :ref:`list] of :ref:`card`s - @@ -393,8 +392,8 @@ such a package contains a data file called set. * - ``pack types`` - :ref:`list` of :ref:`pack type`s - - - DOC_MSE_VERSION: since 0.3.8 - The custom card pack types in the set. + - | DOC_MSE_VERSION: since 0.3.8 + | The custom card pack types in the set. **Example** @@ -413,6 +412,7 @@ If the game looks like: card field: name: power type: text + The the a set file would looks like: .. code-block:: @@ -460,8 +460,8 @@ A pack type contains either: * - ``name`` - :ref:`string` - - - Name of this card pack type. - Other pack types can refer to this name. + - | Name of this card pack type. + | Other pack types can refer to this name. * - ``select`` - see below - see below @@ -477,8 +477,8 @@ A pack type contains either: * - ``summary`` - :ref:`boolean` - ``true`` - - Is a summary of the total number of cards shown in the second panel in the user interface?
    - Note: this only applies to pack types that have the ``filter`` property set. + - | Is a summary of the total number of cards shown in the second panel in the user interface?
    + | Note: this only applies to pack types that have the ``filter`` property set. * - ``filter`` - :ref:`script` - ''optional'' @@ -502,23 +502,23 @@ How that happens depends on the ``select`` property: * - ``select`` - Description * - ``all`` - - Each instance of this pack type contains all of the filtered cards and ``items``.
    - In general, ``select: all`` is used for the selectable pack types, while other ``select`` types are used for the rest of the packs.
    - This is the default for pack types with ``items``. + - | Each instance of this pack type contains all of the filtered cards and ``items``.
    + | In general, ``select: all`` is used for the selectable pack types, while other ``select`` types are used for the rest of the packs.
    + | This is the default for pack types with ``items``. * - ``replace`` - - Each instance of this pack type contains a single card or ``item``, chosen at random with replacement. - The probability of picking an item is proportional to its ``weight``, all filtered cards have weight 1. + - | Each instance of this pack type contains a single card or ``item``, chosen at random with replacement. + | The probability of picking an item is proportional to its ``weight``, all filtered cards have weight 1. * - ``no replace`` - - Each instance of this pack type contains a single card or ``item``, chosen at random without replacement. - This means that the same card or item will not be chosen twice (if the set is large enough).
    - This is the default for pack types with a ``filter``. + - | Each instance of this pack type contains a single card or ``item``, chosen at random without replacement. + | This means that the same card or item will not be chosen twice (if the set is large enough).
    + | This is the default for pack types with a ``filter``. * - ``proportional`` - - Each instance of this pack type contains a single filtered card or ``item``, chosen with probability proportional to the number of choices for the card/item. - The choice is made with replacement. + - | Each instance of this pack type contains a single filtered card or ``item``, chosen with probability proportional to the number of choices for the card/item. + | The choice is made with replacement. * - ``nonempty`` - - Each instance of this pack type contains a single filtered card or ``item``, - but items that contain no cards will be ignored. - The choice is made with replacement. + - | Each instance of this pack type contains a single filtered card or ``item``, + | but items that contain no cards will be ignored. + | The choice is made with replacement. * - ``equal`` - Instead of choosing cards and items at random, they are chosen to make their numbers as equal as possible. * - ``equal proportional`` @@ -526,8 +526,8 @@ How that happens depends on the ``select`` property: * - ``equal nonempty`` - A combination of ``equal`` and ``nonempty``. * - ``first`` - - If there are any cards, the first is always chosen, otherwise the first ''nonempty'' item is used.
    - ``select: first`` can be used to make a kind of if statement: "If there are any X cards then use those, otherwise use Y cards". + - | If there are any cards, the first is always chosen, otherwise the first ''nonempty'' item is used.
    + | ``select: first`` can be used to make a kind of if statement: "If there are any X cards then use those, otherwise use Y cards". **Examples** @@ -634,9 +634,9 @@ A reference to another :ref:`pack type`, from which one or more cards are chosen * - ``weight`` - :ref:`scriptable` :ref:`double` - 1 - - How 'important' is this item? - Items with a higher weight will be chosen more often. - Cards from ``filter`` will have a weight of 1. + - | How 'important' is this item? + | Items with a higher weight will be chosen more often. + | Cards from ``filter`` will have a weight of 1. **Examples** @@ -690,8 +690,8 @@ is specified, and the symbol is rendered at 12pt, the margin will be ``12*0.1 == **Package format** -A symbol font is described in a :doc:`/file/package` with the .mse-symbol-font file extension. -Such a package contains a :doc:`/file/format|data file` called symbol-font that has the following properties. +A symbol font is described in a :doc:`/file/package` with the ``.mse-symbol-font`` file extension. +Such a package contains a :doc:`/file/format|data file` called ``symbol-font`` that has the following properties. **Properties** @@ -729,8 +729,8 @@ Such a package contains a :doc:`/file/format|data file` called symbol-font - This can be scripted to optionally disable certain symbols.
    - If multiple symbols with the same code are given disabling the first switches to the second one. + - | Is this symbol actually used?
    + | This can be scripted to optionally disable certain symbols.
    + | If multiple symbols with the same code are given disabling the first switches to the second one. * - ``draw text`` - :ref:`int` - ``-1`` @@ -997,9 +997,9 @@ Export Template An export template describes a way for a set to be exported to a HTML or other text files. **Package format** -An export template is described in a :doc:`/file/package` with the .mse-export-template file extension. -Its name should begin with game- where game is the name of the game the template is made for. -It should contain a :doc:`/file/format|data file` called export-template with the following properties. +An export template is described in a :doc:`/file/package` with the ``.mse-export-template`` file extension. +Its name should begin with ``game-`` where game is the name of the game the template is made for. +It should contain a :doc:`/file/format|data file` called ``export-template`` with the following properties. **Properties** @@ -1041,8 +1041,8 @@ It should contain a :doc:`/file/format|data file` called export-templateexport-template
    .mse-locale
    file extension. -Such a package contains a data file called locale that has the following properties. +A locale is described in a :doc:`/file/package` with the ``.mse-locale`` file extension. +Such a package contains a data file called ``locale`` that has the following properties. There are usually no other files in the package. **Properties** @@ -1172,11 +1172,11 @@ There are usually no other files in the package. * - ``menu`` - :ref:`map` of :ref:`string`s - - - Translations of menu items.
    - Menu items can contain shortcut keys (like Ctrl+C for copy) by using a ''single'' TAB between the text and the shortcut key.
    - Keys to use with Alt+Something (displayed underlined) can be specified &
    - For example - >>>new set: &New... Ctrl+N + - | Translations of menu items.
    + | Menu items can contain shortcut keys (like Ctrl+C for copy) by using a ''single'' TAB between the text and the shortcut key.
    + | Keys to use with Alt+Something (displayed underlined) can be specified &
    + | For example + | >>>new set: &New... Ctrl+N * - ``help`` - :ref:`map` of :ref:`string`s - @@ -1214,19 +1214,19 @@ There are usually no other files in the package. - - Types of objects for error messages. * - ``game`` - - :ref:`map` of :ref:`map` of :ref:`string`s - Deprecated since MSE 2.1.3, use ``localized_...`` instead.
    - Translations for specific :ref:`game`s.
    - Field names and field descriptions are looked up in the locale, if they are found the translation is used, otherwise the value from the game file.
    - Extra keys not present in the English locale can be added here. + - | :ref:`map` of :ref:`map` of :ref:`string`s + | Deprecated since MSE 2.1.3, use ``localized_...`` instead.
    + | Translations for specific :ref:`game`s.
    + | Field names and field descriptions are looked up in the locale, if they are found the translation is used, otherwise the value from the game file.
    + | Extra keys not present in the English locale can be added here. * - ``stylesheet`` - - :ref:`map` of :ref:`map` of :ref:`string`s - Deprecated since MSE 2.1.3, use ``localized_...`` instead.
    - Translations for specific :ref:`stylesheet`s. + - | :ref:`map` of :ref:`map` of :ref:`string`s + | Deprecated since MSE 2.1.3, use ``localized_...`` instead.
    + | Translations for specific :ref:`stylesheet`s. * - ``symbol font`` - - :ref:`map` of :ref:`map` of :ref:`string`s - Deprecated since MSE 2.1.3, use ``localized_...`` instead.
    - Translations for specific :ref:`symbol font`s, in particular the "insert symbol" menu. + - | :ref:`map` of :ref:`map` of :ref:`string`s + | Deprecated since MSE 2.1.3, use ``localized_...`` instead.
    + | Translations for specific :ref:`symbol font`s, in particular the "insert symbol" menu. Some of the items can contain placeholders for other values, for example: @@ -1257,8 +1257,8 @@ Include An include package contains files used by other packages, for example scripts or images. **Package format** -An include package is described in a :doc:`/file/package` with the .mse-include file extension. -It should contain a :doc:`/file/format|data file` called include with the following properties. +An include package is described in a :doc:`/file/package` with the ``.mse-include`` file extension. +It should contain a :doc:`/file/format|data file` called ``include`` with the following properties. **Properties** @@ -1296,8 +1296,8 @@ It should contain a :doc:`/file/format|data file` called include with t - ``0.0.0`` - Version number of this package. * - ``depends on`` - - :ref:`list` of :ref:`dependency`s - Packages this package depends on. + - | :ref:`list` of :ref:`dependency`s + | Packages this package depends on. No additional properties are available. @@ -1443,16 +1443,16 @@ Fields are part of the :doc:`/file/style triangle`: * - ``type`` - One of: - ''required'' - - Type of field. - * ``text`` - * ``choice`` - * ``multiple choice`` - * ``package choice`` - * ``boolean`` - * ``image`` - * ``symbol`` - * ``color`` - * ``info`` + - | Type of field. + | * ``text`` + | * ``choice`` + | * ``multiple choice`` + | * ``package choice`` + | * ``boolean`` + | * ``image`` + | * ``symbol`` + | * ``color`` + | * ``info`` * - ``name`` - :ref:`string` - ''required'' @@ -1476,8 +1476,8 @@ Fields are part of the :doc:`/file/style triangle`: * - ``show statistics`` - :ref:`boolean` - ``true`` - - Should a :ref:`statistics dimension` and :ref:`statistics category|category` be made for this field, - causing it to be listed on the statistics panel? + - | Should a :ref:`statistics dimension` and :ref:`statistics category|category` be made for this field, + | causing it to be listed on the statistics panel? * - ``identifying`` - :ref:`boolean` - ``false`` @@ -1565,8 +1565,8 @@ Additional properties are available, depending on the type of field: - ``script`` - :ref:`script` - - - Script to apply to values of this field after each change.
    - If the script evaluates to a constant (i.e. doesn't use ``value``) then values in this field can effectively not be edited. + - | Script to apply to values of this field after each change.
    + | If the script evaluates to a constant (i.e. doesn't use ``value``) then values in this field can effectively not be edited. * - ^^^ - ``default`` - :ref:`script` @@ -1586,8 +1586,8 @@ Additional properties are available, depending on the type of field: - ``script`` - :ref:`script` - - - Script to apply to values of this field after each change.
    - If the script evaluates to a constant (i.e. doesn't use ``value``) then values in this field can effectively not be edited. + - | Script to apply to values of this field after each change.
    + | If the script evaluates to a constant (i.e. doesn't use ``value``) then values in this field can effectively not be edited. * - ^^^ - ``default`` - :ref:`script` @@ -1633,7 +1633,7 @@ Additional properties are available, depending on the type of field: - <<< * - ``"package choice"`` ``script`` :ref:`script` Script to apply to values of this field after each change.
    - If the script evaluates to a constant (i.e. doesn't use ``value``) then values in this field can effectively not be edited. + | If the script evaluates to a constant (i.e. doesn't use ``value``) then values in this field can effectively not be edited. * - ^^^ - ``match`` - :ref:`string` @@ -1658,8 +1658,8 @@ Additional properties are available, depending on the type of field: - ``script`` - :ref:`script` - - - Script to apply to values of this field after each change.
    - If the script evaluates to a constant (i.e. doesn't use ``value``) then values in this field can effectively not be edited. + - | Script to apply to values of this field after each change.
    + | If the script evaluates to a constant (i.e. doesn't use ``value``) then values in this field can effectively not be edited. * - ^^^ - ``default`` - :ref:`script` @@ -1903,8 +1903,8 @@ The rest of the properties depend on the type of :ref:`field` this style is for. - ``always symbol`` - :ref:`boolean` - ``false`` - - Should all text be rendered with symbols?
    - Text that is not supported by the symbol font is still rendered as normal text. + - | Should all text be rendered with symbols?
    + | Text that is not supported by the symbol font is still rendered as normal text. * - ^^^ - ``allow formating`` - :ref:`boolean` @@ -1964,8 +1964,8 @@ The rest of the properties depend on the type of :ref:`field` this style is for. - ``line height soft`` - :ref:`scriptable` :ref:`double` - ``1`` - - Multiplier for the line height of 'soft' line breaks. These are breaks caused by wrapping around lines that are too long.
    - A line height of ``0`` means all lines are in the same position, ``1`` is normal behaviour, ``2`` skips a line, etc. + - | Multiplier for the line height of 'soft' line breaks. These are breaks caused by wrapping around lines that are too long.
    + | A line height of ``0`` means all lines are in the same position, ``1`` is normal behaviour, ``2`` skips a line, etc. * - ^^^ - ``line height hard`` - :ref:`scriptable` :ref:`double` @@ -1995,17 +1995,17 @@ The rest of the properties depend on the type of :ref:`field` this style is for. - ``paragraph height`` - :ref:`double` - ''flexible'' - - The height of paragraphs. If specified, each paragraph is given this much space, and aligned inside that space as specified by ``alignment``.
    - A paragraph break is any line break that is not soft (i.e. caused by word wrap or a ```` break). + - | The height of paragraphs. If specified, each paragraph is given this much space, and aligned inside that space as specified by ``alignment``.
    + | A paragraph break is any line break that is not soft (i.e. caused by word wrap or a ```` break). * - ^^^ - ``mask`` - :ref:`image|scriptable image` - ''none'' - - A mask that indicates where in the box text can be placed.
    - Text is never put in black areas of the box:
    -
    - The same mask image is also used to determine the size and shape of the box. - To include a certain pixel in the size/shape but not allow text to be placed there, it can be made dark gray (a value less than 128). + - | A mask that indicates where in the box text can be placed.
    + | Text is never put in black areas of the box:
    + |
    + | The same mask image is also used to determine the size and shape of the box. + | To include a certain pixel in the size/shape but not allow text to be placed there, it can be made dark gray (a value less than 128). * - ^^^ - ``layout`` - :ref:`text layout` @@ -2030,8 +2030,8 @@ The rest of the properties depend on the type of :ref:`field` this style is for. ! <<< <<< <<< <<< * - ``"choice"``,
    ``"multiple choice"``,
    ``"boolean"`` ``popup style`` ``"drop down"`` or ``"in place"`` ``"drop down"`` Where to place the drop down box for editing the value.
    - ``"drop down"`` places the box below the field, similar to normal combo boxes.
    - ``"in place"`` places the box at the mouse coordinates. + | ``"drop down"`` places the box below the field, similar to normal combo boxes.
    + | ``"in place"`` places the box at the mouse coordinates. * - ^^^ - ``render style`` - :ref:`render style` @@ -2056,20 +2056,20 @@ The rest of the properties depend on the type of :ref:`field` this style is for. - ``image`` - :ref:`image|scriptable image` - - - Image to show (depending on ``render style``).
    - The script will be called with ``input`` set to the value to determine an image for. + - | Image to show (depending on ``render style``).
    + | The script will be called with ``input`` set to the value to determine an image for. * - ^^^ - ``choice images`` - :ref:`map` of :ref:`image`s - - - An alternative way to specify what image to show.
    - For each :ref:`choice` a separate image is specified. + - | An alternative way to specify what image to show.
    + | For each :ref:`choice` a separate image is specified. * - ^^^ - ``content width`` - :ref:`double` - ''automatic'' - - When read from a script, gives the width of the current choice image in this box.
    - This is only useful when the alignment is changed, otherwise it is always equal the box size itself. + - | When read from a script, gives the width of the current choice image in this box.
    + | This is only useful when the alignment is changed, otherwise it is always equal the box size itself. * - ^^^ - ``content height`` - :ref:`double` @@ -2203,38 +2203,38 @@ A way to render a choice :ref:`field`, see :ref:`style`. - Sketch - Description * - ``text`` - - - Rendered as text + - | + | Rendered as text * - ``image`` - - - Rendered as an image + - | + | Rendered as an image * - ``both`` - - - Both an image and text + - | + | Both an image and text * - ``hidden`` - - - The box is hidden, but the value can still be edited. + - | + | The box is hidden, but the value can still be edited. * - ``image hidden`` - - - The box is hidden, but the value can still be edited. + - | + | The box is hidden, but the value can still be edited. * - ``checklist`` - - - A list of checkboxes, for multiple choice styles. + - | + | A list of checkboxes, for multiple choice styles. * - ``image checklist`` - - - A list of checkboxes with images instead of text. + - | + | A list of checkboxes with images instead of text. * - ``both checklist`` - - - A list of checkboxes with both images and text. + - | + | A list of checkboxes with both images and text. * - ``text list`` - - - A list of the selected items, for multiple choice styles. + - | + | A list of the selected items, for multiple choice styles. * - ``image list`` - - - A list of the selected items with images instead of text. + - | + | A list of the selected items with images instead of text. * - ``both list`` - - - A list of the selected items with both images and text. + - | + | A list of the selected items with both images and text. **Examples** @@ -2269,8 +2269,8 @@ A variation of a symbol, describes color and border. - ``0.05`` - Border radius of the symbol. * - ``fill type`` - - ``solid`` or ``linear gradient`` or ``radial gradient`` - ``"solid"`` How to fill the symbol. + - | ``solid`` or ``linear gradient`` or ``radial gradient`` + | ``"solid"`` How to fill the symbol. Depending on the ``fill type`` there are additional properties: @@ -2459,8 +2459,8 @@ The type of a value depends on the corresponding field: - One of the choices of the field. * - ``"multiple choice"`` - :ref:`string` - - A list of choices from the field, separated by commas.
    - For example: ``"red, green, blue"``. + - | A list of choices from the field, separated by commas.
    + | For example: ``"red, green, blue"``. * - ``"package choice"`` - Name of a package - The (file)name of a package, including the extension. @@ -2472,8 +2472,8 @@ The type of a value depends on the corresponding field: - Filename of an image file in the :ref:`set` package. * - ``"symbol"`` - :ref:`filename` - - Filename of a :ref:`symbol` file in the :ref:`set` package.
    - When accessed from a script, image fields can be directly used as :ref:`image`s. + - | Filename of a :ref:`symbol` file in the :ref:`set` package.
    + | When accessed from a script, image fields can be directly used as :ref:`image`s. * - ``"color"`` - opaque :ref:`color` - A color. @@ -2542,14 +2542,14 @@ A '''card''' in a :ref:`set`. - ''now'' - Time at which the card was last modified. * - ``extra data`` - - :ref:`map` of :ref:`indexmap`s of :ref:`value`s - Data for the 'extra card fields' of the stylesheet.
    - This is first indexed by stylesheet name, then by field name. + - | :ref:`map` of :ref:`indexmap`s of :ref:`value`s + | Data for the 'extra card fields' of the stylesheet.
    + | This is first indexed by stylesheet name, then by field name. * - ''remaining keys'' - :ref:`indexmap` of :ref:`value`s - - - The remaining keys contain the data for the game's ``card fields``.
    - So for example ``card.some_field`` corresponds to the value of the card field ``some field``. + - | The remaining keys contain the data for the game's ``card fields``.
    + | So for example ``card.some_field`` corresponds to the value of the card field ``some field``. **Examples** @@ -2730,10 +2730,10 @@ A type of parameter that can be used in a :ref:`keyword`. * - ``eat separator`` - :ref:`boolean` - ``true`` - - Allow the user to 'type over' the separator.
    - For example if the separator is ``" "`` in the keyword ``"Cycling"``, and the user types ``"Cycling"``, - a space and a placeholder is automatically inserted, making ``"Cycling "``. - If the user now presses space the cursor is only moved, no additional space is inserted, the space is 'eaten'. + - | Allow the user to 'type over' the separator.
    + | For example if the separator is ``" "`` in the keyword ``"Cycling"``, and the user types ``"Cycling"``, + | a space and a placeholder is automatically inserted, making ``"Cycling "``. + | If the user now presses space the cursor is only moved, no additional space is inserted, the space is 'eaten'. * - ``script`` - :ref:`script` - @@ -2747,9 +2747,9 @@ A type of parameter that can be used in a :ref:`keyword`. - - Example for in the keyword editor, currently not used. * - ``refer scripts`` - - :ref:`list` of :ref:`keyword param reference script`s - Scripts for inserting parameters of this type into the reminder text. - To make this easy for the user, a menu of ways to use a parameter is provided. + - | :ref:`list` of :ref:`keyword param reference script`s + | Scripts for inserting parameters of this type into the reminder text. + | To make this easy for the user, a menu of ways to use a parameter is provided. **Example** The 'number' parameter type. It matches a sequence of digits. @@ -2803,9 +2803,9 @@ To make this easy for the user, a menu of choices is provided, this type describ * - ``script`` - :ref:`script` - ''required'' - - Script that generates the code using the parameter.
    - This means you will likely need to do some escaping.
    - In the script, ``input`` refers to the name of the parameter, for example ``"param1"``. + - | Script that generates the code using the parameter.
    + | This means you will likely need to do some escaping.
    + | In the script, ``input`` refers to the name of the parameter, for example ``"param1"``. **Example** Apply the :doc:`/function#english_number` function to the parameter: @@ -2870,8 +2870,8 @@ Categories are also automatically generated from dimensions. * - ``bin size`` - :ref:`double` - ''none'' - - For numeric dimensions: group numbers together into bins this large.
    - For example with ``bin size: 5``, values ``1`` and ``3`` both get put under ``"1-5"``. + - | For numeric dimensions: group numbers together into bins this large.
    + | For example with ``bin size: 5``, values ``1`` and ``3`` both get put under ``"1-5"``. * - ``show empty`` - :ref:`boolean` - ``false`` @@ -2985,8 +2985,8 @@ A word in a :ref:`word list`. * - ``is prefix`` - :ref:`boolean` - ``false`` - - Should this word be used as a prefix before another word from the list?
    - Think "Legendary ". Note the space after it, words are directly concatenated. + - | Should this word be used as a prefix before another word from the list?
    + | Think "Legendary ". Note the space after it, words are directly concatenated. * - ``words`` - :ref:`list` of :ref:`word list word`s - @@ -2994,9 +2994,9 @@ A word in a :ref:`word list`. * - ``script`` - :ref:`script` - ''Optional'' - - A script that determines zero or more words.
    - The result should be a list of comma separated words, for example ``"x,y,z"`` specifies three words. - The words are included in the parent menu, not a sub menu. + - | A script that determines zero or more words.
    + | The result should be a list of comma separated words, for example ``"x,y,z"`` specifies three words. + | The words are included in the parent menu, not a sub menu. A word can also be given in a short form, in that case only the name is specified. @@ -3066,9 +3066,9 @@ A script to add multiple cards to the set at once. * - ``script`` - :ref:`script` - - - Script that produces the cards.
    - This script should return a :ref:`list` of :ref:`card`s. - The :doc:`/function#new_card` function can be used to make new cards. + - | Script that produces the cards.
    + | This script should return a :ref:`list` of :ref:`card`s. + | The :doc:`/function#new_card` function can be used to make new cards. **Example** @@ -3196,10 +3196,10 @@ A part of a symbol, corresponds to an item you see in the list on the left of th * - ``type`` - One of: - ``"shape"`` - - What type of symbol part is this? - * ``shape`` - * ``group`` - * ``symmetry`` + - | What type of symbol part is this? + | * ``shape`` + | * ``group`` + | * ``symmetry`` * - ``name`` - :ref:`string` - ``""`` @@ -3284,10 +3284,10 @@ The control points of a shape are circular, the point after the last point in th - Position of the control point. * - ``lock`` - ``free``, ``direction`` or ``size`` - - ``"free"`` - Is this point 'locked', i.e. is the relation between the two handles fixed?
    - If ``lock`` is ``"direction"`` then the two handles must lie on a line.
    - If ``lock`` is ``"direction"`` then the two handles must lie exactly oppisite each other on the same distance from the point. + - | ``"free"`` + | Is this point 'locked', i.e. is the relation between the two handles fixed?
    + | If ``lock`` is ``"direction"`` then the two handles must lie on a line.
    + | If ``lock`` is ``"direction"`` then the two handles must lie exactly oppisite each other on the same distance from the point. * - ``line after`` - ``line`` or ``curve`` - ``"line"`` @@ -3332,14 +3332,14 @@ Collection Types :align: left * - :doc:`list <#list>` - - Lists of items - * item - * item - * item + - | Lists of items + | * item + | * item + | * item * - :doc:`indexmap <#indexmap>` - - Lists indexed by field name - -
    name:someone
    type:something
    + - | Lists indexed by field name + | + |
    name:someone
    type:something
    * - :doc:`map <#map>` - Lists indexed by other text @@ -3779,13 +3779,13 @@ These flags can appear in any order. * - ``justify-all`` - Fill the box exactly, by moving individual characters apart/together. * - ``stretch`` - - Fill the box exactly, by stretching the text.
    - For images: stretch them, but preserve the aspect ratio. + - | Fill the box exactly, by stretching the text.
    + | For images: stretch them, but preserve the aspect ratio. * - ``if-overflow`` - Only apply ``justify``, ``justify-all`` and ``stretch`` when the box is overfull. * - ``force`` - - Also justify text at the end of a line in a multiline text field.
    - Normally only lines ending in a soft line break are justified. + - | Also justify text at the end of a line in a multiline text field.
    + | Normally only lines ending in a soft line break are justified. **Examples** @@ -3893,11 +3893,11 @@ In scripts, combine modes are stored as a string. - * - ``heat`` - - * - and + * - ``and`` - Bitwise and - * - or + * - ``or`` - Bitwise or - * - xor + * - ``xor`` - Bitwise xot * - ``shadow`` - Dark colors normally, white colors darken the background. @@ -3970,25 +3970,25 @@ The value is one of the following options: - Description * - ``bar`` - 1 - - bar graph - One bar for each value on the axis, the height represent the number of cards with that value. + - | bar graph + | One bar for each value on the axis, the height represent the number of cards with that value. * - ``pie`` - 1 - - pie graph - A pie graph, the size of the slice represents the numer of cards with a particular value. + - | pie graph + | A pie graph, the size of the slice represents the numer of cards with a particular value. * - ``stack`` - 2 - - stack graph - One bar for each value on the first axis, bars for each value on axis2 are stacked on top of each other. + - | stack graph + | One bar for each value on the first axis, bars for each value on axis2 are stacked on top of each other. * - ``scatter`` - 2 - - scatter graph - Scatter plot, the size of the circles corresponds to the number of cards with those two values. + - | scatter graph + | Scatter plot, the size of the circles corresponds to the number of cards with those two values. * - ``scatter pie`` - 3 - - scatter-pie graph - Scatter plot, the size of the circles corresponds to the number of cards with those two values. - Each circle is a small pie graph for the third axis. + - | scatter-pie graph + | Scatter plot, the size of the circles corresponds to the number of cards with those two values. + | Each circle is a small pie graph for the third axis. **Examples** @@ -4168,8 +4168,8 @@ This is written as the character with code 1 in files. * - ```` - Line breaks inside this tag use the [[prop:style:soft line height`. * - ```` - - An atomic piece of text. The cursor can never be inside it; it is selected as a whole. - The program automatically inserts ````. + - | An atomic piece of text. The cursor can never be inside it; it is selected as a whole. + | The program automatically inserts ````. * - ```` - The text inside the tag is rendered in a monospace font. This is used for syntax highlighting script code. * - ```` @@ -4187,17 +4187,17 @@ This is written as the character with code 1 in files. * - Tag - Description * - ```` - - Indicates that the text inside it is a keyword. This tag is automatically inserted by - The :doc:`/function#expand_keywords` function.
    - There are four versions, indicating whether or not reminder text is shown: - * ````, Reminder text hidden, by default - * ````, Reminder text shown, by default - * ````, Reminder hidden manually - * ````, Reminder shown manually + - | Indicates that the text inside it is a keyword. This tag is automatically inserted by + | The :doc:`/function#expand_keywords` function.
    + | There are four versions, indicating whether or not reminder text is shown: + | * ````, Reminder text hidden, by default + | * ````, Reminder text shown, by default + | * ````, Reminder hidden manually + | * ````, Reminder shown manually * - ```` - - A separator between fields. This tag is automatically inserted by the :doc:`/function#combined_editor` function.
    - Inserting this tag manually will confuse that function!
    - This tag can never be selected, and its contents can not be edited. + - | A separator between fields. This tag is automatically inserted by the :doc:`/function#combined_editor` function.
    + | Inserting this tag manually will confuse that function!
    + | This tag can never be selected, and its contents can not be edited. * - ```` - At the beginning of a string, indicates a part that can not be selected. This tag is automatically inserted by the :doc:`/function#combined_editor` function. * - ```` @@ -4207,13 +4207,13 @@ This is written as the character with code 1 in files. * - ```` - Text who's width is ignored for alignment, similar to ````, but not a separator. * - ```` - - Indicate that the text inside the tag should be selected from a :ref:`word list`. - The ??? must be the name of a word list in the game. + - | Indicate that the text inside the tag should be selected from a :ref:`word list`. + | The ``???`` must be the name of a word list in the game. * - ```` - The text inside the tag is an error, and is shown with a red wavy underline. * - ```` - - A spelling error, marked by the :doc:`/function#:check_spelling` function. - The ??? part indicates the language used for spelling checking. + - | A spelling error, marked by the :doc:`/function#:check_spelling` function. + | The ``???`` part indicates the language used for spelling checking. * - any other tag - Other tags are ignored. @@ -4269,10 +4269,10 @@ There are two types of filenames, relative and absolute: * - Syntax - Description - * - path/to/file - - A relative file, this is retrieved from the current package. - i.e. for a filename in a stylesheet, the file is retrieved from that stylesheet. - * - /package/path/to/file + * - ``path/to/file`` + - | A relative file, this is retrieved from the current package. + | i.e. for a filename in a stylesheet, the file is retrieved from that stylesheet. + * - ``/package/path/to/file`` - An absolute filename includes the name of the package. This is a package somewhere in the MSE data directory. Don't forget the double quotes (``""``) in scripts. @@ -4383,9 +4383,9 @@ The operators ``or``, ``and`` and ``xor`` combine two booleans: * - ``a`` - ``b`` - - a or b - - a and b - - a xor b + - ``a or b`` + - ``a and b`` + - ``a xor b`` * - ``false`` - ``false`` - ``false`` @@ -4513,7 +4513,7 @@ An alpha value of ``0`` indicates a transparent color, an alpha value of ``255`` You can also use HTML style hexadecimal colors,
    #rgb, #rgba, #rrggbb, #rrggbbaa
    -For example, #ff0000 is red, as is #f00 +For example, ``#ff0000`` is red, as is ``#f00`` **Named colors** MSE also supports named colors, for instance ``"white"`` is the same as ``rgb(255,255,255)``. @@ -4629,8 +4629,8 @@ A possible choice for a choice :ref:`field`. * - ``type`` - ``"check"`` or ``"radio"`` - ``"check"`` - - How should this choice be displayed? As a checkbox or a radio box?
    - Only applies to multiple choice fields. + - | How should this choice be displayed? As a checkbox or a radio box?
    + | Only applies to multiple choice fields. A choice can also be given in a short form, in that case only the name is specified. From 6630a3c0b15c2f02f3e7244ad631654ec85522a3 Mon Sep 17 00:00:00 2001 From: Brendan Hagan Date: Wed, 31 Aug 2022 21:42:00 -0400 Subject: [PATCH 24/24] italic fixes, table line-block margins --- docs/_static/css/custom.css | 4 ++++ docs/type/index.rst | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/_static/css/custom.css b/docs/_static/css/custom.css index 308d5f91..75f4c75f 100644 --- a/docs/_static/css/custom.css +++ b/docs/_static/css/custom.css @@ -15,3 +15,7 @@ .rst-content h6 { margin-left: -0.8em; } + +.rst-content tbody .line-block { + margin-bottom: 0; +} diff --git a/docs/type/index.rst b/docs/type/index.rst index 491b5943..1c23d20f 100644 --- a/docs/type/index.rst +++ b/docs/type/index.rst @@ -998,7 +998,7 @@ An export template describes a way for a set to be exported to a HTML or other t **Package format** An export template is described in a :doc:`/file/package` with the ``.mse-export-template`` file extension. -Its name should begin with ``game-`` where game is the name of the game the template is made for. +Its name should begin with ``game-`` where *game* is the name of the game the template is made for. It should contain a :doc:`/file/format|data file` called ``export-template`` with the following properties. **Properties** @@ -4504,15 +4504,15 @@ Color **Syntax** In files and scritps a color can be represented as -
    rgb(red_component, green_component, blue_component)
    +
    rgb(*red_component*, *green_component*, *blue_component*)
    where red_component, green_component and blue_component are numbers between 0 and 255 (inclusive). In most places MSE also supports colors with a transparency value, notated as -
    rgba(red_component, green_component, blue_component, alpha_component)
    +
    rgba(*red_component*, *green_component*, *blue_component*, *alpha_component*)
    An alpha value of ``0`` indicates a transparent color, an alpha value of ``255`` is completely opaque. You can also use HTML style hexadecimal colors, -
    #rgb, #rgba, #rrggbb, #rrggbbaa
    +
    #*rgb*, #*rgba*, #*rrggbb*, #*rrggbbaa*
    For example, ``#ff0000`` is red, as is ``#f00`` **Named colors**