------------------------------------ New features/bug fixes in v2.12 rev1 ------------------------------------ - fixed ghost movement on graal2002, also ghosts can now see ganis with script like the torch lamps ------------------------------- New features/bug fixes in v2.12 ------------------------------- - compatibility of the clients for Graal2001 and Graal2002 - many new features for Graal2002, which will be listed later when the game is public - fixed updating images from the server - fixed some linking problems - new editor mode: it's now possible to do multilevel-editing (when an npc called setmap); also the drawing is using the correct npc y-order; scrolling is different: click on the player and move him around, or use the arrow keys to move to the visible level part - new script commands: - wraptext linelength,delimiters,text; Word-wraps a text into pieces each of length 'linelength'; the result can be accessed by reading #t(0..tokenscount-1) - wraptext2 pixelwidth,zoomfactor,delimiters,text; Wraps a text depending on the visible text width; instead of the numbers of characters you give the width of the text on the screen (in pixels); the text can be like in showimg, e.g. @TimesRoman@b@text - #f(index) gives you the image of the npc with the specified index ---------------------------------- New features/bug fixes in v2.1rev3 ---------------------------------- - baddys can't be hurt/killed again when they are already hurt/killed - the auto-mapping works even when you are on a ship (attachplayertoobj) - fixed arrows shooting position - npcs are correctly deleted when a level is deleted ---------------------------------- New features/bug fixes in v2.1rev2 ---------------------------------- - fixed script command setminimap ---------------------------------- New features/bug fixes in v2.1rev1 ---------------------------------- - added the ghost icon to state.png and ghostbody.png - fixed bluelampani.mng - fixed changing the body - arrows cannot hurt ghosts anymore ------------------------------ New features/bug fixes in v2.1 ------------------------------ - new standard tiles for trees and houses and signs - new interface for starting window and serverlist, it shows informations about your account; if you are in the serverlist you can go back to the starting window by pressing F8 - completely redone engine for holding the images in the memory; this avoids using the windows GDI (graphical interface) which caused memory leaks and other problems; with this new engine the game should take much less resources and memory - the editor opens a new empty level when you press F4 while playing the tutorial levels instead of showing the error message that the tutorial level does not exist on the hard drive (since it is encoded in the exe and not meant to be editable) - when you are in a level where playerkilling is disabled then you see a little sign right to the alignment bar which shows a red cross on a sword - the script variable timevar works in offline mode too - fixed problem with the % operator on big values - new script function ascii(c) to get the ascii code of a character (ascii(A) is 65); the other way (converting ascii code to character) can still be done by using the #K(num) message code (#K(65) is A) - there shouldn't be 'Invalid floating point' error messages any more on voodoo cards (please disable the use of direct3D in the Graal options if the effects are too slow for you) - when a chat text or a nickname contains a line that is too long for being displayed on the screen, then only the visible part is drawn instead of hiding it like in old Graal versions - new script variable tiles[x,y] which can be used as replacement for the board[index] variable; it also works for tiles in near levels on overworlds (tiles[-1,20] will read the tile at (63,20) of the level left to the current level) - in the editor there is a new option 'Predefined npcs'; there are all scripts (text files) listed where the filename starts with 'defnpc' and ends with '.txt'; you can select the npc, then drag&drop it onto the level by clicking on the npc outline icon left of the choice box and moving it onto the level; in the script file you can insert lines like #COMMENTS This is a door for changing the comments that are displayed under the choice box, and #EDIT redvalue 1 to let the user change a value in the script: when you add the npc to the level then all occurances of the variable ('redvalue') will be replaced by the entered text (in this case '1' if you don't change the text) - some windows have been removed (sign message codes, add-npc window) and the stuff from it is integrated into other windows so the level editing is simplier; the options window and add-showcharacter windows use tabsheets - snapshots levels made with Alt+5 handle lights correctly, also fixed some other problems with snapshot levels - support for smilies in PMs: some text like :D and :eek: is automatically replaced by smilie-images when reading a PM (and having html-pms turned on); you can change the list of smilies by editing the file smiliesdef.txt in the folder levels/smilies (add a line 'code,filename' for adding a new smilie) - fixed 'vibrations' when being on a moving ship - switching to fullscreen and back to window mode should work better instead of flashing the screen several times - ganis can contain scripts, put it in a block: SCRIPT if (blabla)... SCRIPTEND It is restricted to this. variables and can only use functions for playing music files and displaying showimgs - new script function getangle(dx,dy) - String arrays! they are saved in normal flags/string variables and look like 'myarray=123,"45",67,"8,9"' Commands/Functions: addstring list,text; insertstring list,index,text; replacestring list,index,text; removestring list,text; deletestring list,index; sarraylen(list) lindexof(list,text) #I(list,index) - gives you the string on place 'index' - new script command play2 wavfile,x,y,volume; x,y specifys from where the sound should come from; volume must be between 0 and 1, if set to 1 then the default volume will be used (depending on how far x,y is away from the player) - auto mapping: the Graal program now automatically downloads map files and minimap images, and updates the bigmap (M) by drawing the screen on the map when you move 8 tiles; this options can be turned off in the Graal options if wished; when you leave a level then it saves the part of the map that belongs to that level on hard disk into the maps/parts folder; next time you start Graal it loads the map parts automatically, that way you always have an up-to-date map; the map and minimap is no longer set by the listserver, its now done by the gserver itself, which means playerworld owners can change the default map/minimap by adding lines to the serveroptions.txt: bigmap=bigmap.txt,map.png,12.2,8 minimap=minimap.txt,map2.png,5.2,7 it works exactly like the script commands setmap/setminimap - new script variable 'graalversion' to detect the Graal version the npc is running on - ghost mode, which makes it possible to let new players see Graal2001 for free; it will also be used to limit the player count on 'free' servers (if you have not upgraded then you will login as ghost and wait in a queue till you are activated) - important actions are logged in a new log window that you can open by pressing Alt+0; it logs things like initializing DirectX, Direct3D, but also the login/logout of players and sending of explosions etc.; more stuff will be added in the future - script commands callweapon and callnpc doesn't allow the 'created' flag anymore - fixed showimg synchronization - in the tiles panel in the editor you can select multiple tiles at once: select a block of tiles by clicking on the upper lef edge, then moving the mouse to the lower right edge and releasing it, then pasting it on the level - all default images included in Graal are now using the image formats png or mng instead of gif ----------------------------------- New features/bug fixes in v2.05rev2 ----------------------------------- - the script variable playerscount is fixed (was not working for npc weapons) - when you create a new level then the current background tile is used for the background (instead of a black tile) - when switching to other servers then the correct server name is displaying in the window title - openurl2 works more than one time - hidden npcs can use the command showimg - when the map is changed (script command setmap) then the new map is immediatelly applied - the little yellow hint window that shows the names of players on the minimap is hidden when you switch to other applications ------------------------------- New features/bug fixes in v2.05 ------------------------------- This time there are mainly bug fixes. - removed the problem with memory error 2.2 (an error window that sometimes popups) - the graal window now shows the name of the server in the title bar - there is a new button in the script editor window that lets you format a text, it makes the script looking similar to the debugger screen, but is also formatting comments lines; it's not perfect but can help a little bit for understanding scripts written by other people - setshape2 supports array variables for the tilestype array instead of only static arrays - when npcs do showimg (especially on the npcserver) then showimgs will not be deleted when you leave the level, so you still see it when reentering the level where the npcs stands - playing of sounds (playlooped) is stopped when switching a server - bombs don't destroy half bushes - new file format (exists since beginning of 2000 but was only available for newworld team): The new level format is text based. If you want to edit it outside of Graal, use a text editor which doesn't wrap lines. You automatically produce a file in the new format when you save to a file with ending .nw Those files are bigger than .graal files, but because it is text-based it is easier to edit parts of it (e.g. ncp script) without opening the game, or to write tools that do changes to the levels, like adding npcs to levels. The graal servers support that file format too, the data sent to the player is the same size like when using .graal files, so it will not make the game laggier Format: It begins with the signature GLEVNW01. It can contain following data types: - board lines: BOARD x y width layerindex This is one line of the background layer. 'tilesdata' has a length if w*2 characters; each tile is a 12bit-index into the tile list (pics1.png) and is encoded in two base64 characters (upper 6 bit first) base64: String = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' so AA is tile 0, AB is tile 1, AC is tile 2, // is tile 4095 (=0xFFF) - level links: LINK x y width height newx newy The link attributes are the same like in the link options window in Graal. destination-level, newx and newy must not contain spaces. - signs: SIGN x y text ... SIGNEND Signs may be empty, but SIGNEND must always be there. - npcs: NPC imagefilename x y script ... NPCEND If the npc doesn't have a filename (invisible npc), then write '-' for imagefilename. x and y may be floating point values. The npc script may be empty, but NPCEND must always be there - baddies: BADDY x y type attackverse hurtverse winverse BADDYEND 'type' is the baddy name (graysoldier ... dragon ) or index (0...9). You don't need to write all 3 verses, it's also possible to only write attackverse+hurtverse or only attackverse, but BADDYEND must always be there. - chests: CHEST x y item signindex item is the item name (greenrupee ... spinattack) or item index (0...24) ------------------------------- New features/bug fixes in v2.04 ------------------------------- This version contains major improvements in the game engine. Sound: - PARAM1 enabled for the PLAYSOUND command in gani files, also message codes can be used with the script command play; You can make an animation that plays differnet sounds/tones, so this makes it possible to create instruments Animations: - replacegani aniname,newani; Lets the player use a different animation for walking, swimming etc. You can do things like replacegani walk,mywalk; if you want the player use mywalk.gani as walking animation (instead of writing your own walking script); This takes only effect till the player logs off, so you must put it in a system npc or so; its not lagging; The default animations are: idle,walk,walkslow,kick,sword,ridesword, spin,push,grab,pull,lift,carrystill, hiddenstill,carry,hidden,shoot,ridestill, ridefire,rideeat,ride,sit,sleep,hurt, ridehurt,dead,maps1,maps2,maps3,swim, lava,carried To reset the default animation just do replacegani walk,walk; etc. Using replacegani you can do things like holding a torch while running (*olympic games*). It's only allowed/enabled for upgraded servers. Tiles: - addtiledef tilesimage,levelstart,type; uses the file 'tilesimage' in replacement of 'pics1.png' in all levels that start with 'levelstart'; type: 0-old graal, 1-new order(description later) - addtiledef2 tilesimage,levelstart,x,y; this is similar to addtiledef, but only replaces a part of the tiles image; its like putting an image on top of the tiles image (normally pics1.png), this is good for replacing the default chair or lamp or so; this supports animated images, but keep in mind that all tile replacements must be hold in memory and be animated, so better only use it in the levels you need it; These two commands are very powerful and are only enabled for upgraded servers. - removetiledefs levelstart; removes tile definitions for levels that start with 'levelstart' - support for object sets, saved in the tileobjects folder and selectable in the editor NPC layers: - setshape type,pixelwidth,pixelheight Sets the shape for an npc. It already existed on the npcserver, but is usefull for client-side stuff to. type is the the shape type, the only one supported is 1 (=rectangle); it makes the npc behave like a fixed rectangle, no matter how big the image is or if its already loaded; to set it back to default do setshape 0,0,0; - setshape2 width,height,{tiletypes,...} Lets the npc behave like a level, which means you can set what size it has (in tiles) and how the tiles behave; e.g. do setshape2 2,2,{3,3,3,3}; to make an npc that behaves like a chair. Following tile types are supported: 0 nonblocking 2 hurting underground 3 chair 4 bed upper side 5 bed lower side 6 swamp 7 lava swamp 8 near water 9 near lava 11 water 12 lava 20 throw-through (fences) 21 jumping stone 22 blocking tile - attachplayertoobj objecttype,id; Attaches the player to an object, currently only npcs are supported (objecttype=0); the id must be the id of the npc you want to attach the player at when the player is attached, you can do if (playerattached) to check if he is attached; new player attributes playerattachid and playerattachtype; new variables levelorgx,levelorgy for getting the origin of the level/npc where the player is in This command is good for all kinds of layers or moving objects, together with the setshape2 command you can do levels-in-levels things. It can be used for bridges, ships, baloons, platforms in quests. Don't forget to detach the player when he should go back to the normal level. The position of the player is not saved when he is on such an npc. This command is only allowed/enabled for upgraded servers - detachplayer Puts the player back into the normal level Showimg/show text: - showimg colors,layer, and zoom is sent to other players (even when the layer is 4, then only values between 0 and 440 allowed) - showing text with showimg you can do showimg 1,@Hello!,x,y; do show text; setting font and style is possible by doing showimg index,@font@style@text,x,y; (style: characters from 'bicus', b-bold, i-italic, c-centered,u-underline, s-strikeout); for change the view of the text use the commands changeimgzoom,changeimgcolors - showimg works now server-side, layer 4 works too - weaponscount variable, #w(index) gives you the weapon names, #W(index) the weapon images; you can assign values to selectedweapon to change the selected weapon of the players; use enable/disableselectweapons if you want to disable the weapon select screen (Q) Other features/bug fixes: - check for correct tiles when lifting/eating/slaying bushes - faster search for files (lookup in the filename list) - bombs and arrows go to near levels - chat text is always displayed at least 3 seconds - message codes possible in #K() (for inserting special characters into text) - the script command stopsound doesn't crash the game when sound is turned off ------------------------------- New features/bug fixes in v2.03 ------------------------------- - New script command: triggeraction targetx,targety,action,params; This is one of the commands that give you like 50% more scripting power than before. It is like a combination of hitobjects and callnpc, but better. With 'triggeraction' you invoke an event to the object on positon (targetx,targety). If the object is an npc, then the npc script is called with the flag 'action' set, when the object is a player then the weapon scripts of the that player are called with the 'action' flag set. 'params' can be one or more parameters, divided by commas; the called script can read the paramters by accessing the message code #p(paramindex). Because this is hard to explain with words, here some little examples: - trigger player weapons You can easily do a weapon which freezes the other player: if (playertouchsme) toweapons Freezing-Weapon; if (weaponfired) { triggeraction playerx+1.5+vecx(playerdir)*2, playery+2+vecy(playerdir)*2,freeze,; } if (actionfreeze) { freezeplayer 3; setplayerprop #c,FREEZED; } Both players must have this weapon for making it working. Then use it on the other player, and he will be freezed, because a 'freeze' action is sent to him and his weapon script, called with flag 'actionfreeze', will freeze him. You can also move the if (actionfreeze) ... into an system npc so the weapon can be used on all players. Other nice things you could do with triggering actions on players: a stealing weapon which lets the other player loose gralats (if (actionsteal) lay2 greenrupee,... ); complex attacking weapons that use your own hitpoint system instead of the default hearts thing - trigger npcs Until now npcs can only react to 'playertouchsme' and 'washit', other things are very hard to do (e.g. the mining on Graal2001 was made by checking periodically what animation the player has and before which stone the player stands). You could do callnpc, but this works only client-side and you needed to pass parameters with flags. Using 'triggeraction' you can make those things much easier. The mining axe could have the script if (weaponfired) { setani jaxe,hammergold0.png; triggeraction playerx+1.5+vecx(playerdir)*2, playery+2+vecy(playerdir)*2,mining,#v(axepower); } If you now use the weapon on a stone, the stone npc could check this so: if (actionmining) { axepower = strtofloat(#p(0)); this.power -= axepower; if (this.power<=0) { setstring uncraftedgold,#v(strtofloat(#s(uncraftedgold))+1); hide; } } With this thing you can also easily do switches which are activated with the hammer, or torch lamps which are turned on by using a torch on it. - actionpushed, actionpulled The game automatically triggers the actions 'pushed' and 'pulled' on an npc, #p(0) is the direction of where to move; so you can do different things when the player tries to push/pull the npc, e.g. slower pulling, or opening a door. - New script command: move dx,dy,time,options; dx - delta x dy - delta y time - time in seconds options - cachingmode (0,1 or 2) + blockcheck (4 or 0) + informmewhendone (8 or 0) + applydirection (16 or 0) This moves the npc without needing you to update the position of the npc 'manually' by changing x and y. To move an npc 10 tiles to the right, then 10 tiles to the left and again, just do following: if (created) { while (true) { move 10,0,4,0; sleep 4; move -10,0,4,0; sleep 4; } } This moves the npc 10 tiles to the right, then waits 4 seconds, then moves it 10 tiles to the left, then waits 4 seconds, and repeats this endlessly. The good thing is that this also works with server-side npcs and makes them look like they are moved on client-side. There are also nice options to makes things very simple: - cachingmode: - 0: previous movements will be finished immediatelly - 1: movements will be cached, the previous movements will only be finished when the cache is too large (distance to go >5); this caching can be used on server-side npcs to make the movement look like non-laggy even when there are little delays sometimes - 2: the movement will just be appended to the movement list; you can add up to 100 movements - blockcheck: add 4 to the options when you want the npc to stop when there is a wall blocking the npc - informmewhendone: if you add 8 to the options then the script will be called with a 'movementfinished' flag when the the npc has stopped walking; catch this event with if (movementfinished) {...} if you want to do something when the npc has stopped (e.g. walking in a different direction) - applydirection: add 16 to the options if you want the game to automatically set the direction of the npc depending on the movement direction (can be good when using movement caching) - on remotecontrol and npccontrol you can use new chat functions, commands start with /, you can get a list of available functions with /help - when you play on a game server with npcserver and an npc leaves the current level, then it is displayed in the new level instead of being hidden - script functions vecx(dir) and vecy(dir) which are a replacement for the 'dirgo' variables used in many scripts; e.g. for direction 2 (down) the functions vecx and vecy give you 0 and 1; normal npc movements can so simply made by x += vecx(dir); y += vecy(dir); - script functions onmapx(levelname) and onmapy(levelname) to get the position of a level on the currently set map - the game uses in-game code to compress/decompress again instead of using zlib.dll because it has been abused - if you press the shift key while clicking on Start or Turorial in the starting window, then the game will start in fullscreen mode - new script flags 'playerreading' to check if the player is reading a sign, and 'lighteffectsenabled' for checking if the player can see the light effects and day/night - fixed bugs when using numbers for #P1 - fixed bug with reading animated interlaced gifs ----------------------------------- New features/bug fixes in v2.02rev1 ----------------------------------- - the speed cheat protection shouldn't close the program when there was no cheating - when opening the history of someone you will not see the web navigation bar - better hacking protection - the server knows the language of the client, that way there can be translation of signs and what npcs say (on servers with npcserver) ------------------------------- New features/bug fixes in v2.02 ------------------------------- Version v2.02 brings new things for customizing the player (e.g. hats), making signs with images, and doing string parsing in npc scripts. Of course there are also bug fixes. Restrictions for free servers: Because we want players to upgrade the accounts, we have put some limits on free servers. This includes light effects (seteffect, setcoloreffect etc.) and complex ganis. 'complex' means ganis (animations) that are not default animations and do more than just display an image. Things like skip.gani are allowed, fishing.gani not. Using the hat thing is not allowed. - support for hats and similar things: When opening the gani editor (Graal Shop) you will see new edit fields for 'Def. attr1', 'Def. attr2' etc. These work similar to the PARAM1, PARAM2 etc. thing, but they behave different in Graal: while the values for PARAMx is taken from the parameters that you use in your setani and setcharani script calls (setani shoot,wbow1.gif; is setting PARAM1 to wbow1.gif), the ATTR1, ATTR2 etc. is read from the players account. You can change it with setplayerprop #P1,...; /setcharprop #P1,...; You can currently use 5 gani attributes. Since it is saved in the players account, it doesn't need to be sent to the other players each time the animation is set which is causing lag when used in a movement animations Here an example for setting the hat of the player: setplayerprop #P1,hat0.png; - the guilds listed in the staff section of the playerlist can now be changed by serverowners - the HTML window now has a panel with navigation buttons for back/forward/stop/refresh/home you see that window when the server message of the day is displayed or when a script calls the openurl or openurl2 functions - when the options window is open then the game is not freezed anymore (was used to cheat/block players) NPC scripting: - you can display images in signs using the message code #i: a sign with the text Touch this to enter: #i(door.gif) will display the door.gif at the end of the line. It doesn't check if the image is larger than one line, so you might need to add spaces in the following lines so that the image doesn't overlap the text. You can also only display a part of the image: The nicest head ever - #i(head19.gif,0,64,32,32) This displays the part of head19.gif starting at position (0,64) with a widht and height of 32 (ninji face looking at you) - string parsing functions There is a bunch of new functions and message codes to support string parsing: - strlen(str) - length of the string - startswith(part,str) - tests if 'str' is starting with 'part' - indexof(part,str) - gives the position of 'part' in 'str' (-1: doesn't appear in 'str', 0: str starts with it) - #e(startindex,length,str) - extracts a substring out of str; when length is -1 then it takes everything after startindex till the end of str - #T(str) - removes the spaces at the beginning and at the end - tokenize str; - divides the specified string into tokens, e.g. tokenize I am happy!; will produce 3 tokens (I, am, happy!); text inside " " is taken as one token, so tokenize hello "Mr. Bear"; will produce 2 tokens (hello,Mr. Bear) - tokenscount - gives you the count of tokens produced with tokenize - #t(index) - gives you a token - tokenize2 delimiter,str; - while tokenize always uses spaces and commas, you can add more delimiters here, e.g. tokenize2 o, Yoshi is cool; will give you (Y,shi,is,c,l) - when doing setstring flagname,; then the deletion of the string variable is sent to the server - setting/unsetting/changing a flag that starts with 'local.' is not sent to the server - when using setplayerprop #5 to set a horse or when having a horse from last login to the server, then the bushes count is set correctly - you can now set string variables that contain commas, when you do setstring myflag,1,2,3; then you will add a flag 'myflag=1,2,3' instead of getting a syntax error - commands that we forgot to mention: - disabledefmovement: turns off the normal player movement and behaviour; this is good for making new player races or things like skis; if you only want to temporary disable it then use the freezeplayer command - enabledefmovement: enables it again - the script debugger (F6) gives you a list of the script functions of the selected npc; you see it under the drop down list for npcs; when selecting a function then the script panel will scroll down to it this is good for easier navigation through a script - keydown(index) is always false when the player is paused - new flags issparringzone and nopkzone Graal Shop (Gani editor): - correct detection for if the gani has been modified - correct behaviour of the 'loop' and 'continuous' flags: the animation is stopped when at the end and not looped, and a continuous animation is started when not running and clicking on 'Play' - edit fields for the new gani player attributes ('Def. attr1', 'Def. attr2' etc.) General bug fixes: - objects are drawn in correct y-order when near level borders - the map viewing animations are set correctly (only when you stand still or sit) - when you play on a server with npcserver and you switch to another server then you will be able to see npcs - the texts 'Map' and 'Others:' that you see when viewing the map can be changed in the languages/languageXXX.txt now too - when pressing R to view the sparring ratings of players then the rating is not displayed over npcs --- New features/bug fixes in v2.01: - levels are preloaded when you walk on the map - when looking on the map then a special animation is set so that other players can see that you are reading the map - showimg should work better, artefacts should be removed - when you pause the game then things are still animated, bombs explode - when you change the chat text of the player with the script command setplayerprop #c,text; then it doesn't disappear immediatelly, it will be shown for 3 seconds - in scripts you can do if (playerdies) ... to do stuff when the player dies (timeouts doesn't work when you are dead) - when the player is hurt then you can detect that in scripts by doing if (playerhurt) ... you can read the variable playerhurtpower to get the amount of power that the player lost - a bug with testnpc is removed - new script commands: - hitobjects power,x,y; hurts players/npcs/computer opponents that are on the specified position; this works exactly like the sword so this should be used for weapons, instead of the hitplayer command which gives the attacker to much advance; we will probably need to wait with using it till all people have v2.01, and v2.00 is disabled - openurl2 url,width,height; opens an url in a window but in a different way: it uses the same thing that is used for the server MOTD and PM history, so it should open faster, and you can set the size of the window; remove the leading http:// from the url New features/bug fixes in v2.00: - no 2/3/4 player mode anymore; we want to concentrate on the online mode; this will also help in reducing the ressources needed by the game and in removing some bugs; with the 2/3/4 player we also removed the support for save games (F2/F3), and you can't select your character in the starting window, servers will provide character selection levels - new tutorial levels - in the controls window you can change the keys and buttons, just click on it (right mouse button deletes it) - bush rupees and pot hearts are server-side - you can do 'warpto ' (if you are a GP) - on the minimap / playerlist you see red bubbles for admin messages, green bubbles for guild messages and blue bubbles for mass messages - in the editor you can do flood filling by pasting a tile / an object onto the level and pressing the right mouse button (shift+right mouse button: only fill full objects); if you haven't selected something then the right mouse button with fill the area with the background tile - there are new deep water tiles where you can't swim - new script commands: These commands are good for making a day/night thing and showing lights (see the included light2.png which can be used as corona (setcoloreffect)) They doesn't cause lag, but you can only see it when you have a 3D card (like Riva TNT). - seteffect red,green,blue,alpha; (default 0,0,0,0) This if for day/night, by increasing alpha to 0.5 or so you can make the game darker; changing the values for red/green/blue will cause some nice effects too - setcoloreffect red,green,blue,alpha; (default 1,1,1,1) If you change one of these values to something <1 then the npc image will be drawn using alpha blending; By changing red/green/blue you can change the color of the image (so you can use light2.png for red lights, green lights etc. without needing another image); By changing alpha you can decrease the brightness of the npc image - setzoomeffect zoomfactor; (default 1) Zooms the npc in or out. The npc will stay centered at the same position and have the same blocking radius, so this is only for effects - drawaslight; draws the npc above the daynight effects area (between drawoverplayers and the stats) - changeimgcolors index,red,green,blue,alpha; (default 1,1,1,1) changes the alpha transparency / color for the image (see setcoloreffect for more); - changeimgzoom index,zoomfactor; (default 1) changes the zoom factor for the image; color and zoom effect are not transferred to other players so changeimgcolors and changeimgzoom only work locally - new Graal animation system using *.gani files - With setani and setcharani (script commands) you can change the animation of the player or the npc, instead of only using the default animations that are changed by accessing the variable 'sprite'; that variable still exists but will be mapped to def.gani which contains all of the old animation steps (0..40); its also possible to still read 'sprite', the game will then try to convert the current animation to the old sprite number system, e.g. when the player has the animation walk.gani then reading the 'sprite' variable will result in values between 1 and 8 depending on the current animation step; new animations will always be mapped to 0, but you can get the current animation by using the #m message code (if (strequals(#m,walk)) ...) - There is an editor for gani files named 'GraalShop.exe', you can set the file association in the windows explorer to make it easier to open gani files; but you can also edit gani files with text editor - Syntax: setani ,param1,param2,...; setcharani ,param1,param2,...; Example: setani walk,; sets the walking animation defined in walk.gani. A gani contains informations about sprites and where to put them in which frame. The gani format: 1. Starts with some control commands: - SPRITE 0 SPRITES 0 0 24 12 shadow -> sprite_index image_file x y w h description this defines a sprite - sprite index: is import for the animation part of gani file which will be described later; each sprite must have an unique sprite index - image file: can be - BODY HEAD HORSE SHIELD SPRITES PICS (those images will taken from the current player), - PARAM1, PARAM2, ... (are set with setani/setcharani), - myimage.png (direct filename) - x,y,width,height: describe which part of the image should be drawn - description: only for the gani editor - DEFAULTPARAMxxx newsword.png - tells the gani editor which image should be used for PARAMxxx (it can also be a number when you want to use the parameter to give a sprite number to animations) - COLOREFFECT 20 1 1 0 0.99 -> sprite_index red green blue alpha sets the alpha transparency / colors for the sprite - ZOOMEFFECT 20 5 -> sprite_index zoom sets the zoom factor for the sprite - LOOP - loops the animation - CONTINUOUS - doesn't restart the animation when you call setani/setcharani again - SINGLEDIRECTION - all four directions use the same animation steps 2. It follows the animation in ANI ... ANIEND The animation normally contains 4 x animation_step_count lines of sprite defintions. Each line contains of a list of sprite positions: sprite_index dx dy, sprite_index dx dy, ... - sprite index: the defined sprite with the specified sprite index should be drawn (can also be PARAM1, PARAM2 etc.) - dx: horizontal difference to the player-x coordinate - dy: vertical difference to the player-y coordinate After each frame (which means 4 lines in normal animations and 1 line in a SINGLEDIRECTION animation) you can add following commands: WAIT - repeats the last frame times PLAYSOUND dx dy - plays a wav file from position (playerx+dx,playery+dy) (that defines the posititon where it sounds loudest); this actually works like the npc command 'play' so you can theoretically play midis or avis but that is not recommended - See the existing gani files for examples, e.g. idle.gani for a very simple animation (it only contains one step) - The gani format has a lot of advantages: - it means less network traffic (because you can replace tons of showimg with one call to setani/setcharani) - you can do a lot more than with showimg - it's easier to make complex animations with it - in the online mode the player animations look less laggy because the animation continues even if the connection is slow - you can hear what other people do like they were playing on your computer because sound effects are included in the gain file - you can change the default player animations like dead.gani - files are now automatically downloaded again from the server when they have been updated on the server - wavs are downloaded from the server too - when weapon names start with - then you can't see them in the weapons list (might be good for system npcs) - new npc script variables playerhurtdx and playerhurtdy when the player is hurt (otherwise they are 0) - new npc script commands 'setgender' and 'setchargender' (paramters: male / female) - new npc script command setmusicvolume left,right; both values can be between 0 and 1 - signs are dynamic now, you can use message codes like #n in the signs, unknown characters are drawn using a windows font; there is a new message code #K(action) which tell you the key names for the keys (0-up, 1-left, 2-down etc.) - head,sword,shield and body images are saved in the right folder (levels/heads, levels/swords etc.) instead of levels/webgifs - before you can drop items with S+A it checks if there is no wall in front of you - the npc script command 'stopsound filename;' works now - there is no error message anymore when you open a file by double-clicking on a .graal file in the windows explorer (file association) - the script command 'continue' works correctly in while-loops now - jumping into links shouldn't stuck you - invisible npcs are non-blocking - DirectSound and DirectDraw are dynamically loaded, when there is a problem with DirectDraw then the game gives you an error message and closes correctly - fixed a bug that happened when you do if (playerenters) setlevel ; - playerlist section 'Staff' instead of 'GPs', there you can also see LATs and FAQs now New features/bug fixes in v1.41 rev1: - when right-clicking on yourself (online mode) then you will see your own profile + stats - you can not pause in sparring rooms anymore - when entering a sparring level then the restart position will be updated (so you restart in the sparring level when you die) - ad animations are stopped when not visible - forgot to mention: there are script variables screenwidth and screenheight (pixels) for the visible area which is 640x456 by default; those variables are read-only - hidden players (script command hideplayer) are now visible on the map again; we might re-enable a real hideplayer thing again but not as long as people can cheat with it - Alt+1 now saves as png too (like Alt+2) - when you press M in the editor then the generated map will be saved as png; if you want to use it as map for your playerworld or for the setmap command then you need to convert it to 8 bit colors before using it in the game New features/bug fixes in v1.41: - shooting arrows only takes half the time - there is an ap bar under the ASD thing - a rating system for fights in sparring rooms; to make a sparring room you must add an npc with the script 'sparringzone' (no end line characters!) to the level; then the server will see that it's a sparring level and will not change your ap/money and will rate your fighting skills depending on who you kill and who kill you; when you press R then you will see the current ratings over the heads of the players; it shows rating + rating deviation; the rating deviation tells you if the player is fighting often, only players < 80 rating deviation will be listed in the graalonline.com top50; so if you see someone with a rating of 2000 and a rating deviation with 330 that means he only had one fight or so, so you can't really trust that he is a good fighter when you are in a sparring room you will see a white 'sparring' on the ap bar - new option in F1->General options: fullscreen mode; you can switch to 800x600 and 1024x768; you can get the screen size in npc scripts by reading 'screenwidth','screenheight' (in case you want to align a showimg stats image on the right side of the screen) - by right-clicking with the mouse on a player you will open the profile of that player; the profile now shows more stuff like the account name and sword power - the server message of the day can now be HTML - graal PMs and the server MOTD can contain the new tag Hallo #n! (the text inside the graalmsg tag works like with the npc script command 'message'); it is good for making a message which looks more personal - new npc script command showstats, with this you can show/hide parts of the status bar / game showstats 1+2+4+8+16+32+64+128+256+512+1024; shows all showstats 0; hides all the argument is a bit-wise flag set 1 - ASD 2 - icons (for rupees, bombs, arrows) 4 - rupees count 8 - bombs count 16 - arrows count 32 - hearts 64 - alignment (ap) bar 128 - magicpoints (mp) bar 256 - minimap (you can only hide it, you can't show it when the player pressed Alt+3) 512 - invemtory npcs 1024 - players - npc weapons can't be deleted when their name starts with a * (e.g. toweapons *Boomerang;) - there is a new very good designed baddy image: baddyninja.gif from Ulrich Galbraith (Zancrus) (its the one who made some of the graphics for v1.0 like the frogs, baddies) - there are some new tiles for hourse corners and inside house corners - fixed a bug with negative rupees when dropping rupees while being in the bank - in online mode the positions of showimgs are aligned the same way like the player position; that way its easier to use hideplayer+showimg because you can align it correctly to the shadow of the player (which can't be hidden) - in online mode when you do showimg+changeimgpart it also works for bigger images now - the playerlist is sorted again when your nickname is changed (it needs to be updated because the guild might have been changed) - red gloves will be displayed correctly again - the default keys will be set/displayed correctly; this was a problem in older versions because e.g. in France you have the A key on a different position on the keyboard; in France it uses now QSD as the default keys for lifting/ sword/weapon - when you start Graal for the first time then the game will try to detect the local language automatically; because some languagexxx.txt files needed to be renamed you might need to change your language manually if you have already played - 'playersays' works correctly now, but keep in mind that its not supported anymore, better use strequals(#c,...) - fixed a little bug with head icon transparency in 32bit - showname / ap changing doesn't delete your chat text anymore New features/bug fixes in v1.4: - new starting window It should be simpler now, when you select 2/3/4 player mode then you can choose the player to change by clicking on the little head icon right to the character selection box; You can also set the nickname separately for each character in 2/3/4 player mode; The account name/password thing was moved to the server list - server list window When you select 'One Player (online)' as game mode then you will see a server list window that will load a server list from www.graalonline.com and display it in a list; When you click at an entry then it will show you some informations about that server (language, version, homepage etc.); On the lower part of the server list window you see the edit fields for account name and password; click on 'Connect' to connect to the selected server; When you play then you can always open the server list window again by pressing F8 (it will refresh the list automatically) - password are saved separately for each account name - new option 'don't save passwords' in the options window (F1->General Options) - new pk tag system: when having less than 40 alignment points (showap) then you can't increase your power; when you die then you will get 3 hearts back when ap<20, 5 hearts when ap<40 and full power when you die while ap>=40; when you kill someone then your power will decreased by (yourap/20+1)*(otherap/20); when ap<20 then your ap will increase every 30 seconds, when ap<40 then every 2 minutes, ..., when >=80 then every 30 minutes (no 90 ap limit anymore) - There is better pk recognition: When you kill someone with bomb/arrows/fire/bushes then it will count as player-killing too - New script stuff - New command: changeimgvis index,drawingheight; changes the drawing height of a showimg image; possible values for 'drawingheight': - 0: like drawunderplayer - 1: like the player - 2: like drawoverplayer (default) - 4: on screen (the img will be drawn like the status bar, it will be drawn on the image (x,y) position); so you can make your own status bar thing with this command - When doing showimg with an image index not in 0..199 then it will only be shown local - setimg/setimgpart can be used instead of setgif/setgifpart - The 'in' operator is enhanced. You can now do things like: 1,2 in {1,2,3,4,5} - will check if 1 AND 2 are in specified array x in |0,64| - is true when 0<=x<=64 x in <0,64> - is true when 0 option 'use winamp for music' New features/bug fixes in v1.39rev2: - removed bugs with caching levels on hard disk, this version should work better with playerworld servers running on different ports - when someone is invisible (hideplayer) then you still see his shadow and nickname - npc script enhancements: - functions Example: if (playerenters) { myfunc(); playerdarts += 50; } function myfunc() { message Hello!; if (playerrupees<50) return; playerbombs += 50; } With 'function' you define a function, with funcname() you call it. It doesn't matter at what place in the script you define the function. With 'return' you immediatelly return to one line behind the caller script position. There are no function parameters yet and you cannot use it in calculations. You can only call functions from the same script. With this new function thing it's much easier to make scripts look simplier. - new npc script variables: signscount, signs[index].x/.y - testsign(x,y) - callnpc index,playertouchsme; you can use this for calling the scripts of other npcs; calling that function doesn't run the npc's script immediatelly, it might take 0.05 till the script of the other npc is actually executed - a function keydown(0..10) which tells you if a key is pressed 0..3: movement, 4..6 A/S/D, 7 map, 8 tab, 9 Q, 10 P - you can use break, continue inside of loops to end a loop / continue with the next loop round - you can do myvar = (timeout? 5 : 3); - you can assign 'boolean' operation results to normal variables like myvar = (timeout && myflag); then myvar is 1 when the boolean expression 'timeout && myflag' is true, 0 otherwise New features/bug fixes in v1.39rev1: - fixed a bug with transparent heads when starting Graal in 32bit video mode and switching to fullscreen - when sending messages to more than 50 people then the message will not be saved on hard disk (so it doesn't take a half minute till you can play again) - when viewing a profile of a player then you also see the kills/deaths/onlinetime that the player has in the current world; you only see it when the player already made a profile (pushed the 'send' button in the profile window) - tags in PMs doesn't work anymore New features/bug fixes in v1.39: - completely different handling of head images, this should speed up Graal and drastically reduce the resources needed by the game - Profiles: In the player list click on 'profile' to change your own profile or right-click on a nickname and select 'profile' to see the profile of a player (Antago suggested profiles in Dec 1999) - there is a special option window for the player list: just click on the 'options' button in the player list; there is the option to turn off HTML in PMs, to ignore mass PMs plus two new options: - No images in HTML: deletes tags out of PMs - sort player list by nickname: sorts the playerlist in alphabetically order -