Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Graal V4 Main Forum (https://forums.graalonline.com/forums/forumdisplay.php?f=143)
-   -   deletefolder(path) (https://forums.graalonline.com/forums/showthread.php?t=65207)

Warcaptain 04-05-2006 05:46 AM

deletefolder(path)
 
deletes a custom folder (not like the levels folder) on the file browser so long as the contents are empty.

i need this for my login system, for the time being im going to have to make a way to reuse folders but this stinks because i have to add another client->server->client sequence to check if the character folder exists or is empty.

anyways, thanks :)

KuJi 04-06-2006 05:29 AM

Wouldn't this be in future improvements as it does not exist yet?

But: Deleting custom folders should be in the rc :-(.
And: You are making a folder for every character?

But it should be added :-D

Warcaptain 04-06-2006 08:10 AM

Yes you can delete custom folders in RC but thats not dynamic and thats what the system needs to work as.

Yes, everything gets its own folder, items.. characters. accounts.. clans, etc

KuJi 04-07-2006 03:17 AM

Warcaptain: That would end out to be a lot of folders, if you think about it.

Warcaptain 04-07-2006 07:03 AM

Yes, thousands probably thousands more if there is no deletefolder() function.

KuJi 04-07-2006 07:22 AM

Just wondering, but wouldn't thousands of folders use up file size even if they are empty?

It's really going to be crazy if you ever accessed the folder that had all that, you should do it more like GK, and use one text file for all their items etc...

Warcaptain 04-07-2006 08:02 PM

Folders take virtually no space, our system has a text for each type of attribute to the player. ie: flags,items,location, etc

Once deletefolder() works it will be highly effecient.

KuJi 04-08-2006 04:13 PM

So each player has one folder, and inside you have Account_Flags.txt | Account_items.txt | Account_Locations.txt | Account_Weapons.txt?

Warcaptain 04-08-2006 04:24 PM

Eh, something along those lines but not quite. :)

KuJi 04-08-2006 05:08 PM

So what do you have a folder for Items then a billion text files for each item?

Warcaptain 04-08-2006 11:35 PM

Each item has a text file and then the players character has a file with an array of all their items (the indexes) in it.

KuJi 04-09-2006 06:36 AM

I think you are crazy heh.

Why would each item need a folder? Each item is probally like 300 bytes.

Warcaptain 04-09-2006 07:04 AM

Eh.. each item doesnt have a folder.. And what would you know anyways?

KuJi 04-09-2006 05:09 PM

* I ment Text File.

And I don't understand why this is all needed, I think its crazy ;o.

Warcaptain 04-09-2006 11:35 PM

It works well, its not very demanding at all. :)

ApothiX 04-11-2006 03:44 PM

I'm assuming he's making a mudlib-type thing. Items have archetypes and are all separate text files. His folder structure is probably something like:

Archetypes/Items/<itemtype>/*.arc
Mudaccounts/<accountname>/Flags.txt
Mudaccounts/<accountname>/Items.txt
Mudaccounts/<accountname>/whateverelse.txt

Warcaptain 04-11-2006 08:50 PM

Indeed, only its a bit more different because I am using a character based system.. players can have more than one character

ApothiX 04-14-2006 01:16 AM

Quote:

Originally Posted by Warcaptain
Indeed, only its a bit more different because I am using a character based system.. players can have more than one character

Same with my server, but how are you doing it? Mudaccounts/<AccountName>/<CharacterNumber>/* ?

Warcaptain 04-14-2006 04:48 AM

Pretty much. The system works pretty flawlessly and I am quite happy with its progress.

I do things so manadb/characters/charname/* and manadb/accounts/accname/*

that way i dont have to keep a file with a list of all the characters to check if an character with the name alreay exists... also it (since no deletefolder exists) allows me to reuse character folders :)

That way if player with acc1 makes a char named Bob and then deletes it.. if player acc2 makes a char named bob, it will reuse the folder. (saving space)


All times are GMT +2. The time now is 01:19 AM.

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