You are not logged in.

Applications: [GameMaster: OPEN] | [Volunteer Testers: OPEN]


This forum will be permanently shut down on Friday 13.07.2018
Please copy or save all important information from old forum before they will be deactivated
We have moved to new board. https://forum.runesofmagic.gameforge.com/Come join us.

Rossbot

Intermediate

  • "Rossbot" started this thread

Posts: 466

Location: 127.0.0.1

Occupation: Web Designer

  • Send private message

1

Friday, April 13th 2012, 11:46pm

Crashing + Addons = Reset Configuration

I've been having issues with my addons resetting when I crash sometimes. Is there a way to hold these settings, maybe make a duplicate, so I don't have to set up my addons just the way I like them? If there is a way to do this, I would greatly appreciate it.

2

Friday, April 13th 2012, 11:50pm

I don't know but I as well have had the issues where just logging out can cause my add ons to reset I would be interested to see what people would have to say about this

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

3

Saturday, April 14th 2012, 3:42am

Quoted from "Rossbot;524806"

I've been having issues with my addons resetting when I crash sometimes. Is there a way to hold these settings, maybe make a duplicate, so I don't have to set up my addons just the way I like them? If there is a way to do this, I would greatly appreciate it.


This can happen after a crash because the add-on variables aren't being saved. To manually make a backup of your settings, Go into your Document and Settings (or wherever your documents are normally stored) and find the hidden folder called Runes of Magic (you may need to enter the name manually in the address bar since it is a hidden folder). In this folder you will find a file called SaveVariables.lua. Make a copy of this file. Now for each of your characters, you will also find a folder here with the character's name. Enter each folder and make a backup of the SaveVariables.lua file you find in these as well.

To restore, delete the old file and copy/rename the backup version.

You could make a batch file to help automate the process. Something like:
(edit: Ignore these batch files, use the ones posted a little later instead. These are just examples to get the mind working :) )

Source code

1
2
3
4
5
6
7
8
9
10
11
12
@echo off
rem **** Backup Main Settings ****
cd "C:\Documents and Settings\Runes of Magic"
if NOT EXIST Backup md Backup
copy /y SaveVariables.lua .\Backup

rem **** Backup Character ****
rem the following assumes a character named Peryl
cd Backup
if NOT EXIST Peryl md Peryl
cd ..
copy /y .\Peryl\SaveVariables.lua .\Backup\Peryl


To restore you could do:

Source code

1
2
3
4
5
6
7
8
9
10
11
@echo off
rem **** Restore Main Settings ****
cd "C:\Documents and Settings\Runes of Magic"
if NOT EXIST Backup goto abort
copy /y .\Backup\SaveVariables.lua .

rem **** Restore Character ****
if NOT EXIST Peryl goto abort
copy /y .\Backup\Peryl\SaveVariables.lua .\Peryl

abort:
2013... The year from hell....

4

Saturday, April 14th 2012, 4:53am

I'll echo what Peryl (Edit: sorry about that...was typing on the Kindle... auto correct is nuts) said about the folder to save. I just want to add that what can also happen, especially when you crash, is that the savevariables file gets corrupted and the game then cannot read it even though it is still there. I back up my interface twice daily (logon and loggoff) and I make a new folder for each one. I keep anywhere from 5 to 10 days depending on how major any recent changes are.

Basically, I make a folder for each backup that, in turn, has 2 folders:

Interface - just a copy of the interface folder that is in the Runes of Magic folder in the Programs or Programs86 folder.

Variables - the full contents of the hidden RunesOfMagic folder Peryl referred to.

Its an annoyance but it gets to be easy to fix.
-- Stagger - Osha - Eyeofthetempest --

M/R/W 72/52/51
Formerly M/D/S, M/R/D (The search for decent DPS in a post GCD RoM continues)

Rossbot

Intermediate

  • "Rossbot" started this thread

Posts: 466

Location: 127.0.0.1

Occupation: Web Designer

  • Send private message

5

Saturday, April 14th 2012, 5:30am

Thank you so much!!!

Is there a way to change those batch files to do multiple characters?

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

6

Sunday, April 15th 2012, 6:58pm

Sorry for the delay.

The batch files shown above are more for example than anything else, I wrote them up directly in that post.

Try these instead. Haven't completely tested these and as I don't even have the game installed, I'm still a little iffy on the actual folder.

Anyhoo, you'll need to set the correct folder in both batch files (the line that starts with pushd). Make sure that it goes into the hidden Runes of Magic folder in your documents folder. I've also commented them so you know what each part is doing.

They can be run from anywhere on your computer since it goes to the correct folder(s) it needs to, and returns to the folder it started from.

