New Ruleset Changes
With this new build, there have been some big changes to how you configure rulesets for a hub. Hopefully this thread will answer what you need to know to get your hub back up and running.
- Rules.ini is no longer used at all.
- Rules are now defined in 1 or more JSON files stored in a new directory Saved/Config/Rulesets
- When the game/server starts up all of the .json files in that directory and read and used to build the list of rules available.
- Epic default rules are still auto-added, however you can use a JSON file to hide them (I’ll give an example in a second)
- There is a new console command ExportGameRulesets <filename> that will create a json file in your saved folder with all of the current rule sets.
SampleRuleset.json:
Code:
{ "rules": [ { "uniqueTag": "TestRulet", "categories": [ "Featured" ], "title": "Just a Test Rule", "tooltip": "Oi, go on and get!", "description": "Really tho... Get.\n\n<UT.Hub.RulesText_Small>TimeLimit : %TimeLimit% minutes</>\n<UT.Hub.RulesText_Small>Maximum players : %MaxPlayers%</>", "mapPrefixes": [], "maxMapsInList": 16, "defaultMap": "/Game/RestrictedAssets/Maps/WIP/FR-Fort", "customMapList": [ "/Game/RestrictedAssets/Maps/WIP/FR-Fort", "/Game/RestrictedAssets/Maps/WIP/FR-Meltdown" ], "maxPlayers": 8, "displayTexture": "Texture2D'/Game/RestrictedAssets/UI/GameModeBadges/GB_Custom.GB_Custom'", "gameMode": "/Script/UnrealTournament.UTFlagRunGame", "gameOptions": "?Botfill=10", "requiredPackages": [], "bTeamGame": true, "bCompetitiveMatch": false, "optionFlags": 65535, "bHideFromUI": false } ] }
UniqueTag should be free of alphanumeric characters only without spaces or underscores.
mapPrefixes can be used to auto-scan all files with a given prefix into the map list.
requirePackages is the same as the ini version only is json format.
optionFlags shouldn’t be used.
bHideFromUI can be used to make rules that are for different purposes. You can use this feature to hide Epic default rules.
On that note, an example of hiding a Epic rule:
HideDuel.json
Code:
{ "rules": [ { "uniqueTag": "DUEL", "bHideFromUI": true } ] }
Comment