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 07-11-2008, 09:42 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
The "mudlib" obsession

  1. It seems that the average forum user/scripter on Graal has no real concept as to what a "mudlib" really is.
    Quote:
    Originally Posted by Wikipedia
    A mudlib is a library of interpreted code used to create a MUD. It is interpreted code usually written in the LPC language. The code is interpreted on the fly by a driver.
    Quote:
    Originally Posted by Wikipedia
    In computer gaming, a MUD (Multi-User Dungeon, Domain or Dimension) is a multi-player computer game that combines elements of role-playing games, hack and slash style computer games and social chat rooms.
    So, please can we stop using the term "mudlib" to describe your scripts?

  2. Can someone please explain to me what advantages a system that reads and writes from text files for all player or item data really has? I find it difficult to believe that, whatever it is, it justifies the:

    • More CPU cycles going to loss to read and write text files when the gserver is already doing this for Database NPC flags or player attributes;
    • Greater memory usage in caching both player flags and even more text data;
    • Files filling up file manager which are just going to turn into a disorganised mess;
    • More layers of scripting that could potentially go wrong and may need debugging, or more things to confuse someone else who has to work with your systems.
This GST doesn't approve.
Reply With Quote
  #2  
Old 07-11-2008, 09:47 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
I use clientr. strings for most of my item systems because I find that they're more efficient than loading from text files all the time, I normally frown upon the use of text databases unless they actually plan on having multiple characters, similar to how Zodiac allows you to select which character you'd like to use.
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #3  
Old 07-11-2008, 09:51 PM
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
I find clientr strings extremely messy, and, given the RC bug which crops them to 256 characters, a mess waiting to happen.
Reply With Quote
  #4  
Old 07-11-2008, 09:52 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by DustyPorViva View Post
I find clientr strings extremely messy, and, given the RC bug which crops them to 256 characters, a mess waiting to happen.
It strikes me that you might be saving too much superfluous data, then.
Reply With Quote
  #5  
Old 07-11-2008, 09:54 PM
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
It depends on what you want to save, honestly.
My system involved items having unique statistics, so it all had to be saved individually for each weapon.
Reply With Quote
  #6  
Old 07-11-2008, 09:55 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by DustyPorViva View Post
It depends on what you want to save, honestly.
My system involved items having unique statistics, so it all had to be saved individually for each weapon.
Well, even in that case, how were you saving each individual statistic? In strings like "str+1,dex+2"?
Reply With Quote
  #7  
Old 07-11-2008, 09:56 PM
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
Regardless of what you call them, I like them because they allow custom items, as does everyone else. Strings are rather messy and a pain to deal with in my opinion.
__________________
Reply With Quote
  #8  
Old 07-11-2008, 09:57 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by cbk1994 View Post
Regardless of what you call them, I like them because they allow custom items, as does everyone else. Strings are rather messy and a pain to deal with in my opinion.
Strikes me that you might not be organising your strings in the best fashion, then. I've never found myself needing a text file for something that I couldn't do using existing engine stuff. :/
Reply With Quote
  #9  
Old 07-11-2008, 09:57 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
;O

I only use text files for items, item templates and players..
I usually cache them in forms of objects though :o

I could probably use a DB, but meh.. I like textfiles more, since then I don't need to give NC to people who make items :o
__________________
Reply With Quote
  #10  
Old 07-11-2008, 09:59 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by Chompy View Post
;O

I only use text files for items, item templates and players..
I usually cache them in forms of objects though :o
The problem is that would have quite a big memory footprint (not to mention the overhead of instantiating new objects for, well, everything) when the engine is already caching built-in flags. I still don't see the advantage.
Reply With Quote
  #11  
Old 07-11-2008, 09:59 PM
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
Quote:
Originally Posted by Skyld View Post
Well, even in that case, how were you saving each individual statistic? In strings like "str+1,dex+2"?
No, I saved them just as numbers. I actually tried to keep it under 256 characters, but that doesn't account for future additions/long names, any other number of variables introduced by other staff. And anyways, when all done, all I had was a huge mess of numbers and quotes because graal turns {}'s into ""s, which is makes it even harder to read.
Reply With Quote
  #12  