(Oh yeah, since I run Linux instead of Windows, the line endings may be a little messed up if you just cut and paste from this post so make sure the lines are right).


BackupSettings.bat

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
@echo off
rem ==========================================
rem ==      Backup UI/add-on settings       ==
rem ==========================================


rem **** Change to RoM's settings folder, saving current folder location ****
pushd "c:\Documents and Settings\whatever\My Documents\Runes of Magic"


rem **** Create the backup folders if they don't exist ****
if not exist ..\RoMBackup md ..\RoMBackup
for /d %%n in (*) do if not exist ..\RoMBackup\%%n md ..\RoMBackup\%%n


rem **** Backup the main SaveVariables.lua file ****
copy /y SaveVariables.lua ..\RoMBackup


rem **** Backup character specific SaveVariables.lua files ****
for /d %%n in (*) do if exist .\%%n\SaveVariables.lua copy /y .\%%n\SaveVariables.lua ..\RoMBackup\%%n


rem **** Go back to folder we originally came from ****
popd
echo Settings Backup Completed.
pause


RestoreSettings.bat

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
@echo off
rem ==========================================
rem ==      Restore UI/add-on settings      ==
rem ==========================================


rem **** Change to RoM's settings folder, saving current folder location ****
pushd "c:\Documents and Settings\whatever\My Documents\Runes of Magic"


rem **** Ensure backup folder exists ****
if not exist ..\RoMBackup goto abort


rem **** Restore main settings ****
copy /y ..\RoMBackup\SaveVariables.lua .


rem **** Restore all saved character specific settings ****
cd ..\RoMBackup
for /d %%n in (*) do if exist "..\Runes of Magic\%%n" copy /y .\%%n\SaveVariables.lua "..\Runes of Magic\%%n"


goto done


:abort
rem **** Exit with error message ****
popd
echo No backup folder to restore from, aborting.
pause
exit


:done
rem **** Go back to folder we originally came from ****
popd
echo Settings Restored from Backup.
pause
2013... The year from hell....

Rossbot

Intermediate

  • "Rossbot" started this thread

Posts: 466

Location: 127.0.0.1

Occupation: Web Designer

  • Send private message

7

Monday, April 16th 2012, 3:38am

Thank you very much Peryl, I do know a little bit about programming, probably enough to understand some of that. I run Windows 7 so I'm not sure what you mean by "line endings" being different. I will test them out tonight and tell you if I have any issues.

How do I specify which characters I want save/restored? Nevermind, I guess it saves/restores all characters. Perfect.

8

Wednesday, April 18th 2012, 9:20pm

Hello, I have a problem with the batch file. When executed, it said

SaveVariables.lua
The system cannot find the file specified.
0 file<s> copied.

Please help

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

9

Wednesday, April 18th 2012, 11:09pm

Quoted from "heoboy123;526044"

Hello, I have a problem with the batch file. When executed, it said

SaveVariables.lua
The system cannot find the file specified.
0 file<s> copied.

Please help

1) Make sure the path is correct. The line starting with pushd should go to your settings folder. You will, at minimum, need to change the whatever in this line to match your Windows login name.

2) Make sure that there is an actual SaveVariables.lua file to copy (I'm pretty sure that is what it is called, but I could be remembering wrong).

3) Make sure the character folders are indeed off the main settings folder (I'm fairly sure they are, but again this is from memory so I could be forgetting a sub-folder somewhere)

4) Check that it isn't trying to also use another folder in there that isn't a character. The batch file is pretty stupid and if there is such a folder, the batch file will think it is a character and copy its SaveVariables.lua file which of course doesn't exist. If this is the case, you can safely ignore the message.

And finally,
5) Check if the batch file didn't do the job anyway.
2013... The year from hell....

10

Thursday, April 19th 2012, 1:54am

Thank you for your reply

My hidden RoM folder path: C:\Users\ADMIN\Documents\Runes of Magic

So in the batch file: pushd "C:\Users\ADMIN\Documents\Runes of Magic"

Do I have to change anything else beside that? I do have SaveVariables.lua. It does create the folder but nothing in there

When I run the batch file it shows only the above 3 lines plus Settings Backup Completed. Press any key to continue

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

11

Thursday, April 19th 2012, 2:33am

Quoted from "heoboy123;526112"

Thank you for your reply

My hidden RoM folder path: C:\Users\ADMIN\Documents\Runes of Magic

So in the batch file: pushd "C:\Users\ADMIN\Documents\Runes of Magic"

Do I have to change anything else beside that? I do have SaveVariables.lua. It does create the folder but nothing in there

When I run the batch file it shows only the above 3 lines plus Settings Backup Completed. Press any key to continue

