Jump to content

Insane Limits: BF4 Gunmaster Random Presets


ImportBot

Recommended Posts

  • Replies 142
  • Created
  • Last Reply

Originally Posted by Gjall*:

 

Following up with the issues I've been having:

 

After letting the Insane Limit just do its thing it does appear to be working in that random presets are being set and the server progresses through the difference Gun Master presets, evenetually. We have noticed that the Limit will randomly generate and attempt to send the new preset command but the server does not accept the change. Eventually, after some map rotations, the preset will get updated.

 

One issue is when you combine this Limit with Ultimate Map Manager and Map Voting. The Limit kicks off on a Round End event it will immediately run and evaluate if the next map mode is Gun Master. It appears that unless the next map in the maplist is Gun Master the limit will not run and generate a random preset. It doesn't seem to matter if the Vote map sets next map to a GM map or you switch over to another UMM map list - the next map in your maplist must be a GM. So it appears that when our map votes fail and the maplist goes by as normal, the preset is updated.

 

Question: How does the server.NextGamemode command work? Based on the above, it would appear that this command only reads down the map list and does not take into account what is actually set as the next round.

 

Regardless, what is the harm of running this Limit at the end of every round regardless of game mode?

 

Does the server get upset if you set a GM Weapons Preset on a Rush map? If it doesn't, it may simply be best to generate a random preset at the end of each round and roll with it. I can conceive a situation where if you alternate GM and Rush maps the next GM might have the same preset as the previous GM rounds because it randomly generated the same preset (even though there was a Rush round in between the GM maps). How random can you really get with only 5 numbers?

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

Originally Posted by LCARSx64*:

 

Following up with the issues I've been having:

 

After letting the Insane Limit just do its thing it does appear to be working in that random presets are being set and the server progresses through the difference Gun Master presets, evenetually. We have noticed that the Limit will randomly generate and attempt to send the new preset command but the server does not accept the change. Eventually, after some map rotations, the preset will get updated.

 

One issue is when you combine this Limit with Ultimate Map Manager and Map Voting. The Limit kicks off on a Round End event it will immediately run and evaluate if the next map mode is Gun Master. It appears that unless the next map in the maplist is Gun Master the limit will not run and generate a random preset. It doesn't seem to matter if the Vote map sets next map to a GM map or you switch over to another UMM map list - the next map in your maplist must be a GM. So it appears that when our map votes fail and the maplist goes by as normal, the preset is updated.

 

Question: How does the server.NextGamemode command work? Based on the above, it would appear that this command only reads down the map list and does not take into account what is actually set as the next round.

 

Regardless, what is the harm of running this Limit at the end of every round regardless of game mode?

 

Does the server get upset if you set a GM Weapons Preset on a Rush map? If it doesn't, it may simply be best to generate a random preset at the end of each round and roll with it. I can conceive a situation where if you alternate GM and Rush maps the next GM might have the same preset as the previous GM rounds because it randomly generated the same preset (even though there was a Rush round in between the GM maps). How random can you really get with only 5 numbers?

To be honest, I'm not sure where server.NextGamemode gets it's info. Papa should be able to answer that.

As for letting the limit run regardless of which gamemode is next, that is entirely fine, however it can cause recurring presets as in your GM, Rush, Gm example.

With only 5 presets, the randomness isn't all that random but it is the best approximation you're going to get.

Regarding the actual issue, it's entirely possible that it's cause by the limit executing before xVotemap/UMM have a chance to do what they need to do. I did post some code a few posts back to try to resolve that issue, however it doesn't seemed to have worked and I'm now thinking it could be because of when the check for the next gamemode occurs.

Try the following code and see if that fixes the issue (remember to adjust the settings in red to your requirements, the value in green is the delay time in seconds, adjust this as needed):

Code:

// BF4 Gunmaster Random Presets & Early Skip Post Round - Limit 1 of 1
// v1.0 - OnRoundOver - first_check
//

Thread gmrnd = new Thread(
    new ThreadStart(
        delegate
        {
            try
            {
                int iDelay = [b]40[/b]; // Delay in seconds
                Thread.Sleep(iDelay * 1000);
                if (server.NextGamemode == "GunMaster0")
                {
                    int lastPreset = 0;
                    bool allowTroll = false;
                    bool showChat = true;
                    bool showYell = true;
                    bool showProcon = true;
                    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);
                }
            }
            catch (Exception e)
            {
                plugin.ConsoleException(e.ToString());
            }
        }
    )
);

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

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

Originally Posted by LCARSx64*:

 

don't understand what the problem is,but the script does not work,the server has only one preset gunsimage.jpg

I see a problem in the code from your screenshot, find this line:

Code:

if (server.NextGamemode != "Gunmaster0") return false;
Change it to:

Code:

if (server.NextGamemode != "GunMaster0") return false;
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Gjall*:

 

