Ulysses

Ulysses Stuff => General Chat & Help and Support => Topic started by: nathan736 on April 28, 2013, 06:16:03 PM

Title: is download.txt not working
Post by: nathan736 on April 28, 2013, 06:16:03 PM
is download.txt not work i added a dir and nothing downloaded from it
models/humans/nypd
Aren't there normally a vtf or some other file explaining some properties of the mdl file that is required?
(I forget if it's necessary for ULX, my team may correct me)

Also, Where did you place your edited copy?
sorry wrong dir i edited the line to show the actual dir
in that dir nothing downloaded correctly for some reason
the vtf is 'sold separately' If you pass the model and not the texture, it will still display, it'll just have the 'missing texture' texture.
the file would still download anyways and show up localy right ?

ps: ill take a dive at this some time i wanted to post here first to see if i was doing anything stupid :(
Title: Re: is download.txt not working
Post by: JamminR on April 28, 2013, 07:54:03 PM
Aren't there normally a vtf or some other file explaining some properties of the mdl file that is required?
(I forget if it's necessary for ULX, my team may correct me)

Also, Where did you place your edited copy?
Title: Re: is download.txt not working
Post by: MrPresident on April 28, 2013, 08:55:14 PM
the vtf is 'sold separately' If you pass the model and not the texture, it will still display, it'll just have the 'missing texture' texture.
Title: Re: is download.txt not working
Post by: Megiddo on April 29, 2013, 07:32:23 AM
Created an issue to check to make sure it's still working: https://github.com/Nayruden/Ulysses/issues/205
Title: Re: is download.txt not working
Post by: nathan736 on April 30, 2013, 08:57:38 AM
https://github.com/Nayruden/Ulysses/blob/master/ulx/lua/ulx/modules/sh/util.lua#L213
Code: [Select]
function ulx.addForcedDownload( path )
if ULib.fileIsDir( path ) then
files = ULib.filesInDir( path )
for _, v in ipairs( files ) do
ulx.addForcedDownload( path .. "/" .. v )
end
elseif ULib.fileExists( path ) then
resource.AddFile( path )
else
Msg( "[ULX] ERROR: Tried to add nonexistent or empty file to forced downloads '" .. path .. "'\n" )
end
end
https://github.com/Nayruden/Ulysses/blob/master/ulx/lua/ulx/end.lua#L15
Code: [Select]
local function doDownloadCfg( path )
-- Does the module exist for this?
if not ulx.addForcedDownload then
return
end

local lines = ULib.explode( "\n+", ULib.stripComments( ULib.fileRead( path ), ";" ) )
for _, line in ipairs( lines ) do
line = line:Trim()
if line:len() > 0 then
ulx.addForcedDownload( ULib.stripQuotes( line ) )
end
end
end
does this ever come back true ?
Title: Re: is download.txt not working
Post by: Megiddo on April 30, 2013, 10:30:38 AM
If you're talking about "if not ulx.addForcedDownload then", it's merely checking for the presence of the function, not checking if the function returns a certain value.
Title: Re: is download.txt not working
Post by: nathan736 on April 30, 2013, 11:00:09 AM
ah ok never knew you could do that ;)
Title: Re: is download.txt not working
Post by: Megiddo on April 30, 2013, 11:02:43 AM
Part of the reason why I love Lua is that pretty much everything (including functions) is a first class citizen (http://en.wikipedia.org/wiki/First-class_citizen).