satisfactorymodding / satisfactorymodding/SatisfactoryModLoader

Editor time auto-updating of FSongData::CachedMaximumSongDuration

Open
#372 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
344
Forks
225
PR merge metrics
No merged PRs in 30d

Description

Struct FSongData includes the following field:

/** Maximum song duration cached from the AkAudioEvent during cooking to allow accessing that information on Dedicated Servers */
UPROPERTY()
	float CachedMaximumSongDuration{0.0f};

This property is supposed to be populated at build time, but for some reason in 1.1 editor it is left as 0. This partially breaks the BoomBox - the tape cannot switch to the next song, instead it's playback indicator is set to 0:00 once the AKAudioEvent ends.

I was able to quickly hack around it by making this property editable and populating it manually, but a cleaner way would be to auto-populate at build time. There is a void CachePlaylistSongDurations(class FWwiseProjectDatabase* InProjectDatabase); callback of FGTapeData, which I guess is supposed to be used exactly for that.

In 1.0 this property wasn't present yet (based on the tape uasset for 1.0).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing FGTapeData::CachePlaylistSongDurations(class FWwiseProjectDatabase* InProjectDatabase) and how it reaches FSongData::CachedMaximumSongDuration during cooking. Reproduce the editor 1.1 build or cook, then verify that the cached duration is populated and the BoomBox tape advances to the next song instead of resetting to 0:00.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, unreal-engine
Domain
game-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.