I can confirm that Insane Limits runs before UMM. I tested this by having a separate Insane Limite kick off at round end that sends something to procon chat. As soon as a End Round hits, Insane Limits is executed and done before anything else.

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

Originally Posted by steep100*:

 

To be honest, I'm not sure where server.NextGamemode gets it's info. Papa should be able to answer that.

As for letting the limit run regardless of which gamemode is next, that is entirely fine, however it can cause recurring presets as in your GM, Rush, Gm example.

With only 5 presets, the randomness isn't all that random but it is the best approximation you're going to get.

Regarding the actual issue, it's entirely possible that it's cause by the limit executing before xVotemap/UMM have a chance to do what they need to do. I did post some code a few posts back to try to resolve that issue, however it doesn't seemed to have worked and I'm now thinking it could be because of when the check for the next gamemode occurs.

Try the following code and see if that fixes the issue (remember to adjust the settings in red to your requirements, the value in green is the delay time in seconds, adjust this as needed):

Code:

// BF4 Gunmaster Random Presets & Early Skip Post Round - Limit 1 of 1
// v1.0 - OnRoundOver - first_check
//

Thread gmrnd = new Thread(
    new ThreadStart(
        delegate
        {
            try
            {
                int iDelay = [b]40[/b]; // Delay in seconds
                Thread.Sleep(iDelay * 1000);
                if (server.NextGamemode == "GunMaster0")
                {
                    int lastPreset = 0;
                    bool allowTroll = false;
                    bool showChat = true;
                    bool showYell = true;
                    bool showProcon = true;
                    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);
                }
            }
            catch (Exception e)
            {
                plugin.ConsoleException(e.ToString());
            }
        }
    )
);

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

return false;
This script work very fine on my server, thank you, my clan member very happy)))
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by Gjall*:

 

LCARSx64, I should have said this up front; thanks for writing the script! Also wanted to say thanks for being so responsive with my issues, you've been a big help! Keep up the good work.

 

I'm now running it on every map and so far so good. I think the likely hood of it doubling up on a preset is far less than it getting stuck on a preset and never changing because of UMM or xVotemap.

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

Originally Posted by LCARSx64*:

 

This script work very fine on my server, thank you, my clan member very happy)))

LCARSx64, I should have said this up front; thanks for writing the script! Also wanted to say thanks for being so responsive with my issues, you've been a big help! Keep up the good work.

 

I'm now running it on every map and so far so good. I think the likely hood of it doubling up on a preset is far less than it getting stuck on a preset and never changing because of UMM or xVotemap.

No problem, I'm glad I could help. :smile:
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TheUltimateForce*:

 

Hi there,

i uploaded the insane limits to my server. The necessary maps all have 777 rights.

But when i try to make a new limit for gunmaster it says: (watch image)

 

procon.png

 

Need some help please!

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

Originally Posted by LCARSx64*:

 

Hi there,

i uploaded the insane limits to my server. The necessary maps all have 777 rights.

But when i try to make a new limit for gunmaster it says: (watch image)

 

procon.png

 

Need some help please!

Check in inside the Plugins/BF4 folder and see if there's a file named: InsaneLimits_X.X.X.X_Y.conf (X.X.X.X = Server IP, Y = Server RCON port). If that file is not there, check the permissions on the BF4 folder and make sure you can write to it.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by LCARSx64*:

 

I checked it and there is no file named InsaneLimits_x.x.x.x_Y.conf. Check the images below.

procon02.pngprocon03.png

Are you running plugins in sandbox mode? If so, turn it off ...

 

In Procon, go to Tools > Options > Plugins tab, in the Plugin Security drop down, make sure Run plugins with no restrictions is selected.

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

Originally Posted by TheUltimateForce*:

 

Are you running plugins in sandbox mode? If so, turn it off ...

 

In Procon, go to Tools > Options > Plugins tab, in the Plugin Security drop down, make sure Run plugins with no restrictions is selected.

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

Originally Posted by LCARSx64*:

 

All I can think of is to try manually creating the file and see if that fixes the issue.

Just create a new text file and rename it to InsaneLimits_127.0.0.1_12345.conf (change 127.0.0.1 to your game server's IP and 12345 to your game server's RCON port), now upload it to the Plugins/BF4/ folder. See if that works. You may need to restart the layer.

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

Originally Posted by TheUltimateForce*:

 

I have done exactly you told me to do. The only thing that worked is that i had to accept privacy policy. Watch the image! I gave read and write rights to this file and restarted the procon layer.

procon05.png

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

Originally Posted by LCARSx64*:

 

I have done exactly you told me to do. The only thing that worked is that i had to accept privacy policy. Watch the image! I gave read and write rights to this file and restarted the procon layer.

procon05.png

I'm at a loss, you may need to ask in the Insane Limits thread, Papa should hopefully be able to help you.

Insane Limits thread: showthread....R-2015%29-BFHL*

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

