{"id":16608422,"url":"https://github.com/curve/chalchiu","last_synced_at":"2025-04-19T16:43:22.342Z","repository":{"id":160504419,"uuid":"630611886","full_name":"Curve/chalchiu","owner":"Curve","description":"A modding framework for Solar2D, created for use with the game \"Coromon\"","archived":false,"fork":false,"pushed_at":"2023-05-03T18:11:34.000Z","size":911,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-16T02:59:07.424Z","etag":null,"topics":["coromon","coronasdk","modding","modding-tools","solar2d"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Curve.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-04-20T18:56:43.000Z","updated_at":"2025-03-19T06:27:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"df7cb561-cdd2-4f14-a0a9-ba8343a04105","html_url":"https://github.com/Curve/chalchiu","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Curve%2Fchalchiu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Curve%2Fchalchiu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Curve%2Fchalchiu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Curve%2Fchalchiu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Curve","download_url":"https://codeload.github.com/Curve/chalchiu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249740688,"owners_count":21318701,"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","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":["coromon","coronasdk","modding","modding-tools","solar2d"],"created_at":"2024-10-12T01:26:08.846Z","updated_at":"2025-04-19T16:43:22.336Z","avatar_url":"https://github.com/Curve.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003chr\u003e\n\n\u003cdiv align=\"center\"\u003e \n    \u003cimg src=\"assets/logo.png\" height=312/\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e \n\n### chalchiu\n\nModding support for Solar2D Games  \n\n*Designed for [Coromon](https://store.steampowered.com/app/1218210/Coromon/)*\n\n\u003c/div\u003e\n\n---\n\n\u003e **Warning**  \n\u003e Please do not report any issues that may've been caused through this project to the official game developers as they will not assist you with broken games / saves when you are using mods.  \n\u003e Please [open an issue here](https://github.com/Curve/chalchiu/issues/new) instead!\n\n# Introduction\n\nThis Project aims to add mod support to [Coromon](https://store.steampowered.com/app/1218210/Coromon/) but is implemented in such a way that it should also work for other Solar2D Games.\n\n# Usage\n\nThe installation of chalchiu is fairly simple:\n\n* Locate your Game Folder\n  \u003e e.g. `C:/GOG Games/Coromon/`\n\n* Download the zip file from the latest [Release](https://github.com/Curve/chalchiu/releases) and unpack all files into the game directory\n  * Your Game Folder should now roughly look like this\n    \u003e Please note that some files have been omitted\n    ```\n    📂 C:/GOG Games/Coromon\n    ├── coromon.exe\n    ├── CoronaLabs.Corona.Native.dll\n    ├── corona-plugins\n    ├── iphlpapi.dll\n    ├── libeay32.dll\n    ├── lua.dll\n    ├── mods\n    ├── ...\n    ```\n* Start the Game, the following things should happen:\n  * A Log File named `chalchiu.log` is created\n  * A Folder named `mods` is created in the game directory\n  * Your Game Window Title includes information about the loaded mods\n\n# Coromon\n\n\u003cdetails\u003e\u003csummary\u003eContinue Reading...\u003c/summary\u003e\n\u003cp\u003e\n\nHere you'll find information about the provided Coromon mods!  \n\nAll mods are tested with the latest game version \u003csub\u003e\u003csup\u003e(v1.1.2 at the time of writing)\u003c/sup\u003e\u003c/sub\u003e, don't let that stop you from trying them on other game versions though!\n\n## Available Mods\n\n- Trainer\n  \u003e A simple trainer, which allows you to fun things like noclip, max out all your coromon, and speed up the game!  \n  \u003e\n  \u003e When using the `Mod Info` mod, you can take a look at the available hotkeys in the mod list.\n  ![Trainer Screenshot](assets/trainer_screenshot.png)\n\n- Randomize Evolution\n  \u003e Brings back the \"Randomize Evolution\" Settings (and more!) in 1.1.2\n  ![Randomize Evolution Screenshot](assets/randomized_evolution_screenshot.png) \n\n- Mod Info\n  \u003e Shows information about the currently loaded mods, on game startup.  \n  Also adds a button to the pause menu (top right corner), which allows you to bring up the menu again!\n  ![Mod Info Screenshot](assets/mod_info_screenshot.png) \n\n\u003c/p\u003e\n\u003c/details\u003e\n\n# For Modders\n\n\u003cdetails\u003e\u003csummary\u003eContinue Reading...\u003c/summary\u003e\n\u003cp\u003e\n\n## Example Mods\n\nYou can find some example mods in the [scripts](./scripts) folder.  \n\nA `debug` mod is also included, which will dump all modules loaded by the game into the log.  \nThis is especially useful when you don't want to unpack the precompiled lua scripts the game uses, as just having information on the game modules is often enough to get started.\n\n## Writing a Mod\n\nCreating a mod is fairly simple.  \nAll you need to do is create a folder for your mod and place an `init.lua` inside of it.\n\nThe `init.lua` **is the only file that is explicitly loaded** by chalchiu.  \nYou can however use `require` to load any files from the same directory your mod resides in.\n\nYou are expected to return a table containing some information about your mod from your `init.lua`.\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd\u003e(Example) init.lua\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\n\n```lua\nrequire(\"hooks\") -- Will load the `hooks.lua` residing in the same directory\n\nreturn {\n  name        = 'Name', -- The name of your mod\n  author      = '....', -- Who wrote the mod?\n  version     = '....', -- Current version of your mod\n  description = '....', -- The description of your mod\n}\n```\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n## Utilities\n\nThere are some utilities you can use from within your mod.\n\n### Hooks\n\nHooks are an essential part of mods, as they allow you to modify modules loaded by the game as well as allowing you to dictate when a certain piece of code is run.\n\nHooks in chalchiu allow you to intercept lua `require` calls, which allows you to e.g. modify the original table and replace certain game logic with your own.\n\nAll you need is the name of a `module` you want to hook. _(To get a list of modules you can use the [debug mod](scripts/debug/))_\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd\u003eRegistering a hook\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\n\n```lua\nhooks.add(\"module.to.hook\", function(table)\n  -- `table` is the original table that would've been returned\n\n  -- You can now fully alter the table, and e.g. overwrite some function:\n  table[\"max\"] = table[\"min\"]\nend)\n```\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n### Detours\n\nThe `detour` function allows you place a detour on any lua function and is often used together with [hooks](#hooks).\n\nDetours can be useful for many things, e.g. modifying the players money when a save game is loaded.\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd\u003eExample Detour\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\n\n```lua\nhooks.add(\"classes.localPlayer\", function(table)\n  detour(table, \"getMoney\", function(original, self, ...)\n    -- `original` refers to the \"original\" (i.e. non detoured version) of the function\n    local originalMoney = original(self, ...)\n    return originalMoney * 1000\n  end)\nend)\n```\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n### Globals\n\nEvery mod is loaded in its own lua environment, thus it does not have write access to the global lua table.  \n\nIf you need explicit write access to the global table, you can use the `globals` variable, which refers to the global lua table used by the game.\n\n\u003e Most of the time you will not need this, however this can sometimes be useful, e.g. when you want to require one of the games files.\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd\u003eSimple Demonstration\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\n\n```lua\nlocal not_math = require(\"math\") -- This will fail as it will look for a `math.lua` inside of your mod!\nlocal math = globals.require(\"math\") -- This will load the same math as used by the game\n```\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n\n\u003c/p\u003e\n\u003c/details\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcurve%2Fchalchiu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcurve%2Fchalchiu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcurve%2Fchalchiu/lists"}