Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
Joined: May 2003
Location: Boise, ID. USA
J
jr_1 Offline OP
stranger
OP Offline
stranger
J
Joined: May 2003
Location: Boise, ID. USA
I am posting scripts that I created in Visual Dialogscript that automatically performs quicksaves and shows special objects (alt). I am making the assumption that the full game will not have an auto quicksave feature. I am posting this early as I will not be purchasing the game when it first comes out (I will be waiting for some patches first). Anyway, this beats having to remember to quicksave every so often and having to hold down the alt key manually. The quicksave will not work sometimes if you are in menus, in conversation dialogs, etc. However the quicksave game file is parsed, so it will retry approx. every 8 seconds to quicksave (the script runs as low priority, so you shouldn't notice any slowdowns in the game). Obviously you can use this script for other games with minimal modification. You will need a version of Visual Dialogscript to run this script. You can download a free version of Visual Dialogscript at the following website:

http://www.dialogscript.com/vds.html (download Personal Visual DialogScript 4), if you want to compile it into an .exe program you will need to purchase version 5 of Visual DialogScript (note I am not affiliated with the company that makes DialogScript in any way, just posting this because I find the scripts quite helpful).

Notes regarding the code: F5 key is mapped to quicksaves. Note that the script is an endless loop - you will need to manually stop the script from running when you exit BD. You obviously will need to change directory references in the code to where you installed the game to and the quicksave locations.

Download the code at (adjust the variables to your preference of course):

(Script that presses the alt key every 2.3 seconds)
http://www.mnimages.com/sendkeys1.dsc

(Script that presses the alt key every 2.3 seconds and auto quicksaves approx. every 6-7 minutes)
http://www.mnimages.com/sendkeys2.dsc

(Script that auto quicksaves approx. every 6-7 minutes)
http://www.mnimages.com/sendkeys3.dsc


To save the code: From your file menu in your Internet browser select save as... add .dsc to the end of the filename and for the Save as type pull down select Text file (.txt). The formatting should look correct when you load it now in the IDE.

Joined: Aug 2003
veteran
Offline
veteran
Joined: Aug 2003
Will check it out when the game is in my hands. If it works I can only say:


Thank you,Thank you,Thank you,Thank you,Thank you,Thank you,Thank you,Thank you,Thank you,Thank you,Thank you,Thank you,Thank you,Thank you,Thank you, <img src="/ubbthreads/images/graemlins/freak.gif" alt="" />


Not in the mood for cheese?
That excuse has more holes than a slice this fine Gorgombert!
Joined: May 2003
Location: Boise, ID. USA
J
jr_1 Offline OP
stranger
OP Offline
stranger
J
Joined: May 2003
Location: Boise, ID. USA
- well your welcome many times over. This works quite well with the demo (and it worked with Divine Divinity), so it should work with the full game. If you have any problems let me know.

Joined: Aug 2003
veteran
Offline
veteran
Joined: Aug 2003
Will do. Maybe some of the german chaps can test it out.


Not in the mood for cheese?
That excuse has more holes than a slice this fine Gorgombert!
Joined: Mar 2003
veteran
Offline
veteran
Joined: Mar 2003
Welcome, jr_1! <img src="/ubbthreads/images/graemlins/smile.gif" alt="" />

Nice tools you have there! <img src="/ubbthreads/images/graemlins/up.gif" alt="" /> It's good to see helpful people joining the community.

I was thinking, would it be possible to have a hot-key to enable and disable the auto-save mid game? I was thinking that it would a pain if it decided to overwrite your auto-save in the middle of an unfortunate battle.

Keep up the good work! <img src="/ubbthreads/images/graemlins/smile.gif" alt="" />

Joined: May 2003
Location: Boise, ID. USA
J
jr_1 Offline OP
stranger
OP Offline
stranger
J
Joined: May 2003
Location: Boise, ID. USA
That is an unfortunate side effect to having this script running - sometimes it will save during a battle at a bad time (at least 2 quicksave files are saved, so you can get back to the old one).

The problem when you think about this is that having a hot-key to enable and disable the auto-save is I think impossible. This is because after the script executes it passes exection to the Beyond Divinity game - from this point on the Beyond Divinity game controls all the hot-keys.

Oddly enough I have a F Lock (Function lock) button on my keyboard which disables/enables the function keys, but the script overrides this and saves anyway whether the F Lock is on or off. I have even tried keyboard re-mapping tools to try and manually disable the auto-save, but alas I have had no such luck in getting it to work.

I am not a programmer by trade - just a system administrator who writes some file/utility type scripts at work. If anyone has any suggestions on how maybe to accomplish this - I will look further into trying to get this to work.

Joined: Mar 2003
veteran
Offline
veteran
Joined: Mar 2003
Quote
Oddly enough I have a F Lock (Function lock) button on my keyboard which disables/enables the function keys, but the script overrides this and saves anyway whether the F Lock is on or off. I have even tried keyboard re-mapping tools to try and manually disable the auto-save, but alas I have had no such luck in getting it to work.

<jargon alert!> That would be because the F-Lock key is part of the keyboard and not part of the system. I'm guessing the script sends the "F5" keystroke to the system, not the keyboard scan-code for the F5 key. </jargon alert!>

Quote
I am not a programmer by trade - just a system administrator who writes some file/utility type scripts at work. If anyone has any suggestions on how maybe to accomplish this - I will look further into trying to get this to work.

Same here, just an amateur. <img src="/ubbthreads/images/graemlins/smile.gif" alt="" />

I had a look at your script (not knowing anything about the language), and I was wondering about the path names. It looks like the game must be installed in C:\Games\Beyond Divinity Demo\ for the script to work. I'd suggest at least having a quick fix guide for anyone that has it installed elsewhere.

Also, does the script need to know which saved game is more recent?

Joined: May 2003
Location: Boise, ID. USA
J
jr_1 Offline OP
stranger
OP Offline
stranger
J
Joined: May 2003
Location: Boise, ID. USA
Good News (at least I think from preliminary testing) - the Caps Lock key when on appears to be overriding keys mapped in Beyond Divinty. For instance if you map Shift+Z to quick save it will not work with the Caps Lock key enabled. It also disables the script from autosaving! I do not have time to update my original post yet, but will try to do so tomorrow with this new information. The Caps Lock key can then be used to disable the auto quicksave while you are in battle (if you remember to press it). Thanks for mentioning this HandEFood, I think many users would like to be able to do this and disable the quicksave before going into certain battles.

HandEFood - the game does not need to be installed to C:\Games\Beyond Divinity Demo\ for the script to run correctly. You just need to change these directory locations in the script to where you installed the game to. I should make this more clear though in my original post on how to do this with examples (which I will try to do tomorrow).

The script knows which save game is more recent as it parses the date/time of both quicksave data files and compares this to the current/date time to see which one is more recent.




Joined: Mar 2003
veteran
Offline
veteran
Joined: Mar 2003
Quote
The Caps Lock key can then be used to disable the auto quicksave while you are in battle (if you remember to press it).

Good on you! <img src="/ubbthreads/images/graemlins/smile.gif" alt="" /> That will be a very worthy feature. Does CAPS-LOCK have any other pre-set use in Beyond Divinity? In Divine Divinity it unlocked the camera.

Quote
You just need to change these directory locations in the script to where you installed the game to.

Whoops! I read it too quickly and missed that!

Quote
The script knows which save game is more recent as it parses the date/time of both quicksave data files and compares this to the current/date time to see which one is more recent.

But why does it need to know?

Joined: May 2003
Location: Boise, ID. USA
J
jr_1 Offline OP
stranger
OP Offline
stranger
J
Joined: May 2003
Location: Boise, ID. USA
Update: The instructions and code downloads have been updated as of 04/13/2004. If you have downloaded the code previous to this date - please download the new code so you have the updated changes. The new instructions include the ability to manually disable the auto quicksave from occuring - this may be preferable for some battles you encounter where an auto quicksave during the battle would be undesirable.

You will need to map the quicksave key in the Beyond Divinity game to shift-z. Note that after you exit Beyond Divinity and reload Beyond Divinity the game may change the quick save key to z (instead of shift-z). I think this may be some kind of bug. Load a saved game and make sure your Caps Lock key is on then remap the quick save key to shift-z (remember the Caps Lock key should be on when you do this). Please also change any key mappings that are dependent upon the shift key (toggle plate visiblity, open load plate, open save plate, etc.).

Warning: To save time you might be tempted to change the quick save key in the keylist.txt file to shift z. I have tried this and it does not work. You need to change this key mapping in the game only.

So,

Caps Lock Key is on = Auto quicksave is enabled

Caps Lock Key is off = Auto quicksave is disabled

Now when you are playing the game and would like to disable the quicksave from running (before or during a battle for instance) just make sure the Caps Lock key is off. Keep in mind when the Caps Lock is off you will eventually get stuck in the script loop that will be retrying every 8 seconds to quicksave the game (shift-z). You will notice this if you are running one of the scripts below that presses the alt key every 2.3 seconds - this will not start working again until you re-enable the Auto quicksave by enabling the Caps Lock key back to on.

Original Post:
I am posting scripts that I created in Visual Dialogscript that automatically performs quicksaves and shows special objects (alt). I am making the assumption that the full game will not have an auto quicksave feature. I am posting this early as I will not be purchasing the game when it first comes out (I will be waiting for some patches first). Anyway, this beats having to remember to quicksave every so often and having to hold down the alt key manually. The quicksave will not work sometimes if you are in menus, in conversation dialogs, etc. However the quicksave game file is parsed, so it will retry approx. every 8 seconds to quicksave (the script runs as low priority, so you shouldn't notice any slowdowns in the game). Obviously you can use this script for other games with minimal modification (I use the code at http://www.mnimages.com/sendkeys.dsc for quicksaving in Star Wars: Knights of the Old Republic). You will need a version of Visual Dialogscript to run this script. You can download a free version of Visual Dialogscript at the following website:

http://www.dialogscript.com/vds.html (download Personal Visual DialogScript 4), if you want to compile it into an .exe program you will need to purchase version 5 of Visual DialogScript (note I am not affiliated with the company that makes DialogScript in any way, just posting this because I find the scripts quite helpful).

Notes regarding the code: Shift-z key is mapped to quicksaves. Note that the script is an endless loop - you will need to manually stop the script from running when you exit BD. You obviously will need to change directory references in the code to where you installed the game to and the quicksave locations.

For example lets say I installed the game to the directory D:\Games\Beyond Divinity, so I would change the following lines (download the example.dsc code from the address below).

Note that the directory change entry is the directory where the game starts from and you can find this by using the secondary mouse button (normally this is the right mouse button) on the shortcut icon for Beyond Divinty and select Properties and then look in the Start in: input field.

You can easily change the how often the alt key is pressed and how often quicksaves occur (dowload the example2.dsc code from the address below).

Download the code at (adjust the variables to your preference of course):

(Example code where directory references are located)
http://www.mnimages.com/example.dsc

(Example code with remark statements explaining what to change to alter how often the alt key is pressed and how often quicksaves occur)
http://www.mnimages.com/example2.dsc

(Script that presses the alt key every 2.3 seconds)
http://www.mnimages.com/sendkeys1.dsc

(Script that presses the alt key every 2.3 seconds and auto quicksaves approx. every 6-7 minutes)
http://www.mnimages.com/sendkeys2.dsc

(Script that auto quicksaves approx. every 6-7 minutes)
http://www.mnimages.com/sendkeys3.dsc

To save the code: From your file menu in your Internet browser select save as... add .dsc to the end of the filename and for the Save as type pull down select Text file (.txt). The formatting should look correct when you load it now in the IDE.

Note: You will notice if you are running a script that presses the alt key every so many of seconds that this causes a slight interruption during battles where you press the the space bar to pause (it conflicts when pressed at the same time as the pause key). If only the alt key could be remapped to a shift-key..... perhaps someone knows how to do this?

Joined: May 2003
Location: Boise, ID. USA
J
jr_1 Offline OP
stranger
OP Offline
stranger
J
Joined: May 2003
Location: Boise, ID. USA
Quote
The script knows which save game is more recent as it parses the date/time of both quicksave data files and compares this to the current/date time to see which one is more recent.

But why does it need to know?
[/quote]

This is so it autosaves the game approx. every 6-7 minutes. For instance if you are in the main menu or remapping keys and then come back to the game - it needs to check that these quicksave data files are current, so it parses the files and then attempts to retry saving every 8 seconds. Hope that makes sense. You might want to run the script with the debug windows on and add the variables (%) to the window. Run through it using single step - it will give you a much better idea as to what is going on.

Joined: Mar 2004
journeyman
Offline
journeyman
Joined: Mar 2004
<img src="/ubbthreads/images/graemlins/eek.gif" alt="" /> Sounds way too complicated for me.


Men and nations do behave wisely, once all other alternatives have been exhasted
Joined: May 2003
Location: Boise, ID. USA
J
jr_1 Offline OP
stranger
OP Offline
stranger
J
Joined: May 2003
Location: Boise, ID. USA
Quote
<img src="/ubbthreads/images/graemlins/eek.gif" alt="" /> Sounds way too complicated for me.


Actually the code I have written to do this is quite simple to follow. It's probably not even 1/10th the complexity of the actual game code (which I am assuming is written in C++). Don't feel bad though, I don't understand most code beyond simple scripting!
<img src="/ubbthreads/images/graemlins/puppyeyes.gif" alt="" />

Joined: Mar 2003
A
veteran
Offline
veteran
A
Joined: Mar 2003
Excuse me, what is "Visual Dialogscript" ?


When you find a big kettle of crazy, it's best not to stir it.
--Dilbert cartoon

"Interplay.some zombiefied unlife thing going on there" - skavenhorde at RPGWatch
Joined: Mar 2003
Location: Canada
Support
Offline
Support
Joined: Mar 2003
Location: Canada
From the website;

Quote
Visual DialogScript is a complete development environment for creating either full blown programs or simple batch style scripts under Microsoft Windows(TM), written in a language called DialogScript.

Visual DialogScript was written to fill the gap left by Microsoft's failure to provide a simple yet powerful language for Windows. It's main purpose is to provide a tool to quickly knock together simple utilities, automation scripts or a full blown application that run in a Windows environment. Originally it was not intended as a language for full-blown application development like C++ or Visual Basic(TM), but since it's initial inception it has become so much more than a simple batch language, in fact, it has become a favorite tool for developers using C++ or Visual Basic to create their scripts or programs in half the time it takes them to create the same program in their language.

Joined: Mar 2003
A
veteran
Offline
veteran
A
Joined: Mar 2003
Thanks. Reminds me of "WinBatch".


When you find a big kettle of crazy, it's best not to stir it.
--Dilbert cartoon

"Interplay.some zombiefied unlife thing going on there" - skavenhorde at RPGWatch
Joined: May 2003
Location: Boise, ID. USA
J
jr_1 Offline OP
stranger
OP Offline
stranger
J
Joined: May 2003
Location: Boise, ID. USA
Summary Update:

-Added global hotkeys to enable/disable portions of the script from running
-F10 key now halts and exits execution of the script

The instructions and code downloads have been updated as of 05/09/2004. The new instructions include the ability to manually disable the auto quicksave and the alt key presses from occuring - this may be preferable for some battles you encounter where an auto quicksave during the battle would be undesirable and also to disable the alt key presses so you can pause and unpause during battles easier.

Note: Before you read any further - these new scripts were created in Visual Dialogscript version 5.x. You must have version 5 to run these scripts. Keep in mind that version 5 is not free (30-day trial) after which you have to register which is usually around $99.00. This is probably not worth it unless you want to create your own scripts, etc.

I am leaving the old code and instructions available (see the earlier posts), in case you want to use it with the free downloadable version of Visual Dialogscript 4.

Instructions for vds5.dsc scripts only:
You will need to map the quicksave key in the Beyond Divinity game to F5. Do not map the ScrLk (Scroll Lock) to anything in the game or the F10 key. Start the game with the Scroll Lock key enabled.

So,

Scroll Lock Key is on = Auto quicksave is enabled and alt key gets pressed every 2.3 seconds.

Scroll Lock Key is off = Auto quicksave is disabled and the alt key presses are disabled (basically disables the script from running until you press the Scroll Lock key again).

Download version 5 of dialogscript at:
http://www.dialogscript.com/vds.html

Notes regarding the code: Note that the script is an endless loop - you will need to press the F10 key to exit the script. You obviously will need to change directory references in the code to where you installed the game to and the quicksave locations.

For example lets say I installed the game to the directory D:\Games\Beyond Divinity, so I would change the following lines (download the example.dsc code from the address below).

Note that the directory change entry is the directory where the game starts from and you can find this by using the secondary mouse button (normally this is the right mouse button) on the shortcut icon for Beyond Divinty and select Properties and then look in the Start in: input field.

You can easily change how often the alt key is pressed and how often quicksaves occur (dowload the example2.dsc code from the address below).

Download the code at (adjust the variables to your preference of course):

(Example code where directory references are located)
http://www.mnimages.com/example.dsc

(Example code with remark statements explaining what to change to alter how often the alt key is pressed and how often quicksaves occur plus changing global hot keys)
http://www.mnimages.com/example2.dsc

(Script that presses the alt key every 2.3 seconds)
http://www.mnimages.com/sendkeys1vds5.dsc

(Script that presses the alt key every 2.3 seconds and auto quicksaves approx. every 6-7 minutes)
http://www.mnimages.com/sendkeys2vds5.dsc

(Script that auto quicksaves approx. every 6-7 minutes)
http://www.mnimages.com/sendkeys3vds5.dsc

To save the code: From your file menu in your Internet browser select save as... add .dsc to the end of the filename and for the Save as type pull down select Text file (.txt). The formatting should look correct when you load it now in the IDE.


Moderated by  Larian_QA, Lynn, Macbeth 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.5