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

File Network for Boss Downloads #190

Merged
merged 5 commits into from
Apr 7, 2024
Merged

File Network for Boss Downloads #190

merged 5 commits into from
Apr 7, 2024

Conversation

Batfoxkid
Copy link
Owner

Adds support for using File Network as an alternative for boss downloads, especially sound files. This will help in some cases where you may need to reduce entry downloads or things that may be optional like alternative music or catch phrases. Any file is supported but models are not handled by FF2 or anything that does not play from FF2. A new native FF2R_ClientHasFile is available for these cases.

Automatically checks in sound section files whether to play the sound (or display an overlay) to a player.

The example below shows making the music file download in-game, since it's used by sound_bgm, it'll wait until the player has the sound before playing the music.

	"download"
	{
		"models/freak_fortress_2/gentlespy/the_gentlespy_v3"			"mdl"
		"materials/freak_fortress_2/gentlespy_tex/stylish_spy_blue"		"mat"
		"materials/freak_fortress_2/gentlespy_tex/stylish_spy_blue_invun"	"mat"
		"materials/freak_fortress_2/gentlespy_tex/stylish_spy_red"		"mat"
		"materials/freak_fortress_2/gentlespy_tex/stylish_spy_red_invun"	"mat"
		"materials/freak_fortress_2/gentlespy_tex/stylish_spy_normal.vtf"	""
-		"sound/freak_fortress_2/gentlespy/gentle_music.mp3"			""
	}
+	"filenetwork"
+	{
+		"sound/freak_fortress_2/gentlespy/gentle_music.mp3"			""
+	}

*
* @return True if on the download table or client has the file through late downloads, false otherwise
*/
native bool FF2R_ClientHasFile(int client, const char[] file);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bad description

@naydef
Copy link
Contributor

naydef commented Mar 26, 2024

It's a better idea to separate filenetwork addition from public to static conversion, but idk.

@Batfoxkid Batfoxkid merged commit 1732a8d into main Apr 7, 2024
2 checks passed
@Batfoxkid Batfoxkid deleted the filenetwork branch April 7, 2024 05:09
@MAGNAT2645
Copy link
Contributor

Does not seem to work. In my case it just prints this line in client console:
CreateFragmentsFromFile: 'sound/freak_fortress_2/bodybag/thememp3_129553293.txt' doesn't exist.
No any other file in filenetwork is getting downloaded, nothing is downloading. It just spams this exact error.

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

Successfully merging this pull request may close these issues.

3 participants