Jump to content

Recommended Posts

Posted

@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?

Posted (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 by Shinryo
  • Upvote 2
Posted

@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!

Posted

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.

Posted (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 by guacamole
Posted

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?

Posted

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] = "·Îµå³ªÀÌÆ®_",
...
}

Posted

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.

Posted
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 :)

  • 1 month later...
Posted (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 by Shade
Posted

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.

Posted

^ 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.

Posted

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.

  • Upvote 1
Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...