ScoreSave mutator

Search, find and discuss about Mutators!

Re: ScoreSave mutator

Postby iloveut99 » Tue Aug 17, 2010 6:30 pm

Hm... Seems I found a bug? :loool:

Seems this mod radically increase/change fph scores in dm scoreboard. There's any chance that it don't interfere with scoreboard?
Last edited by iloveut99 on Sat Aug 21, 2010 1:52 pm, edited 1 time in total.
iloveut99
Skilled
 
Posts: 231
Joined: Mon Aug 16, 2010 10:25 pm

Re: ScoreSave mutator

Postby TheDane » Sat Aug 21, 2010 9:45 am

just make it restore the players preveous gametime too and the fph should once again be accurate.

but, realy, this mutator has been made over and over again and again ... it was originaly íntended as use against the disconnect/reconnect to get rid of bad scoring/deaths etc. Many server base their score upon eff%, so reconnecting would reset your stats, and by only 1 frag you'd be back at 100% eff.
Semi-Retired UT fan(atic).
User avatar
TheDane
Masterful
 
Posts: 575
Joined: Tue Feb 12, 2008 2:47 pm
Personal rank: *censored*

Re: ScoreSave mutator

Postby MrLoathsome » Sun Aug 22, 2010 12:53 am

I may revisit this and add the gametime value to the data that gets restored.

Will post update here if I do so.
blarg
MrLoathsome
Inhuman
 
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Location: MrLoathsome fell out of the world!
Personal rank: I am quite rank.

Re: ScoreSave mutator

Postby iloveut99 » Sun Aug 22, 2010 11:30 am

Ok thanks. :)
iloveut99
Skilled
 
Posts: 231
Joined: Mon Aug 16, 2010 10:25 pm

Re: ScoreSave mutator

Postby iloveut99 » Sun Aug 29, 2010 3:37 pm

I have updated for myself the mod, so it does restore the player start Time, it does fix indeed the f2 fph scoreboard.

However it does display the wrong fph if a player reconnect and have some frags in f1 panel... Seems the variable of this panel does not get recovered and use the actual game time. It does not interfere with the FPH f2 panel however.

If somebody knows how to fix the F1 FPHS scoreboard let me know.

The new code is attached.
Attachments
ScoreSave_v2.0(iloveut99).zip
(5.34 KiB) Downloaded 149 times
iloveut99
Skilled
 
Posts: 231
Joined: Mon Aug 16, 2010 10:25 pm

Re: ScoreSave mutator

Postby MrLoathsome » Wed Sep 01, 2010 1:48 am

I think if you add an update to the PlyrStartTime[] array in the ScoreKill function, it will fix that issue.**

Note, I will be releasing a fix on this in a day or 3, perhaps even later tonight.
New version will also save the players team and a few other values.

Update:

** Actually, it will be needing a bit more than that.....

I spent some time rewriting this thing so that it uses a timer as it should instead of latching on to the ScoreKill function.
The rate at which the mutator saves the current values will be adjustable via an ini setting.
Current version works exactly as the previous version and has the exact same issue with the Time & FPS values on the F1 scoreboard. :loool:
(The F2 stats are only written to the servers ini file at the end of each game, and would not be changing during a match.)

Adding the StartTime as iloveut99 suggested gets the correct info sent to all other players in the game.
However the player who is reconnecting will get invalid values for Time and FPS for ALL players, including himself.

In order to fix this, if I can, I will need to take a look at trying to initialize the reconnecting players HUD with the current values for all the other
players & bots in the game, as well as the saved values for that player.

Not sure at this point why they don't synch up, but they don't. I was testing today with 2 client PC's connecting to a dedicated server.
The PC I left connected to the server, was showing the correct Time/FPS values for all players, including the player who had disconnected and
rejoined the game. While the Score/Deaths are getting shown correctly on the reconnecting players HUD, The Time values for
all players and bots get reset to 1, which screws up the FPS numbers.

As usual, this has become a bit more involved than expected. It may be a bit longer than the 2-3 day estimate before a new
version is released.

Thanks to iloveut99 for the feedback and for picking the correct name for the PlyrStartTime array. :tu:
blarg
MrLoathsome
Inhuman
 
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Location: MrLoathsome fell out of the world!
Personal rank: I am quite rank.

Re: ScoreSave mutator

Postby iloveut99 » Wed Sep 01, 2010 10:24 am

Np. :D

Yeah seems the only incorrect info is the in reconnecting player panel. Both the server (so it does save the correct stats at the end) and other player get the correct info.

Agree with you, a timer() may be less cpu intensive and should work well too.

Thanks for the effort.
iloveut99
Skilled
 
Posts: 231
Joined: Mon Aug 16, 2010 10:25 pm

Re: ScoreSave mutator

Postby MrLoathsome » Sat Sep 11, 2010 12:00 am

Guess I lied about when I would release an update.....

I did get a rewrite that uses a timer done, but nothing I have tried fixes the problem with the Frags Per Second stats on the
reconnecting player. New version does also restore the players team, but I didnt test that extensively. If the team fills up
before the reconnection, I dunno what is gonna happen... Didn't seem worth releasing a new version with the fps still broke.

I believe the root of the problem is in the GRI.PRIArray and the fact that the reconnecting player is going to have a new PlayerID value.
Any attempts I made to try and get that in synch with the saved values seem to crash the server nicely with a segmentation fault.

The mutator is a bit of a hack actually, and I was sort of surprised it works
as well as it does.

