TibiaWiki
Advertisement

I would like it very much if someone edited my Tip and set it out properly and more neatly.

Explanation of the Tip - Basically its a tutorial to create a MS-DOS Batch file that copies over the Tibia.cfg before Tibia opens. The Tibia.cfg saves everytime you logout and contains all your Hotkey information.
Yuki Zou 10:41, 27 February 2009 (UTC)


It sounds great, but I don't completely understand it. cd = change directory? Ok, if I understood it correctly, when starting up tibia, it will use tibia.cfg. So what you do is:

  • erase all info in tibia.cfg
  • copy info of hotkey1.cfg to tibia.cfg
  • start up tibia using tibia.cfg, which contains the info of hotkey1.cfg

Is this it? ^^ Bennie (talk ~ fellows) ^^ 13:37, 27 February 2009 (UTC)


@Bennie. Specifically it replaces/overwrites the contents of tibia.cfg with hotkeys1.cfg.

Tibia.cfg is a configuration file that holds your hotkeys, Automap marks, VIP descriptions. This creates two files that only differ in the hotkeys. When you select one of the batch files (hotkeys1.bat) it will copy the contents of hotkeys1.cfg over tibia.cfg then it runs the Tibia client which uses tibia.cfg, now with your first selection of hotkeys.
--DM ><((°> Contribs <°))>< talk to me 01:48, 28 February 2009 (UTC)


Ok, thanks, the tip is much better now. Only, it will be a bit large on the main page I think :P ^^ Bennie (talk ~ fellows) ^^ 09:21, 28 February 2009 (UTC)


It will be longer than usual, but there is plenty of space for it. Is there anything that is not clear or could be made easier to understand?
--DM ><((°> Contribs <°))>< talk to me 00:39, 1 March 2009 (UTC)


All looks good, maybe a little bunched up.. but still good.
It would be nice if someone could tinker with it a little more to get it looking right. The Steps are set out properly and you can understand them when you read them. But the set-out is still a little messy.
Note: When you open Tibia the "cmd" command window may stay open. You can close that without any consequences.
Yuki Zou 05:21, 1 March 2009 (UTC)


Edited out:
You can also right click on "hotkeys.bat" and click "Open with" or "Send to" Notepad.
Because typing "notepad %appdata%/tibia/hotkeys1.bat" will create the file and open it with notepad.
and re-sentenced Step 1 to get rid of the "Note: You could also do this...."
Yuki Zou 05:35, 1 March 2009 (UTC)


Answers to most general problems:


If your Tibia client is not located in "c:\program files\tibia\tibia.exe" then you will have to edit your (*.bat) files and specify the correct location.

If you do not see the "Application Data" folder. You will need to go to Tools → Folder Options → View and select "Show hidden files and folders."

If you need to edit the (*.bat) files again, right-click the file and click Open with.. → Notepad.
Right-Click the original file, not the shortcut.

To make your client open in Dx5 by default (as shown in the Framerate article) add engine 0 the last line in your (*.bat) files so they look like this:

copy hotkeys1.cfg tibia.cfg /y
c:
cd "c:\program files\tibia"
"c:\program files\tibia\tibia.exe" engine 0

You will have to repeat steps 1-3 in this tutorial again when the Tibia Client is updated, because parts of the Tibia.cfg will change and your Hotkeys1.cfg and Hotkeys2.cfg will have to be re-done to reflect those changes.
Yuki Zou 05:59, 1 March 2009 (UTC)


Bennie was right. The Tip does clog up the main page a bit.
Maybe have a small description on the Main Page, then link it to the article?
Yuki Zou 06:48, 2 April 2009 (UTC)


I thumbed the picture, people who are interested can click on it to see it correctly. Is it ok now? ^^ Bennie (talk ~ fellows) ^^ 15:38, 2 April 2009 (UTC)


I'm not sure if people are having trouble understanding the steps and Its quite hard to get to this talk page.
Bennie, would you be able to add "Click Here for help." with a link to this page at the bottom of the Tip?
(Article is locked for edits)
Yuki Zou 18:22, 8 April 2009 (UTC)


added help note to talk. --DM ><((°> Contribs <°))>< talk to me 18:33, 8 April 2009 (UTC)


DM took care of it. Because I'm used to wikis, I can't actually imagine people can't find the talkpage of a page. Well, maybe it's just me. ^^ Bennie (talk ~ fellows) ^^ 19:06, 8 April 2009 (UTC)


