Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Save NPCs in Subdirectories (https://forums.graalonline.com/forums/showthread.php?t=84945)

cbk1994 04-01-2009 08:42 AM

Save NPCs in Subdirectories
 
There should be a way to specify if a DB NPC (putnpc2) is put into the npcs/ folder, or a subdirectory of that.

I know that you can have the NPCs simply save locally, and they will be stored separately; however, there is no option to just put them in a different place without saving them locally.

Perhaps an options fourth paramater could be added to putnpc2, something like

PHP Code:

putnpc2(3232"""items/"); 

The reason I would like this is because it is currently impossible to make a backup of Era's NPCs (copying from the npcs/ directory to a local folder) because RC2, RC1, and scripted-RC all fail to view the directory since it has too many files.

TSAdmin 04-01-2009 11:33 AM

Most definitely agreed.

Edit: hmm, on a side note, maybe to avoid having to worry about custom subfolders by creating a complete fourth parameter, the subfolders could be automatically created based on the level name they're in.

Eg: npcs/onlinestartlocal.nw/npc_blahblah.txt

Chompy 04-01-2009 02:03 PM

Quote:

Originally Posted by TSAdmin (Post 1480068)
Most definitely agreed.

Edit: hmm, on a side note, maybe to avoid having to worry about custom subfolders by creating a complete fourth parameter, the subfolders could be automatically created based on the level name they're in.

Eg: npcs/onlinestartlocal.nw/npc_blahblah.txt

I agree aswell, but not to the levelname idea.
Would create a lot of sub-directories which aren't needed.

If you could categorize the sub-folder yourself, that would be better.

npcs/blocks/npc_blahblah.txt
npcs/items/npc_blahblah.txt
npcs/objects/npc_blahblah.txt
npcs/misc/npc_blahblah.txt
etc...

TSAdmin 04-01-2009 02:29 PM

Quote:

Originally Posted by Chompy (Post 1480088)
I agree aswell, but not to the levelname idea.
Would create a lot of sub-directories which aren't needed.

If you could categorize the sub-folder yourself, that would be better.

npcs/blocks/npc_blahblah.txt
npcs/items/npc_blahblah.txt
npcs/objects/npc_blahblah.txt
npcs/misc/npc_blahblah.txt
etc...

^ Even better, still. Good thinking, Chompy :)

Basically:
npcs/classname/npc_stuff.txt

cbk1994 04-01-2009 06:41 PM

Quote:

Originally Posted by TSAdmin (Post 1480092)
^ Even better, still. Good thinking, Chompy :)

Basically:
npcs/classname/npc_stuff.txt

Pretty much, but it would have to be your own customization, because a lot of NPCs have many classes joined.

salesman 04-01-2009 08:33 PM

I support this idea!

Deas_Voice 04-02-2009 04:53 PM

i agree and support this! :)

cbk1994 04-09-2009 04:06 AM

bump

Accela 04-10-2009 12:34 PM

Despite being totally unfamiliar with DB npcs, I agree, as it sounds important. >:[

-Bump.-

devilsknite1 04-10-2009 07:07 PM

*Confused*
Are you trying to get the NPC itself saved to a custom folder?
If so, then Stefan add it now. >;(

Admins 04-14-2009 11:05 AM

I don't think that this will be added anytime soon. It will be possible to expand the "savelocally" approach and also support that for gmaps. The npcs should be saved depending on their location.

fowlplay4 04-14-2009 05:13 PM

I don't really find this "handy" since if it was that important you should be managing the localnpcs yourself through a variable database method or even in the SQL.

Just use the following folder config for now if you're just doing backups:

NPC Code:

rw npcs/npc*
-rw npcs/npclocalnpc*


Inverness 04-14-2009 05:57 PM

Quote:

Originally Posted by fowlplay4 (Post 1483824)
I don't really find this "handy" since if it was that important you should be managing the localnpcs yourself through a variable database method or even in the SQL.

Just use the following folder config for now if you're just doing backups:

NPC Code:

rw npcs/npc*
-rw npcs/npclocalnpc*


I can't believe I never thought of that, rep++.

Deas_Voice 04-14-2009 06:09 PM

Quote:

Originally Posted by Stefan (Post 1483750)
The npcs should be saved depending on their location

lame excuse IMO

cbk1994 04-14-2009 09:36 PM

Quote:

Originally Posted by Stefan (Post 1483750)
I don't think that this will be added anytime soon. It will be possible to expand the "savelocally" approach and also support that for gmaps. The npcs should be saved depending on their location.

I disagree, the 'savelocally' cannot always be used. I don't see how it would be extremely hard to add this option, and it would certainly be worth it. Saving based on level could be a mess since it would be impossible to organize stuff, plus you'd have huge folders for the main overworld.


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

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