Jump to content

Insane Limits: BF4 Gunmaster Random Presets


ImportBot

Recommended Posts

Originally Posted by LCARSx64*:

 

This limit will randomly select and set a different Gunmaster presets after each round whilst ensuring that the next preset is not the same as the previous one.

 

Updated to support Zavod: Graveyard Shift and Night weapons preset.

 

Options:

  • The value highlighted in red is the delay in seconds before selecting and setting a new weapons preset, if this is set to 0 then there will be no delay. (Useful for mixed mode servers and servers running xVoteMap and/or UMM, a good value would be 40 seconds).
  • If you added vars.gunMasterWeaponsPreset to your startup.txt, change the value highlighted in green to the same value as your startup.txt, otherwise leave this set to 0.
  • If the value highlighted in blue is set to true, then the next weapons preset will always be the new Night preset if the next gun master map is Zavod Graveyard Shift, regardless of which presets are or are not allowed. If set to false, then the preset will be randomly selected from the allowed presets.
  • The values highlighted in orange control which presets can be selected. If set to true, then the preset will be available for random selection. If set to false, then the preset will be unavailable.
  • The values highlighted in purple are for sending an in-game yell message and/or chat message displaying the next weapons preset. If set to true, then the message/yell will be displayed. If set to false the message/yell will not be displayed.
  • The value highlighted in turquoise controls logging to Procon. If set to true, then logging will occur. If set to false, then logging will not occur.

BF4 Gunmaster Random Presets

 

Create a new limit to evaluate OnRoundOver. Set action to None.

 

Set first_check to this Code:

Code:

// BF4 Gunmaster Random Presets - Limit 1 of 1
// v3.0 - OnRoundOver - first_check
//

Thread gmrnd = new Thread(
    new ThreadStart(
        delegate
        {
            try
            {
                // USER SETTINGS
                //
                int iDelay = [b]0[/b];
                int lastPreset = [b]0[/b];
                bool ensureNight = [b]true[/b];
                bool allowStandard = [b]true[/b];
                bool allowClassic = [b]true[/b];
                bool allowPistol = [b]true[/b];
                bool allowDLC = [b]true[/b];
                bool allowTroll = [b]true[/b];
                bool allowNight = [b]true[/b];
                bool showChat = [b]true[/b];
                bool showYell = [b]true[/b];
                bool showProcon = [b]true[/b];
                //
                // END OF USER SETTINGS
                if (iDelay > 0)
                {
                    Thread.Sleep(iDelay * 1000);
                }
                if (server.NextGamemode == "GunMaster0" || server.NextGamemode == "GunMaster1")
                {
                    bool bGetting = true;
                    int nextPreset = 0;
                    int maxPreset = 6;
                    Random rnd = new Random();
                    String lastKey = "_LASTGM_";
                    String[] presets = { "Standard",
                                         "Classic",
                                         "Pistol",
                                         "DLC",
                                         "Troll",
                                         "Night" };
                    String msg = "Next GunMaster preset will be: ";
                    if (server.Data.issetInt(lastKey)) lastPreset = server.Data.getInt(lastKey);
                    nextPreset = rnd.Next(maxPreset);
                    if (ensureNight && server.NextMapFileName == "XP5_Night_01")
                    {
                        nextPreset = 5;
                    }
                    else
                    {
                        while (bGetting)
                        {
                            nextPreset = rnd.Next(maxPreset);
                            if (!allowStandard && nextPreset == 0) nextPreset = lastPreset;
                            if (!allowClassic && nextPreset == 1) nextPreset = lastPreset;
                            if (!allowPistol && nextPreset == 2) nextPreset = lastPreset;
                            if (!allowDLC && nextPreset == 3) nextPreset = lastPreset;
                            if (!allowTroll && nextPreset == 4) nextPreset = lastPreset;
                            if (!allowNight && nextPreset == 5) nextPreset = lastPreset;
                            if (nextPreset != lastPreset) bGetting = false;
                        }
                    }
                    plugin.ServerCommand("vars.gunMasterWeaponsPreset", nextPreset.ToString());
                    if (showChat) plugin.SendGlobalMessage(msg + presets[nextPreset]);
                    if (showYell) plugin.SendGlobalYell("\n" + msg + presets[nextPreset], 8);
                    if (showProcon) plugin.PRoConChat(msg + "^b^1" + presets[nextPreset] + "^0^n.");
                    server.Data.setInt(lastKey, nextPreset);
                }
            }
            catch (Exception e)
            {
                plugin.ConsoleException(e.ToString());
            }
        }
    )
);