A few extra tips

How to save any hotkey changes made in game

The original code rewrote the tibi.cfg with the info in hotkey.cfg, then ran tibia.
as you can see, that is still in here as well as a bit more:
hotkeys1.bat

copy hotkeys1.cfg tibia.cfg /y
c:
cd "c:\program files\tibia"
"c:\Program files\tibia\tibia.exe"

c:
cd "%appdata%\tibia\"
copy tibia.cfg hotkeys1.cfg /y
exit

With this, it will not only use the hotkey set, but save any changes made to the hotkey set in game while using that hotkey set when tibia is closed.
NOTE: if you close out the .bat file before you exit tibia, it will not save the hotkey file back to itself.
for example: if you get a new level and can now use SD runes and want to hotkey that, this will save any changes made to hotkeys done in game back to the reading hotkey file. (in this case, hotkeys1.cfg)
if you want to see what the code does in the .bat window after tibia is closed, replace "exit" at the end with "pause"

Make the .bat file load minimized

I am going to assume you know what you are doing as is, if not you might not want to attempt this. If you want to go the extra step and make the .bat open already minimized, this will require making an extra .bat file to run the original .bat file. for instance, say you are using hotkey1.bat and you want it to load minimized, create a new file in the same directory as hotkey1.bat, we will name it minimize1.bat for clarity.
for most of u the directory is "%appdata%\tibia\" or C:\Documents and Settings\[User Name]\Application Data\Tibia
in minimize1.bat you should have the following:

start /min hotkeys1.bat

now instead of creating a shortcut to hotkeys1.bat, create a shortcut to minimize1.bat. this will open the minimize1.bat which will flash a cmd prompt, then open the hotkeys1.bat file minimized already.
the reason it only flashes the command prompt is because the minimize1.bat file only opens the hotkeys1.bat file then closes.


An alternate menu-batch file

I made this small batch program with a menu that asks which of the 4 vocations you will play. The batch file copies the (vocation).cfg to tibia.cfg, and creates (vocation).cfg if it doesn't exist. It will wait for the Tibia client window to close, and then ask you if you want to save the current configuration.

All you need to do to install it is to copy the code to a batch file in your %appdata%/tibia directory and edit the 2 paths at the top so it matches your personal paths.

(edit: some small bugfixes)

