Batfoxkid / Freak-Fortress-2-Rewrite

The gamemode that's now also a standalone boss maker.
https://forums.alliedmods.net/forumdisplay.php?f=154
GNU General Public License v3.0
17 stars 7 forks source link

File Network for Boss Downloads #190

Closed Batfoxkid closed 5 months ago

Batfoxkid commented 5 months ago

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"         ""
+   }
naydef commented 5 months ago

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

MAGNAT2645 commented 2 months ago

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.