[
  {
    "path": ".github/FUNDING.yml",
    "content": "patreon: xAranaktu\n"
  },
  {
    "path": "LICENSE",
    "content": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.  We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors.  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights.  Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received.  You must make sure that they, too, receive\nor can get the source code.  And you must show them these terms so they\nknow their rights.\n\n  Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n  For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software.  For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n  Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so.  This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software.  The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable.  Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts.  If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n  Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary.  To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Use with the GNU Affero General Public License.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see <https://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\n  If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n    <program>  Copyright (C) <year>  <name of author>\n    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n  You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n<https://www.gnu.org/licenses/>.\n\n  The GNU General Public License does not permit incorporating your program\ninto proprietary programs.  If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.  But first, please read\n<https://www.gnu.org/licenses/why-not-lgpl.html>.\n"
  },
  {
    "path": "README.md",
    "content": "### Welcome to the FIFA 23 Live Editor!\n\n- [Changes in latest version of the tool](https://raw.githubusercontent.com/xAranaktu/FIFA-23-Live-Editor/main/changelog.txt)\n- [FIFA 23 Live Editor & Cheat Table Development Board](https://bit.ly/F23-LE-CT-DEV-BOARD)\n- [FIFA 23 Live Editor & Cheat Table Release Schedule](https://bit.ly/F23-Projects-Release-Schedule)\n- Check [WIKI](https://github.com/xAranaktu/FIFA-23-Live-Editor/wiki) for Guides and Tutorials\n\n### Read Me Before You Pledge or Buy The Game\n\nThis year the game is protected with brand new EA Anticheat. Using the tool may flag your account and EA may ban it later on.\nYou are using the tool at your own risk.\n\n- The tool is at early stage of developement, many features may not work or may be bugged. Wait until at least until December if you expect somewhat finished tool\n- If you are scared of being banned then don't use the tool (at least for a while until, situation will clarify)\n- This tool doesn't work online. You won't be able to connect with EA servers while using it. This is intended, and won't be \"fixed\".\n- I can't guarantee for how long the tool will be working. EA may update the game at any time and since then it may be not possible to update the Live Editor to make it compatible with latest game update.\n\n***\n\nIf you want to download the tool then DONT CLONE THE REPO...\nGet it from releases:\n\n![](https://i.imgur.com/ocPeJiV.png)\n\n***\n\n![](https://i.imgur.com/W6lPg65.jpeg)\n![](https://i.imgur.com/o1naouS.png)\n![](https://i.imgur.com/0grWO3A.png)\n![](https://i.imgur.com/4JGPfWK.png)\n![](https://i.imgur.com/pwfIyfs.png)\n\n![GitHub all releases](https://img.shields.io/github/downloads/xAranaktu/FIFA-23-Live-Editor/total) ![GitHub release (latest by date)](https://img.shields.io/github/downloads/xAranaktu/FIFA-23-Live-Editor/latest/total)\n"
  },
  {
    "path": "changelog.txt",
    "content": "v23.1.3.6:\n    - Works with Title Update 17.1\n\nv23.1.3.5:\n    - Works with Title Update 17\n    - Some of the message boxes now have \"Don't show this message box anymore\" checkbox.\n    - Added \"HKEY_LOCAL_MACHINE\\SOFTWARE\\Live Editor\\EAFC 24\\Dir\" key to win registry which points to the folder where live editor dll is located.\n\nv23.1.3.4:\n    - Added:\n        - AcceleRATE column to player list\n        - AcceleRATE to player profile (No, you can't edit it)\n        - AcceleRATE player advanced filter\n        - Overall Rating player advanced filter\n        - \"Generate Youth Academy Report\" to \"Misc Features\" -> \"Career Mode\" -> \"Youth Academy\"\n    - Fixed \"Goals For\" and \"Goals Against\" in Standings Away tab.\n    - Removed \"Disable Chants\" option from the settings\n\nv23.1.3.3:\n    - Works with Title Update 15\n\nv23.1.3.2:\n    - Fixed problem with distorted chants\n    - Added 100+ accessories to the accessory list in player editor\n\nv23.1.3.1:\n    - Works with Title Update 14.1 \n\nv23.1.3.0:\n    - Restored previous version of the launcher, so the fake EAAC should be copied properly when you run the game via MM\n\nv23.1.2.9:\n    - Works with Title Update 14\n    - Fixed bug causing unability to change directiories in settings\n\nv23.1.2.8:\n    - Added to \"Misc Features\" -> \"Gameplay\" -> \"Perfect Timed Shot\"\n    - Changed the way that Live Editor adds players to teams, this should solve the issue with player not appearing in team after promotion from YA, or transfer.\n    - Fixed game crash caused by created job offer.\n    - Fixed transfer bans not being saved properly.\n\nv23.1.2.7:\n    - Updated LUA from `5.3.4 (32 bit)` to `5.4.6 (x64)`\n    - Locale.ini window is now hidden by default to reduce the false reports about bug with \"key file not found\"\n    - In settings you can now define where your game is installed (to fix launcher error code 2)\n    - Added: \n        - \"Reveal Player data\" in \"Misc Features\"\n        - \"LiveEditorClearRegistry.reg\" file to the live editor folder. (it clears windows registry from Live Editor related keys)\n        - Option to generate job offer in manager career mode from any club/national team (you can find it in team editor).\n    - Fixed:\n        - Lacking name of the created club\n        - Players not appearing in their new club after manual transfer\n\nv23.1.2.6:\n    - Works with Title Update 12\n    - Added to Players Editor:\n        - Other -> Team selection bias\n        - Other -> Team selection bias position\n    - Added to Formation Editor:\n        - Offense -> Build Up Play\n        - Offense -> Chance Creation\n        - Freeze Lineup\n    - Removed from Formation Editor:\n        - Offense -> Offensive Style (seems to be no longer in use by FIFA 23)\n    - Live Editor will now update cached formations in career mode when you change formation in Formation Editor.\n\nv23.1.2.5:\n    - Live Editor settings can now also be changed from the launcher.\n    - Added \"locale.ini\" editor in the launcher.\n    - Added option allowing for player name change in player editor.\n\nv23.1.2.4:\n    - You can now perform search by name or id by clicking \"Enter\" key, instead of mouse clicking the magnifier icon.\n    - Fixed problems with Live Editor Mods Directory (hopefully for good)\n    - Changed default directory for mods and other LE data from \"<YOUR_GAME_INSTALLATION_DIR>\\LiveEditorMods\" to \"C:\\FIFA 23 Live Editor\"\n    - config.json is now stored in \"C:\\FIFA 23 Live Editor\" instead of the LE folder to keep your settings even if you update the tool.\n\nv23.1.2.3:\n    - Works with Title Update 10\n\nv23.1.2.2:\n    - Fixed game crash that were occurring on slower machines while waiting for game window.\n    - Changed default injection delay to 100ms\n\nv23.1.2.1:\n    - Added \"Misc Features\" with:\n        - Unsackable\n        - Club Transfer Budget\n    - Added support for file paths containing UTF-16 characters (not fully tested).\n    - Searching players/teams by name will now also match accented characters. (For example \"makelele\" will match \"Makélélé\")\n    - Fixed artificialkey field error in \"CreatePlayer\" lua function\n    - Reduced GPU & Power usage by the launcher.\n\nv23.1.2.0:\n    - It's possible now to define custom score for favourite and disliked teams.\n    - Added advanced filters for players and teams.\n\nv23.1.1.9:\n    - Added to Teams Editor:\n        - Stadium\n        - Kits\n\nv23.1.1.8:\n    - Added Fixtures to Teams Editor (Match-fixing & Rescheduling Games)\n    - Fixed caching offsets, minor game updates shouldn't break the tool forcing you to redownload anymore.\n\nv23.1.1.7:\n    - Added to Teams Editor:\n        - Transfer Bans\n        - Formation Editor\n\nv23.1.1.6:\n    - Works with Title Update 6\n    - Added 2 new traits to players editor, First Time Shots & Round the Keeper (thanks tokke001)\n    - Added Player OVR column in Transfer History list\n\nv23.1.1.5:\n    - Added \"Transfer History\" with option to undo unwanted transfers.\n\nv23.1.1.4:\n    - Added \"Teams\" and \"Team Editor\" with:\n        - Basic info\n        - Players\n        - Manager\n        - Standings\n\nv23.1.1.3:\n    - Added \"Season Statistics\" to player editor\n\nv23.1.1.2:\n    - Fixed blacksceen issue.\n    - Launcher:\n        - Fixed \"Error access denied\" (maybe, lol)\n\nv23.1.1.1:\n    - Fixed:\n        - Filtering values in the edit option popup\n    - Launcher:\n        - Fixed auto inject delay\n        - Fixed \"Error access denied\" when starting the game manually\n\nv23.1.1.0:\n    - Added:\n        - Lua Engine\n    - Fixed:\n        - Editing player jersey number\n\nv23.1.0.9:\n    - Launcher:\n        - Fixed editing injection delay when using auto inject\n        - Increased default injection delay from 300ms to 3000ms\n\nv23.1.0.8:\n    - Works with Title Update 4\n    - UI Changes:\n        - Replaced combo input with searchable input\n    - Fixed:\n        - Crash when loading player that doesn't exists, but have teamplayerlink\n\nv23.1.0.7:\n    - Added:\n        - Option to transfer players\n        - Option to loan players\n        - Option to terminate loan\n    - Fixed:\n        - Adding & Removing players from transfer & loan lists\n\nv23.1.0.6:\n    - Added:\n        - New launcher icon\n        - Option to import miniface\n    - Fixed:\n        - Adding/Removing player injuries\n        - Editing player performance bonus, wage, form & morale\n\n\nv23.1.0.5:\n    - Chants are now disabled by default as workaround for the robotic sound issue. Can be enabled back in Settings->Other.\n    - Added:\n        - Menu Item for reloading Players\n        - Menu Item for reloading Database\n\nv23.1.0.4:\n    - Support for Trial game version\n    - Support for command line arguments\n\nv23.1.0.3:\n    - Launcher improvements:\n        - Adde fake EAAntiCheat launcher. No more installerdata editing, no more clearing cache\n\nv23.1.0.2:\n    - Fixed d-pad input lag\n    - Launcher improvements:\n        - Added option to auto close launcher after dll injection\n        - Added error message if EA Anticheat detected\n        - Added check for non-English characters in live editor & game path\n        - Auto edit installerdata.xml (still requires to clear cache on EA App tho)\n\nv23.1.0.1:\n    - Works with Title Update 2\n    - Added placeholders for missing accessorycolourcodes\n    - Added option to generate minifaces in player editor\n    - Fixed in player editor:\n        - displaying minifaces of youth players \n        - player role\n        - editing age\n\n\nv23.1.0.0:\n    - Update for FIFA 23 includes:\n        - Legacy File Browser & option to modify them\n        - Database Editor \n        - Players & Basic Players Editor\n"
  },
  {
    "path": "lua/DOC.MD",
    "content": "# FIFA LIVE EDITOR LUA DOCUMENTATION\n\nFIFA Live Editor is using Lua 5.3.4 (32 bit) as main scripting language. You can execute lua code by opening Features -> Lua Engine -> execute.\n\n![](https://i.imgur.com/blBXplH.png)\n\nJust for your info, Lua scripts created for cheat engine will not work.\nAlso, LUA Engine allows you to switch between lua states to access also in-game lua functions. These functions aren't covered in this documentation.\n\n## Functions\n\n* [Log](#Log)\n* [MessageBox](#MessageBox)\n* [IsInCM](#IsInCM)\n* [GetSaveUID](#GetSaveUID)\n* [GetCompetitionNameByID](#GetCompetitionNameByID)\n* [GetCompetitionNameByObjID](#GetCompetitionNameByObjID)\n* [GetCurrentDate](#GetCurrentDate)\n* [GetUserTeamID](#GetUserTeamID)\n* [GetTeamIdFromPlayerId](#GetTeamIdFromPlayerId)\n* [GetTeamName](#GetTeamName)\n* [GetPlayerName](#GetPlayerName)\n* [SetPlayerSharpness](#SetPlayerSharpness)\n* [SetPlayerMorale](#SetPlayerMorale)\n* [SetPlayerForm](#SetPlayerForm)\n* [SetPlayerFitness](#SetPlayerFitness)\n* [PlayerHasDevelopementPlan](#PlayerHasDevelopementPlan)\n* [PlayerSetValueInDevelopementPlan](#PlayerSetValueInDevelopementPlan)\n* [GetPlayersStats](#GetPlayersStats)\n* [GetPlayerStats](#GetPlayerStats)\n* [DeletePlayer](#DeletePlayer)\n* [CreatePlayer](#CreatePlayer)\n* [PlayerExists](#PlayerExists)\n* [TransferPlayer](#TransferPlayer)\n* [LoanPlayer](#LoanPlayer)\n* [ReleasePlayerFromTeam](#ReleasePlayerFromTeam)\n* [TerminateLoan](#TerminateLoan)\n* [DeletePresignedContract](#DeletePresignedContract)\n* [IsPlayerLoanedOut](#IsPlayerLoanedOut)\n* [IsPlayerPresigned](#IsPlayerPresigned)\n* [IsPlayerTransferListed](#IsPlayerTransferListed)\n* [IsPlayerLoanListed](#IsPlayerLoanListed)\n* [AddPlayerToTransferList](#AddPlayerToTransferList)\n* [AddPlayerToLoanList](#AddPlayerToLoanList)\n* [RemovePlayerFromLoanList](#RemovePlayerFromLoanList)\n* [RemovePlayerFromTransferList](#RemovePlayerFromTransferList)\n* [RemovePlayerFromLists](#RemovePlayerFromLists)\n* [CreateOfferForPlayer](#CreateOfferForPlayer)\n* [GetDBTablesNames](#GetDBTablesNames)\n* [GetDBTableFields](#GetDBTableFields)\n* [GetDBTableRows](#GetDBTableRows)\n* [InsertDBTableRow](#InsertDBTableRow)\n* [DeleteDBTableRow](#DeleteDBTableRow)\n* [EditDBTableField](#EditDBTableField)\n* [PlayerCaptureSetOutputDirectory](#PlayerCaptureSetOutputDirectory)\n* [PlayerCaptureSetSize](#PlayerCaptureSetSize)\n* [PlayerCaptureSetType](#PlayerCaptureSetType)\n* [PlayerCaptureSetCamera](#PlayerCaptureSetCamera)\n* [PlayerCaptureAddPlayer](#PlayerCaptureAddPlayer)\n* [PlayerCaptureStart](#PlayerCaptureStart)\n* [GetTransferBudget](#GetTransferBudget)\n* [SetTransferBudget](#SetTransferBudget)\n\n## Data Types\n\n* [DBFieldDescription](#DBFieldDescription)\n* [DBRow](#DBRow)\n\n## Log\n\nWrite to log file and console window.\n\n### Syntax\n```\nvoid Log(string text)\n```\n\n## MessageBox\n\nShow MessageBox with given title and text\n\n### Syntax\n```\nvoid MessageBox(string title, string text)\n```\n\n\n## IsInCM\n\nCheck if we are in career mode.\n### Syntax\n```\nbool IsInCM()\n```\n\n### Return\nType: **Bool**\n- **True** if executed in career mode\n- **False** if executed outside of career mode\n\n\n### Example\n```\nlocal is_in_career_mode = IsInCM()\nLog(type(is_in_career_mode))\n\nif (is_in_career_mode) then\n    Log(\"In career mode\")\nelse\n    Log(\"Not in career mode\")\nend\n```\n```\n> boolean\n> In career mode\n```\n\n## GetSaveUID\n\nGet career save unique identifier.\n\nIdentifier is stored in \"sponsors\" database table in \"name\" field as a 31 char long string where \"adsponserid\" == 8181 (I hope the 8181 ID isn't used by any mod).\n\nGenerates new UID on first call if doesn't exists.\n\nIn case of any problems the function will return empty string.\n\n**Constraints**: \n- Can be executed only in Career Mode.\n\n### Syntax\n```\nstring GetSaveUID()\n```\n### Return\nType: **String**\n- 31 char long string\n- OnError: Return empty string and write error in log file.\n\n### Example\n```\nlocal bIsInCM = IsInCM();\n\nif (bIsInCM) then\n    local UID = GetSaveUID()\n    \n    Log(type(UID))\n    Log(string.len(UID))\n    Log(UID)\nend\n\n```\n```\n> string\n> 31\n> 104cde1628794d4aad00d081fe19343\n```\n\n## GetCompetitionNameByID\n\nGet Competition name by ID.\nThe name is loaded from \"IdMap.json\" file, from \"compids\" key. You can add there your custom competitions.\n\n### Syntax\n```\nstring GetCompetitionNameByID(int competition_id)\n```\n### Return\nType: **String**\n- Name of the Competition\n- OnError: Returns competition_id id with \"C\" prefix.\n\n### Example\n```\n\nLog(GetCompetitionNameByID(10))\nLog(GetCompetitionNameByID(19))\n\n-- This doesn't exists\nLog(GetCompetitionNameByID(22222))\n\n```\n```\n> Eredivisie\n> Bundesliga\n> C22222\n```\n\n## GetCompetitionNameByObjID\n\nGet Competition name by Object ID.\nThe name is loaded from \"IdMap.json\" file, from \"compobjids\" key. You can add there your custom competitions.\n\n### Syntax\n```\nstring GetCompetitionNameByObjID(int competition_obj_id)\n```\n### Return\nType: **String**\n- Name of the Competition\n- OnError: Returns competition_id id with \"COBJ\" prefix.\n\n### Example\n```\n\nLog(GetCompetitionNameByObjID(1098))\nLog(GetCompetitionNameByObjID(985))\n\n-- This doesn't exists\nLog(GetCompetitionNameByObjID(22222))\n\n```\n```\n> Eredivisie\n> Bundesliga\n> COBJ22222\n```\n\n## GetCurrentDate\n\nGet current in-game date.\nIn career it will return date from career_calendar.\nOutside of career it will be always 1st July 2021.\n\n### Syntax\n```\ntable GetCurrentDate()\n```\n### Return\nType: **Table**\n\nKey(string)-Value(int) pair.\n\nValid keys: \n- day\n- month\n- year\n\n### Example\n```\nlocal currentdate = GetCurrentDate()\nLog(type(currentdate))\nLog(type(currentdate.day))\nLog(type(currentdate.month))\nLog(type(currentdate.year))\nLog(\"Current Date (day/month/year): \" .. currentdate.day .. \"/\" .. currentdate.month .. \"/\" .. currentdate.year )\n```\n```\n> table\n> number\n> number\n> number\n> Current Date (day/month/year): 1/7/2021\n```\n## GetUserTeamID\n\nGet value from field \"clubteamid\" from first record in career_users table. Should be our teamid in manager career mode.\n\n**Constraints**: \n- Can be executed only in Career Mode.\n\n### Syntax\n```\nint GetUserTeamID()\n```\n### Return\nType: **Int**\n- Teamid of the team managed by user.\n- OnError: Return 0 and write error in log file.\n\n### Example\n```\n-- In Career mode\n-- Manager of Everton\nlocal user_teamid = GetUserTeamID()\nLog(type(user_teamid))\nLog(user_teamid) \n```\n```\n> number\n> 7\n```\n\n## GetTeamIdFromPlayerId\n\nGet teamid from playerid. Should be id of the player club.\nIgnore teams in following leagues:\n- 78, International\n- 2136, International Women\n- 76, Rest of World\n- 383, Create Player League\n\n### Syntax\n```\nint GetTeamIdFromPlayerId(int playerid)\n```\n### Return\nType: **Int**\n- Club TeamId for playerid\n- Returns -1 if team not found\n\n### Example\n```\n-- Messi PlayerID: 158023\n-- FC Barcelona TeamID: 241\nlocal teamid1 = GetTeamIdFromPlayerId(158023)\nLog(\"teamid1 (158023): \" .. teamid1)\nassert(type(teamid1) == \"number\", \"GetTeamIdFromPlayerId(158023) not a number\")\n\n-- Cristiano Ronaldo PlayerID: 20801\n-- Piemonte Calcio TeamID: 114153\nlocal teamid2 = GetTeamIdFromPlayerId(20801)\nLog(\"teamid2 (20801): \" .. teamid2)\nassert(type(teamid2) == \"number\", \"GetTeamIdFromPlayerId(20801) not a number\")\n\n```\n```\n> teamid1 (158023): 241\n> teamid2 (20801): 114153\n```\n\n## GetTeamName\n\nGet name of the team for passed teamid.\n\nName is stored in localized database file. For example, for English game version it will be eng_us_db.db.\n\n### Syntax\n```\nstring GetTeamName(unsigned int teamid)\n```\n### Return\nType: **String**\n- Name of the team\n- OnError: Return empty string and write error in log file.\n### Example\n```\nlocal teamname = GetTeamName(7)\nLog(type(teamname))\nLog(teamname) \n\nteamname = GetTeamName(241)\nLog(teamname) \n```\n```\n> string\n> Everton\n> FC Barcelona\n```\n\n## GetPlayerName\n\nGet name of the player for passed playerid.\n\n### Syntax\n```\nstring GetPlayerName(unsigned int playerid)\n```\n### Return\nType: **String**\n- Name of the player\n- OnError: Return empty string and write error in log file.\n### Example\n```\nlocal playername = GetPlayerName(20801)\nLog(playername)\n\nplayername = GetPlayerName(158023)\nLog(playername)\n```\n```\n> Cristiano Ronaldo\n> Lionel Messi\n```\n\n## SetPlayerSharpness\n\nSet player sharpness.\nUse value from 0 to 100.\n\n**Constraints**: \n- Can be executed only in Career Mode.\n- Only for player in user team\n\n### Syntax\n```\nvoid SetPlayerSharpness(playerid, new_sharpness)\n```\n### Return\nNone\n\n### Example\n```\n-- Set Messi sharpness to 100\n-- Will work only if Messi is in your team\nSetPlayerSharpness(158023, 100)\n```\n\n## SetPlayerMorale\n\nSet player morale.\nUse value from 0 to 100.\n\n\nMin. Morale levels (may be different if you use an mod which changes them):\n- Below 15 for Very Unhappy \n- 40 for Unhappy\n- 65 for Content \n- 75 for Happy \n- 95 for Very Happy\n\n**Constraints**: \n- Can be executed only in Career Mode.\n- Only for player in user team\n\n### Syntax\n```\nvoid SetPlayerMorale(playerid, new_morale)\n```\n### Return\nNone\n\n### Example\n```\n-- Set Messi morale to 95 (Very Happy)\n-- Will work only if Messi is in your team\nSetPlayerMorale(158023, 95)\n```\n\n## SetPlayerForm\n\nSet player form.\nUse value from 0 to 100.\n\nMin. Form levels (may be different if you use an mod which changes them):\n- Below 25 for Bad\n- 50 for Poor\n- 65 for Okay \n- 75 for Good \n- 90 for Excellent\n\n**Constraints**: \n- Can be executed only in Career Mode.\n- Only for player in user team\n\n### Syntax\n```\nvoid SetPlayerForm(playerid, new_form)\n```\n### Return\nNone\n\n### Example\n```\n-- Set Messi form to 90 (Excellent)\n-- Will work only if Messi is in your team\nSetPlayerForm(158023, 90)\n```\n\n## SetPlayerFitness\n\nSet player match fitness/durability/fitness/stamina (call it as you want ;)).\n\nUse value from 5 to 95. Where 5 is completly tired and 95 is almost full fit.\nI don't recommend to set the value below 5 as it will probably bug the stamina bar.\nAbove 95 may bug the whole player/game.\n\n**Constraints**: \n- Can be executed only in Career Mode.\n\n### Syntax\n```\nvoid SetPlayerFitness(playerid, new_fitness)\n```\n### Return\nNone\n\n### Example\n```\n-- Set Messi fitness to 95 (Almost Full Fit)\nSetPlayerFitness(158023, 95)\n```\n\n## PlayerHasDevelopementPlan\n\nPlayers in Manager Career mode that are in team managed by user got developement plans. Data stored in these plans got higher priority than fields in players table.\nFollowing fields are part of the developement plan:\n- All attributes\n- Workrates\n- Skillmoves\n- Weakfoot\n\n**Constraints**: \n- Can be executed only in Career Mode.\n\n### Syntax\n```\nbool PlayerHasDevelopementPlan(int playerid)\n```\n### Return\nType: **Bool**\n- **True** if player has developement plan\n- **False** if player doesn't have developement plan\n\n### Example\n```\nPlayerHasDevelopementPlan(158023)\n```\n\n## PlayerSetValueInDevelopementPlan\n\nPlayers in Manager Career mode that are in team managed by user got developement plans. Data stored in these plans got higher priority than fields in players table.\nFollowing fields are part of the developement plan:\n- All attributes\n- Workrates\n- Skillmoves\n- Weakfoot\n\nUse this to set corresponding XP points for given field.\nUse fieldnames same as in players table\n\n**Constraints**: \n- Can be executed only in Career Mode.\n\n### Syntax\n```\nvoid PlayerSetValueInDevelopementPlan(int playerid, string field_name, int value)\n```\n### Return\nNone\n\n### Example\n```\nlocal bIsInCM = IsInCM();\n\nif (bIsInCM) then\n    ReloadPlayersManager()\n    if (PlayerHasDevelopementPlan(158023)) then\n        PlayerSetValueInDevelopementPlan(158023, \"composure\", 99)\n    end\nend\n\n```\n\n## GetPlayersStats\n\nGet the current season stats of all players.\nGame generate the stats only for players that play in the same competitions as you + european & international cups.\n\n### Syntax\n```\narray GetPlayersStats()\n```\n### Return\nType: **Array**\n\nArray of items:\nKey(string)-Value(int) pair.\n\nValid keys: \n- teamid\n- playerid\n- compobjid\n- avg               (needs to be devided by num of apps to get correct avg)\n- goals\n- yellow\n- red\n- app\n- assists\n- clean_sheets\n- motm              (not sure if data is correct)\n- two_yellow        (not sure if data is correct)\n- goals_conceded    (not sure if data is correct)\n- saves             (not sure if data is correct)\n\n### Example\n```\n\nlocal stats = GetPlayersStats()\n\nLog(string.format(\"GetPlayersStats - N of items: %d\", #stats))\n\n-- First player, firt competition\nlocal player = stats[1]\n\nLog(string.format(\n    \"%s (ID: %d) - Goals: %d\",\n    GetPlayerName(player.playerid), player.playerid, player.goals\n))\n\n```\n```\n> GetPlayersStats - N of items: 6962\n> Pierluigi Gollini (ID: 211515) - Goals: 0\n```\n\n## GetPlayerStats\n\nGet the current season stats for player by ID.\n\n### Syntax\n```\nArray GetPlayerStats(int playerid)\n```\n### Return\nType: **Array**\n\nArray of items:\nKey(string)-Value(int) pair.\n\nValid keys: \n- teamid\n- playerid\n- compobjid\n- avg               (needs to be devided by num of apps to get correct avg)\n- goals\n- yellow\n- red\n- app\n- assists\n- clean_sheets\n- motm              (not sure if data is correct)\n- two_yellow        (not sure if data is correct)\n- goals_conceded    (not sure if data is correct)\n- saves             (not sure if data is correct)\n\n### Example\n```\n-- 211515 = Pierluigi Gollini \n-- He got stats in my career, may not in yours.\nlocal stats = GetPlayerStats(211515)\n\nLog(string.format(\"GetPlayerStats - N of items: %d\", #stats))\n\nfor i=1, #stats do\n    local player = stats[i]\n    Log(string.format(\n    \"%s (ID: %d) in Competition: %s - Goals: %d\",\n    GetPlayerName(player.playerid), player.playerid, GetCompetitionNameByObjID(player.compobjid), player.goals\n))\nend\n\n```\n```\n> GetPlayerStats - N of items: 3\n> Pierluigi Gollini (ID: 211515) in Competition: FIFA World Cup - Goals: 0\n> Pierluigi Gollini (ID: 211515) in Competition: EC Qualifiers - Goals: 0\n> Pierluigi Gollini (ID: 211515) in Competition: UECL - Goals: 0\n```\n\n## DeletePlayer\n\nDelete Player by ID from the game.\n\nif player_current_teamid is 0 then the tool will call [GetTeamIdFromPlayerId](#GetTeamIdFromPlayerId) internally\n\nTo be more precise, the function will:\n- Transfer Player to Free Agents\n- Delete first playerid related record from \"players\" table\n- Delete all playerid related records from \"teamplayerlinks\" table\n\n\n### Syntax\n```\nvoid DeletePlayer(int playerid, int player_current_teamid=0)\n```\n### Return\nNone\n\n### Example\n```\n-- Delete Messi\nDeletePlayer(158023)\n```\n\n## CreatePlayer\n\nCreate new player. By default the player is assigned to Free Agents team.\nUse [TransferPlayer](#TransferPlayer) to move him to other team.\n\nLeave playerid = 0 for random ID.\nplayers_row_data is table of items: Key(string)-Value(string) pair.\nwhere key is the fieldname of entry in \"players\" database table.\n\n\n### Syntax\n```\nint CreatePlayer(int playerid, table players_row_data)\n```\n### Return\nType: **Int**\n- The ID of created player.\n- OnError: Return 0 and write error in log file.\n\n### Example\n```\n-- Example creates Jerzy Dudek in Free Agents team\n\nlocal playerid = 44897\n\n-- Make sure we won't create duplicate\nassert(PlayerExists(playerid) == false, string.format(\"Can't create. Player with ID: playerid %d already exists\", playerid))\n\n-- That will be inserted into players table\n-- Missing fields will be replaced with lowest possible value by default (except playerid)\nlocal player_data = {\n    skintypecode = \"2\",\n    trait2 = \"0\",\n    haircolorcode = \"6\",\n    facialhairtypecode = \"3\",\n    curve = \"14\",\n    jerseystylecode = \"0\",\n    agility = \"68\",\n    tattooback = \"0\",\n    accessorycode4 = \"0\",\n    gksavetype = \"0\",\n    positioning = \"16\",\n    tattooleftarm = \"0\",\n    hairtypecode = \"150\",\n    standingtackle = \"19\",\n    preferredposition3 = \"-1\",\n    longpassing = \"27\",\n    penalties = \"24\",\n    animfreekickstartposcode = \"0\",\n    isretiring = \"0\",\n    longshots = \"19\",\n    gkdiving = \"86\",\n    interceptions = \"22\",\n    shoecolorcode2 = \"15\",\n    crossing = \"14\",\n    potential = \"86\",\n    gkreflexes = \"90\",\n    finishingcode1 = \"0\",\n    reactions = \"84\",\n    composure = \"50\",\n    vision = \"52\",\n    contractvaliduntil = \"2025\",\n    finishing = \"13\",\n    dribbling = \"14\",\n    slidingtackle = \"18\",\n    accessorycode3 = \"0\",\n    accessorycolourcode1 = \"0\",\n    headtypecode = \"2508\",\n    driref = \"90\",\n    sprintspeed = \"56\",\n    height = \"187\",\n    hasseasonaljersey = \"1\",\n    tattoohead = \"0\",\n    preferredposition2 = \"-1\",\n    strength = \"73\",\n    shoetypecode = \"1\",\n    birthdate = \"142605\",\n    preferredposition1 = \"0\",\n    tattooleftleg = \"0\",\n    ballcontrol = \"26\",\n    phypos = \"85\",\n    shotpower = \"59\",\n    trait1 = \"268435456\",\n    socklengthcode = \"0\",\n    weight = \"78\",\n    hashighqualityhead = \"0\",\n    gkglovetypecode = \"1\",\n    tattoorightarm = \"0\",\n    balance = \"61\",\n    gender = \"0\",\n    headassetid = \"44897\",\n    gkkicking = \"78\",\n    defspe = \"60\",\n    internationalrep = \"4\",\n    shortpassing = \"33\",\n    freekickaccuracy = \"27\",\n    skillmoves = \"0\",\n    faceposerpreset = \"0\",\n    usercaneditname = \"0\",\n    avatarpomid = \"0\",\n    attackingworkrate = \"0\",\n    finishingcode2 = \"0\",\n    aggression = \"42\",\n    acceleration = \"62\",\n    paskic = \"78\",\n    headingaccuracy = \"11\",\n    iscustomized = \"0\",\n    eyebrowcode = \"0\",\n    runningcode2 = \"0\",\n    modifier = \"1\",\n    gkhandling = \"83\",\n    eyecolorcode = \"6\",\n    jerseysleevelengthcode = \"1\",\n    accessorycolourcode3 = \"0\",\n    accessorycode1 = \"0\",\n    playerjointeamdate = \"160139\",\n    headclasscode = \"0\",\n    defensiveworkrate = \"0\",\n    tattoofront = \"0\",\n    nationality = \"37\",\n    preferredfoot = \"2\",\n    sideburnscode = \"0\",\n    weakfootabilitytypecode = \"3\",\n    jumping = \"71\",\n    personality = \"2\",\n    gkkickstyle = \"3\",\n    stamina = \"44\",\n    marking = \"26\",\n    accessorycolourcode4 = \"0\",\n    gkpositioning = \"85\",\n    headvariation = \"0\",\n    skillmoveslikelihood = \"0\",\n    shohan = \"83\",\n    skintonecode = \"3\",\n    shortstyle = \"0\",\n    overallrating = \"86\",\n    smallsidedshoetypecode = \"500\",\n    emotion = \"2\",\n    runstylecode = \"0\",\n    jerseyfit = \"0\",\n    accessorycode2 = \"0\",\n    shoedesigncode = \"0\",\n    shoecolorcode1 = \"0\",\n    hairstylecode = \"0\",\n    bodytypecode = \"5\",\n    animpenaltiesstartposcode = \"0\",\n    pacdiv = \"86\",\n    runningcode1 = \"0\",\n    preferredposition4 = \"-1\",\n    volleys = \"13\",\n    accessorycolourcode2 = \"0\",\n    tattoorightleg = \"0\",\n    facialhaircolorcode = \"3\"\n}\n\nlocal created_playerid = CreatePlayer(playerid, player_data)\n\n-- Create the name\nlocal editedplayernames_row_data = {\n    playerid = string.format(\"%d\", created_playerid),\n    firstname = \"Jerzy\",\n    surname = \"Dudek\",\n    playerjerseyname = \"Dudek\"\n}\n\nlocal row = InsertDBTableRow(\"editedplayernames\", editedplayernames_row_data)\n\nLog(string.format(\"Created Player - %s %s (ID: %s). Check Free Agents.\", editedplayernames_row_data.firstname, editedplayernames_row_data.surname, editedplayernames_row_data.playerid))\n```\n```\n> Created Player - Jerzy Dudek (ID: 44897). Check Free Agents.\n```\n\n## PlayerExists\n\nChecks if Player with given playerid exists.\nPlayer ids must be unique, so use this function to make sure you won't create duplicated players.\n\n\n### Syntax\n```\nbool PlayerExists(int playerid)\n```\n### Return\nType: **Bool**\n- **True** if player exists\n- **False** if player doesn't exists\n- OnError: Return **False** and write error in log file.\n\n### Example\n```\n-- Probably you don't have any guy with this ID\nif PlayerExists(1) then\n    Log(\"Player with ID: 1 exists\")\nelse\n    Log(\"Player with ID: 1 doesn't exists\")\nend\n\n-- Messi, should be there.\nif PlayerExists(158023) then\n    Log(\"Player with ID: 158023 exists\")\nelse\n    Log(\"Player with ID: 158023 doesn't exists\")\nend\n```\n```\n> Player with ID: 1 doesn't exists\n> Player with ID: 158023 exists\n```\n\n## TransferPlayer\n\n**WARNING**\n\nThis can damage/break your career save (especially if you do something stupid, like trying to transfer player who is on loan in other club). Use with caution. Remember about backups.\nTested only in Manager Career Mode. May not work in Player Career Mode\n\nImmediately transfer player to any club (including yours).\n\nCan be used even if the transfer window is closed.\n\nWage only matters if you transfer the player to your club.\n\nif from_teamid is 0 then the tool will call [GetTeamIdFromPlayerId](#GetTeamIdFromPlayerId) internally\n\nif release_clause is -1 then there won't be any release clause\n\n**Constraints**: \n- Can be executed only in Career Mode.\n\n### Syntax\n```\nvoid TransferPlayer(playerid, to_teamid, transfersum, wage, contract_length_in_months, from_teamid=0, release_clause=-1)\nor\nvoid cTransferPlayer(playerid, from_teamid, to_teamid, transfersum, release_clause, wage, contract_length_in_months)\n```\n### Return\nNone\n\n### Example\n```\n-- Transfer \n-- Cristiano Ronaldo (playerid: 20801)\n-- To Manchester United (ID: 11)\n-- For 500 euro/usd/gbp\n-- Wage = 600\n-- contract length = 60 months (5 years)\n\nplayerid = 20801\nif (IsPlayerPresigned(playerid)) then\n  -- Delete presigned contract to force transfer\n  DeletePresignedContract(playerid)\nend\n\nif (IsPlayerLoanedOut(playerid)) then\n  -- Terminate loan to force transfer\n  TerminateLoan(playerid)\nend\n\nTransferPlayer(20801, 11, 500, 600, 60)\n```\n\n## LoanPlayer\n\n**WARNING**\n\nThis can damage/break your career save. Use with caution. Remember about backups.\nTested only in Manager Career Mode. May not work in Player Career Mode\n\nImmediately loan player to any club (including yours).\n\nCan be used even if the transfer window is closed.\n\n\nif from_teamid is 0 then the tool will call [GetTeamIdFromPlayerId](#GetTeamIdFromPlayerId) internally\n\nFor now keep the `loantobuy` == `-1`. I don't know how it works exactly, maybe will fix it later.\n\n**Constraints**: \n- Can be executed only in Career Mode.\n\n### Syntax\n```\nvoid LoanPlayer(playerid, to_teamid, length_in_months, loantobuy, from_teamid=0)\nor\nvoid cLoanPlayer(playerid, from_teamid, to_teamid, length_in_months, loantobuy)\n```\n### Return\nNone\n\n### Example\n```\n-- Loan \n-- Cristiano Ronaldo (playerid: 20801)\n-- To Manchester United (ID: 11)\n-- contract length = 12 months (1 year)\n-- loantobuy = -1 (no loan to buy)\n\nlocal playerid = 20801\nlocal to_teamid = 11\nif (IsPlayerPresigned(playerid)) then\n  -- Delete presigned contract to force loan\n  DeletePresignedContract(playerid)\nend\n\nif (IsPlayerLoanedOut(playerid)) then\n  -- Terminate loan to force new loan\n  TerminateLoan(playerid)\nend\n\nLoanPlayer(playerid, to_teamid, 12, -1)\n```\n\n## ReleasePlayerFromTeam\n\n**WARNING**\n\nThis can damage/break your career save (especially if you do something stupid, like trying to release player who is on loan in other club). Use with caution. Remember about backups.\n\n\nRelease player from current club.\n\nUnder the hood it's just transfering the player to free agents, like that:\n```\nplayer_teamid = GetTeamIdFromPlayerId(playerid)\nfree_agents_teamid = 111592\ncTransferPlayer(playerid, player_teamid, free_agents_teamid, 0, 0, 0, 12)\n```\n\n**Constraints**: \n- Can be executed only in Career Mode.\n\n### Syntax\n```\nvoid ReleasePlayerFromTeam(playerid)\n```\n### Return\nNone\n\n### Example\n```\n-- Make Messi Free Agent\nReleasePlayerFromTeam(158023)\n```\n\n## TerminateLoan\n\n**WARNING**\n\nThis can damage/break your career save. Use with caution. Remember about backups.\n\nTerminates player loan. The player will immediately back to his club.\n\n**Constraints**: \n- Can be executed only in Career Mode.\n\n### Syntax\n```\nvoid TerminateLoan(playerid)\n```\n### Return\nNone\n\n### Example\n```\n-- Juan Camilo Hernndez will immediately back to Watford (if he is loaned out in your career)\nplayerid = 237034 -- Juan Camilo Hernndez\nif (IsPlayerLoanedOut(playerid)) then\n    TerminateLoan(playerid) \nend\n```\n\n## DeletePresignedContract\n\n**WARNING**\n\nThis can damage/break your career save. Use with caution. Remember about backups.\n\nDelete player related record from career_presignedcontract table.\n\n**Constraints**: \n- Can be executed only in Career Mode.\n\n### Syntax\n```\nvoid DeletePresignedContract(playerid)\n```\n### Return\nnone\n\n### Example\n```\n-- Delete Juan Camilo Hernndez presigned contract(if he has one)\nplayerid = 237034 -- Juan Camilo Hernndez\nif (IsPlayerPresigned(playerid)) then\n    DeletePresignedContract(playerid)\nend\n```\n\n## IsPlayerLoanedOut\n\nCheck if player is loaned out.\n\n**Constraints**: \n- Can be executed only in Career Mode.\n\n### Syntax\n```\nbool IsPlayerLoanedOut(playerid)\n```\n### Return\nType: **Bool**\n- **True** if player is loaned out\n- **False** if player isn't loaned out\n\n### Example\n```\n-- Check if Juan Camilo Hernndez is loaned out\nplayerid = 237034 -- Juan Camilo Hernndez\nif (IsPlayerLoanedOut(playerid)) then\n    Log(\"Player is Loaned out\")\nelse\n    Log(\"Player isn't Loaned out\")\nend\n```\n\n## IsPlayerPresigned\n\nCheck if player is has presigned contract.\nTo be more precise, it checks if the player reladed record exist in career_presignedcontract table\n\n**Constraints**: \n- Can be executed only in Career Mode.\n\n### Syntax\n```\nbool IsPlayerPresigned(playerid)\n```\n### Return\nType: **Bool**\n- **True** if player has got record in career_presignedcontract\n- **False** if player hasn't got record in career_presignedcontract\n\n### Example\n```\n-- Juan Camilo Hernndez will immediately back to Watford (if he is loaned out in your career)\nplayerid = 237034 -- Juan Camilo Hernndez\nif (IsPlayerPresigned(playerid)) then\n    Log(\"Player is presigned\")\nelse\n    Log(\"Player isn't presigned\")\nend\n```\n\n## IsPlayerTransferListed\n\nCheck if player with given playerid is on transfer list.\nIf given teamid == 0 then the tool will call [GetTeamIdFromPlayerId](#GetTeamIdFromPlayerId) internally.\n\n**Constraints**: \n- Can be executed only in Career Mode.\n\n### Syntax\n```\nbool IsPlayerTransferListed(int playerid, int teamid=0)\nor\nbool cIsPlayerTransferListed(int playerid, int teamid)\n```\n### Return\nType: **Bool**\n- **True** if player is on transfer list\n- **False** if player isn't on transfer list\n\n### Example\n```\nlocal bIsInCM = IsInCM();\n\nif (bIsInCM) then\n    -- Check if Messi is on transfer list\n    local is_on_transferlist = IsPlayerTransferListed(158023)\n    if (is_on_transferlist) then\n        Log(\"Player is on transfer list\")\n    else\n        Log(\"Player is not on transfer list\")\n    end\n    \nend\n\n```\n\n## IsPlayerLoanListed\n\nCheck if player with given playerid is on loan list.\nIf given teamid == 0 then the tool will call [GetTeamIdFromPlayerId](#GetTeamIdFromPlayerId) internally.\n\n**Constraints**: \n- Can be executed only in Career Mode.\n\n### Syntax\n```\nbool IsPlayerLoanListed(int playerid, int teamid=0)\nor\nbool cIsPlayerLoanListed(int playerid, int teamid)\n```\n### Return\nType: **Bool**\n- **True** if player is on loan list\n- **False** if player isn't on loan list\n\n### Example\n```\nlocal bIsInCM = IsInCM();\n\nif (bIsInCM) then\n    -- Check if Messi is on loan list\n    local is_on_loanlist = IsPlayerLoanListed(158023)\n    if (is_on_loanlist) then\n        Log(\"Player is on loan list\")\n    else\n        Log(\"Player is not on loan list\")\n    end\n    \nend\n\n```\n\n\n## AddPlayerToTransferList\n\nAdds player with given playerid to transfer list.\nIf given teamid == 0 then the tool will call [GetTeamIdFromPlayerId](#GetTeamIdFromPlayerId) internally.\n\n**WARNING!!**\n\nAltho it's possible to make player transfer and loan listed, you shouldn't do that as it doesn't happen in \"natural\" game environment.\nSo, player should be only on loan list **or** only on transfer list.\n\n**Constraints**: \n- Can be executed only in Career Mode.\n\n### Syntax\n```\nvoid AddPlayerToTransferList(int playerid, int teamid=0)\nor\nvoid cAddPlayerToTransferList(int playerid, int teamid)\n```\n### Return\nNone\n\n### Example\n```\nlocal bIsInCM = IsInCM();\n\nif (bIsInCM) then\n    -- Make Messi transferlisted\n    AddPlayerToTransferList(158023)\nend\n\n```\n\n## AddPlayerToLoanList\n\nAdds player with given playerid to loan list.\nIf given teamid == 0 then the tool will call [GetTeamIdFromPlayerId](#GetTeamIdFromPlayerId) internally.\n\n**WARNING!!**\n\nAltho it's possible to make player transfer and loan listed, you shouldn't do that as it doesn't happen in \"natural\" game environment.\nSo, player should be only on loan list **or** only on transfer list.\n\n**Constraints**: \n- Can be executed only in Career Mode.\n\n### Syntax\n```\nvoid AddPlayerToLoanList(int playerid, int teamid=0)\nor\nvoid cAddPlayerToLoanList(int playerid, int teamid)\n```\n### Return\nNone\n\n### Example\n```\nlocal bIsInCM = IsInCM();\n\nif (bIsInCM) then\n    -- Make Messi loanlisted\n    AddPlayerToLoanList(158023)\nend\n\n```\n\n## RemovePlayerFromLists\n\nRemove player with given playerid from transfer and loan list.\n\nIf given teamid == 0 then the tool will call [GetTeamIdFromPlayerId](#GetTeamIdFromPlayerId) internally.\n\n**Constraints**: \n- Can be executed only in Career Mode.\n\n### Syntax\n```\nvoid RemovePlayerFromLists(int playerid, int teamid=0)\nor\nvoid cRemovePlayerFromLists(int playerid, int teamid)\n```\n### Return\nNone\n\n### Example\n```\nlocal bIsInCM = IsInCM();\n\nif (bIsInCM) then\n    -- Remove Messi from transfer and loan list\n    RemovePlayerFromLists(158023)\nend\n\n```\n\n\n## RemovePlayerFromTransferList\n\nRemove player with given playerid from transfer list\nIf given teamid == 0 then the tool will call [GetTeamIdFromPlayerId](#GetTeamIdFromPlayerId) internally.\n\n**Constraints**: \n- Can be executed only in Career Mode.\n\n### Syntax\n```\nvoid RemovePlayerFromTransferList(int playerid, int teamid=0)\nor\nvoid cRemovePlayerFromTransferList(int playerid, int teamid)\n```\n### Return\nNone\n\n### Example\n```\nlocal bIsInCM = IsInCM();\n\nif (bIsInCM) then\n    -- Remove Messi from transfer list\n    RemovePlayerFromTransferList(158023)\nend\n\n```\n\n## RemovePlayerFromLoanList\n\nRemove player with given playerid from loan list\nIf given teamid == 0 then the tool will call [GetTeamIdFromPlayerId](#GetTeamIdFromPlayerId) internally.\n\n**Constraints**: \n- Can be executed only in Career Mode.\n\n### Syntax\n```\nvoid RemovePlayerFromLoanList(int playerid, int teamid=0)\nor\nvoid cRemovePlayerFromLoanList(int playerid, int teamid)\n```\n### Return\nNone\n\n### Example\n```\nlocal bIsInCM = IsInCM();\n\nif (bIsInCM) then\n    -- Remove Messi from loan list\n    RemovePlayerFromLoanList(158023)\nend\n\n```\n\n\n## CreateOfferForPlayer\n\nCreate Transfer or Loan offer for player.\n\nOffer type can be any value between 0 and 5 (maybe 6).\nDefault offer type is 5. Game commonly uses offer type 3 or 5.\nFor loan offer use offer type == 2 (sometimes you may get loan to buy offer instead of normal offer).\n\nCreated offer should appear in-game after 2-5 days. Transfer window probably must be open.\n\nYou can use this to create offers for your players and also to initiate transfers between CPU teams.\nUsing this doesn't guarantee that the player will change his team. There is always chance that player or team will break negotiations.\n\nThe unrealistic transfer offers may not even appear. For example if you will try to create an transfer offer for Messi from AFC Wimbledon game may ignore it and not even show it (because AFC Wimbledon doesn't have enough transfer budget).\nIf the transfer offer will somehow appear then for 99% it will fail later on when Messi will negotiate his wage with team (AFC Wimbledon doesn't have enough wage budget to cover Messi salary).\n\n**Constraints**: \n- Can be executed only in Career Mode.\n\n### Syntax\n```\nvoid CreateOfferForPlayer(int playerid, int offer_from_teamid, int offer_type=5)\nor\nvoid cCreateOfferForPlayer(int playerid, int offer_from_teamid, int offer_type)\n```\n### Return\nNone\n\n### Example\n```\nlocal bIsInCM = IsInCM();\n\nif (bIsInCM) then\n    -- Create offer for Messi (playerid: 158023)\n    -- From Manchester City (teamid: 10)\n    -- With offer type == 5\n    CreateOfferForPlayer(158023, 10, 5)\nend\n\n```\n\n\n## GetDBTablesNames\nGet names of database tables that we can access (same tables are available in Database Editor)\n\n### Syntax\n```\narray GetDBTablesNames()\n```\n\n### Return\nType: **Array of strings**\n- List of database tables names\n- OnError: Return empty string and write error in log file.\n\n### Example\n```\nlocal tables = GetDBTablesNames()\nLog(type(tables))\nLog(type(tables[1]))\nLog(tables[1])\n\n```\n```\n> table\n> string\n> assetcryptokeys\n```\n\n## GetDBTableFields\nGet field (column) and their description for database table\n\n### Syntax\n```\ntable GetDBTableFields(string table_name)\n```\n### Return\nType: **Array of** [DBFieldDescription](#DBFieldDescription)\n### Example\n```\n-- Get field names for career_users table_\nlocal fields = GetDBTableFields(\"career_users\")\n\n-- Number of fields\nLog(#fields)\n\nLog(fields[1][\"name\"])\nLog(fields[2][\"name\"])\nLog(fields[3][\"name\"])\nLog(fields[4][\"name\"])\n```\n```\n> 16\n> sponsorid\n> leagueseasonmessagesent\n> seasoncount\n> playertype\n```\n## GetDBTableRows\nGet all valid rows for database table\n### Syntax\n```\narray GetDBTableRows(string table_name)\n```\n### Return\nType: **Array of** [DBRow](#DBRow)\n### Example\n```\n-- Get all rows for teams table\nlocal rows = GetDBTableRows(\"teams\")\n\n-- Number of rows\nLog(#rows)\n\n-- 1st row\nlocal row = rows[1]\nLog(row[\"teamname\"][\"value\"])\nLog(row[\"teamid\"][\"value\"])\n\n-- 6th row\nlocal row = rows[6]\nLog(row[\"teamname\"][\"value\"])\nLog(row[\"teamid\"][\"value\"])\n```\n```\n> 763\n> Arsenal\n> 1\n> Everton\n> 7\n```\n\n## InsertDBTableRow\nInserts new row into database table.\n### Syntax\n```\ntable InsertDBTableRow(string table_name, table row_data)\n```\n### Return\nReturn newly created row\n\nType: [DBRow](#DBRow)\n\n### Example\n```\n-- Assign custom name to Messi (Playerid: 158023)\nlocal row_data = {\n    playerid = \"158023\",\n    firstname = \"aaa\",\n    surname = \"bbb\",\n    playerjerseyname = \"ccc\"\n}\n\nlocal row = InsertDBTableRow(\"editedplayernames\", row_data)\nLog(type(row))\n\n-- That's how to verify if row has been inserted\nif (row.addr == \"0\") then\n    Log(\"Insert row failed. Check logs for more info\")\n    return    \nend\n\nLog(row[\"playerid\"][\"value\"])\n\n```\n```\n> table\n> 158023\n\n```\n\n## DeleteDBTableRow\nDelete row from database table.\n### Syntax\n```\nbool InsertDBTableRow(string table_name, table row_data)\n```\n### Return\nType: **Bool**\n- **True** if row has been deleted\n- **False** if failed\n\n### Example\n```\n-- Assign custom name to Messi (Playerid: 158023)\nlocal row_data = {\n    playerid = \"158023\",\n    firstname = \"aaa\",\n    surname = \"bbb\",\n    playerjerseyname = \"ccc\"\n}\n\nlocal row = InsertDBTableRow(\"editedplayernames\", row_data)\n\n-- That's how to verify if row has been inserted\nif (row.addr == \"0\") then\n    Log(\"Insert row failed. Check logs for more info\")\n    return    \nend\n\n-- Delete the row that we just created\nlocal success = DeleteDBTableRow(\"editedplayernames\", row)\nif (success) then\n    Log(\"Row deleted\")\nelse\n    Log(\"Failed to delete row\")\nend\n\n```\n```\nRow deleted\n\n```\n\n\n## EditDBTableField\nEdit field in database table\n### Syntax\n```\nbool EditDBTableField(table field)\n```\n### Return\nType: **Bool**\n- **True** if field edited succesfully\n- **False** if failed\n\n### Example\n```\nlocal success = false;\n\n-- Get all rows for manager table\nlocal rows = GetDBTableRows(\"manager\")\n\n-- first row\nlocal row = rows[1]\n\n-- Current Name of the manager\nLog(row.firstname.value)\nrow.firstname.value = \"Edited Firstname\"\n\n-- Commit\nsuccess = EditDBTableField(row[\"firstname\"])\nassert(success, \"EditDBTableField false for firstname\")\n\n-- Current NationalityID of the manager\nLog(row.nationality.value)\nrow.nationality.value = \"37\"\n\n-- Commit\nsuccess = EditDBTableField(row[\"nationality\"])\nassert(success, \"EditDBTableField false for nationality\")\n\n-- Check if values has changed\n\nLog(\"After Edit\")\n-- Get all rows for manager table\nlocal rows = GetDBTableRows(\"manager\")\n\n-- first row\nlocal row = rows[1]\nLog(row.firstname.value)\nLog(row.nationality.value)\n\n```\n```\n> Mikel\n> 45\n> After Edit\n> Edited Firstname\n> 37\n```\n\n## PlayerCaptureSetOutputDirectory\nSet the directory where generated images will be saved.\nDirectory must exist.\nPath is relative to the game installation directory, so \"LiveEditorMods\\\\root\\\\Legacy\\\\data\\\\ui\\\\imgAssets\\\\heads\" will store images in \"<YOUR_GAME_INSTALLATION_DIR>\\\\LiveEditorMods\\\\root\\\\Legacy\\\\data\\\\ui\\\\imgAssets\\\\heads\"\n\n**Constraints**: \n- Can be executed only in Career Mode.\n### Syntax\n```\nvoid PlayerCaptureSetOutputDirectory(string output_directory)\n```\n### Return\nvoid\n\n### Example\n```\n-- Execute only if we are in career mode\nif not IsInCM() then return end\n\n-- Path is relative to the game installation directory\nPlayerCaptureSetOutputDirectory(\"LiveEditorMods\\\\root\\\\Legacy\\\\data\\\\ui\\\\imgAssets\\\\heads\")\n\n-- 0 - Head and shoulders\n-- 1 - Head\n-- 2 - Body\nPlayerCaptureSetCamera(1)\n\n-- 256x256\nPlayerCaptureSetSize(256, 256)\n\n-- Image Type\n-- 0 - PNG\n-- 1 - DDS\nPlayerCaptureSetType(1)\n\n-- Add Messi Capture\nPlayerCaptureAddPlayer(158023, GetTeamIdFromPlayerId(158023))\n\n-- Add Cristiano Ronaldo Capture\nPlayerCaptureAddPlayer(20801, GetTeamIdFromPlayerId(20801))\n\n-- Add Haaland Capture\nPlayerCaptureAddPlayer(239085, GetTeamIdFromPlayerId(239085))\n\n-- Start Capturing\nPlayerCaptureStart()\n```\n\n## PlayerCaptureSetSize\nSet size of the image output\n\n**Constraints**: \n- Can be executed only in Career Mode.\n### Syntax\n```\nvoid PlayerCaptureSetSize(int width, int height)\n```\n### Return\nvoid\n\n### Example\n```\n-- Execute only if we are in career mode\nif not IsInCM() then return end\n\n-- Path is relative to the game installation directory\nPlayerCaptureSetOutputDirectory(\"LiveEditorMods\\\\root\\\\Legacy\\\\data\\\\ui\\\\imgAssets\\\\heads\")\n\n-- 0 - Head and shoulders\n-- 1 - Head\n-- 2 - Body\nPlayerCaptureSetCamera(1)\n\n-- 256x256\nPlayerCaptureSetSize(256, 256)\n\n-- Image Type\n-- 0 - PNG\n-- 1 - DDS\nPlayerCaptureSetType(1)\n\n-- Add Messi Capture\nPlayerCaptureAddPlayer(158023, GetTeamIdFromPlayerId(158023))\n\n-- Add Cristiano Ronaldo Capture\nPlayerCaptureAddPlayer(20801, GetTeamIdFromPlayerId(20801))\n\n-- Add Haaland Capture\nPlayerCaptureAddPlayer(239085, GetTeamIdFromPlayerId(239085))\n\n-- Start Capturing\nPlayerCaptureStart()\n```\n\n## PlayerCaptureSetType\nSet type of the image output\n0 - PNG\n1 - DDS (DXT5)\n\n**Constraints**: \n- Can be executed only in Career Mode.\n### Syntax\n```\nvoid PlayerCaptureSetType(int typ)\n```\n### Return\nvoid\n\n### Example\n```\n-- Execute only if we are in career mode\nif not IsInCM() then return end\n\n-- Path is relative to the game installation directory\nPlayerCaptureSetOutputDirectory(\"LiveEditorMods\\\\root\\\\Legacy\\\\data\\\\ui\\\\imgAssets\\\\heads\")\n\n-- 0 - Head and shoulders\n-- 1 - Head\n-- 2 - Body\nPlayerCaptureSetCamera(1)\n\n-- 256x256\nPlayerCaptureSetSize(256, 256)\n\n-- Image Type\n-- 0 - PNG\n-- 1 - DDS\nPlayerCaptureSetType(1)\n\n-- Add Messi Capture\nPlayerCaptureAddPlayer(158023, GetTeamIdFromPlayerId(158023))\n\n-- Add Cristiano Ronaldo Capture\nPlayerCaptureAddPlayer(20801, GetTeamIdFromPlayerId(20801))\n\n-- Add Haaland Capture\nPlayerCaptureAddPlayer(239085, GetTeamIdFromPlayerId(239085))\n\n-- Start Capturing\nPlayerCaptureStart()\n```\n\n## PlayerCaptureSetCamera\nSet Capture Camera\n0 - Head and Shoulders\n\n![](https://i.imgur.com/Vhq9jdb.png)\n\n1 - Head\n\n![](https://i.imgur.com/4qA78rQ.png)\n\n2 - Body \n\n![](https://i.imgur.com/875CJY7.png)\n\n**Constraints**: \n- Can be executed only in Career Mode.\n### Syntax\n```\nvoid PlayerCaptureSetCamera(int cameraID)\n```\n### Return\nvoid\n\n### Example\n```\n-- Execute only if we are in career mode\nif not IsInCM() then return end\n\n-- Path is relative to the game installation directory\nPlayerCaptureSetOutputDirectory(\"LiveEditorMods\\\\root\\\\Legacy\\\\data\\\\ui\\\\imgAssets\\\\heads\")\n\n-- 0 - Head and shoulders\n-- 1 - Head\n-- 2 - Body\nPlayerCaptureSetCamera(1)\n\n-- 256x256\nPlayerCaptureSetSize(256, 256)\n\n-- Image Type\n-- 0 - PNG\n-- 1 - DDS\nPlayerCaptureSetType(1)\n\n-- Add Messi Capture\nPlayerCaptureAddPlayer(158023, GetTeamIdFromPlayerId(158023))\n\n-- Add Cristiano Ronaldo Capture\nPlayerCaptureAddPlayer(20801, GetTeamIdFromPlayerId(20801))\n\n-- Add Haaland Capture\nPlayerCaptureAddPlayer(239085, GetTeamIdFromPlayerId(239085))\n\n-- Start Capturing\nPlayerCaptureStart()\n```\n\n## PlayerCaptureAddPlayer\nAdd player to the queue for generating minifaces.\nCall [PlayerCaptureStart](#PlayerCaptureStart) to start generating.\n\n**Constraints**: \n- Can be executed only in Career Mode.\n### Syntax\n```\nvoid PlayerCaptureAddPlayer(int playerid, int teamid)\n```\n### Return\nvoid\n\n### Example\n```\n-- Execute only if we are in career mode\nif not IsInCM() then return end\n\n-- Path is relative to the game installation directory\nPlayerCaptureSetOutputDirectory(\"LiveEditorMods\\\\root\\\\Legacy\\\\data\\\\ui\\\\imgAssets\\\\heads\")\n\n-- 0 - Head and shoulders\n-- 1 - Head\n-- 2 - Body\nPlayerCaptureSetCamera(1)\n\n-- 256x256\nPlayerCaptureSetSize(256, 256)\n\n-- Image Type\n-- 0 - PNG\n-- 1 - DDS\nPlayerCaptureSetType(1)\n\n-- Add Messi Capture\nPlayerCaptureAddPlayer(158023, GetTeamIdFromPlayerId(158023))\n\n-- Add Cristiano Ronaldo Capture\nPlayerCaptureAddPlayer(20801, GetTeamIdFromPlayerId(20801))\n\n-- Add Haaland Capture\nPlayerCaptureAddPlayer(239085, GetTeamIdFromPlayerId(239085))\n\n-- Start Capturing\nPlayerCaptureStart()\n```\n\n## PlayerCaptureStart\nGenerate minifaces for players in queue.\nAdd players by calling [PlayerCaptureAddPlayer](#PlayerCaptureAddPlayer)\n\nOn my PC it takes around 2s to generate one miniface, so be prepared that if you want to generate a lot of minifaces you will need to wait a while.\n\n**Constraints**: \n- Can be executed only in Career Mode.\n### Syntax\n```\nvoid PlayerCaptureStart()\n```\n### Return\nvoid\n\n### Example\n```\n-- Execute only if we are in career mode\nif not IsInCM() then return end\n\n-- Path is relative to the game installation directory\nPlayerCaptureSetOutputDirectory(\"LiveEditorMods\\\\root\\\\Legacy\\\\data\\\\ui\\\\imgAssets\\\\heads\")\n\n-- 0 - Head and shoulders\n-- 1 - Head\n-- 2 - Body\nPlayerCaptureSetCamera(1)\n\n-- 256x256\nPlayerCaptureSetSize(256, 256)\n\n-- Image Type\n-- 0 - PNG\n-- 1 - DDS\nPlayerCaptureSetType(1)\n\n-- Add Messi Capture\nPlayerCaptureAddPlayer(158023, GetTeamIdFromPlayerId(158023))\n\n-- Add Cristiano Ronaldo Capture\nPlayerCaptureAddPlayer(20801, GetTeamIdFromPlayerId(20801))\n\n-- Add Haaland Capture\nPlayerCaptureAddPlayer(239085, GetTeamIdFromPlayerId(239085))\n\n-- Start Capturing\nPlayerCaptureStart()\n```\n\n## GetTransferBudget\nGet user club transfer budget\n\n**Constraints**: \n- Can be executed only in Career Mode.\n\n### Syntax\n```\nint GetTransferBudget()\n```\n### Return\nType: **Int**\n- Transfer budget value\n\n### Example\n```\nSetTransferBudget(6777656)\nlocal transfer_budget = GetTransferBudget()\nLog(\"transfer_budget: \" .. transfer_budget)\nLog(type(transfer_budget))\n\n```\n```\n> transfer_budget: 6777656\n> number\n```\n\n## SetTransferBudget\nSet user club transfer budget\n\n**Constraints**: \n- Can be executed only in Career Mode.\n\n### Syntax\n```\nvoid SetTransferBudget(int new_transfer_budget)\n```\n### Return\nType: **void**\n\n### Example\n```\nSetTransferBudget(6777656)\nlocal transfer_budget = GetTransferBudget()\nLog(\"transfer_budget: \" .. transfer_budget)\nLog(type(transfer_budget))\n\n```\n```\n> transfer_budget: 6777656\n> number\n```\n"
  },
  {
    "path": "lua/libs/live_editor.lua",
    "content": "--- Main live editor lib\n--- Documentation in -> DOC.MD\n\nLog(\"Init live_editor.lua\")\n\nfunction DeleteDBTableRow(table_name, row)\n    local addr = \"0\"\n    for k,v in pairs(row) do\n       addr = row[k].addr\n       break\n    end\n    return DeleteDBTableRowByAddr(table_name, addr)\nend\n\n--- CreateOfferForPlayer(158023, 243, 5)\nfunction CreateOfferForPlayer(playerid, teamid, offer_type)\n    cCreateOfferForPlayer(playerid, teamid, offer_type or 5)\nend\n\n--- TransferPlayer(20801, 1794, 500, 600, 60)\n--- TransferPlayer(188567, 7, 500000000, 600000, 60)\n--- TransferPlayer(158023, 1, 500000000, 600000, 60)\nfunction TransferPlayer(playerid, to_teamid, transfersum, wage, contract_length, from_teamid, release_clause)\n    cTransferPlayer(playerid, from_teamid or 0, to_teamid, transfersum, release_clause or -1, wage, contract_length)\nend\n\n--- LoanPlayer(20801, 241, 12, -1)\n--- LoanPlayer(158023, 11, 12, -1)\n\nfunction LoanPlayer(playerid, to_teamid, loan_length, loantobuy, from_teamid)\n    cLoanPlayer(playerid, from_teamid or 0, to_teamid, loan_length, loantobuy)\nend\n\nfunction ReleasePlayerFromTeam(playerid)\n    player_teamid = GetTeamIdFromPlayerId(playerid)\n    free_agents_teamid = 111592\n    cTransferPlayer(playerid, player_teamid, free_agents_teamid, 0, 0, 0, 12)\nend\n\nfunction IsPlayerTransferListed(playerid, teamid)\n    return cIsPlayerTransferListed(playerid, teamid or 0)\nend\n\nfunction IsPlayerLoanListed(playerid, teamid)\n    return cIsPlayerLoanListed(playerid, teamid or 0)\nend\n\nfunction AddPlayerToTransferList(playerid, teamid)\n    cAddPlayerToTransferList(playerid, teamid or 0)\nend\n\nfunction AddPlayerToLoanList(playerid, teamid)\n    cAddPlayerToLoanList(playerid, teamid or 0)\nend\n\nfunction RemovePlayerFromLoanList(playerid, teamid)\n    cRemovePlayerFromLoanList(playerid, teamid or 0)\nend\n\nfunction RemovePlayerFromTransferList(playerid, teamid)\n    cRemovePlayerFromTransferList(playerid, teamid or 0)\nend\n\nfunction RemovePlayerFromLists(playerid, teamid)\n    cRemovePlayerFromLists(playerid, teamid or 0)\nend\n\n--- DEPRECATED\n-- Current not doing anything, keep for the compatiblity with old scripts\nfunction ReloadDB()\nend\nfunction ReloadPlayersManager()\nend\n"
  },
  {
    "path": "lua/scripts/1ovr_99pot.lua",
    "content": "--- This script will set all players attributes on 1 and potential on 99\n\n-- Check if we are in Career Mode\nlocal bIsInCM = IsInCM();\n\n-- Get all rows for players table\nlocal rows = GetDBTableRows(\"players\")\n\nlocal fields_to_edit = {\n    -- GK\n    \"gkdiving\",\n    \"gkhandling\",\n    \"gkkicking\",\n    \"gkpositioning\",\n    \"gkreflexes\",\n\n    -- ATTACK\n    \"crossing\",\n    \"finishing\",\n    \"headingaccuracy\",\n    \"shortpassing\",\n    \"volleys\",\n\n    -- DEFENDING\n    \"defensiveawareness\",\n    \"standingtackle\",\n    \"slidingtackle\",\n\n    -- SKILL\n    \"dribbling\",\n    \"curve\",\n    \"freekickaccuracy\",\n    \"longpassing\",\n    \"ballcontrol\",\n\n    -- POWER\n    \"shotpower\",\n    \"jumping\",\n    \"stamina\",\n    \"strength\",\n    \"longshots\",\n\n    -- MOVEMENT\n    \"acceleration\",\n    \"sprintspeed\",\n    \"agility\",\n    \"reactions\",\n    \"balance\",\n\n    -- MENTALITY\n    \"aggression\",\n    \"composure\",\n    \"interceptions\",\n    \"positioning\",\n    \"vision\",\n    \"penalties\",\n\n    \"overallrating\"\n}\n\nlocal counter = 0;\n\nfor i=1, #rows do\n    local player = rows[i]\n    local iplayerid = math.floor(player.playerid.value)\n    local has_dev_plan = false\n    if (bIsInCM) then\n        has_dev_plan = PlayerHasDevelopementPlan(iplayerid)\n    end\n\n    for j=1, #fields_to_edit do\n        local field = fields_to_edit[j]\n        player[field].value = \"1\"\n        EditDBTableField(player[field])\n\n        if (has_dev_plan) then \n            PlayerSetValueInDevelopementPlan(iplayerid, field, 1)\n        end\n    end\n\n    player.modifier.value = \"0\"\n    EditDBTableField(player.modifier)\n\n    player.potential.value = \"99\"\n    EditDBTableField(player.potential)\n\n    counter = counter + 1\n\nend\n\nMessageBox(\"Done\", string.format(\"Edited %d players\\n\", counter))\n"
  },
  {
    "path": "lua/scripts/99ovr_99pot.lua",
    "content": "--- This script will set all players attributes on 99 and potential on 99\n\n-- Check if we are in Career Mode\nlocal bIsInCM = IsInCM();\n\n-- Get all rows for players table\nlocal rows = GetDBTableRows(\"players\")\n\nlocal fields_to_edit = {\n    -- GK\n    \"gkdiving\",\n    \"gkhandling\",\n    \"gkkicking\",\n    \"gkpositioning\",\n    \"gkreflexes\",\n\n    -- ATTACK\n    \"crossing\",\n    \"finishing\",\n    \"headingaccuracy\",\n    \"shortpassing\",\n    \"volleys\",\n\n    -- DEFENDING\n    \"defensiveawareness\",\n    \"standingtackle\",\n    \"slidingtackle\",\n\n    -- SKILL\n    \"dribbling\",\n    \"curve\",\n    \"freekickaccuracy\",\n    \"longpassing\",\n    \"ballcontrol\",\n\n    -- POWER\n    \"shotpower\",\n    \"jumping\",\n    \"stamina\",\n    \"strength\",\n    \"longshots\",\n\n    -- MOVEMENT\n    \"acceleration\",\n    \"sprintspeed\",\n    \"agility\",\n    \"reactions\",\n    \"balance\",\n\n    -- MENTALITY\n    \"aggression\",\n    \"composure\",\n    \"interceptions\",\n    \"positioning\",\n    \"vision\",\n    \"penalties\",\n\n    \"overallrating\"\n}\n\nlocal counter = 0;\n\nfor i=1, #rows do\n    local player = rows[i]\n    local iplayerid = math.floor(player.playerid.value)\n    local has_dev_plan = false\n    if (bIsInCM) then\n        has_dev_plan = PlayerHasDevelopementPlan(iplayerid)\n    end\n\n    for j=1, #fields_to_edit do\n        local field = fields_to_edit[j]\n        player[field].value = \"99\"\n        EditDBTableField(player[field])\n\n        if (has_dev_plan) then \n            PlayerSetValueInDevelopementPlan(iplayerid, field, 99)\n        end\n    end\n\n    player.modifier.value = \"0\"\n    EditDBTableField(player.modifier)\n\n    player.potential.value = \"99\"\n    EditDBTableField(player.potential)\n\n    counter = counter + 1\n\nend\n\nMessageBox(\"Done\", string.format(\"Edited %d players\\n\", counter))\n\n"
  },
  {
    "path": "lua/scripts/capture_newheads.lua",
    "content": "local new_heads = {\n    150724,\n    167524,\n    171896,\n    181783,\n    189196,\n    192012,\n    192045,\n    214136,\n    224179,\n    235536,\n    239822,\n    242069,\n    252935,\n    253691,\n    258309\n}\n-- Get all rows for players table\nlocal rows = GetDBTableRows(\"players\")\n\nlocal counter = 0;\nfor i=1, #rows do\n    if counter > #new_heads then break end\n\n    local player = rows[i]\n\n    local iplayerid = math.floor(player.playerid.value)\n    local teamid = 111\n    local headassetid = new_heads[counter+1]\n\n    if (headassetid) then\n        Log(string.format(\"PID: %d, headassetid: %d\", iplayerid, headassetid))\n        player.hashighqualityhead.value = \"1\"\n        EditDBTableField(player.hashighqualityhead)\n\n        player.headclasscode.value = \"0\"\n        EditDBTableField(player.headclasscode)\n\n        player.headassetid.value = tostring(headassetid)\n        EditDBTableField(player.headassetid)\n        local path = string.format(\"generated minifaces/p%d.DDS\", headassetid)\n        AddMinifaceToGenerate(iplayerid, teamid, path)\n        counter = counter + 1\n    end\nend\n\nLog(\"Start Generating\")\nGenerateMinifaces()\n"
  },
  {
    "path": "lua/scripts/custom_headassetid_to_playerid.lua",
    "content": "--- This script can add/update headmodels from your frostymod\n--- You need to edit \"headmodels_map\" by yourself, pattern is simple:\n--- [playerid] = headassetid,\n--- by default it updates these faces:\n--- paqueta 205361\n--- semedo 215556\n--- de jong 235526\n--- arthur 122574\n--- ansu 230899\n--- b fernandes 192565\n--- tonali 202223\n--- haaland 192641\n--- neres 231436\n--- odegaard 241651\n--- Nicolas Pepe 226110\n--- Sensi 183795\n--- Kubo 232730\n--- Carles Perez 230065\n--- Yari Verscharen 208549\n--- Which are part of Master Patch Revolution 1.0 by (MPR united modders).\n\nlocal headmodels_map = {\n    [233927] = 205361,\n    [227928] = 215556,\n    [228702] = 235526,\n    [230658] = 122574,\n    [253004] = 230899,\n    [212198] = 192565,\n    [241096] = 202223,\n    [239085] = 192641,\n    [236632] = 231436,\n    [222665] = 241651,\n    [226110] = 226110,\n    [229857] = 183795,\n    [237681] = 232730,\n    [240654] = 230065,\n    [246419] = 208549\n}\n-- Get all rows for players table\nlocal rows = GetDBTableRows(\"players\")\n\nlocal counter = 0;\nfor i=1, #rows do\n    local player = rows[i]\n\n    local iplayerid = math.floor(player.playerid.value)\n    local headassetid = headmodels_map[iplayerid]\n\n    if (headassetid) then\n        player.hashighqualityhead.value = \"1\"\n        EditDBTableField(player.hashighqualityhead)\n\n        player.headclasscode.value = \"0\"\n        EditDBTableField(player.headclasscode)\n\n        player.headassetid.value = tostring(headassetid)\n        EditDBTableField(player.headassetid)\n        counter = counter + 1\n    end\n\nend\n\nMessageBox(\"Done\", string.format(\"Edited %d players\\n\", counter))\n"
  },
  {
    "path": "lua/scripts/custom_tattoos_to_playerid.lua",
    "content": "--- This script can add/update leftarm tattoos from your frostymod\n--- You need to edit \"tattoos_map\" by yourself, pattern is simple:\n--- [playerid] = tattooid,\n--- by default it updates these tattoos:\n--- 070 : Roberto Firmino 201942\n--- 071 : Manuel Lanzini 188988\n--- 072 : Dani Ceballos 222509\n--- 073 : Emerson Palmieri 210736\n--- 074 : Isco 197781\n--- 075 : James Maddison 220697\n--- 076 : Christian Pulisic 227796\n--- 077 : Ricardo Quaresma 20775\n--- 078 : Santi Mina 212623\n--- 079 : Saul 208421\n--- 080 : Arturo Vidal 181872\n--- 081 : Maro Icardi 201399\n--- 082 : Marcelo 176676\n--- 083 : Nainggolan 178518\n--- 084 : Gabriel Jesus 230666\n--- 085 : Leonardo Bonucci 184344\n--- 086 : Samu Castillejo 210617\n--- 087 : Coutinho 189242\n--- 088 : Joao Cancelo 210514\n--- 089 : Milinkovic-Savic 223848\n--- 090 : Perotti 183900\n--- 091 : Pellegrini 228251\n--- 092 : Spinazzola 202884\n--- 093 : Douglas Costa 190483\n--- 666 : Sergio Ramos 155862\n\nlocal tattoos_map = {\n    [201942] = 70,\n    [188988] = 71,\n    [222509] = 72,\n    [210736] = 73,\n    [197781] = 74,\n    [220697] = 75,\n    [227796] = 76,\n    [20775] = 77,\n    [212623] = 78,\n    [208421] = 79,\n    [181872] = 80,\n    [201399] = 81,\n    [176676] = 82,\n    [178518] = 83,\n    [230666] = 84,\n    [184344] = 85,\n    [210617] = 86,\n    [189242] = 87,\n    [210514] = 88,\n    [223848] = 89,\n    [183900] = 90,\n    [228251] = 91,\n    [202884] = 92,\n    [190483] = 93,\n    [155862] = 666,\n}\n\n-- Get all rows for players table\nlocal rows = GetDBTableRows(\"players\")\n\nlocal counter = 0;\nfor i=1, #rows do\n    local player = rows[i]\n\n    local iplayerid = math.floor(player.playerid.value)\n    local tattooid = tattoos_map[iplayerid]\n\n    if (tattooid) then\n        player.tattooleftarm.value = tostring(tattooid)\n        EditDBTableField(player.tattooleftarm)\n\n        counter = counter + 1\n    end\n\nend\n\nMessageBox(\"Done\", string.format(\"Edited %d players\\n\", counter))\n"
  },
  {
    "path": "lua/scripts/export_season_stats.lua",
    "content": "-- This script will export current season stats (goals scored, assists etc.) to CSV.\n-- The SEASON_STATS.csv file will be created on Desktop.\n-- The game resets stats at the beginning of every season, so you need to run the script at the end of every season.\n\nlocal desktop_path = string.format(\"%s\\\\Desktop\", os.getenv('USERPROFILE'))\nlocal current_date = GetCurrentDate()\nlocal file_path = string.format(\"%s\\\\SEASON_STATS_%d_%d_%d.csv\", desktop_path, current_date.day, current_date.month, current_date.year)\n\n-- Don't Touch\nlocal columns = {\n    \"position\",\n    \"playerid\",\n    \"playername\",\n    --\"team\",\n    \"competition\",\n    \"appearances\",\n    \"AVG\",\n    \"MOTMs\",\n    \"goals\",\n    \"assists\",\n    \"yellow_cards\",\n    \"two_yellow\",\n    \"red_cards\",\n    \"saves\",\n    \"goals_conceded\",\n    \"cleansheets\",\n}\n\nlocal col_to_key = {\n    position = \"position\",\n    playerid = \"playerid\",\n    playername = \"playername\",\n    --team = \"teamname\",\n    competition = \"compname\",\n    appearances = \"app\",\n    AVG = \"avg\",\n    MOTMs = \"motm\",\n    goals = \"goals\",\n    assists = \"assists\",\n    yellow_cards = \"yellow\",\n    two_yellow = \"two_yellow\",\n    red_cards = \"red\",\n    saves = \"saves\",\n    goals_conceded = \"goals_conceded\",\n    cleansheets = \"clean_sheets\",\n}\n\nfunction get_pos_name(pos_id)\n    POS_TO_NAME = {\n        [0] = \"GK\",\n        [1] = \"SW\",\n        [2] = \"RWB\",\n        [3] = \"RB\",\n        [4] = \"RCB\",\n        [5] = \"CB\",\n        [6] = \"LCB\",\n        [7] = \"LB\",\n        [8] = \"LWB\",\n        [9] = \"RDM\",\n        [10] = \"CDM\",\n        [11] = \"LDM\",\n        [12] = \"RM\",\n        [13] = \"RCM\",\n        [14] = \"CM\",\n        [15] = \"LCM\",\n        [16] = \"LM\",\n        [17] = \"RAM\",\n        [18] = \"CAM\",\n        [19] = \"LAM\",\n        [20] = \"RF\",\n        [21] = \"CF\",\n        [22] = \"LF\",\n        [23] = \"RW\",\n        [24] = \"RS\",\n        [25] = \"ST\",\n        [26] = \"LS\",\n        [27] = \"LW\"\n    }\n    return POS_TO_NAME[pos_id] or \"INVALID\"\nend\n\nfunction get_players()\n    local result = {}\n    \n    local rows = GetDBTableRows(\"players\")\n    for i=1, #rows do\n        local row = rows[i]\n        local playerid = math.floor(row.playerid.value)\n        \n        local player = {}\n        \n        player.position = get_pos_name(math.floor(row.preferredposition1.value))\n        \n        -- Get the names later, only if needed as it's very slow\n        player.name = \"\"\n        --player.teamname = \"\"\n\n        result[playerid] = player\n    end\n    \n    return result\nend\n\nfunction get_stats(players)\n    local result = {}\n   \n    local all_stats = GetPlayersStats()\n\n    for i=1, #all_stats do\n        local stat = all_stats[i]\n        local playerid = stat.playerid\n        local app = stat.app\n\n        if playerid > 0 and playerid < 4294967295 and app > 0 then\n            local player = players[playerid]\n            if player ~= nil then\n                if player.name == \"\" then\n                    player.name = GetPlayerName(playerid)\n                end\n                \n                local stats = player.stats or {}\n                local compobjid = stat.compobjid\n                stats[compobjid] = {}\n                \n                stats[compobjid][\"playerid\"] = playerid\n                stats[compobjid][\"playername\"] = player.name\n                stats[compobjid][\"position\"] = player.position\n                \n                stats[compobjid][\"goals\"] = stat.goals\n                stats[compobjid][\"yellow\"] = stat.yellow\n                stats[compobjid][\"red\"] = stat.red\n                stats[compobjid][\"assists\"] = stat.assists\n                stats[compobjid][\"clean_sheets\"] = stat.clean_sheets\n                stats[compobjid][\"compobjid\"] = compobjid\n                stats[compobjid][\"compname\"] = GetCompetitionNameByObjID(compobjid)\n                \n                -- Not sure\n                stats[compobjid][\"motm\"] = stat.motm\n                stats[compobjid][\"saves\"] = stat.saves\n                stats[compobjid][\"goals_conceded\"] = stat.goals_conceded\n                stats[compobjid][\"two_yellow\"] = stat.two_yellow\n                \n                local avg = stat.avg\n                if app > 1 then \n                    avg = (avg / app) / 10 \n                elseif app == 1 then\n                    avg = avg / 10\n                end\n                \n                stats[compobjid][\"app\"] = app\n                stats[compobjid][\"avg\"] = string.format(\"%0.2f\", avg)\n\n                player.stats = stats\n                result[playerid] = player\n\n            end\n        end\n    end\n\n    return result\nend\n\nassert(IsInCM(), \"Script must be executed in career mode\")\n\nlocal file = io.open(file_path, \"w+\")\nio.output(file)\n\nio.write(table.concat(columns, \",\"))\nio.write(\"\\n\")\nlocal players_stats = get_stats(get_players())\nfor playerid, data in pairs(players_stats) do\n    for compobjid, stat in pairs(data.stats) do\n        local row = {}\n        for i=1, #columns do\n            local colname = columns[i]\n            local _key = col_to_key[colname]\n            table.insert(row, stat[_key])\n        end\n        io.write(table.concat(row, \",\"))\n        io.write(\"\\n\")\n    end\n\nend\n\nio.close(file)\nLog(\"Done\")\n"
  },
  {
    "path": "lua/scripts/extend_user_team_players_contracts.lua",
    "content": "-- This script will automatically extend the contracts of players in your team\n-- 4 years by default\nlocal new_contract_length = 12 * 4 -- 4 years\n\n-- Don't Touch anything below\nassert(IsInCM(), \"Script must be executed in career mode\")\n\nfunction update_contractvaliduntil(contracts)\n    local contracts_to_update = 0\n    local updated_contracts = 0\n\n    for playerid, contractvaliduntil in pairs(contracts) do\n        contracts_to_update = contracts_to_update + 1\n    end\n    \n    local rows = GetDBTableRows(\"players\")\n    for i=1, #rows do\n        if updated_contracts >= contracts_to_update then\n            break\n        end\n        local row = rows[i]\n        local playerid = math.floor(row.playerid.value)\n        if playerid > 0 then\n            local contractvaliduntil = contracts[playerid]\n            if contractvaliduntil ~= nil then\n                row.contractvaliduntil.value = contractvaliduntil\n                EditDBTableField(row.contractvaliduntil)\n                updated_contracts = updated_contracts + 1\n            end\n        end\n    end\n    \n    local failed_to_update = contracts_to_update - updated_contracts\n    \n    if failed_to_update > 0 then\n        Log(string.format(\"Failed to update %d contracts\", failed_to_update))\n    end\n    \n    Log(string.format(\"Updated Contracts: %d\", updated_contracts))\nend\n\nfunction update_contracts()\n    local result = {}\n\n    local currentdate = GetCurrentDate()\n    local int_current_date = currentdate.year * 10000 + currentdate.month * 100 + currentdate.day\n    \n    local rows = GetDBTableRows(\"career_playercontract\")\n    \n    for i=1, #rows do\n        local row = rows[i]\n        local contract_status = row.contract_status.value\n        local is_loaned_in = contract_status == \"1\" or contract_status == \"3\" or contract_status == \"5\"\n        \n        -- Ignore players that are loaned in\n        if not is_loaned_in then\n            local playerid = math.floor(row.playerid.value)\n            if playerid > 0 then\n                local contract_date = math.floor(row.contract_date.value)\n                local last_status_change_date = math.floor(row.last_status_change_date.value)\n                \n                -- Set contract date to current date\n                if contract_date < int_current_date then\n                    row.contract_date.value = string.format(\"%d\", int_current_date)\n                    EditDBTableField(row.contract_date)\n                end\n                \n                -- last_status change date to current date\n                if last_status_change_date < int_current_date then\n                    row.last_status_change_date.value = string.format(\"%d\", int_current_date)\n                    EditDBTableField(row.last_status_change_date)\n                end\n                \n                row.duration_months.value = string.format(\"%d\", new_contract_length)\n                EditDBTableField(row.duration_months)\n\n                local contractvaliduntil = string.format(\"%d\", currentdate.year + math.floor(new_contract_length / 12))\n                \n                result[playerid] = contractvaliduntil\n            end\n        end\n    end\n    \n    return result\nend\n\nupdate_contractvaliduntil(update_contracts())\nLog(\"Done\")"
  },
  {
    "path": "lua/scripts/generate_minifaces.lua",
    "content": "-- Generate miniface for everyplayer in playable league.\n-- THIS WILL TAKE A WHILE TO COMPLETE, like around 10h...\n-- and... if the game will crash (which is very possible) you will have to start from beginning...\n\n-- Execute only if we are in career mode\nif not IsInCM() then return end\n\n-- List of teams that cause game crashes or other problems\nlocal BLACKLISTED_TEAMS = {\n    [112264] = true         -- YOUTH ACADEMY\n}\n\n-- List of leagues that we want to skip\nlocal BLACKLISTED_LEAGUES = {\n    [78] = true,            -- International\n    [2136] = true,          -- International Women\n    [76] = true,            -- Rest of World\n    [383] = true,           -- Create Player League\n    [2028] = true           -- Youth Squad League\n}\n\n-- Path is relative to the game installation directory\nPlayerCaptureSetOutputDirectory(\"<default>\")\n\n-- 0 - Head and shoulders\n-- 1 - Head\n-- 2 - Body\nPlayerCaptureSetCamera(1)\n\n-- 256x256\nPlayerCaptureSetSize(256, 256)\n\n-- Image Type\n-- 0 - PNG\n-- 1 - DDS\nPlayerCaptureSetType(1)\n\n-- Get all rows for leagueteamlinks table\nlocal rows = GetDBTableRows(\"leagueteamlinks\")\nfor i=1, #rows do\n    local ltlink = rows[i]\n\n    local ileagueid = math.floor(ltlink.leagueid.value)\n\n    if BLACKLISTED_LEAGUES[ileagueid] then\n        local iteamid = math.floor(ltlink.teamid.value)\n        BLACKLISTED_TEAMS[iteamid] = true\n    end\nend\n\n-- Get all rows for teamplayerlinks table\nrows = GetDBTableRows(\"teamplayerlinks\")\n\nfor i=1, #rows do\n    local tplink = rows[i]\n\n    local iteamid = math.floor(tplink.teamid.value)\n    if not BLACKLISTED_TEAMS[iteamid] then\n        local iplayerid = math.floor(tplink.playerid.value)\n        PlayerCaptureAddPlayer(iplayerid, iteamid)\n    end\nend\n\n-- Start Capturing\nPlayerCaptureStart()\n"
  },
  {
    "path": "lua/scripts/generate_minifaces_user_team.lua",
    "content": "-- Generate miniface for everyplayer in the user team\r\n-- May take around 5 mins to complete, so be patient.\r\n\r\n-- Execute only if we are in career mode\r\nif not IsInCM() then return end\r\n\r\n-- Path is relative to the game installation directory\r\nPlayerCaptureSetOutputDirectory(\"<default>\")\r\n\r\n-- 0 - Head and shoulders\r\n-- 1 - Head\r\n-- 2 - Body\r\nPlayerCaptureSetCamera(1)\r\n\r\n-- 256x256\r\nPlayerCaptureSetSize(256, 256)\r\n\r\n-- Image Type\r\n-- 0 - PNG\r\n-- 1 - DDS\r\nPlayerCaptureSetType(1)\r\n\r\nlocal user_teamid = GetUserTeamID()\r\n\r\n-- Get all rows for teamplayerlinks table\r\nrows = GetDBTableRows(\"teamplayerlinks\")\r\n\r\nfor i=1, #rows do\r\n    local tplink = rows[i]\r\n\r\n    local iteamid = math.floor(tplink.teamid.value)\r\n    if user_teamid == iteamid then\r\n        local iplayerid = math.floor(tplink.playerid.value)\r\n        PlayerCaptureAddPlayer(iplayerid, iteamid)\r\n    end\r\nend\r\n\r\n-- Start Capturing\r\nPlayerCaptureStart()\r\n"
  },
  {
    "path": "lua/scripts/is_retiring=0.lua",
    "content": "--- This script sets is_retiring on 0 for all players.\n\n-- Get all rows for players table\nlocal rows = GetDBTableRows(\"players\")\n\nlocal counter = 0;\nfor i=1, #rows do\n    local player = rows[i]\n\n    player.isretiring.value = \"0\"\n    EditDBTableField(player.isretiring)\nend\n\nMessageBox(\"Done\", string.format(\"Edited %d players\\n\", counter))\n"
  },
  {
    "path": "lua/scripts/list_players.lua",
    "content": "-- Check if we are in Career Mode\nlocal bIsInCM = IsInCM();\n\n-- Get all rows for players table\nlocal rows = GetDBTableRows(\"players\")\n\nfor i=1, #rows do\n    local player = rows[i]\n    local iplayerid = math.floor(player.playerid.value)\n\n    if (iplayerid > 0 and iplayerid < 280000) then\n        local teamid = GetTeamIdFromPlayerId(iplayerid)\n        local teamname = GetTeamName(teamid)\n        Log(string.format(\"%d;%d;%s\", iplayerid, teamid, teamname))\n    end\nend\n"
  },
  {
    "path": "lua/scripts/medium_socklenghtcode.lua",
    "content": "--- This script change socks length on medium\n\n-- Get all rows for players table\nlocal rows = GetDBTableRows(\"players\")\n\nlocal counter = 0;\nfor i=1, #rows do\n    local player = rows[i]\n\n    player.socklengthcode.value = \"0\"\n    EditDBTableField(player.socklengthcode)\nend\n\nMessageBox(\"Done\", string.format(\"Edited %d players\\n\", counter))\n"
  },
  {
    "path": "lua/scripts/modifier=0.lua",
    "content": "--- This script will set modifier to 0 for all players.\n\n-- Get all rows for players table\nlocal rows = GetDBTableRows(\"players\")\n\nlocal counter = 0;\n\nfor i=1, #rows do\n    local player = rows[i]\n    player.modifier.value = \"0\"\n    EditDBTableField(player.modifier)\n    counter = counter + 1\nend\n\nMessageBox(\"Done\", string.format(\"Edited %d players\\n\", counter))\n"
  },
  {
    "path": "lua/scripts/untuck_shirts.lua",
    "content": "--- This script untuck shirts\n\n-- Get all rows for players table\nlocal rows = GetDBTableRows(\"players\")\n\nfor i=1, #rows do\n    local player = rows[i]\n\n    player.jerseystylecode.value = \"1\"\n    EditDBTableField(player.jerseystylecode)\nend\n\nMessageBox(\"Done\",  \"Done\")\n"
  },
  {
    "path": "lua/tests/main_test.lua",
    "content": "--- Test script registered in luarunner\nLog(\"Run LUA Test\")\n\nlocal bIsInCM = IsInCM();\nassert(type(bIsInCM) == \"boolean\", \"IsInCM not a boolean\")\n\nif (bIsInCM) then\n    Log(\"Is In Career Mode\")\n\n    Log(\"Run the tests as Bolton (ID: 4) Manager \")\n    local user_teamid = GetUserTeamID()\n    \n    Log(\"user_teamid: \" .. user_teamid)\n    assert(type(user_teamid) == \"number\", \"user_teamid not a number\")\n\n    SetTransferBudget(6777656)\n    local transfer_budget = GetTransferBudget()\n    Log(\"transfer_budget: \" .. transfer_budget)\n    assert(type(transfer_budget) == \"number\", \"transfer_budget not a number\")\n    assert(transfer_budget == 6777656, \"transfer_budget != 6777656\")\n\n    local arr_table_names = GetDBTablesNames()\n    assert(type(arr_table_names) == \"table\", \"arr_table_names not a table\")\n    Log(\"Elements in arr_table_names: \" .. #arr_table_names)\n        \n    local fields = GetDBTableFields(\"career_users\")\n    assert(#fields > 0, \"fields <= 0\")\n    Log(#fields)\n    Log(fields[1][\"name\"])\n    \n    local rows = GetDBTableRows(\"teams\")\n    \n    local row = rows[6]\n    local success = false;\n    \n    row.teamname.value = \"Edited String123\"\n    success = EditDBTableField(row[\"teamname\"])\n    assert(success, \"EditDBTableField false for teamname\")\n    row.clubworth.value = \"6543210\"\n    success = EditDBTableField(row[\"clubworth\"])\n    assert(success, \"EditDBTableField false for clubworth\")\n\n    local playername1 = GetPlayerName(20801)\n    Log(\"playername1 (20801): \" .. playername1)\n    assert(type(playername1) == \"string\", \"GetPlayerName(20801) not a string\")\n    assert(playername1 == \"Cristiano Ronaldo\", \"playername1 != Cristiano Ronaldo\")\n\n    local playername2 = GetPlayerName(158023)\n    Log(\"playername2 (158023): \" .. playername2)\n    assert(type(playername2) == \"string\", \"GetPlayerName(158023) not a string\")\n    assert(playername2 == \"Lionel Messi\", \"playername2 != Lionel Messi\")\n\n    -- TODO Getters and check\n    SetPlayerSharpness(279999, 100)\n    SetPlayerMorale(279999, 95)\n    SetPlayerForm(279999, 95)\n    SetPlayerFitness(279999, 95)\n\n    Log(\"Transfer test CPU\")\n\n    local transfer_test_playerid = 20801\n    local transfer_test_playerteamid = GetTeamIdFromPlayerId(transfer_test_playerid)\n\n    TransferPlayer(transfer_test_playerid, 241, 500, 600, 60)\n    assert(GetTeamIdFromPlayerId(transfer_test_playerid) == 241, \"Ronaldo is not in FC Barcelona\")\n\n    TransferPlayer(transfer_test_playerid, user_teamid, 500000000, 60000, 60)\n    assert(GetTeamIdFromPlayerId(transfer_test_playerid) == user_teamid, \"Ronaldo is not in user team\")\n\n    ReleasePlayerFromTeam(transfer_test_playerid)\n    assert(GetTeamIdFromPlayerId(transfer_test_playerid) == 111592, \"Ronaldo is not in free agents\")\n\n    TransferPlayer(transfer_test_playerid, transfer_test_playerteamid, 500, 600, 60)\n    assert(GetTeamIdFromPlayerId(transfer_test_playerid) == transfer_test_playerteamid, \"Ronaldo is not in org club\")\n\n    Log(\"Transfer test CPU Done\")\n\n    Log(\"Transfer test USER\")\n\n    transfer_test_playerid = 279999\n    transfer_test_playerteamid = GetTeamIdFromPlayerId(transfer_test_playerid)\n\n    TransferPlayer(transfer_test_playerid, 243, 500, 600, 60)\n    assert(GetTeamIdFromPlayerId(transfer_test_playerid) == 243, \"Murphy is not in Real Madrid\")\n\n    TransferPlayer(transfer_test_playerid, user_teamid, 500000000, 60000, 60)\n    assert(GetTeamIdFromPlayerId(transfer_test_playerid) == user_teamid, \"Murphy is not in user team\")\n\n    ReleasePlayerFromTeam(transfer_test_playerid)\n    assert(GetTeamIdFromPlayerId(transfer_test_playerid) == 111592, \"Murphy is not in free agents\")\n\n    TransferPlayer(transfer_test_playerid, transfer_test_playerteamid, 500, 600, 60)\n    assert(GetTeamIdFromPlayerId(transfer_test_playerid) == transfer_test_playerteamid, \"Murphy is not in org club\")\n\n    Log(\"Transfer test USER Done\")\n\n    Log(\"Transfer/Loan List Checks for user player\")\n    local listing_checks_playerid = 279999\n    local is_on_transferlist = IsPlayerTransferListed(listing_checks_playerid)\n    assert(type(is_on_transferlist) == \"boolean\", \"is_on_transferlist not a boolean\")\n\n    local is_on_loanlist = IsPlayerLoanListed(listing_checks_playerid)\n    assert(type(is_on_loanlist) == \"boolean\", \"is_on_loanlist not a boolean\")\n\n    RemovePlayerFromLists(listing_checks_playerid)\n    is_on_loanlist = IsPlayerLoanListed(listing_checks_playerid)\n    is_on_transferlist = IsPlayerTransferListed(listing_checks_playerid)\n\n    assert(is_on_loanlist == false, listing_checks_playerid .. \" is on loan list after RemovePlayerFromLists called\")\n    assert(is_on_transferlist == false, listing_checks_playerid .. \" is on transfer list after RemovePlayerFromLists called\")\n\n    AddPlayerToTransferList(listing_checks_playerid)\n    is_on_transferlist = IsPlayerTransferListed(listing_checks_playerid)\n    assert(is_on_transferlist, listing_checks_playerid .. \" is not on transfer list after AddPlayerToTransferList called\")\n    RemovePlayerFromTransferList(listing_checks_playerid)\n    is_on_transferlist = IsPlayerTransferListed(listing_checks_playerid)\n    assert(is_on_transferlist == false, listing_checks_playerid .. \" is on transfer list after RemovePlayerFromTransferList called\")\n\n    AddPlayerToLoanList(listing_checks_playerid)\n    is_on_loanlist = IsPlayerLoanListed(listing_checks_playerid)\n    assert(is_on_loanlist, listing_checks_playerid .. \" is not on loan list after AddPlayerToLoanList called\")\n    RemovePlayerFromLoanList(listing_checks_playerid)\n    is_on_loanlist = IsPlayerLoanListed(listing_checks_playerid)\n    assert(is_on_loanlist == false, listing_checks_playerid .. \" is not on loan list after RemovePlayerFromTransferList called\")\n    \n    RemovePlayerFromLists(listing_checks_playerid)\n    is_on_loanlist = IsPlayerLoanListed(listing_checks_playerid)\n    is_on_transferlist = IsPlayerTransferListed(listing_checks_playerid)\n\n    assert(is_on_loanlist == false, listing_checks_playerid .. \" is on loan list after second RemovePlayerFromLists called\")\n    assert(is_on_transferlist == false, listing_checks_playerid .. \" is on transfer list after second RemovePlayerFromLists called\")\n\n    Log(\"Transfer/Loan List Checks for CPU player\")\n    local listing_checks_cpu_playerid = 158023\n    local listing_checks_cpu_teamid = GetTeamIdFromPlayerId(listing_checks_cpu_playerid)\n    Log(\"listing_checks_cpu_playerid: \" .. listing_checks_cpu_playerid)\n    Log(\"listing_checks_cpu_teamid: \" .. listing_checks_cpu_teamid)\n\n    RemovePlayerFromLists(listing_checks_cpu_playerid)\n    is_on_loanlist = IsPlayerLoanListed(listing_checks_cpu_playerid, listing_checks_cpu_teamid)\n    is_on_transferlist = IsPlayerTransferListed(listing_checks_cpu_playerid, listing_checks_cpu_teamid)\n\n    assert(is_on_loanlist == false, listing_checks_cpu_playerid .. \" is on loan list after RemovePlayerFromLists called\")\n    assert(is_on_transferlist == false, listing_checks_cpu_playerid .. \" is on transfer list after RemovePlayerFromLists called\")\n\n    AddPlayerToTransferList(listing_checks_cpu_playerid, listing_checks_cpu_teamid)\n    AddPlayerToLoanList(listing_checks_cpu_playerid, listing_checks_cpu_teamid)\n\n    is_on_loanlist = IsPlayerLoanListed(listing_checks_cpu_playerid, listing_checks_cpu_teamid)\n    is_on_transferlist = IsPlayerTransferListed(listing_checks_cpu_playerid, listing_checks_cpu_teamid)\n    assert(is_on_loanlist, listing_checks_cpu_playerid .. \" is not on loan list after AddPlayerToLoanList called\")\n    assert(is_on_transferlist, listing_checks_cpu_playerid .. \" is not on transfer list after AddPlayerToTransferList called\")\n\n    RemovePlayerFromTransferList(listing_checks_cpu_playerid, listing_checks_cpu_teamid)\n    is_on_loanlist = IsPlayerLoanListed(listing_checks_cpu_playerid, listing_checks_cpu_teamid)\n    is_on_transferlist = IsPlayerTransferListed(listing_checks_cpu_playerid, listing_checks_cpu_teamid)\n    assert(is_on_loanlist, listing_checks_cpu_playerid .. \" is not on loan list after RemovePlayerFromTransferList called\")\n    assert(is_on_transferlist == false, listing_checks_cpu_playerid .. \" is on transfer list after RemovePlayerFromTransferList called\")\n\n    AddPlayerToTransferList(listing_checks_cpu_playerid, listing_checks_cpu_teamid)\n    RemovePlayerFromLoanList(listing_checks_cpu_playerid, listing_checks_cpu_teamid)\n    is_on_loanlist = IsPlayerLoanListed(listing_checks_cpu_playerid, listing_checks_cpu_teamid)\n    is_on_transferlist = IsPlayerTransferListed(listing_checks_cpu_playerid, listing_checks_cpu_teamid)\n    assert(is_on_loanlist == false, listing_checks_cpu_playerid .. \" is on loan list after RemovePlayerFromLoanList called\")\n    assert(is_on_transferlist, listing_checks_cpu_playerid .. \" is on not transfer list after RemovePlayerFromLoanList called\")\n    AddPlayerToLoanList(listing_checks_cpu_playerid, listing_checks_cpu_teamid)\n\n    RemovePlayerFromLists(listing_checks_cpu_playerid, listing_checks_cpu_teamid)\n    is_on_loanlist = IsPlayerLoanListed(listing_checks_cpu_playerid, listing_checks_cpu_teamid)\n    is_on_transferlist = IsPlayerTransferListed(listing_checks_cpu_playerid, listing_checks_cpu_teamid)\n\n    assert(is_on_loanlist == false, listing_checks_cpu_playerid .. \" is on loan list after second RemovePlayerFromLists called\")\n    assert(is_on_transferlist == false, listing_checks_cpu_playerid .. \" is on transfer list after second RemovePlayerFromLists called\")\n\n    Log(\"Transfer/Loan List Checks Done\")\n\n    local loan_test1 = IsPlayerLoanedOut(158023)\n    local loan_test2 = IsPlayerLoanedOut(281425)\n\n    assert(loan_test1 == false, \"Messi shouldnt be on loan\")\n    assert(loan_test2, \"Miranda should be on loan\")\n\n    TerminateLoan(281425)\n    LoanPlayer(20801, 243, 12, -1)\n    LoanPlayer(279999, 241, 12, -1)\n\n    IsPlayerPresigned(158023)\n    DeletePresignedContract(158023)\nelse \n    Log(\"Not in Career Mode\")\nend\n\nlocal currentdate = GetCurrentDate()\nassert(type(currentdate) == \"table\", \"GetCurrentDate() not table\")\nLog(\"Current Date (day/month/year): \" .. currentdate.day .. \"/\" .. currentdate.month .. \"/\" .. currentdate.year )\n\nlocal team_name1 = GetTeamName(241) --- FC Barcelona\nLog(\"team_name1 (241): \" .. team_name1)\nassert(type(team_name1) == \"string\", \"GetTeamName(241) not a string\")\nassert(team_name1 == \"FC Barcelona\", \"team_name1 != FC Barcelona\")\n    \nlocal team_name2 = GetTeamName(7)   --- Everton\nLog(\"team_name2 (7): \" .. team_name2)\nassert(type(team_name2) == \"string\", \"GetTeamName(7) not a string\")\nassert(team_name2 == \"Everton\", \"team_name2 != Everton\")\n\nlocal teamid1 = GetTeamIdFromPlayerId(239085)\nLog(\"teamid1 (239085): \" .. teamid1)\nassert(type(teamid1) == \"number\", \"GetTeamIdFromPlayerId(158023) not a number\")\nassert(teamid1 == 10, \"teamid1 != 10\")\n\nlocal teamid2 = GetTeamIdFromPlayerId(218667)\nLog(\"teamid2 (218667): \" .. teamid2)\nassert(type(teamid2) == \"number\", \"GetTeamIdFromPlayerId(218667) not a number\")\nassert(teamid2 == 10, \"teamid2 != 10\")\n\nLog(\"LUA Test Passed\")\nMessageBox(\"LUA TEST\", \"TEST PASSED\")\n"
  },
  {
    "path": "mods/Extended Player and Manager Editor/README.md",
    "content": "**Extended Player & Manager Editor**\n\n**Mod Version**: 1.0\n\n\n```\nThings you can edit through \"Edit Manager\" in manager career mode:\n- First Name\n- Last Name\n- Nationality\n- Gender\n- Head\n- Outfits\n\nThings you can edit through \"Edit Player\" in manager career mode:\n- Everything under \"Info\" except Team & Commentary Name\n- Height (130cm-255cm)\n- Weight (30kg-150kg)\n- Attributes (sprint speed, dribbling, shot power etc.)\n- Hairs (for players which don't have scanned face)\n- Animations (Goal celeb, freekick & pen style, run style)\n- Outfits (Only few will work) \n```\n\nThere is tattoo tab also in players editor, but for 99% it won't work.\n\n**Edited files:**\n```\n    - root\\Legacy\\data\\avatar\\avatarcustomizationcfg_mainmenu_edit_created.json\n    - root\\Legacy\\data\\avatar\\avatarcustomizationcfg_mainmenu_edit_real.json\n    - root\\Legacy\\data\\avatar\\avatarcustomizationcfg_managercareer_create.JSON\n    - root\\Legacy\\data\\avatar\\avatarcustomizationcfg_managercareer_create_real.JSON\n    - root\\Legacy\\data\\avatar\\avatarcustomizationcfg_managercareer_edit.json\n    - root\\Legacy\\data\\avatar\\avatarcustomizationcfg_managercareer_edit_custom_player.JSON\n    - root\\Legacy\\data\\avatar\\avatarcustomizationcfg_managercareer_edit_retiredreal.JSON\n    - root\\Legacy\\data\\avatar\\avatarcustomizationcfg_managercareer_editplayers.json\n    - root\\Legacy\\data\\avatar\\avatarcustomizationcfg_playercareer_create.JSON\n    - root\\Legacy\\data\\avatar\\avatarcustomizationcfg_playercareer_edit_realplayer.json\n    - root\\Legacy\\data\\avatar\\avatarcustomizationcfg_playercareer_edit_vpro.json\n    - root\\Legacy\\data\\avatar\\avatarcustomizationcfg_playercareer_editplayers.json\n    - root\\Legacy\\data\\avatar\\avatarcustomizationcfg_tournament_editplayers.json\n```\n\n**How to install:**\n```\n1. Unzip archive\n2. Move the root folder to C:\\FIFA 23 Live Editor\\mods (replace files if needed) <https://i.imgur.com/8BOzvnu.png>\n3. Run the game & Live Editor\n```\n\n![](https://i.imgur.com/8BOzvnu.png)\n![](https://i.imgur.com/vOQdSxn.jpeg)\n"
  },
  {
    "path": "mods/Increased PCM Level Cap/README.md",
    "content": "**Increased Player Career Mode Level Cap**\n\n**Mod Version**: 1.0\n\n```\nThis mod increases the level cap in player career mode from 40 to 99\n\nIT DOESN'T GIVE YOU 99 LEVEL...\n```\n\n**Edited files:**\n```\n    - dlc\\dlc_FootballCompEng\\dlc\\FootballCompEng\\data\\PlayerGrowth\\player_growth.json\n```\n\n**Changelog:**\n```\n\n```\n**How to install:**\n```\n1. Unzip archive\n2. Move the root folder to C:\\FIFA 23 Live Editor\\mods (replace files if needed) <https://i.imgur.com/8BOzvnu.png>\n3. Run the game & Live Editor\n```\n\n![](https://i.imgur.com/8BOzvnu.png)\n![](https://i.imgur.com/7puQBqY.png)\n"
  },
  {
    "path": "mods/More Stupid Transfers/README.md",
    "content": "**More Stupid Transfers**\n\nTrying to reproduce what was available in FIFA 18 cheat table.\nBasically, this \"mod\" should increase the transfer activity which means more transfers between teams, but don't expect that the transfers done will be somewhat \"real\".\n\n\n**Mod Version**: 1.0\n\n\n**Edited files:**\n```\n    - dlc\\dlc_FootballCompEng\\dlc\\FootballCompEng\\data\\Transfers\\TransfersShortlistConfig.csv\n```\n\n**Changelog:**\n```\n1.0:\n    - \"Random Activity Chance Inside Deadline Day\"          changed from 30 to 90\n    - \"Random Activity Chance Inside Transfer Window\"       changed from 15 to 75\n    - \"Random Activity Chance Outside Transfer Window\"      changed from 0 to 55\n    - \"Listed Activity Chance\"                              changed from 35 to 95\n    - \"Listed Activity Chance - PAP\"                        changed from 50 to 90\n    - \"Max Number Of Teams To Search\"                       changed from 5 to 8\n    - \"Min Days Between Offers\"                             changed from 3 to 2\n    - \"Max Attempts To Find Suitable Team\"                  changed from 2 to 6\n    - \"Overall Difference Per Attempt Transfer\"             changed from 4 to 3\n    - \"Overall Difference Per Attempt Loan\"                 changed from 8 to 6\n```\n**How to install:**\n```\n1. Unzip archive\n2. Move the root folder to C:\\FIFA 23 Live Editor\\mods (replace files if needed) <https://i.imgur.com/8BOzvnu.png>\n3. Run the game & Live Editor\n\n```\n![](https://i.imgur.com/8BOzvnu.png)\n"
  },
  {
    "path": "mods/Quicksim Settings/README.md",
    "content": "**Quicksim Settings**\n\nNo cards & No injuries during quick sims\n\n**Mod Version**: 1.0\n\n\n**Edited files:**\n```\n    - dlc\\dlc_FootballCompEng\\dlc\\FootballCompEng\\data\\simsettings.ini\n```\n\n**Changelog:**\n```\n1.0:\n    - Max number of cards in a game                         4   ->  0\n    - Chance of a yellow card in the game                   45  ->  0\n    - Percentage chance of a red card being brandished      32  ->  0\n    - Percentage chance of receiving two reds in a game     2   ->  0\n    - Possible maximum number of injuries in a game         2   ->  0\n\n```\n**How to install:**\n```\n1. Unzip archive\n2. Move the root folder to C:\\FIFA 23 Live Editor\\mods (replace files if needed) <https://i.imgur.com/8BOzvnu.png>\n3. Run the game & Live Editor\n\n```\n\n![](https://i.imgur.com/8BOzvnu.png)\n"
  },
  {
    "path": "mods/World Cup LE Fix/README.md",
    "content": "**World Cup LE Fix**\r\n\r\nAllows you to enter the world cup mode while playing with the live editor\r\n\r\n**Mod Version**: 1.1\r\n\r\n**Author**: FIFER (?)\r\n\r\n\r\n**Edited files:**\r\n```\r\n    - data/ui/nav/worldCupMainMenuFlow.nav\r\n    - data/ui/nav/womenWorldCupMainMenuFlow.nav\r\n```\r\n\r\n**Changelog:**\r\n```\r\n1.0:\r\n    - Initial release\r\n\r\n1.1:\r\n    - Added support for Women's World Cup\r\n    - Redid the edit for mens, EA updated the nav file so the old version might have some bugs, this should work better\r\n```\r\n\r\n**How to install:**\r\n```\r\n1. Unzip archive\r\n2. Move the root folder to C:\\FIFA 23 Live Editor\\mods (replace files if needed) <https://i.imgur.com/8BOzvnu.png>\r\n3. Run the game & Live Editor\r\n\r\n```\r\n\r\n![](https://i.imgur.com/8BOzvnu.png)\r\n![](https://i.imgur.com/7agnhy7.jpeg)\r\n"
  }
]