Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ExampleMod: resource node with sublevel #335

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from

Conversation

Th3Fanbus
Copy link
Contributor

@Th3Fanbus Th3Fanbus commented Jan 19, 2025

Add a custom resource with a resource node. Add this resource node to the world using sublevels (level instances).

Also fix a few things about the CDO edit example since it was getting a bit in the way of the sublevel spawning thing.

20250119183858_1

Screenshot20250119-23223300000

Align nodes and straighten out connections with no functional changes.
I want to change some things in follow-up commits, so performing these
cosmetic changes upfront should stop node shuffling in the follow-ups.

Signed-off-by: Angel Pons <[email protected]>
There is no need to perform the CDO edit every time a game world gets
loaded. Doing it once from a game instance module is enough since the
CDO is kept loaded.

Signed-off-by: Angel Pons <[email protected]>
The "Get Class Default Object" node is pure, so it will be evaluated
every time its output value is needed. As its return value is stored
in a variable anyway (to stop the CDO from being garbage collected),
we might as well use the value from the variable instead.

Because "Get Class Default Object" prints a warning when accessing a
CDO of a class owned by another plugin, evaluating it twice resulted
in the warning being printed twice. This should no longer happen.

Signed-off-by: Angel Pons <[email protected]>
When dynamically spawning resource nodes, if the node mesh to use for
a resource was unknown, the code would fall back to the conveyor mesh
and scale it up. However, this can result in very tall resource nodes
which causes problems when trying to place a miner on them.

Instead, scatter some instances of the conveyor mesh around the area.
This uses an instanced static mesh, which will work with any conveyor
mesh (conveyors use instanced static meshes to render items).

Signed-off-by: Angel Pons <[email protected]>
Add a custom resource to ExampleMod. This is done to showcase how to
use sublevels to add resource nodes to an existing level.

Signed-off-by: Angel Pons <[email protected]>
@Th3Fanbus Th3Fanbus changed the base branch from master to dev January 19, 2025 22:29
@budak7273
Copy link
Member

Looks good so far. I am locally having issues opening the level in the editor, but it's connected to the Wwise stuff and not this PR.

Could you also add a few instances of the example resource node in the main game world, maybe 1 in each base-game starting location? That's a common ask on the discord for custom resources.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

2 participants