Originally Posted by TheUltimateForce*:

 

I'm at a loss, you may need to ask in the Insane Limits thread, Papa should hopefully be able to help you.

Insane Limits thread: showthread....R-2015%29-BFHL*

Thanks for your help so far, i made a question in this thread. Hopefully they can help!
* Restored post. It could be that the author is no longer active.
Link to comment
  • 3 weeks later...

Originally Posted by kronenbourg*:

 

Hi

 

Just in the process of asking the person where procon is to install the plugin. For this code (not used it all), is it like ProconRulz, where you have to be on the actual server side where the main Procon is installed, not the one I use to connect with?

 

If so, just watched the vid on YT, so do I have to enter the entire code, or just this part:

 

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

 

Set first_check to this Code:

Thanks

 

Kro

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

Originally Posted by LCARSx64*:

 

Hi

 

Just in the process of asking the person where procon is to install the plugin. For this code (not used it all), is it like ProconRulz, where you have to be on the actual server side where the main Procon is installed, not the one I use to connect with?

 

If so, just watched the vid on YT, so do I have to enter the entire code, or just this part:

 

 

 

Thanks

 

Kro

Yes, Insane Limits (Link: showthread....R-2015%29-BFHL*) plugin needs to be install on your layer (server side). You can enter the limit via the client provided you have permissions to access the Parent Layer Control -> Plugins tab in Procon and can manage plugins.

As far as Insane Limits being similar to ProconRulz, I find that it can do whatever ProconRulz can do and more, much much more.

Yes you need the entire code.

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

Originally Posted by ihateu3*:

 

I am now trying to remove the pistol preset as well, but am unsure on how to do this. Here is my current code.

 

// BF4 Gunmaster Random Presets - Limit 1 of 1

// v1.0 - OnRoundOver - first_check

//

 

int lastPreset = 2;

int nextPreset = 0;

Random rnd = new Random();

String lastKey = "_LASTGM_";

String[] msgs = { "Standard",

"Classic",

"Pistol",

"DLC",

"Troll" };

 

if (server.Data.issetInt(lastKey)) lastPreset = server.Data.getInt(lastKey);

nextPreset = rnd.Next(4);

while (nextPreset == lastPreset)

{

nextPreset = rnd.Next(4);

}

plugin.ServerCommand("vars.gunMasterWeaponsPreset" , nextPreset.ToString());

plugin.SendGlobalYell("\nThe next Gunmaster preset will be: " + msgs[nextPreset], 8);

plugin.SendGlobalMessage("The next Gunmaster preset will be: " + msgs[nextPreset]);

plugin.PRoConChat("Next Gunmaster preset changed to: ^b^1" + msgs[nextPreset] + "^0^n.");

server.Data.setInt(lastKey, nextPreset);

 

return false;

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

Originally Posted by LCARSx64*:

 

I am now trying to remove the pistol preset as well, but am unsure on how to do this.

Find this line in the code:

Code:

while (nextPreset == lastPreset)
and 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 LCARSx64*:

 

When i write vars.gunMasterWeaponsPreset in Startup.tx for this plugin, with or without index?

 

best regards

Markus

If you add vars.gunMasterWeaponsPreset to your startup.txt, you need to give it a preset value (0, 1, 2, 3 or 4).

If you don't add the vars, then the server will default to preset 0 (Standard).

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

Originally Posted by Spiders0815*:

 

This plugin don´t work on my Server. I have read and understand the description to setup this plugin. When the next round start the preset is the same as the round before.

 

somebody has an idea what the problem is ?

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

Originally Posted by ucjohn*:

 

Hello,

 

I have the script like this

 

Code:

int lastPreset = 1;
bool allowTroll = true;
bool showChat = false;
bool showYell = true;
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;
It doesn't really work all that great it goes between 3 and 4 but that's it and it doesn't announce anything like next preset... Any idea?
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by LCARSx64*:

 

Hello,

 

I have the script like this

 

Code:

int lastPreset = 1;
bool allowTroll = true;
bool showChat = false;
bool showYell = true;
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;
It doesn't really work all that great it goes between 3 and 4 but that's it and it doesn't announce anything like next preset... Any idea?
I'm unsure why that would be the case unless you're getting a lot of Round Over events, also this limit will not work when you manually end a round because a Round Over event is not triggered in such cases.

 

I do have a complete replacement set of limits for this that is highly customisable and allows voting for the next weapon preset, however, there are still a few bugs that need smashing and it needs to be optimised. I was going to release it within the next week or so but I may wait for the September patch which apparently will introduce a new preset.

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

Originally Posted by LCARSx64*:

 

Hi LCARSx64, can u update this limit with the new "night operations" presets please !!!

 

thx

M4DE

I have to wait until my server is updated in order for me to test, but having said that, I may skip updating this and just go with my advanced version (with the ability to vote for presets) depending on demand.
* 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.