Home World Forum
Stars! AutoHost web forums

Jump to Stars! AutoHost


 
 
Home » Stars! 2.6/7 » The Bar » Tip: Two "default" passwords
icon3.gif  Tip: Two "default" passwords Wed, 31 December 2003 08:14 Go to next message
Micha

 

Messages: 2342
Registered: November 2002
Location: Belgium GMT +1
I'm in 2 games at the moment which need to have a different password. Since I'm Lazy I always put my password in the Stars.ini file (under [Misc] you can add: DefaultPassword=whatever). Problem is you can only have set one default password ...

You could make a batch file using the "-p" option to insert the password for you (see below), but for some reason this doesn't open my Stars! window maximized, which means yet another Wink mouse click.

Now what I did was give all (or just the ones you need) .m?? extensions (assigned to open with Stars! on double click, possibly .x?? too) another option:
"C:\GAMES\STARS!\STARS!.EXE" -p otherpassword %1
and make this one the default to use when trying to open the file.
The interesting (and unexpected) part is that Stars! tries to open the .m file and when it turns out that the password after the "-p" isn't the correct one it uses the default in the ini file. Smile So you get two default passwords. Smile

Just something I found out sitting bored waiting for the new turn files to arrive! Laughing Figured I might as well share it.

Oh, I'm using winxp, might not work on other versions ...

mch


[Updated on: Thu, 01 January 2004 03:22]

Report message to a moderator

Re: Tip: Two "default" passwords Thu, 01 January 2004 17:09 Go to previous messageGo to next message
Captain Maim is currently offline Captain Maim

 
Lt. Junior Grade

Messages: 492
Registered: March 2003
Location: USA, Mesa, Arizona

I've got something to make that work out for you.. I wrote it to auto insert passwords for 8 races, though I wrote the program to hold the full 16. Just change the paths add the player passwords in.. And drag drop the M file you wanna load onto the batch file and It'll do the rest. OH and change the game name, it'll also dump your P file for you upon load.
-------------------------
This file has been clipped as a newer version has been written.. Get that one instead Down below!


[Updated on: Mon, 05 January 2004 01:22]




Rule 1: "Pillage, THEN burn!"

Report message to a moderator

Re: Tip: Two "default" passwords Thu, 01 January 2004 17:14 Go to previous messageGo to next message
Micha

 

Messages: 2342
Registered: November 2002
Location: Belgium GMT +1
Captain Maim wrote on Thu, 01 January 2004 23:09

I've got something to make that work out for you.. I wrote it to auto insert passwords for 8 races, though I wrote the program to hold the full 16. Just change the paths add the player passwords in.. And drag drop the M file you wanna load onto the batch file and It'll do the rest. OH and change the game name, it'll also dump your P file for you upon load.

