Neo-Mind Posted May 27, 2012 Posted May 27, 2012 Great Work Shin!! As for LUA files , I agree with having custom Lua files. The current format is a bit messed up . Quote
Lemongrass Posted May 27, 2012 Posted May 27, 2012 @Project: I'm currently adding LUA support. The idea of using lua files was a great step by Gravity, the only pitfall is that those files are messed up and it's pretty hard to keep compatibility with old and new client versions. For example: Take a look into "lua files/admin" and "lua files/datainfo". I haven't tracked down if the original client dropped "lua files/admin" and uses "lua files/datainfo" instead (especially for the function ReqJobName). Those in the admin folder have wrong display names and have probably been used when the data was placed in msgstringtable, while the jobnames in the datainfo folder are split into man and woman tables, using translations for spain? The probably best solution would be to recreate custom lua files that are clean and structured. This would, indeed, create the need of merging information from official lua files into the custom files. But this doesn't really matter since the official files have to be reversed anyway. Any thoughts? Personally I would say that creating custom lua files would be the best and cleanest solution, since there are some features that gravity's lua files don't include. For me it would be the best to stay at a single sort of text data structured files and not to mix up all of those. I would create some kind of interface that gives you some kind of needed methods like: String getJobname( int id ); String getItemname( int id ); String getItemdescription( int id ); String getItemiconpath( int id ); String getItemspritepath( int id ); ... Then I would implement it in the "official" way and the way, that you decide to go. Personally I would like to see no XML and LUA files in the client, but something like a SQLite database behind the settings and/or the client informations. I would also include some kind of inititialization functionality for this interface so that the possibility to check whether the required data is existing and like that you could even provide the server owners the possibility to store the latest item infos on their server and the client downloads it at startup. What do you think of that? Quote
Shinryo Posted May 27, 2012 Author Posted May 27, 2012 (edited) I have implemented a lua state class which acts as the interface you have mentioned. The custom client will read all lua related stuff (*.lua > *.lub) from a folder called "scripts" which resides at the root folder of the client. This folder is split into "tables" and "functions" which again contain lua files that are related to either pc, map, accessory, etc. Here's an example of a function I am currently using to get the hair sprite path: GetPcHairSpritePath = function(hair_id, male) local prefix = "" local postfix = "" if hair_id < 1 then hair_id = 1 elseif hair_id > 27 then hair_id = 27 end if male == false then prefix = "Àΰ£Á·/¸Ó¸®Åë/¿©/" postfix = "¿©.spr" else prefix = "Àΰ£Á·/¸Ó¸®Åë/³²/" postfix = "³².spr" end return prefix..hair_id.."_"..postfix end Right now, it is even possible to create custom classes with ease. XML and LUA help a lot in creating customization which is something that I try to achieve. I also plan to export whole classes so that those can be accessed through lua (e.g. network handler, window manager, etc). Therefore an SQL like database would be only good for storing configuration stuff or paths. Edited May 27, 2012 by Shinryo 2 Quote
GreenBox Posted May 27, 2012 Posted May 27, 2012 So... when the public repository will be available? Quote
GreenBox Posted May 27, 2012 Posted May 27, 2012 Oh If you need help, I love this type of project(mainly the network) 1 Quote
GM Djinsu Posted May 27, 2012 Posted May 27, 2012 @Shinyro - Your Project truly looks great and if only even partially released would be one of the best enhancements / modifications ever released. This from what I can see looks to be massively superior to Gravity's Client & I wish you the best of luck on this project! I can not wait to see the final results of this client ! Also thank you for your dedication to the community even though your core interests are elsewhere, but you can not beat the nostalgia of Ragnarok and you know it haha! Quote
Kiso Posted May 28, 2012 Posted May 28, 2012 Hmm, I was reading about the custom Lua files and even about custom windowing, splitting and display, and it kept me thinking. I'm not sure what is it that forces this behavior, but given that it is indeed a client-side issue, could it possibly be made so that you could make any item in the DB to behave like a weapon/shield sprite if the server sends in the apropriate information? I mean, will it show the actual weapon sprite animation (or even the default one) instead of a punch animation? I keep reading that the DBs have a limited amount of slots for the various weapons and that any change would force the punch thing. sometime people just want to make more than the amount of weapon slots avaialble to them. Quote
Shinryo Posted May 28, 2012 Author Posted May 28, 2012 It's up to you if you want this behaviour. Quote
guacamole Posted May 28, 2012 Posted May 28, 2012 (edited) Would you be able to change controls to WASD instead of using mouse clicks? Oh man, the possibilities! Another thing, i don't know much about game development but new mmo's tend to mask and help people to play with higher latency. RO's client have a huge problem, if you lag even a little bit you get freezed and teleported back to your last valid cell, something to fix that would be awesome. This issue also happens without server/client lag, it seens that the game just can't keep up with people on the screen, so you can cast a aoe and hit nothing or be unable to use a skill because the user is OOR. Nice work man. Edited May 28, 2012 by guacamole Quote
sketchyphoenix Posted May 28, 2012 Posted May 28, 2012 GetPcHairSpritePath = function(hair_id, male) local prefix = "" local postfix = "" if hair_id < 1 then hair_id = 1 elseif hair_id > 27 then hair_id = 27 end if male == false then prefix = "Àΰ£Á·/¸Ó¸®Åë/¿©/" postfix = "¿©.spr" else prefix = "Àΰ£Á·/¸Ó¸®Åë/³²/" postfix = "³².spr" end return prefix..hair_id.."_"..postfix end It looks like you're implementing classes through a module/function approach. Why not tables? Quote
Shinryo Posted May 29, 2012 Author Posted May 29, 2012 Hair sprites don't need a table. Everything else looks like this: PcIdTable = { ... JT_KNIGHT_H = 4008, ... } PcNameTable = { ... [PcIdTable.JT_KNIGHT_H] = "Lord Knight", ... } PcSpriteNameTable = { ... [PcIdTable.JT_KNIGHT_H] = "·Îµå³ªÀÌÆ®_", ... } Quote
Lemongrass Posted May 29, 2012 Posted May 29, 2012 Just as a matter of fact, would you mind leaving that part away: elseif hair_id > 27 then hair_id = 27 end I think the negativ check is important but the check if the hairstyle id is above 27 is an "unneeded" official behavior. I also would kind of cache all that stuff instead of looking it up every time it is needed. Quote
KeyWorld Posted May 29, 2012 Posted May 29, 2012 Hair sprites don't need a table. Are you sure ? M : start to index 2: 1 7 5 4 3 6 8 9 10 12 11 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 F : start to index 2: 4 7 1 5 3 6 12 10 9 11 8 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 (Default style: 2) It was base on an old client, things may have change, I didn't check it recently. Anyway, good job Quote
Everade Posted June 3, 2012 Posted June 3, 2012 I'm pretty sure the hairstyle ids are still mixed up. Unless they've updated it recently. btw great progress, you've surprised me already keep it up! Quote
Shade Posted July 27, 2012 Posted July 27, 2012 (edited) Hi, Keep up the good work and updates with the project, the client is considered one of the greatest bottlenecks of rAthena or any other emulator in this case. Completing such project may be excruciating and a long process, but completing such project would revolutionize the whole Ragnarok private server as a whole. I know this maybe immature or sounds like a word coming from an idiot's mouth or whatever you may call it but I need to know. It is stated somewhere that running private server is not illegal but hacking client is. By using this client, will it consider our own client or hacking Ragnarok client? Does this by any chance change the legality of private servers? Regards, Shade Edited July 27, 2012 by Shade Quote
Maki Posted July 27, 2012 Posted July 27, 2012 I believe he is writing the client from scratch and planning to make it open source; should not have anything to do with Gravity's client. If anything, this should make ragnarok private servers completely legal and out of the 'grey' zone they are in now. Quote
xazax Posted July 27, 2012 Posted July 27, 2012 As long as the custom client uses gravity's maps, sprites, acts, etc it is still in the grey zone. Correct me if i'm wrong. Quote
Maki Posted July 27, 2012 Posted July 27, 2012 ^ Forgot about that, you are correct. But I believe that is a different issue, in our case using the client would be totally fine =p (although I think in regards to other emulators (WoW) as long as you don't modify the client in any way it is fine to use it). In this instance, we can now modify the client itself and add features as it is not Gravity's. Quote
xazax Posted July 27, 2012 Posted July 27, 2012 Yeah, it is true. As far as I know, it is legal to spread gravity's stuff as long as you do not modify and do not sell it. Quote
Realusion Posted July 27, 2012 Posted July 27, 2012 As long as certain file formats like .grf can be read by the client and Gravity's sprites, sounds, music, effects are being used, it's still a violation of law. Although a custom client would be a big step towards legality, because it'd be the least of all problems to develop custom graphics/sounds as well. 1 Quote
Shade Posted July 28, 2012 Posted July 28, 2012 True, there are tons of custom graphics and music that we can use but not client. Just a suggestion, if you could make character's gender independent of each other. Perhaps maybe when a player creates a character, the client would ask (Male/Female) it would be great. I don't have much knowledge on coding and how it might make things complicated though. Quote
xazax Posted July 28, 2012 Posted July 28, 2012 That would also need some tweaking on the server side, to support. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.