Forum

ASSIST, AMERICA'S ARMY COMMUNITY - RELIVE THE GLORY DAYS OF AMERICA'S ARMY 2.5

Author Topic: mapvote  (Read 14983 times)

0 Members and 1 Guest are viewing this topic.

Offline 82nd_DXO_COL=Shad

Re: mapvote
« Reply #15 on: Wednesday, June 25, 2014, 12:52:30 PM »
The source I have is
Code: [Select]
function bool CheckCanVote (string PlayerName)
{
local int i;

For(I=0;I<Voters.Length;I++)
        {
if ( PlayerName ~= Voters[i] )
{
return False;
}
}
return True;
}
I never noticed Eliz's version.

As for the map list, have an int array for the page #  that matches up with the player's name, catch in BroadcastText a keyword like !maplist or something, and each time it catches it from the player increment the page # and reset it to zero when it goes over
so, say there are 80 maps, it'd be 4 pages of 20 lines.  Each time a player submitted !maplist the page# variable would increment until >3 then =0 again.  You would display only 20 lines each time.

I'm not sure why they even need mutate in the first place.  Just catch it all through BroadcastText using the say command.  Say !mapvote.  Say !maplist.
If you want, I can come up with a version that does this.

Offline [SWISS]Merlin

Re: mapvote
« Reply #16 on: Thursday, June 26, 2014, 08:31:38 AM »
can you send me this version please, i would like to check if the other things do work fine.
would be great

btw: i would love to have that modified, but let's hear that from ELiZ

Offline ELiZ

Re: mapvote
« Reply #17 on: Thursday, June 26, 2014, 08:56:33 AM »
A fix for the "yes" problem is easy to implement .
A fix for interrupting a previous vote should also be easy to implement.

The problem is that to implement a new version of Mapvote, then we'll have to release a completely new Client/Server Version of the Assist Software. At this moment I'm not ready to do that for this small change.

Offline 82nd_DXO_COL=Shad

Re: mapvote
« Reply #18 on: Friday, June 27, 2014, 01:13:02 AM »
OK well I offered.  I'm guessing you used tcplink in order to get the map list.  The ini and PerObjectConfig options seem to want class conforming sections that tours.ini can't give.
The code I have from Crusade for determining the vote in progress is that it relies on the var bool balreadymapvote, which is checked against or set in the StartMapVote() function, set to False in the ChangeMap() and CancelMapVote() functions.

Offline Spanky

  • <?php echo $opinion .' is better.'; ?>
  • Administrator
  • Posts like a Spanky!
  • *
  • Posts: 10,896
    • View Profile
    • NatesComp.com
  • AA: tigobitties
Re: mapvote
« Reply #19 on: Friday, June 27, 2014, 17:11:46 PM »
Shad, there's nothing stopping you from building a better version. Hell, I think everybody here would encourage you do to so. The only limiting thing is the effort/reward for updating the Assist client. I'm sure if you make a new version that it will be implemented when ELiZ feels it's worthwhile to do so.
It's like shaving your pubes to make your junk look bigger.
Might look bigger, but it aint.....

Offline ELiZ

Re: mapvote
« Reply #20 on: Saturday, June 28, 2014, 10:59:36 AM »
OK well I offered.  I'm guessing you used tcplink in order to get the map list. 

No, I'm using Tours.ini

Code: [Select]
function LoadMaps()
{
local int iNumTours;
local int iNumMissions;
local int iTour;
local int iMission;
iNumTours=GetPrivateProfileInt(GetBaseDir() $ "Tours.ini","Tours","NumTours");
for (iTour=0; (iTour < iNumTours);  iTour++)
{
iNumMissions=Level.GetTourMissions(iTour);
for (iMission=0; iMission<iNumMissions; iMission++)
{
if(Level.GetTourIsTraining(iTour)==False)
{
AvailableMaps[AvailableMaps.length]=Level.GetTourMissionText(iTour,iMission);
}
}
}
}
« Last Edit: Saturday, June 28, 2014, 11:01:55 AM by ELiZ »

Offline 82nd_DXO_COL=Shad

Re: mapvote
« Reply #21 on: Saturday, July 05, 2014, 20:15:09 PM »
I had a few hours to kill today, so I took Spanky up on his challenge.  I hope I didn't waste time.


Changes:
I completely nearly rewrote mapvote
Players can say !mapvote or !maplist instead of the mutator thing.  !mapvote takes a map name or number (from the !maplist showing)
I think Crusader did the mutate command to deal with the stopping the ut2004 SetTimer() function or it was a part of his Ultimate mod package
Players can say !maplist to get a list of maps.  Every time they say !maplist, it gives another page of maps (used with extended console),
each numbered and can be used with !mapvote
Map names are properly checked.  I didn't have a compiled object.u that supports GetPrivateProfileInt() and GetBaseDir() so I just rewrote LoadMaps() to parse tours.ini with an available FOPen() command.
Training maps and the current loaded map are excluded from the list
Players are better informed as to the mapvote progress and which map
Takes at least two players to switch maps, but majority otherwise
Broadcast to the players and sender are different colors
Advertises/broadcasts the mapvote availability every 60 seconds
The player asking for the vote can cancel the vote with "Say !cancel"
Tracks all players vote, tells them they've already voted if they try again, and clears votes after the mapvote has ended. 
If a player leaves the server and comes back, it shouldn't make a difference for a vote in progress
Added an .ini to add a few configurable things in

