Author Topic: Forced Downloads Help  (Read 5132 times)

0 Members and 1 Guest are viewing this topic.

Offline ngc0202

  • Newbie
  • *
  • Posts: 31
  • Karma: 0
Forced Downloads Help
« on: May 02, 2010, 11:47:34 AM »
ULX for some reason won't force people to download the addons in the 'force download' section.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Forced Downloads Help
« Reply #1 on: May 02, 2010, 03:07:51 PM »
I believe forcedownload is broken in the release version due to Gmod updates.
Also, make sure you're following the details here - http://forums.ulyssesmod.net/index.php/topic,3072.0.html
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6213
  • Karma: 394
  • Project Lead
Re: Forced Downloads Help
« Reply #2 on: May 02, 2010, 04:59:01 PM »
Are you using SVN? It's a bit different now.
Experiencing God's grace one day at a time.

Offline ngc0202

  • Newbie
  • *
  • Posts: 31
  • Karma: 0
Re: Forced Downloads Help
« Reply #3 on: May 03, 2010, 07:04:55 AM »
@Megiddo Yes, I am using the SVN. What do you mean its different?

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6213
  • Karma: 394
  • Project Lead
Re: Forced Downloads Help
« Reply #4 on: May 03, 2010, 07:31:01 AM »
See the file data/ulx/downloads.txt for information on how to set downloads up. It was removed from the other config file (server.ini).
Experiencing God's grace one day at a time.

Offline Kipi Ukille

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Re: Forced Downloads Help
« Reply #5 on: May 14, 2010, 10:43:19 PM »
How do you do map specific forced downloads in the new system? I saw the map- and gamemode- but I don't understand how to use them.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Forced Downloads Help
« Reply #6 on: May 14, 2010, 11:18:24 PM »
Under your data/ulx folder, you'd create a /data/ulx/gamemodes folder, then place a <gamemode name>.txt file in that for each gamemode you want to control.
Within each gamemode file, you could set up forceddownloads or just about any ulx function you wanted (and even some non ulx commands)

The same for data/ulx/maps/<each_map_file_you_want_specific_different_than_normal>.txt

The code from ULX is below (no, you don't have to code the txt files, just posting below how I got the answer)
Code: [Select]
-- Per gamemode config
if file.Exists( "ulx/gamemodes/" .. gamemode_name .. "/" .. filename ) then
fn( "ulx/gamemodes/" .. gamemode_name .. "/" .. filename )
end

-- Per map config
if file.Exists( "ulx/maps/" .. map_name .. "/" .. filename ) then
fn( "ulx/maps/" .. map_name .. "/" .. filename )
end
end
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Kipi Ukille

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Re: Forced Downloads Help
« Reply #7 on: May 15, 2010, 08:10:33 AM »
Ahh! Thank you so much JamminR for clearing that up. Should also consider putting that info in the SVN downloads.txt file so people can know how to be more in depth with it.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Forced Downloads Help
« Reply #8 on: May 15, 2010, 08:28:51 AM »
We probably will. Will probably add in the folder names and example.txt files too.
Consdering the SVN config system was just completely moved over the past few days, we just haven't gotten there yet.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6213
  • Karma: 394
  • Project Lead
Re: Forced Downloads Help
« Reply #9 on: May 15, 2010, 09:00:45 AM »
JamminR, sorry to contradict you but the file system works under data/maps/<map_name>/<config_name> or data/gamemodes/<gamemode_name>/<config_name>, where config names are config.txt (the equivalent to server.ini), gimps.txt, adverts.txt, downloads.txt, and votemaps.txt.

That brings up an issue... all the configs currently add to another as it goes down. Config.txt ends up with the most specific configuration since it's changing variables, but the others are all adding new stuff to the old. This makes sense for downloads.txt and maybe adverts.txt, but not a whole lot of sense for gimps.txt, and votemaps.txt. Maybe those last two should wipe the slate clean with each more specific config it comes to?
Experiencing God's grace one day at a time.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Forced Downloads Help
« Reply #10 on: May 15, 2010, 09:35:09 AM »
No worries Megiddo. That's not so much a contradiction as a correction. Being that it's so 'new', I just hadn't learned yet.
Since I'd not tested my theory, I didn't give 100% accurate information.

As for the whole slew of configuration files, wouldn't specifying commands in the config.txt overwrite previous ones already?
I could see instances where I'd want the slate clean so to speak, but most of the time, to keep things 'clean' in my mind, I'd rather just have the sub-specific game or map folders have less commands in them to keep track of what I'm doing/changing.
I guess it is a design decision that needs to be considered.

Possible way.. instead of having slate cleared, which MAY not be wanted by the user, make a clear command that can be run before other commands.
That idea mostly works with gimps, but, could be used for downloads/adverts too. As for the normal configs, I'd leave as is...just have the 'default' config items change only if specifed in the <sub_folder>/<map or gamemode> configs file.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline ngc0202

  • Newbie
  • *
  • Posts: 31
  • Karma: 0
Re: Forced Downloads Help
« Reply #11 on: June 17, 2010, 02:05:16 PM »
Sorry for epic late response, I got really busy and forgot all about gmod. Anyway, I know perfectly well how to use the downloads, I've put the downloads in, but the models don't download!

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6213
  • Karma: 394
  • Project Lead
Re: Forced Downloads Help
« Reply #12 on: June 17, 2010, 02:11:14 PM »
Show us your file
Experiencing God's grace one day at a time.

Offline ngc0202

  • Newbie
  • *
  • Posts: 31
  • Karma: 0
Re: Forced Downloads Help
« Reply #13 on: June 17, 2010, 03:23:39 PM »
Which file? The downloads file?

// You can add forced downloads here. Add as many as you want, one file or
// folder per line. You can also add these to your map- or game-specific files.
// You can add a folder to add all files inside that folder recursively.
// Any line starting with '//' is a comment and WILL NOT be processed!!!
// Examples:
//sound/cheeseman.mp3 <-- Adds the file 'cheeseman.mp3' under the sound folder
//sound/my_music <-- Adds all files within the my_music folder, inside the sound folder

/addons

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6213
  • Karma: 394
  • Project Lead
Re: Forced Downloads Help
« Reply #14 on: June 17, 2010, 04:25:31 PM »
You're trying to make them download all your addons? That's never going to work. What you pasted isn't even valid in SVN! We're using a different form of commenting now.
Experiencing God's grace one day at a time.