Author Topic: Letting admins change the default minigame  (Read 1113 times)

I'm hoping there's some kind of setting for this? I just want to let people use the normal minigame dialog to change options. Having to code up my own solution to let admins change the spawn weapons for a gamemode would either be half-assed or a huge imposition when the functionality is already built-in.

bonus question A: What the hell is with paint FX and trust? It doesn't call getTrustLevel so how the heck am I supposed to let all admins and only admins change the FX of bricks in a specific brick group owned by nobody? Do I have to package for all the FX paint projectiles? ughhhhhh

bonus question B: my scripted brick creation isn't making a "click" noise, and it's critical that it does. What's the easiest way to get this accomplished?
« Last Edit: July 11, 2013, 11:46:43 PM by Mr. Wallet »

No, there is no support for this by default.

edit: I'm not sure what you're doing really, but you'd probably be able to just make it a Slayer minigame. (Slayer has support for this)
« Last Edit: July 12, 2013, 02:15:14 AM by Greek2me »

I don't think you can have the server tell the client what to change in the minigame gui :/

I don't want to change the gui, I want the default gui to work for connected admins. For example if MARBLE MAN is an admin on my dedi, he can connect, toggle if building is allowed, and that modifies the default minigame.
It's not that I can't picture packaging my own solution, more that setting modification seems like such basic and necessary functionality for this new-fangled minigame system that I find it hard to believe that even badspot the blind idiot god would not have a way to do it.

As it is I try to change the settings and it doesn't override any of the default settings I put in gamemode.txt.
Do I need to assert variables in server.cs because gamemode.txt is immutable, or what?
« Last Edit: July 13, 2013, 12:49:17 PM by Mr. Wallet »

I don't want to change the gui, I want the default gui to work for connected admins. For example if MARBLE MAN is an admin on my dedi, he can connect, toggle if building is allowed, and that modifies the default minigame.
It's not that I can't picture packaging my own solution, more that setting modification seems like such basic and necessary functionality for this new-fangled minigame system that I find it hard to believe that even badspot the blind idiot god would not have a way to do it.

As it is I try to change the settings and it doesn't override any of the default settings I put in gamemode.txt.
Do I need to assert variables in server.cs because gamemode.txt is immutable, or what?
It's like using /setminigamedata without the gui
the client isn't getting the gui updated, so when they open the gui for that minigame, it will be whatever the last settings are >.<

Your best bet is to do this: (for changing the variables in the minigame)

function servercmdToggleMiniBuilding(%c)
{
     if(%c.isAdmin && isObject(%m=%c.minigame))
     {
          %m.enableBuilding=!%m.enableBuilding;//or whatever the var is
          for(%i=0;%i<ClientGroup.getCount();%i++)
          {
               %o=ClientGroup.getObject(%i);
               if(%o.minigame == %m)
                    commandToClient(%o,'setBuildingDisabled',!%m.enableBuilding);
          }
     }
}


I'm not sure about the gamemode.txt though :/

Yeah I'm sure people would loving adore that.

"To change weapon 2 in the minigame, type /ChangeMiniWeapon2 [weaponUIname]
Now memorize another 20 commands like that."

I'm sure that there are client commands you can use to update the minigame GUI. You can then package serverCmdSetMinigameData to let them apply the changes.

Of course that occured to me right away, but I just couldn't imagine badspot moving over to this stupid convoluted gamemode system without this sort of thing built-in.
I mean, it's not like anyone ever had a deathmatch in blockland and then wanted to CHANGE THE SETTINGS, RIGHT. RIGHT BADSPOT?

ok fine so I'll probably just copy-paste from slayer, unless that stuff is client-sided, idk I never used slayer
hey greek where's the minigame editing stuff in slayer lol im lazyyyy
« Last Edit: July 14, 2013, 01:42:15 PM by Mr. Wallet »

Slayer uses a very different system than the default minigame. I would recommend using something else as a reference. (maybe TDM)

The game mode system really isn't that great.. There's no flexibility at all.