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

Example level improvements #265

Conversation

Th3Fanbus
Copy link
Contributor

Various things I made to make Example Level more feature complete. See individual commits for details.

Th3Fanbus added 6 commits May 15, 2024 21:36
The mod supports dedicated servers, so enable these targets by default.

Signed-off-by: Angel Pons <[email protected]>
Create a subclass of `UFGMapAreaTexture` which works in the modding
environment. The intended usage of `USMLMapAreaTexture` is for mods
to create a blueprint child class of it, then set the texture param
to a B8G8R8A8 `Texture2D` that uses one color per map area, and the
editor will automagically fill in the list of areas and their color
from the supplied texture. One should then assign the areas to each
region (`mColorToArea` array element).

When changing the texture, the code will preserve regions that have
a color present in both the old and new textures, and create/delete
the other regions accordingly. However, when unsetting the texture,
regions will be preserved. This is done so that one can refresh the
texture by unsetting and setting it again, given that modifications
to the texture do not propagate to the `USMLMapAreaTexture`.

Should the supplied texture not be valid (its dimensions need to be
square and pixel format needs to be B8G8R8A8), the editor will show
a "fail" notification indicating the reason, and the asset will not
be changed. Editor undo functionality is not tested.

This class will be used in ExampleMod to implement map areas, which
should enable using things like the music manager and the proximity
subsystem in custom maps. This is done in a follow-up.

Signed-off-by: Angel Pons <[email protected]>
Implement map areas in ExampleLevel using the previously-added map area
texture helper. Also override the minimap texture using a blueprint SCS
hook, as we now have a (rather basic but functional) minimap texture to
show instead of the default map.

Also, properly configure the minimap capture actor so that the position
of things on the minimap accurately reflects the position on the world.
This wasn't working properly because the capture actor not was pointing
downwards, but sideways.

In addition, automatic music is half-working now. Some music plays, but
only "intermission" soundtracks. Biome-specific soundtracks do not play
at all for some reason. It is very likely to be because custom map area
names do not appear in a data table (whose name I don't recall).

Signed-off-by: Angel Pons <[email protected]>
This boils down to adding a post-processing volume with the right
settings, which were taken from the base game's level. They might
not be exactly the same (I may have made a mistake), but at least
they make Lumen work. Eye adaptation seems to be working as well.

Signed-off-by: Angel Pons <[email protected]>
Consolidate the two materials used for the landscape and the cubes (the
starting platform and the ramp) into a single material. Then create two
material instances of that material to use in the world.

Add an "Emissive Color" parameter to the common material, as it will be
used in a follow-up to show Lumen in action.

As for the reason why material instances were not used to begin with...
This is a mystery I have absolutely no clue about.

Signed-off-by: Angel Pons <[email protected]>
To test that Lumen actually works, include a simple emissive lamp. To
make it a bit weird, make it toggle its state upon taking any damage.
But why? Because why not?

Signed-off-by: Angel Pons <[email protected]>
@budak7273
Copy link
Member

budak7273 commented Jun 19, 2024

Th3 mentioned wanting to switch to One File Per Actor before this is reviewed on the discord

@budak7273 budak7273 marked this pull request as draft June 19, 2024 23:55
@Th3Fanbus
Copy link
Contributor Author

I have no intention to get this merged. Ever.

@Th3Fanbus Th3Fanbus closed this Jul 14, 2024
@Th3Fanbus Th3Fanbus deleted the example-level-improvements branch July 14, 2024 18:55
@Th3Fanbus Th3Fanbus restored the example-level-improvements branch July 15, 2024 20:19
@Th3Fanbus Th3Fanbus reopened this Jul 15, 2024
@budak7273
Copy link
Member

Superseded by #311

@budak7273 budak7273 closed this Nov 4, 2024
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