• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

TFS A* Algorithm :D

We reviewed this with @johnsamir via discord. He's now running his server with all the changes, was very easy to apply them all so I think he's not going to have more issues related to this system.

About the creature corner thing, we reproduced it on both engines, and it is indeed, delaying a little bit when the creature is on corners. But I also logged in to Tibia cipsoft (tibia rl) and noticed that the creature behaviour is the same (it stays on the corner). This only make me think that requesting this "feature" of getting out too fast from corners, is not cipsoft behaviour and I can say than is a custom feature (probably from 0.4/other engines).

There's cases, such as Deers, where they prioritize the scape, so they're really intended to walk out from corners. So I still need to test more the behaviour on this cases. But at the moment everything seems right at least for me.

Also, something important to say, is that the "corner trap" from real tibia depends a lot of where the player is placed, and also, of how to scaping route is drawn. For example, when I see that an Orc Spearman has a clear path that is a straight line to bottom, it will stay stucked on the corner. Otherwise, if the scaping route has free SQM to the right, but, it is not a straight line to the right, the creature will take the right path.

This are very very very little details, so I will keep testing it and see what I can conclude on all this. But in resume, I don't think that your suggestion on changing goToFollowCreature is correct. If you wish to have those creatures behaving like that, it's ok, but I advice that all the "elses" that are delaying the monster response are there for a reason.

Regards! ^^
Oo interesting , but which commit is this that changes the behavior of cornered monsters?

I am almost at a point where i can start testing with monsters as i am changing everything xD
 
There's no way that someone can fix a thing that isn't properly checked. And with this I mean, you should at least record or provide a screenshot, of why you think it has and error, and how it should behave. Don't post the code, post the proof that the system is not working how it should. As I see there's no issue at all.



Sorry for the delay, this one needs to be merged too in order to make everything work well ^^
Good catch @iNux

While you're testing all this I suggest that you merge kondras statistics system Feature - [TFS 1.4] OTS statistics (C++/Lua/SQL) by kondra (https://otland.net/threads/tfs-1-4-ots-statistics-c-lua-sql-by-kondra.283717/), allowing you to perhaps adjust some codes related to path finding and other things that might perhaps take a lot of CPU / Memory.

I'm trying to implement it myself but have some struggles, I'll keep trying and if I succeed I'll post the changes here.
 
While you're testing all this I suggest that you merge kondras statistics system
A bit off topic, but maybe someone needs it to add stats to his server:

Yesterday I reset my Docker cache (alpine:3.15.0 with all libraries installed) and I could not compile TFS 1.4 with OTS Stats using Docker anymore.

So I've made TFS 1.4 with OTS Stats and some 1.5 changes to make it compile on Linux (alpine:3.19.0) and Windows (vcpkg) [include stats.h/tasks.h in different files and move definitions of OTS Stats createTask (and other functions) to tasks.h, to make it compile without error with 1.5 compiler configuration]:
How to make OTS Stats work with lambda functions (TFS 1.5):

On topic:
I'm planning to add custom 'monsters AI' to my version of 1.4. It will make monsters run a bit dumber (like on real Tibia) and it should use less CPU.
First I must prepare some tool to benchmark how it works with XXX players and XXXX monsters. It may take a while, last Python 'stresser' tool I have is for 8.60 protocol.
 
Thanks gesior and iNux! I'll try to merge the statistics system to see what I can find. Not now but I'll so it in some moment ^^
Codina also send me this little tutorial to something similar on visual studio. It is how to attach visual studio profiler to running tfs process
1715747790982.png
So there's more options if someone wishes to try that. I haven't done yet, sorry guys.
I also wanted to bring something to your attention. While browsing the forgotten server repository, I stumbled upon this link Fix summon walk behavior by NRH-AA · Pull Request #4643 · otland/forgottenserver (https://github.com/otland/forgottenserver/pull/4643). I believe it could be useful for your server too. However, I haven't tried implementing it yet as I haven't had the opportunity to test anything yet.

I was able to implement it into Nekiros TFS-1.5-Downgrades 8.0 without any issues. It also works fine.
Forgot to merge that one! Now is merged ^^ thanks

@onTopic: here's a video explaining how to install and older version of vcpkg, to compile Greed-TFS-1.5-Downgrades. If you guys wish to do some tests with the engine too you're welcome, it has everything installed on it as you guys can see in commit logs. Did this recording while I was helping @abdala ragab and @3alola1 to compile their engines.


Regards!
 
Last edited:
Thanks gesior and iNux! I'll try to merge the statistics system to see what I can find. Not now but I'll so it in some moment ^^
Codina also send me this little tutorial to something similar on visual studio. It is how to attach visual studio profiler to running tfs process
View attachment 84674
So there's more options if someone wishes to try that. I haven't done yet, sorry guys.

Forgot to merge that one! Now is merged ^^ thanks

@onTopic: here's a video explaining how to install and older version of vcpkg, to compile Greed-TFS-1.5-Downgrades. If you guys wish to do some tests with the engine too you're welcome, it has everything installed on it as you guys can see in commit logs. Did this recording while I was helping @abdala ragab and @3alola1 to compile their engines.


Regards!
Great that you're making an effort. I tried but got stuck while attempting to merge the Stats system. If someone has time to explain what might be the issue, I have posted a support thread at:

 
Back
Top