Quantcast

Jump to content

» «
Photo

Easy script switcher [PC]

165 replies to this topic
rubregg
  • rubregg

    brainslug

  • Members
  • Joined: 03 May 2006

#1

Posted 11 May 2006 - 03:55 PM Edited by lil weasel, 08 June 2012 - 10:42 PM.

Easy script switcher for GTA SA
...to swap between v1, v2, Hot Coffee and Spaceeinstein's All In One Mod
...or toggle the CLEO library off/on

Current Version: v0.7 -- released September 25 2008

Latest additions:
Easy disabling and enabling of the CLEO library (if installed).
Start GTASA from within the script switcher: normal or nosplash (if nosplash.exe present).

Supported versions of Spaceeinstein's All In One Mod: v2.6 --> v3.0

Downloads

Related topics
user posted image




Purpose

While helping other players with their missions I often had to switch my v1 scripts to v2 or even the Hot Coffee mod. Since repetitive file copying got sort of tiring for me I made this little batch file to do the job for me. Support for Spaceeinstein's All In One Mod was included by request from v0.3 on and the script is written in a way that should allow more future extensions, if wished for. Drop a line here if you want something else included and I'll see what I can do.

Since CLEO scripts have become an issue in the Chain Game, a routine to easily toggle them off or on has been added.


Systems
  • Written on and only tested on WinXP .
  • grishb reports that it also works on Vista . Judging from what I hear about Vista you'll very likely have to manually change permissions for some folders, see "Basics" below.
  • Due to the registry reading feature it might not run on Win2K . You must have Win2K Support Tools installed, but since there are syntax differences for the command 'reg.exe' in WinXP and Win2K Support Tools it may still not run on 2K.
Instructions

Basics
  • This program needs write access in your GTA SA script folder (e.g. 'C:\Program Files\GTA San Andreas\data\script'). Log in as administrator and grant write access to the user account running GTA SA and the scriptchanger (or ask your system administrator to do this for you). This needs to be done only once - if at all. On a standard Win2K/XP installation you probably *won't* have to do it because all standard user accounts have full admin rights there (incl. write access everywhere). With Vista you most likely *will* have to do it.
  • If you're using the Spaceeinstein Mod, you will also need write access in '..\text'.
  • If you're using CLEO, you will also need write access in your game's main directory.
  • GTA SA v2 has restricted modding abilities and needs to be downgraded before you can switch scripts.
  • You can still use this program no matter whichever version of GTA SA you run, because all this program does is copy script files around. If your game won't run after this it could be due to your script files being incompatible with your game.
  • You don't *have* to use *all* the possible options - just ignore all instructions for folders/files you are not going to use. If you pick an unexisting selection in the menu by mistake, you'll get an error message and your currently installed scripts will remain unaltered.
  • The CLEO toggle is not a clean (un-)install routine; all it does is rename the file cleo.asi to cleo.asi.bup and back. This seems to do the trick for me.
  • The currently installed scripts are determined via file compare with the contents of your '..\data\script\v1', 'v2', etc folders. Be careful to put the right scripts into the right folder, otherwise you'll get inaccurate information.
First Installation
  • Make backup copies of all your different version script files!!!
  • Make backup copies of '..\text\american.gxt' if you're using the spaceeinstein mod)!!!
  • Make a backup copy of '..\cleo.asi' if you're using the CLEO library!!!
  • Make sure you have write access in the folders specified above in the first 3 paragraphs of 'Basics'.
  • Go to your GTA SA script folder (e.g. 'C:\Program Files\GTA San Andreas\data\script').
  • In there create subfolders called 'v1', 'v2', 'hc' & 'sp' (all file & folder names without ' ' of course).
  • Put the script files ('main.scm' and 'script.img') of v1 into the subfolder 'v1', those of v2 into subfolder 'v2' and those of Hot Coffee into subfolder 'hc'.
  • Put all the files of the spaceeinstein mod ('main.scm', 'script.img' and 'american.gxt') into the subfolder 'sp'.
  • Unzip 'sa_scriptchange.bat' to any convenient location.