Old 07-11-2008, 10:01 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by DustyPorViva View Post
No, I saved them just as numbers. I actually tried to keep it under 256 characters, but that doesn't account for future additions/long names, any other number of variables introduced by other staff. And anyways, when all done, all I had was a huge mess of numbers and quotes because graal turns {}'s into ""s, which is makes it even harder to read.
You could just use a single integer with bit flags for true or false values, and providing you don't go into too many dimensions, the quotemark conversion shouldn't become a problem.
Reply With Quote
  #13  
Old 07-11-2008, 10:04 PM
Kristi Kristi is offline
Bowie's Deciple
Kristi's Avatar
Join Date: Dec 2003
Location: Boston, MA
Posts: 748
Kristi has a spectacular aura aboutKristi has a spectacular aura about
Send a message via AIM to Kristi Send a message via MSN to Kristi
Quote:
Originally Posted by DustyPorViva View Post
No, I saved them just as numbers. I actually tried to keep it under 256 characters, but that doesn't account for future additions/long names, any other number of variables introduced by other staff. And anyways, when all done, all I had was a huge mess of numbers and quotes because graal turns {}'s into ""s, which is makes it even harder to read.
So use more then one variable, then it won't overflow. Crazy pills?
__________________
Reply With Quote
  #14  
Old 07-11-2008, 10:04 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
If you want people to use client variables more often fix the stupid 255 character limit or its not happening.

Using more than one variable works but it shouldn't be necessary in the first place.
__________________
Reply With Quote
  #15  
Old 07-11-2008, 10:05 PM
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
Quote:
Originally Posted by Kristi View Post
So use more then one variable, then it won't overflow. Crazy pills?
That's even worse.
Reply With Quote
  #16  
Old 07-11-2008, 10:06 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by Inverness View Post
If you want people to use client variables more often fix the stupid 255 character limit or its not happening.
I still don't see why you need to be storing that much data, when there are methods to store the same detail of information in less space.
Quote:
Originally Posted by Inverness
Using more than one variable works but it shouldn't be necessary in the first place.
It may encourage more human-friendly flag arrangements.
Reply With Quote
  #17  
Old 07-11-2008, 10:06 PM
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 Skyld View Post
Strikes me that you might not be organising your strings in the best fashion, then. I've never found myself needing a text file for something that I couldn't do using existing engine stuff. :/
I find it easier to load from text files than loading from a database of strings ... I'm not talking about how you store the strings in a player.

However, I usually use text files for that so that I can have multiple characters.

But, it's much easier for incompetent staff to edit some text files than strings in a database NPC without messing **** up.
__________________
Reply With Quote
  #18  
Old 07-11-2008, 10:06 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by Kristi View Post
So use more then one variable, then it won't overflow. Crazy pills?
I had to do that just for the item's description.. >_>

I say fix the 255 char limit as Inverness said
__________________
Reply With Quote
  #19  
Old 07-11-2008, 10:08 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by Skyld View Post
I still don't see why you need to be storing that much data, when there are methods to store the same detail of information in less space.
It doesn't matter if you see the reason or not. The point is that the character limit is a problem that needs to be fixed.

Of course there are ways to store large data in less space but I'd rather do that on my own and not be forced by some silly character limit that just breaks scripts.
__________________
Reply With Quote
  #20  
Old 07-11-2008, 10:09 PM
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
Quote:
Originally Posted by Skyld View Post
It may encourage more human-friendly flag arrangements.
Until the player gains a lot of items... then you have a huge mess of flags. I honestly hate looking through the flags of players on systems that used clientr's for item databasing.
Reply With Quote
  #21  
Old 07-11-2008, 10:11 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Zodiac also has a problem with the 255 character limit, and they decided to remove every staff's "set attributes" right..
__________________
Reply With Quote
  #22  