gmrnd.Name = "GMPresetRandomizer";
gmrnd.Start();

return false;

End of post.

* Restored post. It could be that the author is no longer active.
Link to comment
  • Replies 142
  • Created
  • Last Reply

Originally Posted by moacco07*:

 

Hi LCARSx64,

 

Beside DICE presets, is there any way we can create our own custom list and add it into (Insane Limits: BF4 Gunmaster Random Presets)?

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by LCARSx64*:

 

Hi LCARSx64,

 

Beside DICE presets, is there any way we can create our own custom list and add it into (Insane Limits: BF4 Gunmaster Random Presets)?

Do you mean adding your own custom gun progression like magnum then mtar then phantom etc.? If so, then no there's no way that I'm aware of. I was hoping to have the same option.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by dyn*:

 

We're running GM in a mixed-mode environment. Would someone be able to assist with code to check if next map set to run IS gun master? If it is, select one of the random presets. If it's not, take no action.

 

Example for on round over:

 

If next round gun master = true. Select random preset and inform server.

If next round gun master = false. Do nothing.

 

Thank you

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by LCARSx64*:

 

We're running GM in a mixed-mode environment. Would someone be able to assist with code to check if next map set to run IS gun master? If it is, select one of the random presets. If it's not, take no action.

 

Example for on round over:

 

If next round gun master = true. Select random preset and inform server.

If next round gun master = false. Do nothing.

 

Thank you!

 

Edit:

 

I think this is correct - adding this to the first line?

Add the following at the start of the code:

Code:

if (server.NextGamemode != "GunMaster0") return false;
NOTE: I haven't tested this.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by dyn*:

 

It displayed the message for Gun Master (in game / procon) and then didn't do anything on a different mode, using your code example. Looked to be working! Woot! I have edited my post to remove conflicting info.

 

The item that I did not see was any vars.gunMasterWeaponsPreset command being issued which would have changed it to Pistol preset. The message displayed in chat saying that the next preset was to be 'pistols' but then we had, what I believe to be, the standard preset.

 

On a round other than GM I have set it to go to Pistol. Would the multiple game modes cause issues with it not knowing what previous modes have been... then not knowing which preset to randomly select?

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by LCARSx64*:

 

It displayed the message for Gun Master (in game / procon) and then didn't do anything on a different mode, using your code example. Looked to be working! Woot! I have edited my post to remove conflicting info.

 

The item that I did not see was any vars.gunMasterWeaponsPreset command being issued which would have changed it to Pistol preset. The message displayed in chat saying that the next preset was to be 'pistols' but then we had, what I believe to be, the standard preset.

 

On a round other than GM I have set it to go to Pistol. Would the multiple game modes cause issues with it not knowing what previous modes have been... then not knowing which preset to randomly select?

I'm not sure I fully understand. Are you saying it's working before the other gamemode and then doesn't work after it?

If you manually change the preset to Pistol during the non-gunmaster round, it will not stay set at that, the limit will see that the next gamemode is gunmaster and then randomly select a different preset then what had been set during the last gunmaster round.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by dyn*:

 

Sorry -- after vacation brain farts for me.

 

The limit DID fire on round end as it saw that the next round was going to be GM and sent the message out to the server stating that. This same message was visible in Procon chat.

 

However, once the level actually loaded the preset was actually Standard... Not pistols like it should have been. So game mode loaded the wrong preset.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by LCARSx64*:

 

Sorry -- after vacation brain farts for me.

 

The limit DID fire on round end as it saw that the next round was going to be GM and sent the message out to the server stating that. This same message was visible in Procon chat.

 

However, once the level actually loaded the preset was actually Standard... Not pistols like it should have been. So game mode loaded the wrong preset.

Ah I see, unfortunately when you manually set the preset before then end of a round, the limit has no way of knowing this and then selects a random preset for the next (gunmaster) round.

I'll change the code when I get a chance and add a command to enable manual preset selection.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by bomkata*:

 

hi, im new to procon and running a server. i found this addon and would like to know if anyone can link me a guide on how to use insane limits and add the stuff listed here. i have my server running gun master mode and would like to have it random with load-outs.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by LCARSx64*:

 

