Using Xenon Servers Need Help with .lua

I can set an .lua file to fastdl workshop content for clients but I want to make separate files for each game mode. Right now they have is set to where I have to put the .lua in the lua/autorun/server folder. How can I force loading of individual .lua files for different game modes?

If you’re willing to learn a bit of Lua, you can use the

Global.include function to selectively include Lua files. This would involve keeping one file in the lua/autorun folder which includes files outside of the folder.

OK so I would still have only one .lua at this location but have it tell which .lua to include dependent upon which game mode i was using? I’m new so I’m not sure how to tell it to do that.

Setting up FastDL: https://dl.dropboxusercontent.com/u/26074909/tutoring/server_srcds_steamcmd/fastdl_setup_instructions.lua.html

My simple recursive resource includer: https://dl.dropboxusercontent.com/u/26074909/tutoring/server_srcds_steamcmd/setting_up_downloads_using_recursive_resource_system.lua.html – just drop your content into gamemodes/your_gm/content/* files and this will automatically add the files.

You can create empty .gma files in gamemodes/your_gm/content/workshop/ if you want to have the client download a workshop item which you’ve extracted or if it is a client only texture deal… The name needs to include the workshop id with no other digits but can contain all other types of legal characters to describe what it is.

This will also add all gma files in your addons/ directory to the download list ( next version will automatically skip gma files containing maps unless the current map is in that gma file, and next version will also include a way to prevent the client from downloading server-only gmas [ both automatically and manually ] ).

No need to write up a script for each gamemode you have… No need to run a utility to generate a resource file each time you change content. Just plug and play. Next version will be released in my dev_addon and a “lite/light” version will take over the file above…

[lua]
local content = {}
content[“sandbox”] = {12345, 67890}
content[“ttt”] = {54321, 19876}

local name = GetConVarString(“gamemode”)

if (content[name]) then
for k, v in ipairs(content[name]) do
resource.AddWorkshop(v)
end
end
[/lua]

Something like this would be way simpler