thankyou
Donate to the B3 fund!

"even a small donation helps!"
Donate with PayPal!
Most of the plugins here are made by B3 users and the authors may not visit frequently. If you need support for plugins or if questions remain unanswered, you will have to contact the author directly. Read the full Support Disclaimer here

NOTE: Do not attach plugins to your forumtopics! Attachements are periodically removed by maintenance tasks. Upload your plugins to our Downloads section instead!

Author Topic: RandomMapUrT  (Read 3577 times)

Offline PtitBigorneau

  • Moderator
  • Sr. Member
  • *
  • Posts: 194
    • www.ptitbigorneau.fr
RandomMapUrT
« on: September 11, 2012, 12:53:13 PM »
randommapurt B3 plugin (v1.2) for Urban Terror

Selects the next map randomly in your mapcycle.

commands:

!randommap [on/off]
enable / disable the plugin

!shufflemapcycle [on/off]
enables / disables the shuffle mode of mapcycle

!shufflemaps
shuffle the mapcycle

Installation:

1. Place the randommapurt.py in your ../b3/extplugins and the
randommapurt.ini in your ../b3/extplugins/conf folders.

2. Open your B3.xml file (default in b3/conf) and add the next line in the
<plugins> section of the file:

<plugin name="randommapurt" config="@b3/extplugins/conf/randommapurt.ini"/>

download -> randommapurt v1.2

download the latest development snapshot -> randommapurt

edit for version 1.2

Sorry for my English
« Last Edit: June 04, 2013, 09:44:32 PM by PtitBigorneau »
PtitBigorneau

Offline LouK

  • Full Member
  • ***
  • Posts: 119
    • The Sni:{Per}:Jum Clan
Re: RandomMapUrT
« Reply #1 on: April 20, 2013, 06:24:10 PM »
Hi Ptit, it is a nice plugin but it has only one problem for me: When the plugin selects a map, its totally randomly but I would like to make like a shuffle of mapcycles, I noticed that many times the plugin sets a nextmap that was played 1 or 2 maps ago, this is very annoying because players will have to play twice the same map. Is there a way to make this plugin to remember all maps played at the moment?

thanks

Offline PtitBigorneau

  • Moderator
  • Sr. Member
  • *
  • Posts: 194
    • www.ptitbigorneau.fr
Re: RandomMapUrT
« Reply #2 on: April 25, 2013, 09:20:34 PM »
hi

the I do not have much time to see it

but in one or two weeks I could see this problem
PtitBigorneau

Offline LouK

  • Full Member
  • ***
  • Posts: 119
    • The Sni:{Per}:Jum Clan
Re: RandomMapUrT
« Reply #3 on: April 26, 2013, 09:09:10 PM »
That sounds great! thanks :)

Offline PtitBigorneau

  • Moderator
  • Sr. Member
  • *
  • Posts: 194
    • www.ptitbigorneau.fr
Re: RandomMapUrT
« Reply #4 on: May 01, 2013, 08:45:40 PM »
well for tested -> v 1.1 Plugin-RandomMapUrT-for-B3-master.zip

- add shuffle mapcycle mode - reshuffle after the end of each mapcycle (enabled in the config file "shufflemapcycle: on" or with the command "!shufflemapcycle on")


- the maps back less often (mapcycle over 8 maps, a map waits at least 5 maps before returning)

- add command !shufflemaps for mix the mapcycle

shuffle mapcycle mode is activated automatically with mapcycle under 5 maps

sorry for my bad english
« Last Edit: May 01, 2013, 08:54:48 PM by PtitBigorneau »
PtitBigorneau

Offline LouK

  • Full Member
  • ***
  • Posts: 119
    • The Sni:{Per}:Jum Clan
Re: RandomMapUrT
« Reply #5 on: May 06, 2013, 02:05:05 AM »
Hey, really good job, thanks a lot!

P.S.: take a look to the .zip file again, you forgot to put the correct .py file in the /extplugins folder :p

Offline PtitBigorneau

  • Moderator
  • Sr. Member
  • *
  • Posts: 194
    • www.ptitbigorneau.fr