Old 07-11-2008, 10:13 PM
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
That was my intention when I was working on my system. Remove all rights to set attributes and then create my own debugging system that allows you to change/add/remove weapons that way.
Reply With Quote
  #23  
Old 07-11-2008, 10:16 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
And here we have a good example of why bugs should be fixed instead of avoided like the GST are saying.
__________________
Reply With Quote
  #24  
Old 07-11-2008, 10:21 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by Inverness View Post
And here we have a good example of why bugs should be fixed instead of avoided like the GST are saying.
I do not endorse that we avoid fixing bugs, but a bug like that is hardly reason enough to completely abandon client flags when straight-forward optimisations that I would like to hope you are using anyway would provide a suitable workaround.
Reply With Quote
  #25  
Old 07-11-2008, 10:21 PM
[email protected] sid.gottlieb@googlemail.com is offline
Banned
Join Date: Mar 2008
Posts: 861
sid.gottlieb@googlemail.com will become famous soon enough
if done correctly, you generally only need to load the item once it's been changed and then storing the data in a global flag, how is that causing lag?

fix the 255 character limit and i might just actually use the clientr flags

opening era's item database causes lagg [items 900+], why use a database??

your reasons for not using a mudlib are void, why should we use clientr.flags?
why does GK use a mudlib is clientr flags are available??
Reply With Quote
  #26  
