Skip to content

Commit

Permalink
Merge pull request #355 from satisfactorymodding/Dev
Browse files Browse the repository at this point in the history
Update with changes from Dev
  • Loading branch information
budak7273 authored Dec 4, 2024
2 parents 4347397 + 59e90f5 commit 4842a84
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: .
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
31 changes: 20 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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
Expand All @@ -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
Expand All @@ -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

Expand Down
2 changes: 2 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
"MSVC",
"Nobelisk",
"noclip",
"noprefix",
"NSLOCTEXT",
"nullptr",
"nullrhi",
Expand All @@ -90,6 +91,7 @@
"redirectors",
"Robb",
"RTPC",
"sarisia",
"SCBP",
"Schem",
"SCIM",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
14 changes: 5 additions & 9 deletions modules/ROOT/pages/Development/ExtractGameFiles.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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]
6 changes: 4 additions & 2 deletions modules/ROOT/pages/Development/Satisfactory/Schematic.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 4842a84

Please sign in to comment.