Smile Was kinda expecting a reply from you since you seem to enjoy batch files (I'm still grateful for your archiving batch).
Anyway, when trying to get to those two default passwords I did try it with dropping them on a batch file (it's a team game and this way I could open all the teams files by just one action). However as I mentioned using a batch file doesn't open my Stars! window maximized (it puts it on the right of my screen at half the size).
But nevertheless I'll try your suggestion. Smile Thanks.

mch


[Updated on: Thu, 01 January 2004 17:15]

Report message to a moderator

Re: Tip: Two "default" passwords Fri, 02 January 2004 04:03 Go to previous messageGo to next message
Captain Maim is currently offline Captain Maim

 
Lt. Junior Grade

Messages: 492
Registered: March 2003
Location: USA, Mesa, Arizona

"Was kinda expecting a reply from you since you seem to enjoy batch files (I'm still grateful for your archiving batch)."

-Wouldn't wanna disappoint! And your most welcome.. Try the new version, it's even cooler than the one I recall you are using! It handles updates to the same year, because it's capable of reading the years right out of the files!

"Anyway, when trying to get to those two default passwords I did try it with dropping them on a batch file (it's a team game and this way I could open all the teams files by just one action). However as I mentioned using a batch file doesn't open my Stars! window maximized (it puts it on the right of my screen at half the size)."

-Yeah I know it does that, that's why I stretched my "non maximuized window" to full size and now I've got no problems with it.

-If you wanted to load all avalible files at once.. I could rewrite it for ya to do that. Even rip the autodetect stuff out of my new turn archiver.. Oh and speaking of which your most welcome for that.. And thank you for giving me the idea.. I was doing it manually before and it was most annoying and inaccurate. Smile Now all I gotta do is figure out this new "Commandline" version of Winzip so I can have it auto zip them too Very Happy

-Another stupid thing you can do is save 2 copies of the INI with the passwords and I could write a simple batch to swap them back and forth for ya. Though that's really a stupid way to do it I think.



Rule 1: "Pillage, THEN burn!"

Report message to a moderator

Re: Tip: Two "default" passwords Fri, 02 January 2004 04:58 Go to previous messageGo to next message
Micha

 

Messages: 2342
Registered: November 2002
Location: Belgium GMT +1
Captain Maim wrote on Fri, 02 January 2004 10:03

"Was kinda expecting a reply from you since you seem to enjoy batch files (I'm still grateful for your archiving batch)."

-Wouldn't wanna disappoint! And your most welcome.. Try the new version, it's even cooler than the one I recall you are using! It handles updates to the same year, because it's capable of reading the years right out of the files!

I haven't tried that new one yet, the old one does all I need, and that's copy all files (m x h xy) from one year into a new directory.

Quote:

"Anyway, when trying to get to those two default passwords I did try it with dropping them on a batch file (it's a team game and this way I could open all the teams files by just one action). However as I mentioned using a batch file doesn't open my Stars! window maximized (it puts it on the right of my screen at half the size)."

-Yeah I know it does that, that's why I stretched my "non maximuized window" to full size and now I've got no problems with it.

That doesn't look nice enough for me. Wink But the difference is small indeed.

Quote:

-If you wanted to load all avalible files at once.. I could rewrite it for ya to do that. Even rip the autodetect stuff out of my new turn archiver.. Oh and speaking of which your most welcome for that.. And thank you for giving me the idea.. I was doing it manually before and it was most annoying and inaccurate. Smile Now all I gotta do is figure out this new "Commandline" version of Winzip so I can have it auto zip them too Very Happy

I'll first need to check it out with one race, but a rewrite to open all files might be nice.
Hm, maybe another batch that opens all files, save+submit and closes again? Just to make sure that all team .h files are up to date? Grin
If Stars! provides that option from the command line of course, I haven't looked at that yet.

Quote:

-Another stupid thing you can do is save 2 copies of the INI with the passwords and I could write a simple batch to swap them back and forth for ya. Though that's really a stupid way to do it I think.

Laughing I actually tried that once! Not for the password though but to get different default queues IIRC, not sure why but I think it must have been to make a difference between the AR game and the not AR game I was playing ... Didn't get it to work ... no wait that was because I wanted to launch the game using a batch file, first thing was copy the right .ini in the win dir and after closing the game copying it back, that last part never worked ... but that might have been because it was win98 ... the batch file didn't continue after closing Stars! ... doesn't matter either since you could set each game to copy it's own .ini file every time ...

mch


[Updated on: Fri, 02 January 2004 04:59]

Report message to a moderator

Re: Tip: Two "default" passwords Fri, 02 January 2004 10:18 Go to previous messageGo to next message
Captain Maim is currently offline Captain Maim

 
Lt. Junior Grade

Messages: 492
Registered: March 2003
Location: USA, Mesa, Arizona

"I haven't tried that new one yet, the old one does all I need, and that's copy all files (m x h xy) from one year into a new directory."

-Yeah the new version requires my favorite little companion program "Poke.exe" to read the year value for me, then I (on my own) figured out how to calculate the 16bit year value and *pop* the files in the right place (also saves HST if it exists.)

"That doesn't look nice enough for me. But the difference is small indeed."

-Sorry, not a darn thing I can do about that.

"Hm, maybe another batch that opens all files, save+submit and closes again? Just to make sure that all team .h files are up to date?
If Stars! provides that option from the command line of course, I haven't looked at that yet."

-Yes and No... Yes I can, but.. you have to manually exit them out as you go, because after each one is executed the batch file waits. I don't know any command to kill a particular application so... What I do is drag drop the thing X many times F9 all and mass exit them (if you hold control down and click the items on the task bar then right click and hit "Close" they'll all close in mass!) I can though make it load all of them but you'll have to hit F9 for all and then mass exit like I showed you.

-However..... Hmmmm 1 sec must try something... Nope, same effect... Now perhaps I might be able to (with some work) whip up one you can mass drag drop to... But I think your best bet is to take the batch I have there and under "set map1=" put -w and just drag drop them all one at a time onto it and then mass close the result. Okay?

" I actually tried that once! Not for the password though but to get different default queues IIRC, not sure why but I think it must have been to make a difference between the AR game and the not AR game I was playing ... Didn't get it to work ... no wait that was because I wanted to launch the game using a batch file, first thing was copy the right .ini in the win dir and after closing the game copying it back, that last part never worked ... but that might have been because it was win98 ... the batch file didn't continue after closing Stars! ... doesn't matter either since you could set each game to copy it's own .ini file every time ..."

-It's like this (I used to do this stuff ALL the time in the old days [when I was a teenager] when I'd hack games), I keep a seporate directory of all the little hacks.. Organized by name (rename the files so like one INI is named "ARorders.ini" or some junk..) Then when you run it.. (if you want I can even make a menu for you), you have it copy the file you want OVER the one in the %windir% and when Stars exits you have it copy the "default" one back. If you wanna ensure it does it you can always predelete the ini's in %windir% before copy. Quick hack example:

