Creation/Dev/Releases/Client/5.006

From Graal Bible

Release date

July 13th 2007 for Mac, Linux and Windows

New Features

General

  • improved external playerlist (Windows):
    • the external playerlist is now working on the login server
    • you can dock it to the left or right side of the desktop
    • you can show/hide it individually from the main Graal Window
    • shows a tray menu icon for displaying incoming PMs
    • fixed problems with the transparency of some head icons
    • displays the head on Kingdoms and Zone
  • PMs are now always using the internal scripted PM window
    • prevents problems with javascript exploits inside PMs
    • allows us to improve and customize the PM window in the future (since it is scripted)
    • prevents problems with missing dlls on some Windows installations
  • new log window:
    • on Windows it is using the internal log window
    • it is using several different tabs which only display log messages for files, scripts, sounds etc. instead of displaying everything in one huge log
    • optimized to not lag when the window is not visible
  • the Graal window is snapping to the desktop border when moved near the border
  • the profile window on Windows is resizable now
  • the in-game option window and profile window on Linux/Mac are resizable now
  • improved the login to servers:
    • it shows a message "Connecting to ..."
    • the login to servers using GS2 is much faster
    • it is directly connecting to the login server instead of displaying the start screen first
  • when a PM from a npcserver is received and the PM history for it is more than 100k bytes then the history for it will be deleted, for preventing too huge files (many servers send a welcome message each time you login)
  • files that contain "bomy" or start with "b_" are no longer saved into levels/bomys (requested by the Graal2001 developers)
  • Linux: it is possible again to start graal by just typing "graal" on the command line (instead of typing "graalexe")
  • drastically reduced the memory taken by scripts and the scripting engine
  • the setup is not scanning the current folder anymore, so it's starting much faster when being downloaded to the temporary internet folder and started from there
  • improved protection against memory hacking
  • for saving screenshots it is now using the internal file dialog instead of the Windows file dialog which often made problems with messed up Windows installations (missing dlls)
  • the Graal executable is signed, so it's easier to check that it hasn't been modified, and advanced Antivirus-programs don't complain anymore when Graal is updating