Re: RandomMapUrT
« Reply #6 on: May 06, 2013, 06:40:23 PM »
oups sorry :(

it's good now

 Plugin-RandomMapUrT-for-B3-master.zip
PtitBigorneau

Offline LouK

  • Full Member
  • ***
  • Posts: 119
    • The Sni:{Per}:Jum Clan
Re: RandomMapUrT
« Reply #7 on: May 08, 2013, 12:22:05 AM »
Yep, I just want to give you a couple of ideas:

1. The plugin shuffles maps in the server, not in the mapcycle, so it can choose maps that are not in the mapcycle.txt but in the q3ut4! I think it would be better to select a randommap in the mapcycle file

2. I noticed that it doesn't read gametypes, fraglimits, etc. I think this is a poin to think in a future

For the rest, nice plugin!

Offline LouK

  • Full Member
  • ***
  • Posts: 119
    • The Sni:{Per}:Jum Clan
Re: RandomMapUrT
« Reply #8 on: May 26, 2013, 02:05:01 PM »
Hi again PtitBigorneau, your plugin keeps being awesome but I want to report something:

Currently, it seems that the plugin needs to have the mapcycle.txt in the .q3a folder, otherwise it gives this error:

Code: [Select]
130526 11:48:23 VERBOSE "RCON sending (127.0.0.1:27965) 'g_mapcycle'"
130526 11:48:24 DEBUG   'Get cvar g_mapcycle = ["g_mapcycle" is:"mapcycle.txt^7", the default\n]'
130526 11:48:24 VERBOSE "RCON sending (127.0.0.1:27965) 'fs_homepath'"
130526 11:48:25 DEBUG   'Get cvar fs_homepath = ["fs_homepath" is:"/home/joke/shell/.q3a^7", the default\n]'
130526 11:48:25 VERBOSE "RCON sending (127.0.0.1:27965) 'fs_game'"
130526 11:48:26 DEBUG   'Get cvar fs_game = ["fs_game" is:"q3ut4^7", the default\n]'
130526 11:48:26 ERROR   'Could not start plugin randommapurt'
Traceback (most recent call last):
  File "/home/joke/shell/b3/b3/parser.py", line 789, in startPlugins
    start_plugin(plugin_name)
  File "/home/joke/shell/b3/b3/parser.py", line 772, in start_plugin
    p.onStartup()
  File "/home/joke/shell/b3/b3/extplugins/randommapurt.py", line 41, in onStartup
    self.listemaps()
  File "/home/joke/shell/b3/b3/extplugins/randommapurt.py", line 158, in listemaps
    fichier = open(mapcyclefile, "r")
IOError: [Errno 2] No such file or directory: '/home/joke/shell/.q3a/q3ut4/mapcycle.txt'

It's a bit annoying to have to keep updating both mapcycles(.q3a and urt/q3ut4 folder) when you change them. Do you think you'll have time to change this little issue? :3

cheers

Offline PtitBigorneau

  • Moderator
  • Sr. Member
  • *
  • Posts: 194
    • www.ptitbigorneau.fr
Re: RandomMapUrT
« Reply #9 on: May 26, 2013, 05:45:54 PM »
this version first searches in basePath (UrbanTerror / or other ...) and if it looks in mapcycle in Homepath (. q3a / ...)

 Plugin-RandomMapUrT-for-B3-master.zip
PtitBigorneau

Offline LouK

  • Full Member
  • ***
  • Posts: 119
    • The Sni:{Per}:Jum Clan
Re: RandomMapUrT
« Reply #10 on: May 26, 2013, 08:19:00 PM »
Code: [Select]
130526 18:16:02 ERROR   "STDERR 'Unhandled exception in thread started by '"
130526 18:16:02 ERROR   "STDERR '<bound method RandommapurtPlugin.wait of <randommapurt.RandommapurtPlugin instance at 0x9145fec>>'"
130526 18:16:02 ERROR   "STDERR '\\n'"
130526 18:16:02 ERROR   "STDERR 'Traceback (most recent call last):\\n'"
130526 18:16:02 ERROR   'STDERR \'  File "/home/joke/shell/b3/b3/extplugins/randommapurt.py", line 234, in wait\\n\''
130526 18:16:02 ERROR   "STDERR '    '"
130526 18:16:02 ERROR   "STDERR 'map = self.nextmap\\n'"
130526 18:16:02 ERROR   "STDERR 'AttributeError'"
130526 18:16:02 ERROR   "STDERR ': '"
130526 18:16:02 ERROR   'STDERR "RandommapurtPlugin instance has no attribute \'nextmap\'"'
130526 18:16:02 ERROR   "STDERR '\\n'"
Oups?

Offline PtitBigorneau

  • Moderator
  • Sr. Member
  • *
  • Posts: 194
    • www.ptitbigorneau.fr
Re: RandomMapUrT
« Reply #11 on: May 26, 2013, 10:45:30 PM »
oups sorry :(

an oversight for shufflemapcycle

normally it works now

Plugin-RandomMapUrT-for-B3-master.zip
PtitBigorneau

Offline LouK

  • Full Member
  • ***
  • Posts: 119
    • The Sni:{Per}:Jum Clan
Re: RandomMapUrT
« Reply #12 on: May 27, 2013, 09:26:41 PM »
It works properly now, thanks :)

It has just a little bug but I dont care too much about it:

When you use the !shufflemaps command, it shuffles maps but it shows a different map in the bigtext, this also happens when map cycles, it shows a different nextmap in bigtext.
Here for example, the plugin sets as nextmap "ut4_titan_a2" but in the bigtext "booobjumps_beta4"

Code: [Select]
130527 19:18:41 CONSOLE '0:45 say: 2 ^3:^2{^7Per^5}^3:^7LouK: nextmap'
130527 19:18:41 VERBOSE 'Client Found: :{Per}:LouK on slot 2'
130527 19:18:41 VERBOSE 'Queueing event Say nextmap'
130527 19:18:41 VERBOSE 'Parsing Event: Say: AdminPlugin'
130527 19:18:41 DEBUG   'AdminPlugin: OnSay handle 5:"nextmap"'
130527 19:18:41 VERBOSE 'Parsing Event: Say: ChatloggerPlugin'
130527 19:18:41 DEBUG   'ChatloggerPlugin: ALL, 2, :{Per}:LouK, nextmap'
130527 19:18:41 DEBUG   'ChatloggerPlugin: writing to file'
130527 19:18:41 DEBUG   'ChatloggerPlugin: rowcount: 1, id:960'
130527 19:18:41 VERBOSE 'Parsing Event: Say: TranslatorPlugin'
130527 19:18:41 VERBOSE 'Parsing Event: Say: ExtraadminPlugin'
130527 19:18:41 VERBOSE 'Parsing Event: Say: ChatPlugin'
130527 19:18:41 DEBUG   'formatting time with timezone [GMT], tzOffset : 0'
130527 19:18:41 VERBOSE "RCON sending (127.0.0.1:27961) 'g_nextmap'"
130527 19:18:42 DEBUG   'Get cvar g_nextmap = ["g_NextMap" is:"ut4_dmcjumps_3^7" default:"^7"\n]'
130527 19:18:42 DEBUG   'g_nextmap: ut4_dmcjumps_3'
130527 19:18:42 VERBOSE "RCON sending (127.0.0.1:27961) 'say ^7 Next map: ^2Dmcjumps_3'"
130527 19:18:46 VERBOSE 'RCON sending (127.0.0.1:27961) \'bigtext "^3ShuffleMapcycle Nextmap: ^4dmcjumps_3^7"\''
130527 19:18:47 CONSOLE '0:51 say: 2 ^3:^2{^7Per^5}^3:^7LouK: !shufflemaps'
130527 19:18:47 VERBOSE 'Client Found: :{Per}:LouK on slot 2'
130527 19:18:47 VERBOSE 'Queueing event Say !shufflemaps'
130527 19:18:47 VERBOSE 'Parsing Event: Say: AdminPlugin'
130527 19:18:47 DEBUG   'AdminPlugin: OnSay handle 5:"!shufflemaps"'
130527 19:18:47 DEBUG   'AdminPlugin: Handle command !shufflemaps'
130527 19:18:47 VERBOSE "RCON sending (127.0.0.1:27961) 'g_nextmap ut4_titan_a2'"
130527 19:18:48 VERBOSE 'RCON sending (127.0.0.1:27961) \'bigtext "^3ShuffleMapcycle Nextmap: ^4booobjumps_beta4^7"\''
130527 19:18:49 DEBUG   "RandommapurtPlugin: shufflemapcycle ['ut4_booobjumps_beta4', 'ut4_titan_a2', 'ut4_azurea_a2', 'ut4_urtrace1a', 'ut4_rastachjumps_bet$
130527 19:18:49 VERBOSE "Queueing event Admin Command (<b3.plugins.admin.Command instance at 0xa16b26c>, '', None)"
130527 19:18:49 VERBOSE "RCON sending (127.0.0.1:27961) 'tell 2 ^7 ^3[pm]^7 ShuffleMapcycle Nextmap : booobjumps_beta4'"

Offline PtitBigorneau

  • Moderator
  • Sr. Member
  • *
  • Posts: 194
    • www.ptitbigorneau.fr
Re: RandomMapUrT
« Reply #13 on: May 28, 2013, 07:17:46 PM »
normally g_nextmap  for shufflemaps works now

Plugin-RandomMapUrT-for-B3-master.zip

thank you for feedback
PtitBigorneau

Offline LouK

  • Full Member
  • ***
  • Posts: 119
    • The Sni:{Per}:Jum Clan
Re: RandomMapUrT
« Reply #14 on: June 02, 2013, 05:10:15 PM »
Works perfect now. Thank you for your awesome plugins  ;)

 


Rate this page +1 at Google Search

anything