Home » Stars! 2.6/7 » The Bar » Tip: Two "default" passwords
|
Re: Tip: Two "default" passwords |
Thu, 01 January 2004 17: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.
-------------------------
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 |
Fri, 02 January 2004 04:58 |
|
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. 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. Now all I gotta do is figure out this new "Commandline" version of Winzip so I can have it auto zip them too
|
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?
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.
|
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 |
|
|
"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 |
Mon, 05 January 2004 01:11 |
|
|
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 04:46 |
|
|
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 |
Tue, 03 February 2004 16:03 |
|
|
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
|
|
|
Goto Forum:
Current Time: Thu May 16 02:52:20 EDT 2024
|