ImportBot Posted May 27, 2015 Share Posted May 27, 2015 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
ImportBot Posted May 27, 2015 Author Share Posted May 27, 2015 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
ImportBot Posted May 27, 2015 Author Share Posted May 27, 2015 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
ImportBot Posted May 27, 2015 Author Share Posted May 27, 2015 Originally Posted by moacco07*: That's too bad.. But thank you for the codes. Appreciate it. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 27, 2015 Author Share Posted May 27, 2015 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
ImportBot Posted May 27, 2015 Author Share Posted May 27, 2015 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
ImportBot Posted May 27, 2015 Author Share Posted May 27, 2015 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
ImportBot Posted May 27, 2015 Author Share Posted May 27, 2015 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
ImportBot Posted May 28, 2015 Author Share Posted May 28, 2015 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
ImportBot Posted May 28, 2015 Author Share Posted May 28, 2015 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
ImportBot Posted May 29, 2015 Author Share Posted May 29, 2015 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
ImportBot Posted May 29, 2015 Author Share Posted May 29, 2015 Originally Posted by bomkata*: how to disable picking up guns? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 29, 2015 Author Share Posted May 29, 2015 Originally Posted by moacco07*: how to disable picking up guns?I don't think that's even possible to disable. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 29, 2015 Author Share Posted May 29, 2015 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
ImportBot Posted May 29, 2015 Author Share Posted May 29, 2015 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
ImportBot Posted May 29, 2015 Author Share Posted May 29, 2015 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. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 30, 2015 Author Share Posted May 30, 2015 Originally Posted by Deity*: Thanks for getting this out here so quickly. Very useful. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 30, 2015 Author Share Posted May 30, 2015 Originally Posted by bomkata*: any way to random spawn location or enforce spawn camping in this mode? * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 30, 2015 Author Share Posted May 30, 2015 Originally Posted by LCARSx64*: Thanks for getting this out here so quickly. Very useful.No problem. 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
ImportBot Posted May 30, 2015 Author Share Posted May 30, 2015 Originally Posted by moacco07*: Btw is there anyway to alter the number of kills to advance to next weapon. Default is 2. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 30, 2015 Author Share Posted May 30, 2015 Originally Posted by LCARSx64*: Btw is there anyway to alter the number of kills to advance to next weapon. Default is 2.No there's no way of changing that. * Restored post. It could be that the author is no longer active. Link to comment
ImportBot Posted May 30, 2015 Author Share Posted May 30, 2015 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
ImportBot Posted May 30, 2015 Author Share Posted May 30, 2015 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 1You can also add vars.gunMasterWeaponsPreset [0 - 4] to startup.txt, e.g. vars.gunMasterWeaponsPreset 0The 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
ImportBot Posted May 31, 2015 Author Share Posted May 31, 2015 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
ImportBot Posted May 31, 2015 Author Share Posted May 31, 2015 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
ImportBot Posted May 31, 2015 Author Share Posted May 31, 2015 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
ImportBot Posted May 31, 2015 Author Share Posted May 31, 2015 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
ImportBot Posted May 31, 2015 Author Share Posted May 31, 2015 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
ImportBot Posted May 31, 2015 Author Share Posted May 31, 2015 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
ImportBot Posted May 31, 2015 Author Share Posted May 31, 2015 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
Recommended Posts
Archived
This topic is now archived and is closed to further replies.