slavidodo / OpenTibia-Unity

A collection of projects to boost OpenTibia development!
https://slavi.gitbook.io/opentibiaunity/
MIT License
104 stars 45 forks source link

Custom client setup tutorial #14

Open Znote opened 4 years ago

Znote commented 4 years ago

This isn't a code issue, but more like a doc/wiki feature request.

A big bonus would be to actually be able to do all this without editing sources and compiling the server. (Like a txt/config file). Another bonus here could be that any player could remove this file and the OTU would return to a regular unmodified general-purpose state OTU client.

A source code modification tutorial that shows anyone how to tweak OTU to their server:


A basic custom client tutorial would consist of:


Extras:


Advanced:


I believe this will encourage OT owners to give OTU a go, and ship OTU clients to the players. OT owners wants to ship a personalised client for their OT, because it looks cool branding wise. Currently their options are hacking the cipclient, or use OTClient.

slavidodo commented 4 years ago
  1. Every module that I developed is a general-purpose module; that means I kept almost every client version in mind to make the style looks like the original one! With the current UI system, I'm totally against having a custmoizable theme; You can even notice that in the background module; I use a different background for every version (that matches it).
  2. Changing the application title would break a few things and may crash the application due to the fact that Unity doesn't provide a mechanism to change application title during gameplay and I have to obtain the HWND (IntPtr in C#) - handle - of the window manually using a hard-coded string of the application title.
  3. Changing RSA; Having a key.pem would solve the issue and as you mentioned it'd still use default OT/Cip RSA based on the IP.
  4. Auto updater is some sort of an ambitious idea for now; as the client itself will still need far more important things before we can think of an auto-updater; I also believe that the updater itself should be a separate project.
  5. Extended OP-Codes should be easy as modifying the protocolgame is nothing more than adding a case to the switch or modifying the existing ones using (ClientSpecification).

Take for example the Login Module; it basically simulates the IP to select a specification while it's very hard-coded, such an improvement would require a lot of refactors.

I agree to these changes and even a video tutorial doing so might be good for people with no knowledge in programming. Though, I only disagree with having a client directly without compiling in Unity.

Unity is planning to release UIElements for runtime soon which will allow for a lot of things to be done!