Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-22-2006, 12:39 AM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
Ratings System

I need to give Classic's Spar Rating back. I don't quite understand these.

updateratingdeviation(float, float) - returns float - old deviation, time of last spar, returns new deviation
updateratings(obj) - returns object - updates an array of {rating1,ratingdeviation1, rating2,ratingdeviation2, ...}, init them at 1500 and 350

would the time of last spar be in terms of timevar2?
updateratingdeviation(player.ratingd,player.client r.spartime);

updateratings(obj)... just don't get this at all.

euhh... maybe I do now? But still, how often should rating deviation be checked?

Last edited by jake13jake; 02-22-2006 at 04:04 AM..
Reply With Quote
  #2  
Old 02-22-2006, 10:26 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Yes timevar2
You only need to update the deviation each login I guess, the minimum value for the deviation is 75, and it is raising by one each day without spar I think.

PHP Code:
newratings updateratings({winner.rating,winner.ratingd,loser.rating,loser.ratingd});
winner.rating newratings[0];
winner.ratingd newratings[1];
winner.lastspar int(timevar2);
loser.rating newratings[2];
loser.ratingd newratings[3];
loser.lastspar int(timevar2); 
Reply With Quote
  #3  
Old 02-23-2006, 01:09 AM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
Quote:
Originally Posted by Stefan
Yes timevar2
You only need to update the deviation each login I guess, the minimum value for the deviation is 75, and it is raising by one each day without spar I think.

PHP Code:
newratings updateratings({winner.rating,winner.ratingd,loser.rating,loser.ratingd});
winner.rating newratings[0];
winner.ratingd newratings[1];
winner.lastspar int(timevar2);
loser.rating newratings[2];
loser.ratingd newratings[3];
loser.lastspar int(timevar2); 
Yea, it's nice to be able to use the default ratings system this way. However, I'd really like to be able to read these vars clientside, so I can rewrite the ratings display. It's the same problem with not being able to see if a player is paused using a nickname system.

I mean, rating and ratingd are being sent to the client anyway by pressing R and when the ratings are updated. If a player is paused it is being sent to the client in the form of adding (paused) at the end of the player's nickname. Is there any particular reason you wouldn't want these vars to be readable clientside? I don't want to use player.attr[] like I have been using for (paused) because I'd rather use them for how they were intended. If not, can you SERIOUSLY make the attr[] variables accessible through RC. I'm going through hell messing with them.

Hmmm... also... is player.lastspar a default variable?
Reply With Quote
  #4  
Old 02-23-2006, 02:25 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Can add read access to rating and ratingd.
lastspar is not a default variable
Reply With Quote
  #5  
Old 02-23-2006, 07:08 AM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
Quote:
Originally Posted by Stefan
Can add read access to rating and ratingd.
lastspar is not a default variable
Okay, can you add read access to paused (for the players array)?
hmm... why isn't there an updateAP(killerAP,killedAP)? I can't figure out the equation :'(.
I'm thinking
if (opponent AP > 20)
?100: decreases by 15
80-99: decreases by 10
60-79: decreases by 8
40-59: decreases by 6
?20-39: decreases by 4
?0-19: decreases by 2

100 doesn't really matter because we're going to make it so that saints get dropped by at least 5... might make it 10, and probably reserve 15 for if they killed someone with their one hit. when they simply hit someone, regardless of opponent AP.

Last edited by jake13jake; 02-23-2006 at 08:43 AM..
Reply With Quote
  #6  
Old 02-23-2006, 10:30 PM
Riot Riot is offline
Delteria Management
Join Date: Nov 2003
Location: Seminole County, Florida
Posts: 280
Riot is on a distinguished road
Quote:
Originally Posted by jake13jake
Okay, can you add read access to paused (for the players array)?
hmm... why isn't there an updateAP(killerAP,killedAP)? I can't figure out the equation :'(.
I'm thinking
if (opponent AP > 20)
?100: decreases by 15
80-99: decreases by 10
60-79: decreases by 8
40-59: decreases by 6
?20-39: decreases by 4
?0-19: decreases by 2

100 doesn't really matter because we're going to make it so that saints get dropped by at least 5... might make it 10, and probably reserve 15 for if they killed someone with their one hit. when they simply hit someone, regardless of opponent AP.
Quote:
Originally Posted by newfeatures2001.txt
- new pk tag system:
when having less than 40 alignment points (showap) then
you can't increase your power; when you die then you will
get 3 hearts back when ap<20, 5 hearts when ap<40 and
full power when you die while ap>=40;
when you kill someone then your power will decreased
by (yourap/20+1)*(otherap/20);
when ap<20 then your ap will increase every 30 seconds,
when ap<40 then every 2 minutes, ..., when >=80 then
every 30 minutes (no 90 ap limit anymore)
Reply With Quote
  #7  
Old 02-24-2006, 12:55 AM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
Quote:
Originally Posted by Riot
Wow, those newfeatures.txts do come in handy every now and then.
Quote:
Originally Posted by Stefan
Can add read access to rating and ratingd.
lastspar is not a default variable
Yea, for players[i].paused, players[i].rating, and players[i].ratingd, I just rescripted everything assuming that they're going to exist as read-only vars.

Last edited by jake13jake; 02-24-2006 at 01:58 AM..
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 12:50 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.