Jump to content

Tokei

Members
  • Posts

    663
  • Joined

  • Last visited

  • Days Won

    90

Everything posted by Tokei

  1. Tokei

    GRF Editor

    Thanks for the suggestion! I added more options in Flat maps maker to allow customization. I understand the reason for removing objects only and keeping the rest, but I'm not too sure about the ground option though. Would you want flying objects with a 'transparent' floor (you can't remove the ground, you can only make it very low) by keeping the gat cells to their original position? It would be nice if you could clarify that xD.
  2. Why is the sample code such a mess! Anyway... you might want to perform a couple of checks on the inputs. #include <iostream> #include <algorithm> using namespace std; // These algorithms are usually shown as recursive, this example does not int _binarySearch(int valueToFind, int * values, int numberOfElements) { int startIndex = 0; int endIndex = numberOfElements - 1; int middleIndex; while (startIndex <= endIndex) { middleIndex = (startIndex + endIndex) / 2; if (valueToFind == values[middleIndex]) { return middleIndex; } else if (valueToFind < values[middleIndex]) { endIndex = middleIndex - 1; } else { startIndex = middleIndex + 1; } } return -1; } int main(void) { int numberOfElements; int valueToFind; cout << "Enter number of elements" << endl; cin >> numberOfElements; cout << "Enter " << numberOfElements << " integers" << endl; int * values = new int[numberOfElements]; for (int i = 0; i < numberOfElements; i++) { cin >> values[i]; } cout << "Enter value to find" << endl; cin >> valueToFind; sort(values, values + numberOfElements); int position = _binarySearch(valueToFind, values, numberOfElements); if (position < 0) { cout << "Not found! " << valueToFind << " is not present in the array list." << endl; } else { // 0-based position, put position + 1 if you want 1-based position cout << valueToFind << " found at location " << position << "." << endl; } delete[] values; values = NULL; system("PAUSE"); return 0; }
  3. Tokei

    Event problem D:!

    I just had to respond... no one posted a valid answer yet xD Three examples should do it : -1 + -5 = -6 B < A and B > C -5 + 1 = -4 B > A and B > C -5 + -5 = -10 B = A and B > C All answers are possible and respect the condition. 'A' must also always be strictly negative in any cases.
  4. There are no issues with your map files; this warning comes from an invalid gat cell type (in the map cache). Have you tried to overwrite your map cache with WeeMapCache (overwrite it with drag/drop)?
  5. The sprite name is s_empel_1.spr, it's located there : data\sprite\¸ó½ºÅÍ\s_empel_1.spr data\sprite\몬스터\s_empel_1.spr Or you can download it there : http://www.mediafire.com/download/65sscge4bknxqds/s_empel_1.rar
  6. Yep, that's exactly what it's for xD! All the files are grouped together in the same interface and you can add new items made from your item_db directly in the txt/lua files with little effort (and it fills in all the fields with a proper description based on the item type). But yeah, it's a test project, no idea if people will like it or not (I had fun while making it at least!). So... I'm a bit curious about what people would think. Ultimately though, all the methods and libraries were meant to be used for managing the server txt database files. It's mostly already ready for that, but I wanted to finish the client side part of the project since it's much easier to do. It would be similar to "rAthena Database Editor" though in the end, except you would be able to load all the existing tables with their references (and it won't be part of GRF Editor since it wouldn't be related to the client files). (The project you see up there can already be used from GRF Editor > Tools > Client Database Editor)
  7. Hey guys, I just finished a new feature up to a satisfying point, so here goes (coding wise, it's kinda big)! Client Database Editor - Getting started! This tool is meant to modify items from a client quickly and easily. If you set it properly, the modifications can be done directly in the GRF files as well.The first thing you'll want to do is create a new project : File > Save projet info... This file will keep your settings for your next usage. Go in the Settings tab and select from which mode you want to read the database items (from txt files or lua files). You can convert one to another by going to File > Export... Once you're set, you need to add paths for the resources. Basically drop your GRF files in there, in the same order as the client will read it (if you're not sure, open DATA.INI from your RO folder). You'll want to drop a data folder as well and move it to the top so that it gets read first. The options are entirely up to you at this point . Also, you can view the path detected for a file by putting your mouse on top of the description (a tool tip should show up!). A red background indicates that the file hasn't been found. The database can work without all the files loaded though, so it's not an issue. You can work with only one file if you want, it's very flexible. Only the files in use will be overwritten. If you change tab, the database will start loading (should take a few seconds xD). And... there you go! You can start messing around with your items. If you don't want to erase your files from the sources directly, use the export method instead : File > Export project to... Search feature The search feature is quite advanced and the results should be almost instantaneous. The option you'll like the most is the range one, which allows you to view only a subset of items instead of the whole database. The syntax is rather straightforward as well. The search is actually better than the one currently being used by GRF Editor, you can use quotes for group of words and change the mode of the search from narrow to widen. A narrow search requires all the keywords to be present in the item, while a widen search only requires one of the keywords. Autocompletion feature The buttons "Quick edit..." and "Autocomplete" will be quite useful while making new items. The "Quick edit" feature knows what item is being edited and it will provide the fields for you automatically. The text colors and format will be generated based on the official items' descriptions. The Applicable Job can be converted from the hex value to the string value and vice versa. The "Autocomplete" feature fills the unidentified fields for the item. This should help remove mistakes and confusion by making the descriptions more uniform . Database comparer feature You can get to it from Tools > Compare database. This option requires item_db.txt to be loaded (from the settings page, at the bottom). What it does is... compare your database with the item descriptions. There are a wide variety of settings and it doesn't allow many mistakes, so you'll want to grab only a subset of items before running a database check. Each issue found will have an automatic fix (right-click > Fix). What the database comparer can detect : missing items, missing resources, missing description parameters, invalid description (an applicable job isn't showing, an extra job is being shown, etc) This tool is still a work in progress, meaning you may find some bugs, have some unexpected behaviors so, as always, back up your work (via the export feature for more safety). If you have suggestions or a feedback, please let me know!
  8. Hmm, what is or is not working with the 2013 clients? You seem to be talking about the encryption, which has been disabled due to too many incompatibilities.
  9. Alright, all features added in the newest version, please report any bug found like always (with a good description!). The shell integration may not work on Windows XP, it is meant for Windows 7 and later.
  10. Hey everyone! Sorry for my lack of response, I've been quite busy and this project got put on stand-by . Anyway, I can work on this again! As a quick note to everyone, the GRF encryption has been fixed and is now working as intended. It's also a lot easier to use now. I'm glad you like it and thanks a lot for the suggestions! The newest version now saves each tree nodes, so you won't have to always reopen the nodes all the time. To open specific folders (like data\texture, etc), this can be done from Settings -> Tree behavior -> Edit..., it's pretty straightforward. I've already added icons for folders (in the newest version), but I'm not sure if that's what you're looking for. As for adding icons to each file, I'll see what I can do but it won't be in this release. I liked the idea of adding context menus to GRF/RGZ files a lot, so it's already implemented (in Settings -> Shell integration -> check the extensions you wish to add menus). Hmm, it can be possible to replace single cells with another color, but there's no graphic interface to edit the maps, so you'd have to known the exact flag position and it'd be rather tedious =). What you're tyring to achieve is usually done via map editors, such as BrowEdit. As for your second issue, Olrox has already answered you I guess!
  11. This error may happen for the following reasons : The GRF's magic identifier is invalid (usually means your file is not a GRF to begin with) - not your case here The file table is encrypted, hidden or corrupted The GRF isn't supported (0x102, 0x103 or 0x200) The file names in versions 0x102 or 0x103 aren't encoded correctly The file names contain invalid characters You tried to delete a folder and an exception has been thrown (doubt that's your issue) Judging from your screenshot, you're using a very old version of the software. Many compability issues have been fixed since then. You're apparently able to partially load the file table, so it's most likely an encoding issue with the filenames. Upload your GRF if the issue still persists after updating to the most recent version; debugging the GRF would be much quicker for me.
  12. The encryption within GRF Editor will work perfectly fine, but you're probably having compatibility issues from the client (caused by the protection used on the DLL; only a few version of clients will be able to use this encryption system). There's also a bug that will make it impossible to patch with the current patchers (such as Thor Patcher). So for now, I simply wouldn't use the encryption feature. I'm going to fix this so that it works for any client, but that's going to be in a couple months when I'm not as busy as I am right now. Basically : do not encrypt your files with GRF Editor.
  13. Disable your custom windows theme for now; WPF issue. When I have more time I'll find a proper solution though ;P.
  14. There are a couple of reasons why the client would crash after loading the modified DLL. Make sure you have cps.dll in your RO folder and that cps.dll hasn't been modified and is the original version. You cannot rename your client executable once the client file is generated. The dll and the exe are bound together (you must use the generated executable for the client to use the wrapper). Try to start the client without using an encrypted GRF (just remove your 0=myEncrypted.grf line in the data.ini file), only with the modified client and the wrapper (wrp.dll). If the client still crashes, then you didn't follow the steps provided in the program's description. If that works fine but not while using an encrypted GRF, then the protection used to prevent dll injection is generating false positives and won't allow your client to decrypt encrypted files. For now, this isn't an issue I will solve right away. Maybe if your using Win 7. But im using Win XP SP3. The problem was running the application. Suddenly it closes and there is an error message pops up... A critical error has been encountered. The application has thrown an exception. The application will most likely crash. Running the application with administrator privileges won't change anything as it already requires administrator privileges to run. The application would be way too limited with all these restrictions anyway. Apparently this an issue with the perfermance counters used for the CPU performance management system. The issue 'should' be fixed with the new verion (1.3.4) and in case of failure to load the counters, it will assume the cpu isn't being overused. Let me know if this fix worked. Hi Please help i have same problem with you.. what did you do in GRFCL? GrfCL is a side product of GRF Editor which is used to call the interfaces of the libraries; it's meant to be used for scripts and testing. Drag and drop folders to merge them (read the post after the one you quoted). You don't need to use GrfBuilder to build your GRF either... well you can but that makes no sense. Explain your issue and I'm sure there's a way to do it =).
  15. I believe what you want are the resource files of the map : .rsm objects. When displaying object properties, list of strings are now displayed as well so you'll see all the .rsm used by the map (ModelResources). For the textures used for the ground, see the .gnd file. If that's not what you wanted, give an example or more details!
  16. Not sure about the patch, but here's the icon : http://www.mediafire.com/download/y1jr4y3x56gwsai/ov75.rar to put in data\texture\effect.
  17. Oups... my bad, I messed up with a last minute change. Redownload from the same link above ( http://www.mediafire.com/download/vpg09xwbhmag2oj/GrfCL.rar ), I've tested with two different guild_vs maps from BrowEdit (which indeed had black/transparent spots) and I'm not having any issues after rebuilding the quadtrees, as you can see down there (approximately the same position as you) : Sorry about that! And also, from the screenshot, your issue is definitely related to that problem. I'm having the same issues with BrowEdit v620 (I can't test with previous versions though... can't find them anywhere). Anyway, if your maps aren't working properly after my update, then I have no other solutions for you. So... good luck!
  18. How did you clone it? If you used BrowEdit, you should be aware that one of the released version creates incorrect quadtrees, which cause issues with some chunks of the map loading and unloading as you walk. If that's the case, there are no "official" fixes known to me (maybe you could download BrowEdit 2.0 and hopefully this has been fixed already). On the other hand, I've added a functionality to one of my tool ( http://www.mediafire.com/download/vpg09xwbhmag2oj/GrfCL.rar ) that you can use to repair the maps (simply start the exe and type the command, should be obvious) : GrfCL.exe -rQuad abbey03 C:\outputMaps\ or GrfCL.exe -rQuad C:\RO\data\abbey03 C:\outputMaps\ If this didn't solve anything, then a screenshot or a download link to the map would be helpful!
  19. Updated to 1.3.1, many updates have been done so I'll cut to the important ones. - Previous settings will be erased due to the new way they're saved, not a big issue. ACT to GIF option ACT to GIF is now possible with GrfCL, the command will look like the code sample below. It has many optional arguments that you can check out with "-help gif". The background will always be transparent regardless of the /bColor chosen, this parameter will only be useful if you smooth the edges with the /scaling=HighQuality option. GrfCL.exe -gif C:\myGifs "C:\RO data\data\sprite\¸ó½ºÅÍ\*.act" 1 /bColor=White /ignore=True -break Example with lost_dragon.act/spr (image is big, here's the link instead) : http://img402.imageshack.us/img402/986/wa1.gif Palette recolorer This tool is meant to recolorer generic sprites which use gradients in their palettes. That means it's useless if the palette has no "logic" in it. The goal of it is really to generate good looking palettes with little effort. It's based on pattern detection to identify gradients that are most likely related (therefore there are no specific configuration for sprites - hair, character, mob... they're all treated the same). Creating character palettes will work, but it's not very convenient (there are better tools on rA for that). How to use it Load a sprite (directly from the GRF or a folder), in this example I'm using acidus.spr because it's an easy one. The palette of this sprite is a total mess. Anyway... you'll notice global settings at the top for the sprite. To see them in action, you will have to change the current seed, because the seed 0 is treated differently (initial palette, not affected by settings). To do that, simply press Next. You should have gotten a relatively "nice" sprite already, but it's possible to do better. Gradient scale : The amount of variation of the gradients. Themes coherance : A theme has multiple gradients and they all use the same color (hence the term 'theme'). Decreasaing this value will make each of these colors change a little (creating a variation between similar gradients). Brightness : Increase or decrease the luminosity of the gradients. Grayscale : Decreasing this setting will make the colors 'stronger' while increasing it will make the colors look flat. Pattern search : the range of the search for connecting gradients. Increasing this value will generate less themes (and connect more gradients together). Auto color : Auto color will change the luminosity of the gradient according to the original palette. Decreasing this value will usually create bad looking sprites. Pixels coherance : Indicates the correlation between the new sprite and the old sprite (higher = better). Seed : The seed to generate the palette. The seed can be used with different sprites to generate a set; it's a controlled seed and it's not entirely random. For example, if the seed generates a full red palette, you can change the settings, load a different sprite and it will still be a full red palette. If you keep pushing the Next button, you'll notice the tail of the acidus doesn't always have the same color as the main body. To fix this, you have two options : automatic fix or manual fix. The first option is to simply increase the pattern search until the tail has the same color as the body. This works well in most cases, but it might not be the best option here. Instead, search for the main body gradients (press Shift while hovering on the palette), then press Ctrl to select the connected gradients. Now you have to add the tail to the theme, so keep using Shift until you find the tail gradient and left click on it to select it as well. Once you're done, go to edit and "Make a new theme" (Ctrl-M). If you change the color while selecting these palettes, it will also create a new theme automatically, but the auto color feature will be turned off (so you might want to turn it back on). Here's what you should end up with : Now you can simply keep pressing Next and always have nice looking acidus. If you go the sprite image #50, you'll probably have a weird looking fire ball. This happens because the palette is so messed up that the gradient was detected as not a gradient. The color of the gradient will be linked to other gradients in the palette when that happens, but this solution might fail (like it's the case here). To fix this, you can set the original gradient as a fixed theme (it won't be modified by any settings). This is done via Specials -> Replace selection with original palette (the gradients you have to select in this case are 7, 12, 14, 16, 18, 20, 22 and 24; using shift to find them makes it quite easy). I ended up Save your palette themes for another use with File -> Save settings. This will save your seed, your global settings and your custom themes on the right panel. You can copy the initial palette by clicking on Default, then Edit -> Generate custom themes from connected themes -> Press Next. This tool was made for fun; I've decided to add it because it actually works well for regular sprites. GRF Encryption Custom encryption of files in the GRF for version 0x200 is possible. See the application's description for a simple how-to-use guide. It's rather simple though... To get you started, go in Tools -> GRF encryption. Have fun and leave a comment/suggestion!
  20. The dialog has a fixed height and you're using a non-standard font size. Unless the author wants to fix it, you can go there : Right-click desktop -> Personalize -> Display (at the bottom) -> Smaller (100%).
  21. Indeed, this seems quite annoying. This is the expected behavior though, but I added some fixes for it. The breakOnExceptions command will only work for general exceptions; the one you're receiving is a GRF exception and it's treated differently. Nonetheless, these commands have been updated/added : -breakOnExceptions Requires a key press on exceptions. <1> Breaks on general exceptions (true or false). <opt> Breaks on GRF exceptions (true or false, false by default). -exitOnExceptions Terminates the application on any exception. <1> Exits on any exception (true or false, false by default). Breaking on exceptions will only pause the application and wait for you to read the message, then it will keep going normally. Exiting on exceptions will terminate the running instance of GrfCL (this includes exceptions from the GRF as well). So in your case, you would write : GrfCL.exe -breakOnExceptions true true -extractRgz file.rgz (This might give you two breaks if there's an exception, one for general exception and one for GRF exception) or GrfCL.exe -breakOnExceptions false true -extractRgz file.rgz (This will only break on GRF exceptions, hence only breaking on missing file exceptions) or GrfCL.exe -exitOnExceptions true -extractRgz file.rgz or GrfCL.exe -extractRgz file.rgz (this is the same as the previous line if there aren't any other commands) Or well... since this tool is meant for processing multiple files, I'd go for this batch file (it will extract all .rgz files in alphabetical order in the current folder) : @echo off REM I wouldn't want to break on exceptions, I'd rather read them all at the end set c= -breakOnExceptions false false setlocal enabledelayedexpansion REM You can change *.rgz to C:\temp5\*.rgz, just as an example FOR %%f in (*.rgz) DO ( set c=!c! -eRgz "%%f" "myROFolder" ) set c=%c% -break GrfCL.exe %c% ShellOpen was integrated in the RGZ class; this was an actual bug and it's been fixed now. Also fixed the weird saving progress for RGZ files. If you've got other problems, don't hesitate!
  22. I'd love to see these functions with it aswell, once it has those this would definitely be the perfect patcher for me Well, first thing first, thanks for the support! However I don't think you'll like the following answer. There's a reason why this patcher was never finished. It's still a good alternative way to patch the renewal client in case another patcher fails, but it will be really hard to make it as a private patcher. This program was made specially for the official renewal FTP server (the code is bound to the server's characteristics) and that cannot be changed easily. I won't go into details, but I'd have to remake the entire download library. Anyway, I don't really mind doing that, but it's part of the reason why I didn't complete it. As for the actual private patcher you're requesting, I had already started working on it. However the patcher still needs to be built on .NET 3.5 and this appears to be a problem for many users. This framework is only compatible with Windows SP2 and later. Sadly enough, people are still on Windows 98/ME/XP SP1. That would mean some players wouldn't be able to patch. Then there's the problem of customization. It's possible to add animations and do everything else to the patcher, but you'd have to teach people how WPF works. It doesn't allow a WebBroswer item to be shown if the window is transparent (a transparent window is required for custom styling), and now that's a real problem that I just can't fix. The solution I had was to remove the window's borders, but you still couldn't have a transparent background (that means no rounded corners). I've already got so many restrictions and annoyance that I simply concentrated on other projects instead. The other available patchers offer much better options and I didn't bother going further. I digged up the project though and I can show you where I was at (I was testing features to see what was possible and what wasn't; I turned out to be rather disappointed) : The XAML code is... relatively complex though (I'll spare you the styling resources details). <Border BorderBrush="#FF676767" BorderThickness="1"> <Grid Background="#1F1F1F"> <Grid.RowDefinitions> <RowDefinition Height="auto" /> <RowDefinition Height="auto" /> <RowDefinition Height="auto" /> <RowDefinition /> </Grid.RowDefinitions> <TextBlock Association="Title" Text="TK Patcher" Grid.Row="1" FontSize="30" Foreground="White" Margin="10"> <TextBlock.BitmapEffect> <OuterGlowBitmapEffect GlowColor="White" GlowSize="2" /> </TextBlock.BitmapEffect> </TextBlock> <Button Association="Close" Content="X" FontSize="15" Width="25" Grid.Row="1" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="10" /> <Button Association="Minimize" Content="_" FontSize="15" Width="25" Grid.Row="1" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="10 10 40 10" /> <Grid Grid.Row="2"> <StackPanel Margin="10"> <WebBrowser Association="BrowserNotice" Height="240" Source="http://ratemyserver.net/" /> <Label Association="Status" Content="Status" Foreground="#FF676767" /> <ProgressBar Association="PartialProgress" Value="75" Height="25" Foreground="Blue" /> <Label Association="PartialProgressInformation" Content="Download file 2013-10-10.grf..." Foreground="#FF676767" /> <DockPanel HorizontalAlignment="Right"> <Button Association="ClientStart" Arguments="-1sak1" Content="Start" Width="100" Margin="3" /> <Button Association="Close" Content="Close" Width="100" Margin="3" /> </DockPanel> </StackPanel> </Grid> </Grid> </Border> tl;dr : No, I won't be making a patcher soon and sorry about that. It would be too complex to make a patcher yourself using this, it isn't accessible to all users and it has too many restrictions. I don't want to make something that works only half of the time... If you've got solutions for these issues though, I wouldn't mind working back on it.
  23. I know your issue is fixed, but I'm still curious as to how you got errors with the regular method! The step 3 is what confuses me though, I'm not sure I understand what you did there. There are multiple ways to patch your GRF with GRF Editor, the easiest one is as follow : - Open the GRF you want to patch with the editor (in your case, the one from steps 1 and 2) - Drop the data folder from data_v4.0 directly on the opened data folder (in the editor, on the tree view). It should ask you if you want to merge the directory or add it as a subfolder. Select merge, wait maybe a second of two because you're adding 100k files and then save it! I just tried doing that with a 0x200 and a 0x103 GRF and it worked fine. Now what also worries me is that GRF Editor will not show empty folders, so I'm really wondering how you managed to do that ;o.
  24. I regret picking WPF as the base framework for this software, it has huge compability issues with Windows XP. Anyway, I found the actual issue (thanks for the crash log, this made it very quick) and as it happens, it appears to target Windows XP Home Edition only. If you don't want to wait, you can download the most recent version by going there : http://www.mediafire.com/?aflylbhblrzpz0h . I'm waiting a bit before releasing a new version on rA because I want to run more tests on Windows XP to prevent all similar issues (it's getting really annoying, for everyone). Either way, sorry about this inconvenience! (You will find another file, "GRF Editor.exe.config" that will help detect the most suitable .net framekwork compatible with the program. Using the installer will create the file automatically, so I'd suggest running that instead. Hopefully this should fix your current issue; I just tested on a fresh Windows XP Home Edition installation from the MSI installer.)
  25. Oups, forgot to respond to that. Yes, that could be the issue, I'm still not able to reproduce it though =/. I'm glad you managed to get it working anyway! Also, big updates on the software. The act animations are now being fully rendered; this has been on the todo list for weeks (if not months). I've added a ton of other stuff you won't notice, but the program is really, really stable now. There should no more UI lag Any threaded operation can be cancelled Added a third layer on the GRF manipulation, to ensure your data will not get corrupted / bugged / lost Using a new engine for the image processing (should be faster to load data, it uses its own structure and the images will never be loaded unless they're being used) Upgraded these formats : act, spr, gnd, grf, rsm, rsw, pal and rgz. All windows now use a canvas (easier to modify / make new windows) Preview images can be saved as Indexed8 bmp images, useful to generate minimaps Changed the location of the files so that they use the temp folder instead of throwing everything in the application's folder (it was getting messy) The speed of extraction and packing shouldn't have changed at all even with the new features I've added the source code of the application for those interested (http://www.mediafire.com/download.php?7z6hkdag4ayj8rs). If you have questions feel free to ask, but the sub project GRFTester shows pretty much everything you would need to know in order to make your own GRF application. You need these dependencies for a new project : GRF.dll, ErrorManager.dll, Utilities.dll and Ionic.Zlib.dll. The library can read almost any file format and I believe that should be helpful for making applications! Everything's in C# so that should be easy to understand and customize. If you have an idea to improve the software or simply a new feature you'd like to see, go ahead and ask!
×
×
  • Create New...