Old 07-11-2008, 10:25 PM
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
My idea(well really Zero's) was to load the item upon login, and then store them in objects. Only need to save them was upon any sort of change. I don't find that too demanding, really.

I would love to use clientr flags as it's really the least amount of hassle, but I'd really, really hate to see random glitches appear because item data is getting cropped.
Reply With Quote
  #27  
Old 07-11-2008, 10:26 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by [email protected] View Post
if done correctly, you generally only need to load the item once it's been changed and then storing the data in a global flag, how is that causing lag?

opening era's item database causes lagg [items 900+], why use a database??
In this instance, loading things from text files is more CPU cycles and memory overhead than is required than directly accessing a flag would produce.
Quote:
Originally Posted by [email protected] View Post
your reasons for not using a mudlib are void, why should we use clientr.flags?
How are they void? You are clearly not focusing enough here on performance.
Quote:
Originally Posted by [email protected] View Post
why does GK use a mudlib is clientr flags are available??
Because GK actually has a proper mudlib library available in the NPC-Server which means that script CPU cycles are not being used instead.
Reply With Quote
  #28  
Old 07-11-2008, 10:29 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by Skyld View Post
I do not endorse that we avoid fixing bugs, but a bug like that is hardly reason enough to completely abandon client flags when straight-forward optimisations that I would like to hope you are using anyway would provide a suitable workaround.
That bug has been around for years and I highly doubt it would be difficult to fix.

If Stefan would just put a bit of time into looking at it and fixing it we wouldn't have this problem. That or pass on the RC code to someone else who can do it.

People have been complaining about it for forever can someone just effing fix it already.
__________________
Reply With Quote
  #29  
Old 07-11-2008, 10:31 PM
[email protected] sid.gottlieb@googlemail.com is offline
Banned
Join Date: Mar 2008
Posts: 861
sid.gottlieb@googlemail.com will become famous soon enough
Quote:
Originally Posted by Skyld View Post
In this instance, loading things from text files is more CPU cycles and memory overhead than is required than directly accessing a flag would produce.
not really, no.
your loading a file as you are loading a flag, sure it'll take a little more CPU but not a substantial amount though.

Quote:
Originally Posted by Skyld View Post
How are they void? You are clearly not focusing enough here on performance.
please try to create a system that has alot of information in each flag
currently, my item system contains the following flags, make try make them into a flag with less than 255 chars.
HTML Code:
#The archetype name
realname=Fung Si Yan

#The file location
archetype=equipment/shields/

#The Display Name
displayname=Fung-Si-Yan Shield

#The Display Icon
itemimage=Shield-FungSiYan

#Item Description
itemdescription=Forged by the almight Stefan at birth!

#The Weight [kg]
weight=10

#The Value [Rupees]
value=5

#Can Be Traded
candrop=true

#base, agility, magic, mental, personality, physique, wisdom
reqlevels={0, 0, 0, 0, 0, 0, 0}

#strength, dexterity, vitality, intelligence, wisdom, power, charm 
reqstats={0, 0, 0, 0, 0, 0, 0}
basestats={3, 3, 3, 0, 0, 0, 0}

#Item Data [+Melee weapon functions]
itemname=+Shields
itemequip=true
itemganis=fungsiyan

#Can The Shield Break
canbreak=true
#Amount Of Hits Taken Then It Breaks
breakamount=750
Quote:
Because GK actually has a proper mudlib library available in the NPC-Server which means that script CPU cycles are not being used instead.
didn't know this, release to servers that want a mudlib to solve the CPU issue?
Reply With Quote
  #30  
Old 07-11-2008, 10:42 PM
Kristi Kristi is offline
Bowie's Deciple
Kristi's Avatar
Join Date: Dec 2003
Location: Boston, MA
Posts: 748
Kristi has a spectacular aura aboutKristi has a spectacular aura about
Send a message via AIM to Kristi Send a message via MSN to Kristi
Quote:
Originally Posted by [email protected] View Post
not really, no.
your loading a file as you are loading a flag, sure it'll take a little more CPU but not a substantial amount though.
False
Quote:
Originally Posted by [email protected] View Post
didn't know this, release to servers that want a mudlib to solve the CPU issue?
He was implying it used exactly what he was saying everyone else should (flags and such)
__________________
Reply With Quote
  #31  
Old 07-11-2008, 10:44 PM
[email protected] sid.gottlieb@googlemail.com is offline
Banned
Join Date: Mar 2008
Posts: 861
sid.gottlieb@googlemail.com will become famous soon enough
Quote:
Originally Posted by Kristi View Post
False
prove it.

Quote:
He was implying it used exactly what he was saying everyone else should (flags and such)
don't get your reply at all, so why not release the gk method?
Reply With Quote
  #32  
Old 07-11-2008, 10:48 PM
Kristi Kristi is offline
Bowie's Deciple
Kristi's Avatar
Join Date: Dec 2003
Location: Boston, MA
Posts: 748
Kristi has a spectacular aura aboutKristi has a spectacular aura about
Send a message via AIM to Kristi Send a message via MSN to Kristi
Quote:
Originally Posted by [email protected] View Post
prove it.
What, that the gserver is optimized to handle flags over loading data from a textfile? That is just a fact, simply true.
Quote:
Originally Posted by [email protected] View Post
don't get your reply at all, so why not release the gk method?
It's simply scripted without reading textfiles, the same point skyld was making.
__________________
Reply With Quote
  #33  
Old 07-11-2008, 10:52 PM
[email protected] sid.gottlieb@googlemail.com is offline
Banned
Join Date: Mar 2008
Posts: 861
sid.gottlieb@googlemail.com will become famous soon enough
Quote:
Originally Posted by Kristi View Post
What, that the gserver is optimized to handle flags over loading data from a textfile? That is just a fact, simply true.
i didn't say that loading a text file was faster than loading data from a flag. it's not a substantial difference from loading a flag than a text file.

Quote:
It's simply scripted without reading textfiles, the same point skyld was making.
explain how gks system works please
Reply With Quote
  #34  
Old 07-11-2008, 11:21 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
I really would like to be able to use client flags for a system but its simply not happening until I can be assured that they wont get cut off without having to take set attributes away from all the staff.
__________________
Reply With Quote
  #35  
Old 07-12-2008, 02:49 AM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
I'm using a DB NPC as cache for all items on Mythic, and simply only update the required flags if the file that the data is stored in is changed. Yes, there is a function to check if a file is updated in folders, quite useful too.

Then I just have item system related script's grab the string from the database, and it'll be guaranteed to be the same as the data in the file.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #36  
Old 07-12-2008, 06:39 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Quote:
Originally Posted by Skyld View Post
In this instance, loading things from text files is more CPU cycles and memory overhead than is required than directly accessing a flag would produce.
Item archetype data on a normal day should only be read from, not written to unless there is an update to the server (which should be in the form of server updating, patching, etc; not this mess of small updates every 5 minutes like most Graal servers do).

As for the item data of a player inventory:
It's not exactly black and white, only the inexperienced scripters see it that way. There are many ways which you can make a hybrid system that both uses text files optimally as well as built-in features for speed and performance.

You may not see any advantages to text files but I have already seen a ton named in this thread so let me spell them out to you (plus a few more):
  • 255 Character Bug - I'll start with this one since it seems to be the most commonly named here. RC messes up client., clientr. and other player. strings that are saved to the player. Now this isn't really a viable reason as it isn't that hard to create a player editor in-which you can edit players and avoid having to modify them while they are playing (causes them to "jump back in time", unprofessional, etc).
  • Organization - You can't expect to be the scripter on a server forever. When I first took a look at Maloria's player attributes and then a few years later, Zodiacs, I was searching for a needle in a haystack. Not the mention the amount of time it took to load an experienced player's attributes. To put it simply, text files allow you to place the data in what ever form you see fit. Again though, you can always build an editor that can interpret the player attributes and organize it for you, but you still are just leaving a robot to search through your messy room, that's all.
  • Security - Probably one of the most important reasons; by saving data to a text file, you are increasing security both with the leaking of information and the modifying of information. Any kid and his dog knows how to /open a given player, and either find out everything about that player or make some kind of modification that will be forever lost in the mess that is rclog.txt. Yes, text files are logged even worse but if no one has rights to those text files, the only modification possible would be through scripts; this can't be used as a counter arguement though as a scripter could much more easily modify a variable on a player then loadlines, modify, savelines, etc. By separating data into text files, you can allocate who can read and modify what.
  • Stability - Also could be classified under security, file data stability. Data stored in player attributes isn't really safe data. Anyone who works on a classic server for just a little while know how much your player data just sits on a thin thread. Some idiot with /reset rights could "accidentally" reset a player and all the data that could have taken months to acquire goes down the drain.
    On Zodiac, some scripter was making something inside a database npc and forgot some syntax in his with () block. You know what happened? The whole database was deleted along with a few others. I know that was an error on his part but it doesn't change the fact that it was so easy to do (by accident as well). Text files can't be "destroy()ed".

I know that Graal will automatically sync client. and clientr. variables but if you don't have any client. or clientr. variables, it doesn't matter now does it?

Anyways, I didn't put to much effort into that list but there are a few clear cut reasons why text files can be useful. Again, text files can be more performance intensive that's why in most cases, hybrid systems are best.
__________________
Do it with a DON!
Reply With Quote
  #37  
Old 07-12-2008, 10:21 PM
[email protected] sid.gottlieb@googlemail.com is offline
Banned
Join Date: Mar 2008
Posts: 861
sid.gottlieb@googlemail.com will become famous soon enough
I have actually just made an item system that only uses one flag [the amount of the item] but it's not a proper mudlib :[

I'm sticking with it though, doesn't cause any lagg at all =D
Reply With Quote
  #38  
Old 07-13-2008, 12:52 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Quote:
Originally Posted by [email protected] View Post
I have actually just made an item system that only uses one flag
Mine doesn't use any flags other then a clientsided this.data that is updated upon login/weapon update
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #39  
Old 07-13-2008, 01:24 PM
[email protected] sid.gottlieb@googlemail.com is offline
Banned
Join Date: Mar 2008
Posts: 861
sid.gottlieb@googlemail.com will become famous soon enough
i just transfer all item data and don't even store them on the client, they are global clientside vars containing the data
Reply With Quote
  #40  
Old 07-14-2008, 07:15 AM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Quote:
Originally Posted by [email protected] View Post
i just transfer all item data and don't even store them on the client, they are global clientside vars containing the data
If they are clientside variables, you are storing them on the client o.O


Also, why no reply to my long explanation, people?
__________________
Do it with a DON!
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 11:51 PM.


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