PDA

View Full Version : Command line



ThadJarvis
06-07-2010, 11:09 PM
Does Lich have any command line arguements? Maybe to start the game with a stored character?

This would be a cool feature to help recover from a game crash.

SanGreal
06-07-2010, 11:12 PM
you can use --login <character> I believe

Tillmen
06-07-2010, 11:13 PM
If you have the login info saved for the quick login tab, you can use:

lich.rbw --login Charname

For the rest of the options, see:

lich.rbw --help

ThadJarvis
06-07-2010, 11:15 PM
For me, it only spawns the Lich login window. Using --login doesn't actually log into the game. Am I doing something wrong?


lich.rbw --login myCharacter

Tillmen
06-07-2010, 11:19 PM
The login window only comes up if you enter no command line arguments.

Likely, the arguments are getting dropped because lich.rbw is being launched with its associated program. Try this:

rubyw.exe lich.rbw --login <character>

ThadJarvis
06-07-2010, 11:21 PM
That did it. I should have known.....

Thanks a bunch.

Boreus
06-08-2010, 08:28 AM
Tell me there is a way to do this from windows so that it will reconnect when my kids disco me turning on there PS3. You can't can you, your going to tell me to swicth over to my Linux box and then I have to go buy harware to be able to use both my monitors ::sigh::

Tillmen
06-08-2010, 08:53 AM
Tell me there is a way to do this from windows so that it will reconnect when my kids disco me turning on there PS3. You can't can you, your going to tell me to swicth over to my Linux box and then I have to go buy harware to be able to use both my monitors ::sigh::

That is the way to do it on windows.

ThadJarvis
06-09-2010, 05:58 AM
I'm working on a crash recovery application.

I attempted to add a "start_script" to the Lich.rbw script when the --login command line param is used. This failed. I assume its because the scripting engine isn't running at that point in the flow.

Can this be put anywhere in the Lich.rbw script and work?

Bhaalizmo
06-09-2010, 08:14 AM
I'm working on a crash recovery application.

I support this effort, although I am in no way qualified to assist. I would certainly pay a fee to use the product of your work though. May the force be with you.

Tillmen
06-09-2010, 11:55 AM
I'd add the script to your favs to have it auto start. Then, use ARGV to tell if the game was launched using --login.

exit unless ARGV.include?('--login')

ThadJarvis
06-09-2010, 05:51 PM
Can scripts spawned by the favorite grab the ARGV? Or is that only for Lich.rbw?

Tillmen
06-09-2010, 05:52 PM
They can, since ARGV is a global variable.

ThadJarvis
06-09-2010, 06:00 PM
Excellent. Thanks very much. Now i'm working on the part that detects a crash. Hopefully i'll have something to share shortly.

Boreus
06-09-2010, 07:28 PM
GAH GAH GAH now I have to switch to the linux box I haven't made it 6 hours at a shot without getting discod since Shattered started this would be awsome

ThadJarvis
06-10-2010, 05:12 PM
So i've got it to where it logs characters back in if the Wizard process isn't running, but now I need to find a way to catch the condition when the Wizard is running, but stuck at that stupid error message that says "Can't connect to the game! Go to the website?"

JohnDoe
06-10-2010, 08:40 PM
Interesting idea, I like it. Just going to work for the Wizard or for SF too? Actually, probably a dumb question, but is there a way to set SF so that it closes out once you're disconnected?

ThadJarvis
06-10-2010, 09:17 PM
I'm writing the main application in C#, so it could very easily work with SF too. I have a few solutions in mind on how to determine if the FE is open and connected.

I was thinking about making my restart script, which starts with a command line entry into the game, connect to the C# app via sockets and say, "Yes, i'm running" or something like that. Comments?

JohnDoe
06-10-2010, 09:22 PM
I'm not a lich expert, 2nd week using it, but couldn't you have lich either:
a) Write to a specific file when the connection is lost and under what conditions it was disconnected. If you were disconnected purposely (e.g. died and want to disconnect), then you wouldn't want to be reconnected.
b) Send an email or msmq type msg with the same detail as bullet a that triggers this executable?

