Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Tiberian Technologies / Blackhand Studios » Tiberian Technologies Forum » Brenbot rotation command
Brenbot rotation command [message #489439] Sun, 28 September 2014 11:12 Go to next message
roszek is currently offline  roszek
Messages: 296
Registered: June 2010
Karma: 0
Recruit
The command does not seem to work properly, it doesn't list all the maps and highlights (for lack of a better word) the wrong map.

Any ideas?

[Updated on: Sun, 28 September 2014 11:19]

Report message to a moderator

Re: Brenbot rotation command [message #489440 is a reply to message #489439] Sun, 28 September 2014 16:02 Go to previous messageGo to next message
Xpert is currently offline  Xpert
Messages: 1588
Registered: December 2005
Location: New York City
Karma: 0
General (1 Star)
Never had this problem. Unless you're only running 2 maps then maybe because I've seen it bug sometimes with just 2 maps on rotation.

http://i32.photobucket.com/albums/d42/XpertMaverick/xpertyankee.jpg

Creator of NetGuard, an IRC network regulator.
Developer of the CloudyServ 0.982-X project.
Developer of the CloudyServ Ren-X bot.

Part time streamer - https://twitch.tv/gg_wonder
Re: Brenbot rotation command [message #489442 is a reply to message #489440] Sun, 28 September 2014 20:43 Go to previous messageGo to next message
roszek is currently offline  roszek
Messages: 296
Registered: June 2010
Karma: 0
Recruit
Xpert wrote on Sun, 28 September 2014 16:02

Never had this problem. Unless you're only running 2 maps then maybe because I've seen it bug sometimes with just 2 maps on rotation.


Na.

I wrote a simple ssgm rotation command to show what I mean.

index.php?t=getfile&id=15077&private=0

With the brenbot command you see a map missing from the list, there are 5 maps as you can see from my plugin.

The brackets mess up when it gets to a map not listed. Neutral


  • Attachment: rot_bug.jpg
    (Size: 21.19KB, Downloaded 434 times)

[Updated on: Sun, 28 September 2014 20:45]

Report message to a moderator

Re: Brenbot rotation command [message #489510 is a reply to message #489439] Fri, 03 October 2014 13:08 Go to previous messageGo to next message
shaitan is currently offline  shaitan
Messages: 727
Registered: April 2005
Location: Pennsylvania
Karma: 0
Colonel
It happens a lot with our brenbot as well.

Aircraftkiller wrote on Sun, 18 Jan 2004 07:38

I get along with people fine, so long as they aren't rejects who promised things that they couldn't
deliver on, or forum trolls who contribute nothing except to bloat the fragile egos of the same
rejects I despise.

Re: Brenbot rotation command [message #489511 is a reply to message #489439] Fri, 03 October 2014 14:17 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
BRenBot reads the rotation from your tt.cfg file like so;

	# If using SSGM 4.0 then read the map rotation from the tt.cfg file
	if ( $ssgm_version >= 4 )
	{
		my $ttConfigFile;
		my $mapRotationIdx = -1;

		open ( ttConfigFile, $config_fdspath."/tt.cfg" );
		while ( <ttConfigFile> )
		{
			# Start of map rotation section?
			if ( /^rotation\:$/ )
			{
				$mapRotationIdx = 0;
			}

			# End of map rotation section?
			elsif ( $mapRotationIdx >= 0 && /^\];$/ )
			{
				$mapRotationIdx = -1;
			}

			elsif ( $mapRotationIdx >= 0 && /^\s*\"(.+)\"\,?$/ )
			{
				chomp(my $mapname=$1);
				my %hash;
				$hash{'mapname'} = $mapname;
				$hash{'id'} = $mapRotationIdx;
				push (@maplist, \%hash);

				# Increment map rotation def index
				$mapRotationIdx++;
			}
		}
		close ( ttConfigFile );
	}


http://steamsignature.com/card/1/76561197975867233.png
Re: Brenbot rotation command [message #489512 is a reply to message #489439] Fri, 03 October 2014 14:18 Go to previous messageGo to next message
Ethenal is currently offline  Ethenal
Messages: 2532
Registered: January 2007
Location: US of A
Karma: 0
General (2 Stars)

Maybe I fixed this in Jelly's BR? I recall at least the wrong map being highlighted, I'm unsure as to what caused that though... but I don't ever see any problems with it now

-TLS-DJ-EYE-K wrote on Mon, 18 March 2013 07:29

Instead of showing us that u aren't more inteligent than a Toast, maybe you should start becomming good in renegade Thumbs Up

Re: Brenbot rotation command [message #489513 is a reply to message #489439] Fri, 03 October 2014 17:12 Go to previous messageGo to next message
Xpert is currently offline  Xpert
Messages: 1588
Registered: December 2005
Location: New York City
Karma: 0
General (1 Star)
I thought you upload fixes to the brenbot repository so that it's universal to everyone Dont Get It

http://i32.photobucket.com/albums/d42/XpertMaverick/xpertyankee.jpg

Creator of NetGuard, an IRC network regulator.
Developer of the CloudyServ 0.982-X project.
Developer of the CloudyServ Ren-X bot.

Part time streamer - https://twitch.tv/gg_wonder
Re: Brenbot rotation command [message #489515 is a reply to message #489439] Sat, 04 October 2014 04:46 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
The map that gets highlighted is based purely on the index of the map in the rotation, so it just counts N maps from the first one and highlights that one. BRenBot uses the mapnum command to get the position the server is currently at in the rotation (this works better than searching for a specific map *name* because a map can appear in the rotation more than once)

If you inject maps into the rotation outside of tt.cfg then BRenBot won't know about them and thus the rotation which is displayed will be wrong.


http://steamsignature.com/card/1/76561197975867233.png
Re: Brenbot rotation command [message #489516 is a reply to message #489515] Sat, 04 October 2014 10:42 Go to previous messageGo to next message
roszek is currently offline  roszek
Messages: 296
Registered: June 2010
Karma: 0
Recruit
danpaul88 wrote on Sat, 04 October 2014 04:46

The map that gets highlighted is based purely on the index of the map in the rotation, so it just counts N maps from the first one and highlights that one. BRenBot uses the mapnum command to get the position the server is currently at in the rotation (this works better than searching for a specific map *name* because a map can appear in the rotation more than once)

If you inject maps into the rotation outside of tt.cfg then BRenBot won't know about them and thus the rotation which is displayed will be wrong.


All the maps are set up in the tt.cfg in the same way yet for some reason one does not show up, if I change the rotation around it will show a different map missing.

The plugin I used above is set up in the same way basically as you describe;

	for(int i = 0; i<Get_Map_Count(); i++)
	{
		if( Get_Current_Map_Index() == i)
			map = StringClass::getFormattedString("[%s]",Get_Map(i));
		else
			map = Get_Map(i);
		list += " " + map;
	}


I'm not sure why one works and the other doesn't display all the maps. :/
Re: Brenbot rotation command [message #489576 is a reply to message #489439] Sun, 12 October 2014 15:25 Go to previous messageGo to next message
OuTSMoKE is currently offline  OuTSMoKE
Messages: 52
Registered: April 2009
Location: Chicago, IL
Karma: 0
Recruit

I've had this happen on different occasions with my bot, maybe what I've foind to be the case with mine will help you.


Situation 1:

A map or two doesnt load right in the fds, but in the list it shows up.

Example:

In game = Complex
Rotation = [Complex] Mesa Islands BunkersTS
Nextmap = Mesa

Complex ends, for some reason Mesa doesnt load, so the server loads Islands, and results in this:

In game = Islands
Rotation = Complex [Mesa]Islands BunkersTS
Nextmap = Islands
Actual next map loaded = BunkersTS

So basically if a map is missing or doesnt load in the FDS properly, it fucks up the rotation list.

======

Situation 2:

I only have the above issue on my test server, as I'm running MPF's random rotation plugin on the public Kambot.!rotation is out the window, but !nextmap is alwasy accurate.

It WOULD be cool if some how the brenbot could check the !nextmap and highlight the proper map in !rotation, but I find it really a non-issue.

Here's what my current setup looks like, after a fresh restart and one gameover:

[5:24pm] <~OuTSMoKE> !gi
[5:24pm] <&KamServ> Gameinfo: (WOL) Map: C&C_Tib_Pit_3.mix GDI: 0/52 players 0 points Nod: 0/52 players 0 points 0.00.00 mins left SFPS: 1130561

[5:24pm] <~OuTSMoKE> !rot
[5:24pm] <&KamServ> Host: The map rotation includes:
[5:24pm] <&KamServ> Host: Islands [Airai_b7] Alpine_Night Arid
[5:24pm] <&KamServ> Host: Arena Atoll_b3 Aurora backstab_b5
[5:24pm] <&KamServ> Host: BattleCreek Big_Walls Bio BoxedInV4
[5:24pm] <&KamServ> Host: bridge Bridge_Control BunkersTS Cairo
[5:24pm] <&KamServ> Host: Canyon Caves City_Flying_Re City2_extended
[5:24pm] <&KamServ> Host: Cliffs Clover Colossus2r1 Complex
[5:24pm] <&KamServ> Host: conflicts Conquest_Island Conquest_Winter Country_Side
[5:24pm] <&KamServ> Host: Creekdale_flying Death_Pass Delta Desert_Seige2
[5:24pm] <&KamServ> Host: DesertTunnels DomesV2 Dusk EKIsland
[5:24pm] <&KamServ> Host: EVA_Relaunch FieldTS Frag_City Forgotten_Town
[5:24pm] <&KamServ> Host: Fortress2k4 Fusion Gigantomachy GlacierTS
[5:24pm] <&KamServ> Host: GrasslandAssault Grotto_b3 Hangmans_Canyon High_Altitude
[5:24pm] <&KamServ> Host: High_Noon_2 HillBilly_Valley Hourglass Hourglass_Flying
[5:24pm] <&KamServ> Host: Installation Islands Madness Mars
[5:24pm] <&KamServ> Host: Mesa Metropolis MetroTS MinesTS
[5:24pm] <&KamServ> Host: Niagra Night0X Nightfly2 Oasis_Flying
[5:24pm] <&KamServ> Host: Overlook Plunder_Valley Pompeii Port_Rev
[5:24pm] <&KamServ> Host: Quick_Draw River_Canyon RiverValley Ruins0X
[5:24pm] <&KamServ> Host: Siege Snow Storm_Walls_Flying SunFusion
[5:24pm] <&KamServ> Host: Tech_City The_Moon Tib_Field Tib_Pit_3
[5:24pm] <&KamServ> Host: Tib_Waste Tomb Tropics Under
[5:24pm] <&KamServ> Host: Underpass Urban_Rush Volcano_Flying WallsEVO
[5:24pm] <&KamServ> Host: Wasteland Worthy_Classic

As you can see, the [] in the rotation just moves down the list, instead of highlighting the current map.

Hope this info can help either you or danpaul, or the TT people, whatever. Like I said, I don't mind it, but I can see how others' might.




http://i237.photobucket.com/albums/ff42/BTNHBoardOuTSMoKE/CNCSig2.jpg
Kambot NewMaps 4.1 Marathon Server Owner


Re: Brenbot rotation command [message #489580 is a reply to message #489439] Mon, 13 October 2014 15:52 Go to previous messageGo to next message
StealthEye is currently offline  StealthEye
Messages: 2518
Registered: May 2006
Location: The Netherlands
Karma: 0
General (2 Stars)

Is there a reason why brenbot doesn't use the "mlist all" command to get the map rotation? Or is it just that that command was not available at the time the brenbot logic was written? Sounds like it would be more robust and reliable.

The server skipping maps sounds strange. Does that happen without modifications? Sounds like a bug in that case.

PS. Using a libconfig parser for tt.cfg is probably better than writing a custom parser. Perl seems to have a library for it: http://search.cpan.org/~cnangel/Conf-Libconfig-0.05/lib/Conf/Libconfig.pm


BlackIntel admin/founder/coder
Please visit http://www.blackintel.org/

[Updated on: Mon, 13 October 2014 16:01]

Report message to a moderator

Re: Brenbot rotation command [message #489597 is a reply to message #489439] Sat, 18 October 2014 14:47 Go to previous messageGo to next message
Ethenal is currently offline  Ethenal
Messages: 2532
Registered: January 2007
Location: US of A
Karma: 0
General (2 Stars)

Just an update: we've put fanmaps back on Jelly and we definitely have a bugged !setnextmap command. I knew it happened in the past but I couldn't remember what the problem was - my current hypothesis is that it moves the rotation forward one map each time you type !setnextmap - so it may actually be changing the "next" map to the one you requested, but it moves the rotation forward one slot so by the time the game ends the server skips multiple maps ahead.

I'll let you know as I mess with it, I'll probably be able to fix it.


-TLS-DJ-EYE-K wrote on Mon, 18 March 2013 07:29

Instead of showing us that u aren't more inteligent than a Toast, maybe you should start becomming good in renegade Thumbs Up

Re: Brenbot rotation command [message #489603 is a reply to message #489580] Sun, 19 October 2014 11:50 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
StealthEye wrote on Mon, 13 October 2014 23:52

Is there a reason why brenbot doesn't use the "mlist all" command to get the map rotation? Or is it just that that command was not available at the time the brenbot logic was written? Sounds like it would be more robust and reliable.


The rotation code in BRenBot was updated before all those mlist etc commands existed. Some parts were updated to use things like mlistc (and restore it after the map ends) but for the most part it still uses whats in tt.cfg.


http://steamsignature.com/card/1/76561197975867233.png
Re: Brenbot rotation command [message #489611 is a reply to message #489439] Mon, 20 October 2014 11:18 Go to previous messageGo to next message
StealthEye is currently offline  StealthEye
Messages: 2518
Registered: May 2006
Location: The Netherlands
Karma: 0
General (2 Stars)

Fair enough. Thanks for the info.

BlackIntel admin/founder/coder
Please visit http://www.blackintel.org/
Re: Brenbot rotation command [message #489648 is a reply to message #489597] Wed, 29 October 2014 19:52 Go to previous messageGo to next message
roszek is currently offline  roszek
Messages: 296
Registered: June 2010
Karma: 0
Recruit
Ethenal wrote on Sat, 18 October 2014 14:47

Just an update: we've put fanmaps back on Jelly and we definitely have a bugged !setnextmap command. I knew it happened in the past but I couldn't remember what the problem was - my current hypothesis is that it moves the rotation forward one map each time you type !setnextmap - so it may actually be changing the "next" map to the one you requested, but it moves the rotation forward one slot so by the time the game ends the server skips multiple maps ahead.

I'll let you know as I mess with it, I'll probably be able to fix it.


I see something a little different.

Say I have maps 1234567 in the tt config and I am on map 1, I do a setnextmap to say map 6 (or whatever) my rotation no longer lists as 1234567 after map 1 ends, it will now list as 1334567.

[Updated on: Wed, 29 October 2014 20:10]

Report message to a moderator

Re: Brenbot rotation command [message #489655 is a reply to message #489439] Thu, 30 October 2014 05:58 Go to previous messageGo to next message
Ethenal is currently offline  Ethenal
Messages: 2532
Registered: January 2007
Location: US of A
Karma: 0
General (2 Stars)

Hmm... well our primary issue turned out to be a missing comma in tt.cfg, so we were having rotation bugs even without using !setnextmap

I've found you can check the current map with "mlist <#>", you can find the current man number # with "mapnum", and you can change a map # to be a different map with "mlistc <#> <map>"


-TLS-DJ-EYE-K wrote on Mon, 18 March 2013 07:29

Instead of showing us that u aren't more inteligent than a Toast, maybe you should start becomming good in renegade Thumbs Up

Re: Brenbot rotation command [message #489656 is a reply to message #489439] Thu, 30 October 2014 06:20 Go to previous message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
BRenBot uses mapnum to determine the current position in the rotation and mlistc to change a map in SSGM 4.0 and newer.

http://steamsignature.com/card/1/76561197975867233.png
Previous Topic: Serial Change
Next Topic: Pressing the chat log button as the game ends causes crash
Goto Forum:
  


Current Time: Sat Apr 13 21:51:24 MST 2024

Total time taken to generate the page: 0.00947 seconds