hi, im new to procon and running a server. i found this addon and would like to know if anyone can link me a guide on how to use insane limits and add the stuff listed here. i have my server running gun master mode and would like to have it random with load-outs.

You can download Insane Limits here, there's also a video on how to use it: showthread....R-2015%29-BFHL*

 

how to disable picking up guns?

moacco07 is correct, this isn't possible.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by bomkata*:

 

thanks, love the plugin so far was able to get the random game modes working. going to try some other stuff. any thoughts on some good ones to add to this plugin?

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by LCARSx64*:

 

thanks, love the plugin so far was able to get the random game modes working. going to try some other stuff. any thoughts on some good ones to add to this plugin?

Well that really would depend on what sort of things you'd like. I'd suggest just taking a look through the Plugin Enhancements section of the forums and see what you like. :smile:
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by LCARSx64*:

 

Thanks for getting this out here so quickly. Very useful.

No problem. :smile:

 

any way to random spawn location or enforce spawn camping in this mode?

Unfortunately no, the required info isn't set from servers.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Suprgau*:

 

Hello Mate

 

Thank you for offering this nice tool. Unfortunately, I have a problem, that it is not working properly. It displays the new gun master mode on chat, but does not switch to this mode...

Can this be due to provider or insane limits settings? I mean, the plugin is running if the server message is posted. Or do I have to tweak on the settings specially, to be able to run this plugin?

I put your coded adapted to my needs here, did I miss something?

 

Code:

// BF4 Gunmaster Random Presets - Limit 1 of 1
// v2.0 - OnRoundOver - first_check
//

if (server.NextGamemode != "GunMaster0") return false;

int lastPreset = 0;
bool allowTroll = false;
bool showChat = true;
bool showYell = false;
bool showProcon = false;
int nextPreset = 0;
int maxPreset = 5;
Random rnd = new Random();
String lastKey = "_LASTGM_";
String[] presets = { "Standard",
                     "Classic",
                     "Pistol",
                     "DLC",
                     "Troll" };
String msg = "Next GunMaster preset will be: ";

if (!allowTroll) maxPreset = 4;
if (server.Data.issetInt(lastKey)) lastPreset = server.Data.getInt(lastKey);
nextPreset = rnd.Next(maxPreset);
while (nextPreset == lastPreset)
{
    nextPreset = rnd.Next(maxPreset);
}
plugin.ServerCommand("vars.gunMasterWeaponsPreset", nextPreset.ToString());
if (showChat) plugin.SendGlobalMessage(msg + presets[nextPreset]);
if (showYell) plugin.SendGlobalYell("\n" + msg + presets[nextPreset], 8);
if (showProcon) plugin.PRoConChat(msg + "^b^1" + presets[nextPreset] + "^0^n.");
server.Data.setInt(lastKey, nextPreset);

return false;
Thank you already for your help
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by LCARSx64*:

 

Hello Mate

 

Thank you for offering this nice tool. Unfortunately, I have a problem, that it is not working properly. It displays the new gun master mode on chat, but does not switch to this mode...

Can this be due to provider or insane limits settings? I mean, the plugin is running if the server message is posted. Or do I have to tweak on the settings specially, to be able to run this plugin?

I put your coded adapted to my needs here, did I miss something?

 

Thank you already for your help

If I'm understanding you correctly, this will not set your server to Gunmaster mode, it will only randomly select a Gunmaster weapons preset after each round.

To have your server run Gunmaster, you will need add (or replace) maps with Gunmaster0 gamemode to your maplist. The available maps with this mode are (format here is: Mapname Gamemode Rounds):

Code:

MP_Abandoned GunMaster0 1
MP_Damage GunMaster0 1
MP_Flooded GunMaster0 1
MP_Journey GunMaster0 1
MP_Naval GunMaster0 1
MP_Prison GunMaster0 1
MP_Resort GunMaster0 1
MP_Siege GunMaster0 1
MP_TheDish GunMaster0 1
MP_Tremors GunMaster0 1
You can also add vars.gunMasterWeaponsPreset [0 - 4] to startup.txt, e.g. vars.gunMasterWeaponsPreset 0

The vars values are as follows:

Code:

0 = Standard
1 = Classic
2 = Pistol
3 = DLC
4 = Troll
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Barack_palinka*:

 

This limit will randomly select and set a different Gunmaster presets after each round whilst ensuring that the next preset is not the same as the previous one.

 