It should create a folder called RoMBackup in C:\Users\ADMIN\Documents and put all the backup files there.

When restoring, it should read from that folder and copy stuff in there back to C:\Users\ADMIN\Documents\Runes of Magic

So make sure that the RoMBackup folder is being created, and that the files are copied over to that location.
2013... The year from hell....

12

Thursday, April 19th 2012, 4:32am

Yes it created the RomBackup folder but nothing is in there. When I ran the batch file, the following appear in the window:

[COLOR=black ! important]SaveVariables.lua
The system cannot find the file specified.
0 file<s> copied.
[/COLOR][COLOR=black !important]Settings Backup Completed.
Press any key to continue[/COLOR][COLOR=black !important]...

[/COLOR]

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

13

Thursday, April 19th 2012, 12:59pm

Change the first line to

Source code

1
rem @echo off

This will make it display each line it goes through while executing the batch file. This way we can see where it is having trouble.

It could also be a permissions thing. Try copying the file manually.
2013... The year from hell....

14

Thursday, April 19th 2012, 2:09pm

I can copy the file manually, but the last time I did it I could not save my key binding anymore and my statrating cannot save again. So I want to try this way. Here's the screenshot of the batch file when run: http://imgur.com/YBmj0

suprra

Professional

Posts: 932

Location: New Zealand

Occupation: Mechanic

Mood: Cursing

  • Send private message

15

Thursday, April 19th 2012, 3:55pm

Also if you have Windows 7 you can just right click on the runes of magic folder in my documents and choose restore previous versions and choose from versions windows has backed up. A reset UI is just not an issue for me anymore :D

Kalvan

Super Gamemaster

Posts: 2,053

Location: Lurking Amongst the Forums

  • Send private message

16

Thursday, April 19th 2012, 7:40pm

Quoted from "heoboy123;526191"

I can copy the file manually, but the last time I did it I could not save my key binding anymore and my statrating cannot save again. So I want to try this way. Here's the screenshot of the batch file when run: http://imgur.com/YBmj0


Not that I'm a programmer by any stretch of the imagination, but I see two major errors in the batchfile.

1. In the second line shown, the drive letter is D: It should be C: In fact, any of the lines which include drive letter D: should be changed to drive letter C:

2. Each line that includes "C:\Users\ADMIN\Documents\Runes of Magic" is in error. The term "ADMIN" needs to be changed to reflect the "name" of the user account you're using on the computer.

Hope this helps.
[ New Sig Coming. Watch This Space! ]


Rossbot

Intermediate

  • "Rossbot" started this thread

Posts: 466

Location: 127.0.0.1

Occupation: Web Designer

  • Send private message

17

Thursday, April 19th 2012, 8:17pm

This is the output from the backup one. http://i43.tinypic.com/a4tp4l.jpg
This is the output from the restore one. http://i39.tinypic.com/35btj00.jpg
(Yes, I have a lot of characters.)

I'm not really sure what the output means. It seems to work properly.

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

18

Thursday, April 19th 2012, 11:42pm

Quoted from "heoboy123;526191"

I can copy the file manually, but the last time I did it I could not save my key binding anymore and my statrating cannot save again. So I want to try this way. Here's the screenshot of the batch file when run: http://imgur.com/YBmj0

I think Kalvan is right about the path being incorrect. Therefore there is nothing for the batch file to copy. As Kalvan mentioned, the ADMIN part needs to reflect the name of the user account your are logged-in as.

As to the drive D: thing, that is fine. The batch file changes to the location specified in that pushd line and goes back to the location is started from with the popd command.


@Rossbot
Yeah, that can happen. I didn't suppress the copy command's output. You can suppress it by adding >nul at the end of each line with a copy command (add a space between the end of the line and the ">nul" part).

As for the error message in the restore, this is caused because the batch file mindlessly goes through every folder in the backup folder and tries to copy the file SaveVariables.lua without first checking to see if the file actually exists. You can safely ignore that message.
2013... The year from hell....

Rossbot

Intermediate

  • "Rossbot" started this thread

Posts: 466

Location: 127.0.0.1

Occupation: Web Designer

  • Send private message

19

Friday, April 20th 2012, 5:31am

Awesome, thanks very much for the help (A guildy of mine is also using these batch files). I would have been screaming at my computer much more than I already am for the crashing.

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

20

Saturday, April 21st 2012, 4:06pm

I changed the names of the batch files, but not the content (see original post) because I just realised that the old name of "Restore.bat" could be run by just using the word "Restore", but this could have the terrible consequence of running Windows' restore command instead! This would be a very bad thing (well I think it was called restore, can't really remember). I advise anyone that used the old name(s) to rename them ASAP just in case.
2013... The year from hell....