diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 7fa54d0c..5b792379 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -53,7 +53,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Build and push Docker image + - name: Build Docker image (without pushing) uses: docker/build-push-action@v5 with: context: . diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 98a45d92..7e9804f6 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -74,6 +74,8 @@ jobs: uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + flavor: | + suffix=-${{ github.run_id }} - name: Build and push Docker image uses: docker/build-push-action@v5 @@ -84,7 +86,7 @@ jobs: tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - - name: Build and push Docker image + - name: Build and push Docker image (development) uses: docker/build-push-action@v5 if: github.ref == 'refs/heads/Dev' with: diff --git a/README.md b/README.md index 4a8c25f5..fe9257b1 100644 --- a/README.md +++ b/README.md @@ -33,14 +33,17 @@ Send us a message on the Discord if we don't review it within a day or two. ## Development Setup -### Devcontainer - If you already have Visual Studio Code and Docker installed, we offer a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers) for the repository that will be auto-detected when you open the folder in VSCode. +Check out the [Devcontainer](#devcontainer) heading for setup directions. This also means that Github Codespaces is a pretty convenient way to test out other people's PRs. +If you don't, that's totally fine, check out the [Manual](#manual) heading to install the dependencies on your computer. + +### Devcontainer + Make sure you have [the Remote Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) and [Docker Desktop](https://www.docker.com/products/docker-desktop) installed. @@ -59,7 +62,7 @@ If you are switching between container and local dev you may have to delete the ### Manual -If you don't want to use the preconfigured devcontainer, or Codespaces, follow the directions below. +If you don't want to use the preconfigured devcontainer (or Codespaces), follow the directions below. Although you can edit the `.adoc` files with just about any editor out there, we suggest either Visual Studio Code (with the @@ -72,31 +75,36 @@ follow the below directions. #### Installing -1. Install [Node.js](https://nodejs.org/en/download/) (the CI uses 16 but newer should be fine) and [pnpm Package Manager](https://pnpm.io/) through your preferred method. +1. Install [Node.js](https://nodejs.org/en/download/) (the CI uses 16 but newer should be fine) + and [pnpm Package Manager](https://pnpm.io/) through your preferred method. 2. Clone the repository -3. Use pnpm to install dependencies +3. Use pnpm to install dependencies: -```bash -pnpm install -``` + ```bash + pnpm install + ``` + +4. If you have VSCode, open the folder as a workspace + and use the Command Palette to run the Task: `Launch hot reloading development server`. + Otherwise, follow the building and previewing directions below. #### Building -To set up a development watch server that will automatically rebuild the docs when you make changes: +To set up a development watch server that will automatically rebuild the SML docs when you make changes: ```bash pnpm run watch:dev ``` -To build the docs for **SML and all other hosted mods** (slow): +Alternatively, to build the docs for **SML and all other hosted mods** (slow): ```bash pnpm run build ``` -To build the docs for **just SML** (much faster): +Alternatively, to build the docs for **just SML** (much faster than all mods): ```bash pnpm run build:dev @@ -109,6 +117,7 @@ The output HTML files for both commands can be found in `\build\site`. To preview the content, you can open the output HTML files in your browser, ex. `build/site/satisfactory-modding/latest/index.html` You can also run `pnpm run serve` which will start a local webserver. +Your terminal will print usable addresses for the webserver. #### Link Checker diff --git a/cspell.json b/cspell.json index f5416764..dd1f3739 100644 --- a/cspell.json +++ b/cspell.json @@ -77,6 +77,7 @@ "MSVC", "Nobelisk", "noclip", + "noprefix", "NSLOCTEXT", "nullptr", "nullrhi", @@ -90,6 +91,7 @@ "redirectors", "Robb", "RTPC", + "sarisia", "SCBP", "Schem", "SCIM", diff --git a/modules/ROOT/images/ModLoader/SCSHook_Example_FreeSamples.png b/modules/ROOT/images/ModLoader/SCSHook_Example_FreeSamples.png new file mode 100644 index 00000000..c09b24d2 Binary files /dev/null and b/modules/ROOT/images/ModLoader/SCSHook_Example_FreeSamples.png differ diff --git a/modules/ROOT/pages/Development/BeginnersGuide/overwriting.adoc b/modules/ROOT/pages/Development/BeginnersGuide/overwriting.adoc index a00b03f2..9d5312a4 100644 --- a/modules/ROOT/pages/Development/BeginnersGuide/overwriting.adoc +++ b/modules/ROOT/pages/Development/BeginnersGuide/overwriting.adoc @@ -35,7 +35,8 @@ The mod has been officially released, and its documentation describes how to con == Use CDO Manipulation If you still want to overwrite content without using a library, -the correct mechanism for doing so is **Class Default Object (CDO)** manipulation. +the correct mechanism for doing so is **Class Default Object (CDO)** manipulation, +sometimes referred to as a **CDO Edit**. To perform a CDO modification, get the class default object of the class you're trying to override and change the relevant properties. @@ -71,9 +72,12 @@ Afterwards, you can use the class' existing setters to modify fields. + You might need to use an xref:Development/ModLoader/AccessTransformers.adoc[Access Transformer] to make the field that you intend to change accessible from blueprints. -To keep a reference to the CDO, create a property of type Object in the blueprint where you also change the CDO. Set the property's value to be the CDO before manipulating the object. + +To keep a reference to the CDO, create a property of type Object in the blueprint where you also change the CDO. +Set the property's value to be the CDO before manipulating the object. + If you are modifying multiple CDOs, you can make the property an array of objects instead, and add each CDO to the array. +Check out ExampleMod's `SubGameWorld_ExampleMod_SchematicCdoEdit` for a code example. + === {cpp} Example Here's an example from Kyrium's KBFL for adding additional allowed classes to the Pressurizer and its extractor nodes. diff --git a/modules/ROOT/pages/Development/ExtractGameFiles.adoc b/modules/ROOT/pages/Development/ExtractGameFiles.adoc index a4401520..3b8181cf 100644 --- a/modules/ROOT/pages/Development/ExtractGameFiles.adoc +++ b/modules/ROOT/pages/Development/ExtractGameFiles.adoc @@ -57,14 +57,8 @@ and `/CommunityResources/CustomVersions.json` files. We need to open the CustomVersions file and copy its contents into a setting in FModel. However, the file is stored in a text encoding (UTF-16 LE) that can confuse some text editing programs. - -If you are using Windows 10, -Windows Notepad can successfully load the `CustomVersions.json` file -and you can copy its contents to your clipboard normally. -If you are using Windows 11, -you will need to use another text editor such as https://notepad-plus-plus.org/[Notepad++]. -Windows 11's Notepad incorrectly loads the file with UTF-8 encoding -and FModel will tell you that you broke the .json if you copy the contents over. +Many editors will auto-detect the encoding, +but you may need to specifically select the `UTF-16 LE` encoding when opening the file if the text displays with egregious spacing. To start loading this additional information, open FModel and navigate to `Settings` > `General`, then press the `Custom Versions` button in the "Version Configuration" row @@ -76,7 +70,9 @@ then press `OK` to save your changes. [WARNING] ==== -If the file's contents look like the below image, you will need to use a different text editor to open and copy it as described above. +If the file's contents look like the below image, +you either will need to use a different text editor to open and copy it +or try to reopen the file with the `UTF-16 LE` encoding as described above. Note the egregious extra spacing and the error message from FModel. image:ExtractingGameFiles/FModel_BrokenJSON.png[Broken JSON] diff --git a/modules/ROOT/pages/Development/ModLoader/SimpleConstructionScript.adoc b/modules/ROOT/pages/Development/ModLoader/SimpleConstructionScript.adoc index 4d6022a4..c6de0c2e 100644 --- a/modules/ROOT/pages/Development/ModLoader/SimpleConstructionScript.adoc +++ b/modules/ROOT/pages/Development/ModLoader/SimpleConstructionScript.adoc @@ -4,8 +4,8 @@ Introduced in SML3.5, Blueprint Simple Construction Script hooks allow adding mo https://docs.unrealengine.com/5.1/en-US/components-in-unreal-engine/[Components] to any blueprint-based actor. -Mods can define Blueprint SCS in their -xref:Development/ModLoader/ModModules.adoc#_game_instance_bound_module_ugameinstancemodule[Game Instance Module]. +Mods can define Blueprint SCS Hooks in their +xref:Development/ModLoader/ModModules.adoc#_game_instance_bound_module_ugameinstancemodule[Game Instance Module] under Class Defaults -> Advanced -> Hooks -> Blueprint SCSHooks This system is very flexible and it is difficult to summarize its capabilities. Here are some example usages: @@ -14,4 +14,6 @@ Here are some example usages: ** Example Mod uses this to add a hat to the player if they have an Example Item in their inventory. Note that the component is always spawned, but custom logic controls if the hat is visible to the player. * Easily track (and potentially store with the save file) per-player data that is guaranteed to exist by hooking the construction of BP_PlayerState - ** An example of this can be found in the open-source https://ficsit.app/mod/FreeSamples[Free Samples] mod. + ** The open-source https://ficsit.app/mod/FreeSamples[Free Samples] mod + attaches a FreeSampleDataComponent to each BP_PlayerState with this configuration on its RootInstance_FreeSamples blueprint: + image:ModLoader/SCSHook_Example_FreeSamples.png[FreeSamples SCS Hook Example] diff --git a/modules/ROOT/pages/Development/Satisfactory/Schematic.adoc b/modules/ROOT/pages/Development/Satisfactory/Schematic.adoc index 9bc44cbb..1179c1c0 100644 --- a/modules/ROOT/pages/Development/Satisfactory/Schematic.adoc +++ b/modules/ROOT/pages/Development/Satisfactory/Schematic.adoc @@ -108,9 +108,11 @@ M Schematic Dependencies:: This array allows for a schematic's to be hidden until either other schematics are purchased (`BPSchematicPurchasedDependency`) or a specific item is picked up (`BPItemPickedUpDependency`). - +{blank} + +{blank} + All items of the array must be satisfied for the schematic to be visible. - +{blank} + +{blank} + Both allow you to select multiple schematics/items. If you enable Require All, all of the Schematics/Items in that group must be purchased/found for the schematic to be visible.