gctGenerator/Readme.md

69 lines
2.9 KiB
Markdown
Raw Normal View History

2020-06-30 07:55:41 +09:00
# GCT Generator
2020-06-30 08:23:36 +09:00
[![GitHub license](https://img.shields.io/github/license/bitpatty/gctGenerator?color=blue&label=License&style=plastic)](https://github.com/BitPatty/gctGenerator/blob/master/LICENSE)
[![CD Pipeline](https://github.com/BitPatty/gctGenerator/workflows/CD%20Pipeline/badge.svg)](https://github.com/BitPatty/gctGenerator/actions?query=workflow%3A%22CD+Pipeline%22)
2019-12-30 02:21:31 +09:00
This repository contains the code behind the Super Mario Sunshine Cheatfile Generator at https://gct.zint.ch/
2018-02-09 11:16:06 +09:00
---
2020-06-30 07:55:41 +09:00
## Features
- Custom cheat combination
- Custom stage loader based on [QbeRoot's fastcodes](https://github.com/QbeRoot/fastcodes)
- Creates cheatfiles ready for use with [Nintendont](https://github.com/FIX94/Nintendont), [Gecko Cheat Manager](https://wiibrew.org/wiki/CheatManager) and [Dolphin](https://github.com/dolphin-emu/dolphin)
---
## Contributing
### Updating Practice Codes
2020-07-10 11:29:22 +09:00
The codes are stored in the `Codes.xml` file. If you want to add or change codes edit the XML file. Note that GMSJ0A refers to the NTSC-J 1.1 release of Super Mario Sunshine. (It's not actually called version A but that's what we've been calling it for years due to a misconception on what the A on the back of the box means).
2020-07-01 15:42:15 +09:00
2020-07-22 08:12:11 +09:00
When adding new codes keep in mind that the English title/description are mandatory.
2020-06-30 07:55:41 +09:00
### Updating Guides
2020-07-01 13:55:31 +09:00
You can find the guides in the [site](https://github.com/BitPatty/gctGenerator/tree/master/site) folder. Simply edit the corresponding markdown file (.md).
2020-06-30 07:55:41 +09:00
2020-07-01 15:38:26 +09:00
Note that in the code reference files everything following the `<!-- injectionpoint -->` tag will be removed during the next build.
2020-06-30 07:55:41 +09:00
### Site Development
2020-07-15 02:07:33 +09:00
If you intend to change site code you need [NodeJS](https://nodejs.org/en/) version 12.18.1 or any later 12.x LTS version installed on your local.
2020-06-30 07:55:41 +09:00
```sh
# Install yarn
npm i -g yarn
# Install dependencies
yarn
# Run project in watch mode
# This will serve the page in development mode on http://localhost:8080
yarn dev
# Build project
yarn build
```
2020-07-01 15:38:26 +09:00
The XML codes will be written automatically to the json file and code reference during the following actions:
- Starting the development server with `yarn dev`
- Building the site with `yarn build`
2020-07-02 21:23:15 +09:00
If you want to inject the codes at any given point you can use `yarn codes:inject`.
2020-07-01 15:38:26 +09:00
2020-07-15 02:07:33 +09:00
**!!! Note that if yarn was used, `yarn codes:clean` is ran automatically as a pre-commit hook, removing all injected codes and staging ALL changes.** If you want to commit changes without cleaning codes first you have to commit through `git commit --no-verify`.
2020-06-30 07:55:41 +09:00
### Build and preview the site (Docker)
The project root provides a [docker-compose](https://docs.docker.com/compose/) file, which creates a clean build (with the same configuration as the production build) and spins up a minimal Apache server on your local, serving the resulting build on port 8080.
```sh
# Build and serve the site on http://localhost:8080
# Press CTRL+C to stop the container
docker-compose up --build
```