Needed:  Not absolutely needed, but an event function to detect when a player joins or leaves the server. 
I don't have access to native headers so a uscript event function would be nice. 
AAO seems to do it differently than Unreal and I haven't been successful with the Login/PostLogin and similar events

Since it's an unauthorized mod for testing purposes:
Submitted as "testmapvote.u", add "ServerActors=testmapvote.main" to the [Engine.GameEngine] if you want to test it out.
Can use "say !debug" to dump some state info into log when you need to
PM me for the source
Get testmapvote.u here
PM me for the source code
I have a sister non-debug version as mapvote.u as well
You can try it out on server 82nd ABD Dallas #4 MapVote PickAWeap
An optional .ini can be used for a few more options by admins, but doesn't have to be distributed
Code: [Select]
[testmapvote.main]
; How often to spam "Say !mapvote..." in the console.  Doesn't display during a vote.  Default is 60 without this .ini
advertiseSecs=60

[testmapvote.testmapvote]
; Maximum times a player can ask for a mapvote.  Set to 0 to disable.  0 is default without this .ini
MaxVoteStarts=0
;    Colors: 0=white 1=yellow 2=green 3=dark blue 4=cyan 5=purple 6=light blue 7=pink 8=magenta 9=red
;    personal message, map list...ect.  Default is 8 without this .ini
MsgColor1=8
;    broadcast, asked for a mapvote, mapvote running... ect.  Default is 1 without this .ini
MsgColor2=1

Offline Spanky

  • <?php echo $opinion .' is better.'; ?>
  • Administrator
  • Posts like a Spanky!
  • *
  • Posts: 10,896
    • View Profile
    • NatesComp.com
  • AA: tigobitties
Re: mapvote
« Reply #22 on: Saturday, July 05, 2014, 23:54:22 PM »
Fantastic, excellent work. I wish this project had more people like you Shad. Don't get me wrong, ELiZ is the best thing to happen to this project since Jonny started it but he's a busy guy. If there was a dozen or so serious and knowledgeable devs like you, this project would be epic.
It's like shaving your pubes to make your junk look bigger.
Might look bigger, but it aint.....

Offline ArmyAntiCheat

Re: mapvote
« Reply #23 on: Sunday, July 06, 2014, 06:53:08 AM »
Nice work shad!:)

Offline bollie

  • Dedicated Poster
  • *****
  • Posts: 1,120
    • View Profile
Re: mapvote
« Reply #24 on: Sunday, July 06, 2014, 10:57:50 AM »
Great work!

Sadly I know nothing about programming and stuff like that... if I could, I wanted to help...

Offline [SWISS]Merlin

Re: mapvote
« Reply #25 on: Monday, July 07, 2014, 08:48:13 AM »
thanks so much, good job!!

Offline [SWISS]Merlin

Re: mapvote
« Reply #26 on: Saturday, July 12, 2014, 10:43:01 AM »
but now it would be nice to have that implemented :)
i did try this, but my server do crash because of the checks about mapvote.u

Offline teddy_grizzly_bear

  • Used to be known as nobody
  • Administrator
  • Epic Poster
  • *
  • Posts: 5,745
  • what are you looking at?
    • View Profile
  • AA: teddy_grizzIy_bear
Re: mapvote
« Reply #27 on: Saturday, July 12, 2014, 16:48:10 PM »
The problem is that to implement a new version of Mapvote, then we'll have to release a completely new Client/Server Version of the Assist Software. At this moment I'm not ready to do that for this small change.
<image removed due to imgur stuff - probably for the best>

"Mathematics may be defined as the subject in which we never know what we are talking about, nor whether what we are saying is true." Bertrand Russell

Offline [SWISS]Merlin

Re: mapvote
« Reply #28 on: Saturday, July 12, 2014, 18:08:35 PM »
thank you teddy, I know that.
maybe with a version without trainings its worth :)

Offline 82nd_DXO_COL=Shad

Re: mapvote
« Reply #29 on: Sunday, July 13, 2014, 14:08:34 PM »
at least for a non-honor server you can try it out by getting testmapvote.zip and install it as a non-honor mod.  Put testmapvote.u in your System folder and add
Code: [Select]
ServerActors=testmapvote.main to [Engine.GameEngine] section of your aa25srv.ini (and System/server/aa25srv.ini)

The mapvote.u that comes with testmapvote.zip is only meant for Eliz, should he decide to code in checking for it.

It'd probably be easier just to hop on the '82nd ABD Dallas #4 MapVote PickAWeap' server if you just wanted to test it out.

 

Download Assist

×

Download Game Client

Important: Battletracker no longer exists. However, old Battletracker accounts may still work. You can create a new 25Assist account here

Download Server Manager