Options:

  • If you added vars.gunMasterWeaponsPreset to your startup.txt, change the value highlighted in red to the same value as your startup.txt, otherwise leave this set to 0.
  • If you do not wish to use the Troll preset, change the value highlighted in green to false.
  • To display the next preset to all players via in-game chat, set the value highlighted in blue to true.
  • To display the next preset to all players via in-game yell, set the value highlighted in orange to true.
  • To display the next preset in Procon chat, set the value highlighted in purple to true.

BF4 Gunmaster Random Presets

 

Create a new limit to evaluate OnRoundOver. Set action to None.

 

Set first_check to this Code:

Code:

// BF4 Gunmaster Random Presets - Limit 1 of 1
// v2.0 - OnRoundOver - first_check
//

int lastPreset = 0;
bool allowTroll = true;
bool showChat = false;
bool showYell = false;
bool showProcon = false;
int nextPreset = 0;
int maxPreset = 5;
Random rnd = new Random();
String lastKey = "_LASTGM_";
String[] presets = { "Standard",
                     "Classic",
                     "Pistol",
                     "DLC",
                     "Troll" };
String msg = "Next GunMaster preset will be: ";

if (!allowTroll) maxPreset = 4;
if (server.Data.issetInt(lastKey)) lastPreset = server.Data.getInt(lastKey);
nextPreset = rnd.Next(maxPreset);
while (nextPreset == lastPreset)
{
    nextPreset = rnd.Next(maxPreset);
}
plugin.ServerCommand("vars.gunMasterWeaponsPreset", nextPreset.ToString());
if (showChat) plugin.SendGlobalMessage(msg + presets[nextPreset]);
if (showYell) plugin.SendGlobalYell("\n" + msg + presets[nextPreset], 8);
if (showProcon) plugin.PRoConChat(msg + "^b^1" + presets[nextPreset] + "^0^n.");
server.Data.setInt(lastKey, nextPreset);

return false;

End of post.

How can I deactivate the Pistol mode like Troll mode and leave the Classic, DLC and standard modes does active?

Because of the

bool allowPistol = false;

command has no effect on Pistol Mode, could not deactivete it.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by LCARSx64*:

 

How can I deactivate the Pistol mode like Troll mode and leave the Classic, DLC and standard modes does active?

Because of the

bool allowPistol = false;

command has no effect on Pistol Mode, could not deactivete it.

Find this line in the code:

Code:

while (nextPreset == lastPreset)
Change it to:

Code:

while (nextPreset == lastPreset || nextPreset == 2)
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Suprgau*:

 

No, I understood that this plugin won't set my map rotation to gunmaster. I set the map rotation up correctly, we are playing gun master. The problem is, that it seems to be stuck on one gunmaster mode/day (random) and then will not proceed to another.

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by LCARSx64*:

 

No, I understood that this plugin won't set my map rotation to gunmaster. I set the map rotation up correctly, we are playing gun master. The problem is, that it seems to be stuck on one gunmaster mode/day (random) and then will not proceed to another.

So you mean that the preset isn't changing on the next round?

Also when you say that the next preset is displayed in chat, are you referring to in-game chat or Procon chat?

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Suprgau*:

 

So you mean that the preset isn't changing on the next round?

Also when you say that the next preset is displayed in chat, are you referring to in-game chat or Procon chat?

Ingame chat...
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by madmuthamonk*:

 

Is anyone running this on a mixed mode server? I am running mixed mode with a few other modes and when gunmaster comes up it is the same preset every time. Anyone else have this happen?

* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by LCARSx64*:

 

Ingame chat...

Hmmm, that seems rather odd.

I don't really see it being a provider issue. Is your server Official or Ranked?

Is it a mixed mode server or just gunmaster?

 

Can you please try the following:

 

Disable this limit.

During a round, go to the Console tab in Procon and make sure the second minor Console tab is selected (see image)> Procon_Console.png

In the text box at the bottom, enter: vars.gunMasterWeaponsPreset 1

Then click send, wait for the next round to begin and tell me if you have a different weapons preset.

* Restored post. It could be that the author is no longer active.
Link to comment

Archived

