{"id":18991351,"url":"https://github.com/mt-mods/minislots","last_synced_at":"2025-10-08T19:56:33.875Z","repository":{"id":103957571,"uuid":"432668497","full_name":"mt-mods/minislots","owner":"mt-mods","description":null,"archived":false,"fork":false,"pushed_at":"2021-11-28T09:24:11.000Z","size":16478,"stargazers_count":0,"open_issues_count":1,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-10-08T19:56:31.394Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mt-mods.png","metadata":{"files":{"readme":"README.txt","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-28T09:23:34.000Z","updated_at":"2021-11-28T09:24:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"97a322be-bac9-4223-825e-ed0404012e58","html_url":"https://github.com/mt-mods/minislots","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/mt-mods/minislots","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mt-mods%2Fminislots","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mt-mods%2Fminislots/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mt-mods%2Fminislots/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mt-mods%2Fminislots/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mt-mods","download_url":"https://codeload.github.com/mt-mods/minislots/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mt-mods%2Fminislots/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000664,"owners_count":26082805,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T17:13:36.438Z","updated_at":"2025-10-08T19:56:33.859Z","avatar_url":"https://github.com/mt-mods.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"Minislots Game Engine\n=====================\n\nWritten by Vanessa \"VanessaE\" Dannenberg\n\nThis package provides a simple \"engine\" to drive slimmed-down slot machines.\nIt takes-in money (and pays out, in \"currency\" mod Minegeld), spins reels,\nawards wins, and so forth.\n\nIt features wild cards, variable matching, multiple pay lines, and scatter\nwins and bonus rounds.\n\nMachines are fully themeable, from the biggest parts of the UI graphics to the\nsmallest details of the labels and numerals.  Most of the important UI\nelements' sizes and positions can be controlled.\n\nTwo example machines are included (described below).\n\nNote: As of this writing, the \"bonus round\" feature is only barely implemented\n- it only calls a function provided in the machine's definition.  This will be\nexpanded-on in time.\n\nDepends:  Minetest 0.4.17.1 or 5.0.0-dev, a corresponding minetest_game, and\nDan Duncombe's currency mod (my fork, which has 50 Mg notes,\nhttps://gitlab.com/VanessaE/currency ).\n\n\n\nImage Geometry:\n===============\n\nIn Minetest, the size and position of an item in a formspec is designated in\nunits equal to the spacing between two squares in your inventory.  In this\ndocumentation (and elsewhere in this modpack), I use \"Inventory Units\" or \"IU\"\nas shorthand for that.\n\nFor most things in the Minislots engine, scaling is done such that 64 pixels\nin the image fits exactly 1 IU, though 1 IU in the formspec doesn't\nnecessarily correspond with any specific number of screen pixels, since that\nwill vary with window and screen size, your Minetest GUI scaling setting, and\nother things.  That's not important here, though, since everything will still\nmaintain proper proportions.\n\nMinetest normally uses exact values for sizes, but due to legacy screwiness in\nhow formspecs are rendered, positioning is done at a scale of about 1.2422:1\nin the horizontal direction, and 1.1538:1 in the vertical direction, at least\nfor most stuff, and some stuff isn't exact-size either.\n\nFurthermore, Minetest doesn't treat the upper-left corner of a formspec as the\n(0,0) origin, but rather, somewhat below and to the right of that spot\n(officially it's off by (0.5, 0.5) IU, but in reality, the offset is closer to\nhalf of that).\n\nA 1x1 IU label/graphic that should be displayed at position (2,2) will end up\nbeing 1x1 in size as intended, but positioned at about (2.484,2.308) plus the\norigin point.\n\nThe Minislots display engine will position the imagery such that there's a\nthin shaded border (the default formspec background) around the slot machine's\ngraphics, and it will correct for the above-mentioned legacy scaling and\npositioning where it can.\n\nThe cash slot can be almost any size/shape and can be placed anywhere, so that\nyou could, for example, draw it to look like a coin slot, with all the chrome\nand corrugated edging and such, and position it at the top of the form, to\nmimic turn-of-the-20th-century-styled machines.  That said, bear in mind that\nwhen you click on it, you're taken to the \"cash intake\" screen, where the cash\nslot image is also shown, at the same size, and in there, it has to fit in\nbetween the single intake slot and the inventory slots.\n\nThe currency label, if printed, is positioned 25% of a digit's width after the\nend of the amount.  It is scaled to the 1.333 times a digit's width to keep\nit's relative scale correct.  It should indicate \"Minegeld\" in some manner,\nusually \"Mg\", as that's what this engine uses internally (from Dan Duncombe's\n\"currency\" mod).\n\nThe \"Win\" label, if printed, will appear half a digit glyph's width after the\nBet amount's currency label.\n\nThe \"Show Pay Lines\" and \"Show Pay Table\" buttons in the help screen are\n256x64 px and are always displayed 2x0.5 IU in size, in the lower right\ncorner of the form.\n\nBalance, Bet, Win, Scatter Win, and Bonus Win amounts are printed immediately\nnext to their labels.  Be sure you leave a little space on the right in the\nimages, as needed.\n\nThe scatter and bonus highlight boxes are displayed at a size relative to the\nreel image - 1.3333 times its width, by 0.4444 times its height, and\npositioned 0.1667 times the reel width above and left, thus centering it over\nthe symbol area.  This extra space is to allow one to draw a \"box\" around the\nreel symbol, and some kind of \"glow\" just outside of it, as in the example\nmachines' images.  The nominal size of the images is thus 1.3333 times the\nreel image width by 0.4444 times its height, but because Minetest does not\nsupport full image alpha on overlaid images in a formspec (that is, when\nplacing via \"image[\" rather than compositing with the \"^\" texture operator),\nyou'll have to fake it by dithering between some color and transparency -- if\nyou need alpha for a glow effect, that is.  Draw these images large enough,\nand the downscaling will blur the dithering, more or less turning it into\nalpha anyway (it's odd that you can exploit this \"fake\" alpha, but can't use\nreal alpha).  Hence, the images used in these example machines are three times\ntheir nominal size.\n\nThe various labels, parenthesis, and colon in the example machines were drawn\nwith The GIMP using the \"Liberation Sans Narrow Bold Condensed\" font, 85 point\nheight, with the inter-character spacing set as small as the wording would\nallow (usually -4.0).  Anti-aliasing enabled, \"Full\" hinting.  Text is\npositioned two pixels from the left, with the baseline at 60 (so the lower\nleft corner of the \"B\" in \"Bal:\" is at (2,60) according to GIMP).\n\nThe numerals use \"Century Schoolbook L Bold\" font, same size, settings, etc.\nSame vertical positioning, and horizontally-centered.\n\nReels always show three symbols' of height, not counting the overlap at the\ntop and bottom to allow for symbols to be positioned \"off-screen\".\n\nThe pay table, pay lines, admin, and cashout voucher screens all use the\nLiberation Sans font (either condensed, regular, or bold).\n\n\nGeometry for the 3-reel \"Golden 7's\" machine:\n---------------------------------------------\n\nThe upper overlay, reel underlay, and line win overlays are 832x704 px  --\u003e 13 x 11 IU\nThe lower overlay image is 832x128 px                                   --\u003e 13 x 2 IU\nA single reel image is 192x576 px                                       --\u003e 3 x 9  IU\nA digit glyph is 48x80 px, or 0.75 IU, but is displayed at 75%, 45% or\n40 %% of that size, depending on line height (to fit in large values)   --\u003e 0.563, 0.338, or 0.30 IU\nThe currency label is 96x80 px                                          --\u003e 0.4 x screen_line_height_3 IU\nThe \"Bal\", \"Bet\" and \"Win\" labels are 128x80 px, but should be narrower --\u003e 1.125 x line_height IU\nThe \"Line Win\" label is 256x80 px, should be displayed at 50% width     --\u003e 3.0 x screen_line_height_3 IU\nA colon or parenthesis is 24x80 pixels, displayed at 50% digit width    --\u003e 0.188 x screen_line_height_3 IU\nThe \"Scatter Win\" is 384x80 px, should be displayed at 50% width        --\u003e 3.0 x screen_line_height_3 IU\nThe \"Bonus Win\" label is 352x80 px, should be displayed at 50% width    --\u003e 2.75 x screen_line_height 3 IU\nThe cash slot is 320x128 px and is normally shown at full-size          --\u003e 5.0 x 2.0 IU\nThe \"screen\" in the lower overlay is 384x112 px                         --\u003e 6.0 x 0.875 IU.\nThe Scatter and Bonus highlight boxes are 768x768px                     --\u003e 4.0 x 4.0 IU\n\n\nGeometry for the 5-reel \"Golden 7's Deluxe\" machine:\n----------------------------------------------------\n\nThe upper overlay, reel underlay, and line win overlays are 939x704 px  --\u003e 14.667 x 11 IU\nThe lower overlay image is 939x128 px                                   --\u003e 14.667 x 2 IU\nA single reel image is 128x576 px                                       --\u003e 2 x 9  IU\nA digit glyph is 48x80 px                                               --\u003e 0.563, 0.338, or 0.30 IU\nThe currency label is 96x80 px                                          --\u003e 0.4 x screen_line_height_3 IU\nThe \"Bal\", \"Bet\" and \"Win\" labels are 128x80 px                         --\u003e 1.125 x line_height IU\nThe \"Line Win\" label is 256x80 px                                       --\u003e 3.0 x screen_line_height_3 IU\nA colon or parenthesis is 24x80 pixels                                  --\u003e 0.188 x screen_line_height_3 IU\nThe \"Scatter Win\" label is 384x80 px                                    --\u003e 3.0 x screen_line_height_3 IU\nThe \"Bonus Win\" label is 352x80 px                                      --\u003e 2.75 x screen_line_height 3 IU\nThe cash slot is 320x128 px                                             --\u003e 5.0 x 2.0 IU\nThe \"screen\" in the lower overlay is 426x112 px                         --\u003e 6.656 x 0.875 IU.\nThe Scatter and Bonus highlight boxes are 512x768 px                    --\u003e 2.667 x 4.0 IU\n\n\nMatching:\n=========\n\nIn most cases, line matches are pretty straightforward.  If you specify a\nline in your match table reading:\n\n{123, \"cherry\", \"lemon\", \"melon\", \"bell\", \"bar\"}\n\n...then any pay line with those five symbols in exactly that order will be\nconsidered a win, and the player will be awarded 123 times their line bet.\n\nIf an entry in the list is nil, for example:\n\n{ 99, \"cherry\", \"lemon\", \"melon\", \"bell\", nil}\n\n...then the corresponding reel will be ignored when checking if that entry is\na match (reel 5 in this case).  This can be used for various effects, but\nmainly, it's intended to let you specify a match that only needs a few\nmatching symbols on the first few reels, rather than requiring all five (or\nwhatever) reels to match on a pay line, such as a match of three of some\nsymbol on a five reel machine (one assumes that such a machine would have\nmatches programmed for four or five of that symbol as well, at progressively\nhigher values).\n\nIf an entry in the list is itself a list, then the the items in that sub-list\nmean \"any of these can match\".  So if you have a match entry like:\n\n{100, \"777\", \"777\", \"777\", \"777\", {\"7\", \"77\", \"777\"} }\n\n...then reels 1, 2, 3, and 4 would need to show a [777] symbol, and reel 5\nwould need to have one of [7], [77], or [777] also to complete the match\n(which would pay 100 times the line bet).\n\nYou can do this for any reels you want, with as many entries in each sub-list\nas you want (well, up to however many the machine has, of course).  For\nexample, the Golden 7's Deluxe machine has an entry in its pay table that pays\nout on a line win consisting of five assorted [7], [77], and/or [777] symbols\n(it also has one for assorted [bar], [2bar], and/or [3bar] symbols).\n\n\nThe human-readable pay table and pay lines screen:\n==================================================\n\nThe format of the paytable_desc is pretty simple - it's a table of tables. :-)\n\nEach line in the table represents one line in the pay table screen.  Each item\nin the line is either a chunk of text or a symbol prefixed with an \"@\".  In\norder to allow mixing symbols among text, it is necessary to break the line\nup, because the parser can't decode flat, mixed lines.  So if you have a line\nreading:\n\n{ \"Any three mixed \", \"@bar\", \"/\", \"@2bar\", \"/\", \"@3bar\", \" pays 10\" },\n\nThis will tell the parser-renderer to place the phrase \"Any three mixed \",\nthen right next to it the \"bar\" symbol.  A slash next to that, then a 2-bar,\nanother slash, a 3-bar, then the phrase \"pays 10\".  All of that placed on one\nline.\n\nYou can have as many lines as your layout and text size permit, and you may\nmix-and-match symbol and text items freely.\n\nThe special symbol \"@X\" tells the parser to insert a blank space equal to the\nsize of a symbol - this is useful for making grids of symbols with some spaces\nleft empty (as in a 3-out-of-5 reel match).\n\nThe parser doesn't have any text positioning commands yet, other than \"@wrap\"\n(below), but some rudimentary layout formatting can be accomplished by\ninserting blank lines or chunks of whitespace between items.\n\nFor a layout with fairly large text/symbols as in the 3-reel demo machine,\nthere's room for up to 19 lines, as long as the top line is not so long that\nit overlaps the [X] button.  For a layout like the 5-reel machine, with its\nsmaller text, You can fit up to about 25 lines.  Of course, you can just set\nyour line height to fit more text.\n\nThe symbols are of course picked from the \"stopped\" reel strip image, and they\nare always cropped square, so on a machine like the 5-reel demo, only the\nmiddle 128x128 pixel section of each 128x192 pixel symbol would be shown.\n\nFor the pay lines screen, the item format is simplified.  One table item per\nscreen line, which can be either a line of text, or a key indicating that one\nor more pay line images should overlaid onto their background image and placed\non the line.  The key for those is \"@\" followed by a number, a space, and\nanother number (e.g. \"@1 5\").  These numbers indicate the first and last pay\nline images to display.\n\nOn both screens, lines are \"printed\" from top to bottom in a column toward the\nleft side of the form background, overflowing into a second column if\nnecessary.  You can force an overflow into column 2 by inserting a table entry\nconsisting of the string \"@wrap\" (in the case of the pay table, it must be on\na line by itself, and not inside an inner table the way the other items are).\n\nIf paytable_desc or paylines_desc is not specified, then only the background,\n[X] button, and \"Show Pay Lines\" or \"Show Pay Table\" button will be displayed\non their respective screens.  This allows you to use the background image\nitself as the pay table/lines description, in the event that you want to skip\nthe text/image printing routines and just roll your own.\n\n\nHow wild cards work:\n====================\n\n[WILD!] is basically \"don't care\", as far as the engine's concerned, and will\nmatch the highest entry in the table that can theoretically form a match,\nregardless of how many symbols actually match, except if a wild_doesnt_match\ntable is also specified in the machine definition.  This table should be\nself-explanatory -- whatever symbols are listed there, a [WILD!] symbol will\nnot match, regardless of its position in the payline or the value of a given\nmatch line.\n\nFor example, suppose you get a normal-looking spin showing\n[WILD!][77][77][lemon][cherry] on a line on the 5-reel demo machine.  That\nwon't match anything, because there's no match line that allows for a match\nconsisting of only three \"7\" symbols of any kind.\n\nOn the other hand, suppose you get [WILD!][WILD!][WILD!][2bar][cherry].\nSounds like it should match the {\"2bar\", \"2bar\", \"2bar\", \"2bar\", nil} entry,\nbut it'll pick the {\"3bar\", \"3bar\", \"3bar\", nil, nil} entry, because that one\nalso matches, but it's worth more.\n\nThis extends to as many reels as the machine has, and as many [WILD!]'s as\nthere are in a pay line, regardless of where in the line they appear (so long\nas the symbols that precede and follow the [WILD!]'s can form valid matches,\nof course).\n\nA pay line consisting of all [WILD!]'s is equivalent to whatever the highest\nwinning combination is in your machine, that doesn't also contain any symbols\nin the wild_doesnt_match table (three or five [777]'s in the Golden 7's\nexample machines, because they're both set to not match against [JACKPOT!]).\n\nIf a wild multiplier is in effect, it'll be applied to the final value for a\ngiven match.  Each wild card multiplies the win by the configured amount, but\nonly for wild cards that actually helped create a win.  Thus, the final win\namount will be line_win * ( wild_multiplier ^ number_of_wilds ).\n\n\nDISCLAIMER:\n===========\n\nTHIS IS A SLOT MACHINE \"MINI GAME\" PROJECT FOR THE MINETEST OPEN SOURCE GAME\nENGINE/PLATFORM.  IT IS NOT IN ANY WAY, SHAPE, OR FORM ASSOCIATED WITH,\nREGULATED BY, OR OTHERWISE UNDER THE CONTROL OR INFLUENCE OF ANY LOCAL,\nCOUNTY, STATE, OR FEDERAL GAMING AGENCY, COMMISSION, OR OFFICE.\n\nTHE \"CURRENCY\" USED BY THIS PROJECT IS ENTIRELY FICTIONAL, EXISTING ONLY\nWITHIN THE ONLINE WORLD FOR WHICH IT WAS CREATED, AND NO PART OF THIS PROJECT\nSEEKS TO MAKE IT CONVERTIBLE, EXCHANGEABLE, OR OTHERWISE NEGOTIABLE FROM OR\nINTO ANY LEGAL TENDER CURRENCY OR OTHER VALUABLE ASSETS OF ANY KIND OR ORIGIN,\nWHETHER TANGIBLE OR INTANGIBLE, PHYSICAL OR ELECTRONIC.\n\nNO CLAIMS REGARDING THE FITNESS OF THIS PROJECT FOR ANY PURPOSE ARE HEREIN\nMADE, AND NO WARRANTY OR GUARANTEE OF ANY KIND IS OFFERED BY ANY PARTY.  SEE\nALSO, \"LICENSE\" IN THE MAIN PROJECT DIRECTORY.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmt-mods%2Fminislots","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmt-mods%2Fminislots","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmt-mods%2Fminislots/lists"}