ThadJarvis
06-10-2010, 09:37 PM
I'm not a lich expert, 2nd week using it, but couldn't you have lich either:
a) Write to a specific file when the connection is lost and under what conditions it was disconnected. If you were disconnected purposely (e.g. died and want to disconnect), then you wouldn't want to be reconnected.
b) Send an email or msmq type msg with the same detail as bullet a that triggers this executable?

That is an interesting thought about having Lich write a file, but there have been situations where the Ruby interpreter dies on me ungracefully. I think checking to determine if the application is running is probably better done using the Windows API, as if the file doesn't get written for some reason, your loader doesn't run.

The way i've got it now, it runs constantly and checks every 15 minutes to see if the processes are detected. Your suggestion has the pro of detecting a crash and re-logging potentially faster than mine. Maybe I can try them both.

Still though, I need to determine how to see if the front end is actually connected to the game or if the front end is just open and unable to connect. I'm looking into a few options.

Tillmen
06-10-2010, 10:14 PM
netstat?

daeler33
06-10-2010, 10:37 PM
info: Thu Jun 10 22:11:27 -0400 2010
info: 4.1.42
info: $lich_dir: C:/Program Files (x86)/lich/
info: $script_dir: C:/Program Files (x86)/lich/scripts/
info: $data_dir: C:/Program Files (x86)/lich/data/
info: $temp_dir: C:/Program Files (x86)/lich/temp/
info: HAVE_GTK: true
info: no launch file given
info: no force-mode info given
lich.rbw:8069:in `chr': -74 out of char range
from lich.rbw:8069
from lich.rbw:8069:in `collect'
from lich.rbw:8069
from lich.rbw:1103:in `call'
from lich.rbw:1103:in `main'
from lich.rbw:1103

is this what you were asking about?

Tillmen
06-10-2010, 10:50 PM
That's.. um.. strange. The error indicates that one of the characters in your password has an ascii code less than 32. Did you type your password correctly? If you just did a copy/paste of your password, you might have got a line return or a tab in there. Otherwise.. there's not really any valid characters with an ascii code less than 32.

ThadJarvis
06-10-2010, 11:12 PM
Netstat. That's a good idea.


As for the error, no, that wasn't what I meant.

daeler33
06-10-2010, 11:16 PM
ok so that got lich to run properly I copied the password over before. When I typed it in lich ran but my launcher doesn't run now so I dont know what to do about that. I am running windows 7 btw. it asks if I want to let launcher change my harddrive then quits it never starts up.

Tillmen
06-11-2010, 12:00 AM
Try moving the lich folder to your Documents folder.

daeler33
06-11-2010, 07:35 AM
thanks for the help that got it to work. now I just need to find a good 1-10 hunting script

Bhaalizmo
06-11-2010, 08:50 AM
thanks for the help that got it to work. now I just need to find a good 1-10 hunting script

Bigshot. \theend

Boreus
06-12-2010, 06:22 AM
So how is this Disconnected script coming along? Ready for trials yet?

Boreus
06-15-2010, 08:04 AM
Any luck? I still haven't managed to make it once either going to work or going to bed without coming back to find myself disconnected for various reasons. I can run it all day when I'm home without doing anything that should make a difference but as soon as I go to work or bed it's done within 1-2 hours

Boreus
06-16-2010, 09:47 AM
I got home from work this morning and OMFG I was still connected *dance dance dance*

ThadJarvis
06-17-2010, 09:52 AM
I have been out of town all week with extremely limited internet connection. I will be working more on the application as soon as I return home.

On a positive note, before I left, I did finish something that accomplished 90% of what I wanted this thing to do, and it has worked and kept all of my characters logged in while I was gone.

When I get back, i'll be improving it a bit more then I'll see if some of you want to help test it out.

Izzy
06-17-2010, 11:00 AM
Tell me there is a way to do this from windows so that it will reconnect when my kids disco me turning on there PS3. You can't can you, your going to tell me to swicth over to my Linux box and then I have to go buy harware to be able to use both my monitors ::sigh::

This post pains me in so many ways.

Boreus
06-17-2010, 11:13 AM
It was meant to ;)

Boreus
06-22-2010, 09:11 AM
*raises hand* I'll help test it!