mc_teo
2011-07-08 20:43:29
Hello,
I've working on the script manager since yesterday.
As of now, it can download a script database, and show a list of scripts that aren't installed currently, or have newer versions available. (Its been decided to leave these in the same list, but I've made them in such a way as New Scripts and Updated Scripts can be kept separate).
Installing scripts works grand, but updating scripts is the problem. Now it just overwrites any files from previous versions. This includes installing the fresh new version without any of the users settings (such as Account details).
I've thought of two ways to get around this, and Dgby714 has contributed a third.
-Global Account Storage-
This would involve having the username and password combination somewhere where every script can access it.
Pros:
-Persistent Tagging-
Since both versions of the script can be accessed while updating, if predefined area can be copied from one area to the next. So say wrap the player details in the first script with {!–DATA(ACCOUNT) BEGIN–!} and {!–DATA(ACCOUNT) END–!} tags, and the part between then would be basically copied and pasted to the same tags in the new script.
Pros:
-Smart Merging-
"basicly get a diff of old->new and apply it to edit and if it fails just use new (fresh script)" says it all really.
Pros:
Anyway, feedback is needed to see which method would be the best, currently I think the Tagging method has the most potential, but I'll leave it down to you far-sighted individuals to see which is more appropriate.
~mc_teo
P.S. maybe a poll should be added.
I've working on the script manager since yesterday.
As of now, it can download a script database, and show a list of scripts that aren't installed currently, or have newer versions available. (Its been decided to leave these in the same list, but I've made them in such a way as New Scripts and Updated Scripts can be kept separate).
Installing scripts works grand, but updating scripts is the problem. Now it just overwrites any files from previous versions. This includes installing the fresh new version without any of the users settings (such as Account details).
I've thought of two ways to get around this, and Dgby714 has contributed a third.
-Global Account Storage-
This would involve having the username and password combination somewhere where every script can access it.
Pros:
- Can be encrypted, so fairly secure. (rather than leaving plaintext passwords in the script)
- Easy for the scripter to use.
- Could be security issues (Could be avoided my making some encryption mandatory)
- Can only be used for certain global info, like account/army details.
-Persistent Tagging-
Since both versions of the script can be accessed while updating, if predefined area can be copied from one area to the next. So say wrap the player details in the first script with {!–DATA(ACCOUNT) BEGIN–!} and {!–DATA(ACCOUNT) END–!} tags, and the part between then would be basically copied and pasted to the same tags in the new script.
Pros:
- Easy to implement within the scriptmanager.
- Can be used for any type of data (each "tag" can have a unique identifier)
- Very easy for the end user, as require so further action.
-Smart Merging-
"basicly get a diff of old->new and apply it to edit and if it fails just use new (fresh script)" says it all really.
Pros:
- Easy to maintain, as its just a diff of the two files.
- Could be messy, and some scripts could break it.
Anyway, feedback is needed to see which method would be the best, currently I think the Tagging method has the most potential, but I'll leave it down to you far-sighted individuals to see which is more appropriate.
~mc_teo
P.S. maybe a poll should be added.