Jump to content
Eternal Lands Official Forums
vinoveritas

Combining Folders function

Recommended Posts

I do like the work and direction that the new client is going, it really is great, but it causes for me a small problem.

For years i was used to play with my main, and some other chars by having them Seperated by folders where the personal data goes into. a few of the new client features, do not make that necessary anymore and i was thinking if it would not be good to have a way to combine the folders back into one without loosing data. and if so If it would not be good to do that by the client.

Share this post


Link to post
Share on other sites

Several obstacles:chat (and possibly server) logs, map markers, el.ini and el.cfg.

 

Tbh, I don't see any easy way to combine chat and server logs(of course, you can merge the files using the time stamps). In any case, chat from

the different characters will be mixed up if they use the same folder.

Same for map marrkers: the files are not marked with a character name. Merging those should be fairly easy, though, if you are running linux

(cat, sort and uniq should do the trick).

 

Currently, using different folders allows you to have different settings for different characters. I don't see how that will be possible with all

characters using the same folder, nor how to combine the .ini files (I don't even want to think about combining the .cfg files).

 

Spells, recipes and such do have the character name appended, so shouldn't cause problems.

 

As for doing that from within the client, I think that's a very bad idea for several reasons:

- it's something that will be used at most once for most players, but will stay in the client for potentially years;

- some of the data files are written on client exit, which means that you'd have to be very careful from which character you do the merge;

- what happens when you try to do the merge with several clients open?

And you can always tell the users that they shouldn't use that function with more than one client open, someone will ignore that...

 

Given all that, it sounds to me like something that should be done through an external script, which should be able to deal with most of the items above:

it can read the servers.lst file to figure out which folders to merge. It could potentially even check if there's a client running, in which case it should abort.

And it should be able to merge chat and server logs if that's wanted. Perhaps even create backups for the individual folders...

Share this post


Link to post
Share on other sites

yes i know it is not easy, thats why i put it as a suggestion here, it will be a lot of work (and i will offer to help there if we do it), and yes i can probably manage to merge most stuff myself with scripts and so on (not all) but others are not as versed in IT as i might be and have the same situation, so it might be a good idea to discuss it.

Share this post


Link to post
Share on other sites

I think it's a useful idea, just not a good thing to have in the client for the reasons stated.

As it's mostly a matter of moving files around (with some manipulation), I thought a script would be

the more logical way to go.

 

My idea for a script would be something like:

- read the server.lst file

- for each server (!= main), make a backup of the folder, copy the files with a "_<char>" suffix to main folder.

- for map markers: for each file in <server>.maps/*.elm.txt: concatenate with same file in <main>/maps,

    (unless it is possible now to have map markers per character, even if they use the same pseudo-server)

- chatlog??

At the end, for each file in <main>/maps/*.elm.txt: #sort $file | uniq.

(OK, this is bash based, python, perl, or something like that might be more suitable)

 

That still leaves the chat and server logs to deal with, and ignores the el.ini files completely

(I don't even want to touch the cfg files).

Share this post


Link to post
Share on other sites

I agree with revi, this does not sound like a good thing to add to the client.  Another reason being that this type of file moving and merging is more easily done in a scripting language than c/c++.  Most of the important files are tagged with the character name (or at least tagging can be enabled).  I think letting the user copy these themselves is safer and easier than writing and providing a script to run.  Perhaps we could just provide some how-to information.

 

I can't see any value in merging the chat logs, and they would be a mess anyway.  If you keep them for search purposes, then just save them somewhere tagged with the character name. 

 

Merging the el.ini file would be hard.  The el.cfg file would be much harder and require a specially written program to do as its a binary file (its on my list to replace / remove).  To be honest, I now regret adding so many options to the el.cfg file and will likely undo this at some time.  My suggestion here, is that its simpler to use the client to set the options how you want them rather than try to merge from multiple sources.

 

The map marks are interesting.  I've mostly used the same set of marks across my server.lst split.  Either using links or copying files around.  I did not think it would be useful to have per character map marks so have never looked to make that client change.  Its obviously possible to do that however; if there was the interest.  I'd probably suggest a character tagged directory name, so instead of the path "maps/startmap.elm.txt" I would have "maps_bluap/startmap.elm.txt".  That would make it easy to copy the files too.  If you want to merge the files then the cat/sort/uniq stuff mentioned would go some way to do that.  However, its likely that you will have marked slightly different coordinates so the uniq may not do as much de-duping as you would hope and it would be hard (but perhaps fun) to write a script to de-dupe close coordinates.

Share this post


Link to post
Share on other sites
1 hour ago, bluap said:

However, its likely that you will have marked slightly different coordinates so the uniq may not do as much de-duping as you would hope and it would be hard (but perhaps fun) to write a script to de-dupe close coordinates.

 

Might not be all that difficult (under linux) on a sorted list, if you use e.g. awk. More challenging would be small mispelings...

But perhaps it's better not to do that at all, and have the user do it through #unmark.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×