Updating the Scriptchanger
  • Make sure your scriptchanger is not running and simply overwrite your old 'sa_scriptchange.bat' with the new one.
  • If you're updating from pre v0.6 and using the CLEO library: Make a backup copy of '..\cleo.asi' and make sure you have write access in the game's main folder.
Changing between different *supported* versions of the Spaceeinstein Mod
  • Replace the contents of your '..\data\script\sp' folder.
  • Switch to spaceeinstein.
  • You can leave this version of the scriptchanger running while you do this.
  • You'll be told which version of the Spaceeinstein mod you're running.
Using this program
  • Double-click 'sa_scriptchange.bat', make your choice & press [Enter]. That's basically it.
  • For multiple script swaps you can leave this program running in the background while playing, but always make sure the game itself isn't running when you change the scripts .
Disclaimer

use at own risk ...yaddayadda... comes as is ...bleh... no warranties ...blurp... etc...
...and make those backups first


Changelog

v0.7
• start GTASA from within the script switcher
• new routine to determine the installed scripts
• label file not needed anymore, old one(s) will be deleted

v0.6
• added CLEO toggle (disable/enable if installed)
• enabled changing to a script version the program thinks is already installed

v0.5
• updated Spaceeinstein routine to support multiple versions of the mod
• currently supported versions: v2.6 --> v3.0
• content of label file gives exact installed version
• reversed the formatting of the text output to pre-0.41 (liked it better after all)

v0.41
• updated Spaceeinstein support to v2.8
• very minor change in the formatting of the text output (blank line shoving, basically)

v0.4
• changed the way the game's path will be read from the registry (dropped using the GUID due to rare bug reports and Wolf68k's invaluable input)
• updated support for Spaceeinstein's All In One Mod to the current version v2.6
• overhauled instructions incl. a few comments on updating, Win2K, Vista, write access & modding of SA v2

v0.3
• added Spaceeinstein's All In One Mod (v1.7.1) as a possible selection; existing '..\text\american.gxt' will be backuped to '..\text\american.orig.gxt'
• program will run in a loop until you exit
• complete structural overhaul, hopefully makes future extensions easier to work in
• changed location of the label file (see instructions); changed extension of label file to .ini; old label files will automatically be converted
• label file is no dummy anymore but will be read to find out the currently installed game scripts

v0.2
• paths will be automatically read from the windows registry - no more manual editing of the file
• a few security checks added - e.g. your installation will not be changed if you select Hot Coffee but don't have those script files


Thanks...

• to Wolf68k for priceless help (especially with the registry stuff) and for mirroring the downloads,
• to Plaka for pinning this topic and providing a download mirror,
• to DrSnuggles for webspace,
• to hmvartak for suggesting the 'Start Game' feature
• to OrionSR for coding help and testing
• and to all those testing, using & feedbacking. icon14.gif


As usual: Feel free to comment & improve & expand to cover more mods etc... smile.gif

Enjoy,
rubregg
  • JAJ likes this

quartet1977
  • quartet1977

    Soldier

  • Members
  • Joined: 03 Dec 2005

#2

Posted 11 May 2006 - 04:15 PM

Thanks! It seems to work for me. This will definitely save some time. Nice work!

rubregg
  • rubregg

    brainslug

  • Members
  • Joined: 03 May 2006

#3

Posted 11 May 2006 - 05:58 PM

QUOTE (quartet1977 @ May 11 2006, 18:15)
Thanks! It seems to work for me. This will definitely save some time. Nice work!

glad you like it, thanks for the feedback smile.gif

crazyanurag
  • crazyanurag

    okthxbai

  • Leone Family Mafia
  • Joined: 06 Dec 2005

#4

Posted 11 May 2006 - 06:25 PM

sounds good...i'll try it in sometime...here's what i do to help me with this problem:

