Leaderboard
Popular Content
Showing content with the highest reputation on 06/25/2021 in all areas
-
In-depth Look at the CFG Syntax
Cirevam reacted to trigger_segfault for a topic
No problem, honestly this has been a blast. And yup. The only non-patch solution to keep balanced randomness would be to list every sound twice in a row. Though better readability would be listing them in order "slip1, slip1, slip2, slip2, ..." Thankfully the number of used slots in a virgin Lego.cfg file is only 34/200 (no sound groups are commented out either). However, the bigger limitation seems to be the total number of definable Samples (number of properties in Samples block). The game engine has a (now-confirmed maximum) of 495 Samples properties. The number of properties used in a virgin Lego.cfg file is 446/495, (461/495 if you include commented-out properties, all of which are unique names). Which leaves very little room for custom sounds in mods.1 point -
In-depth Look at the CFG Syntax
trigger_segfault reacted to Cirevam for a topic
All of this is extremely useful. Thank you for digging into the game and sharing all of this. The last bit about sound groups confirms something I suspected for a long time but never figured out on my own. It seems easily remedied, but that 200 grouped sound limit makes it harder. A sound group like "slip1, slip2, slip1, slip1" would play slip1 and slip2 in equal amounts, but uses twice as many grouped sound slots.1 point -
In-depth Look at the CFG Syntax
ShadowDraikana reacted to trigger_segfault for a topic
Finally found the usages for the key and value prefixes (at least for sounds) Key Prefixes: Reduce Prefix: '!' This tells the game that the sound (and presumably any other resource) will be removed with `-reduce____` command-line arguments. This has been tested on sound effects using `-reducesamples`. This will eliminate a large number of tooltip and interface sounds we all known and love. !SurfaceSFX_Medium Sounds\Voices\Surfaces\looserock !SurfaceSFX_Rubble Sounds\Voices\Surfaces\rubble Other spotted uses of this prefix: Probably for `-reduceflics`: Flics { !Score Avi\Capt.flh|121|153|234|327 } Probably for `-reduceanimation`: !MenuWipe Interface\FrontEnd\Rock_Wipe\RockWipe Value Prefixes: I've only researched usages of this for sound at the moment. Though again, the config file states other areas where this should be supported. Multiple Instance Prefix: '*' States a sound can have multiple instances playing at once. If this prefix is not present, and a new sound needs to play, it will cut off any currently playing instance of the sound and start a new one. SFX_Drill *Sounds\drtdrillc Streamed Prefix: '@' Sound is streamed (and it will sound a bit louder). Cannot be used with '*' to play multiple instances at once. When this prefix is not specified. The sound file will be fully loaded in memory, supposedly on boot. Stream_Objective_Levels::Level01 @Sounds\Streamed\Objectiv\MisObj01 BUG: When defining a Sound Group (with ','), the Streamed flag will be applied to all future sounds in a group after the first-listed sound with '@'. (Note: It hasn't exactly been tested if Streaming functionality is even supported with Sound Groups) Reduce Volume Prefix: '#' Reduces the volume of a sound. This one follows a format: #number# Where number should be a whole number between -10000 and 0 (anything else is set to 0). The lowest number will make it silent, while the highest (0), will keep it at the original volume. (this prefix is never used) !SurfaceSFX_Immovable #-100#Sounds\Voices\Surfaces\solidrock Combinations with '#' This prefix can be combined with '*' or '@', however note that the order is important: The Multiple Instance prefix must come before the Reduced Volume prefix: !SurfaceSFX_Immovable *#-100#Sounds\Voices\Surfaces\solidrock Meanwhile the Steamed prefix must come *after* the Reduced Volume prefix: !SurfaceSFX_Immovable #-100#@Sounds\Voices\Surfaces\solidrock POSSIBLE BUG (technical): When parsing the this prefix, it seems the program doesn't properly terminate the number string, which can potentially allow for garbage data to be included in the number. Worst-case-scenario is the volume would be quieter, but it entirely depends on what data was previously in this location. Miscellaneous: Sound Group: ',' This is used a lot in the samples Block to define multiple sound effects that can randomly be selected from a single type of sound: !SFX_Drip Sounds\drip1,Sounds\drip2,Sounds\drip3,Sounds\dripsA,Sounds\dripsB,Sounds\dripsC Different Value Prefixes listed above should supposedly work with each individual sound (the prefixes are parsed individually for each sound in a group). LIMITATION: The game engine only has room for 200 total extra sounds defined in groups. (1 slot is used for each sound defined after the first comma ','). BUG: When defining a second sound (turning it into a group), the first sound's information is overwritten with that of the second sound (which also makes the second sound twice-as-likely to play when more than 2 sounds are listed. You may notice a lot of first-listed sounds that you've never heard before in-game. Listen to groan1.wav or slip1.wav for good examples: !SND_Slipup Sounds\Minifigure\slip1,Sounds\Minifigure\slip2 SND_Groan Sounds\Minifigure\groan1,Sounds\Minifigure\groan21 point
