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 08-25-2002, 11:49 AM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
A new way of data storage

For NPCs Server:

There are few ways to store data on the server, and all of them can be erased quite easily. The ones that can't are inaccessable. My proposal would be a way of storing information on the server in text files that you can call up server side to be read. The following commands would be needed.



addline textfile,text; adds a line of text into the textfile on the server
insertline textfile,linenumber,text; Inserts a line of text at the line number in the text file (every line is ended by a return character)
replaceline textfile,linenumber,text; Replaces the text at "linenumber" with "text"
removeline linetext,textfile; remove the first line of text that is equal to "linetext"
deleteline textfile,linenumber; Deletes the line of text at "linenumber"

#l(linenumber,textfile) Gets the line of text in the textfile at "linenumber"

textlen(textfile) Number of lines in the text file


All these commands would be serverside ofcourse. Maybe stored in another directory named "Serverdata" or something along that lines... It would be good for storing perminant data that can be accessed by NPCs on the server, the posibilities are almost limitless. Additional (yet optional) commands that could be added are...


gettext textfile; downloads the textfile off the server for offline use (if under 64k)
#l(linenumber,textfile) Same as above, only the clientside version will search on the players computer for the textfile


Note: when I say line number, every line of text in the text file is seperated by a return character, much like every token is seperated by either a comma or a space.
__________________

subliminal message: 1+1=3

Last edited by Falcor; 08-26-2002 at 06:29 AM..
Reply With Quote
  #2  
Old 08-25-2002, 12:08 PM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
I like the idea but this sounds like a more efficent way of serverstrings (since they are used in a similar way, they are stored in a txt file)
Reply With Quote
  #3  
Old 08-25-2002, 12:09 PM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
Quote:
Originally posted by Python523
I like the idea but this sounds like a more efficent way of serverstrings (since they are used in a similar way, they are stored in a txt file)
Serverstrings have a 210 character limit. Text files have NONE. And I doubt they would be erased accidentally either. These text files would be for more perminant data. Maybe attributes of certain peoples accounts or whatnot. Let your imagination run wile. Posibilities are endless.
__________________

subliminal message: 1+1=3
Reply With Quote
  #4  
Old 08-25-2002, 12:10 PM
G_yoshi G_yoshi is offline
Forbidden
G_yoshi's Avatar
Join Date: Mar 2001
Posts: 7,206
G_yoshi will become famous soon enough
Send a message via AIM to G_yoshi
Re: A new way of data storage

Quote:
Originally posted by Falcor
For NPCs Server:

There are few ways to store data on the server, and all of them can be erased quite easily. The ones that can't are inaccessable. My proposal would be a way of storing information on the server in text files that you can call up server side to be read. The following commands would be needed.



addline textfile,text; adds a line of text into the textfile on the server
insertline textfile,linenumber,text; Inserts a line of text at the line number in the text file (every line is ended by a return character)
replaceline textfile,linenumber,text; Replaces the text at "linenumber" with "text"
removeline linetext,textfile; remove the first line of text that is equal to "linetext"
deleteline textfile,linenumber; Deletes the line of text at "linenumber"

#l(linenumber,textfile) Gets the line of text in the textfile at "linenumber"


All these commands would be serverside ofcourse. Maybe stored in another directory named "Serverdata" or something along that lines... It would be good for storing perminant data that can be accessed by NPCs on the server, the posibilities are almost limitless. Additional (yet optional) commands that could be added are...


gettext textfile; downloads the textfile off the server for offline use (if under 64k)
#l(linenumber,textfile) Same as above, only the clientside version will search on the players computer for the textfile


Note: when I say line number, every line of text in the text file is seperated by a return character, much like every token is seperated by either a comma or a space.
the only problem I can see is the clientside message code...suppose the player edits the text file?
__________________
Reply With Quote
  #5  
Old 08-25-2002, 12:12 PM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
Re: Re: A new way of data storage

Quote:
Originally posted by G_yoshi


the only problem I can see is the clientside message code...suppose the player edits the text file?
Suppose he/she does? It doesn't matter, as long as you dont use that text file for his account's attributes or anything... Maybe you could use it as more of information.. Perhaps a bullitin bord in townsquare or something that wouldn't effect the players statistics, just something to read.
__________________

subliminal message: 1+1=3
Reply With Quote
  #6  
Old 08-25-2002, 12:21 PM
G_yoshi G_yoshi is offline
Forbidden
G_yoshi's Avatar
Join Date: Mar 2001
Posts: 7,206
G_yoshi will become famous soon enough
Send a message via AIM to G_yoshi
Re: Re: Re: A new way of data storage

Quote:
Originally posted by Falcor