This topic is now archived and is closed to further replies.




  • Our picks

    • Game Server Hosting:

      We're happy to announce that EZRCON will branch out into the game server provider scene. This is a big step for us so please having patience if something doesn't go right in this area. Now, what makes us different compared to other providers? Well, we're going with the idea of having a scaleable server hosting and providing more control in how you set up your server. For example, in Minecraft, you have the ability to control how many CPU cores you wish your server to have access to, how much RAM you want to use, how much disk space you want to use. This type of control can't be offered in a single service package so you're able to configure a custom package the way you want it.

      You can see all the available games here. Currently, we have the following games available.

      Valheim (From $1.50 USD)


      Rust (From $3.20 USD)


      Minecraft (Basic) (From $4.00 USD)


      Call of Duty 4X (From $7.00 USD)


      OpenTTD (From $4.00 USD)


      Squad (From $9.00 USD)


      Insurgency: Sandstorm (From $6.40 USD)


      Changes to US-East:

      Starting in January 2022, we will be moving to a different provider that has better support, better infrastructure, and better connectivity. We've noticed that the connection/routes to this location are not ideal and it's been hard getting support to correct this. Our contract for our two servers ends in March/April respectively. If you currently have servers in this location you will be migrated over to the new provider. We'll have more details when the time comes closer to January. The new location for this change will be based out of Atlanta, GA. If you have any questions/concerns please open a ticket and we'll do our best to answer them.
      • 5 replies
    • Hello All,

      I wanted to give an update to how EZRCON is doing. As of today we have 56 active customers using the services offered. I'm glad its doing so well and it hasn't been 1 year yet. To those that have services with EZRCON, I hope the service is doing well and if not please let us know so that we can improve it where possible. We've done quite a few changes behind the scenes to improve the performance hopefully. 

      We'll be launching a new location for hosting procon layers in either Los Angeles, USA or Chicago, IL. Still being decided on where the placement should be but these two locations are not set in stone yet. We would like to get feedback on where we should have a new location for hosting the Procon Layers, which you can do by replying to this topic. A poll will be created where people can vote on which location they would like to see.

      We're also looking for some suggestions on what else you would like to see for hosting provider options. So please let us know your thoughts on this matter.
      • 4 replies
    • Added ability to disable the new API check for player country info


      Updated GeoIP database file


      Removed usage sending stats


      Added EZRCON ad banner



      If you are upgrading then you may need to add these two lines to your existing installation in the file procon.cfg. To enable these options just change False to True.

      procon.private.options.UseGeoIpFileOnly False
      procon.private.options.BlockRssFeedNews False



       
      • 2 replies
    • I wanted I let you know that I am starting to build out the foundation for the hosting services that I talked about here. The pricing model I was originally going for wasn't going to be suitable for how I want to build it. So instead I decided to offer each service as it's own product instead of a package deal. In the future, hopefully, I will be able to do this and offer discounts to those that choose it.

      Here is how the pricing is laid out for each service as well as information about each. This is as of 7/12/2020.

      Single MySQL database (up to 30 GB) is $10 USD per month.



      If you go over the 30 GB usage for the database then each additional gigabyte is charged at $0.10 USD each billing cycle. If you're under 30GB you don't need to worry about this.


      Databases are replicated across 3 zones (regions) for redundancy. One (1) on the east coast of the USA, One (1) in Frankfurt, and One (1) in Singapore. Depending on the demand, this would grow to more regions.


      Databases will also be backed up daily and retained for 7 days.




      Procon Layer will be $2 USD per month.


      Each layer will only allow one (1) game server connection. The reason behind this is for performance.


      Each layer will also come with all available plugins installed by default. This is to help facilitate faster deployments and get you up and running quickly.


      Each layer will automatically restart if Procon crashes. 


      Each layer will also automatically restart daily at midnight to make sure it stays in tip-top shape.


      Custom plugins can be installed by submitting a support ticket.




      Battlefield Admin Control Panel (BFACP) will be $5 USD per month


      As I am still working on building version 3 of the software, I will be installing the last version I did. Once I complete version 3 it will automatically be upgraded for you.





      All these services will be managed by me so you don't have to worry about the technical side of things to get up and going.

      If you would like to see how much it would cost for the services, I made a calculator that you can use. It can be found here https://ezrcon.com/calculator.html

       
      • 11 replies
    • I have pushed out a new minor release which updates the geodata pull (flags in the playerlisting). This should be way more accurate now. As always, please let me know if any problems show up.

       
      • 9 replies
×
×
  • Create New...

Important Information

Please review our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.