Ulysses
Home
Help
Ulysses
»
General
»
Developers Corner
»
Setting maps to fastdl when that map is chosen
« previous next »
Print
Pages: [
1
]
Go Down
Author
Topic: Setting maps to fastdl when that map is chosen (Read 13442 times)
0 Members and 1 Guest are viewing this topic.
syn.
Jr. Member
Posts: 56
Karma: 6
Lua Padawan
Setting maps to fastdl when that map is chosen
«
on:
January 30, 2014, 05:02:30 pm »
okay title might be weird but is there any way to set the maps to download only when it is selected and we are loading for that particular map? if there is please help me do it:o thanks
WOOOO JR MEMBER:D
Logged
Lua Student
"The more you understand, the crazier you get."
Eccid
Full Member
Posts: 115
Karma: 11
Hey, come on... We just met...
Re: Setting maps to fastdl when that map is chosen
«
Reply #1 on:
January 30, 2014, 05:09:58 pm »
if your fastdl is set up right, gmod should automatically do that.
Logged
syn.
Jr. Member
Posts: 56
Karma: 6
Lua Padawan
Re: Setting maps to fastdl when that map is chosen
«
Reply #2 on:
January 30, 2014, 05:24:03 pm »
what my FastDL does is that whenever a new player joins my server, it forces them to download ALL of the maps. This makes the loading time of my server skyrocket. I think it would be better for them to download each map whenever the have to PLAY that map.
Logged
Lua Student
"The more you understand, the crazier you get."
Bytewave
Respected Community Member
Hero Member
Posts: 718
Karma: 116
:)
Re: Setting maps to fastdl when that map is chosen
«
Reply #3 on:
January 30, 2014, 05:26:01 pm »
FastDL hasn't ever done that to me...
You're on XenonServers, I think, right?
Logged
bw81@ulysses-forums ~ % whoami
Homepage
syn.
Jr. Member
Posts: 56
Karma: 6
Lua Padawan
Re: Setting maps to fastdl when that map is chosen
«
Reply #4 on:
January 30, 2014, 05:28:11 pm »
yep maybe I have a different method of FastDl o.O I just added a workshop.lua on lua/autorun/server/ and manually added each file (resource.AddWorkshop("335286353") )
Logged
Lua Student
"The more you understand, the crazier you get."
Neku
Hero Member
Posts: 549
Karma: 27
Re: Setting maps to fastdl when that map is chosen
«
Reply #5 on:
January 30, 2014, 05:32:40 pm »
Yeah, you don't need to do that.
Just leave it alone. Maps automatically download.
Logged
Out of the Garry's Mod business.
syn.
Jr. Member
Posts: 56
Karma: 6
Lua Padawan
Re: Setting maps to fastdl when that map is chosen
«
Reply #6 on:
January 30, 2014, 05:34:48 pm »
ohh so I dont add the wokrshop.lua? is that it?
Logged
Lua Student
"The more you understand, the crazier you get."
Neku
Hero Member
Posts: 549
Karma: 27
Re: Setting maps to fastdl when that map is chosen
«
Reply #7 on:
January 30, 2014, 07:18:04 pm »
Remove the ones for maps.
Logged
Out of the Garry's Mod business.
JamminR
Ulysses Team Member
Hero Member
Posts: 8096
Karma: 390
Sertafide Ulysses Jenius
Re: Setting maps to fastdl when that map is chosen
«
Reply #8 on:
January 30, 2014, 07:20:17 pm »
The only time you add a workshop lua is if it's a workshop item for lua/models/sounds.
Maps by default, if on the fastdl host, will download when you're on that map.
Make sure to bz2 compress them. (Find any 'Source map bz2' tutorial)
Logged
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming
Bytewave
Respected Community Member
Hero Member
Posts: 718
Karma: 116
:)
Re: Setting maps to fastdl when that map is chosen
«
Reply #9 on:
January 30, 2014, 07:29:30 pm »
You could technically do this, could you not?
Code: Lua
--This is a list of your server's maps which are available through the workshop
--Each one uses the map file's name and the workshop ID
maplist
=
{
}
--change this table definition to your needs.
maplist
[
"ttt_community_bowling_v5a"
]
=
"131667838"
maplist
[
"ttt_westwood_v4"
]
=
"104520719"
maplist
[
"ttt_mc_skyislands"
]
=
"106498411"
local
map
=
game
.
GetMap
(
)
-- Get's the current map name
local
workshopid
=
maplist
[
map
]
-- Finds the workshop ID for the current map name from the table above
if
(
workshopid !
=
nil
)
then
--If the map is in the table above, add it through workshop
print
(
"[WORKSHOP] Setting up maps. "
..
map
..
" workshop ID: "
..
workshopid
)
resource
.
AddWorkshop
(
workshopid
)
else
--If not, ) then hope the server has FastDL or the client has the map
print
(
"[WORKSHOP] Not available for current map. Using FastDL instead hopefully..."
)
end
Taken from the GMod wiki.
Logged
bw81@ulysses-forums ~ % whoami
Homepage
Neku
Hero Member
Posts: 549
Karma: 27
Re: Setting maps to fastdl when that map is chosen
«
Reply #10 on:
January 30, 2014, 07:35:04 pm »
That works, but is not needed.
Logged
Out of the Garry's Mod business.
Bytewave
Respected Community Member
Hero Member
Posts: 718
Karma: 116
:)
Re: Setting maps to fastdl when that map is chosen
«
Reply #11 on:
January 30, 2014, 07:39:46 pm »
Quote from: Neku on January 30, 2014, 07:35:04 pm
That works, but is not needed.
Well, Workshop is most likely faster than a conventional FadtDL server... I'm actually planning doing a Workshop DL system for my server to decrease total loading time.
Logged
bw81@ulysses-forums ~ % whoami
Homepage
JamminR
Ulysses Team Member
Hero Member
Posts: 8096
Karma: 390
Sertafide Ulysses Jenius
Re: Setting maps to fastdl when that map is chosen
«
Reply #12 on:
January 31, 2014, 02:18:00 pm »
Here's the issue.
By uploading anything to workshop, you're agreeing that 1) you own/are the creator of the content being uploaded and therefore 2) You're allowing Valve to lay claim to it, if they so wish.
Logged
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming
Print
Pages: [
1
]
Go Up
« previous next »
Ulysses
»
General
»
Developers Corner
»
Setting maps to fastdl when that map is chosen