I may clean up the current timer version, and take out the possibly problematic restore on the players team, and release that later
if there is any interest. It will function exactly as the prior version, and have the same problem at this point.

If anybody has any ideas on how to fix that fps issue, and they work, I could include that in the next version.

If there is one.....

Moo !
blarg
MrLoathsome
Inhuman
 
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Location: MrLoathsome fell out of the world!
Personal rank: I am quite rank.

Re: ScoreSave mutator

Postby MrLoathsome » Sun Sep 12, 2010 8:53 pm

Well attached is the new version that uses a timer.

Currently update rate is once every 10 seconds. That is hardcoded so you will need
to edit the source and recompile if you wish to adjust that.

Frags Per Second stat is still broken for reconnecting players. Further testing
shows it is broken on the server side also, so if that stat is important, this mutator
is not for you.

In this version, the reconnecting player will see the correct stat for others in the game
however anybody can reconnect at any time and reset their own Starttime and fps for
that player gets all out of wack.

*See post 1 for current release
Last edited by MrLoathsome on Tue Nov 30, 2010 4:03 am, edited 1 time in total.
blarg
MrLoathsome
Inhuman
 
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Location: MrLoathsome fell out of the world!
Personal rank: I am quite rank.

Re: ScoreSave mutator

Postby iloveut99 » Sun Sep 26, 2010 12:47 am

Frags Per Second stat is still broken for reconnecting players. Further testing
shows it is broken on the server side also, so if that stat is important, this mutator
is not for you.


Are you sure? :o

Restoring the player start time in my version seems to fix it serverside. And it is running in my server at some weeks.

Also why do you stop and restart the timer() at lines 56 and 84? Didn't got it. :)
iloveut99
Skilled
 
Posts: 231
Joined: Mon Aug 16, 2010 10:25 pm

Re: ScoreSave mutator

Postby MrLoathsome » Sun Sep 26, 2010 6:48 pm

Seems you are correct regarding the StartTime. I have added that back for this version.

Regarding the Starting and Stopping of the timer in ModifyPlayer.

There is a remote, but possible chance that if a player reconnects at the
same point in time that the Timer function is updating the arrays, one
or more of the values in the array could get set to zero from the PRI
before the ModifyPlayer function has restored the values from the array.

By turning the timer off at ModifyPlayer start and then back on at the end
of the function, I think this eliminates the chance of that happening.

Thanks again for the feedback and testing !
Last edited by MrLoathsome on Tue Nov 30, 2010 4:04 am, edited 1 time in total.
blarg
MrLoathsome
Inhuman
 
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Location: MrLoathsome fell out of the world!
Personal rank: I am quite rank.

Re: ScoreSave mutator

Postby Qwerty » Fri Oct 01, 2010 4:50 pm

does this actually work with smart ctf? because when you get a gpf or have to reconnect your points will be restored but not your frags. thanks
http://www.vulpinemission.com
Image ROCKET-X8 Server
Image MONSTERHUNT w/ NALI WEAPONS 3 + RX8
Image BUNNYTRACK NY
Image SNIPER DEATHMATCH
Image ROSEBUM ROCKET-X RB
Qwerty
Masterful
 
Posts: 656
Joined: Wed Mar 12, 2008 7:14 pm
Location: New York
Personal rank: I.T Master

Re: ScoreSave mutator

Postby iloveut99 » Sat Oct 02, 2010 10:00 pm

Seems there's a bug with spectators.

Here's how to replicate:

-Play a while in the server
-Reconnect as spectator
-Reconnect as player

You got your stats reseted and not recovered.

Maybe that's because you are also saving "spectator" stuff?

Maybe you should change "if (!Other.IsA('Bot'))" to "if (!Other.IsA('Bot') && !Other.IsA('Spectator'))"

or better:
Code: Select all
local TournamentPlayer NewPlayer;
   local int i;
   local string PName;

   SetTimer(0.0, False);
   if ( NextMutator != None )
      NextMutator.ModifyPlayer(Other);

        NewPlayer = TournamentPlayer(Other);
   if (NewPlayer!=None)
                   ....


?

Another nice feature would be the timer time configurable in some *.ini.

Edit\

Tested your RC3 version for real (what I was saying above was based in a custom version of yours that I did for my server), so see if the above applies to your mutator;

This time I tested seemed that there was a bug when I respawn I got reseted in stats everytime... I played in a localhost server against bots.
iloveut99
Skilled
 
Posts: 231
Joined: Mon Aug 16, 2010 10:25 pm

Re: ScoreSave mutator

Postby MrLoathsome » Mon Oct 04, 2010 3:19 am

Good input ilovut99.

Your TournamentPlayer suggestion works fine and is better.
Still attempting to get the times on the reconnecting players hud to display correctly, but they do not atm.

Going to try a few more things later. Would like to get that working before uploading the new version if possible.
blarg
MrLoathsome
Inhuman
 
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Location: MrLoathsome fell out of the world!
Personal rank: I am quite rank.

Re: ScoreSave mutator

Postby MrLoathsome » Mon Oct 04, 2010 3:20 am

Oh yeah, also added the code to fix the spectator bug, but havent actually test that out yet.....
blarg
MrLoathsome
Inhuman
 
Posts: 958
Joined: Wed Mar 31, 2010 9:02 pm
Location: MrLoathsome fell out of the world!
Personal rank: I am quite rank.

PreviousNext

Return to Mutators

Who is online

Users browsing this forum: No registered users and 2 guests