{"id":17537726,"url":"https://github.com/bates64/star-rod-c","last_synced_at":"2025-10-08T15:07:02.781Z","repository":{"id":90641249,"uuid":"288571611","full_name":"bates64/star-rod-c","owner":"bates64","description":"Compile C code for Paper Mario mods","archived":false,"fork":false,"pushed_at":"2022-04-21T15:17:26.000Z","size":25,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-19T16:06:04.051Z","etag":null,"topics":["paper-mario-64"],"latest_commit_sha":null,"homepage":"","language":"Python","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/bates64.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}},"created_at":"2020-08-18T21:48:49.000Z","updated_at":"2021-11-17T03:03:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"b2137a2b-6eb2-45cb-811f-0216fec98ca9","html_url":"https://github.com/bates64/star-rod-c","commit_stats":null,"previous_names":["bates64/star-rod-c"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bates64/star-rod-c","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bates64%2Fstar-rod-c","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bates64%2Fstar-rod-c/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bates64%2Fstar-rod-c/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bates64%2Fstar-rod-c/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bates64","download_url":"https://codeload.github.com/bates64/star-rod-c/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bates64%2Fstar-rod-c/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278964026,"owners_count":26076583,"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":["paper-mario-64"],"created_at":"2024-10-20T20:42:35.786Z","updated_at":"2025-10-08T15:07:02.739Z","avatar_url":"https://github.com/bates64.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Star Rod C\n\nStar Rod C is a tool that lets you compile C code to patch files using tools and headers from the [Paper Mario decompilation](https://github.com/ethteck/papermario). [Star Rod](https://github.com/nanaian/star-rod) is used as the assembler and linker.\n\nSupported platforms include [anything the decompilation compiles on](https://github.com/pmret/papermario/blob/master/install.sh). This includes a number of Linux distros, macOS, and WSL2.\n\n### Installation\n\nYou'll need:\n* A [Star Rod](https://github.com/nanaian/star-rod) mod folder\n* git\n\n`cd` to your mod folder and run the following commands:\n```sh\n$ git init\n$ git submodule add https://github.com/nanaian/star-rod-c.git\n$ git submodule add https://github.com/pmret/papermario.git\n$ make -C star-rod-c setup\n```\n\n### Usage\n\nCreate a `globals/patch/foo.c` file in your mod folder:\n\n```c\n#include \"common.h\"\n\nApiStatus ExampleFunction(ScriptInstance* script, s32 isInitialCall) {\n    // Increment *Var[0] by 10\n    script-\u003evarTable[0] += 10;\n\n    return ApiStatus_DONE2;\n}\n```\n\nRun Star Rod C: `make -C star-rod-c`\n\nThis should produce a `globals/patch/foo.patch` file. All functions are `#export`ed unless their name begins with `_`.\n\nYou can then use the global patch as usual, in any script. For example:\n```starrod\n% kmr_20.mpat\n\n#new:Script {\n    Set *Var[0] 5\n    Call $ExampleFunction ()\n\n    % *Var[0] == 15`\n\n    Return\n    End\n}\n```\n\nRunning `make -C star-rod-c` will compile all `globals/patch/*.c` files to a `*.patch` file in the same directory. `make` won't recompile files that haven't been modified since the last time it was run.\n\n### Known issues\n\n* You may not name a function `main`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbates64%2Fstar-rod-c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbates64%2Fstar-rod-c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbates64%2Fstar-rod-c/lists"}