
-- Load the requested SPT file local Orig = ReadFile("/GameData/" .. GetPath()) -- Table with conversations we need to remove for whatever reason local DefaultRemove = { ["C_icecream_1_convinit_Mrg_L1"] = true, ["C_icecream_2_convinit_Hom_L1"] = true, } -- Loop through each SoundData in the loaded SPT for SoundData in Orig:gmatch("[^}]+") do -- Parse the name of the data local name = SoundData:match("named ([^\r\n]+)") -- If the name was found (so it's a valid soundData), and it's not a match in the remove table, output it if name and not DefaultRemove[name] then Output(SoundData) Output("}") end end -- This is now our additional sound data entries. local extensions = {[".rsd"]=true} if IsHackLoaded("OggVorbisSupport") then extensions[".ogg"] = true end if IsHackLoaded("FLACSupport") then extensions[".flac"] = true end local ModCF = GetModPath().."/CustomFiles/" local function GetDialog(directory) DirectoryGetEntries(directory, function(FileOrDirectory, IsDirectory) if IsDirectory then GetDialog(directory.."/"..FileOrDirectory) elseif not IsDirectory then local ext = GetFileExtension(FileOrDirectory) if extensions[ext] then Output("\ncreate daSoundResourceData named "..RemoveFileExtension(FileOrDirectory).."\n{\n") local dir = directory:gsub(ModCF, "") if dir:sub(-1) ~= "/" then dir = dir .. "/" end Output("\tAddFilename ( \""..dir..FileOrDirectory.."\" 1.000000 )\n\tSetStreaming ( true )\n}") end end return true end) end GetDialog(ModCF .. "conversations")
Team:
Stoner Team (Better than CMBU, BCT and DT combined)