del %windir%\stars.ini
copy orders\ARorders.ini %windir%\stars.ini
stars! %1
del %windir%\stars.ini
copy orders\default.ini %windir%\stars.ini

-The result will be, it takes the file from a directory under whereever you run it, stuffs it in place of the stars.ini (copy+rename [old trick]) and runs stars with whatever file you dragged over it. When you exit stars it'll copy the other ini back. Now as far as I know windows won't care one bit that your doing this so you should be able to get away with it just fine!


[Updated on: Fri, 02 January 2004 10:23]




Rule 1: "Pillage, THEN burn!"

Report message to a moderator

Re: Tip: Two "default" passwords Sun, 04 January 2004 06:20 Go to previous messageGo to next message
Robert is currently offline Robert

 
Lt. Junior Grade

Messages: 393
Registered: November 2002
Location: Dortmund, Germany
Another thing one might try:

Ok, it is easy to build a batch that drops the p and f files and opens the turn for you, one batch for each turn. this is what i did, so i got a button for each race i am playing on my desktop.

what else you could do:

most email programs allow it to react on incoming mails.
you could let the mailing program take the mails from autohost,
play a sound "turn for game XXX is in" (you have to record yourself of course), drop the m-file in the target directory and run the batch. You can also let it open excel or other programs automatically (xborders...)

So you hear the sound, and while you run to your computer it opens all turns and programs automatically for you.

Isnt this funny???

Smile

Robert



2b v !2b -> ?

Report message to a moderator

Re: Tip: Two "default" passwords Sun, 04 January 2004 06:32 Go to previous messageGo to next message
Micha

 

Messages: 2342
Registered: November 2002
Location: Belgium GMT +1
Robert wrote on Sun, 04 January 2004 12:20


So you hear the sound, and while you run to your computer it opens all turns and programs automatically for you.

Isnt this funny???


Not when you promised your wife you would do some "serious" work behind your pc. Wink She'll be furious hearing the sound and seeing all those game files opening! Laughing

mch

Report message to a moderator

Re: Tip: Two "default" passwords Mon, 05 January 2004 01:11 Go to previous messageGo to next message
Captain Maim is currently offline Captain Maim

 
Lt. Junior Grade

Messages: 492
Registered: March 2003
Location: USA, Mesa, Arizona

