BG2 AUTOMATIC REROLLER andROLL DATA COLLECTION PROGRAMversion 0.2 (Beta)by frabjous-----------------------------------------ContentsA. Instructions for UseB. F.A.Q.C. Technical DetailsD. Contact InformationE. Version HistoryF. AcknowledgementsG. Legal~~~~~~~~~~~~~~~~~~~~~~~~A. INSTRUCTIONS FOR USE~~~~~~~~~~~~~~~~~~~~~~~~1. Unzip the file BG2Reroller.exe into a folder of your choice.Be sure that you have write access to this folder.2. Check the graphical settings for your BG2/ToB or Tutu installation. The current version ofthe reroller only works with the following settings:- Windowed Mode (i.e., not Full Screen) (Set either in game or in the BGConfig.exe program.)- 32 Bit Color Depth (Set either in game or in the BGConfig.exe program.)- 3D Acceleration Must Be Disabled (Set with the BGConfig.exe program.)- Contrast and Brightness settings at Minimum (Set in the game.)It is believed that the reroller will work with any resolution; however, it has only been testedat 640x480, 800x600 and 1024x768. (I have no clue if it works with the Bigg's Widescreen mod.)3. Start BG2 or Tutu. Start the character generation process. Choose your character's gender,race, class/kit and alignment, and click "Abilities" to bring up the Ability Score rolling screen.It is recommended that all other programs be closed.4. Run the BG2Reroller.exe program. (It's OK to switch windows or minimize BG2 for this step.) Ifyou have Autohotkey installed, you may click on the .AHK file instead for very slightly fasterresults.5. If you know what delay time in milliseconds you wish to use, input it in the box and clickOK. Otherwise, leave it blank and click OK. (See the F.A.Q. below if you have questions aboutthe delay time.)6. It will take a few seconds for rerolling to begin. While running, press [Pause]to pause, or [F10] to complete the process. The reroller shows the number of rolls cycledthrough, current best score found and other information in a tooltop while running.7. BG2 must remain on top of other windows while the roller is running. Unfortunately, youcannot run the reroller minimized or in the background. Errors will be generated if you try.If you need to use another program or switch windows, exit the reroller or pause it. (You mayexit and restart the reroller multiple times for the same character.)8. The highest score found is automatically stored. When [F10] is pressed, this score is"recalled", and Notepad will be launched with a file containing the data from all rollsrecorded in the current session.9. If you want to keep these data, you should save the rolldata.txt under a different filenameto avoid it being overwritten the next time the reroller runs.~~~~~~~~~~~B. F.A.Q.~~~~~~~~~~~(F.A.Q. stands for frequently asked questions: well, that's misleading here. None of thesequestions have been asked, but I am guessing what you have otherwise asked.)Q1. What versions of the game does the reroller work with?----------------------------------------------------------A1. TO be honest, I'm not entirely sure. I'd appreciate it if you let me know. It think itshould work with all English-language versions of BG2 with ToB installed. I don't know whetheror not it would work with non-English versions, or SoA-only versions.Q2. What's the point? Just hit Ctrl-8.--------------------------------------A2. Good point. Indeed, I agree. Using this program to create a superpowerful character is, forthat purpose alone, a waste of everyone's time. I wrote the script not for the purposes ofcreating such characters, but rather for collecting data to learn about the actual procedurethe game uses to determine ability scores. (Mission succeeded.)However, it cannot be denied that some users will feel better about characters generated bythe reroller as compared to characters created by an explicit cheat like Ctrl-8. Games existonly be enjoyed. If you have more fun using this than Ctrl-8, great!Q3. Will this program work with Tutu? Regular Baldur's Gate? IWD? Planescape?-----------------------------------------------------------------------------A3. It works with EasyTutu, and possibly other versions of Tutu, provided that you installedTutu from the ToB version of BG2, and have not restored the BG1 GUI. (Or at least, it workswith mine!) It does not work with any of the other Infinity Engine games (BG1 or IWD orPlanescape, etc.)Q4. Will this program work with my BG2 mods?--------------------------------------------A4. It should work with most mods. However, it does not work with certain mods that affectthe GUI, and it would not function properly with mods that add races, classes or kits thatmay have starting stats above 19.Q5. How long will I have to let it run to get perfect stats (all 18s, etc.)?----------------------------------------------------------------------------A5. Given the probabilities involved, you'd probably die of old age first. I've never seen itproduce a combined roll over 100 personally, and only rolls that high for those classes thathave higher minimum stat requirements. Don't expect anything above a 96 or 97 for a core class,and even those may take 10 or more hours to produce.Q6. What's with the delay? Why so slow? What does it mean by Optimal Speed reached?-----------------------------------------------------------------------------------When reroll is clicked, the reroller needs to give the game a small amount of time to updatethe scores before it can read them, or the reroller will accidentally misread the scores. Howlong it should pause would depend on many factors, including your system configuration andspecs, and the type of character you are rolling.If you are familiar with the reroller and/or your system, you may manually enter a delay timethat you know is safe. This could typically vary anywhere from 50 ms (for faster systems) to200 ms (for slower systems).If you are unsure what delay time to use, leave this box blank, and the reroller will tryto determine the best delay time to use. To determine this, the reroller goes throughthree phases:In the first phase, the reroller begins with a relatively safe 250 millisecond delay (onefourth of a second) after clicking reroll before attempting to read the scores. It performsa quick error check by doublechecking one of the scores after each read. For each 10 rollsthat pass the error check, one millisecond is shaved off the delay. It keeps shaving off time,thus speeding up the reroller, until it begins to encounter errors or reaches the minimumrecommended delay time of 30 ms. If an error is found, it adds 20 milliseconds to the lowestdelay time reached (as a buffer), and either way, it moves into the second phase.In the second phase, the reroller continues error checking at the speed set at the end of thefirst phase, but the delay time is never reduced. If it encounters any more errors, the delaytime is increased again. Once 1000 rolls are made at a certain delay length with no errorsfound, this delay is considered to be safe, and the third phase begins.In the third phase, it ceases error checking and continues rerolling at a constant speed(slightly quicker by skipping error checks): the speed determined to be safe in the earlierphases. You may wish to make note of this delay time and insert it manually the next timeyou use the reroller.Rolls that fail error checking are reread until they pass error checking before rerolling.The delay time may be increased even after errorchecking is finished if an obvious error isencountered.It would certainly be ideal if the reroller could run faster, but errors would be producedif it did.***********************Note: You can manually decrease the delay time by pressing F12 at any time. However, it isstrongly recommended that you not do this if you want the data collected to be fully accurate.(You can also increase the delay time with F11.)************************Also note that reading the scores typically takes at least as long as the delay, and there isno way to speed this up.Q7. What do the numbers in in the rolldata.txt file mean?---------------------------------------------------------A8. The rows correspond to the data recorded for the rolls in order, with the numbers asfollows:Strength,Strength-Percentile,Dexterity,Constitution,Intelligence,Wisdom,Charisma,TotalThe file should be easy to import into a spreadsheet as a comma-delimited text file.Q8. Dude, you have way too much time on your hands.---------------------------------------------------A8. Perhaps, but that's not a question.~~~~~~~~~~~~~~~~~~~~~C. Technical Details~~~~~~~~~~~~~~~~~~~~~The reroller was written as an Autohotkey script. See the AHK website here:I have included the source code .AHK file for those familiar with AHK. If youhave Autohotkey installed, you may simply run the .AHK script instead of the .EXEand you might even see a slight increase in performance.However, please do not redistribute any altered code without contacting me.Errors are collected in a file called errorlog.txt. The first number in each logentry is a timestamp.~~~~~~~~~~~~~~~~~~~~~~~D. Contact Information~~~~~~~~~~~~~~~~~~~~~~~The best way to contact me with questions, help requests and suggestions regardingthe reroller is to send a private message to me (user name: frabjous) at the Biowareforums.(You will need to create a free account.)~~~~~~~~~~~~~~~~~~~E. Version History~~~~~~~~~~~~~~~~~~~1/7/08 - 0.2 Beta* Added Input box to manually set the delay time; also bottomed out delay time at30 ms for those running in testing mode.1/3/08 - 0.1 Beta.* Initial public release.~~~~~~~~~~~~~~~~~~~~F. Acknowledgements~~~~~~~~~~~~~~~~~~~~Thanks to MereOr for inspiration, scripting help, and sharing the code for his similar scriptfor BG1. Thanks to Ecoris and Luan for discovering problems with the initial beta release.~~~~~~~~~G. Legal~~~~~~~~~Copyright 2008, KCK.This is free software. You may distribute it, use it or modify it for any purpose, solong as it is not redistributed in altered form without permission. It is distributedin the hope that it will be useful, but WITHOUT ANY WARRANTY or even the impliedwarranty of merchantability or fitness for a particular purpose.