diff --git a/.luacheckrc b/.luacheckrc new file mode 100644 index 000000000..2a45a9f8b --- /dev/null +++ b/.luacheckrc @@ -0,0 +1,42 @@ + +self = false +unused = false +-- unused_args = false +global = false +allow_defined_top = true +max_line_length = false +codes = true + +-- Something to think about in the future +-- max_cyclomatic_complexity = 10 + +-- Lua (unnecessary) +-- "os", "pairs", "math", "pcall", "table", "type", "unpack", "assert", +-- "ipairs", "tostring", "tonumber", "debug", "getfenv", "setfenv", +-- "loadstring", "io", "xpcall", "string", "collectgarbage", +-- "getmetatable", "setmetatable", "next", + +-- Default is probably fine, but anyway +std=lua51 + +globals = { + -- std extensions + "math.round", "math.bit_or", + "table.ifind", "table.show", "table.save", "table.echo", "table.print", + -- Spring + "Spring", "VFS", "gl", "GL", "Game", + "UnitDefs", "UnitDefNames", "FeatureDefs", "FeatureDefNames", + "WeaponDefs", "WeaponDefNames", "LOG", "KEYSYMS", "CMD", "Script", + "SendToUnsynced", "Platform", "include", + -- Gadgets + "GG", "gadgetHandler", "gadget", + -- Widgets + "WG", "widgetHandler", "widget", + -- Chili + "Chili", "Checkbox", "Control", "ComboBox", "Button", "Label", + "Line", "EditBox", "Font", "Window", "ScrollPanel", "LayoutPanel", + "Panel", "StackPanel", "Grid", "TextBox", "Image", "TreeView", "Trackbar", + "DetachableTabPanel", "screen0", "Progressbar", + -- Libs + -- "LCS", "Path", "Table", "Log", "String", "Shaders", "Time", "Array", "StartScript", +} \ No newline at end of file diff --git a/LuaMenu/Addons/timeFunctions.lua b/LuaMenu/Addons/timeFunctions.lua index 3a578f9ce..5d9e0876b 100644 --- a/LuaMenu/Addons/timeFunctions.lua +++ b/LuaMenu/Addons/timeFunctions.lua @@ -62,14 +62,14 @@ local function FixTimeOutOfBounds(timeTable) timeTable[i] = timeTable[i] + base[i] timeTable[i + 1] = timeTable[i + 1] - 1 end - while timeTable[i] > base[i] do + while timeTable[i] >= base[i] do timeTable[i] = timeTable[i] - base[i] timeTable[i + 1] = timeTable[i + 1] + 1 end end - local updated = false - while updated do + repeat + local updated = false -- Overflow local daysInThisMonth = monthDays[timeTable[5]] or 31 if timeTable[5] == 2 and IsLeapYear(timeTable[6]) then @@ -99,7 +99,7 @@ local function FixTimeOutOfBounds(timeTable) timeTable[6] = timeTable[6] - 1 updated = true end - end + until (not updated) return timeTable end @@ -393,4 +393,4 @@ function Spring.Utilities.GetCompactCurrentUtc() } return string.format("%04d%02d%02d_%02d%02d%02d", t[6], t[5], t[4], t[3], t[2], t[1]) -end \ No newline at end of file +end diff --git a/LuaMenu/configs/gameConfig/generic/mainConfig.lua b/LuaMenu/configs/gameConfig/generic/mainConfig.lua index 557633bef..c2a41f24b 100644 --- a/LuaMenu/configs/gameConfig/generic/mainConfig.lua +++ b/LuaMenu/configs/gameConfig/generic/mainConfig.lua @@ -39,6 +39,13 @@ local externalFuncAndData = { background = background, minimapOverridePath = minimapOverridePath, minimapThumbnailPath = minimapThumbnailPath, + + ignoreServerVersion = true, + disableBattleListHostButton = true, -- Hides "Host" button as this function is not working as one might imagine + disableSteam = true, -- removes settings related to steam + disablePlanetwars = true, -- removes settings related to planetwars + disableMatchMaking = true, -- removes match making + disableCommunityWindow = true, -- removes Community Window } function externalFuncAndData.CheckAvailability() diff --git a/LuaMenu/configs/gameConfig/tc/aiblacklist.lua b/LuaMenu/configs/gameConfig/tc/aiblacklist.lua new file mode 100644 index 000000000..10ea42df3 --- /dev/null +++ b/LuaMenu/configs/gameConfig/tc/aiblacklist.lua @@ -0,0 +1,13 @@ +return { + CppTestAI = true, + E323AI = true, + HughAI = true, + KAIK = true, + NullAI = true, + NullJavaAI = true, + NullOOJavaAI = true, + RAI = true, + Sharddev = true, + Shard = true, + AAI = true, +} \ No newline at end of file diff --git a/LuaMenu/configs/gameConfig/tc/benchmarkFile.lua b/LuaMenu/configs/gameConfig/tc/benchmarkFile.lua new file mode 100644 index 000000000..9314bd1bf --- /dev/null +++ b/LuaMenu/configs/gameConfig/tc/benchmarkFile.lua @@ -0,0 +1,67 @@ +return [[ + +[game] +{ +[allyteam1] +{ +numallies=0; +} +[team1] +{ +teamleader=0; +rgbcolor=0.99609375 0.546875 0; +allyteam=1; +} +[ai0] +{ +host=0; +name=SkirmishAI(1); +version=; +isfromdemo=0; +team=0; +shortname=Skirmish AI; +} +[modoptions] +{ +} +[allyteam0] +{ +numallies=0; +} +[team0] +{ +teamleader=0; +rgbcolor=0.99609375 0.546875 0; +allyteam=0; +} +[ai1] +{ +host=0; +name=SkirmishAI(2); +version=; +isfromdemo=0; +team=1; +shortname=Skirmish AI; +} +[player0] +{ +spectator=1; +name=Player; +rank=0; +isfromdemo=0; +team=0; +} +numplayers=1; +gamestartdelay=0; +myplayername=Player; +gametype=The Cursed $VERSION; +ishost=1; +hostip=127.0.0.1; +mapname=Barren 2; +startpostype=2; +hostport=0; +numusers=3; +nohelperais=0; +} + +]] \ No newline at end of file diff --git a/LuaMenu/configs/gameConfig/tc/defaultsettings/MenuLoadscreens/loadscreen.png b/LuaMenu/configs/gameConfig/tc/defaultsettings/MenuLoadscreens/loadscreen.png new file mode 100644 index 000000000..9b3d707be Binary files /dev/null and b/LuaMenu/configs/gameConfig/tc/defaultsettings/MenuLoadscreens/loadscreen.png differ diff --git a/LuaMenu/configs/gameConfig/tc/defaultsettings/chobby_config.json b/LuaMenu/configs/gameConfig/tc/defaultsettings/chobby_config.json new file mode 100644 index 000000000..9d5ce7c22 --- /dev/null +++ b/LuaMenu/configs/gameConfig/tc/defaultsettings/chobby_config.json @@ -0,0 +1,9 @@ +{ + "server" : { + "address" : "springrts.com", + "port" : 8200, + "serverName" : "Spring", + "protocol" : "spring" + }, + "game" : "tc" +} diff --git a/LuaMenu/configs/gameConfig/tc/defaultsettings/discord/32bit/discord-rpc.dll b/LuaMenu/configs/gameConfig/tc/defaultsettings/discord/32bit/discord-rpc.dll new file mode 100644 index 000000000..73a8070ee Binary files /dev/null and b/LuaMenu/configs/gameConfig/tc/defaultsettings/discord/32bit/discord-rpc.dll differ diff --git a/LuaMenu/configs/gameConfig/tc/defaultsettings/discord/64bit/discord-rpc.dll b/LuaMenu/configs/gameConfig/tc/defaultsettings/discord/64bit/discord-rpc.dll new file mode 100644 index 000000000..9cf522839 Binary files /dev/null and b/LuaMenu/configs/gameConfig/tc/defaultsettings/discord/64bit/discord-rpc.dll differ diff --git a/LuaMenu/configs/gameConfig/tc/defaultsettings/lups.cfg b/LuaMenu/configs/gameConfig/tc/defaultsettings/lups.cfg new file mode 100644 index 000000000..70d56b5bc --- /dev/null +++ b/LuaMenu/configs/gameConfig/tc/defaultsettings/lups.cfg @@ -0,0 +1 @@ +//==verbose mode?== //ShowWarnings = true Quality=3 //0=very low,1=low,2=normal,3=high,4=very high //==Distortions== //Distortions = false // force distortions? (you can force it on, too!) //DistortionUpdateSkip = 0 // must be larger zero (larger := better performance) //DistortionCopyDepthBuffer = true // do depthtest? (can increase performance if turned off) //==Force Card Detection== // Vendor = "NVIDIA Corporation" // Renderer= "GeForce 7600" //==Deactivate Specific Classes== DisableFX= { ShockWave = false, UnitCloaker = false, UnitJitter = false, AirJet = __AIR_JET__, Ribbon = __RIBBON__, ShieldSphereColor = __SHIELD_SPHERE_COLOR__, } //==NanoTower FXs== // NanoFxType[0..FACTIONS_COUNT-1] : determines the used particle class // (only NanoLasers and NanoParticles possible) // (Note: NanoParticles doesn't work on all PCs) // NanoFx[0..FACTIONS_COUNT-1] : fx config// note: if you want to make a param dependent on the nano density, // then you can put " " around the param and put any lua code // in it (see core example fx) // (any lua function except math.random(),random(),r() are prohibited) // allowed variables to use are: // count (nano density/strength) // limcount (count scaled between 0..1) // and inverse (->reclaim) NanoFx = { // EXAMPLE CUSTOM ARM NANOFX (freaky!) //arm = { // fxtype = "NanoParticles", // alpha = 0.25, // size = 3, // sizeSpread = 5, // sizeGrowth = 0.35, // rotSpeed = 0.1, // rotSpread = 360, // texture = "bitmaps/Other/Poof.png", // particles = 1.75, // -> count*2.5 particles //} // DEFAULT CORE ONE //core = { // fxtype = "NanoLasers", // alpha = "0.2+count/30", // corealpha = "0.7+count/15", // corethickness = "limcount", // streamThickness = "1+4*limcount", // streamSpeed = "(inversed)and(70-count) or (120-count*3)", //} } \ No newline at end of file diff --git a/LuaMenu/configs/gameConfig/tc/defaultsettings/springsettings.cfg b/LuaMenu/configs/gameConfig/tc/defaultsettings/springsettings.cfg new file mode 100644 index 000000000..d70ab6cb4 --- /dev/null +++ b/LuaMenu/configs/gameConfig/tc/defaultsettings/springsettings.cfg @@ -0,0 +1,75 @@ +AdvUnitShading = 1 +AdvMapShading = 1 +AllowDeferredMapRendering = 1 +AllowDeferredModelRendering = 1 +BuildWarnings = 0 +BumpWaterAnisotropy = 2 +BumpWaterBlurReflection = 1 +BumpWaterReflection = 2 +BumpWaterRefraction = 1 +BumpWaterDepthBits = 32 +BumpWaterShoreWaves = 1 +BumpWaterTexSizeReflection = 256 +CamMode = 1 +CamTimeExponent = 4.0 +CamTimeFactor = 1.0 +CubeTexSizeReflection = 128 +CubeTexSizeSpecular = 128 +DisplayDebugPrefixConsole = 0 +DualScreenMiniMapOnLeft = 1 +EdgeMoveDynamic = 0 +EdgeMoveWidth = 0.003 +FeatureDrawDistance = 600000 +FeatureFadeDistance = 600000 +FontSize = 18 +FPSFOV = 90 +FSAALevel = 8 +FSAA = 1 +GrassDetail = 9 +GroundScarAlphaFade = 1 +GroundDecals = 5 +GroundDetail = 120 +HangTimeout = 5 +HardwareCursor = 1 +InitialNetworkTimeout = 0 +LoadingMT = 0 +LODScale = 1.000 +LODScaleReflection = 1.000 +LODScaleRefraction = 1.000 +LODScaleShadow = 1.000 +Language = en +LinkBandwidth = 0 +LogFlush = 0 +LuaAutoModWidgets = 1 +LuaShaders = 1 +MaxParticles = 25000 +MaxSounds = 32 +MaximumTransmissionUnit = 0 +MiddleClickScrollSpeed = -0.001 +MiniMapMarker = 0 +MinimapOnLeft = 1 +MouseDragScrollThreshold = 0 +MoveWarnings = 0 +NormalMapping = 1 +OverheadMaxHeightFactor = 1.4 +OverheadScrollSpeed = 50 +ReconnectTimeout = 0 +ReflectiveWater = 4 +RotateLogFiles = 1 +ScrollWheelSpeed = -25 +Shadows = 1 +ShadowMapSize = 8192 +ShowClock = 0 +SmoothLines = 3 +SmoothPoints = 3 +SplashScreenDir = ./MenuLoadscreens +TreeRadius = 1500 +UnitIconDist = 151 +UnitLodDist = 9999 +UseDistToGroundForIcons = 1.1 +UsePBO = 0 +VerboseLevel = 10 +Version = 2 +Water = 4 +WorkerThreadSpinTime = 5 +snd_general = 100 diff --git a/LuaMenu/configs/gameConfig/tc/defaultsettings/sqlite3.dll b/LuaMenu/configs/gameConfig/tc/defaultsettings/sqlite3.dll new file mode 100644 index 000000000..e6d1cc33e Binary files /dev/null and b/LuaMenu/configs/gameConfig/tc/defaultsettings/sqlite3.dll differ diff --git a/LuaMenu/configs/gameConfig/tc/gameUnitInformation.lua b/LuaMenu/configs/gameConfig/tc/gameUnitInformation.lua new file mode 100644 index 000000000..79dca3499 --- /dev/null +++ b/LuaMenu/configs/gameConfig/tc/gameUnitInformation.lua @@ -0,0 +1,89 @@ +local nameList = { +} + +local categories = { +} + +local humanNames = { +} + +--------- To Generate ------------ +--[[ +local inNameList = {} +local nameList = {} +local carrierDefs = VFS.Include("LuaRules/Configs/drone_defs.lua") +local function AddUnit(unitName) + if inNameList[unitName] then + return + end + inNameList[unitName] = true + nameList[#nameList + 1] = unitName + + local ud = UnitDefNames[unitName] + if ud.buildOptions then + for i = 1, #ud.buildOptions do + AddUnit(UnitDefs[ud.buildOptions[i] ].name) + end + end + + if ud.customParams.morphto then + AddUnit(ud.customParams.morphto) + end + + if ud.weapons then + for i = 1, #ud.weapons do + local wd = WeaponDefs[ud.weapons[i].weaponDef] + if wd and wd.customParams and wd.customParams.spawns_name then + AddUnit(wd.customParams.spawns_name) + end + end + end + + if carrierDefs[ud.id] then + local data = carrierDefs[ud.id] + for i = 1, #data do + local droneUnitDefID = data[i].drone + if droneUnitDefID and UnitDefs[droneUnitDefID] then + AddUnit(UnitDefs[droneUnitDefID].name) + end + end + end +end + +local function GenerateLists() + AddUnit("cloakcon") + local humanNames = {} + for i = 1, #nameList do + humanNames[nameList[i] ] = { + humanName = UnitDefNames[nameList[i] ].humanName, + description = UnitDefNames[nameList[i] ].tooltip, + } + end + Spring.Echo(Spring.Utilities.TableToString(nameList, "nameList")) + Spring.Echo(Spring.Utilities.TableToString(humanNames, "humanNames")) +end + +GenerateLists() +--]] + +local function UnitOrder(name1, name2) + local data1 = name1 and humanNames[name1] + local data2 = name1 and humanNames[name2] + if not data1 then + return (data2 and true) + end + if not data2 then + return true + end + + local category1 = categories[data1.category].order + local category2 = categories[data2.category].order + return category1 < category2 or (category1 == category2 and data1.order < data2.order) +end + +return { + nameList = nameList, + humanNames = humanNames, + categories = categories, + UnitOrder = UnitOrder, +} \ No newline at end of file diff --git a/LuaMenu/configs/gameConfig/tc/helpSubmenuConfig.lua b/LuaMenu/configs/gameConfig/tc/helpSubmenuConfig.lua new file mode 100644 index 000000000..c170e8fca --- /dev/null +++ b/LuaMenu/configs/gameConfig/tc/helpSubmenuConfig.lua @@ -0,0 +1,228 @@ +-------------------------------------------------------------------------------- +-------------------------------------------------------------------------------- +-- Utilities + +local function CreateLine(lineText, linkText, onClick) + local Configuration = WG.Chobby.Configuration + + local lineHolder = Control:New { + x = 0, + y = 0, + width = "100%", + resizable = false, + draggable = false, + padding = {0, 0, 0, 0}, + } + + if onClick then + local linkButton = Button:New { + x = 3, + y = 3, + height = 34, + width = 95, + caption = linkText, + classname = "action_button", + font = WG.Chobby.Configuration:GetFont(2), + OnClick = { + onClick + }, + parent = lineHolder, + } + end + + local text = TextBox:New { + name = "text", + x = 110, + y = 12, + right = 0, + height = 20, + valign = 'center', + fontsize = Configuration:GetFont(2).size, + text = lineText, + parent = lineHolder, + } + + return lineHolder +end + +-------------------------------------------------------------------------------- +-------------------------------------------------------------------------------- +-- Community Links + +local communityLines = { + { + "Site home page.", + "Home", + function () + WG.BrowserHandler.OpenUrl("http://www.cursed.one") + end + }, + { + "Community forums.", + "Forums", + function () + WG.BrowserHandler.OpenUrl("https://springrts.com/phpbb/viewforum.php?f=54") + end + }, + { + "Discord chat server.", + "Discord", + function () + WG.BrowserHandler.OpenUrl("https://discord.gg/6FGe3NJ") + end + }, + { + "Youtube channel.", + "Youtube", + function () + WG.BrowserHandler.OpenUrl("https://www.youtube.com/user/azaremoth") + end + }, + { + "Hall of Fame", + "Ladder", + function () + WG.BrowserHandler.OpenUrl("http://replays.springrts.com/hall_of_fame/TC/") + end + }, + { + "Browse and download maps.", + "Maps", + function () + WG.BrowserHandler.OpenUrl("https://springfiles.com/spring/spring-maps") + end + }, + { + "Browse and download replays.", + "Replays", + function () + WG.BrowserHandler.OpenUrl("http://replays.springrts.com/?game_pref=24") + end + }, +} + +local firstCommunityParent = true +local communityControl = Control:New { + x = 0, + y = 0, + right = 0, + bottom = 0, + padding = {12, 12, 15, 15}, + OnParent = { + function (obj) + if not firstCommunityParent then + return + end + firstCommunityParent = false + + local list = SortableList(obj) + + local items = {} + for i = 1, #communityLines do + local data = communityLines[i] + items[#items + 1] = {#items, CreateLine(data[1], data[2], data[3])} + end + + list:AddItems(items) + end + }, +} + +-------------------------------------------------------------------------------- +-------------------------------------------------------------------------------- +-- Bug Reporting + +local bugLines = { + { + textFunction = function () + return "Using engine " .. Spring.Utilities.GetEngineVersion() .. " " .. ((WG.Chobby.Configuration:GetIsRunning64Bit() and "64-bit.") or "32-bit.") + end, + }, +--[[ { + "Open game data folder to find settings, infolog etc...", + "Local Data", + function () + WG.WrapperLoopback.OpenFolder() + end + }, ]]-- + { + "A useful site for uploading infologs.", + "Pastebin", + function () + WG.BrowserHandler.OpenUrl("https://www.pastebin.com") + end + }, + { + "Report the bug on the forum.", + "Forum", + function () + WG.BrowserHandler.OpenUrl("https://springrts.com/phpbb/viewforum.php?f=54") + end + }, + { + "Report an in-game bug on GitHub. This requires a GitHub account.", + "Game Bug", + function () + WG.BrowserHandler.OpenUrl("https://github.com/azaremoth/cursed/issues") + end + }, +} + +--[[if VFS.HasArchive("The Cursed $VERSION") then + bugLines[#bugLines + 1] = { + "Run a benchmark game.", + "Benchmark", + function () + local localLobby = WG.LibLobby and WG.LibLobby.localLobby + if localLobby then + localLobby:StartGameFromString(VFS.Include(LUA_DIRNAME .. "configs/gameConfig/tc/benchmarkFile.lua")) + end + end + } +end]]-- + +local firstBugParent = true +local bugControl = Control:New { + x = 0, + y = 0, + right = 0, + bottom = 0, + padding = {12, 12, 15, 15}, + OnParent = { + function (obj) + if not firstBugParent then + return + end + firstBugParent = false + + local list = SortableList(obj, nil, 70) + + local items = {} + for i = 1, #bugLines do + local data = bugLines[i] + items[#items + 1] = {#items, CreateLine(data[1] or data.textFunction(), data[2], data[3])} + end + + list:AddItems(items) + end + }, +} + +-------------------------------------------------------------------------------- +-------------------------------------------------------------------------------- +-- Structure + +return { + { + name = "links", + control = communityControl, + }, +-- { +-- name = "tutorials", +-- control = WG.MissionHandler.GetControl(), +-- }, + { + name = "report_a_bug", + control = bugControl, + }, +} diff --git a/LuaMenu/configs/gameConfig/tc/linkFunctions.lua b/LuaMenu/configs/gameConfig/tc/linkFunctions.lua new file mode 100644 index 000000000..47c18e30a --- /dev/null +++ b/LuaMenu/configs/gameConfig/tc/linkFunctions.lua @@ -0,0 +1,13 @@ +local function link_homePage() + return "http://www.cursed.one" +end + +local function link_replays() + return "http://replays.springrts.com/?game_pref=24" +end + +local function link_maps() + return "https://springfiles.com/spring/spring-maps" +end + +return link_homePage, link_replays, link_maps \ No newline at end of file diff --git a/LuaMenu/configs/gameConfig/tc/lups/lups0.cfg b/LuaMenu/configs/gameConfig/tc/lups/lups0.cfg new file mode 100644 index 000000000..e5010b77e --- /dev/null +++ b/LuaMenu/configs/gameConfig/tc/lups/lups0.cfg @@ -0,0 +1 @@ +//==verbose mode?== //ShowWarnings = true Quality=0 //0=very low,1=low,2=normal,3=high,4=very high //==Distortions== Distortions = false // force distortions? (you can force it on, too!) //DistortionUpdateSkip = 0 // must be larger zero (larger := better performance) //DistortionCopyDepthBuffer = true // do depthtest? (can increase performance if turned off) //==Force Card Detection== // Vendor = "NVIDIA Corporation" // Renderer= "GeForce 7600" //==Deactivate Specific Classes== DisableFX= { ShockWave = true, UnitCloaker = true, UnitJitter = true, AirJet = __AIR_JET__, Ribbon = __RIBBON__, ShieldSphereColor = __SHIELD_SPHERE_COLOR__, } //==NanoTower FXs== // NanoFxType[0..FACTIONS_COUNT-1] : determines the used particle class // (only NanoLasers and NanoParticles possible) // (Note: NanoParticles doesn't work on all PCs) // NanoFx[0..FACTIONS_COUNT-1] : fx config // note: if you want to make a param dependent on the nano density, // then you can put " " around the param and put any lua code // in it (see core example fx) // (any lua function except math.random(),random(),r() are prohibited) // allowed variables to use are: // count (nano density/strength) // limcount (count scaled between 0..1) // and inverse (->reclaim) NanoFx = { // EXAMPLE CUSTOM ARM NANOFX (freaky!) //arm = { // fxtype = "NanoParticles", // alpha = 0.25, // size = 3, // sizeSpread = 5, // sizeGrowth = 0.35, // rotSpeed = 0.1, // rotSpread = 360, // texture = "bitmaps/Other/Poof.png", // particles = 1.75, // -> count*2.5 particles //} // DEFAULT CORE ONE //core = { // fxtype = "NanoLasers", // alpha = "0.2+count/30", // corealpha = "0.7+count/15", // corethickness = "limcount", // streamThickness = "1+4*limcount", // streamSpeed = "(inversed)and(70-count) or (120-count*3)", //} } \ No newline at end of file diff --git a/LuaMenu/configs/gameConfig/tc/lups/lups1.cfg b/LuaMenu/configs/gameConfig/tc/lups/lups1.cfg new file mode 100644 index 000000000..f04e69778 --- /dev/null +++ b/LuaMenu/configs/gameConfig/tc/lups/lups1.cfg @@ -0,0 +1 @@ +//==verbose mode?== //ShowWarnings = true Quality=2 //0=very low,1=low,2=normal,3=high,4=very high //==Distortions== //Distortions = false // force distortions? (you can force it on, too!) DistortionUpdateSkip = 2 // must be larger zero (larger := better performance) DistortionCopyDepthBuffer = false // do depthtest? (can increase performance if turned off) //==Force Card Detection== // Vendor = "NVIDIA Corporation" // Renderer= "GeForce 7600" //==Deactivate Specific Classes== DisableFX= { ShockWave = true, UnitCloaker = false, UnitJitter = false, AirJet = __AIR_JET__, Ribbon = __RIBBON__, ShieldSphereColor = __SHIELD_SPHERE_COLOR__, } //==NanoTower FXs== // NanoFxType[0..FACTIONS_COUNT-1] : determines the used particle class // (only NanoLasers and NanoParticles possible) // (Note: NanoParticles doesn't work on all PCs) // NanoFx[0..FACTIONS_COUNT-1] : fx config // note: if you want to make a param dependent on the nano density, // then you can put " " around the param and put any lua code // in it (see core example fx) // (any lua function except math.random(),random(),r() are prohibited) // allowed variables to use are: // count (nano density/strength) // limcount (count scaled between 0..1) // and inverse (->reclaim) NanoFx = { // EXAMPLE CUSTOM ARM NANOFX (freaky!) //arm = { // fxtype = "NanoParticles", // alpha = 0.25, // size = 3, // sizeSpread = 5, // sizeGrowth = 0.35, // rotSpeed = 0.1, // rotSpread = 360, // texture = "bitmaps/Other/Poof.png", // particles = 1.75, // -> count*2.5 particles //} // DEFAULT CORE ONE //core = { // fxtype = "NanoLasers", // alpha = "0.2+count/30", // corealpha = "0.7+count/15", // corethickness = "limcount", // streamThickness = "1+4*limcount", // streamSpeed = "(inversed)and(70-count) or (120-count*3)", //} } \ No newline at end of file diff --git a/LuaMenu/configs/gameConfig/tc/lups/lups2.cfg b/LuaMenu/configs/gameConfig/tc/lups/lups2.cfg new file mode 100644 index 000000000..1ada83da7 --- /dev/null +++ b/LuaMenu/configs/gameConfig/tc/lups/lups2.cfg @@ -0,0 +1 @@ +//==verbose mode?== //ShowWarnings = true Quality=3 //0=very low,1=low,2=normal,3=high,4=very high //==Distortions== //Distortions = false // force distortions? (you can force it on, too!) DistortionUpdateSkip = 1 // must be larger zero (larger := better performance) //DistortionCopyDepthBuffer = true // do depthtest? (can increase performance if turned off) //==Force Card Detection== // Vendor = "NVIDIA Corporation" // Renderer= "GeForce 7600" //==Deactivate Specific Classes== DisableFX= { ShockWave = false, UnitCloaker = false, UnitJitter = false, AirJet = __AIR_JET__, Ribbon = __RIBBON__, ShieldSphereColor = __SHIELD_SPHERE_COLOR__, } //==NanoTower FXs== // NanoFxType[0..FACTIONS_COUNT-1] : determines the used particle class // (only NanoLasers and NanoParticles possible) // (Note: NanoParticles doesn't work on all PCs) // NanoFx[0..FACTIONS_COUNT-1] : fx config // note: if you want to make a param dependent on the nano density, // then you can put " " around the param and put any lua code // in it (see core example fx) // (any lua function except math.random(),random(),r() are prohibited) // allowed variables to use are: // count (nano density/strength) // limcount (count scaled between 0..1) // and inverse (->reclaim) NanoFx = { // EXAMPLE CUSTOM ARM NANOFX (freaky!) //arm = { // fxtype = "NanoParticles", // alpha = 0.25, // size = 3, // sizeSpread = 5, // sizeGrowth = 0.35, // rotSpeed = 0.1, // rotSpread = 360, // texture = "bitmaps/Other/Poof.png", // particles = 1.75, // -> count*2.5 particles //} // DEFAULT CORE ONE //core = { // fxtype = "NanoLasers", // alpha = "0.2+count/30", // corealpha = "0.7+count/15", // corethickness = "limcount", // streamThickness = "1+4*limcount", // streamSpeed = "(inversed)and(70-count) or (120-count*3)", //} } \ No newline at end of file diff --git a/LuaMenu/configs/gameConfig/tc/lups/lups3.cfg b/LuaMenu/configs/gameConfig/tc/lups/lups3.cfg new file mode 100644 index 000000000..70d56b5bc --- /dev/null +++ b/LuaMenu/configs/gameConfig/tc/lups/lups3.cfg @@ -0,0 +1 @@ +//==verbose mode?== //ShowWarnings = true Quality=3 //0=very low,1=low,2=normal,3=high,4=very high //==Distortions== //Distortions = false // force distortions? (you can force it on, too!) //DistortionUpdateSkip = 0 // must be larger zero (larger := better performance) //DistortionCopyDepthBuffer = true // do depthtest? (can increase performance if turned off) //==Force Card Detection== // Vendor = "NVIDIA Corporation" // Renderer= "GeForce 7600" //==Deactivate Specific Classes== DisableFX= { ShockWave = false, UnitCloaker = false, UnitJitter = false, AirJet = __AIR_JET__, Ribbon = __RIBBON__, ShieldSphereColor = __SHIELD_SPHERE_COLOR__, } //==NanoTower FXs== // NanoFxType[0..FACTIONS_COUNT-1] : determines the used particle class // (only NanoLasers and NanoParticles possible) // (Note: NanoParticles doesn't work on all PCs) // NanoFx[0..FACTIONS_COUNT-1] : fx config// note: if you want to make a param dependent on the nano density, // then you can put " " around the param and put any lua code // in it (see core example fx) // (any lua function except math.random(),random(),r() are prohibited) // allowed variables to use are: // count (nano density/strength) // limcount (count scaled between 0..1) // and inverse (->reclaim) NanoFx = { // EXAMPLE CUSTOM ARM NANOFX (freaky!) //arm = { // fxtype = "NanoParticles", // alpha = 0.25, // size = 3, // sizeSpread = 5, // sizeGrowth = 0.35, // rotSpeed = 0.1, // rotSpread = 360, // texture = "bitmaps/Other/Poof.png", // particles = 1.75, // -> count*2.5 particles //} // DEFAULT CORE ONE //core = { // fxtype = "NanoLasers", // alpha = "0.2+count/30", // corealpha = "0.7+count/15", // corethickness = "limcount", // streamThickness = "1+4*limcount", // streamSpeed = "(inversed)and(70-count) or (120-count*3)", //} } \ No newline at end of file diff --git a/LuaMenu/configs/gameConfig/tc/lups/lups4.cfg b/LuaMenu/configs/gameConfig/tc/lups/lups4.cfg new file mode 100644 index 000000000..1efd758ea --- /dev/null +++ b/LuaMenu/configs/gameConfig/tc/lups/lups4.cfg @@ -0,0 +1 @@ +//==verbose mode?== //ShowWarnings = true Quality=4 //0=very low,1=low,2=normal,3=high,4=very high //==Distortions== //Distortions = false // force distortions? (you can force it on, too!) //DistortionUpdateSkip = 0 // must be larger zero (larger := better performance) //DistortionCopyDepthBuffer = true // do depthtest? (can increase performance if turned off) //==Force Card Detection== // Vendor = "NVIDIA Corporation" // Renderer= "GeForce 7600" //==Deactivate Specific Classes== DisableFX= { ShockWave = false, UnitCloaker = false, UnitJitter = false, AirJet = __AIR_JET__, Ribbon = __RIBBON__, ShieldSphereColor = __SHIELD_SPHERE_COLOR__, } //==NanoTower FXs== // NanoFxType[0..FACTIONS_COUNT-1] : determines the used particle class // (only NanoLasers and NanoParticles possible) // (Note: NanoParticles doesn't work on all PCs) // NanoFx[0..FACTIONS_COUNT-1] : fx config // note: if you want to make a param dependent on the nano density, // then you can put " " around the param and put any lua code // in it (see core example fx) // (any lua function except math.random(),random(),r() are prohibited) // allowed variables to use are: // count (nano density/strength) // limcount (count scaled between 0..1) // and inverse (->reclaim) NanoFx = { // EXAMPLE CUSTOM ARM NANOFX (freaky!) //arm = { // fxtype = "NanoParticles", // alpha = 0.25, // size = 3, // sizeSpread = 5, // sizeGrowth = 0.35, // rotSpeed = 0.1, // rotSpread = 360, // texture = "bitmaps/Other/Poof.png", // particles = 1.75, // -> count*2.5 particles //} // DEFAULT CORE ONE //core = { // fxtype = "NanoLasers", // alpha = "0.2+count/30", // corealpha = "0.7+count/15", // corethickness = "limcount", // streamThickness = "1+4*limcount", // streamSpeed = "(inversed)and(70-count) or (120-count*3)", //} } \ No newline at end of file diff --git a/LuaMenu/configs/gameConfig/tc/mainconfig.lua b/LuaMenu/configs/gameConfig/tc/mainconfig.lua new file mode 100644 index 000000000..2d24bee09 --- /dev/null +++ b/LuaMenu/configs/gameConfig/tc/mainconfig.lua @@ -0,0 +1,105 @@ +local shortname = "tc" + +local mapWhitelist = VFS.Include(LUA_DIRNAME .. "configs/gameConfig/" .. shortname .. "/mapWhitelist.lua") +local aiBlacklist = VFS.Include(LUA_DIRNAME .. "configs/gameConfig/" .. shortname .. "/aiBlacklist.lua") +local singleplayerConfig = VFS.Include(LUA_DIRNAME .. "configs/gameConfig/" .. shortname .. "/singleplayerMenu.lua") +local helpSubmenuConfig = VFS.Include(LUA_DIRNAME .. "configs/gameConfig/" .. shortname .. "/helpSubmenuConfig.lua") +local skirmishDefault = VFS.Include(LUA_DIRNAME .. "configs/gameConfig/" .. shortname .. "/skirmishDefault.lua") +local skirmishSetupData = VFS.Include(LUA_DIRNAME .. "configs/gameConfig/" .. shortname .. "/singleplayerQuickSkirmish.lua") +local defaultModoptions = VFS.Include(LUA_DIRNAME .. "configs/gameConfig/" .. shortname .. "/ModOptions.lua") +local rankFunction, largeRankFunction = VFS.Include(LUA_DIRNAME .. "configs/gameConfig/zk/rankFunction.lua") +local backgroundConfig = VFS.Include(LUA_DIRNAME .. "configs/gameConfig/" .. shortname .. "/skinning/skinConfig.lua") +local gameUnitInformation = VFS.Include(LUA_DIRNAME .. "configs/gameConfig/" .. shortname .. "/gameUnitInformation.lua") + +-- local link_homePage, link_replays, link_maps = VFS.Include(LUA_DIRNAME .. "configs/gameConfig/" .. shortname .. "/linkFunctions.lua") + +local settingsConfig, settingsNames, settingsDefault, SettingsPresetFunc = VFS.Include(LUA_DIRNAME .. "configs/gameConfig/" .. shortname .. "/settingsMenu.lua") + +local headingLarge = LUA_DIRNAME .. "configs/gameConfig/" .. shortname .. "/skinning/headingLarge.png" +local headingSmall = LUA_DIRNAME .. "configs/gameConfig/" .. shortname .. "/skinning/headingSmall.png" +local backgroundImage = LUA_DIRNAME .. "configs/gameConfig/" .. shortname .. "/skinning/background.jpg" +local taskbarIcon = LUA_DIRNAME .. "configs/gameConfig/" .. shortname .. "/taskbarLogo.png" + + +local subheadings = { + large = { + singleplayer = LUA_DIRNAME .. "configs/gameConfig/" .. shortname .. "/skinning/headingSingleplayerLarge.png", + multiplayer = LUA_DIRNAME .. "configs/gameConfig/" .. shortname .. "/skinning/headingMultiplayerLarge.png", + help = LUA_DIRNAME .. "configs/gameConfig/" .. shortname .. "/skinning/headingHelpLarge.png", + campaign = LUA_DIRNAME .. "configs/gameConfig/" .. shortname .. "/skinning/headingCampaignLarge.png", + }, + small = { + singleplayer = LUA_DIRNAME .. "configs/gameConfig/" .. shortname .. "/skinning/headingSingleplayerSmall.png", + multiplayer = LUA_DIRNAME .. "configs/gameConfig/" .. shortname .. "/skinning/headingMultiplayerSmall.png", + help = LUA_DIRNAME .. "configs/gameConfig/" .. shortname .. "/skinning/headingHelpSmall.png", + campaign = LUA_DIRNAME .. "configs/gameConfig/" .. shortname .. "/skinning/headingCampaignSmall.png", + }, +} + +local background = { + image = backgroundImage, + backgroundFocus = backgroundConfig.backgroundFocus, +} + +local minimapOverridePath = LUA_DIRNAME .. "configs/gameConfig/zk/minimapOverride/" +local minimapThumbnailPath = LUA_DIRNAME .. "configs/gameConfig/zk/minimapThumbnail/" + +----- Notes on apparently unused paths ----- +-- The lups folder is used by settingsMenu.lua, the lups files are copied next to chobby.exe. +-- Images in rankImages are returned by rankFunction.lua +-- The contents of defaultSettings is copied next to chobby.exe by the wrapper. + +--------------------------------------------------------------------------------- +-- Getters +--------------------------------------------------------------------------------- + +local externalFuncAndData = { + dirName = "tc", + name = "The Cursed", + _defaultGameArchiveName = "The Cursed $VERSION", + _defaultGameRapidTag = "tc:latest", -- Do not read directly + aiVersion = "stable", + mapWhitelist = mapWhitelist, + aiBlacklist = aiBlacklist, + settingsConfig = settingsConfig, + settingsNames = settingsNames, + settingsDefault = settingsDefault, + SettingsPresetFunc = SettingsPresetFunc, + singleplayerConfig = singleplayerConfig, + helpSubmenuConfig = helpSubmenuConfig, + skirmishDefault = skirmishDefault, + skirmishSetupData = skirmishSetupData, + defaultModoptions = defaultModoptions, + rankFunction = rankFunction, + largeRankFunction = largeRankFunction, + headingLarge = headingLarge, + headingSmall = headingSmall, + subheadings = subheadings, + taskbarTitle = "The Cursed", + taskbarTitleShort = "TC", + taskbarIcon = taskbarIcon, + background = background, + minimapOverridePath = minimapOverridePath, + minimapThumbnailPath = minimapThumbnailPath, + gameUnitInformation = gameUnitInformation, +-- link_reportPlayer = link_reportPlayer, +-- link_userPage = link_userPage, +-- link_homePage = link_homePage, +-- link_replays = link_replays, +-- link_maps = link_maps, +-- link_particularMapPage = link_particularMapPage, + ignoreServerVersion = true, +---- DISABLES / OVERWRIDES + battleListOnlyShow = "The Cursed", -- Filters battle list to autohost running with a game that contains only this string + disableBattleListHostButton = true, -- Hides "Host" button as this function is not working as one might imagine + disableSteam = true, -- removes settings related to steam + disablePlanetwars = true, -- removes settings related to planetwars + disableMatchMaking = true, -- removes match making + disableCommunityWindow = true, -- removes Community Window +} + +function externalFuncAndData.CheckAvailability() + return true +end + +return externalFuncAndData diff --git a/LuaMenu/configs/gameConfig/tc/mapwhitelist.lua b/LuaMenu/configs/gameConfig/tc/mapwhitelist.lua new file mode 100644 index 000000000..fde186a5f --- /dev/null +++ b/LuaMenu/configs/gameConfig/tc/mapwhitelist.lua @@ -0,0 +1,264 @@ +return { + ["2_Mountains_Battlefield"] = true, + ["Cooper_Hill_TNM02-V1"] = true, + ["AavikkoV2"] = true, + ["Aberdeen3v3v3"] = true, + ["Adamantine_Mountian-V1"] = true, + ["AlienDesert"] = true, + ["Altored_Arctic"] = true, + ["AmazonDeltav20"] = true, + ["ArcticPlainsV2.1"] = true, + ["Atuminoa"] = true, + ["Avalanche-v2"] = true, + ["Badlands"] = true, + ["Barren"] = true, + ["Battle for PlanetXVII-v01"] = true, + ["BlackStar"] = true, + ["BlueBend-v01"] = true, + ["CenterrockV12"] = true, + ["Charlie in the Hills v2.1"] = true, + ["Chicken_Farm_v02"] = true, + ["Chicken_Nuggets_v4"] = true, + ["Chicken_Roast_v1"] = true, + ["Comet Catcher Redux"] = true, + ["Conquest_of_Paradise_v1"] = true, + ["ContestedCanyon"] = true, + ["Cull"] = true, + ["Dead Reef Dry"] = true, + ["DeltaSiegeDry"] = true, + ["DeltaSiegeX"] = true, + ["DeltaSiege_Island_8_Way"] = true, + ["DesertSiege_v2b"] = true, + ["DesertTriad"] = true, + ["DigSite"] = true, + ["Drab"] = true, + ["duck"] = true, + ["Dworld_V1"] = true, + ["Energy Spire Plain"] = true, + ["Escarpment-v2"] = true, + ["Evergreen_Haven-Redux-v02"] = true, + ["ExpandedTropics"] = true, + ["Eye_Of_Horus_v2"] = true, + ["Fields_Of_Isis"] = true, + ["FinnsRevengeRV4"] = true, + ["Flooded Valley v2"] = true, + ["FolsomDamFinal"] = true, + ["FolsomDamFlooded"] = true, + ["Four_Lakes_V2"] = true, + ["FrostBiteV2"] = true, + ["FrozenPlanetV3"] = true, + ["Geyser_Plains_TNM04-V3"] = true, + ["Gods Of War 2 Remake V2"] = true, + ["Green Comet Basic"] = true, + ["Greenhaven Remake"] = true, + ["Hundred Isles Remake"] = true, + ["Icy Run v2"] = true, + ["IncultaV2"] = true, + ["IsisDelta_v02"] = true, + ["IslandParadiseV2"] = true, + ["Kappa_Basin"] = true, + ["KochCanyon-v02"] = true, + ["Lava Highground"] = true, + ["LLTAComplexV2"] = true, + ["Mearth_v4"] = true, + ["MoonQ20x"] = true, + ["MoonQ10x"] = true, + ["Moon Quartet Remake"] = true, + ["MountDustmoreV3"] = true, + ["neurope_a7"] = true, + ["Paradise Lost v2"] = true, + ["Parched_mesa-v04"] = true, + ["Porky_Islands"] = true, + ["Real"] = true, + ["Red Comet"] = true, + ["Ring Atoll Remake AA-version"] = true, + ["RustyDelta_Final"] = true, + ["rysia"] = true, + ["SailAway"] = true, + ["SalmonStream"] = true, + ["Sands of War v2"] = true, + ["ScorpioBattleground"] = true, + ["Sierra-v2"] = true, + ["Small_Divide-Remake-v04"] = true, + ["Small Supreme Islands V2"] = true, + ["Small Supreme Battlefield V2"] = true, + ["Small Supreme Battlefield Dry"] = true, + ["SnakeIslandV2"] = true, + ["StormSiege_v3"] = true, + ["SpringMountainDelta"] = true, + ["Supreme_Lake_Dry_V5"] = true, + ["Supreme Lake v2"] = true, + ["Talus"] = true, + ["Tangerine"] = true, + ["Tau10"] = true, + ["TartarusV7"] = true, + ["Tau10Dry"] = true, + ["Tempest"] = true, + ["Ternion"] = true, + ["Terra"] = true, + ["TheHunters-v3"] = true, + ["TheRockFinal"] = true, + ["TheRockJungle"] = true, + ["Titan-v2"] = true, + ["TitanDuel 2"] = true, + ["Tombstone Desert V2"] = true, + ["Torn Islands Remake"] = true, + ["Tumult"] = true, + ["Tundra"] = true, + ["Twilight_Canyon-v01"] = true, + ["unified_battlefield_v1"] = true, + ["Valles_Marineris_v2"] = true, + ["Verdant v4"] = true, + ["Azure Rampart"] = true, + ["Kolmogorov"] = true, + ["Nuclear_Winter_v1"] = true, + ["Mercury_v1"] = true, + ["Tuckedup_16x12_003"] = true, + ["Dune"] = true, + ["Tempest Dry"] = true, + ["Throne v1"] = true, + ["HighGroundsDeltaV1"] = true, + ["Vein"] = true, + ["Coastlines_Dry_V1"] = true, + ["Mosh_Pit_v2"] = true, + ["Rapids_v1"] = true, + ["BananaValley"] = true, + ["Zion_v1"] = true, + ["Zeta_Siege_V3"] = true, + ["Trojan_Hills_v02"] = true, + ["Ganymede v1"] = true, + ["Valiant_Saltscape"] = true, + ["DesertCliffsV1"] = true, + ["ShevaV2"] = true, + ["Small Volcano"] = true, + ["TalenFortB1"] = true, + ["Xenolithic_v1"] = true, + ["Desert_Plateaus"] = true, + ["TheBeachBeta"] = true, + ["Lost_v2"] = true, + ["FataMorganaV2"] = true, + ["Bandit_Plains_v1"] = true, + ["Melange_v1"] = true, + ["Vittra_v1"] = true, + ["Craterv01"] = true, + ["Claymore_v2"] = true, + ["ThreeReefs16"] = true, + ["DownRiver_v1"] = true, + ["IslandTest"] = true, + ["Hide_and_Seek_v03"] = true, + ["Into Battle_v3"] = true, + ["Deadlock-v1"] = true, + ["EvoRTS-Deserted_Gully-v01"] = true, + ["FrozenFortress_v2"] = true, + ["Knockout_v2"] = true, + ["Mescaline_V2"] = true, + ["Grts_DesertValley_012"] = true, + ["Grts_Messa_008"] = true, + ["Blend Warland"] = true, + ["FolsomDamDeluxeV4"] = true, + ["Ravaged_v2"] = true, + ["Rage_v1"] = true, + ["Painted Desert Remake V2"] = true, + ["hotstepper"] = true, + ["Bryce_Arena_fixed_2"] = true, + ["Bryce_Canyon_fixed_2"] = true, + ["Real Europe V4"] = true, + ["EvoRTS-New_Iammas-v05"] = true, + ["Koom Gorge v1"] = true, + ["TandemCraters"] = true, + ["Heartbreaker v2"] = true, + ["wanderlust_V01"] = true, + ["LoreaGurpila"] = true, + ["DeltaSiegeDry Deluxe V3"] = true, + ["Gehenna Rising v2"] = true, + ["Mountain Pass V4"] = true, + ["Altored Divide Remake V3"] = true, + ["Vernal 3way 0.6.1"] = true, + ["IcySea-v2"] = true, + ["Hex Farm 4"] = true, + ["Grts_RiverMouth_004"] = true, + ["Industrial Revolution v1"] = true, + ["Sacrifice_v1"] = true, + ["Coastal"] = true, + ["AquariusCrossing"] = true, + ["SandCastles2"] = true, + ["Tabula_Flooded_v04"] = true, + ["Kappa_Basin_Flooded_ZK-v07"] = true, + ["IncultaV2wetV3"] = true, + ["Mini_DeltaSiegeDry_v04"] = true, + ["Talus-wet-v3"] = true, + ["SplinteredTropicsV3"] = true, + ["SplinteredTropicsDryV2"] = true, + ["BellicoseIslands_ZK-v01"] = true, + ["MiniFolsomDamDeluxeV4-V2"] = true, + ["Icy_Shell_v01"] = true, + ["Colorado_v1"] = true, + ["Tropical-v2"] = true, + ["Trefoil_v2"] = true, + ["Altair_Crossing_v3"] = true, + ["Emain Macha v3"] = true, + ["Tempest Siege v1"] = true, + ["LowTideV3"] = true, + ["Aquatic Divide Revised v02"] = true, + ["DunePatrol_wip_v03"] = true, + ["Dead Reef v7"] = true, + ["Lowland Crossing Revised v2"] = true, + ["Tricy_Run_v6.1"] = true, + ["The Cold Place Remake V3c"] = true, + ["Malibu Beach v1"] = true, + ["Pearl Springs v2"] = true, + ["Victoria Crater v2.1"] = true, + ["Hotlips_Redux_V2"] = true, + ["Intersection_v3"] = true, + ["cold_snap_v1"] = true, + ["Archers_Valley_v6"] = true, + ["trololo_v2"] = true, + ["Calamity_V1"] = true, + ["The river Nix 20"] = true, + ["Dual Icy Run v3"] = true, + ["Iceland_v1"] = true, + ["Harbinger 2"] = true, + ["SapphireShores_Dry_V2.1"] = true, + ["SapphireShores_V2.1"] = true, + ["SapphireShores_Duo_V2.1"] = true, + ["Aberdeen6v6_Fix"] = true, + ["Downs_of_Destruction_Fix"] = true, + ["Desertmountain17_Fix"] = true, + ["OnyxCauldron1.6"] = true, + ["Ravaged_v2-mini"] = true, + ["TinySkirmishRedux1.1"] = true, + ["Melt_V2"] = true, + ["Calayo2"] = true, + ["Arena v1"] = true, + ["Quicksilver 1.1"] = true, + ["Iced Coffee v4.3"] = true, + ["Stronghold_beta"] = true, + ["Absolution 2"] = true, + ["Green River Confluence v10"] = true, + ["Deserted Third v4"] = true, + ["Aum_1.1"] = true, + ["Tabula-v6.1"] = true, + ["Sima v1"] = true, + ["Voltic Plateau v2"] = true, + ["Sea of Dunes v1.0"] = true, + ["Cattle and Loveplay NO WORMS 1"] = true, + ["Living Lands v2.03"] = true, + ["Obsidian_1.3"] = true, + ["Sands of Time v1.0"] = true, + ["AstroTurf v2_3"] = true, + ["TMA-0 v1_1"] = true, + ["Coagulation Marsh 0.7"] = true, + ["Isle of Grief 0.2"] = true, + ["Violence_4.2"] = true, + ["La Isla Bonita v1"] = true, + ["Fairyland v1.0"] = true, + ["SiberianDivide 1.1"] = true, + ["Akilon Wastelands ZK v1"] = true, + ["Enclaves v1"] = true, + ["Lonely Oasis v1"] = true, + ["Adansonia v4"] = true, + ["Zed 2.2"] = true, + ["Desert Needle Small 3.2"] = true, + ["Painted Badlands 1.0"] = true, +} + diff --git a/LuaMenu/configs/gameConfig/tc/modoptions.lua b/LuaMenu/configs/gameConfig/tc/modoptions.lua new file mode 100644 index 000000000..04d075139 --- /dev/null +++ b/LuaMenu/configs/gameConfig/tc/modoptions.lua @@ -0,0 +1,426 @@ +local options={ + ---- GAME SETTINGS ---- + -- make keys alwas lower case and adjust the widgest/gadgets accordingly + { + key = 'a_startconds', + name = 'Start', + desc = 'Start condition settings.', + type = 'section', + }, + + { + key = "shuffle", + name = "Start Boxes", + desc = "Start box settings.", + type = "list", + section= 'a_startconds', + def = "auto", + items = { + { + key = "off", + name = "Fixed", + desc = "Startboxes have a fixed correspondence to teams.", + }, + { + key = "shuffle", + name = "Shuffle", + desc = "Shuffle among boxes that would be used.", + }, + { + key = "allshuffle", + name = "All Shuffle", + desc = "Shuffle all present boxes.", + }, + { + key = "auto", + name = "Autodetect", + desc = "Shuffle if FFA.", + }, + { + key = "disable", + name = "Start Anywhere", + desc = "Allow to place anywhere. Boxes are still drawn for reference but are not obligatory.", + }, + }, + }, + + ------------------------------------------------------------------------------- + { + key = 'b_resources', + name = 'Resources', + desc = 'Sets storage and amount of resources that players will start with', + type = 'section', + }, + { + key = 'startmetal', + scope = 'team', + name = 'Team Starting metal', + desc = 'Determines amount of metal and metal storage this team will start with', + type = 'number', + section= 'b_resources', + def = 1000, + min = 500, + max = 10000, + step = 1, -- quantization is aligned to the def value -- (step <= 0) means that there is no quantization + }, + { + key = 'startenergy', + name = 'Starting energy', + desc = 'Determines amount of energy and energy storage that each player will start with', + type = 'number', + section= 'b_resources', + def = 2000, + min = 500, + max = 10000, + step = 1, + }, + { + key = 'metalmult', + name = 'Metal Extraction Multiplier', + desc = 'Multiplies metal extraction rate. For use in large team games when there are fewer mexes per player.', + type = 'number', + section= 'b_resources', + def = 1, + min = 0.1, + max = 100, + step = 0.05, + }, + { + key = 'corpsetime', + name = 'Corpse stay time', + desc = 'A factor that determines how long corpses will stay on the battlefield for reclaiming or resurrection', + type = 'number', + section= "b_resources", + def = 4, + min = 0, + max = 20, + step = 1, + }, + + ---- AI OPTIONS ---- + { + key = 'e_aioptions', + name = 'AI Options', + desc = 'Additional AI Options', + type = 'section', + }, + { + key="cheatingai", + name="Should the AI cheat?", + desc="A cheating AI starts in skirmishes with some defense buildings, base shields and an energy and metal producing central building.", + type = "bool", + def = false, + section= "e_aioptions", + }, + { + key="killstragglers", + name="Kill AI stragglers?", + desc="All (non survival mode) AI units will be killed after the AI's base was destroyed.", + type = "bool", + def = true, + section= "e_aioptions", + }, + { + key = "critters", + name = "Spawn critters", + desc = "This will enable spawning neutral critters on maps", + type = "bool", + def = true, + section= "e_aioptions", + }, + + ---- CHICKEN/SURVIAL MODE STUFF ---- + --[[{ + key = 'd_chicken', + name = 'Survival Mode', + desc = 'Settings for Survival: Custom', + type = 'section', + }, + { + key = 'chickenspawnrate', + name = 'Undead Spawn Rate', + desc = 'Sets the frequency of undead waves in seconds.', + type = 'number', + section= 'd_chicken', + def = 50, + min = 20, + max = 200, + step = 1, + }, + { + key = 'burrowspawnrate', + name = 'Burrow Spawn Rate', + desc = 'Sets the frequency of burrow spawns in seconds (modified by playercount and number of existing burrows).', + type = 'number', + section= 'd_chicken', + def = 45, + min = 20, + max = 200, + step = 1, + }, + { + key = 'queentime', + name = 'Boss Time', + desc = 'How soon the boss appears, minutes.', + type = 'number', + section= 'd_chicken', + def = 60, + min = 1, + max = 200, + step = 1, + }, + { + key = 'graceperiod', + name = 'Grace Period', + desc = 'Delay before the first wave appears, minutes.', + type = 'number', + section= 'd_chicken', + def = 2.5, + min = 0, + max = 120, + step = 0.5, + }, + { + key = 'miniqueentime', + name = 'Dragon Time', + desc = 'Time when the Bone Dragons appear, as a proportion of boss time. 0 disables.', + type = 'number', + section= 'd_chicken', + def = 0.6, + min = 0, + max = 1, + step = 0.05, + }, + { + key = 'techtimemult', + name = 'Tech Time Mult', + desc = 'Multiplier for the appearance times of advanced chickens.', + type = 'number', + section= 'd_chicken', + def = 1, + min = 0, + max = 5, + step = 0.05, + }, + { + key = 'burrowtechtime', + name = 'Burrow Tech Time', + desc = 'How much time each burrow shaves off chicken appearance times per wave (divided by playercount), seconds', + type = 'number', + section= 'chicken', + def = 12, + min = 0, + max = 60, + step = 1, + }, + { + key = 'burrowqueentime', + name = 'Burrow Boss Time', + desc = 'How much time each burrow death subtracts from boss appearance time (divided by playercount), seconds', + type = 'number', + section= 'chicken', + def = 100, + min = 0, + max = 1200, + step = 1, + }, ]]-- +-- Control Victory Options + { + key = 'controlvictoryoptions', + name = 'Control Victory', + desc = 'Allows you to control at a granular level the individual options for Control Point Victory', + type = 'section', + }, + { + key="scoremode", + name="Scoring Mode (Control Victory Points)", + desc="Defines how the game is played", + type="list", + def="disabled", + section="controlvictoryoptions", + items={ + {key="disabled", name="Disabled", desc="Disable Control Points as a victory condition."}, + {key="countdown", name="Countdown", desc="A Control Point decreases all opponents' scores, zero means defeat."}, + {key="tugofwar", name="Tug of War", desc="A Control Point steals enemy score, zero means defeat."}, + {key="domination", name="Domination", desc="Holding all Control Points will grant 1000 score, first to reach the score limit wins."}, + } + }, + { + key = 'limitscore', + name = 'Total Score', + desc = 'Total score amount available.', + type = 'number', + section= 'controlvictoryoptions', + def = 3000, + min = 500, + max = 5000, + step = 1, -- quantization is aligned to the def value + -- (step <= 0) means that there is no quantization + }, + { + key = "numberofcontrolpoints", + name = "Set number of Control Points on map", + desc = "Sets the number of control points on the map and scales the total score amount to match. Has no effect if Preset map configs are enabled.", + section= "controlvictoryoptions", + type="list", + def="7", + section= "controlvictoryoptions", + items={ + {key="1", name="1", desc="King of the Hill Mode"}, + {key="7", name="7", desc="Capture 7 points"}, + {key="13", name="13", desc="Capture 13 points"}, + {key="19", name="19", desc="Capture 19 points"}, + {key="25", name="25", desc="Capture 25 points"}, + } + }, +--[[ { + key = "usemapconfig", + name = "Use preset map-specific Control Point locations?", + desc = "Should the control point config for this map be used instead of autogenerated control points?", + type="list", + def="disabled", + section= "controlvictoryoptions", + items={ + {key="disabled", name="Disabled", desc="This will tell the game to use autogenerated control points."}, + {key="enabled", name="Enabled", desc="This will tell the game to use preset map control points (Set via map config)."}, + } + }, ]] + { + key = "startbase", + name = "Start with bases", + desc = "Players start with a small base.", + type = "bool", + def = true, + section = 'controlvictoryoptions', + }, + + { + key = 'captureradius', + name = 'Capture Radius', + desc = 'Radius around a point in which to capture it.', + type = 'number', + section= 'controlvictoryoptions', + def = 300, + min = 250, + max = 1000, + step = 25, -- quantization is aligned to the def value + -- (step <= 0) means that there is no quantization + }, + { + key = 'capturetime', + name = 'Capture Time', + desc = 'Time to capture a point.', + type = 'number', + section= 'controlvictoryoptions', + def = 30, + min = 1, + max = 60, + step = 1, -- quantization is aligned to the def value + -- (step <= 0) means that there is no quantization + }, + { + key = 'capturebonus', + name = 'Capture Bonus', + desc = 'Percentage of how much faster capture takes place by adding more units.', + type = 'number', + section= 'controlvictoryoptions', + def = 5, + min = 1, + max = 100, + step = 1, -- quantization is aligned to the def value + -- (step <= 0) means that there is no quantization + }, + { + key = 'decapspeed', + name = 'De-Cap Speed', + desc = 'Speed multiplier for neutralizing an enemy point.', + type = 'number', + section= 'controlvictoryoptions', + def = 2, + min = 1, + max = 3, + step = 1, -- quantization is aligned to the def value + -- (step <= 0) means that there is no quantization + }, + { + key = 'starttime', + name = 'Start Time', + desc = 'The time when capturing can start.', + type = 'number', + section= 'controlvictoryoptions', + def = 0, + min = 0, + max = 300, + step = 1, -- quantization is aligned to the def value + -- (step <= 0) means that there is no quantization + }, + { + key = 'metalperpoint', + name = 'Metal given per captured point', + desc = 'Each player on an allyteam that has captured a point will receive this amount of resources per point captured per second', + type = 'number', + section= 'controlvictoryoptions', + def = 0, + min = 0, + max = 20, + step = 0.1, -- quantization is aligned to the def value + -- (step <= 0) means that there is no quantization + }, + { + key = 'energyperpoint', + name = 'Energy given per captured point', + desc = 'Each player on an allyteam that has captured a point will receive this amount of resources per point captured per second', + type = 'number', + section= 'controlvictoryoptions', + def = 0, + min = 0, + max = 20, + step = 0.1, -- quantization is aligned to the def value + -- (step <= 0) means that there is no quantization + }, + { + key = 'dominationscoretime', + name = 'Domination Score Time', + desc = 'Time needed holding all points to score in multi domination.', + type = 'number', + section= 'controlvictoryoptions', + def = 30, + min = 1, + max = 60, + step = 1, -- quantization is aligned to the def value + -- (step <= 0) means that there is no quantization + }, + { + key = 'tugofwarmodifier', + name = 'Tug of War Modifier', + desc = 'The amount of score transfered between opponents when points are captured is multiplied by this amount.', + type = 'number', + section= 'controlvictoryoptions', + def = 2, + min = 0, + max = 6, + step = 1, -- quantization is aligned to the def value + -- (step <= 0) means that there is no quantization + }, + { + key = 'dominationscore', + name = 'Score awarded for Domination', + desc = 'The amount of score awarded when you have scored a domination.', + type = 'number', + section= 'controlvictoryoptions', + def = 1000, + min = 500, + max = 1000, + step = 1, -- quantization is aligned to the def value + -- (step <= 0) means that there is no quantization + }, +-- End Control Victory Options +} + +--// add key-name to the description (so you can easier manage modoptions in springie) +for i=1,#options do + local opt = options[i] + opt.desc = opt.desc .. '\nkey: ' .. opt.key +end + +return options \ No newline at end of file diff --git a/LuaMenu/configs/gameConfig/tc/rankfunction.lua b/LuaMenu/configs/gameConfig/tc/rankfunction.lua new file mode 100644 index 000000000..9f7460b65 --- /dev/null +++ b/LuaMenu/configs/gameConfig/tc/rankfunction.lua @@ -0,0 +1,51 @@ +local RANK_DIR = LUA_DIRNAME .. "configs/gameConfig/zk/rankImages/" +local LARGE_RANK_DIR = LUA_DIRNAME .. "configs/gameConfig/zk/rankImagesLarge/" +local IMAGE_DIR = LUA_DIRNAME .. "images/" + +local IMAGE_AUTOHOST = IMAGE_DIR .. "ranks/robot.png" +local IMAGE_PLAYER = IMAGE_DIR .. "ranks/player.png" + +local rankUnlocks = {5, 10, 20, 35, 50, 75, 100} +local rankCount = #rankUnlocks + +local function GetImageFunction(icon, level, skill, isBot, isModerator) + if icon then + return RANK_DIR .. icon .. ".png" + end + if isBot then + return IMAGE_AUTOHOST + elseif level and skill then + local levelBracket = 1 + while levelBracket <= rankCount and rankUnlocks[levelBracket] <= level do + levelBracket = levelBracket + 1 + end + levelBracket = levelBracket - 1 + + local skillBracket = math.max(0, math.min(7, math.floor((skill-1000)/200))) + + return RANK_DIR .. levelBracket .. "_" .. skillBracket .. ".png" + end + return IMAGE_PLAYER +end + +local function GetLargeImageFunction(icon, level, skill, isBot, isModerator) + if icon then + return LARGE_RANK_DIR .. icon .. ".png" + end + if isBot then + return IMAGE_AUTOHOST + elseif level and skill then + local levelBracket = 1 + while levelBracket <= rankCount and rankUnlocks[levelBracket] <= level do + levelBracket = levelBracket + 1 + end + levelBracket = levelBracket - 1 + + local skillBracket = math.max(0, math.min(7, math.floor((skill-1000)/200))) + + return LARGE_RANK_DIR .. levelBracket .. "_" .. skillBracket .. ".png" + end + return IMAGE_PLAYER +end + +return GetImageFunction, GetLargeImageFunction diff --git a/LuaMenu/configs/gameConfig/tc/settingsmenu.lua b/LuaMenu/configs/gameConfig/tc/settingsmenu.lua new file mode 100644 index 000000000..00900a119 --- /dev/null +++ b/LuaMenu/configs/gameConfig/tc/settingsmenu.lua @@ -0,0 +1,981 @@ +local invertZoomMult = -1 + +local TRUE = "true" +local FALSE = "false" + +local lupsFileTarget = "lups.cfg" + +local function UpdateLups() + local settings = WG.Chobby and WG.Chobby.Configuration and WG.Chobby.Configuration.settingsMenuValues + if not settings then + return + end + + local lupsFileName = settings.ShaderDetail_file or "LuaMenu/configs/gameConfig/zk/lups/lups3.cfg" + local lupsAirJetDisabled = ((settings.LupsAirJet == "On") and FALSE) or TRUE + local lupsRibbonDisabled = ((settings.LupsRibbon == "On") and FALSE) or TRUE + local lupsShieldSphereColorDisabled = ((settings.LupsShieldSphereColor == "On") and FALSE) or TRUE + + local sourceFile = VFS.LoadFile(lupsFileName) + + sourceFile = sourceFile:gsub("__AIR_JET__", lupsAirJetDisabled) + sourceFile = sourceFile:gsub("__RIBBON__", lupsRibbonDisabled) + sourceFile = sourceFile:gsub("__SHIELD_SPHERE_COLOR__", lupsShieldSphereColorDisabled) + + local settingsFile = io.open(lupsFileTarget, "w") + settingsFile:write(sourceFile) + settingsFile:close() +end + +local function GetUiScaleParameters() + local realWidth, realHeight = Spring.Orig.GetViewSizes() + local defaultUiScale = math.floor(math.max(1, realHeight/950))*100 + local maxUiScale = math.max(2, realWidth/1000)*100 + local minUiScale = math.min(0.5, realWidth/4000)*100 + return defaultUiScale, maxUiScale, minUiScale +end + +local defaultUiScale, maxUiScale, minUiScale = GetUiScaleParameters() + +local settingsConfig = { + { + name = "Graphics", + presets = { + { + name = "Compat.", + settings = { + WaterType = "Basic", + WaterQuality = "Low", + DeferredRendering = "Off", + UnitReflections = "Off", + Shadows = "None", + ShadowDetail = "Low", + ParticleLimit = "2000", + TerrainDetail = "Minimal", + VegetationDetail = "Minimal", + FeatureFade = "On", + CompatibilityMode = "On", + AtiIntelCompatibility_2 = "Automatic", + AntiAliasing = "Off", + ShaderDetail = "Minimal", + LupsAirJet = "Off", + LupsRibbon = "Off", + LupsShieldSphereColor = "Off", + FancySky = "Off", + } + }, + { + name = "Lowest", + settings = { + WaterType = "Reflective", + WaterQuality = "Low", + DeferredRendering = "Off", + UnitReflections = "Low", + Shadows = "Units Only", + ShadowDetail = "Low", + ParticleLimit = "6000", + TerrainDetail = "Low", + VegetationDetail = "Low", + FeatureFade = "Off", + CompatibilityMode = "Off", + AtiIntelCompatibility_2 = "Automatic", + AntiAliasing = "Low", + ShaderDetail = "Low", + LupsAirJet = "Off", + LupsRibbon = "Off", + LupsShieldSphereColor = "Off", + FancySky = "Off", + } + }, + { + name = "Low", + settings = { + WaterType = "Bumpmapped", + WaterQuality = "Low", + DeferredRendering = "Off", + UnitReflections = "Low", + Shadows = "Units and Terrain", + ShadowDetail = "Medium", + ParticleLimit = "12000", + TerrainDetail = "Low", + VegetationDetail = "Low", + FeatureFade = "Off", + CompatibilityMode = "Off", + AtiIntelCompatibility_2 = "Automatic", + AntiAliasing = "Low", + ShaderDetail = "Low", + LupsAirJet = "Off", + LupsRibbon = "On", + LupsShieldSphereColor = "On", + FancySky = "Off", + } + }, + { + name = "Medium", + settings = { + WaterType = "Bumpmapped", + WaterQuality = "Medium", + DeferredRendering = "On", + UnitReflections = "Medium", + Shadows = "Units and Terrain", + ShadowDetail = "High", + ParticleLimit = "15000", + TerrainDetail = "Medium", + VegetationDetail = "Medium", + FeatureFade = "Off", + CompatibilityMode = "Off", + AtiIntelCompatibility_2 = "Automatic", + AntiAliasing = "Low", + ShaderDetail = "Medium", + LupsAirJet = "On", + LupsRibbon = "On", + LupsShieldSphereColor = "On", + FancySky = "Off", + } + }, + { + name = "High", + settings = { + WaterType = "Bumpmapped", + WaterQuality = "High", + DeferredRendering = "On", + UnitReflections = "Medium", + Shadows = "Units and Terrain", + ShadowDetail = "Ultra", + ParticleLimit = "25000", + TerrainDetail = "High", + VegetationDetail = "High", + FeatureFade = "Off", + CompatibilityMode = "Off", + AtiIntelCompatibility_2 = "Automatic", + AntiAliasing = "High", + ShaderDetail = "High", + LupsAirJet = "On", + LupsRibbon = "On", + LupsShieldSphereColor = "On", + FancySky = "Off", + } + }, + { + name = "Ultra", + settings = { + WaterType = "Bumpmapped", + WaterQuality = "Ultra", + DeferredRendering = "On", + UnitReflections = "Ultra", + Shadows = "Units and Terrain", + ShadowDetail = "Ultra", + ParticleLimit = "50000", + TerrainDetail = "Ultra", + VegetationDetail = "Ultra", + FeatureFade = "Off", + CompatibilityMode = "Off", + AtiIntelCompatibility_2 = "Automatic", + AntiAliasing = "High", + ShaderDetail = "Ultra", + LupsAirJet = "On", + LupsRibbon = "On", + LupsShieldSphereColor = "On", + FancySky = "On", + } + }, + }, + + settings = { + { + name = "DisplayMode", + humanName = "Ingame Display Mode", + displayModeToggle = true, + }, + { + name = "LobbyDisplayMode", + humanName = "Menu Display Mode", + lobbyDisplayModeToggle = true, + }, + { + name = "WaterType", + humanName = "Water Type", + options = { + { + name = "Basic", + apply = { + Water = 0, + } + }, + { + name = "Reflective", + apply = { + Water = 1, + } + }, + { + name = "Refractive", + apply = { + Water = 2, + } + }, + { + name = "Dynamic", + apply = { + Water = 3, + } + }, + { + name = "Bumpmapped", + apply = { + Water = 4, + } + }, + }, + }, + { + name = "WaterQuality", + humanName = "Water Quality", + options = { + { + name = "Low", + apply = { + BumpWaterAnisotropy = 0, + BumpWaterBlurReflection = 0, + BumpWaterReflection = 0, + BumpWaterRefraction = 0, + BumpWaterDepthBits = 16, + BumpWaterShoreWaves = 0, + BumpWaterTexSizeReflection = 64, + } + }, + { + name = "Medium", + apply = { + BumpWaterAnisotropy = 0, + BumpWaterBlurReflection = 1, + BumpWaterReflection = 1, + BumpWaterRefraction = 1, + BumpWaterDepthBits = 24, + BumpWaterShoreWaves = 1, + BumpWaterTexSizeReflection = 128, + } + }, + { + name = "High", + apply = { + BumpWaterAnisotropy = 2, + BumpWaterBlurReflection = 1, + BumpWaterReflection = 2, + BumpWaterRefraction = 1, + BumpWaterDepthBits = 32, + BumpWaterShoreWaves = 1, + BumpWaterTexSizeReflection = 256, + } + }, + { + name = "Ultra", + apply = { + BumpWaterAnisotropy = 2, + BumpWaterBlurReflection = 1, + BumpWaterReflection = 2, + BumpWaterRefraction = 2, + BumpWaterDepthBits = 32, + BumpWaterShoreWaves = 1, + BumpWaterTexSizeReflection = 1024, + } + }, + }, + }, + { + name = "DeferredRendering", + humanName = "Deferred Rendering", + options = { + { + name = "On", + apply = { + AllowDeferredModelRendering = 1, + AllowDeferredMapRendering = 1, + } + }, + { + name = "Off", + apply = { + AllowDeferredModelRendering = 0, + AllowDeferredMapRendering = 0, + } + }, + }, + }, + { + name = "UnitReflections", + humanName = "Unit Reflection Quality", + options = { + { + name="Off", + apply = { + CubeTexSizeReflection = 1, + CubeTexSizeSpecular = 1, + } + }, + { + name="Low", + apply = { + CubeTexSizeReflection = 64, + CubeTexSizeSpecular = 64, + } + }, + { + name="Medium", + apply = { + CubeTexSizeReflection = 128, + CubeTexSizeSpecular = 128, + } + }, + { + name="High", + apply = { + CubeTexSizeReflection = 256, + CubeTexSizeSpecular = 256, + } + }, + { + name="Ultra", + apply = { + CubeTexSizeReflection = 1024, + CubeTexSizeSpecular = 1024, + } + }, + }, + }, + { + name = "Shadows", + humanName = "Shadows", + options = { + { + name = "None", + apply = { + Shadows = 0 + } + }, + { + name = "Units Only", + apply = { + Shadows = 2 + } + }, + { + name = "Units and Terrain", + apply = { + Shadows = 1 + } + }, + }, + }, + { + name = "ShadowDetail", + humanName = "Shadow Detail", + options = { + { + name = "Low", + apply = { + ShadowMapSize = 1024 + } + }, + { + name = "Medium", + apply = { + ShadowMapSize = 2048 + } + }, + { + name = "High", + apply = { + ShadowMapSize = 4096 + } + }, + { + name = "Ultra", + apply = { + ShadowMapSize = 8192 + } + }, + }, + }, + { + name = "ParticleLimit", + humanName = "Particle Limit", + options = { + { + name = "2000", + apply = { + MaxParticles = 2000 + } + }, + { + name = "4000", + apply = { + MaxParticles = 4000 + } + }, + { + name = "6000", + apply = { + MaxParticles = 6000 + } + }, + { + name = "9000", + apply = { + MaxParticles = 9000 + } + }, + { + name = "12000", + apply = { + MaxParticles = 12000 + } + }, + { + name = "15000", + apply = { + MaxParticles = 15000 + } + }, + { + name = "20000", + apply = { + MaxParticles = 15000 + } + }, + { + name = "25000", + apply = { + MaxParticles = 25000 + } + }, + { + name = "35000", + apply = { + MaxParticles = 25000 + } + }, + { + name = "50000", + apply = { + MaxParticles = 50000 + } + }, + }, + }, + { + name = "ShaderDetail", + humanName = "Shader Detail", + fileTarget = lupsFileTarget, + applyFunction = UpdateLups, + options = { + { + name = "Minimal", + file = "LuaMenu/configs/gameConfig/zk/lups/lups0.cfg" + }, + { + name = "Low", + file = "LuaMenu/configs/gameConfig/zk/lups/lups1.cfg" + }, + { + name = "Medium", + file = "LuaMenu/configs/gameConfig/zk/lups/lups2.cfg" + }, + { + name = "High", + file = "LuaMenu/configs/gameConfig/zk/lups/lups3.cfg" + }, + { + name = "Ultra", + file = "LuaMenu/configs/gameConfig/zk/lups/lups4.cfg" + }, + }, + }, + { + name = "LupsAirJet", + humanName = "Aircraft Jets", + options = { + { + name = "On", + applyFunction = UpdateLups, + }, + { + name = "Off", + applyFunction = UpdateLups, + }, + }, + }, + { + name = "LupsRibbon", + humanName = "Aircraft Wing Trails", + options = { + { + name = "On", + applyFunction = UpdateLups, + }, + { + name = "Off", + applyFunction = UpdateLups, + }, + }, + }, + { + name = "LupsShieldSphereColor", + humanName = "Shield Effect Shader", + options = { + { + name = "On", + applyFunction = UpdateLups, + }, + { + name = "Off", + applyFunction = UpdateLups, + }, + }, + }, + { + name = "TerrainDetail", + humanName = "Terrain Detail", + options = { + { + name = "Minimal", + apply = { + GroundScarAlphaFade = 1, + GroundDecals = 0, + GroundDetail = 50, + } + }, + { + name = "Low", + apply = { + GroundScarAlphaFade = 0, + GroundDecals = 1, + GroundDetail = 70, + } + }, + { + name = "Medium", + apply = { + GroundScarAlphaFade = 1, + GroundDecals = 2, + GroundDetail = 90, + } + }, + { + name = "High", + apply = { + GroundScarAlphaFade = 1, + GroundDecals = 5, + GroundDetail = 120, + } + }, + { + name = "Ultra", + apply = { + GroundScarAlphaFade = 1, + GroundDecals = 10, + GroundDetail = 180, + } + }, + }, + }, + { + name = "VegetationDetail", + humanName = "Vegetation Detail", + options = { + { + name = "Minimal", + apply = { + TreeRadius = 1000, + GrassDetail = 0, + } + }, + { + name = "Low", + apply = { + TreeRadius = 1000, + GrassDetail = 1, + } + }, + { + name = "Medium", + apply = { + TreeRadius = 1200, + GrassDetail = 4, + } + }, + { + name = "High", + apply = { + TreeRadius = 1500, + GrassDetail = 9, + } + }, + { + name = "Ultra", + apply = { + TreeRadius = 2500, + GrassDetail = 16, + } + }, + { + name = "Ridiculous", + apply = { + TreeRadius = 2500, + GrassDetail = 100, + } + }, + }, + }, + { + name = "FancySky", + humanName = "Fancy Sky", + options = { + { + name = "On", + apply = { + DynamicSky = 1, + AdvSky = 1, + } + }, + { + name = "Off", + apply = { + DynamicSky = 0, + AdvSky = 0, + } + }, + }, + }, + { + name = "FeatureFade", + humanName = "Rock and Wreck Fade", + options = { + { + name = "On", + apply = { + FeatureDrawDistance = 6000, + FeatureFadeDistance = 4500, + } + }, + { + name = "Off", + apply = { + FeatureDrawDistance = 600000, + FeatureFadeDistance = 600000, + } + }, + }, + }, + { + name = "CompatibilityMode", + humanName = "Compatibility Mode", + options = { + { + name = "On", + apply = { + LoadingMT = 0, + AdvUnitShading = 0, + AdvMapShading = 0, + LuaShaders = 0, + ForceDisableShaders = 1, + UsePBO = 0, + ["3DTrees"] = 0, + MaxDynamicMapLights = 0, + MaxDynamicModelLights = 0, + ROAM = 1, + } + }, + { + name = "Off", + apply = { + LoadingMT = 0, -- See https://github.com/spring/spring/commit/bdd6b641960759ccadf3e7201e37f2192d873791 + AdvUnitShading = 1, + AdvMapShading = 1, + LuaShaders = 1, + ForceDisableShaders = 0, + UsePBO = 1, + ["3DTrees"] = 1, + MaxDynamicMapLights = 1, + MaxDynamicModelLights = 1, + ROAM = 1, --Maybe ROAM = 0 when the new renderer is fully developed + } + }, + }, + }, + { + name = "AtiIntelCompatibility_2", + humanName = "ATI/Intel Compatibility", + options = { + { + name = "On", + applyFunction = function(_, conf) + conf:UpdateFixedSettings(conf.AtiIntelSettingsOverride) + Spring.Echo("Set ATI/intel/other non-nvidia compatibility state: Enabled") + return + end + }, + { + name = "Automatic", + applyFunction = function(_, conf) + if conf:GetIsNotRunningNvidia() then + conf:UpdateFixedSettings(conf.AtiIntelSettingsOverride) + Spring.Echo("Set ATI/intel/other non-nvidia compatibility state: Enabled") + return + end + Spring.Echo("Set ATI/intel/other non-nvidia compatibility state: Disabled") + return + end + }, + { + name = "Off", + applyFunction = function(_, conf) + conf:UpdateFixedSettings() + Spring.Echo("Set ATI/intel/other non-nvidia compatibility state: Enabled") + return + end + }, + }, + }, + { + name = "AntiAliasing", + humanName = "Anti Aliasing", + options = { + { + name = "Off", + apply = { + FSAALevel = 1, -- Required, see https://springrts.com/mantis/view.php?id=5625 + FSAA = 0, + SmoothLines = 0, + SmoothPoints = 0, + } + }, + { + name = "Low", + apply = { + FSAALevel = 4, + FSAA = 1, + SmoothLines = 1, + SmoothPoints = 1, + } + }, + { + name = "High", + apply = { + FSAALevel = 8, + FSAA = 1, + SmoothLines = 3, + SmoothPoints = 3, + } + }, + }, + }, + }, + }, + { + name = "Game", + presets = { + { + name = "Default", + settings = { + InterfaceScale = defaultUiScale, + --IconDistance = 151, + MouseZoomSpeed = 25, + InvertZoom = "Off", + TextToSpeech = "On", + MiddlePanSpeed = 15, + CameraPanSpeed = 50, + } + }, + }, + settings = { + --{ + -- name = "IconDistance", + -- humanName = "Icon Distance", + -- isNumberSetting = true, + -- applyName = "UnitIconDist", + -- minValue = 0, + -- maxValue = 10000, + -- springConversion = function(value) + -- return value + -- end, + --}, + { + name = "InterfaceScale", + humanName = "Game Interface Scale", + isNumberSetting = true, + minValue = minUiScale, + maxValue = maxUiScale, + isPercent = true, + applyFunction = function(value) + if Spring.GetGameName() ~= "" then + Spring.SendLuaUIMsg("SetInterfaceScale " .. value) + end + return { + interfaceScale = value, + } + end, + }, + { + name = "MouseZoomSpeed", + humanName = "Mouse Zoom Speed", + isNumberSetting = true, + applyName = "ScrollWheelSpeed", + minValue = 1, + maxValue = 500, + springConversion = function(value) + return value*invertZoomMult + end, + }, + { + name = "InvertZoom", + humanName = "Invert Zoom", + options = { + { + name = "On", + applyFunction = function() + invertZoomMult = 1 + local currentZoom = WG.Chobby.Configuration.settingsMenuValues["MouseZoomSpeed"] or 25 + return { + ScrollWheelSpeed = currentZoom, + } + end + }, + { + name = "Off", + applyFunction = function() + invertZoomMult = -1 + local currentZoom = WG.Chobby.Configuration.settingsMenuValues["MouseZoomSpeed"] or 25 + return { + ScrollWheelSpeed = currentZoom * -1, + } + end + }, + }, + }, + { + name = "TextToSpeech", + humanName = "Text To Speech", + options = { + { + name = "On", + applyFunction = function() + local Configuration = WG.Chobby.Configuration + Configuration:SetConfigValue("enableTextToSpeech", true) + return false + end + }, + { + name = "Off", + applyFunction = function() + local Configuration = WG.Chobby.Configuration + Configuration:SetConfigValue("enableTextToSpeech", false) + return false + end + }, + }, + }, + { + name = "MiddlePanSpeed", + humanName = "Middle Click Pan Speed", + isNumberSetting = true, + minValue = 0, + maxValue = 1000, + applyFunction = function(value) + local camPan = 50 + if WG.Chobby and WG.Chobby.Configuration and WG.Chobby.Configuration.game_settings then + camPan = WG.Chobby.Configuration.game_settings.OverheadScrollSpeed or camPan + end + value = value*(-1/200) + return { + MiddleClickScrollSpeed = value/camPan, + } + end, + }, + { + name = "CameraPanSpeed", + humanName = "Camera Pan Speed", + isNumberSetting = true, + minValue = 0, + maxValue = 1000, + applyFunction = function(value) + local middleScroll = 10 + if WG.Chobby and WG.Chobby.Configuration and WG.Chobby.Configuration.settingsMenuValues then + middleScroll = WG.Chobby.Configuration.settingsMenuValues.MiddlePanSpeed or middleScroll + end + middleScroll = middleScroll*(-1/200) + return { + MiddleClickScrollSpeed = middleScroll/value, + OverheadScrollSpeed = value, + } + end, + }, + }, + }, +} + +local settingsDefault = { + WaterType = "Bumpmapped", + WaterQuality = "High", + DeferredRendering = "On", + UnitReflections = "Medium", + Shadows = "Units and Terrain", + ShadowDetail = "Ultra", + ParticleLimit = "25000", + TerrainDetail = "High", + VegetationDetail = "High", + FeatureFade = "Off", + CompatibilityMode = "Off", + AtiIntelCompatibility_2 = "Automatic", + AntiAliasing = "High", + ShaderDetail = "High", + LupsAirJet = "On", + LupsRibbon = "On", + LupsShieldSphereColor = "On", + FancySky = "Off", + --IconDistance = 151, + InterfaceScale = defaultUiScale, + MouseZoomSpeed = 25, + InvertZoom = "Off", + TextToSpeech = "On", + MiddlePanSpeed = 15, + CameraPanSpeed = 50, +} + +local settingsNames = {} +for i = 1, #settingsConfig do + local subSettings = settingsConfig[i].settings + for j = 1, #subSettings do + local data = subSettings[j] + settingsNames[data.name] = data + if data.options then + data.optionNames = {} + for k = 1, #data.options do + data.optionNames[data.options[k].name] = data.options[k] + end + end + end +end + +local function DefaultPresetFunc() + if Platform then + local gpuMemorySize = Platform.gpuMemorySize + if gpuMemorySize then + if gpuMemorySize < 1024 then + -- Minimal + return settingsConfig[1].presets[1].settings + elseif gpuMemorySize < 2048 then + -- Low + return settingsConfig[1].presets[2].settings + elseif gpuMemorySize == 2048 then + -- Medium + return settingsConfig[1].presets[3].settings + end + end + -- High + return settingsConfig[1].presets[4].settings + end + return false +end + +return settingsConfig, settingsNames, settingsDefault, DefaultPresetFunc diff --git a/LuaMenu/configs/gameConfig/tc/singleplayermenu.lua b/LuaMenu/configs/gameConfig/tc/singleplayermenu.lua new file mode 100644 index 000000000..ff2ad4a74 --- /dev/null +++ b/LuaMenu/configs/gameConfig/tc/singleplayermenu.lua @@ -0,0 +1,7 @@ +return { + { + name = "skirmish", + control = WG.BattleRoomWindow.GetSingleplayerControl(VFS.Include(LUA_DIRNAME .. "configs/gameConfig/tc/singleplayerQuickSkirmish.lua")), + entryCheck = WG.BattleRoomWindow.SetSingleplayerGame, + }, +} diff --git a/LuaMenu/configs/gameConfig/tc/singleplayerquickskirmish.lua b/LuaMenu/configs/gameConfig/tc/singleplayerquickskirmish.lua new file mode 100644 index 000000000..6fc684bc7 --- /dev/null +++ b/LuaMenu/configs/gameConfig/tc/singleplayerquickskirmish.lua @@ -0,0 +1,114 @@ +local skirmishSetupData = { + pages = { + { + humanName = "Select Game Type", + name = "gameType", + options = { + "1v1", + "2v2", + "3v3", + "Survival", + "Suffer", +-- "KOTH", + }, + }, + { + humanName = "Select Map", + name = "map", + minimap = true, + options = { + "Barren 2", + "Onyx Cauldron 1.9", + "ArcticPlainsV2.1", + "Ravaged_v2", + "Badlands 2.1", + "Iceland_v1", + "Mescaline_V2", + "Wanderlust v03", + }, + }, + }, +} + +local aiNames = { + "Killer", + "Seeker", + "Undertaker", + "Purger", + "Alpha", + "Beta", + "Maneater", + "GammaRay", + "Omega", + "Snake", + "Your Mom", + "Evil666", + "Goliath", + "Vega", + "Blade", + "Bunny", + "Testament", + "Hellgate", + "Deadmoon", + "Deadmeat", + "Lil'Sister", + "STFU&Play", +} + +function skirmishSetupData.ApplyFunction(battleLobby, pageChoices) + local gameType = pageChoices.gameType or 1 + local map = pageChoices.map or 1 + + local Configuration = WG.Chobby.Configuration + local pageConfig = skirmishSetupData.pages + battleLobby:SelectMap(pageConfig[2].options[map]) + + battleLobby:SetBattleStatus({ + allyNumber = 0, + isSpectator = false, + }) + + -- Chickens + if gameType == 4 then + battleLobby:AddAi("Zombie Survival: Easy", "Zombie Survival: Easy", 1) + return + elseif gameType == 5 then + battleLobby:AddAi("Zombie Survival: Hard", "Zombie Survival: Hard", 1) + return + end + + -- KOTH +--[[ if gameType == 6 then + local currentModoptions = battleLobby:GetMyBattleModoptions() or {} + localModoptions = {} + for key,_ in pairs(currentModoptions) do + if modoptionDefaults[key] then + Spring.Echo(modoptionDefaults[key]) + if (modoptionDefaults[key] == "scoremode") then + localModoptions[key] = "countdown" + else + localModoptions[key] = modoptionDefaults[key] + end + end + end + battleLobby:SetModOptions(localModoptions) + end]] + + local aiName = "Skirmish AI" + + -- AI game + local aiNumber = 1 + local allies = gameType - 1 -- needs cahnge + for i = 1, allies do + battleLobby:AddAi(aiNames[math.random(#aiNames)] .. " (" .. aiNumber .. ")", aiName, 0, Configuration.gameConfig.aiVersion) + aiNumber = aiNumber + 1 + end + + local enemies = gameType -- needs cahnge + for i = 1, enemies do + battleLobby:AddAi(aiNames[math.random(#aiNames)] .. " (" .. aiNumber .. ")", aiName, 1, Configuration.gameConfig.aiVersion) + aiNumber = aiNumber + 1 + end +end + +return skirmishSetupData diff --git a/LuaMenu/configs/gameConfig/tc/skinning/JLM_HST-Galaxy.jpg b/LuaMenu/configs/gameConfig/tc/skinning/JLM_HST-Galaxy.jpg new file mode 100644 index 000000000..304584106 Binary files /dev/null and b/LuaMenu/configs/gameConfig/tc/skinning/JLM_HST-Galaxy.jpg differ diff --git a/LuaMenu/configs/gameConfig/tc/skinning/background.jpg b/LuaMenu/configs/gameConfig/tc/skinning/background.jpg new file mode 100644 index 000000000..05479741f Binary files /dev/null and b/LuaMenu/configs/gameConfig/tc/skinning/background.jpg differ diff --git a/LuaMenu/configs/gameConfig/tc/skinning/background_empty.jpg b/LuaMenu/configs/gameConfig/tc/skinning/background_empty.jpg new file mode 100644 index 000000000..cfaf71b11 Binary files /dev/null and b/LuaMenu/configs/gameConfig/tc/skinning/background_empty.jpg differ diff --git a/LuaMenu/configs/gameConfig/tc/skinning/headingCampaignLarge.png b/LuaMenu/configs/gameConfig/tc/skinning/headingCampaignLarge.png new file mode 100644 index 000000000..dbb6e291b Binary files /dev/null and b/LuaMenu/configs/gameConfig/tc/skinning/headingCampaignLarge.png differ diff --git a/LuaMenu/configs/gameConfig/tc/skinning/headingCampaignSmall.png b/LuaMenu/configs/gameConfig/tc/skinning/headingCampaignSmall.png new file mode 100644 index 000000000..74dae9062 Binary files /dev/null and b/LuaMenu/configs/gameConfig/tc/skinning/headingCampaignSmall.png differ diff --git a/LuaMenu/configs/gameConfig/tc/skinning/headingHelpLarge.png b/LuaMenu/configs/gameConfig/tc/skinning/headingHelpLarge.png new file mode 100644 index 000000000..33693e414 Binary files /dev/null and b/LuaMenu/configs/gameConfig/tc/skinning/headingHelpLarge.png differ diff --git a/LuaMenu/configs/gameConfig/tc/skinning/headingHelpSmall.png b/LuaMenu/configs/gameConfig/tc/skinning/headingHelpSmall.png new file mode 100644 index 000000000..8a2bbee93 Binary files /dev/null and b/LuaMenu/configs/gameConfig/tc/skinning/headingHelpSmall.png differ diff --git a/LuaMenu/configs/gameConfig/tc/skinning/headingMultiplayerLarge.png b/LuaMenu/configs/gameConfig/tc/skinning/headingMultiplayerLarge.png new file mode 100644 index 000000000..6af548f38 Binary files /dev/null and b/LuaMenu/configs/gameConfig/tc/skinning/headingMultiplayerLarge.png differ diff --git a/LuaMenu/configs/gameConfig/tc/skinning/headingMultiplayerSmall.png b/LuaMenu/configs/gameConfig/tc/skinning/headingMultiplayerSmall.png new file mode 100644 index 000000000..e6818f2c6 Binary files /dev/null and b/LuaMenu/configs/gameConfig/tc/skinning/headingMultiplayerSmall.png differ diff --git a/LuaMenu/configs/gameConfig/tc/skinning/headingSingleplayerLarge.png b/LuaMenu/configs/gameConfig/tc/skinning/headingSingleplayerLarge.png new file mode 100644 index 000000000..eb4f5b5f0 Binary files /dev/null and b/LuaMenu/configs/gameConfig/tc/skinning/headingSingleplayerLarge.png differ diff --git a/LuaMenu/configs/gameConfig/tc/skinning/headingSingleplayerSmall.png b/LuaMenu/configs/gameConfig/tc/skinning/headingSingleplayerSmall.png new file mode 100644 index 000000000..5da8f4dd5 Binary files /dev/null and b/LuaMenu/configs/gameConfig/tc/skinning/headingSingleplayerSmall.png differ diff --git a/LuaMenu/configs/gameConfig/tc/skinning/headinglarge.png b/LuaMenu/configs/gameConfig/tc/skinning/headinglarge.png new file mode 100644 index 000000000..a903eed6a Binary files /dev/null and b/LuaMenu/configs/gameConfig/tc/skinning/headinglarge.png differ diff --git a/LuaMenu/configs/gameConfig/tc/skinning/headingsmall.png b/LuaMenu/configs/gameConfig/tc/skinning/headingsmall.png new file mode 100644 index 000000000..3ff510810 Binary files /dev/null and b/LuaMenu/configs/gameConfig/tc/skinning/headingsmall.png differ diff --git a/LuaMenu/configs/gameConfig/tc/skinning/headingsmallv2.png b/LuaMenu/configs/gameConfig/tc/skinning/headingsmallv2.png new file mode 100644 index 000000000..54b7755fa Binary files /dev/null and b/LuaMenu/configs/gameConfig/tc/skinning/headingsmallv2.png differ diff --git a/LuaMenu/configs/gameConfig/tc/skinning/skinconfig.lua b/LuaMenu/configs/gameConfig/tc/skinning/skinconfig.lua new file mode 100644 index 000000000..87099fa06 --- /dev/null +++ b/LuaMenu/configs/gameConfig/tc/skinning/skinconfig.lua @@ -0,0 +1,5 @@ +local config = { + backgroundFocus = {0.25, 0.25}, +} + +return config \ No newline at end of file diff --git a/LuaMenu/configs/gameConfig/tc/skirmishdefault.lua b/LuaMenu/configs/gameConfig/tc/skirmishdefault.lua new file mode 100644 index 000000000..b2b4bfdc0 --- /dev/null +++ b/LuaMenu/configs/gameConfig/tc/skirmishdefault.lua @@ -0,0 +1,4 @@ +return { + map = "Barren 2", + enemyAI = "Skirmish AI", +} diff --git a/LuaMenu/configs/gameConfig/tc/startscripts/cpv_1.lua b/LuaMenu/configs/gameConfig/tc/startscripts/cpv_1.lua new file mode 100644 index 000000000..139f45b25 --- /dev/null +++ b/LuaMenu/configs/gameConfig/tc/startscripts/cpv_1.lua @@ -0,0 +1,105 @@ +return [[ + +[game] +{ +[ai0] +{ +[options] +{ +} +host=1; +isfromdemo=0; +name=Bones; +shortname=Skirmish AI; +team=0; +version=; +} +[allyteam0] +{ +numallies=0; +} +[allyteam1] +{ +numallies=0; +} +[mapoptions] +{ +} +[modoptions] +{ +capturebonus=5; +captureradius=500; +capturetime=30; +cheatingai=0; +corpsetime=4; +critters=1; +decapspeed=2; +disablemapdamage=0; +dominationscore=1000; +dominationscoretime=30; +energyperpoint=0; +ghostedbuildings=1; +killstragglers=1; +limitscore=3000; +maxspeed=3; +maxunits=1000; +metalmult=1; +metalperpoint=0; +minspeed=0.3; +numberofcontrolpoints=7; +relayhoststartpostype=3; +scoremode=countdown; +startbase=1; +startenergy=2000; +startmetal=1000; +starttime=0; +tugofwarmodifier=2; +} +[player1] +{ +countrycode=; +isfromdemo=0; +name=Player; +rank=0; +spectator=0; +team=1; +} +[restrict] +{ +} +[team0] +{ +allyteam=1; +handicap=0; +rgbcolor=0.976471 1 0; +side=cursed; +startposx=573; +startposz=1075; +teamleader=1; +} +[team1] +{ +allyteam=0; +handicap=0; +rgbcolor=0.717647 0.0156863 0.333333; +side=imperials; +startposx=1003; +startposz=6207; +teamleader=1; +} +gametype=The Cursed 1.436; +hostip=; +hostport=8452; +ishost=1; +maphash=1797381107; +mapname=Eye of Horus v13; +modhash=982650516; +myplayername=Player; +numplayers=1; +numrestrictions=0; +numusers=2; +startpostype=3; +} + + +]] \ No newline at end of file diff --git a/LuaMenu/configs/gameConfig/tc/startscripts/koth_1.lua b/LuaMenu/configs/gameConfig/tc/startscripts/koth_1.lua new file mode 100644 index 000000000..198d709b8 --- /dev/null +++ b/LuaMenu/configs/gameConfig/tc/startscripts/koth_1.lua @@ -0,0 +1,104 @@ +return [[ + +[game] +{ +[ai0] +{ +[options] +{ +} +host=1; +isfromdemo=0; +name=Delta_Legion; +shortname=Skirmish AI; +team=0; +version=; +} +[allyteam0] +{ +numallies=0; +} +[allyteam1] +{ +numallies=0; +} +[mapoptions] +{ +} +[modoptions] +{ +capturebonus=5; +captureradius=600; +capturetime=30; +cheatingai=0; +corpsetime=4; +critters=1; +decapspeed=2; +disablemapdamage=0; +dominationscore=1000; +dominationscoretime=30; +energyperpoint=0; +ghostedbuildings=1; +killstragglers=1; +limitscore=3000; +maxspeed=3; +maxunits=1000; +metalmult=1; +metalperpoint=0; +minspeed=0.3; +numberofcontrolpoints=1; +relayhoststartpostype=3; +scoremode=countdown; +startbase=1; +startenergy=2000; +startmetal=1000; +starttime=0; +tugofwarmodifier=2; +} +[player1] +{ +countrycode=; +isfromdemo=0; +name=Player; +rank=0; +spectator=0; +team=1; +} +[restrict] +{ +} +[team0] +{ +allyteam=1; +handicap=0; +rgbcolor=0 0 1; +side=imperials; +startposx=573; +startposz=1075; +teamleader=1; +} +[team1] +{ +allyteam=0; +handicap=0; +rgbcolor=0.294118 0.0196078 0.596078; +side=cursed; +startposx=5557; +startposz=6078; +teamleader=1; +} +gametype=The Cursed 1.436; +hostip=; +hostport=8452; +ishost=1; +maphash=1797381107; +mapname=Eye of Horus v13; +modhash=1219425953; +myplayername=Player; +numplayers=1; +numrestrictions=0; +numusers=2; +startpostype=3; +} + +]] \ No newline at end of file diff --git a/LuaMenu/configs/gameConfig/tc/taskbarlogo.png b/LuaMenu/configs/gameConfig/tc/taskbarlogo.png new file mode 100644 index 000000000..684bc1cd2 Binary files /dev/null and b/LuaMenu/configs/gameConfig/tc/taskbarlogo.png differ diff --git a/LuaMenu/widgets/chobby/components/battle/battle_list_window.lua b/LuaMenu/widgets/chobby/components/battle/battle_list_window.lua index e8641c443..569c6d41b 100644 --- a/LuaMenu/widgets/chobby/components/battle/battle_list_window.lua +++ b/LuaMenu/widgets/chobby/components/battle/battle_list_window.lua @@ -9,6 +9,7 @@ local IMG_UNREADY = LUA_DIRNAME .. "images/unready.png" function BattleListWindow:init(parent) self:super("init", parent, "Play or watch a game", true, nil, nil, nil, 34) +if not Configuration.gameConfig.disableBattleListHostButton then self.btnNewBattle = Button:New { x = 260, y = 7, @@ -24,6 +25,7 @@ function BattleListWindow:init(parent) end }, } +end local function SoftUpdate() self:UpdateFilters() @@ -588,6 +590,13 @@ end function BattleListWindow:ItemInFilter(id) local battle = lobby:GetBattle(id) + local filterString = Configuration.gameConfig.battleListOnlyShow + if filterString ~= nil then + local filterToGame = string.find(battle.gameName, filterString) + if filterToGame == nil then + return false + end + end if not lobby:GetBattleHasFriend(id) then if Configuration.battleFilterPassworded2 and battle.passworded then return false diff --git a/LuaMenu/widgets/chobby/components/interface_root.lua b/LuaMenu/widgets/chobby/components/interface_root.lua index 15872f759..ab7194cd2 100644 --- a/LuaMenu/widgets/chobby/components/interface_root.lua +++ b/LuaMenu/widgets/chobby/components/interface_root.lua @@ -420,13 +420,16 @@ function GetInterfaceRoot(optionsParent, mainWindowParent, fontFunction) end local rightPanelTabs = { - {name = "community", control = WG.CommunityWindow.GetControl()}, {name = "chat", control = chatWindows.window}, {name = "friends", control = WG.FriendWindow.GetControl()}, {name = "settings", control = WG.SettingsWindow.GetControl()}, {name = "downloads", control = WG.DownloadWindow.GetControl()}, } + if not WG.Chobby.Configuration.gameConfig.disableCommunityWindow then + table.insert(rightPanelTabs, 1, {name = "community", control = WG.CommunityWindow.GetControl()}) + end + local queueListWindow = WG.QueueListWindow.GetControl() local battleListWindow, battleListWindowJoinBattle = WG.BattleListWindowHolder.GetControl() local planetwarsListWindow = WG.PlanetwarsListWindow.GetControl() @@ -434,6 +437,19 @@ function GetInterfaceRoot(optionsParent, mainWindowParent, fontFunction) local SINGLEPLAYER_INDEX = 1 local MULTIPLAYER_INDEX = 2 local HELP_INDEX = 4 + + local multiPlayerTabs = { + {name = "battle_list", control = battleListWindow}, + } + + if not WG.Chobby.Configuration.gameConfig.disablePlanetwars then + table.insert(multiPlayerTabs, 2, {name = "planetwars", control = planetwarsListWindow}) + end + + if not WG.Chobby.Configuration.gameConfig.disableMatchMaking then + table.insert(multiPlayerTabs, 1, {name = "matchmaking", control = queueListWindow}) + end + local submenus = { { name = "singleplayer", @@ -444,11 +460,7 @@ function GetInterfaceRoot(optionsParent, mainWindowParent, fontFunction) { name = "multiplayer", entryCheck = WG.LoginWindowHandler.TryLoginMultiplayer, - tabs = { - {name = "matchmaking", control = queueListWindow}, - {name = "battle_list", control = battleListWindow}, - {name = "planetwars", control = planetwarsListWindow}, - }, + tabs = multiPlayerTabs, cleanupFunction = Configuration.leaveMultiplayerOnMainMenu and CleanMultiplayerState or nil }, { diff --git a/LuaMenu/widgets/gui_modoptions_panel.lua b/LuaMenu/widgets/gui_modoptions_panel.lua index e0f16b717..b0804f681 100644 --- a/LuaMenu/widgets/gui_modoptions_panel.lua +++ b/LuaMenu/widgets/gui_modoptions_panel.lua @@ -394,7 +394,7 @@ local function CreateModoptionWindow() end localModoptions = {} end - + buttonReset = Button:New { right = 294, width = 135, diff --git a/LuaMenu/widgets/gui_settings_window.lua b/LuaMenu/widgets/gui_settings_window.lua index 8ab5257ac..cb8eefba1 100644 --- a/LuaMenu/widgets/gui_settings_window.lua +++ b/LuaMenu/widgets/gui_settings_window.lua @@ -858,11 +858,17 @@ local function GetLobbyTabControls() } children[#children + 1] = autoLogin offset = offset + ITEM_OFFSET + + if not Configuration.gameConfig.disableSteam then + children[#children + 1], offset = AddCheckboxSetting(offset, i18n("login_with_steam"), "wantAuthenticateWithSteam", true) + children[#children + 1], offset = AddCheckboxSetting(offset, i18n("use_steam_browser"), "useSteamBrowser", true) + end + + if not Configuration.gameConfig.disablePlanetwars then + children[#children + 1], offset = AddCheckboxSetting(offset, i18n("planetwars_notifications"), "planetwarsNotifications", false) + end - children[#children + 1], offset = AddCheckboxSetting(offset, i18n("login_with_steam"), "wantAuthenticateWithSteam", true) - children[#children + 1], offset = AddCheckboxSetting(offset, i18n("use_steam_browser"), "useSteamBrowser", true) children[#children + 1], offset = AddCheckboxSetting(offset, "Multiplayer in new window", "multiplayerLaunchNewSpring", true) - children[#children + 1], offset = AddCheckboxSetting(offset, i18n("planetwars_notifications"), "planetwarsNotifications", false) children[#children + 1], offset = AddCheckboxSetting(offset, i18n("ingame_notifcations"), "ingameNotifcations", true) children[#children + 1], offset = AddCheckboxSetting(offset, i18n("non_friend_notifications"), "nonFriendNotifications", true) children[#children + 1], offset = AddCheckboxSetting(offset, i18n("notifyForAllChat"), "notifyForAllChat", false) diff --git a/LuaMenu/widgets/gui_steam_release_notifier.lua b/LuaMenu/widgets/gui_steam_release_notifier.lua index 27949d6fb..048479f0e 100644 --- a/LuaMenu/widgets/gui_steam_release_notifier.lua +++ b/LuaMenu/widgets/gui_steam_release_notifier.lua @@ -13,6 +13,7 @@ function widget:GetInfo() } end + -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- Initialization @@ -22,7 +23,8 @@ local releaseDate = {0, 15, 8, 27, 4, 2018} -- second, minute, hour, day, month, local function SteamCheckPopup() local Configuration = WG.Chobby.Configuration - if Configuration.canAuthenticateWithSteam or Configuration[doNotAskAgainKey] then + + if WG.Chobby.Configuration.gameConfig.disableSteam or Configuration.canAuthenticateWithSteam or Configuration[doNotAskAgainKey] then return end diff --git a/libs/liblobby/lobby/interface.lua b/libs/liblobby/lobby/interface.lua index ed4ec495f..70eb7df97 100644 --- a/libs/liblobby/lobby/interface.lua +++ b/libs/liblobby/lobby/interface.lua @@ -221,6 +221,16 @@ function Interface:SayBattleEx(message) return self end +function Interface:SetModOptions(data) + for k, v in pairs(data) do + if self.modoptions[k] ~= v then + self:SayBattle("!bSet " .. tostring(k) .. " " .. tostring(v)) + end + -- self:_SendCommand("SETSCRIPTTAGS game/modoptions/" .. k .. '=' .. v) + end + return self +end + function Interface:AddAi(aiName, aiLib, allyNumber, version) aiName = aiName:gsub(" ", "") local battleStatusString = tostring( @@ -1315,12 +1325,30 @@ end Interface.commands["SERVERMSGBOX"] = Interface._OnServerMSGBox Interface.commandPattern["SERVERMSGBOX"] = "([^\t]+)\t+([^\t]+)" -function Interface:_OnSetScriptTags(pairs) - pairs = explode(" ", pairs) - self:_CallListeners("OnSetScriptTags", pairs) +local mod_opts_pre = "game/modoptions/" +local mod_opts_pre_indx = #mod_opts_pre + 1 +local function string_starts(String, Start) + return string.sub(String, 1, string.len(Start)) == Start +end +function Interface:_OnSetScriptTags(tagsTxt) + local tags = explode("\t", tagsTxt) + if self.modoptions == nil then + self.modoptions = {} + end + for _, tag in pairs(tags) do + if string_starts(tag, mod_opts_pre) then + local kv = tag:sub(mod_opts_pre_indx) + local kvTable = explode("=", kv) + local k = kvTable[1] + local v = kvTable[2] + self.modoptions[k] = v + end + end + self:_OnSetModOptions(self.modoptions) end Interface.commands["SETSCRIPTTAGS"] = Interface._OnSetScriptTags -Interface.commandPattern["SETSCRIPTTAGS"] = "([^\t]+)" +Interface.commandPattern["SETSCRIPTTAGS"] = "(.*)" +-- Interface.commandPattern["SETSCRIPTTAGS"] = "([^\t]+)" function Interface:_OnSetTeamLeader(obj) local userName = obj.userName