Suppose he/she does? It doesn't matter, as long as you dont use that text file for his account's attributes or anything... Maybe you could use it as more of information.. Perhaps a bullitin bord in townsquare or something that wouldn't effect the players statistics, just something to read.
I suppose, but still...if you make it accessable through the client, then maybe the text file should be encrypted?
__________________
Reply With Quote
  #7  
Old 08-25-2002, 12:28 PM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
Doesn't have to, as you shouldn't be stupid enough to be accessing valuable information from the client itself...
__________________

subliminal message: 1+1=3
Reply With Quote
  #8  
Old 08-25-2002, 12:32 PM
G_yoshi G_yoshi is offline
Forbidden
G_yoshi's Avatar
Join Date: Mar 2001
Posts: 7,206
G_yoshi will become famous soon enough
Send a message via AIM to G_yoshi
Quote:
Originally posted by Falcor
Doesn't have to, as you shouldn't be stupid enough to be accessing valuable information from the client itself...
Yes, I know that...but you must consider those that aren't that intelligent...at least have some kind of safe guard to keep people from screaming at Stefan or someone else for a mistake they made :/
__________________
Reply With Quote
  #9  
Old 08-25-2002, 01:02 PM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
Quote:
Originally posted by G_yoshi


Yes, I know that...but you must consider those that aren't that intelligent...at least have some kind of safe guard to keep people from screaming at Stefan or someone else for a mistake they made :/
Bah, you don't understand. Encrypting and decrypting takes up time. Time that doesn't need to be wasted. I doubt that newbie scripters will be mentally capable of using such comands like this anyhow... Even if they were, they couldn't. Since most servers don't have npcs servers. We shouldn't have to spoon-feed newbies. We'll let them learn the errors of their ways. Maybe they will think before they script?
__________________

subliminal message: 1+1=3
Reply With Quote
  #10  
Old 08-25-2002, 01:32 PM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
I'd support this, it'd certainly help with my 3D engine project in terms of storing the 3D models. And I think encryption wouldn't be too bad, at least not in terms of processor time. Not many of these things are gonna be bigger than 1k or so, and that's a heck of a lot smaller than some of the pngs Graal decodes in real time.

*shrugs*

Personally I think simple checksum protection would be fine. But whatever works.
__________________
Reply With Quote
  #11  
Old 08-25-2002, 02:05 PM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
Quote:
Originally posted by Kaimetsu
I'd support this, it'd certainly help with my 3D engine project in terms of storing the 3D models. And I think encryption wouldn't be too bad, at least not in terms of processor time. Not many of these things are gonna be bigger than 1k or so, and that's a heck of a lot smaller than some of the pngs Graal decodes in real time.

*shrugs*

Personally I think simple checksum protection would be fine. But whatever works.
I guess you could encrypt it with something very very minor. It would make it hard to edit on a whim. Still not sure it's entirely necissary though, but whatever floats the boat.
__________________

subliminal message: 1+1=3

Last edited by Falcor; 08-25-2002 at 02:19 PM..
Reply With Quote
  #12  
Old 08-25-2002, 04:16 PM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
Stefan could code a Graal Text Editor.

The files could have an extension of *.gtf, *.gtxt, or something of the sort.
The files would be encryted and the GTE would automatically decrypt for editing and encrypt the information on saving.
__________________
[signature]insert here[/signature]
Reply With Quote
  #13  
Old 08-25-2002, 11:01 PM
jeff335 jeff335 is offline
Registered User
Join Date: Oct 2001
Posts: 605
jeff335 is on a distinguished road
Thumbs up

Oddly enough I'd been thinking of something like this.


I have a certain project stewing in the back of my head that needs better data storage to ever have a chance, and believe you me it's a yummy one.

Amen!
__________________

Quote:
Some people like standing around talking to idiots in the real world, and some don't. Neither choice is inherently better than the other.

-Kaimetsu
Reply With Quote
  #14  
Old 08-26-2002, 12:52 AM
konidias konidias is offline
Old Bee
konidias's Avatar
Join Date: Jul 2001
Location: Orlando, FL
Posts: 7,222
konidias will become famous soon enough
Send a message via AIM to konidias
It would be ultimate for things like storing books and stuff for players to read on the server... things like that would be good.

Since only 2k2 gets the "mudlib" with all the data stored in it. =/
__________________

Put this image in your sig if you support Bomy Island! (g2k1 revision)
play bomberman while you wait!


Reply With Quote
  #15  
Old 08-26-2002, 06:26 AM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
Quote:
Originally posted by konidias
Since only 2k2 gets the "mudlib" with all the data stored in it. =/
From how Er1c talks about it, mudlib isn't a really good thing to have anyhow. o.o

ADDED: textlen(textfile)
__________________

subliminal message: 1+1=3
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:21 AM.


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