Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-01-2009, 12:39 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
player.attr[]

Player attributes are extremely useful, but they tend to fill up too fast. It would be awesome if they were extended to work based on strings instead of numbers. For example, you could do something like

PHP Code:
player.attr.health "server_hpdisplay.gani,90"
I don't know the best way to make attr's work on strings instead of numbers, but I think that would be pretty viable. You could also do it similar to PHP, sort of like...

PHP Code:
player.attr["health"] = "server_hpdisplay.gani,90"
...but that doesn't really match the rest of GS2.


Regardless of how it's implemented, support for string-based (or even just more) player.attr[] values would be awesome.
__________________
Reply With Quote
  #2  
Old 12-01-2009, 12:59 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
You're using 30 attr's wtf?

but I also agree that your extended attributes suggestion would be cool.
__________________
Quote:
Reply With Quote
  #3  
Old 12-01-2009, 01:04 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
The problem is, as far as I know, is all attr's need to be sent to all players at all times, clientside and serverside. That's apparently a lot of data.
Reply With Quote
  #4  
Old 12-01-2009, 01:17 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by DustyPorViva View Post
The problem is, as far as I know, is all attr's need to be sent to all players at all times, clientside and serverside. That's apparently a lot of data.
Well, for players in the same level, yes, but only when they change. It's really not a lot of data; a player enters a level, say they have 30 attributes with "1234567890", which is probably about average length.

That ends up looking like this (pardon the max word length of the forums):

Quote:
12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890
..which is approximately 300 bytes (0.29296875 kilobytes). Obviously it'd be slightly more, but it's not a whole lot of data at all, especially since it doesn't have to update all the time.
__________________
Reply With Quote
  #5  
Old 12-01-2009, 10:19 AM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Attribute setting is probably one of the least laggy things you can do on a server that makes heavy use of them, really. I've never gone over 15 or so attributes, however, perhaps you need to combine similar-use attribute ganis together.

I understand why the current attribute functionality hasn't been expanded, however. Once you familiarize yourself with gani scripting you understand that all player attributes are sent for each player (or, at the least, each player that is shown on screen), expanding the current restrictions could cause some latency issues.
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #6  
Old 12-01-2009, 06:20 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
Normally attr[] is for things that really need to be shared - so mainly for visual things. I hoped 30 would be enough the last time when it has been increased from 9 to 30
Reply With Quote
  #7  
Old 12-01-2009, 06:27 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by Stefan View Post
Normally attr[] is for things that really need to be shared - so mainly for visual things. I hoped 30 would be enough the last time when it has been increased from 9 to 30
That was like...v2.2?
Reply With Quote
  #8  
Old 12-01-2009, 06:30 PM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Quote:
Originally Posted by Stefan View Post
Normally attr[] is for things that really need to be shared - so mainly for visual things. I hoped 30 would be enough the last time when it has been increased from 9 to 30
I think the biggest problem with them is probably that people have trouble keeping track of which ones are already being used by other scripts on the server, but for the most part, 30 attrs is more than enough.
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”

Last edited by Tigairius; 12-01-2009 at 06:41 PM..
Reply With Quote
  #9  
Old 12-02-2009, 12:10 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Tigairius View Post
I think the biggest problem with them is probably that people have trouble keeping track of which ones are already being used by other scripts on the server, but for the most part, 30 attrs is more than enough.
Yeah, this is mainly why I suggested being able to name attributes; on servers like Era and N-Pulse (had the same problem there when I worked there a while back) which have been patched together by dozens of scripts, most of them too lazy to document stuff, it's extremely hard to find unused attributes (though scriptscan helps a great deal).
__________________
Reply With Quote
  #10  
Old 12-02-2009, 12:33 AM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
On Classic I scripted a system to apply and retrieve values to and from designated attribute values, where basically a temporary array consisting of the name, attribute number and default value is looped through when the weapon is created where the necessary data is applied to a static var,
I actually happen to use a player.getAttr("health"); function, aswell as player.setAttr("health", amount);, player.loadDefaultAttr("health");, and player.isDefaultAttr(#) etc.
It can also load designated attributes from other players, and is setup serverside too in order to be synced.

Would be excellent if something like this was built-in but it's not necessary.
Reply With Quote
  #11  
Old 12-02-2009, 07:35 AM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Or maybe you guys should learn to use enumerators more often. :P
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
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 02:09 PM.


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