Translation System

  • the client is now multi-language again: it is using the translation file format .po like on Graal Kingdoms
    • you can find the files in translations/*.po (requires you to run the setup to see the files) and you can add new files if you want to translate the Graal interface into other languages (right now only German-de and French-fr are provided beside English)
    • to start a new translations copy gui_en.po to gui_DOMAIN.po and guiwindows_en.po to guiwindows_DOMAIN.po (domain can be en,fr,de,pt,es etc.)
    • po files can be edited either with text editor or a specialized po-editor like poedit.net
    • as encoding use ISO 8859-15 (or ISO 8859-1 or Windows codepage 1252)
  • the new client-side language support can also be used on servers with GS2:
    • create a .po file on the serverside and make it downloadable, the filename must end with "_de.po" if it is a german translation, "_fr.po" if it's a french translation etc.
    • on client-side load the translation with the command loadtranslation(file) - that will download "file_DOMAIN.po" depending on the players language
    • in scripts you can use the translated strings with the script function "_()" (it is very short for easy usage) - that call will return the translation if one is existing, otherwise the original text
    • it is planned in the future that an RC command is added which let's you easily generate a blank po file based on the occurances of _() in the scripts, for that also use the function N_() which is not changing the text, but is marking the text for being included in the scan (for text that you don't want to translate immediately)
    • if the player is connecting for the first time then the translation might not be downloaded yet, thats why there is an event onTranslationUpdated(file)
    • when the player changes the language in the options then an event onPlayerLanguageChanges(playerobject) is invoked, the same like on server-side
      • on clientside the playerobject is always the local player (there is no event yet when other people change their language)
      • it is recommended to update the text on GUI controls when the language changes

GUI

Graphics

  • Video capture:
    • press Alt+6 for recording videos, configure it in the options
    • the video is saved in the Graal folder under videos/ (*.avi format)
    • it is currently saving uncompressed and without sound
  • Easy skinning of GUI controls:
    • set GuiControl.style to "mytheme.wba" or "mytheme.zip" for skinning controls
    • it will replace the graphics and colors for most controls, except the font size/style
    • use the new attribute "clientrelative" for GuiWindowCtrl for making them compatible with different styles without needing to reposition the sub controls
    • known problems:
      • not all styles look perfectly yet
      • when switching between styles that use the same name for graphics then it might still show the graphics from the old style; restart the game to fix that
      • some controls still use the font type and size defined in the regular GUI profiles (control.profile)
    • there are new GUI controls for using taskbar skins:
      • GuiTaskBar - displays a bar with space for a start button on the left side, 'task'-buttons in the middle, and a tray or time display on the right side; if the control is not using any 'style' then it will look like a normal GuiControl
      • GuiStartMenuCtrl - similar to a GuiContextMenuCtrl, but displays a bigger menu like the Windows start menu
      • GuiButtonCtrl.stylesection - buttons can be skinned, by changing 'stylesection' you can specify what look the button should use, e.g. "Taskbar.StartButton", "Taskbar.ButtonHorz"
  • players and npcs can be made transparent - you can now use the same attributes like for showimgs/findimgs for setting red,green,blue,alpha and mode
  • fixed a bug with reading pngs that had a bad palette size
  • added support for 1-bit pngs
  • when an image is downloaded from the web and doesn't have a known file extension then the engine is trying to guess the file type by reading the content and displaying it correctly in most cases
  • when a web image is not existing then it is printing an error in F2 now and is not saving the data returned by the webserver anymore
  • Windows version graphics:
    • printing an error in the F2 window when the graphics card is out of video RAM (some images will not appear then)
    • trying to free all possible resources when the graphics card is out of video RAM to reduce that error
    • when loading images the engine is cutting out all fully transparent parts to minimize the use of video memory
    • fixed some problems with icons and classic bodies not refreshing or not displaying
  • Linux/Mac version graphics:
    • optimized the usage of graphics - it is using directly 8-bit palettized images with OpenGL and for tile drawing (before: always converting to 24 bit or 32 bit)
    • smoother drawing of stretched images (like in windows version)
    • improved font system which is more compatible, better looking and taking less ressources
  • Text drawing: right-aligned italic text is shifted 2 pixels to the left to prevent clipping problems
  • Improved support for bmp:
    • fixed a bug in the bmp reader so that bmps with odd width or height are correctly displayed
    • support for 32 bit bmps
    • not crashing on unsupported formats
  • particles support text shadow (emitter.particle.textshadow, shadowcolor, shadowoffset)
  • Linux/Mac: the scripted effects can be turned off directly in the options now (that only works when servers support those options)

Sounds

  • playlooped() is updating the volume each time it is called depending on the distance to the player
  • music files are now played non-looped by default when using the play() command, use playlooped() if you want to play a looped music or stream
  • when the volume is zero then wavs and mp3s are not downloaded anymore
  • downloaded wav files are automatically played (with the right volume and looping if requested)
  • when a music file (mp3, midi etc.) is played but is not existing yet then it is automatically played once it is downloaded
  • on Windows XP/Vista 64 bit it is by default not trying to use sounds because it freezes Graal, you can turn off this behaviour by setting "tryloadsoundson64bit=true" in the Graal options file - open game_config.txt with Wordpad

Scripting

Bug Fixes

  • General bugs
    • fixed a problem that crashed the client on serverswitch when still having PMs on the player list from players that already logged out
    • when downloading files with the scripted RC into the Graal folder then it is using the correct path and is not moving the file to the level/images/download folder anymore
    • fixed a problem with defaultmovement where the player was not moved on the map when the player was moved by script
    • on vista it doesn't display a runtime error when you close the program anymore
  • Script engine bugs
    • fixed the script garbage collector (deleting unused/unlinked TStaticVar)
    • showimgs/findimgs that are attached to the player via attachtoowner=true are correctly synchronized to the player position (and don't lag behind)
    • hideimg() is not crashing the engine anymore if it contains gani scripts
    • the destroy() function for GuiControls and TStaticVar are not causing crashes anymore, but the objects are disappearing from scripting so you can correctly recreate them
    • fixed a problem with the random function - int(random(0,upperlimit)) was sometimes returning 'upperlimit' due to rounding if a floating point value is very close to an integer value - the random() function is now preventing that the result is identical to the upper limit
    • fixed a script problem where "-" was seen as number (-1)
    • fixed a crash when returning a temp. array from a suspended function (sleep/waitfor in a public function)
    • fixed the modulus operator 'a % b' for the case that a is negative and b is high number (>10000), previously it was giving a negative number which should not happen (-3 % 100000 should give 99997)