OTClient 1.0

mrianura

Active Member
Joined
Jan 31, 2015
Messages
37
Reaction score
30
If you ask me, waste of time, better spend this time on improving current source code of client.
Yes, exactly, We still have not smooth walking for example. I think, that this is crucial for now.
 

oen432

Legendary OT User
Joined
Oct 3, 2014
Messages
1,327
Solutions
43
Reaction score
1,431
Location
Poland
GitHub
Oen44
Is it done? Did u start?
He won't do it, that's for sure. Even now it's noticeable that Mehah has little to no time for this project. I'm actually glad, OTUI is powerful as it is. The only issue is lack of tutorials for people that can't learn from code and need visual aid.
 

themate0

Well-Known Member
Joined
Mar 1, 2011
Messages
100
Solutions
1
Reaction score
59
Anyone else experiencing same problem?
Lua:
ERROR: protected lua call failed: LUA ERROR:
/gamelib/protocolgame.lua:23: opcode 246 already registered will be overriden
stack traceback:
    [C]: at 0x013f88af00
    [C]: in function 'error'
    /gamelib/protocolgame.lua:23: in function 'registerOpcode'
    /game_market/marketprotocol.lua:160: in function </game_market/marketprotocol.lua:158>

This error comes when you login 2nd or more times. I checked and this error doesn't happen on original edubart otclient.
 
Last edited:

Fresh

Quack!
Joined
Oct 21, 2009
Messages
1,724
Solutions
17
Reaction score
395
Location
Poland
It's because client is loading market module at start not when player is trying to open market.
Add this module to "load later" should fix this error.
Also this opcode - 246 - seems to be already use by you in somewhere else than market.
Can't you read the error and try to solve it by your own?
 

themate0

Well-Known Member
Joined
Mar 1, 2011
Messages
100
Solutions
1
Reaction score
59
It's because client is loading market module at start not when player is trying to open market.
Add this module to "load later" should fix this error.
Also this opcode - 246 - seems to be already use by you in somewhere else than market.
Can't you read the error and try to solve it by your own?
It affects all opcodes related with market, 246 is the first one. I've just noticed it doesn't have any negative impact on market so far, so it's not a priority for me to fix this issue atm.
 

PuszekLDZ

Member
Joined
Jan 2, 2020
Messages
148
Solutions
1
Reaction score
24
Location
Lodz
@Mehah - first of all... thanks a lot - nice work (i`ve donated for Your work already 20589791494150113 )

second - just fresh compiled under VS19 - exe (scan it or some - its clean compile - for all who cant compile for some reason)

third - that will be hard..
Im new in OTC and stuff (for now i just trying to make something with V8)
need to find some stuff:
  • i want to make my client dont have possibility of use another server ip, port etc. - so where and how write my connecting stuff like ip?
  • i know how to delete that forms like token etc.
  • is there any way to get autoupdater? im working on a server with my bro - and we planed to add some new weapons, monsters in time (as we hand a new idea, we want to add that - and player will get update)
  • how to disable language choose - and use only that one i want?

only that - for now - that my server host, ip, port is most important to me...
 

Attachments

Last edited:

ralke

(҂ ͠❛ ෴ ͡❛)ᕤ
Joined
Dec 17, 2011
Messages
784
Solutions
18
Reaction score
324
Location
Santiago - Chile
@Mehah Hi, I found a bug on target change.

The attack actually works good. When the battle panel is open, the square stay (at least the times I tested). But I need to fix the error that appears on the video. I attached a spoiler below with failed solutions I try for this problem. Please, if someone knows what I should look for to fix the issue in the video please reply or message me. Regards!

I think this commit will solve it (still untested but going to test asap), hope this is the place to report it because I don't have github account ;p. If someone founds any other commit related to this please let me know here or PM for test.

I saw this is part of the solution too, but I dont know if I need to add this lines too or just apply the commit above
C++:
if(m_showStaticSquare && outfit.getCategory() == ThingCategoryEffect && outfit.getAuxId() == 13)
{
    CreaturePtr creature = static_self_cast<Creature>();
    if(!isLocalPlayer() && (g_game.getAttackingCreature() == creature || g_game.getFollowingCreature() == creature))
        m_showStaticSquare = false;
}

Edit: Applied the first and second commit it is still bugged. Now it attacks the previous target when I change to another target :S
Edit2: Compared to kondrah repo, have this:
C++:
    if(seq == 0 || m_seq == seq)
        cancelAttack();
}
Applied the changes, and is even worse, don't work at all. Someone help please! Jajaja

Regards!
Post automatically merged:

@Mehah - first of all... thanks a lot - nice work (i`ve donated for Your work already 20589791494150113 )

second - just fresh compiled under VS19 - exe (scan it or some - its clean compile - for all who cant compile for some reason)