@ECHO off
set userpath=c:\users\username
set programpath=c:\program files
:start
cls
ECHO.
ECHO Choose your set of hotkeys.
ECHO.
ECHO 1. Knight
ECHO 2. Paladin
ECHO 3. Druid
ECHO 4. Sorcerer
ECHO.
ECHO X. Exit
ECHO.
set choice=
set /p choice=(1, 2, 3, 4 or X): 
if not '%choice%'=='' set choice=%choice:~0,1%
if '%choice%'=='1' goto knight
if '%choice%'=='2' goto paladin
if '%choice%'=='3' goto druid
if '%choice%'=='4' goto sorcerer
if '%choice%'=='x' goto end
if '%choice%'=='X' goto end
goto start
REM ------CLIENT LOAD------
:clientload
ECHO.
ECHO Loading Tibia client...
ECHO.
ECHO Don't close this window if you want to save your hotkey configuration.
ECHO.
ECHO Waiting for Tibia client to close...
c:
cd "%programpath%\tibia"
"%programpath%\tibia\tibia.exe"
if '%choice%'=='1' goto savechoiceknight
if '%choice%'=='2' goto savechoicepaladin
if '%choice%'=='3' goto savechoicedruid
if '%choice%'=='4' goto savechoicesorcerer
REM ------KNIGHT------
:knight
c:
cd "%userpath%\application data\tibia"
IF EXIST knight.cfg (
goto copyknight
) ELSE (
cls
ECHO.
ECHO knight.cfg does not exist!
ECHO Set your hotkeys and close the Tibia client to save them.
goto clientload
:copyknight
cls
c:
cd "%userpath%\application data\tibia"
ECHO.
ECHO Copying knight.cfg to tibia.cfg...
copy knight.cfg tibia.cfg /y
goto clientload
REM ------SAVE KNIGHT SETTINGS AFTER CLOSING CLIENT------
:savechoiceknight
ECHO.
set choice=
set /p choice=Save configuration? Y/N  
if not '%choice%'=='' set choice=%choice:~0,1%
if '%choice%'=='Y' goto knightsave
if '%choice%'=='y' goto knightsave
if '%choice%'=='N' goto start
if '%choice%'=='n' goto start
ECHO "%choice%" is not valid please try again. (Y or N)
goto savechoiceknight
:knightsave
c:
cd "%userpath%\application data\tibia"
copy tibia.cfg knight.cfg /y
ECHO.
ECHO Configuration saved to knight.cfg!
ECHO.
ECHO Returning to main menu...
ECHO.
pause
cls
goto start
REM ------PALADIN------
:paladin
c:
cd "%userpath%\application data\tibia"
IF EXIST paladin.cfg (
goto copypaladin
) ELSE (
cls
ECHO.
ECHO paladin.cfg does not exist!
ECHO Set your hotkeys and close the Tibia client to save them.
goto clientload
:copypaladin
cls
c:
cd "%userpath%\application data\tibia"
ECHO.
ECHO Copying paladin.cfg to tibia.cfg...
copy paladin.cfg tibia.cfg /y
goto clientload
REM ------SAVE PALADIN SETTINGS AFTER CLOSING CLIENT------
:savechoicepaladin
ECHO.
set choice=
set /p choice=Save configuration? Y/N  
if not '%choice%'=='' set choice=%choice:~0,1%
if '%choice%'=='Y' goto paladinsave
if '%choice%'=='y' goto paladinsave
if '%choice%'=='N' goto start
if '%choice%'=='n' goto start
ECHO "%choice%" is not valid please try again. (Y or N)
goto savechoicepaladin
:paladinsave
c:
cd "%userpath%\application data\tibia"
copy tibia.cfg paladin.cfg /y
ECHO.
ECHO Configuration saved to paladin.cfg!
ECHO.
ECHO Returning to main menu...
ECHO.
pause
cls
goto start
REM ------DRUID------
:druid
c:
cd "%userpath%\application data\tibia"
IF EXIST druid.cfg (
goto copydruid
) ELSE (
cls
ECHO.
ECHO druid.cfg does not exist!
ECHO Set your hotkeys and close the Tibia client to save them.
goto clientload
:copydruid
cls
c:
cd "%userpath%\application data\tibia"
ECHO.
ECHO Copying druid.cfg to tibia.cfg...
copy druid.cfg tibia.cfg /y
goto clientload
REM ------SAVE DRUID SETTINGS AFTER CLOSING CLIENT------
:savechoicedruid
ECHO.
set choice=
set /p choice=Save configuration? Y/N  
if not '%choice%'=='' set choice=%choice:~0,1%
if '%choice%'=='Y' goto druidsave
if '%choice%'=='y' goto druidsave
if '%choice%'=='N' goto start
if '%choice%'=='n' goto start
ECHO "%choice%" is not valid please try again. (Y or N)
goto savechoicedruid
:druidsave
c:
cd "%userpath%\application data\tibia"
copy tibia.cfg druid.cfg /y
ECHO.
ECHO Configuration saved to druid.cfg!
ECHO.
ECHO Returning to main menu...
ECHO.
pause
cls
goto start
REM ------SORCERER------
:sorcerer
c:
cd "%userpath%\application data\tibia"
IF EXIST sorcerer.cfg (
goto copysorcerer
) ELSE (
cls
ECHO.
ECHO sorcerer.cfg does not exist! 
ECHO Set your hotkeys and close the Tibia client to save them.
goto clientload
:copysorcerer
cls
c:
cd "%userpath%\application data\tibia"
ECHO.
ECHO Copying sorcerer.cfg to tibia.cfg...
copy sorcerer.cfg tibia.cfg /y
goto clientload
REM ------SAVE SORCERER SETTINGS AFTER CLOSING CLIENT------
:savechoicesorcerer
ECHO.
set choice=
set /p choice=Save configuration? Y/N  
if not '%choice%'=='' set choice=%choice:~0,1%
if '%choice%'=='Y' goto sorcerersave
if '%choice%'=='y' goto sorcerersave
if '%choice%'=='N' goto start
if '%choice%'=='n' goto start
ECHO "%choice%" is not valid please try again. (Y or N)
goto savechoicesorcerer
:sorcerersave
c:
cd "%userpath%\application data\tibia"
copy tibia.cfg sorcerer.cfg /y
ECHO.
ECHO Configuration saved to sorcerer.cfg!
ECHO.
ECHO Returning to main menu...
ECHO.
pause
cls
goto start
:end

--Pimpo 12:02, 30 April 2009 (UTC)

Advertisement