New versions of the Loader and the Archiver. Now they work together .. The new loader requires MUCH less setup, all you do is spesify the passwords and where your Stars is. It figures out now where the game files are on it's own! I also told my archiver to save a loader with the archives so it's easy to load up! Naturally Poke.exe is required... Of course.. But only for the archiver. Just copy paste it in.. Poke.exe comes with my planet name changer which is on the Pirates Retreat site. All it does is let me read and write stuff in hex through batch commands. Copy to text file with name given after the "----"...


Code for "!!save.bat":
--------------------------
@echo off

if exist zgame.bat goto skip

echo Make sure any races you want backed up are present in the directory.
echo .
echo Game name?
set /p game=
echo set game=%game%> zgame.bat
set num1=1
set num=0

:loop1
if exist %game%.m%num1% set /A num=num +1
if exist %game%.m%num1% echo set race%num%=%num1% >> zgame.bat
if %num1%==16 goto next
set /A num1=num1 +1
goto loop1

:next
echo set num=%num% >> zgame.bat

:skip
call zgame.bat
set race=%race1%

for /F "usebackq" %%a in (`poke %game%.m%race% 0xc`) do set year1=%%a
for /F "usebackq" %%a in (`poke %game%.m%race% 0xd`) do set year2=%%a
set /a year=(year2 *256) +year1 +2400


md "%year%"
copy %game%.xy "%year%"
if exist %game%.hst copy %game%.hst "%year%"
for %%e in (%race1% %race2% %race3% %race4% %race5% %race6% %race7% %race8% %race9% %race10% %race11% %race12% %race13% %race14% %race15% %race16%) do copy %game%.?%%e "%year%"

if exist copy !!LoadRace.bat %year%
:end
=====================================================
=====================================================
NEXT FILE, to use just drag and drop the turn you want onto it.
=====================================================
=====================================================

Code for "!!LoadRace.bat":
---------------------
@echo off

::Game Name
::-dp dump planets, -w for loading and pressing F9 immediately.
set map=-dp
set map1=
::where is Stars!.exe located? Though I call mine StarsJ.exe
set starsdrive=d:
set starsdir=cd\stars!\stars!
for /F %%a in ("%1") do set game1=%%~xa
for /F %%a in ("%1") do set game=%%~na%
for /F %%a in ("%1") do set gamedrive=%%~da
for /F %%a in ("%1") do set gamedir=cd%%~pa

::Password list
set p1=
set p2=
set p3=
set p4=
set p5=
set p6=
set p7=
set p8=
set p9=
set p10=
set p11=
set p12=
set p13=
set p14=
set p15=
set p16=

%gamedrive%
%gamedir%
goto %game1%

:.m1
%starsdrive%
%starsdir%
%cd%\starsj %map% -p %p1% %1
%cd%\starsj %map1% -p %p1% %1
goto end

:.m2
%starsdrive%
%starsdir%
%cd%\starsj %map% -p %p2% %1
%cd%\starsj %map1% -p %p2% %1
goto end

:.m3
%starsdrive%
%starsdir%
%cd%\starsj %map% -p %p3% %1
%cd%\starsj %map1% -p %p3% %1
goto end

:.m4
%starsdrive%
%starsdir%
%cd%\starsj %map% -p %p4% %1
%cd%\starsj %map1% -p %p4% %1
goto end

:.m5
%starsdrive%
%starsdir%
%cd%\starsj %map% -p %p5% %1
%cd%\starsj %map1% -p %p5% %1
goto end

:.m6
%starsdrive%
%starsdir%
%cd%\starsj %map% -p %p6% %1
%cd%\starsj %map1% -p %p6% %1
goto end

:.m7
%starsdrive%
%starsdir%
%cd%\starsj %map% -p %p7% %1
%cd%\starsj %map1% -p %p7% %1
goto end

:.m8
%starsdrive%
%starsdir%
%cd%\starsj %map% -p %p8% %1
%cd%\starsj %map1% -p %p8% %1
goto end


