- Add UID blacklist to Add Random Maps from TMX window (thanks risyn).
- Add room map list export to json (thanks risyn).
- Update tags list & fix some minor bugs.
Downloads | 10,183 |
---|---|
Updated | 27 days ago |
Released | 2 years ago |
Created | 2 years ago |
Numeric ID | 312 |
Min. Openplanet | 1.26.23 |
Better Room Manager is an alternate management UI for Club rooms that works for Creators, Admins, and Content Creators¹.
It currently supports:
Launch it from the Plugins menu ("Better Room Manager")
[1]: Content Creators can only see active rooms. They can edit any active room and can create new rooms. They can also deactivate rooms, but this is behind a safety switch to avoid them locking themselves out of a room.
License: Public Domain
Authors: XertroV
Suggestions/feedback: @XertroV on Openplanet discord
Code/issues: https://github.com/XertroV/tm-better-room-manager
GL HF
void SetNextRoom() {
status = "Loading Map " + loadNextId + " / " + loadNextUid;
auto builder = BRM::CreateRoomBuilder(clubId, roomId)
.SetTimeLimit(1).SetChatTime(1).SetMaps({loadNextUid})
.SetMode(BRM::GameMode::TimeAttack);
auto resp = builder.SaveRoom();
status += "\nSaved Room maps + time limit... Waiting 5s";
log_trace('Room request returned: ' + Json::Write(resp));
sleep(5000);
int limit = -1;
builder.SetTimeLimit(limit);
status = "Adjusting room time limit to " + limit;
builder.SaveRoom();
status = "Room finalized, awaiting map change...";
AwaitMapUidLoad();
status = "Done";
currState = GameState::Running;
S_LastTmxID = loadNextId;
return;
}
IRoomSettingsBuilder@ CreateRoomBuilder(uint clubId, uint roomId)
Create an IRoomSettingsBuilder object for a given club and room
GameMode GameModeFromStr(const string &in modeStr)
Returns a BRM::GameMode
based on the script path, e.g., "TrackMania/TM_Cup_Online.Script.txt"
const string GameModeToFullModeString(GameMode m)
Returns a scirpt path, e.g., "TrackMania/TM_Cup_Online.Script.txt", for a given BRM::GameMode
ServerInfo@ GetCurrentServerInfo(CGameCtnApp@ app, bool waitForClubId = true)
Returns some basic info for the current server, including Club and Room IDs. Yields if waitForClubId=true otherwise might return null if club/room ID detection is still loading.
string GetModeSettingType(const string &in settingName)
Get the setting type (integer, bool, text) for a given setting, e.g., S_TimeLimit
const Json::Value@ GetMyClubs()
Returns a JSON Array of JSON Objects. The format is equivalent to under .clubList in the payload returned by https://webservices.openplanet.dev/live/clubs/clubs-mine There are some additional fields, like nameSafe, tagSafe, and isAdmin (dump the json object for everything)
Json::Value@ GetRoomInfoFromAPI(uint clubId, uint roomId)
Get a room info from the API. https://webservices.openplanet.dev/live/clubs/room-by-id
bool IsInAServer(CGameCtnApp@ app)
Returns true if the client is connected to a server
void JoinServer(uint clubId, uint roomId, const string &in password = "")
Join a server by getting the joinlink for a given club and room
Unknown
Cup
Knockout
Laps
Teams
TimeAttack
Rounds
RoyalTimeAttack
TMWTTeams
TMWTMatchmaking
TeamsMatchmaking
TimeAttackDaily
KnockoutDaily
COTDQualifications
CupClassic
ChampionSpring2022
MultiTeams
HeadToHead
Final42TMGL
XXX_LAST
IRoomSettingsBuilder@ AddMaps(const array<string> &in maps)
Add a map to the rooms map list
IRoomSettingsBuilder@ LoadCurrentSettingsAsync()
Populate based on current room settings. This function may yield.
Json::Value@ GetCurrentSettingsJson()
Get the current raw settings json object (which is mutable). Call LoadCurrentSettingsAsync first to load current settings.
IRoomSettingsBuilder@ GoToNextMapAndThenSetTimeLimit(const string &in mapUid, int limit = -1, int ct = 1)
This will yield! An easy 'go to next map' command for club rooms in TimeAttack mode. Duration is 5s + 2 http requests to nadeo.
string GetModeSetting(const string &in key)
Gets a game mode setting's current value. Throws if it does not exist.
bool HasModeSetting(const string &in key)
Whether a game mode setting exists (note: you probably want to call LoadCurrentSettingsAsync first)
Json::Value@ SaveRoom()
saves the room and returns the result; will yield internally
IRoomSettingsBuilder@ SaveRoomInCoro()
Save the room; returns immediately
IRoomSettingsBuilder@ SetChatTime(int ct)
Set the chat time (seconds)
IRoomSettingsBuilder@ SetLoadingScreenUrl(const string &in url)
Set the loading screen image URL
IRoomSettingsBuilder@ SetMaps(const array<string> &in maps)
Set the rooms map list
IRoomSettingsBuilder@ SetMode(GameMode mode, bool withDefaultSettings = false)
Set the room game mode
IRoomSettingsBuilder@ SetModeSetting(const string &in key, const string &in value)
Set a game mode setting (e.g., S_TimeLimit)
IRoomSettingsBuilder@ SetName(const string &in name)
Set the room name
IRoomSettingsBuilder@ SetPlayerLimit(uint limit)
Set the room player limit (1 - 100)
IRoomSettingsBuilder@ SetTimeLimit(int limit)
Set the time limit (seconds)
int clubId
string login
string name
int roomId