1) in the 'data' folder, i've made several script folders: script1 for V1, script2 for V2, scripth for Hot Coffee and so on
2) before i load a game, i go to the folder and just rename the appropriate folder to 'script'...for example, if i have to play on the Chain Game, which is V2, i go to the folder and first rename 'script' to 'script1' (that's assuming i was playing with V1 before that)...then i proceed to renaming 'script2' to 'script', and i can play with V2...

its simple, and works like a charm for me...no file copy/pasting required...your method sounds even quicker, but i'm pretty lazy, so i might just stick with what i'm used to...but here's a cookie.gif for your efforts...in fact, have cookie.gif cookie.gif

icon14.gif

You'll Never Walk Alone

CygnusX
  • CygnusX

    ..::Movie Maker::..

  • Members
  • Joined: 15 Jul 2005

#5

Posted 11 May 2006 - 06:38 PM

That'll save some time. Nice!

rubregg
  • rubregg

    brainslug

  • Members
  • Joined: 03 May 2006

#6

Posted 11 May 2006 - 06:41 PM

Thanks for the feedback & cookie.gif s, guys (here, all of you have some back cookie.gif cookie.gif lol.gif )

@crazyanurag
The method you're describing comes close to what I've been doing before, hehehe. I had made my copy/paste experiences easier by using different folders and do a drag&drop. It's just - I got tired of that & so I started tossing about to make it even simpler. ...'cos yes, I'm kind of lazy too, too lazy to look up proper dos-batch syntax for example lol.gif

So - if anyone knows a way to get one keystroke inputs into a batch file (so that we don't have to press return after the input), please let me know.

Cheers,
rubregg

HerrieM
  • HerrieM

    Don't Panic

  • Members
  • Joined: 27 Apr 2006

#7

Posted 11 May 2006 - 07:02 PM

QUOTE (rubregg @ May 11 2006, 20:41)
I'm kind of lazy too

The greatest ideas are born out of lazyness tounge2.gif

As i said in the PM, great work Rubregg

Wolf68k
  • Wolf68k

    always howling

  • Members
  • Joined: 12 Mar 2003
  • None
  • Most Knowledgeable [Technology] 2013
    Best Contributor [Technology] 2012

#8

Posted 12 May 2006 - 10:54 AM Edited by wolf68k, 12 May 2006 - 10:56 AM.

@rubregg
Nice but if you can get the batch file to read the registry and read this line;
HKEY_LOCAL_MACHINE\SOFTWARE\Rockstar Games\GTA San Andreas\Installation
ExePath=
Which will list where the gta_sa.exe is, in my case it's; "D:\Rockstar Games\GTA San Andreas\gta_sa.exe"

or have it read...and this is really geeky one
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{D417C96A-FCC7-4590-A1BB-FAF73F5BC98E}
InstallLocation=
Which list, well like it says, the installed location. And you can obviously see where that is from the above.


Maybe this can help in that. http://www.robvander....com/index.html
From what I'm reading here it'll create a REG file for that key's info in it. After that I get lost. But you can always have the batch file delete that reg file when it's done.
If you can get the batch file to do something like....I'm not great at this so give me a break.

IF %SCRIPTPATH% == null
THEN [the reg reading thing]
set SCRIPTPATH=<whatever> + data\script\
ELSE goto set SOURCEPATH=%SCRIPTPATH%\%TAG% and so on.

So the idea being that the first time it's run on the user's system SCRIPTPATH will obviously be null. So it'll do the reg reading thing and get the info needed (example: D:\Rockstar Games\GTA San Andreas\) and add "data\script\" to the end and write this to the batch file itself.
So next time it's ran it'll see that SCRIPTPATH=D:\Rockstar Games\GTA San Andreas\data\script\ (again based on my example).

I hope that makes sense after I explained it about 2 or 3 different ways.


If you means that as soon as they press 1, 2 or H it'll just do it without waiting for the user to get Enter. Personally I'd rather have to hit Enter incase I hit the wrong key.




@crazyanurag
You're started to sound like my system then you made it more complex.
For me it's like this....
In the D:\Rockstar Games\GTA San Andreas\data\script\ I have folders named GTASAv1, GTASAv2, and hotcoffee
When I want to switch I just look an the 3 folders and see which one is missing it's files, and I know which ones are in use. I just move the "in use" files back to it's folder and then move the ones I need to be "in use".

And God I hope that made sense as well.

No need to copy/paste or rename anything. Just move it.
I've been wanting to batch files like what rubregg came up with, but mine would be damn weak in comparison since I suck at command line. I only know what I can read AND understand easily.
So mine would have been more like...
del /q D:\Rockstar Games\GTA San Andreas\data\script\main.scm
del /q D:\Rockstar Games\GTA San Andreas\data\script\script.img
copy D:\Rockstar Games\GTA San Andreas\data\script\GTAsav2\main.scm D:\Rockstar Games\GTA San Andreas\data\script\main.scm
copy D:\Rockstar Games\GTA San Andreas\data\script\GTAsav2\script.img D:\Rockstar Games\GTA San Andreas\data\script\script.img

And I'd have one for v1, v2 and HC and I would just double click on the one I need. Like I said, it's weak and it's from crap I was able to understand.
And incase anyone is wondering the /q means quiet so the del command doesn't ask the Yes or No question to comfirm deleting the file....weak but easy to understand. Which also means wonder why it wasn't used in this, but then I only understand so much of what was written in there.

rubregg
  • rubregg

    brainslug

  • Members
  • Joined: 03 May 2006

#9

Posted 13 May 2006 - 12:47 AM

@wolf68k

Thanks *a lot* for the massive feedback!!!
And don't worry, it makes an awful lot of sense, in many ways actually...

You see, when it all started the first idea I had was making three different batch files which would have looked suspiciously identical to what you wrote. Then the once-every-other-year-max programmer in me struck through and I thought let's make just one and share that. Next came mixing up different scripting languages, a lot of googling, finding out about at least two commands that were removed somewhere along the way from DOS to XP (the site you linked was amongst the many) and to be quite honest, the idea of reading the path from the registry, which would be quite more elegant, got buried in all that mess... lol.gif

And here's where your post - together with a good night's sleep - helped. Reading your proposals made me re-think about the problem. And re-browsing through your link actually *did* give me a rough idea of how this issue may be tackled... ---> so Thanks again biggrin.gif

I will get back to this, but for real-life-job reasons it'll be a few days.

About the 'Enter' thing - you explicitely prefer it this way, I really got used to it, no one complained and I didn't find a command to do it otherwise. Looks like four good reasons to leave it the way it is for the time being...

del /q
...when I run my script I'm not asked for confirmation to delete files. What about you other guys who use it?
The help function sounds like /q is only needed if gobal variables are used, but I'm not sure about this at all. Anyone?

balmung03
  • balmung03

    bawlz in the baygz

  • Members
  • Joined: 25 Jun 2005

#10

Posted 13 May 2006 - 05:03 AM

wow, i am totally lost in all this programmer language (which is bad for me since i'll be starting over this summer at college going for a software engineering major); how do you guys think of these things, and how do you learn to do the stuff you do? all this seems majorly impressive to me. rubregg, wolf, and crazy, you guys deserve lots of applause and something else for the work you've done here. everyone does cookies, so i thought i'd do something slightly different...

user posted image
hope you guys like it. (it's a chicken&shrimp combo)

rubregg
  • rubregg

    brainslug

  • Members
  • Joined: 03 May 2006

#11

Posted 15 May 2006 - 09:05 PM Edited by rubregg, 15 May 2006 - 09:10 PM.

I just updated the scriptchanger - see the edited first posting. --> Enjoy smile.gif
As usual I'm waiting for your comments & suggestions...

Sorry for hosting on rapidshare; I tried on free.hostdepartment.com but they won't let me upload .zip, .rar or .bat files... Any suggestions for a better place to host?

@balmung03
Wow, thanks for the chicken&shrimp roll, yummie. Don't worry, my guess is that once you're on your software engineering course you'll laugh about this. Since you asked, my knowledge comes partly from having worked on DOS before there was Windows and partly from extensive googling.

@wolf68k
I did use the 'geeky' long line with the uninstall path because that gave me the pure path name without 'gta_sa.exe' at the end.... Thanks again for that tip.

Wolf68k
  • Wolf68k

    always howling

  • Members
  • Joined: 12 Mar 2003
  • None
  • Most Knowledgeable [Technology] 2013
    Best Contributor [Technology] 2012

#12

Posted 15 May 2006 - 11:43 PM

FileFront.com would be an ideal place to host it. And it's free. Free sign up (to store files, not to download), umlimited space and bandwidth.

I created a download for it in my FileFront account, here. But I would suggest you do the same and just mine as a mirror.
RapidShare is ok, but you have to wait to download and type in verify code and if no one downloads it for 30days they kill it.

Plaka
  • Plaka

    King Of San Andreas

  • Members
  • Joined: 22 Feb 2005

#13

Posted 16 May 2006 - 09:22 AM

rubregg

Nice work man wink.gif sure beats clicking and Copy/Paste all the time ...

I'll have a look if this can be extended to incorporate Mods like Spaceinstein's All-In-One ... which also requires the changing of american.gxt in the \text dir.

cool.gif

rubregg
  • rubregg

    brainslug

  • Members
  • Joined: 03 May 2006

#14

Posted 16 May 2006 - 10:35 AM

As wolf68k suggested the package is now hosted on FileFront.com and the download links in the first posting have been edited accordingly.

Here is the link to my page (recommended), alternatively you can use wolf68k's mirror.

rubregg
  • rubregg

    brainslug

  • Members
  • Joined: 03 May 2006

#15

Posted 16 May 2006 - 10:42 AM

QUOTE (Plaka @ May 16 2006, 11:22)
I'll have a look if this can be extended to incorporate Mods like Spaceinstein's All-In-One ... which also requires the changing of american.gxt in the \text dir.

@Plaka
I'm sure if all you have to do is copying files it can easily be extended. If you're not familiar with the batch scripting code send me a pm & tell me exactly what you'll have to do to get your mod working and I may be able to help you.

Glad you like it smile.gif

Wolf68k
  • Wolf68k

    always howling

  • Members
  • Joined: 12 Mar 2003
  • None
  • Most Knowledgeable [Technology] 2013
    Best Contributor [Technology] 2012

#16

Posted 16 May 2006 - 10:44 AM Edited by wolf68k, 16 May 2006 - 10:59 AM.

I'm sure that can be easily done. Just might have to add the original america.gxt file to v1, v2 and HC folders. Or create a folder in the TEXT folder called original (for example) which would have a copy of the file in there.

Then when Spaceinstein mod is installed it'll delete the one that's there and copy in the modded one from the Spaceinstein folder which would be best in the same place as the other folders used in the script.

When you go back to the the others it'll just delete the modded one and copy in the one from the folder "original".


If it's possible to have the batch file read the CRC or the dates of a file then the switch can be done even easier. The batch can look at the GXT file and if it's CRC matches what an unmodded GXT file does then it'll leave it alone when using 1,2 or H option. Ofcourse if it uses the S (Spaceinstein) mod then it'll change it. If it doesn't match then it'll just make the changes it needs to.


Again I don't understand the need to copy&paste the files. Just move them from folder to folder seems a lot easier to me.



BTW, good to see you're finally back Plaka. I thought you said were going to be back about a week or 2 after you left.



@rubregg
I looked at your FileFront link. You reminded me I should have included a link to this topic in there. But I took it a step further, I made it so it can open in a new window. biggrin.gif The one they create makes it open in the same window.
Try this if you want to to open in a new window...
CODE
see the readme file or <a href="http://www.gtaforums.com/index.php?showtopic=244165" target="_blank">http://www.gtaforums.com/index.php?showtopic=244165</a>

You could also replace the copy of the URL to read as text. EG:
CODE
see the readme file or <a href="http://www.gtaforums.com/index.php?showtopic=244165" target="_blank">visit the topic</a>
To which "visit the topic" would be the clickable text for the URL.

rubregg
  • rubregg

    brainslug

  • Members
  • Joined: 03 May 2006

#17

Posted 16 May 2006 - 11:07 AM Edited by rubregg, 16 May 2006 - 11:30 AM.

QUOTE (wolf68k @ May 16 2006, 12:44)
Again I don't understand the need to copy&paste the files. Just move them from folder to folder seems a lot easier to me.

I guess the only reason why I personally prefer 'copy&paste' is that it seems just slightly safer than 'move' in terms of accidental file loss...

Plaka, since I can't really tell from your posting if you're doing it yourself or if you want me to do it I'll wait for the moment until you got back to me.

My first suggestion is extending the section ':ASK.......for version to install......' to include a fourth option [s] for Spaceinstein. When I know what you'll have to change exactly for this mod, I can surely help out with the rest. As usual, wolf68k had some good ideas there, thanks again for your efforts, mate smile.gif


edit:

@wolf68k
Nice one, I did changed the FileFront link like you said biggrin.gif
...in case you are wondering, the list bubbles are done with <li> (no closing tags)

Plaka
  • Plaka

    King Of San Andreas

  • Members
  • Joined: 22 Feb 2005

#18

Posted 16 May 2006 - 11:28 AM

@ rubregg
If you want to do it that would be great will save me adding code/testing/Googling etc. wow.gif

@wolf68k
Yeah that was the plan (1/2 weeks) but it sure would have helped if there was an available phone-line in my area... still I'm now back ... now where in the h*ll is my GamePad confused.gif


Plaka ... working on his k/b skills suicidal.gif

Wolf68k
  • Wolf68k

    always howling

  • Members
  • Joined: 12 Mar 2003
  • None
  • Most Knowledgeable [Technology] 2013
    Best Contributor [Technology] 2012

#19

Posted 18 May 2006 - 05:34 AM Edited by wolf68k, 19 May 2006 - 12:54 AM.

Because I run the script from the \My Documents\GTA San Andreas User Files\ folder
I wanted something in there for when I add a save game in there and run the script I can see which one I'm using without having to browse to the \script\ folder and look for the "current-install" text file

So I add a few extra lines to add that file to that folder
Orange =current version of the script
Yellow =the lines I added
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::
:: Change Scripts In GTA SA
::
:: ...easy switching between v1 / v2 / hot coffee
::
:: by rubregg -- www.gtaforums.com
:: Version 0.2 -- May 15, 2006
::
:: Thanks to wolf68k and all the testers at www.gtaforums.com
::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::
:: put your v1 script files into folder [gtasa-folder]\data\script\v1
:: put your v2 script files into folder [gtasa-folder]\data\script\v2
:: put your Hot Coffee script files into folder [gtasa-folder]\data\script\hc
::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::
::
::
@echo off
cls
echo.
echo GTA SA Script Changer by rubregg
echo.
::
::
:ASK::......................for version to install................................
::
set /P PRESSEDKEY=Chose between [1] v1, [2] v2 or [h] Hot Coffee:
::
if %PRESSEDKEY%==1 (
set TAG=v1
) else (
if %PRESSEDKEY%==2 (
set TAG=v2
) else (
if %PRESSEDKEY%==h (
set TAG=hc
) else (
goto ASK
)
)
)
::
::
::............................paths...........................................................
::
::
::.......should you copy & paste - this is ONE LONG LINE FROM HERE....................
FOR /F "skip=2 tokens=3*" %%G IN ('reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{D417C96A-FCC7-4590-A1BB-FAF73F5BC98E} /v InstallLocation') DO set GAMEPATH=%%G %%H
::...........................................................................................TO HERE
::
::
set SCRIPTPATH="%GAMEPATH%\data\script"
set SOURCEPATH="%GAMEPATH%\data\script\%TAG%"

::
::
::............................end if required files don't exist..........................
::
set ERROR=0
if not exist %SOURCEPATH%\main.scm (
echo.
echo Required script file missing: %SOURCEPATH%\main.scm
set ERROR=1
)
if not exist %SOURCEPATH%\script.img (
echo.
echo Required script file missing: %SOURCEPATH%\script.img
set ERROR=1
)
if %ERROR%==1 (
echo.
echo Your script has NOT been changed
goto :END
)
::
::
::............................delete old files..............................................
::
if exist %SCRIPTPATH%\main.scm del %SCRIPTPATH%\main.scm
if exist %SCRIPTPATH%\script.img del %SCRIPTPATH%\script.img
if exist %SCRIPTPATH%\current-install-*.txt del %SCRIPTPATH%\current-install-*.txt

if exist current-install-*.txt del current-install-*.txt
::
::
::............................copy new ones..............................................
::
echo.
copy %SOURCEPATH%\main.scm %SCRIPTPATH% >nul
if ERRORLEVEL 1 (
echo.
echo Couldn't copy %SOURCEPATH%\main.scm
echo Please check your permissions to write into the folder %SCRIPTPATH%
goto :END
)
copy %SOURCEPATH%\script.img %SCRIPTPATH% >nul
if ERRORLEVEL 1 (
echo.
echo Couldn't copy %SOURCEPATH%\script.img
echo Please check your permissions to write into the folder %SCRIPTPATH%
goto :END
)
::
::
::............................create label file...........................................
::
echo %TAG% > %SCRIPTPATH%\current-install-%TAG%.txt

echo %TAG% > current-install-%TAG%.txt
::
::
::............................finished......................................................
::
echo.
if %TAG%==hc set TAG=Hot Coffee
echo Successfully installed %TAG%
::
::...........................that's it.........................................................
::
:END
echo.
echo [press any key to end]
pause >nul
::::::::::::::::::::::::::::: END OF SCRIPT :::::::::::::::::::::::::::::::::::::::::



//edit
Had to make some changes.
I forgot about something very basic.

rubregg
  • rubregg

    brainslug

  • Members
  • Joined: 03 May 2006

#20

Posted 18 May 2006 - 06:53 AM

@wolf68k
Your request will possibly be worked into the next version. I have started on it, it will include the Spaceeinstein mod as requested by Plaka and I am giving the whole thing a complete structural overhaul which I hope will make possible future extensions easier to work in.

I might also be renaming the label file from .txt to .ini, because it won't be quite as 'dummy' anymore - it will be evaluated to find out which version is currently installed...

If I can do it, I'd like to put it into the .bat's folder rather than the ..\My Documents\GTA San Andreas User Files folder -- that's because some people (like yours truly) will run the .bat from somewhere else. On my system, for example, I have a folder %homepath%\GTA SA stuff. In there I keep everything that doesn't belong to the original installation and everything I need for gameplay (like maps, mission analyzer, links to 'GTA San Andreas User Files' & '..\data\script', backup files, stored savegames etc....)

@everyone
--> "rubregg's call for patience" -- I won't be able to finish this before next week...

Wolf68k
  • Wolf68k

    always howling

  • Members
  • Joined: 12 Mar 2003
  • None
  • Most Knowledgeable [Technology] 2013
    Best Contributor [Technology] 2012

#21

Posted 18 May 2006 - 07:27 AM

Then you need to find some varible or intendifier, whatever, that can get tie bat to see what folder it's in.
I can't find anything like this or I just missing it.

rubregg
  • rubregg

    brainslug

  • Members
  • Joined: 03 May 2006

#22

Posted 18 May 2006 - 10:04 PM Edited by rubregg, 19 May 2006 - 08:06 AM.

QUOTE (wolf68k @ May 18 2006, 09:27)
I can't find anything like this or I just missing it.

@wolf68k
I'm not that far yet, but my guess was if I redirect output to a file without a path it will just create that file in the working directory which should be the .bat's directory. I'll find out on some point... biggrin.gif

Things are still in the working though and a new idea I've been having is to find out about the current install via reading file sizes (found no way of easily doing checksums...).

--> ..... to do that....

@everyone -- I need a little help please..... dontgetit.gif

I do know all the data of the HotCoffee and Spaceeinstein and v2 script files. I do not know for certain which version my original is (1.0 or 1.01 - my guess is 1.0) so could you guys please provide the file sizes (exact file size in bytes - *not* size occupied on disk) of the following:

[gamedir]\text\american.gxt --> v1.0 (738256) , v1.01, v2

[gamedir]\data\script\main.scm --> v1.0 (3079599) , v1.01

[gamedir]\data\script\script.img --> v1.0 (581632) , v1.01 -- (! hc is also 581632 !)

...or tell me if they are all identical for the different versions (which is my guess).... --> trying to avoid a possible bug here... wink.gif

I'll edit above table as info comes in. Oh, and thanks wink.gif

Wolf68k
  • Wolf68k

    always howling

  • Members
  • Joined: 12 Mar 2003
  • None
  • Most Knowledgeable [Technology] 2013
    Best Contributor [Technology] 2012

#23

Posted 19 May 2006 - 12:51 AM Edited by wolf68k, 19 May 2006 - 01:00 AM.

Confirmed....
Change:
echo %TAG% > %SCRIPTPATH%\current-install-%TAG%.txt

to

echo %TAG% > current-install-%TAG%.txt

It'll create the file into same folder that the BAT file is in. So I changed my part of the script.
No sure why I didn't think of that since I've done thing like; browsed to a set folder and typed: dir /b > dirdump.txt and it would create the file in that folder. I used it while creating an unattended XP CD, used the list to have it install hotfixes.



/edit forgot about the filesizes for you
MAIN.SCM v1.0 = 3,079,599
SCRIPT.IMG v1.0 = 581,632

rubregg
  • rubregg

    brainslug

  • Members
  • Joined: 03 May 2006

#24

Posted 19 May 2006 - 07:27 AM Edited by rubregg, 19 May 2006 - 07:31 AM.

QUOTE (wolf68k @ May 19 2006, 02:51)
Confirmed....

excellent biggrin.gif

QUOTE (wolf68k @ May 19 2006, 02:51)
/edit forgot about the filesizes for you

AMERICAN.GXT v1.0 = ? wink.gif


HerrieM
  • HerrieM

    Don't Panic

  • Members
  • Joined: 27 Apr 2006

#25

Posted 19 May 2006 - 08:00 AM

QUOTE (rubregg @ May 19 2006, 09:27)
AMERICAN.GXT v1.0 = ? wink.gif

V1.0 = 738.256

Wolf68k
  • Wolf68k

    always howling

  • Members
  • Joined: 12 Mar 2003
  • None
  • Most Knowledgeable [Technology] 2013
    Best Contributor [Technology] 2012

#26

Posted 24 May 2006 - 06:42 PM

*kick the topic in the butt*
Back on the first page.

gordogg
  • gordogg

    I'm the Juggernaut BITCH!!!

  • Members
  • Joined: 17 May 2006

#27

Posted 24 May 2006 - 07:01 PM

hey can any one just upload the script files for version two and post the link to them. that would make it easier for those who only have the script files for v1 and wish to switch between them.


(i really just wanted the script files for version 2 for myself. lol!)

quartet1977
  • quartet1977

    Soldier

  • Members
  • Joined: 03 Dec 2005

#28

Posted 24 May 2006 - 07:36 PM

QUOTE (gordogg @ May 24 2006, 15:01)
hey can any one just upload the script files for version two and post the link to them. that would make it easier for those who only have the script files for v1 and wish to switch between them.


(i really just wanted the script files for version 2 for myself. lol!)

v2 script files can be found at this pinned thread on Mission Help's main page.

rubregg
  • rubregg

    brainslug

  • Members
  • Joined: 03 May 2006

#29

Posted 04 June 2006 - 02:00 AM

New version 0.3 released

...proudly announcing the new version of the script switcher which includes Spaceeinstein's All-In-One Mod as requested by Plaka and also has a slightly improved look & feel and hence should be even more comfortable to use smile.gif

See the edited first posting for details and download link.

For those interested, I've gone off the file size check for the moment but rather read the label file to find out about the currently installed scripts.

As usual: Please use, please test, please give feedback, please enjoy smile.gif

Plaka
  • Plaka

    King Of San Andreas

  • Members
  • Joined: 22 Feb 2005

#30

Posted 04 June 2006 - 10:34 AM

All setup and working, looks good rubregg !

Great work man and thanks wink.gif

Plaka.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users