SpunkyBot / spunkybot

Multi-platform administration and RCON tool for Urban Terror
https://spunkybot.de
MIT License
20 stars 24 forks source link

Problem with big and small cycle. #86

Closed apocalypsenzn closed 4 years ago

apocalypsenzn commented 4 years ago
[mapcycle]
dynamic_mapcycle = 1                                ; Enable (1) or disable (0) dynamic mapcycle. If enabled, the rotation of small or big_cycle will be used. Default: 0
switch_count = 8                                    ; When server reaches the number of players, the map rotation will be switched to 'big_cycle' list. Default: 4
; Comma separated list of valid map names
small_cycle = ut4_prominence, ut4_arena1, ut4_mykonos_a17, ut4_guerrilla, ut4_poolday_v2, ut4_iran3, ut4_pandora_b6, ut43_aztek_ruins, ut4_baeza, ut4_dambridge, ut4_casablanca
big_cycle = ut4_turnpike, ut4_algiers, ut4_abbey, ut4_blitzkrieg, ut4_casa, ut4_sanc, ut4_orbital_sl, ut4_village, ut4_paris, ut4_tohunga_b10, ut4_uptown, ut4_austria, ut4_facade_b5, ut4_terrorism3, ut4_aeropuerto, ut4_ambush, ut4_arena2, ut4_beijing_b3, ut4_commune, ut4_company, ut4_crossing, ut4_midnight, ut4_nam, ut4_poland_b10

So, I have these maps on my cycle list... IDK what appens with the bot, the switchcount is 8 that means 4vs4, sometimes the players are playing 6x6 and we are still stuck in small cycle.

Another problem is: E.g: Small cycle is running... prominence runs ok, arena1 ok, mykonos ok, nextmap: guerrilla, right? No... the bot set next map aztek or casablanca idk why. Another exeample: in big cycle I have the same problem the 3 first maps are running ok, when nextmap is blitzkrieg it simply jumps for casa after it jump 2 maps too, after Casa the nextmap is sanc and it just jump to orbital. idk why.

github-actions[bot] commented 4 years ago

Hi, thanks for your contribution! Great first issue!

alexanderkress commented 4 years ago

Is one of these maps listed in your mapcycle.txt file?

I have seen there also an issue #61 that sometimes UrT jumps into the mapcycle file... Which version of Spunky Bot are you using? In the latest version getting and setting the g_nextmap has been improved

apocalypsenzn commented 4 years ago

I put all of them in mapcycle.txt yeah I think that it is jumping to mapcycle order. I'll make a test and change the mapcycle.txt order to see the results.

oh, Im using the latest version, but it occours since the last version

apocalypsenzn commented 4 years ago

Let's test: Steps: I've stoped the server and the bot before do it.

  1. I've edited all the cfgs to match the first map:

On server.cfg map ut4_prominence // What map to start with? On mapcycle.txt prominence is the first map and the start map on small cycle on settings.conf

  1. I created a lists on mapcycle.txt with small maps first and big maps after.
ut4_prominence
ut4_casablanca
ut4_arena1
ut4_mykonos_a17
ut4_guerrilla
ut4_poolday_v2
ut4_prague_v2
ut4_slumwar
ut4_dambridge
ut43_aztek_ruins
ut4_baeza
ut4_turnpike
ut4_abbey
ut4_algiers
ut4_blitzkrieg
ut4_paris
ut4_orbital_sl
ut4_arena2
ut4_austria
ut4_tohunga_b10
ut4_facade_b5
ut4_casa
ut4_village
ut4_cemetery666
ut4_sanc
ut4_uptown
ut4_terrorism3
ut4_aeropuerto
ut4_ambush
ut4_beijing_b3
ut4_commune
ut4_company
ut4_crossing
ut4_iran3
ut4_midnight
ut4_poland_b10
  1. I change the settings.conf small cycle and big cycle using exactly the same order in the mapcycle.txt.
dynamic_mapcycle = 1                                ; Enable (1) or disable (0) dynamic mapcycle. If enabled, the rotation of small or big_cycle will be used. Default: 0
switch_count = 8                                    ; When server reaches the number of players, the map rotation will be switched to 'big_cycle' list. Default: 4
; Comma separated list of valid map names
small_cycle = ut4_prominence, ut4_casablanca, ut4_arena1, ut4_mykonos_a17, ut4_guerrilla, ut4_poolday_v2, ut4_prague_v2, ut4_slumwar, ut4_dambridge, ut43_aztek_ruins, ut4_baeza
big_cycle = ut4_turnpike, ut4_abbey, ut4_algiers, ut4_blitzkrieg, ut4_paris, ut4_orbital_sl, ut4_arena2, ut4_austria, ut4_tohunga_b10, ut4_facade_b5, ut4_casa, ut4_village, ut4_cemetery666, ut4_sanc, ut4_uptown, ut4_terrorism3, ut4_aeropuerto, ut4_ambush, ut4_beijing_b3, ut4_commune, ut4_company, ut4_crossing, ut4_iran3, ut4_midnight, ut4_poland_b10
  1. I've started the server and the bot.

Conclusion

It works in this way to mantain the correct cyclemap unless you change the map. Sometimes mapcycle.txt seems mandatory sometimes the settings.conf seems mandatory.

In exemple

  1. Consider that I'm alone in the server
  2. Playing ut4_prominence
  3. I want to change the map to a big like a ut4_turnpike.
  4. I type !map turnpike and it works.
  5. When it turns to Turnpike the bot says: "Nextmap: prominence" because the bot consider that switch count is less than 8 (that's the number that I've considered to change the bigcycle)
  6. But if I cycle the map using !cyclemap it will not consider the settings.conf but it will consider the mapcycle.txt order changing the map to ut4_abbey.
  7. The map is abbey, if I cycle it again, the bot is ignored doing ut4_algiers. Now the bot says: Nextmap: Casablanca but it changes to algiers, ignoring the bot.

The bot nextmap don't change the server nextmap if I consider to use !cyclemap

alexanderkress commented 4 years ago

Thanks for the awesome test and detailed description. This is an important hint with the !cyclemap command. There had been an issue in urbanterror with the CVAR g_nextMap and g_nextCycleMap. Even for the get_nextmap function, I had to do a lot of workarounds to get a reliable value.

I guess there is now something similar with setting the map in small/big cycle. I will add an additional set_nextCycleMap command in the big_cycle code and check the behaviour with your test procedure. Additionally I will play around with setting g_mapcycle to a fake value if the dynamic cycle feature is used.

alexanderkress commented 4 years ago

Please check with the new release 1.12.1

apocalypsenzn commented 4 years ago

News about the 1.12.1, Today: 8vs7 running guerrilla. Server spawn: Nextmap: ut4_turnpike

I don't change anything to test... and...

Doesn't work, the nextmap was poolday, following the mapcycle.txt

alexanderkress commented 4 years ago

Damn, I fooled myself... I was tested first the setting a fake file for g_mapcycle, and this value is still set in my q3config... That's why it is working for me... Now I need to find a way to backup the g_mapcycle value in case someone (like me) changes the dynamic cycle but does not reload the UrT server

alexanderkress commented 4 years ago

It looks like, that I have a working solution... Preparing release 1.12.2...