third - that will be hard..
Im new in OTC and stuff (for now i just trying to make something with V8)
need to find some stuff:
  • i want to make my client dont have possibility of use another server ip, port etc. - so where and how write my connecting stuff like ip?
  • i know how to delete that forms like token etc.
  • is there any way to get autoupdater? im working on a server with my bro - and we planed to add some new weapons, monsters in time (as we hand a new idea, we want to add that - and player will get update)
  • how to disable language choose - and use only that one i want?

only that - for now - that my server host, ip, port is most important to me...

Didn't saw your post. For change the server ip open in modules: client_entergame/server.otmod and enter the IP, Port, Protocol there.
To edit token and other entergame interface stuff just go to entergame.otui and delete the interface parts you don't want.
For language go to client_options/game.otui and delete
Code:
Button
    id: changeLocale
    !text: tr('Change language')
    @onClick: modules.client_locales.createWindow()
    anchors.top: prev.bottom
    anchors.left: prev.left
    margin-top: 12
    width: 120
The only thing I can't help you is the auto-updater but there's lots of tutorials out there.
Regards!
 
Last edited:

PuszekLDZ

Member
Joined
Jan 2, 2020
Messages
148
Solutions
1
Reaction score
24
Location
Lodz
Thanks @ralke
The only thing I can't help you is the auto-updater but there's lots of tutorials out there.
Regards!
im looking for all of those, but nothing work for me :)
im not a superduper programer - but i think :
  • some code for otclient compilation will be fine
  • even a simple program like launcher that will update files in folder and can run a game.exe will be ok :) (i try neoncube etc. but they wont work)

Post automatically merged:

@kondra in lastest version, after run a client i got that in .txt log
Diff:
ERROR: Render error: 1282 in GraphicalApplication::init (D:\a\otclient\otclient\src\framework\core\graphicalapplication.cpp:56)
GPU Intel(R) HD Graphics 2500 (Intel)
OpenGL 4.0.0 - Build 10.18.10.5161
[Atlas] Texture size is: 4096x4096 (max: 16384x16384)
Found work dir at 'C:/Users/admin/Desktop/klient/'
== application started at Apr 10 2021 10:25:46
Super Hero Online 3.0 rev 19 (dev) made by otclient.net built on Apr  9 2021 for arch x86
 

Nekiro

Legendary OT User
TFS Developer
Joined
Sep 7, 2015
Messages
2,448
Solutions
110
Reaction score
1,635
Thanks @ralke

im looking for all of those, but nothing work for me :)
im not a superduper programer - but i think :
  • some code for otclient compilation will be fine
  • even a simple program like launcher that will update files in folder and can run a game.exe will be ok :) (i try neoncube etc. but they wont work)

Post automatically merged:

@kondra in lastest version, after run a client i got that in .txt log
Diff:
ERROR: Render error: 1282 in GraphicalApplication::init (D:\a\otclient\otclient\src\framework\core\graphicalapplication.cpp:56)
GPU Intel(R) HD Graphics 2500 (Intel)
OpenGL 4.0.0 - Build 10.18.10.5161
[Atlas] Texture size is: 4096x4096 (max: 16384x16384)
Found work dir at 'C:/Users/admin/Desktop/klient/'
== application started at Apr 10 2021 10:25:46
Super Hero Online 3.0 rev 19 (dev) made by otclient.net built on Apr  9 2021 for arch x86
Why are you writting about v8 in otc 1.0 thread?
 

PuszekLDZ

Member
Joined
Jan 2, 2020
Messages
148
Solutions
1
Reaction score
24
Location
Lodz
Im trying and looking for a while - is there a possibility to change max soulpoints in that client? above ~250 i need to use them to another thing on my project :)
 

PuszekLDZ

Member
Joined
Jan 2, 2020
Messages
148
Solutions
1
Reaction score
24
Location
Lodz
@Nekiro i love to get answers from You :)
simple I/O - yes or not :D

can I count on a small hint where to look for it? I want to learn and make You proud :D
 

Fresh

Quack!
Joined
Oct 21, 2009
Messages
1,724
Solutions
17
Reaction score
395
Location
Poland
An super hint: Download for example Sublime Text Editor, add to your "project" in this program all folders from OTC : modules / source and then search in all files for: "Soul:" then
if you find the "soul" you could see where to change it.
Super tip, hope it helps.
 

oen432

Legendary OT User
Joined
Oct 3, 2014
Messages
1,327
Solutions
43
Reaction score
1,431
Location
Poland
GitHub
Oen44
An super hint: Download for example Sublime Text Editor, add to your "project" in this program all folders from OTC : modules / source and then search in all files for: "Soul:" then
if you find the "soul" you could see where to change it.
Super tip, hope it helps.
Yeah... No. There is more to it. You have to edit server sources, change integer type to 16+bit, then adjust function responsible for sending packet with souls so it sends same type or else it will limit to 255. Then you have to edit client sources, make sure it reads proper amount of bytes when receiving that packet.
 