:.m9
%starsdrive%
%starsdir%
%cd%\starsj %map% -p %p9% %1
%cd%\starsj %map1% -p %p9% %1
goto end

:.m10
%starsdrive%
%starsdir%
%cd%\starsj %map% -p %p10% %1
%cd%\starsj %map1% -p %p10% %1
goto end

:.m11
%starsdrive%
%starsdir%
%cd%\starsj %map% -p %p11% %1
%cd%\starsj %map1% -p %p11% %1
goto end

:.m12
%starsdrive%
%starsdir%
%cd%\starsj %map% -p %p12% %1
%cd%\starsj %map1% -p %p12% %1
goto end

:.m13
%starsdrive%
%starsdir%
%cd%\starsj %map% -p %p13% %1
%cd%\star
...



[Updated on: Mon, 05 January 2004 01:23]




Rule 1: "Pillage, THEN burn!"

Report message to a moderator

Re: Tip: Two "default" passwords Fri, 16 January 2004 03:58 Go to previous messageGo to next message
Kotk

 
Commander

Messages: 1227
Registered: May 2003
I do not mess around with default passwords... i even dont know what my default password is... Embarassed
I do shortcuts instead. Very Happy

Lets say i play in game boo
my race is #3 named wou
password is foo

I make shortcut to run the game "play wou":

Target: C:\games\SJRC3\stars.exe -pfoo C:\games\SJRC3\boo\boo.m3
Start in: C:\games\SJRC3\boo

Then i copy the shortcut and modify it to export the planet info "export wou":

Target: C:\games\SJRC3\stars.exe -dp -pfoo C:\games\SJRC3\boo\boo.m3
Start in: C:\games\SJRC3\boo

That gives lot of advantages:
1) Opening any game is one click thing ... no splash screens or anything.
2) Similarily easy is exporting the planet info... no need to open game for it.
3) I may play in more than one game with different pw-s.
4) I can always open very old games with long forgot pw-s.
5) I can receive game files and passwords from allies or teammates, looking into their turns (or exporting their planet info) is as painless as looking into my own turns ... whatever their password is.

Oh and for bat file fans ... shortcut does nothing bat file cannot besides having changeable icon. However once you have them ... they are easily runnable from bat file. Simply do not forget that they are actually *.lnk files ... like this:
"play wou.lnk"

Seems it may be helpful tip for some of you? Smile

Report message to a moderator

Re: Tip: Two "default" passwords Fri, 16 January 2004 04:46 Go to previous messageGo to next message
Captain Maim is currently offline Captain Maim

 
Lt. Junior Grade

Messages: 492
Registered: March 2003
Location: USA, Mesa, Arizona

I used to do that too.. Though I like this method a bit better in some ways.. only down side is it leaves little dos boxes up until I either manually close them or quit stars. Takes less icons.. I just open the directory and drag drop, plus I can move it and it runs without any changes!


Rule 1: "Pillage, THEN burn!"

Report message to a moderator

Re: Tip: Two "default" passwords Sun, 01 February 2004 22:44 Go to previous messageGo to next message
cybersaber is currently offline cybersaber

 
Civilian

Messages: 1
Registered: February 2004
BTW, as a fellow batch file coder, I can tell you that
start /max "commandline" -switches

will launch a progam and maximize the window. Dunno if you were aware of that.

Report message to a moderator

Re: Tip: Two "default" passwords Tue, 03 February 2004 16:03 Go to previous message
Captain Maim is currently offline Captain Maim

 
Lt. Junior Grade

Messages: 492
Registered: March 2003
Location: USA, Mesa, Arizona

Hey.. as a funny sideffect to adding "Start /max..." it solves another problem I had which was that the dos box stayed up. Which, with the start /max thing enabled.... It doesn't, it cleansup and goes right away after running. Sweet.

THanks CyberSaber!



Rule 1: "Pillage, THEN burn!"

Report message to a moderator

Previous Topic: The oddest thing.. Healing weapons
Next Topic: AI Races
Goto Forum:
  


Current Time: Thu May 16 02:52:20 EDT 2024