OP
Mehah

Mehah

Excellent OT User
Joined
Jun 25, 2015
Messages
119
Reaction score
621
@Mehah Hi, I found a bug on target change.

The attack actually works good. When the battle panel is open, the square stay (at least the times I tested). But I need to fix the error that appears on the video. I attached a spoiler below with failed solutions I try for this problem. Please, if someone knows what I should look for to fix the issue in the video please reply or message me. Regards!

I think this commit will solve it (still untested but going to test asap), hope this is the place to report it because I don't have github account ;p. If someone founds any other commit related to this please let me know here or PM for test.

I saw this is part of the solution too, but I dont know if I need to add this lines too or just apply the commit above
C++:
if(m_showStaticSquare && outfit.getCategory() == ThingCategoryEffect && outfit.getAuxId() == 13)
{
    CreaturePtr creature = static_self_cast<Creature>();
    if(!isLocalPlayer() && (g_game.getAttackingCreature() == creature || g_game.getFollowingCreature() == creature))
        m_showStaticSquare = false;
}

Edit: Applied the first and second commit it is still bugged. Now it attacks the previous target when I change to another target :S
Edit2: Compared to kondrah repo, have this:
C++:
    if(seq == 0 || m_seq == seq)
        cancelAttack();
}
Applied the changes, and is even worse, don't work at all. Someone help please! Jajaja

Regards!
Post automatically merged:



Didn't saw your post. For change the server ip open in modules: client_entergame/server.otmod and enter the IP, Port, Protocol there.
To edit token and other entergame interface stuff just go to entergame.otui and delete the interface parts you don't want.
For language go to client_options/game.otui and delete
Code:
Button
    id: changeLocale
    !text: tr('Change language')
    @onClick: modules.client_locales.createWindow()
    anchors.top: prev.bottom
    anchors.left: prev.left
    margin-top: 12
    width: 120
The only thing I can't help you is the auto-updater but there's lots of tutorials out there.
Regards!
You took all the modules related to the battle mode and its libraries, there were things that were modified outside of the module itself, you are testing 1.0 with modules that are totally out of date, so it is difficult to give support.

but finally I inform that for now I will stop supporting 1.0, I will go to another project focused on 12xx, it will be a project based on 1.0, but with much more improvements and without compatibility with old versions of tibia, it will be practically rewritten and even the form that was optimized it will be rewritten, I will no longer use the painting schedule to improve performance, it is a kind of useless resource when there are many actions on the screen.

Soon I will be creating another topic to officially launch 1.0 already compiled and with brief information about the project.
 
Last edited:

ralke

(҂ ͠❛ ෴ ͡❛)ᕤ
Joined
Dec 17, 2011
Messages
784
Solutions
18
Reaction score
324
Location
Santiago - Chile
You took all the modules related to the battle mode and its libraries, there were things that were modified outside of the module itself, you are testing 1.0 with modules that are totally out of date, so it is difficult to give support.

but finally I inform that for now I will stop supporting 1.0, I will go to another project focused on 12xx, it will be a project based on 1.0, but with much more improvements and without compatibility with old versions of tibia, it will be practically rewritten and even the form that was optimized it will be rewritten, I will no longer use the painting schedule to improve performance, it is a kind of useless resource when there are many actions on the screen.

Soon I will be creating another topic to officially launch 1.0 already compiled and with brief information about the project.

I understand. After some time I started reading the code more and you can start seeing how it is optimized for 12xxx.

I am actually following your lastest commits on github mehah/otclient (https://github.com/mehah/otclient/commits?author=mehah), testing which ones can be applied in a lower version. Following all the test I started to identify which modules has to be old in order to optimize 8.6, but generally, it's been working good and allow me to fix the errors I mentioned before.

I wonder if this lastests commits (2-10 days ago) are still related to 1.0 or you already started to move on? The client you're making is awesome, with a few changes run very smooth for what I need. Thanks for the work 💪
 
OP
Mehah

Mehah

Excellent OT User
Joined
Jun 25, 2015
Messages
119
Reaction score
621
I understand. After some time I started reading the code more and you can start seeing how it is optimized for 12xxx.

I am actually following your lastest commits on github mehah/otclient (https://github.com/mehah/otclient/commits?author=mehah), testing which ones can be applied in a lower version. Following all the test I started to identify which modules has to be old in order to optimize 8.6, but generally, it's been working good and allow me to fix the errors I mentioned before.

I wonder if this lastests commits (2-10 days ago) are still related to 1.0 or you already started to move on? The client you're making is awesome, with a few changes run very smooth for what I need. Thanks for the work 💪

no, it will be in another repository, I will put the reference of the new repository in 1.0, in the project description.
 
Top